mcr-design-systems 1.0.7 → 1.0.9
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/index.js +5 -5
- package/dist/components/Chip/index.js +65 -65
- package/dist/components/InputBase/index.d.ts +2 -0
- package/dist/components/InputBase/index.js +156 -72
- package/dist/components/InputBase/variants.d.ts +17 -2
- package/dist/components/InputBase/variants.js +9 -4
- package/dist/components/InputDatePicker/index.js +66 -66
- package/dist/components/InputPassword/index.js +28 -37
- package/dist/components/Loading/index.js +16 -19
- package/dist/components/PIN/index.js +72 -78
- package/dist/components/PhoneInput/helper/variants.d.ts +15 -0
- package/dist/components/PhoneInput/helper/variants.js +7 -2
- package/dist/components/PhoneInput/index.js +47 -46
- package/dist/components/Select/index.js +255 -245
- package/dist/components/Sidebar/index.js +100 -109
- package/dist/components/TextField/HelperText.d.ts +1 -1
- package/dist/components/TextField/HelperText.js +17 -9
- package/dist/components/TextField/index.d.ts +2 -1
- package/dist/components/TextField/index.js +119 -0
- package/dist/components/Typography/index.js +18 -18
- package/dist/index.d.ts +6 -0
- package/dist/index.js +65 -59
- package/dist/shared/utils/dataTestId.d.ts +1 -1
- package/dist/shared/utils/dataTestId.js +5 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as v, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { button as
|
|
3
|
+
import { button as T } from "./helper/index.js";
|
|
4
4
|
import { cn as O } from "../../shared/utils/cn.js";
|
|
5
5
|
import { dataTestId as S } from "../../shared/utils/dataTestId.js";
|
|
6
6
|
import a from "../Icon/Icon.js";
|
|
@@ -56,11 +56,11 @@ function A({
|
|
|
56
56
|
"aria-hidden": "true"
|
|
57
57
|
}
|
|
58
58
|
) : null, I = m && !e ? /* @__PURE__ */ r(a, { name: m, size: s, "aria-hidden": "true" }) : null, z = c && !e ? /* @__PURE__ */ r(a, { name: c, size: s, "aria-hidden": "true" }) : null, b = t && !e ? /* @__PURE__ */ r(a, { name: i, size: s, "aria-hidden": "true" }) : null;
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ v(
|
|
60
60
|
"button",
|
|
61
61
|
{
|
|
62
62
|
className: O(
|
|
63
|
-
|
|
63
|
+
T({
|
|
64
64
|
variant: o,
|
|
65
65
|
size: n,
|
|
66
66
|
iconOnly: t,
|
|
@@ -75,7 +75,7 @@ function A({
|
|
|
75
75
|
e && y,
|
|
76
76
|
!e && !t && I,
|
|
77
77
|
!e && t && b,
|
|
78
|
-
!t && /* @__PURE__ */ r(j, { variants: "action", size: x(), children: d }),
|
|
78
|
+
!t && /* @__PURE__ */ r(j, { as: "div", variants: "action", size: x(), children: d }),
|
|
79
79
|
!e && !t && z
|
|
80
80
|
]
|
|
81
81
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import h, { useCallback as f } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as S } from "../../shared/utils/cn.js";
|
|
4
4
|
import { dataTestId as V } from "../../shared/utils/dataTestId.js";
|
|
5
5
|
import { Typography as _ } from "../Typography/index.js";
|
|
6
|
-
import
|
|
6
|
+
import c from "../Icon/Icon.js";
|
|
7
7
|
import { chipIconVariants as x, chipVariants as I } from "./helper/variants.js";
|
|
8
|
-
const b = h.memo(({ icon:
|
|
9
|
-
const { name: n, node:
|
|
10
|
-
return /* @__PURE__ */
|
|
8
|
+
const b = h.memo(({ icon: i, size: r, position: e }) => {
|
|
9
|
+
const { name: n, node: p, "aria-label": m } = i;
|
|
10
|
+
return /* @__PURE__ */ l(
|
|
11
11
|
"span",
|
|
12
12
|
{
|
|
13
|
-
className: x({ size:
|
|
14
|
-
"aria-label":
|
|
15
|
-
role:
|
|
16
|
-
children:
|
|
17
|
-
|
|
13
|
+
className: x({ size: r, position: e }),
|
|
14
|
+
"aria-label": m,
|
|
15
|
+
role: m ? "img" : void 0,
|
|
16
|
+
children: p || n && /* @__PURE__ */ l(
|
|
17
|
+
c,
|
|
18
18
|
{
|
|
19
19
|
name: n,
|
|
20
|
-
size:
|
|
20
|
+
size: r === "x-small" ? 12 : r === "small" || r === "medium" ? 16 : 24
|
|
21
21
|
}
|
|
22
22
|
)
|
|
23
23
|
}
|
|
@@ -26,91 +26,91 @@ const b = h.memo(({ icon: o, size: t, position: m }) => {
|
|
|
26
26
|
b.displayName = "ChipIcon";
|
|
27
27
|
const L = h.forwardRef(
|
|
28
28
|
({
|
|
29
|
-
children:
|
|
30
|
-
leadingIcon:
|
|
31
|
-
trailingIcon:
|
|
29
|
+
children: i,
|
|
30
|
+
leadingIcon: r,
|
|
31
|
+
trailingIcon: e,
|
|
32
32
|
variant: n = "warning",
|
|
33
|
-
selected:
|
|
34
|
-
state:
|
|
33
|
+
selected: p = !0,
|
|
34
|
+
state: m = "default",
|
|
35
35
|
size: a = "large",
|
|
36
36
|
className: C,
|
|
37
37
|
disabled: s = !1,
|
|
38
38
|
onClick: d,
|
|
39
|
-
onRemove:
|
|
39
|
+
onRemove: t,
|
|
40
40
|
dataTestIdName: N = "chip",
|
|
41
|
-
...
|
|
42
|
-
},
|
|
43
|
-
const
|
|
44
|
-
(
|
|
45
|
-
!s &&
|
|
41
|
+
...w
|
|
42
|
+
}, y) => {
|
|
43
|
+
const g = f(
|
|
44
|
+
(o) => {
|
|
45
|
+
!s && m !== "disabled" && d?.(o);
|
|
46
46
|
},
|
|
47
|
-
[s,
|
|
48
|
-
),
|
|
49
|
-
(
|
|
50
|
-
|
|
47
|
+
[s, m, d]
|
|
48
|
+
), k = f(
|
|
49
|
+
(o) => {
|
|
50
|
+
o.stopPropagation(), !s && m !== "disabled" && t?.();
|
|
51
51
|
},
|
|
52
|
-
[s,
|
|
53
|
-
), u = s ? "disabled" :
|
|
52
|
+
[s, m, t]
|
|
53
|
+
), u = s ? "disabled" : m, T = S(
|
|
54
54
|
I({
|
|
55
55
|
size: a,
|
|
56
56
|
variant: n,
|
|
57
57
|
state: u,
|
|
58
|
-
selected:
|
|
58
|
+
selected: p,
|
|
59
59
|
className: C
|
|
60
60
|
})
|
|
61
|
-
)
|
|
62
|
-
|
|
61
|
+
), j = (o) => {
|
|
62
|
+
switch (o) {
|
|
63
|
+
case "x-small":
|
|
64
|
+
return "xs";
|
|
65
|
+
case "small":
|
|
66
|
+
return "sm";
|
|
67
|
+
case "medium":
|
|
68
|
+
return "sm";
|
|
69
|
+
case "large":
|
|
70
|
+
return "md";
|
|
71
|
+
default:
|
|
72
|
+
return "md";
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return /* @__PURE__ */ v(
|
|
63
76
|
"button",
|
|
64
77
|
{
|
|
65
|
-
ref:
|
|
78
|
+
ref: y,
|
|
66
79
|
type: "button",
|
|
67
|
-
className:
|
|
80
|
+
className: T,
|
|
68
81
|
disabled: s || u === "disabled",
|
|
69
|
-
onClick:
|
|
70
|
-
|
|
71
|
-
"aria-pressed":
|
|
72
|
-
...
|
|
82
|
+
onClick: g,
|
|
83
|
+
...V(N),
|
|
84
|
+
"aria-pressed": p,
|
|
85
|
+
...w,
|
|
73
86
|
children: [
|
|
74
|
-
|
|
75
|
-
|
|
87
|
+
r && /* @__PURE__ */ l(b, { icon: r, size: a, position: "leading" }),
|
|
88
|
+
i && /* @__PURE__ */ l(
|
|
76
89
|
_,
|
|
77
90
|
{
|
|
78
91
|
variants: "action-emphasize",
|
|
79
|
-
size: (
|
|
80
|
-
switch (i) {
|
|
81
|
-
case "x-small":
|
|
82
|
-
return "xs";
|
|
83
|
-
case "small":
|
|
84
|
-
return "sm";
|
|
85
|
-
case "medium":
|
|
86
|
-
return "sm";
|
|
87
|
-
case "large":
|
|
88
|
-
return "md";
|
|
89
|
-
default:
|
|
90
|
-
return "md";
|
|
91
|
-
}
|
|
92
|
-
})(a),
|
|
92
|
+
size: j(a),
|
|
93
93
|
as: "span",
|
|
94
94
|
className: "font-medium whitespace-nowrap",
|
|
95
|
-
children:
|
|
95
|
+
children: i
|
|
96
96
|
}
|
|
97
97
|
),
|
|
98
|
-
|
|
98
|
+
e && /* @__PURE__ */ l(
|
|
99
99
|
"span",
|
|
100
100
|
{
|
|
101
101
|
className: x({ size: a, position: "trailing" }),
|
|
102
|
-
onClick:
|
|
103
|
-
role:
|
|
104
|
-
tabIndex:
|
|
105
|
-
"aria-label":
|
|
106
|
-
children:
|
|
107
|
-
|
|
102
|
+
onClick: t ? k : void 0,
|
|
103
|
+
role: t ? "button" : void 0,
|
|
104
|
+
tabIndex: t ? 0 : void 0,
|
|
105
|
+
"aria-label": e["aria-label"] || "Remove",
|
|
106
|
+
children: e.node || e.name && /* @__PURE__ */ l(
|
|
107
|
+
c,
|
|
108
108
|
{
|
|
109
|
-
name:
|
|
109
|
+
name: e.name,
|
|
110
110
|
size: a === "x-small" ? 12 : a === "small" || a === "medium" ? 16 : 24
|
|
111
111
|
}
|
|
112
|
-
) ||
|
|
113
|
-
|
|
112
|
+
) || t && /* @__PURE__ */ l(
|
|
113
|
+
c,
|
|
114
114
|
{
|
|
115
115
|
name: "x-close",
|
|
116
116
|
size: a === "x-small" ? 12 : a === "small" || a === "medium" ? 16 : 24
|
|
@@ -3,6 +3,7 @@ import { IconProps } from '../Icon';
|
|
|
3
3
|
export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
readOnly?: boolean;
|
|
6
|
+
sizeVariant?: 'sm' | 'md' | 'lg';
|
|
6
7
|
endAdornment?: React.ReactElement<IconProps>;
|
|
7
8
|
color?: 'primary' | 'error';
|
|
8
9
|
startAdornment?: React.ReactElement<IconProps>;
|
|
@@ -12,6 +13,7 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
12
13
|
iconsSize?: number;
|
|
13
14
|
fontSize?: string;
|
|
14
15
|
error?: boolean;
|
|
16
|
+
clearText?: boolean;
|
|
15
17
|
optionalProps?: {
|
|
16
18
|
textAreaClassName?: string;
|
|
17
19
|
maxIndicatorLength?: number;
|
|
@@ -1,97 +1,181 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { inputBaseVariants as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsx as i, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import m, { forwardRef as A, useState as D, useMemo as B, useEffect as H, memo as R } from "react";
|
|
3
|
+
import { inputBaseVariants as _, textAreaVariants as F } from "./variants.js";
|
|
4
|
+
import K from "../Icon/Icon.js";
|
|
5
|
+
import { cn as p } from "../../shared/utils/cn.js";
|
|
6
|
+
import { dataTestId as W } from "../../shared/utils/dataTestId.js";
|
|
7
|
+
const q = (n) => {
|
|
8
|
+
switch (n) {
|
|
9
|
+
case "sm":
|
|
10
|
+
return 16;
|
|
11
|
+
case "md":
|
|
12
|
+
return 20;
|
|
13
|
+
case "lg":
|
|
14
|
+
return 24;
|
|
15
|
+
default:
|
|
16
|
+
return 20;
|
|
17
|
+
}
|
|
18
|
+
}, N = A(
|
|
7
19
|
({
|
|
8
|
-
disabled:
|
|
9
|
-
readOnly:
|
|
10
|
-
endAdornment:
|
|
11
|
-
className:
|
|
12
|
-
color:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
iconsSize:
|
|
20
|
+
disabled: n,
|
|
21
|
+
readOnly: a,
|
|
22
|
+
endAdornment: d,
|
|
23
|
+
className: w,
|
|
24
|
+
color: T,
|
|
25
|
+
sizeVariant: f = "md",
|
|
26
|
+
startAdornment: y,
|
|
27
|
+
InputComponent: b,
|
|
28
|
+
containerProps: z,
|
|
29
|
+
containerRef: C,
|
|
30
|
+
width: S,
|
|
31
|
+
iconsSize: V,
|
|
20
32
|
error: j,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
clearText: M,
|
|
34
|
+
optionalProps: h,
|
|
35
|
+
...e
|
|
36
|
+
}, k) => {
|
|
37
|
+
const [L, v] = D(!1), g = V || q(f), c = B(
|
|
38
|
+
() => `inputbase-input-${Math.random().toString(36).substring(2, 9)}`,
|
|
39
|
+
[]
|
|
40
|
+
), l = B(
|
|
41
|
+
() => `inputbase-textarea-${Math.random().toString(36).substring(2, 9)}`,
|
|
42
|
+
[]
|
|
43
|
+
);
|
|
44
|
+
H(() => {
|
|
45
|
+
const t = e.value;
|
|
46
|
+
if (t !== void 0) {
|
|
47
|
+
v(String(t).length > 0);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const s = () => {
|
|
51
|
+
const r = e.type === "textarea" ? document.getElementById(l) : document.getElementById(c);
|
|
52
|
+
if (r) {
|
|
53
|
+
const E = () => {
|
|
54
|
+
v(r.value.length > 0);
|
|
55
|
+
};
|
|
56
|
+
return E(), r.addEventListener("input", E), () => {
|
|
57
|
+
r.removeEventListener("input", E);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}, o = s();
|
|
61
|
+
if (!o) {
|
|
62
|
+
const r = setTimeout(() => {
|
|
63
|
+
s();
|
|
64
|
+
}, 100);
|
|
65
|
+
return () => clearTimeout(r);
|
|
66
|
+
}
|
|
67
|
+
return o;
|
|
68
|
+
}, [e.type, e.value, c, l]);
|
|
69
|
+
const x = M && L ? /* @__PURE__ */ i(
|
|
70
|
+
K,
|
|
71
|
+
{
|
|
72
|
+
name: "x-circle",
|
|
73
|
+
variant: "solid",
|
|
74
|
+
size: g,
|
|
75
|
+
className: "cursor-pointer hover:opacity-70 transition-opacity text-fg-neutral-subtle",
|
|
76
|
+
onClick: () => {
|
|
77
|
+
v(!1);
|
|
78
|
+
const t = e.type === "textarea" ? document.getElementById(l) : document.getElementById(c);
|
|
79
|
+
if (t)
|
|
80
|
+
if (t.value = "", e.onChange) {
|
|
81
|
+
const s = {
|
|
82
|
+
target: t,
|
|
83
|
+
currentTarget: t,
|
|
84
|
+
type: "change",
|
|
85
|
+
bubbles: !0
|
|
86
|
+
};
|
|
87
|
+
e.onChange(s);
|
|
88
|
+
} else {
|
|
89
|
+
const s = new Event("input", { bubbles: !0 }), o = new Event("change", { bubbles: !0 });
|
|
90
|
+
t.dispatchEvent(s), t.dispatchEvent(o);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"aria-label": "Clear text"
|
|
94
|
+
}
|
|
95
|
+
) : null, u = x && d ? /* @__PURE__ */ I("div", { className: "flex items-center gap-1", children: [
|
|
96
|
+
x,
|
|
97
|
+
d
|
|
98
|
+
] }) : x || d, $ = {
|
|
99
|
+
sm: "h-4",
|
|
100
|
+
md: "h-5",
|
|
101
|
+
lg: "h-6"
|
|
102
|
+
};
|
|
103
|
+
return /* @__PURE__ */ i("div", { className: "relative justify-center items-center", children: /* @__PURE__ */ I(
|
|
26
104
|
"div",
|
|
27
105
|
{
|
|
28
|
-
"
|
|
29
|
-
ref:
|
|
30
|
-
...
|
|
31
|
-
className:
|
|
32
|
-
disabled: !!
|
|
33
|
-
className:
|
|
34
|
-
color:
|
|
35
|
-
|
|
106
|
+
...W("InputBase"),
|
|
107
|
+
ref: C,
|
|
108
|
+
...z,
|
|
109
|
+
className: _({
|
|
110
|
+
disabled: !!n,
|
|
111
|
+
className: w,
|
|
112
|
+
color: T,
|
|
113
|
+
size: e?.type === "textarea" ? void 0 : f,
|
|
114
|
+
readOnly: !!a,
|
|
36
115
|
error: !!j
|
|
37
116
|
}),
|
|
38
|
-
style: { minWidth:
|
|
117
|
+
style: { minWidth: S ?? "100%" },
|
|
39
118
|
children: [
|
|
40
|
-
|
|
119
|
+
y && /* @__PURE__ */ i(
|
|
41
120
|
"div",
|
|
42
121
|
{
|
|
43
|
-
className:
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
children: i.cloneElement(n, {
|
|
122
|
+
className: p("flex cursor-pointer items-center justify-center", {
|
|
123
|
+
"color-icon-disabled": n || a,
|
|
124
|
+
"cursor-pointer": !n || a
|
|
125
|
+
}),
|
|
126
|
+
children: m.cloneElement(y, {
|
|
51
127
|
// color: disabled || readOnly ? 'disabled' : 'currentColor',
|
|
52
|
-
size:
|
|
128
|
+
size: g
|
|
53
129
|
})
|
|
54
130
|
}
|
|
55
131
|
),
|
|
56
|
-
|
|
57
|
-
|
|
132
|
+
b ? m.cloneElement(
|
|
133
|
+
b,
|
|
58
134
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
135
|
+
id: e?.type === "textarea" ? l : void 0,
|
|
136
|
+
className: p(
|
|
137
|
+
e?.type === "textarea" ? F({
|
|
138
|
+
size: h?.sizeTextArea,
|
|
139
|
+
disabled: !!n,
|
|
140
|
+
readOnly: !!a
|
|
141
|
+
}) : void 0,
|
|
142
|
+
"w-full appearance-none bg-transparent outline-none",
|
|
143
|
+
h?.textAreaClassName
|
|
67
144
|
),
|
|
68
|
-
disabled:
|
|
69
|
-
...
|
|
145
|
+
disabled: n || a,
|
|
146
|
+
...e
|
|
70
147
|
},
|
|
71
148
|
null
|
|
72
|
-
) : /* @__PURE__ */
|
|
149
|
+
) : /* @__PURE__ */ i(
|
|
73
150
|
"input",
|
|
74
151
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
152
|
+
id: e.type === "textarea" ? void 0 : c,
|
|
153
|
+
className: p(
|
|
154
|
+
"w-full appearance-none bg-transparent font-sans outline-none",
|
|
155
|
+
$[f || "md"]
|
|
156
|
+
),
|
|
157
|
+
ref: k,
|
|
158
|
+
disabled: n || a,
|
|
159
|
+
...e,
|
|
160
|
+
onKeyDown: (t) => {
|
|
161
|
+
e?.type === "number" && ["e", "E", "+", "-", "."].includes(t.key) && t.preventDefault();
|
|
81
162
|
}
|
|
82
163
|
}
|
|
83
164
|
),
|
|
84
|
-
|
|
165
|
+
u && /* @__PURE__ */ i(
|
|
85
166
|
"div",
|
|
86
167
|
{
|
|
87
|
-
className:
|
|
88
|
-
"color-icon-disabled":
|
|
89
|
-
"cursor-pointer": !
|
|
168
|
+
className: p("max-h flex items-center justify-center", {
|
|
169
|
+
"color-icon-disabled": n || a,
|
|
170
|
+
"cursor-pointer": !n || a
|
|
90
171
|
}),
|
|
91
|
-
children:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
172
|
+
children: m.isValidElement(u) ? m.cloneElement(
|
|
173
|
+
u,
|
|
174
|
+
{
|
|
175
|
+
// color: disabled ? 'disabled' : 'default',
|
|
176
|
+
size: g
|
|
177
|
+
}
|
|
178
|
+
) : u
|
|
95
179
|
}
|
|
96
180
|
)
|
|
97
181
|
]
|
|
@@ -99,8 +183,8 @@ const f = I(
|
|
|
99
183
|
) });
|
|
100
184
|
}
|
|
101
185
|
);
|
|
102
|
-
|
|
103
|
-
const
|
|
186
|
+
N.displayName = "InputBase";
|
|
187
|
+
const P = R(N);
|
|
104
188
|
export {
|
|
105
|
-
|
|
189
|
+
P as default
|
|
106
190
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare const inputBaseVariants: import('tailwind-variants').TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
};
|
|
2
7
|
disabled: {
|
|
3
8
|
true: string;
|
|
4
9
|
};
|
|
@@ -12,7 +17,12 @@ export declare const inputBaseVariants: import('tailwind-variants').TVReturnType
|
|
|
12
17
|
primary: string;
|
|
13
18
|
error: string;
|
|
14
19
|
};
|
|
15
|
-
}, undefined, "text-
|
|
20
|
+
}, undefined, "text-fg-neutral-main placeholder:text-fg-neutral-subtlest flex items-center gap-1 rounded-lg tracking-p-medium outline-1 focus-within:border-input-active focus-within:outline-2", {
|
|
21
|
+
size: {
|
|
22
|
+
sm: string;
|
|
23
|
+
md: string;
|
|
24
|
+
lg: string;
|
|
25
|
+
};
|
|
16
26
|
disabled: {
|
|
17
27
|
true: string;
|
|
18
28
|
};
|
|
@@ -27,6 +37,11 @@ export declare const inputBaseVariants: import('tailwind-variants').TVReturnType
|
|
|
27
37
|
error: string;
|
|
28
38
|
};
|
|
29
39
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
40
|
+
size: {
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
};
|
|
30
45
|
disabled: {
|
|
31
46
|
true: string;
|
|
32
47
|
};
|
|
@@ -40,7 +55,7 @@ export declare const inputBaseVariants: import('tailwind-variants').TVReturnType
|
|
|
40
55
|
primary: string;
|
|
41
56
|
error: string;
|
|
42
57
|
};
|
|
43
|
-
}, undefined, "text-
|
|
58
|
+
}, undefined, "text-fg-neutral-main placeholder:text-fg-neutral-subtlest flex items-center gap-1 rounded-lg tracking-p-medium outline-1 focus-within:border-input-active focus-within:outline-2", unknown, unknown, undefined>>;
|
|
44
59
|
export declare const textAreaVariants: import('tailwind-variants').TVReturnType<{
|
|
45
60
|
size: {
|
|
46
61
|
sm: string;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { tv as e } from "../../node_modules/tailwind-variants/dist/index.js";
|
|
2
2
|
const a = e({
|
|
3
|
-
base: "text-
|
|
3
|
+
base: "text-fg-neutral-main placeholder:text-fg-neutral-subtlest flex items-center gap-1 rounded-lg tracking-p-medium outline-1 focus-within:border-input-active focus-within:outline-2",
|
|
4
4
|
variants: {
|
|
5
|
+
size: {
|
|
6
|
+
sm: "py-xs-2 px-xs h-lg text-base-sm",
|
|
7
|
+
md: "py-2.5 py- px-sm-2 h-xl text-base-md",
|
|
8
|
+
lg: "py-sm-2 px-sm h-xl-2 text-base-lg"
|
|
9
|
+
},
|
|
5
10
|
disabled: {
|
|
6
|
-
true: "placeholder:text-fg-neutral-disabled bg-bg-
|
|
11
|
+
true: "placeholder:text-fg-neutral-disabled bg-bg-input-disabled border-input-disabled cursor-not-allowed text-fg-neutral-disabled outline-bg-neutral-bold-rest placeholder:bg-fg-neutral-disabled hover:outline-offset-0"
|
|
7
12
|
},
|
|
8
13
|
readOnly: {
|
|
9
|
-
true: "placeholder:color-text-disabled bg-bg-
|
|
14
|
+
true: "placeholder:color-text-disabled bg-bg-input-disabled border-input-disabled cursor-not-allowed outline-bg-neutral-bold-rest placeholder:bg-fg-neutral-disabled hover:outline-offset-0"
|
|
10
15
|
},
|
|
11
16
|
error: {
|
|
12
17
|
true: "outline-fg-accent-error focus-within:outline-fg-accent-error"
|
|
@@ -17,9 +22,9 @@ const a = e({
|
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
defaultVariants: {
|
|
25
|
+
size: "md",
|
|
20
26
|
color: "primary",
|
|
21
27
|
disabled: !1,
|
|
22
|
-
// size: 'md',
|
|
23
28
|
readOnly: !1,
|
|
24
29
|
error: !1
|
|
25
30
|
},
|