@mci-ui/mci-ui 0.0.86 → 0.0.88

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.
Files changed (67) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared/ui/MciModal/MciModal.js +107 -59
  3. package/dist/shared/ui/mciAccordion/MciAccordion.js +97 -64
  4. package/dist/shared/ui/mciBreadcrumb/MciBreadcrumb.js +23 -21
  5. package/dist/shared/ui/mciButton/MciButton.js +47 -32
  6. package/dist/shared/ui/mciCheck/MciCheck.js +116 -92
  7. package/dist/shared/ui/mciCollapse/MciCollapse.js +86 -54
  8. package/dist/shared/ui/mciDrawer/MciDrawer.js +82 -59
  9. package/dist/shared/ui/mciInput/MciInput.js +143 -130
  10. package/dist/shared/ui/mciInput/mci-input.utils.js +10 -10
  11. package/dist/shared/ui/mciPagination/MciPagination.js +85 -63
  12. package/dist/shared/ui/mciPhone/MciPhone.js +59 -54
  13. package/dist/shared/ui/mciPhone/mci-phone.utils.js +10 -10
  14. package/dist/shared/ui/mciPicker/MciPicker.js +349 -181
  15. package/dist/shared/ui/mciSelect/MciSelect.js +150 -131
  16. package/dist/shared/ui/mciSelect/mci-select.utils.js +12 -12
  17. package/dist/shared/ui/mciSkeleton/MciSkeleton.js +16 -14
  18. package/dist/shared/ui/mciTable/MciTable.js +165 -126
  19. package/dist/shared/ui/mciTable/MciTableColumnsPanel.js +113 -106
  20. package/dist/shared/ui/mciTabs/MciTabs.js +73 -55
  21. package/dist/shared/ui/mciTag/MciTag.js +27 -18
  22. package/dist/shared/ui/mciTextarea/MciTextarea.js +47 -35
  23. package/dist/shared/ui/mciToast/MciToast.js +118 -72
  24. package/dist/shared/ui/mciToast/mci-toast.utils.js +40 -12
  25. package/dist/shared/ui/mciToggle/MciToggle.js +58 -36
  26. package/dist/shared/ui/mciTooltip/MciTooltip.js +2 -2
  27. package/dist/shared/ui/mciUpload/MciUpload.js +172 -149
  28. package/dist/types/shared/types/mci-table.types.d.ts +1 -0
  29. package/dist/types/shared/types/ui/accordion.types.d.ts +1 -0
  30. package/dist/types/shared/types/ui/breadcrumb.types.d.ts +1 -0
  31. package/dist/types/shared/types/ui/button.types.d.ts +3 -7
  32. package/dist/types/shared/types/ui/check.types.d.ts +4 -9
  33. package/dist/types/shared/types/ui/collapse.types.d.ts +1 -0
  34. package/dist/types/shared/types/ui/drawer.types.d.ts +2 -0
  35. package/dist/types/shared/types/ui/input.types.d.ts +4 -15
  36. package/dist/types/shared/types/ui/modal.types.d.ts +1 -0
  37. package/dist/types/shared/types/ui/pagination.types.d.ts +1 -0
  38. package/dist/types/shared/types/ui/phone.types.d.ts +1 -0
  39. package/dist/types/shared/types/ui/picker.types.d.ts +1 -0
  40. package/dist/types/shared/types/ui/select.types.d.ts +1 -0
  41. package/dist/types/shared/types/ui/skeleton.types.d.ts +1 -0
  42. package/dist/types/shared/types/ui/tabs.types.d.ts +1 -0
  43. package/dist/types/shared/types/ui/tag.types.d.ts +1 -0
  44. package/dist/types/shared/types/ui/textarea.types.d.ts +3 -7
  45. package/dist/types/shared/types/ui/toast.types.d.ts +1 -0
  46. package/dist/types/shared/types/ui/toggle.types.d.ts +3 -2
  47. package/dist/types/shared/types/ui/upload.types.d.ts +1 -0
  48. package/dist/types/shared/ui/MciModal/MciModal.d.ts +1 -1
  49. package/dist/types/shared/ui/mciAccordion/MciAccordion.d.ts +5 -3
  50. package/dist/types/shared/ui/mciBreadcrumb/MciBreadcrumb.d.ts +1 -1
  51. package/dist/types/shared/ui/mciButton/MciButton.d.ts +1 -1
  52. package/dist/types/shared/ui/mciCollapse/MciCollapse.d.ts +1 -1
  53. package/dist/types/shared/ui/mciDrawer/MciDrawer.d.ts +1 -1
  54. package/dist/types/shared/ui/mciInput/MciInput.d.ts +13 -2
  55. package/dist/types/shared/ui/mciInput/mci-input.utils.d.ts +2 -2
  56. package/dist/types/shared/ui/mciPagination/MciPagination.d.ts +1 -1
  57. package/dist/types/shared/ui/mciPhone/mci-phone.utils.d.ts +2 -2
  58. package/dist/types/shared/ui/mciSelect/mci-select.utils.d.ts +2 -2
  59. package/dist/types/shared/ui/mciSkeleton/MciSkeleton.d.ts +1 -1
  60. package/dist/types/shared/ui/mciTable/MciTable.d.ts +1 -1
  61. package/dist/types/shared/ui/mciTable/MciTableColumnsPanel.d.ts +2 -1
  62. package/dist/types/shared/ui/mciTabs/MciTabs.d.ts +1 -1
  63. package/dist/types/shared/ui/mciTag/MciTag.d.ts +1 -1
  64. package/dist/types/shared/ui/mciTextarea/MciTextarea.d.ts +7 -2
  65. package/dist/types/shared/ui/mciToast/mci-toast.utils.d.ts +32 -4
  66. package/dist/types/shared/ui/mciToggle/MciToggle.d.ts +1 -1
  67. package/package.json +1 -1
@@ -1,108 +1,131 @@
1
- import { jsxs as n, Fragment as j, jsx as t } from "react/jsx-runtime";
2
- import { useRef as f, useCallback as E, useEffect as h, useMemo as C } from "react";
3
- import { cn as l } from "../../lib/utils.js";
4
- import X from "../../../assets/icons/close.svg.js";
5
- function A({
1
+ import { jsxs as n, Fragment as E, jsx as t } from "react/jsx-runtime";
2
+ import { useRef as h, useCallback as C, useEffect as x, useMemo as X } from "react";
3
+ import { cn as i } from "../../lib/utils.js";
4
+ import z from "../../../assets/icons/close.svg.js";
5
+ function F({
6
6
  isOpen: e,
7
- onClose: i,
7
+ onClose: c,
8
8
  position: o = "right",
9
9
  children: p,
10
10
  footer: m,
11
- title: r,
12
- description: a,
13
- showCloseButton: c = !0,
14
- drawerClassName: x,
15
- contentClassName: v,
16
- closeOnOverlayClick: y = !0,
17
- closeOnEscape: z = !0,
18
- width: s = 572
11
+ title: a,
12
+ description: s,
13
+ showCloseButton: d = !0,
14
+ drawerClassName: v,
15
+ contentClassName: y,
16
+ footerClassName: g,
17
+ closeOnOverlayClick: w = !0,
18
+ closeOnEscape: P = !0,
19
+ width: l = 572,
20
+ darkMode: r = !1
19
21
  }) {
20
- const d = f(null), u = f(null), b = E(() => i(), [i]);
21
- h(() => {
22
- e ? (u.current = document.activeElement, d.current?.focus()) : u.current?.focus();
23
- }, [e]), h(() => (e && (document.body.style.overflow = "hidden"), () => {
22
+ const u = h(null), b = h(null), f = C(() => c(), [c]);
23
+ x(() => {
24
+ e ? (b.current = document.activeElement, u.current?.focus()) : b.current?.focus();
25
+ }, [e]), x(() => (e && (document.body.style.overflow = "hidden"), () => {
24
26
  document.body.style.overflow = "unset";
25
27
  }), [e]);
26
- const w = C(
28
+ const N = X(
27
29
  () => ({
28
- "--drawer-w": typeof s == "number" ? `${s}px` : s,
30
+ "--drawer-w": typeof l == "number" ? `${l}px` : l,
29
31
  transform: e ? "translateX(0)" : o === "right" ? "translateX(calc(100% + 48px))" : "translateX(calc(-100% - 48px))"
30
32
  }),
31
- [e, s, o]
32
- ), g = !!(r || a || c), k = o === "right" ? "top-0 bottom-0 right-0 left-3 rounded-l-3xl rounded-r-none" : "top-0 bottom-0 left-0 right-3 rounded-r-3xl rounded-l-none", N = o === "right" ? "sm:top-6 sm:bottom-6 sm:right-6 sm:left-auto" : "sm:top-6 sm:bottom-6 sm:left-6 sm:right-auto";
33
- return /* @__PURE__ */ n(j, { children: [
33
+ [e, l, o]
34
+ ), k = !!(a || s || d), $ = o === "right" ? "top-0 bottom-0 right-0 left-3 rounded-l-3xl rounded-r-none" : "top-0 bottom-0 left-0 right-3 rounded-r-3xl rounded-l-none", j = o === "right" ? "sm:top-6 sm:bottom-6 sm:right-6 sm:left-auto" : "sm:top-6 sm:bottom-6 sm:left-6 sm:right-auto";
35
+ return /* @__PURE__ */ n(E, { children: [
34
36
  /* @__PURE__ */ t(
35
37
  "div",
36
38
  {
37
- className: l(
39
+ className: i(
38
40
  "fixed inset-0 z-50 bg-black/40 transition-opacity duration-300",
39
41
  e ? "opacity-100 visible cursor-pointer" : "opacity-0 invisible pointer-events-none"
40
42
  ),
41
- onClick: y ? b : void 0,
43
+ onClick: w ? f : void 0,
42
44
  "aria-hidden": "true"
43
45
  }
44
46
  ),
45
47
  /* @__PURE__ */ n(
46
48
  "div",
47
49
  {
48
- ref: d,
50
+ ref: u,
49
51
  tabIndex: -1,
50
- style: w,
51
- className: l(
52
- "fixed z-50 flex flex-col bg-white outline-none min-h-0",
52
+ style: N,
53
+ className: i(
54
+ `fixed z-50 flex flex-col ${r ? "bg-black" : "bg-white"} outline-none min-h-0`,
53
55
  "transition-[transform,opacity,visibility] duration-300 ease-in-out",
54
56
  e ? "opacity-100 visible pointer-events-auto shadow-2xl" : "opacity-0 invisible pointer-events-none shadow-none",
55
- k,
57
+ $,
56
58
  "h-[100dvh]",
57
59
  "pb-[env(safe-area-inset-bottom)]",
58
- N,
60
+ j,
59
61
  "sm:h-auto sm:rounded-2xl sm:pb-0",
60
62
  "sm:w-[var(--drawer-w)]",
61
- x
63
+ v
62
64
  ),
63
65
  role: "dialog",
64
66
  "aria-modal": "true",
65
67
  "aria-hidden": !e,
66
- "aria-labelledby": r ? "drawer-title" : void 0,
68
+ "aria-labelledby": a ? "drawer-title" : void 0,
67
69
  children: [
68
- g && /* @__PURE__ */ n("div", { className: "flex items-start justify-between border-b border-slate-200 shrink-0 px-4 py-4 sm:p-6", children: [
69
- (r || a) && /* @__PURE__ */ n("div", { className: "block pr-3", children: [
70
- r && /* @__PURE__ */ t(
71
- "h2",
72
- {
73
- id: "drawer-title",
74
- className: "font-semibold text-black text-xl leading-tight sm:text-h3",
75
- children: r
76
- }
77
- ),
78
- a && /* @__PURE__ */ t("p", { className: "text-sm sm:text-base text-slate-base font-normal mt-2", children: a })
79
- ] }),
80
- c && /* @__PURE__ */ t(
81
- "button",
82
- {
83
- type: "button",
84
- onClick: b,
85
- className: "bg-slate-100 rounded-xl w-11 h-11 sm:w-12 sm:h-12 hover:cursor-pointer text-black transition flex items-center justify-center group active:scale-95",
86
- children: /* @__PURE__ */ t(X, { className: "h-5 w-5 sm:h-6 sm:w-6 transition-transform duration-300 group-hover:rotate-180" })
87
- }
88
- )
89
- ] }),
70
+ k && /* @__PURE__ */ n(
71
+ "div",
72
+ {
73
+ className: `flex items-start justify-between border-b ${r ? "border-neutral-200" : "border-slate-200"} shrink-0 px-4 py-4 sm:p-6`,
74
+ children: [
75
+ (a || s) && /* @__PURE__ */ n("div", { className: "block pr-3", children: [
76
+ a && /* @__PURE__ */ t(
77
+ "h2",
78
+ {
79
+ id: "drawer-title",
80
+ className: `font-semibold ${r ? "text-slate-50" : "text-black"} text-xl leading-tight sm:text-h3`,
81
+ children: a
82
+ }
83
+ ),
84
+ s && /* @__PURE__ */ t("p", { className: `text-sm sm:text-base ${r ? "text-neutral-50" : "text-slate-base"} font-normal mt-2`, children: s })
85
+ ] }),
86
+ d && /* @__PURE__ */ t(
87
+ "button",
88
+ {
89
+ type: "button",
90
+ onClick: f,
91
+ className: `${r ? "bg-neutral-300 text-slate-50" : "bg-slate-100 text-black"} rounded-xl w-11 h-11 sm:w-12 sm:h-12 hover:cursor-pointer transition flex items-center justify-center group active:scale-95`,
92
+ children: /* @__PURE__ */ t(
93
+ z,
94
+ {
95
+ className: "h-5 w-5 sm:h-6 sm:w-6 transition-transform duration-300 group-hover:rotate-180"
96
+ }
97
+ )
98
+ }
99
+ )
100
+ ]
101
+ }
102
+ ),
90
103
  /* @__PURE__ */ t(
91
104
  "div",
92
105
  {
93
- className: l(
106
+ className: i(
94
107
  "flex-1 min-h-0 overflow-y-auto scrollbar-thin scrollbar-thumb-slate-200 px-4 py-4 sm:p-6",
95
- v
108
+ y
96
109
  ),
97
110
  children: p
98
111
  }
99
112
  ),
100
- m && /* @__PURE__ */ t("div", { className: "shrink-0 flex items-center justify-end border-t border-slate-200 px-4 py-4 sm:p-6 gap-3 [&>*]:w-fit [&>*]:shrink-0 [&>*]:whitespace-nowrap", children: m })
113
+ m && /* @__PURE__ */ t(
114
+ "div",
115
+ {
116
+ className: i(
117
+ "shrink-0 flex items-center justify-end border-t px-4 py-4 sm:p-6 gap-3 [&>*]:w-fit [&>*]:shrink-0 [&>*]:whitespace-nowrap",
118
+ r ? "border-neutral-200" : "border-slate-200",
119
+ g
120
+ ),
121
+ children: m
122
+ }
123
+ )
101
124
  ]
102
125
  }
103
126
  )
104
127
  ] });
105
128
  }
106
129
  export {
107
- A as default
130
+ F as default
108
131
  };
@@ -1,212 +1,216 @@
1
- import { jsxs as f, jsx as s, Fragment as $ } from "react/jsx-runtime";
2
- import { EyeClosed as q, Eye as z } from "@solar-icons/react";
3
- import { forwardRef as ee, useState as w, useMemo as m } from "react";
4
- import te from "../../../assets/icons/close.svg.js";
5
- import { cn as t } from "../../lib/utils.js";
6
- import { getInputSizes as se, getInputStateStyles as ne, getInputIconColor as le, getInputRightPaddingClass as ae } from "./mci-input.utils.js";
7
- const re = ee(
1
+ import { jsxs as p, jsx as l, Fragment as z } from "react/jsx-runtime";
2
+ import { EyeClosed as ee, Eye as te } from "@solar-icons/react";
3
+ import { forwardRef as le, useState as v, useMemo as h } from "react";
4
+ import se from "../../../assets/icons/close.svg.js";
5
+ import { cn as e } from "../../lib/utils.js";
6
+ import { getInputSizes as ne, getInputStateStyles as ae, getInputIconColor as re, getInputRightPaddingClass as ce } from "./mci-input.utils.js";
7
+ const ie = le(
8
8
  ({
9
- label: j,
10
- placeholder: B,
11
- type: b = "text",
12
- icon: r,
13
- rightIcon: a,
14
- iconPosition: i = "left",
15
- size: e = "base",
16
- error: c,
17
- disabled: p = !1,
18
- required: v = !1,
9
+ label: C,
10
+ placeholder: E,
11
+ type: w = "text",
12
+ icon: c,
13
+ rightIcon: r,
14
+ iconPosition: u = "left",
15
+ size: t = "base",
16
+ darkMode: a = !1,
17
+ error: i,
18
+ disabled: f = !1,
19
+ required: F = !1,
19
20
  value: N,
20
- onChange: M,
21
- onFocus: V,
22
- onBlur: E,
23
- className: P,
24
- name: C,
25
- maxLength: h = 250,
26
- onClear: _,
27
- showClearButton: D = !1,
28
- step: A,
29
- autoComplete: G = "off"
30
- }, H) => {
31
- const [k, F] = w(!1), [J, I] = w(""), [S, K] = w(!1), W = N ?? J, o = b === "password", x = D && !!W && !p, y = r && i === "left", g = r && i === "right" || a || o, L = g || x, R = m(() => {
32
- let l = 0;
33
- return x && (l += 1), o ? (l += 1, a && (l += 1), l) : (a && (l += 1), r && i === "right" && (l += 1), l);
34
- }, [x, o, a, r, i]), O = () => {
35
- F(!0), V?.();
36
- }, Q = () => {
37
- F(!1), E?.();
38
- }, T = (l) => {
39
- let d = l.target.value;
40
- b === "number" && h && d.length > h && (d = d.slice(0, h), l.target.value = d), N === void 0 && I(d), M?.(l);
41
- }, U = () => K((l) => !l), X = () => {
42
- N === void 0 && I(""), _?.();
43
- }, n = m(
44
- () => se(!!y, !!g),
45
- [y, g]
46
- ), Y = m(() => ne(c), [c]), u = m(
47
- () => le(p, c, k),
48
- [c, k, p]
49
- ), Z = m(
50
- () => ae(e, R),
51
- [e, R]
21
+ onChange: P,
22
+ onFocus: _,
23
+ onBlur: D,
24
+ className: A,
25
+ name: I,
26
+ maxLength: x = 250,
27
+ onClear: G,
28
+ showClearButton: H = !1,
29
+ step: J,
30
+ autoComplete: K = "off",
31
+ ...L
32
+ }, O) => {
33
+ const [y, S] = v(!1), [Q, W] = v(""), [R, T] = v(!1), B = N ?? Q, o = w === "password", b = H && !!B && !f, g = c && u === "left", j = c && u === "right" || r || o, U = j || b, V = h(() => {
34
+ let n = 0;
35
+ return b && (n += 1), o ? (n += 1, r && (n += 1), n) : (r && (n += 1), c && u === "right" && (n += 1), n);
36
+ }, [b, o, r, c, u]), X = (n) => {
37
+ S(!0), _?.(n);
38
+ }, Y = (n) => {
39
+ S(!1), D?.(n);
40
+ }, Z = (n) => {
41
+ let m = n.target.value;
42
+ w === "number" && x && m.length > x && (m = m.slice(0, x), n.target.value = m), N === void 0 && W(m), P?.(n);
43
+ }, $ = () => T((n) => !n), q = () => {
44
+ N === void 0 && W(""), G?.();
45
+ }, s = h(
46
+ () => ne(!!g, !!j),
47
+ [g, j]
48
+ ), k = h(() => ae(i, a), [i, a]), d = h(
49
+ () => re(f, i, y, a),
50
+ [i, y, f, a]
51
+ ), M = h(
52
+ () => ce(t, V),
53
+ [t, V]
52
54
  );
53
- return /* @__PURE__ */ f("div", { className: t("w-full", P), children: [
54
- j && /* @__PURE__ */ f(
55
+ return /* @__PURE__ */ p("div", { className: e("w-full", A), children: [
56
+ C && /* @__PURE__ */ p(
55
57
  "label",
56
58
  {
57
- htmlFor: C,
58
- className: t(
59
+ htmlFor: I,
60
+ className: e(
59
61
  "mb-2 block text-base font-medium",
60
- c ? "text-red-600" : "text-slate-700",
61
- n[e].labelFont
62
+ i ? a ? "text-red-500" : "text-red-600" : a ? "text-neutral-50" : "text-slate-700",
63
+ s[t].labelFont
62
64
  ),
63
65
  children: [
64
- j,
65
- v && /* @__PURE__ */ s("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
66
+ C,
67
+ F && /* @__PURE__ */ l("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
66
68
  ]
67
69
  }
68
70
  ),
69
- /* @__PURE__ */ f("div", { className: "relative flex items-center", children: [
70
- /* @__PURE__ */ s(
71
+ /* @__PURE__ */ p("div", { className: "relative flex items-center", children: [
72
+ /* @__PURE__ */ l(
71
73
  "input",
72
74
  {
73
- ref: H,
74
- name: C,
75
- type: o && S ? "text" : b,
76
- value: W,
77
- onChange: T,
78
- onFocus: O,
79
- onBlur: Q,
80
- disabled: p,
81
- required: v,
82
- autoComplete: G,
83
- placeholder: B,
84
- step: A,
85
- className: t(
86
- "w-full border bg-white font-normal transition-all duration-300 ease-in-out outline-none",
87
- e === "base" ? "rounded-xl" : "rounded-lg",
88
- "disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
75
+ ...L,
76
+ ref: O,
77
+ name: I,
78
+ type: o && R ? "text" : w,
79
+ value: B,
80
+ onChange: Z,
81
+ onFocus: X,
82
+ onBlur: Y,
83
+ disabled: f,
84
+ required: F,
85
+ autoComplete: K,
86
+ placeholder: E,
87
+ step: J,
88
+ className: e(
89
+ "w-full border font-normal transition-all duration-300 ease-in-out outline-none",
90
+ t === "base" ? "rounded-xl" : "rounded-lg",
91
+ a ? "text-neutral-50 placeholder:text-neutral-100 disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-300 disabled:text-neutral-100/50 disabled:placeholder:text-neutral-100/50" : "bg-white disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
92
+ a && y && !f && "text-white",
89
93
  "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
90
- n[e].input,
91
- n[e].padding,
92
- Z,
93
- Y
94
+ s[t].input,
95
+ s[t].padding,
96
+ M,
97
+ k
94
98
  ),
95
- maxLength: h
99
+ maxLength: x
96
100
  }
97
101
  ),
98
- y && /* @__PURE__ */ s(
102
+ g && /* @__PURE__ */ l(
99
103
  "div",
100
104
  {
101
- className: t(
105
+ className: e(
102
106
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center",
103
107
  "transition-all duration-300",
104
- n[e].leftIcon,
105
- u
108
+ s[t].leftIcon,
109
+ d
106
110
  ),
107
- children: /* @__PURE__ */ s(
111
+ children: /* @__PURE__ */ l(
108
112
  "div",
109
113
  {
110
- className: t("flex items-center justify-center", n[e].iconWrapper),
111
- children: /* @__PURE__ */ s("span", { className: t("flex items-center justify-center", n[e].icon), children: r })
114
+ className: e("flex items-center justify-center", s[t].iconWrapper),
115
+ children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", s[t].icon), children: c })
112
116
  }
113
117
  )
114
118
  }
115
119
  ),
116
- L && /* @__PURE__ */ f(
120
+ U && /* @__PURE__ */ p(
117
121
  "div",
118
122
  {
119
- className: t(
123
+ className: e(
120
124
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center gap-2",
121
125
  "transition-all duration-300",
122
- n[e].rightIcon
126
+ s[t].rightIcon
123
127
  ),
124
128
  children: [
125
- x && /* @__PURE__ */ s(
129
+ b && /* @__PURE__ */ l(
126
130
  "button",
127
131
  {
128
132
  type: "button",
129
- onClick: X,
130
- className: t(
133
+ onClick: q,
134
+ className: e(
131
135
  "flex items-center justify-center",
132
- n[e].iconWrapper,
133
- "text-slate-base hover:text-black"
136
+ s[t].iconWrapper,
137
+ a ? "text-neutral-100 hover:text-white" : "text-slate-base hover:text-black"
134
138
  ),
135
139
  style: { cursor: "pointer" },
136
- children: /* @__PURE__ */ s("span", { className: t("flex items-center justify-center", n[e].icon), children: /* @__PURE__ */ s(te, { className: t("h-full w-full") }) })
140
+ children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", s[t].icon), children: /* @__PURE__ */ l(se, { className: e("h-full w-full") }) })
137
141
  }
138
142
  ),
139
- a && !o && /* @__PURE__ */ s(
143
+ r && !o && /* @__PURE__ */ l(
140
144
  "div",
141
145
  {
142
- className: t("flex items-center justify-center", n[e].iconWrapper),
143
- children: /* @__PURE__ */ s(
146
+ className: e("flex items-center justify-center", s[t].iconWrapper),
147
+ children: /* @__PURE__ */ l(
144
148
  "span",
145
149
  {
146
- className: t(
150
+ className: e(
147
151
  "flex items-center justify-center",
148
- n[e].icon,
149
- u
152
+ s[t].icon,
153
+ d
150
154
  ),
151
- children: a
155
+ children: r
152
156
  }
153
157
  )
154
158
  }
155
159
  ),
156
- o && /* @__PURE__ */ f($, { children: [
157
- a && /* @__PURE__ */ s(
160
+ o && /* @__PURE__ */ p(z, { children: [
161
+ r && /* @__PURE__ */ l(
158
162
  "div",
159
163
  {
160
- className: t(
164
+ className: e(
161
165
  "flex items-center justify-center",
162
- n[e].iconWrapper
166
+ s[t].iconWrapper
163
167
  ),
164
- children: /* @__PURE__ */ s(
168
+ children: /* @__PURE__ */ l(
165
169
  "span",
166
170
  {
167
- className: t(
171
+ className: e(
168
172
  "flex items-center justify-center",
169
- n[e].icon,
170
- u
173
+ s[t].icon,
174
+ d
171
175
  ),
172
- children: a
176
+ children: r
173
177
  }
174
178
  )
175
179
  }
176
180
  ),
177
- /* @__PURE__ */ s(
181
+ /* @__PURE__ */ l(
178
182
  "button",
179
183
  {
180
184
  type: "button",
181
- onClick: U,
182
- className: t(
185
+ onClick: $,
186
+ className: e(
183
187
  "flex items-center justify-center",
184
- n[e].iconWrapper,
185
- u
188
+ s[t].iconWrapper,
189
+ d
186
190
  ),
187
- children: /* @__PURE__ */ s(
191
+ children: /* @__PURE__ */ l(
188
192
  "span",
189
193
  {
190
- className: t("flex items-center justify-center cursor-pointer", n[e].icon),
191
- children: S ? /* @__PURE__ */ s(q, { weight: "Linear", className: t("h-full w-full") }) : /* @__PURE__ */ s(z, { weight: "Linear", className: t("h-full w-full") })
194
+ className: e("flex items-center justify-center cursor-pointer", s[t].icon),
195
+ children: R ? /* @__PURE__ */ l(ee, { weight: "Linear", className: e("h-full w-full") }) : /* @__PURE__ */ l(te, { weight: "Linear", className: e("h-full w-full") })
192
196
  }
193
197
  )
194
198
  }
195
199
  )
196
200
  ] }),
197
- r && i === "right" && !o && /* @__PURE__ */ s(
201
+ c && u === "right" && !o && /* @__PURE__ */ l(
198
202
  "div",
199
203
  {
200
- className: t("flex items-center justify-center", n[e].iconWrapper),
201
- children: /* @__PURE__ */ s(
204
+ className: e("flex items-center justify-center", s[t].iconWrapper),
205
+ children: /* @__PURE__ */ l(
202
206
  "span",
203
207
  {
204
- className: t(
208
+ className: e(
205
209
  "flex items-center justify-center",
206
- n[e].icon,
207
- u
210
+ s[t].icon,
211
+ d
208
212
  ),
209
- children: r
213
+ children: c
210
214
  }
211
215
  )
212
216
  }
@@ -215,11 +219,20 @@ const re = ee(
215
219
  }
216
220
  )
217
221
  ] }),
218
- c && /* @__PURE__ */ s("p", { className: "mt-2 animate-[slideDown_0.3s_ease-out] text-sm font-normal text-red-600", children: c })
222
+ i && /* @__PURE__ */ l(
223
+ "p",
224
+ {
225
+ className: e(
226
+ "mt-2 animate-[slideDown_0.3s_ease-out] text-sm font-normal",
227
+ a ? "text-red-500" : "text-red-600"
228
+ ),
229
+ children: i
230
+ }
231
+ )
219
232
  ] });
220
233
  }
221
234
  );
222
- re.displayName = "MciInput";
235
+ ie.displayName = "MciInput";
223
236
  export {
224
- re as default
237
+ ie as default
225
238
  };
@@ -1,4 +1,4 @@
1
- const p = {
1
+ const u = {
2
2
  sm: {
3
3
  input: "h-9 text-sm",
4
4
  icon: "w-4 h-4",
@@ -24,19 +24,19 @@ const p = {
24
24
  iconWrapper: "h-5"
25
25
  }
26
26
  };
27
- function u(e, r) {
27
+ function p(e, r) {
28
28
  const t = (n) => n === "sm" ? e && r ? "pl-7 pr-7" : e ? "pl-7 pr-2" : r ? "pl-2 pr-7" : "px-2" : n === "md" ? e && r ? "pl-8 pr-8" : e ? "pl-8 pr-2" : r ? "pl-2 pr-8" : "px-4" : e && r ? "pl-9 pr-9" : e ? "pl-9 pr-3" : r ? "pl-3 pr-9" : "px-4";
29
29
  return {
30
- sm: { ...p.sm, padding: t("sm") },
31
- md: { ...p.md, padding: t("md") },
32
- base: { ...p.base, padding: t("base") }
30
+ sm: { ...u.sm, padding: t("sm") },
31
+ md: { ...u.md, padding: t("md") },
32
+ base: { ...u.base, padding: t("base") }
33
33
  };
34
34
  }
35
- function i(e) {
36
- return e ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600";
35
+ function i(e, r) {
36
+ return r ? e ? "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_2px_rgba(231,0,11,0.25)]" : "border-neutral-200 hover:border-neutral-100 focus:border-blue-500 focus:shadow-[0_0_0_2px_var(--opacity-25,rgba(21,93,252,0.25))]" : e ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600";
37
37
  }
38
- function f(e, r, t) {
39
- return e ? "text-slate-400" : r ? "text-red-600" : t ? "text-black" : "text-slate-400";
38
+ function f(e, r, t, n) {
39
+ return n ? e ? "text-neutral-100/50" : r ? "text-red-500" : t ? "text-white" : "text-neutral-100" : e ? "text-slate-400" : r ? "text-red-600" : t ? "text-black" : "text-slate-400";
40
40
  }
41
41
  function d(e, r) {
42
42
  return r <= 0 ? "" : e === "sm" ? r >= 3 ? "pr-14" : r === 2 ? "pr-11" : "pr-7" : e === "md" ? r >= 3 ? "pr-16" : r === 2 ? "pr-12" : "pr-8" : r >= 3 ? "pr-20" : r === 2 ? "pr-16" : "pr-10";
@@ -44,6 +44,6 @@ function d(e, r) {
44
44
  export {
45
45
  f as getInputIconColor,
46
46
  d as getInputRightPaddingClass,
47
- u as getInputSizes,
47
+ p as getInputSizes,
48
48
  i as getInputStateStyles
49
49
  };