mcr-design-systems 1.0.26 → 1.0.28
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/InputBase/index.js +89 -86
- package/dist/components/InputPassword/index.d.ts +4 -0
- package/dist/components/InputPassword/index.js +46 -38
- package/dist/components/TextField/HelperText.d.ts +17 -0
- package/dist/components/TextField/HelperText.js +94 -44
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as I, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import c, { forwardRef as $, useState as H, useMemo as B, useEffect as R, memo as _ } from "react";
|
|
3
3
|
import { inputBaseVariants as F, textAreaVariants as K } from "./variants.js";
|
|
4
4
|
import W from "../Icon/Icon.js";
|
|
5
5
|
import { cn as f } from "../../shared/utils/cn.js";
|
|
6
6
|
import { dataTestId as q } from "../../shared/utils/dataTestId.js";
|
|
7
|
-
const A = (
|
|
8
|
-
switch (
|
|
7
|
+
const A = (t) => {
|
|
8
|
+
switch (t) {
|
|
9
9
|
case "sm":
|
|
10
10
|
return 16;
|
|
11
11
|
case "md":
|
|
@@ -15,174 +15,177 @@ const A = (n) => {
|
|
|
15
15
|
default:
|
|
16
16
|
return 20;
|
|
17
17
|
}
|
|
18
|
-
}, N =
|
|
18
|
+
}, N = $(
|
|
19
19
|
({
|
|
20
|
-
disabled:
|
|
21
|
-
readOnly:
|
|
22
|
-
endAdornment:
|
|
23
|
-
className:
|
|
24
|
-
color:
|
|
20
|
+
disabled: t,
|
|
21
|
+
readOnly: s,
|
|
22
|
+
endAdornment: u,
|
|
23
|
+
className: w,
|
|
24
|
+
color: T,
|
|
25
25
|
sizeVariant: v = "md",
|
|
26
26
|
startAdornment: b,
|
|
27
27
|
InputComponent: y,
|
|
28
|
-
containerProps:
|
|
29
|
-
containerRef:
|
|
28
|
+
containerProps: V,
|
|
29
|
+
containerRef: z,
|
|
30
30
|
width: C,
|
|
31
31
|
iconsSize: S,
|
|
32
32
|
error: j,
|
|
33
|
-
clearText:
|
|
33
|
+
clearText: D,
|
|
34
34
|
optionalProps: h,
|
|
35
35
|
// inputSize,
|
|
36
36
|
...e
|
|
37
|
-
},
|
|
38
|
-
const [
|
|
37
|
+
}, M) => {
|
|
38
|
+
const [k, g] = H(!1), m = S || A(v), p = B(
|
|
39
39
|
() => `inputbase-input-${Math.random().toString(36).substring(2, 9)}`,
|
|
40
40
|
[]
|
|
41
|
-
),
|
|
41
|
+
), d = B(
|
|
42
42
|
() => `inputbase-textarea-${Math.random().toString(36).substring(2, 9)}`,
|
|
43
43
|
[]
|
|
44
44
|
);
|
|
45
45
|
R(() => {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
g(String(
|
|
46
|
+
const n = e.value;
|
|
47
|
+
if (n !== void 0) {
|
|
48
|
+
g(String(n).length > 0);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
51
|
+
const a = () => {
|
|
52
|
+
const r = e.type === "textarea" ? document.getElementById(d) : document.getElementById(p);
|
|
53
|
+
if (r) {
|
|
54
54
|
const x = () => {
|
|
55
|
-
g(
|
|
55
|
+
g(r.value.length > 0);
|
|
56
56
|
};
|
|
57
|
-
return x(),
|
|
58
|
-
|
|
57
|
+
return x(), r.addEventListener("input", x), () => {
|
|
58
|
+
r.removeEventListener("input", x);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
},
|
|
62
|
-
if (!
|
|
63
|
-
const
|
|
64
|
-
|
|
61
|
+
}, l = a();
|
|
62
|
+
if (!l) {
|
|
63
|
+
const r = setTimeout(() => {
|
|
64
|
+
a();
|
|
65
65
|
}, 100);
|
|
66
|
-
return () => clearTimeout(
|
|
66
|
+
return () => clearTimeout(r);
|
|
67
67
|
}
|
|
68
|
-
return
|
|
69
|
-
}, [e.type, e.value,
|
|
70
|
-
const E =
|
|
68
|
+
return l;
|
|
69
|
+
}, [e.type, e.value, p, d]);
|
|
70
|
+
const E = D && k ? /* @__PURE__ */ o(
|
|
71
71
|
W,
|
|
72
72
|
{
|
|
73
73
|
name: "x-circle",
|
|
74
74
|
variant: "solid",
|
|
75
|
-
size:
|
|
75
|
+
size: m,
|
|
76
76
|
className: "cursor-pointer text-fg-neutral-subtle",
|
|
77
|
-
onClick: () => {
|
|
78
|
-
g(!1);
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
target:
|
|
84
|
-
currentTarget:
|
|
77
|
+
onClick: (n) => {
|
|
78
|
+
n.preventDefault(), n.stopPropagation(), g(!1);
|
|
79
|
+
const a = e.type === "textarea" ? document.getElementById(d) : document.getElementById(p);
|
|
80
|
+
if (a) {
|
|
81
|
+
if (a.value = "", e.onChange) {
|
|
82
|
+
const l = {
|
|
83
|
+
target: a,
|
|
84
|
+
currentTarget: a,
|
|
85
85
|
type: "change",
|
|
86
86
|
bubbles: !0
|
|
87
87
|
};
|
|
88
|
-
e.onChange(
|
|
88
|
+
e.onChange(l);
|
|
89
89
|
} else {
|
|
90
|
-
const
|
|
91
|
-
|
|
90
|
+
const l = new Event("input", { bubbles: !0 }), r = new Event("change", { bubbles: !0 });
|
|
91
|
+
a.dispatchEvent(l), a.dispatchEvent(r);
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
setTimeout(() => {
|
|
94
|
+
a?.focus();
|
|
95
|
+
}, 0);
|
|
94
96
|
}
|
|
95
97
|
},
|
|
96
98
|
"aria-label": "Clear text"
|
|
97
99
|
}
|
|
98
|
-
) : null,
|
|
100
|
+
) : null, i = E && u ? /* @__PURE__ */ I("div", { className: "flex items-center gap-2", children: [
|
|
99
101
|
E,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
c.isValidElement(u) ? c.cloneElement(
|
|
103
|
+
u,
|
|
102
104
|
{
|
|
103
|
-
size:
|
|
105
|
+
size: m
|
|
104
106
|
}
|
|
105
|
-
) :
|
|
106
|
-
] }) : E ||
|
|
107
|
+
) : u
|
|
108
|
+
] }) : E || u, L = {
|
|
107
109
|
sm: "h-4",
|
|
108
110
|
md: "h-5",
|
|
109
111
|
lg: "h-6"
|
|
110
112
|
};
|
|
111
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ o("div", { className: "relative justify-center items-center", children: /* @__PURE__ */ I(
|
|
112
114
|
"div",
|
|
113
115
|
{
|
|
114
116
|
...q("InputBase"),
|
|
115
|
-
ref:
|
|
116
|
-
...
|
|
117
|
+
ref: z,
|
|
118
|
+
...V,
|
|
117
119
|
className: F({
|
|
118
|
-
disabled: !!
|
|
119
|
-
className:
|
|
120
|
-
color:
|
|
120
|
+
disabled: !!t,
|
|
121
|
+
className: w,
|
|
122
|
+
color: T,
|
|
121
123
|
size: e?.type === "textarea" ? void 0 : v,
|
|
122
|
-
readOnly: !!
|
|
124
|
+
readOnly: !!s,
|
|
123
125
|
error: !!j
|
|
124
126
|
}),
|
|
125
127
|
style: { minWidth: C ?? "100%" },
|
|
126
128
|
children: [
|
|
127
|
-
b && /* @__PURE__ */
|
|
129
|
+
b && /* @__PURE__ */ o(
|
|
128
130
|
"div",
|
|
129
131
|
{
|
|
130
132
|
className: f("flex cursor-pointer items-center justify-center", {
|
|
131
|
-
"color-icon-disabled":
|
|
132
|
-
"cursor-pointer": !
|
|
133
|
+
"color-icon-disabled": t || s,
|
|
134
|
+
"cursor-pointer": !t || s
|
|
133
135
|
}),
|
|
134
|
-
children:
|
|
136
|
+
children: c.cloneElement(b, {
|
|
135
137
|
// color: disabled || readOnly ? 'disabled' : 'currentColor',
|
|
136
|
-
size:
|
|
138
|
+
size: m
|
|
137
139
|
})
|
|
138
140
|
}
|
|
139
141
|
),
|
|
140
|
-
y ?
|
|
142
|
+
y ? c.cloneElement(
|
|
141
143
|
y,
|
|
142
144
|
{
|
|
143
|
-
id: e?.type === "textarea" ?
|
|
145
|
+
id: e?.type === "textarea" ? d : void 0,
|
|
144
146
|
className: f(
|
|
145
147
|
e?.type === "textarea" ? K({
|
|
146
148
|
size: h?.sizeTextArea,
|
|
147
|
-
disabled: !!
|
|
148
|
-
readOnly: !!
|
|
149
|
+
disabled: !!t,
|
|
150
|
+
readOnly: !!s
|
|
149
151
|
}) : void 0,
|
|
150
152
|
"w-full appearance-none bg-transparent outline-none",
|
|
151
153
|
h?.textAreaClassName
|
|
152
154
|
),
|
|
153
|
-
disabled:
|
|
155
|
+
disabled: t || s,
|
|
154
156
|
...e
|
|
155
157
|
},
|
|
156
158
|
null
|
|
157
|
-
) : /* @__PURE__ */
|
|
159
|
+
) : /* @__PURE__ */ o(
|
|
158
160
|
"input",
|
|
159
161
|
{
|
|
160
|
-
id: e.type === "textarea" ? void 0 :
|
|
162
|
+
id: e.type === "textarea" ? void 0 : p,
|
|
161
163
|
className: f(
|
|
162
|
-
"w-full appearance-none bg-transparent font-sans outline-none",
|
|
163
|
-
|
|
164
|
+
"w-full appearance-none bg-transparent font-sans outline-none text-fg-neutral-main",
|
|
165
|
+
L[v || "md"]
|
|
164
166
|
),
|
|
165
|
-
ref:
|
|
166
|
-
disabled:
|
|
167
|
+
ref: M,
|
|
168
|
+
disabled: t || s,
|
|
167
169
|
...e,
|
|
168
|
-
onKeyDown: (
|
|
169
|
-
e?.type === "number" && ["e", "E", "+", "-", "."].includes(
|
|
170
|
+
onKeyDown: (n) => {
|
|
171
|
+
e?.type === "number" && ["e", "E", "+", "-", "."].includes(n.key) && n.preventDefault();
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
),
|
|
173
|
-
|
|
175
|
+
i && /* @__PURE__ */ o(
|
|
174
176
|
"div",
|
|
175
177
|
{
|
|
176
178
|
className: f("max-h flex items-center justify-center", {
|
|
177
|
-
"color-icon-disabled":
|
|
178
|
-
"cursor-pointer": !
|
|
179
|
+
"color-icon-disabled": t || s,
|
|
180
|
+
"cursor-pointer": !t || s
|
|
179
181
|
}),
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
onMouseDown: (n) => n.preventDefault(),
|
|
183
|
+
children: c.isValidElement(i) && i.type === "div" ? i : c.isValidElement(i) ? c.cloneElement(
|
|
184
|
+
i,
|
|
182
185
|
{
|
|
183
|
-
size:
|
|
186
|
+
size: m
|
|
184
187
|
}
|
|
185
|
-
) :
|
|
188
|
+
) : i
|
|
186
189
|
}
|
|
187
190
|
)
|
|
188
191
|
]
|
|
@@ -191,7 +194,7 @@ const A = (n) => {
|
|
|
191
194
|
}
|
|
192
195
|
);
|
|
193
196
|
N.displayName = "InputBase";
|
|
194
|
-
const
|
|
197
|
+
const Z = _(N);
|
|
195
198
|
export {
|
|
196
|
-
|
|
199
|
+
Z as default
|
|
197
200
|
};
|
|
@@ -34,6 +34,10 @@ export interface InputPasswordProps extends Omit<InputBaseProps, 'type' | 'start
|
|
|
34
34
|
* Callback when visibility changes
|
|
35
35
|
*/
|
|
36
36
|
onVisibilityChange?: (visible: boolean) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Custom helper content - allows completely custom layout
|
|
39
|
+
*/
|
|
40
|
+
customHelperContent?: React.ReactNode;
|
|
37
41
|
}
|
|
38
42
|
declare const InputPassword: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
|
|
39
43
|
export default InputPassword;
|
|
@@ -1,61 +1,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as I, useState as h } from "react";
|
|
3
|
+
import N from "../InputBase/index.js";
|
|
4
|
+
import c from "../TextField/HelperText.js";
|
|
5
|
+
import V from "../Icon/Icon.js";
|
|
6
|
+
const P = I(
|
|
7
7
|
({
|
|
8
|
-
helperText:
|
|
9
|
-
error:
|
|
10
|
-
showHelperIcon:
|
|
11
|
-
helperIconCustom:
|
|
12
|
-
helperTextClassName:
|
|
13
|
-
defaultVisible:
|
|
8
|
+
helperText: i,
|
|
9
|
+
error: n = !1,
|
|
10
|
+
showHelperIcon: m = !0,
|
|
11
|
+
helperIconCustom: u,
|
|
12
|
+
helperTextClassName: r,
|
|
13
|
+
defaultVisible: f = !1,
|
|
14
14
|
visible: t,
|
|
15
|
-
onVisibilityChange:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
onVisibilityChange: p,
|
|
16
|
+
customHelperContent: s,
|
|
17
|
+
className: b,
|
|
18
|
+
...a
|
|
19
|
+
}, w) => {
|
|
20
|
+
const [g, x] = h(f), o = t !== void 0 ? t : g, y = (l) => {
|
|
21
|
+
if (l.preventDefault(), l.stopPropagation(), a.disabled)
|
|
21
22
|
return;
|
|
22
|
-
const
|
|
23
|
-
t === void 0 &&
|
|
23
|
+
const d = !o;
|
|
24
|
+
t === void 0 && x(d), p?.(d);
|
|
24
25
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ v("div", { className: "w-full [&_input[type='password']::-ms-reveal]:hidden [&_input[type='password']::-ms-clear]:hidden", children: [
|
|
26
27
|
/* @__PURE__ */ e(
|
|
27
|
-
|
|
28
|
+
N,
|
|
28
29
|
{
|
|
29
|
-
...
|
|
30
|
-
ref:
|
|
30
|
+
...a,
|
|
31
|
+
ref: w,
|
|
31
32
|
type: o ? "text" : "password",
|
|
32
|
-
error:
|
|
33
|
-
className:
|
|
33
|
+
error: n,
|
|
34
|
+
className: b,
|
|
34
35
|
clearText: !0,
|
|
35
36
|
endAdornment: /* @__PURE__ */ e(
|
|
36
|
-
|
|
37
|
+
V,
|
|
37
38
|
{
|
|
38
39
|
name: o ? "eye" : "eye-off",
|
|
39
|
-
className: `transition-colors ${
|
|
40
|
-
onClick:
|
|
40
|
+
className: `transition-colors ${a.disabled ? "bg-bg-input-disabled cursor-not-allowed" : "cursor-pointer hover:text-fg-neutral-rest text-fg-neutral-subtle"}`,
|
|
41
|
+
onClick: y
|
|
41
42
|
}
|
|
42
43
|
)
|
|
43
44
|
}
|
|
44
45
|
),
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
s && /* @__PURE__ */ e(
|
|
47
|
+
c,
|
|
47
48
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
customContent: s,
|
|
50
|
+
className: r
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
!s && i && /* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(
|
|
54
|
+
c,
|
|
55
|
+
{
|
|
56
|
+
text: i,
|
|
57
|
+
error: n,
|
|
58
|
+
haveIcon: m,
|
|
59
|
+
iconsCustom: u,
|
|
60
|
+
className: r
|
|
53
61
|
}
|
|
54
62
|
) })
|
|
55
63
|
] });
|
|
56
64
|
}
|
|
57
65
|
);
|
|
58
|
-
|
|
66
|
+
P.displayName = "InputPassword";
|
|
59
67
|
export {
|
|
60
|
-
|
|
68
|
+
P as default
|
|
61
69
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export interface RequirementItem {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
isValid: boolean;
|
|
6
|
+
}
|
|
2
7
|
export interface HelpTextProps {
|
|
3
8
|
text?: string;
|
|
4
9
|
error?: boolean;
|
|
@@ -6,6 +11,18 @@ export interface HelpTextProps {
|
|
|
6
11
|
iconsCustom?: React.ReactNode;
|
|
7
12
|
className?: string;
|
|
8
13
|
iconsSize?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Custom content mode - allows rendering custom layout
|
|
16
|
+
*/
|
|
17
|
+
customContent?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Requirements list mode - can be used for any type of validation requirements
|
|
20
|
+
*/
|
|
21
|
+
requirementsList?: {
|
|
22
|
+
items: RequirementItem[];
|
|
23
|
+
title?: string;
|
|
24
|
+
showTitle?: boolean;
|
|
25
|
+
};
|
|
9
26
|
}
|
|
10
27
|
declare const HelpText: React.FC<HelpTextProps>;
|
|
11
28
|
export default HelpText;
|
|
@@ -1,50 +1,100 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { Typography as c } from "../Typography/index.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
import n from "../Icon/Icon.js";
|
|
5
|
+
import u from "clsx";
|
|
6
|
+
const j = ({
|
|
7
|
+
text: f,
|
|
8
|
+
error: l = !1,
|
|
9
|
+
haveIcon: d = !0,
|
|
10
|
+
iconsCustom: m,
|
|
11
|
+
className: r,
|
|
12
|
+
iconsSize: t = 16,
|
|
13
|
+
customContent: o,
|
|
14
|
+
requirementsList: a
|
|
15
|
+
}) => {
|
|
16
|
+
if (o)
|
|
17
|
+
return /* @__PURE__ */ e(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: `self-stretch inline-flex flex-col justify-start items-start ${r || ""}`,
|
|
21
|
+
children: o
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
if (a) {
|
|
25
|
+
const { items: x } = a, h = a.showTitle !== !1, p = a.title || "Requirements:";
|
|
26
|
+
return /* @__PURE__ */ i("div", { className: `mt-1 space-y-1 ${r || ""}`, children: [
|
|
27
|
+
h && /* @__PURE__ */ i("div", { className: "self-stretch inline-flex justify-start items-start gap-1", children: [
|
|
28
|
+
/* @__PURE__ */ e(
|
|
29
|
+
n,
|
|
30
|
+
{
|
|
31
|
+
name: "alert-octagon",
|
|
32
|
+
className: "text-fg-accent-error",
|
|
33
|
+
variant: "solid",
|
|
34
|
+
size: typeof t == "number" ? t : 16
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
c,
|
|
39
|
+
{
|
|
40
|
+
variants: "body",
|
|
41
|
+
size: "sm",
|
|
42
|
+
color: "fg-accent-error",
|
|
43
|
+
className: "font-medium",
|
|
44
|
+
children: p
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ e("ul", { className: "list-disc ml-9", children: x.map((s) => /* @__PURE__ */ e(
|
|
49
|
+
"li",
|
|
19
50
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
name: "help-circle",
|
|
30
|
-
variant: "line",
|
|
31
|
-
className: "text-fg-neutral-subtle",
|
|
32
|
-
size: typeof t == "number" ? t : 16
|
|
33
|
-
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "flex-1 justify-start text-left flex flex-wrap items-center gap-0", children: /* @__PURE__ */ e(
|
|
36
|
-
c,
|
|
37
|
-
{
|
|
38
|
-
variants: "body",
|
|
39
|
-
size: "sm",
|
|
40
|
-
color: a ? "fg-accent-error" : "fg-neutral-subtle",
|
|
41
|
-
className: "inline",
|
|
42
|
-
children: l
|
|
43
|
-
}
|
|
44
|
-
) })
|
|
45
|
-
] })
|
|
51
|
+
className: u("", {
|
|
52
|
+
"marker:text-fg-accent-success text-fg-accent-success": s.isValid,
|
|
53
|
+
"marker:text-fg-accent-error text-fg-accent-error": !s.isValid
|
|
54
|
+
}),
|
|
55
|
+
children: /* @__PURE__ */ e(c, { variants: "body", size: "sm", className: "text-inherit", children: s.text })
|
|
56
|
+
},
|
|
57
|
+
s.id
|
|
58
|
+
)) })
|
|
59
|
+
] });
|
|
46
60
|
}
|
|
47
|
-
|
|
61
|
+
return f ? /* @__PURE__ */ e(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: `self-stretch inline-flex flex-col justify-start items-start ${r || ""}`,
|
|
65
|
+
children: /* @__PURE__ */ i("div", { className: "self-stretch inline-flex justify-start items-start gap-1", children: [
|
|
66
|
+
l && (m || /* @__PURE__ */ e(
|
|
67
|
+
n,
|
|
68
|
+
{
|
|
69
|
+
name: "alert-octagon",
|
|
70
|
+
className: "text-fg-accent-error",
|
|
71
|
+
variant: "solid",
|
|
72
|
+
size: typeof t == "number" ? t : 16
|
|
73
|
+
}
|
|
74
|
+
)),
|
|
75
|
+
d && !l && /* @__PURE__ */ e(
|
|
76
|
+
n,
|
|
77
|
+
{
|
|
78
|
+
name: "help-circle",
|
|
79
|
+
variant: "line",
|
|
80
|
+
className: "text-fg-neutral-subtle",
|
|
81
|
+
size: typeof t == "number" ? t : 16
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ e("div", { className: "flex-1 justify-start text-left flex flex-wrap items-center gap-0", children: /* @__PURE__ */ e(
|
|
85
|
+
c,
|
|
86
|
+
{
|
|
87
|
+
variants: "body",
|
|
88
|
+
size: "sm",
|
|
89
|
+
color: l ? "fg-accent-error" : "fg-neutral-subtle",
|
|
90
|
+
className: "inline",
|
|
91
|
+
children: f
|
|
92
|
+
}
|
|
93
|
+
) })
|
|
94
|
+
] })
|
|
95
|
+
}
|
|
96
|
+
) : null;
|
|
97
|
+
};
|
|
48
98
|
export {
|
|
49
|
-
|
|
99
|
+
j as default
|
|
50
100
|
};
|