@vkzstudio/muza-ui 1.9.0 → 1.9.1
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/FormField/FormField.js +16 -16
- package/dist/components/FormField/InputLabel.d.ts.map +1 -1
- package/dist/components/FormField/InputLabel.js +35 -25
- package/dist/components/Input/Input.stories.d.ts +1 -0
- package/dist/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/muza-ui.css +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as N } from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { InfoCircleBold as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { InputHint as
|
|
3
|
+
import { cn as w } from "../../utils/cn.js";
|
|
4
|
+
import { InfoCircleBold as g } from "@solar-icons/react-perf";
|
|
5
|
+
import { Tooltip as j, TooltipTrigger as C, TooltipContent as F } from "../Tooltip/Tooltip.js";
|
|
6
|
+
import { InputHint as T } from "./InputHint.js";
|
|
7
7
|
import { InputLabel as s } from "./InputLabel.js";
|
|
8
8
|
const y = N(
|
|
9
9
|
({
|
|
@@ -11,8 +11,8 @@ const y = N(
|
|
|
11
11
|
label: r,
|
|
12
12
|
hint: c,
|
|
13
13
|
error: a,
|
|
14
|
-
required:
|
|
15
|
-
disableRequiredAsterisk:
|
|
14
|
+
required: m,
|
|
15
|
+
disableRequiredAsterisk: t,
|
|
16
16
|
htmlFor: n,
|
|
17
17
|
labelId: p,
|
|
18
18
|
hintId: x,
|
|
@@ -21,25 +21,25 @@ const y = N(
|
|
|
21
21
|
labelRight: i,
|
|
22
22
|
className: v
|
|
23
23
|
}, u) => {
|
|
24
|
-
const f = h ?? (d ? /* @__PURE__ */ e(
|
|
25
|
-
/* @__PURE__ */ o(
|
|
26
|
-
/* @__PURE__ */ o(
|
|
24
|
+
const f = h ?? (d ? /* @__PURE__ */ e(j, { children: [
|
|
25
|
+
/* @__PURE__ */ o(C, { asChild: !0, children: /* @__PURE__ */ o(g, { className: "cursor-help text-comp-info-ico-def hover:text-comp-info-ico-hover" }) }),
|
|
26
|
+
/* @__PURE__ */ o(F, { children: d })
|
|
27
27
|
] }) : void 0);
|
|
28
28
|
return /* @__PURE__ */ e(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
ref: u,
|
|
32
|
-
className:
|
|
32
|
+
className: w("flex min-w-0 flex-col gap-comp-input-gap", v),
|
|
33
33
|
children: [
|
|
34
34
|
(r || i) && (f || i ? /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: [
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2xs", children: [
|
|
35
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center gap-2xs", children: [
|
|
36
36
|
r && /* @__PURE__ */ o(
|
|
37
37
|
s,
|
|
38
38
|
{
|
|
39
39
|
htmlFor: n,
|
|
40
40
|
id: p,
|
|
41
|
-
required:
|
|
42
|
-
disableRequiredAsterisk:
|
|
41
|
+
required: m,
|
|
42
|
+
disableRequiredAsterisk: t,
|
|
43
43
|
children: r
|
|
44
44
|
}
|
|
45
45
|
),
|
|
@@ -51,13 +51,13 @@ const y = N(
|
|
|
51
51
|
{
|
|
52
52
|
htmlFor: n,
|
|
53
53
|
id: p,
|
|
54
|
-
required:
|
|
55
|
-
disableRequiredAsterisk:
|
|
54
|
+
required: m,
|
|
55
|
+
disableRequiredAsterisk: t,
|
|
56
56
|
children: r
|
|
57
57
|
}
|
|
58
58
|
)),
|
|
59
59
|
l,
|
|
60
|
-
c && /* @__PURE__ */ o(
|
|
60
|
+
c && /* @__PURE__ */ o(T, { error: a, id: x, children: c })
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/InputLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../src/components/FormField/InputLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,UAAU,GAAI,0EAOxB,eAAe,4CAoCjB,CAAA"}
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { cn as p } from "../../utils/cn.js";
|
|
3
|
+
import { Typography as h } from "../Typography/Typography.js";
|
|
4
|
+
const f = ({
|
|
5
|
+
children: s,
|
|
6
|
+
htmlFor: a,
|
|
7
|
+
id: o,
|
|
8
|
+
required: i,
|
|
9
|
+
disableRequiredAsterisk: c,
|
|
10
|
+
className: m
|
|
11
|
+
}) => {
|
|
12
|
+
const n = i && !c, t = n && typeof s == "string" ? s.match(/^([\s\S]*\s)?(\S+)\s*$/) : null;
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
h,
|
|
15
|
+
{
|
|
16
|
+
component: "label",
|
|
17
|
+
weight: "regular",
|
|
18
|
+
size: "sm",
|
|
19
|
+
htmlFor: a,
|
|
20
|
+
id: o,
|
|
21
|
+
className: p("block min-w-0 overflow-hidden text-ellipsis", m),
|
|
22
|
+
children: t ? /* @__PURE__ */ r(l, { children: [
|
|
23
|
+
t[1],
|
|
24
|
+
/* @__PURE__ */ r("span", { className: "inline-flex max-w-full", children: [
|
|
25
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: t[2] }),
|
|
26
|
+
/* @__PURE__ */ e("span", { className: "shrink-0 text-comp-input-text-error", children: " *" })
|
|
27
|
+
] })
|
|
28
|
+
] }) : /* @__PURE__ */ r(l, { children: [
|
|
29
|
+
s,
|
|
30
|
+
n && /* @__PURE__ */ e("span", { className: "text-comp-input-text-error", children: " *" })
|
|
31
|
+
] })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
25
35
|
export {
|
|
26
|
-
|
|
36
|
+
f as InputLabel
|
|
27
37
|
};
|
|
@@ -7,6 +7,7 @@ export declare const Default: Story;
|
|
|
7
7
|
export declare const InputWithPrefixAndSuffix: Story;
|
|
8
8
|
export declare const InputWithLabelAndHint: Story;
|
|
9
9
|
export declare const InputWithError: Story;
|
|
10
|
+
export declare const LongLabel: Story;
|
|
10
11
|
export declare const DisabledInput: Story;
|
|
11
12
|
export declare const InputWithMask: Story;
|
|
12
13
|
export declare const InputWithSerialNumberMask: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,O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