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