@arthurzakharov/ui-kit 3.4.0 → 3.5.0
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/main-attachment/main-attachment.component.d.ts +3 -3
- package/dist/components/main-attachment/main-attachment.component.js +29 -21
- package/dist/components/sidebar/sidebar.component.d.ts +2 -2
- package/dist/components/sidebar/sidebar.component.js +39 -39
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
export interface MainAttachmentProps extends PropsWithChildren {
|
|
3
|
-
title?:
|
|
4
|
-
subtitle?:
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
subtitle?: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare const MainAttachment: (props: MainAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as s } from "../../utils/functions/functions.util.js";
|
|
3
|
+
import { isValidElement as o, cloneElement as u } from "react";
|
|
4
|
+
import { FadeScale as A } from "../../animations/fade-scale/fade-scale.component.js";
|
|
5
|
+
import { Text as M } from "../text/text.component.js";
|
|
6
|
+
import '../../assets/main-attachment-Cw8AP6xv.css';const f = "_MainAttachment_1oa7f_1", p = "_MainAttachmentTitle_1oa7f_5", b = "_MainAttachmentTitleWithSubtitle_1oa7f_9", _ = "_MainAttachmentSubtitle_1oa7f_13", a = {
|
|
7
|
+
MainAttachment: f,
|
|
8
|
+
MainAttachmentTitle: p,
|
|
9
|
+
MainAttachmentTitleWithSubtitle: b,
|
|
10
|
+
MainAttachmentSubtitle: _
|
|
11
|
+
}, c = (t) => t == null || t === "" || t === !1, m = (t, n, i) => {
|
|
12
|
+
if (typeof t == "string" || typeof t == "number")
|
|
13
|
+
return /* @__PURE__ */ r(M, { preset: i, className: n, children: t });
|
|
14
|
+
if (o(t)) {
|
|
15
|
+
const e = t;
|
|
16
|
+
return u(e, {
|
|
17
|
+
className: s(e.props.className, n)
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
}, d = (t) => {
|
|
22
|
+
const { children: n, title: i, subtitle: e } = t, l = !c(e);
|
|
23
|
+
return /* @__PURE__ */ h("div", { className: a.MainAttachment, children: [
|
|
24
|
+
c(i) ? null : m(
|
|
14
25
|
i,
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
) : null,
|
|
21
|
-
e ? /* @__PURE__ */ a(i, { preset: "page-subtitle", className: t.MainAttachmentSubtitle, children: e }) : null,
|
|
22
|
-
/* @__PURE__ */ a(o, { name: "attachment-main", condition: !0, animateOnStart: !0, duration: 0.2, delay: 0.1, children: l })
|
|
26
|
+
s(a.MainAttachmentTitle, { [a.MainAttachmentTitleWithSubtitle]: l }),
|
|
27
|
+
"page-title"
|
|
28
|
+
),
|
|
29
|
+
l ? m(e, a.MainAttachmentSubtitle, "page-subtitle") : null,
|
|
30
|
+
/* @__PURE__ */ r(A, { name: "attachment-main", condition: !0, animateOnStart: !0, duration: 0.2, delay: 0.1, children: n })
|
|
23
31
|
] });
|
|
24
32
|
};
|
|
25
33
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { CertificationsProps } from '../certifications';
|
|
3
3
|
import { UserPanelProps } from '../user-panel';
|
|
4
4
|
import { State } from '../../controls/utils';
|
|
5
5
|
import { Base } from '../../utils/types';
|
|
6
6
|
type SidebarStep = {
|
|
7
7
|
state: State;
|
|
8
|
-
text:
|
|
8
|
+
text: ReactNode;
|
|
9
9
|
};
|
|
10
10
|
type SidebarInfoRow = [string, string];
|
|
11
11
|
interface SidebarStepsProps extends Base {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as l, baseProps as
|
|
2
|
+
import { clsx as l, baseProps as s, parseSpacingValue as m } from "../../utils/functions/functions.util.js";
|
|
3
3
|
import { FadeScale as p } from "../../animations/fade-scale/fade-scale.component.js";
|
|
4
4
|
import { Certifications as S } from "../certifications/certifications.component.js";
|
|
5
5
|
import { Line as _ } from "../line/line.component.js";
|
|
@@ -10,7 +10,7 @@ import "../../utils/content/content.component.js";
|
|
|
10
10
|
import "lucide-react";
|
|
11
11
|
import "usehooks-ts";
|
|
12
12
|
import { Status as u } from "../../controls/primitives/status/status.component.js";
|
|
13
|
-
import '../../assets/sidebar-C-EyF8q9.css';const N = "_Sidebar_bino6_1", h = "_Board_bino6_5", v = "_Steps_bino6_13", g = "_Info_bino6_14", I = "_Step_bino6_13", y = "_InfoRow_bino6_27", T = "_SidebarButton_bino6_35", B = "_Timetable_bino6_42",
|
|
13
|
+
import '../../assets/sidebar-C-EyF8q9.css';const N = "_Sidebar_bino6_1", h = "_Board_bino6_5", v = "_Steps_bino6_13", g = "_Info_bino6_14", I = "_Step_bino6_13", y = "_InfoRow_bino6_27", T = "_SidebarButton_bino6_35", B = "_Timetable_bino6_42", x = "_Space_bino6_48", n = {
|
|
14
14
|
Sidebar: N,
|
|
15
15
|
Board: h,
|
|
16
16
|
Steps: v,
|
|
@@ -19,85 +19,85 @@ import '../../assets/sidebar-C-EyF8q9.css';const N = "_Sidebar_bino6_1", h = "_B
|
|
|
19
19
|
InfoRow: y,
|
|
20
20
|
SidebarButton: T,
|
|
21
21
|
Timetable: B,
|
|
22
|
-
Space:
|
|
23
|
-
},
|
|
22
|
+
Space: x
|
|
23
|
+
}, w = ({ children: a, ...t }) => /* @__PURE__ */ e(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
"data-testid":
|
|
27
|
-
className: l(
|
|
28
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
26
|
+
"data-testid": s(t, "data-testid", "sidebar"),
|
|
27
|
+
className: l(n.Sidebar, s(t, "className")),
|
|
28
|
+
children: /* @__PURE__ */ e("div", { className: n.Board, children: a })
|
|
29
29
|
}
|
|
30
30
|
), $ = ({ children: a, ...t }) => /* @__PURE__ */ e(
|
|
31
31
|
c,
|
|
32
32
|
{
|
|
33
33
|
preset: "sidebar-title",
|
|
34
|
-
"data-testid":
|
|
35
|
-
className:
|
|
34
|
+
"data-testid": s(t, "data-testid", "sidebar-title"),
|
|
35
|
+
className: s(t, "className"),
|
|
36
36
|
children: a
|
|
37
37
|
}
|
|
38
38
|
), z = ({ steps: a, ...t }) => /* @__PURE__ */ e(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
"data-testid":
|
|
42
|
-
className: l(
|
|
43
|
-
children: a.map(({ state: i, text:
|
|
41
|
+
"data-testid": s(t, "data-testid", "sidebar-steps"),
|
|
42
|
+
className: l(n.Steps, s(t, "className")),
|
|
43
|
+
children: a.map(({ state: i, text: d }, r) => /* @__PURE__ */ b("div", { className: n.Step, "data-testid": "sidebar-step", children: [
|
|
44
44
|
/* @__PURE__ */ e(u, { state: i }),
|
|
45
|
-
/* @__PURE__ */ e(c, { tag: "span", weight: "medium", size: "body-small", color: i === "idle" ? "grey-400" : "text-primary", children:
|
|
46
|
-
] },
|
|
45
|
+
/* @__PURE__ */ e(c, { tag: "span", weight: "medium", size: "body-small", color: i === "idle" ? "grey-400" : "text-primary", children: d })
|
|
46
|
+
] }, r))
|
|
47
47
|
}
|
|
48
48
|
), R = ({ rows: a, ...t }) => {
|
|
49
|
-
const i = a.filter(([,
|
|
49
|
+
const i = a.filter(([, d]) => d.trim() !== "");
|
|
50
50
|
return i.length === 0 ? null : /* @__PURE__ */ e(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
53
|
-
"data-testid":
|
|
54
|
-
className: l(
|
|
55
|
-
children: i.map(([
|
|
56
|
-
/* @__PURE__ */ e(c, { tag: "span", size: "body-small", color: "text-secondary", children:
|
|
57
|
-
/* @__PURE__ */ e(c, { tag: "span", size: "body-small", align: "right", children:
|
|
58
|
-
] }, `${
|
|
53
|
+
"data-testid": s(t, "data-testid", "sidebar-info"),
|
|
54
|
+
className: l(n.Info, s(t, "className")),
|
|
55
|
+
children: i.map(([d, r], o) => /* @__PURE__ */ b("div", { className: n.InfoRow, "data-testid": "sidebar-info-row", children: [
|
|
56
|
+
/* @__PURE__ */ e(c, { tag: "span", size: "body-small", color: "text-secondary", children: d }),
|
|
57
|
+
/* @__PURE__ */ e(c, { tag: "span", size: "body-small", align: "right", children: r })
|
|
58
|
+
] }, `${d}-${o}`))
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
}, j = ({ isOpen: a, title: t, data: i, button:
|
|
61
|
+
}, j = ({ isOpen: a, title: t, data: i, button: d, onClick: r, ...o }) => /* @__PURE__ */ e(
|
|
62
62
|
p,
|
|
63
63
|
{
|
|
64
64
|
name: "sidebar-user",
|
|
65
65
|
condition: a,
|
|
66
|
-
"data-testid":
|
|
67
|
-
className:
|
|
68
|
-
children: /* @__PURE__ */ e(f, { title: t, data: i, button:
|
|
66
|
+
"data-testid": s(o, "data-testid", "sidebar-user"),
|
|
67
|
+
className: s(o, "className"),
|
|
68
|
+
children: /* @__PURE__ */ e(f, { title: t, data: i, button: d, onClick: r })
|
|
69
69
|
}
|
|
70
70
|
), C = ({ isVisible: a, children: t, ...i }) => /* @__PURE__ */ e(
|
|
71
71
|
p,
|
|
72
72
|
{
|
|
73
73
|
name: "sidebar-submit",
|
|
74
74
|
condition: a,
|
|
75
|
-
"data-testid":
|
|
76
|
-
className:
|
|
77
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
75
|
+
"data-testid": s(i, "data-testid", "sidebar-submit"),
|
|
76
|
+
className: s(i, "className"),
|
|
77
|
+
children: /* @__PURE__ */ e("div", { className: n.SidebarButton, children: t })
|
|
78
78
|
}
|
|
79
79
|
), L = (a) => /* @__PURE__ */ e(S, { ...a }), U = ({ title: a, lines: t, ...i }) => {
|
|
80
|
-
const
|
|
81
|
-
return /* @__PURE__ */ b("div", { "data-testid":
|
|
82
|
-
/* @__PURE__ */ e(c, { tag: "span", size: "body-small", color: "text-secondary", "data-testid": `${
|
|
83
|
-
t.map((
|
|
80
|
+
const d = s(i, "data-testid", "sidebar-timetable");
|
|
81
|
+
return /* @__PURE__ */ b("div", { "data-testid": d, className: l(n.Timetable, s(i, "className")), children: [
|
|
82
|
+
/* @__PURE__ */ e(c, { tag: "span", size: "body-small", color: "text-secondary", "data-testid": `${d}-title`, children: a }),
|
|
83
|
+
t.map((r, o) => /* @__PURE__ */ e(c, { tag: "span", size: "body-small", "data-testid": `${d}-line-${o}`, children: r }, o))
|
|
84
84
|
] });
|
|
85
|
-
}, P = () => /* @__PURE__ */ e(_, {}), F = ({ height: a, 768: t, 1024: i, 1200:
|
|
86
|
-
const
|
|
85
|
+
}, P = () => /* @__PURE__ */ e(_, {}), F = ({ height: a, 768: t, 1024: i, 1200: d, ...r }) => {
|
|
86
|
+
const o = {
|
|
87
87
|
"--rm-ui-sidebar-space-base": m(a),
|
|
88
88
|
...t !== void 0 ? { "--rm-ui-sidebar-space-768": m(t) } : {},
|
|
89
89
|
...i !== void 0 ? { "--rm-ui-sidebar-space-1024": m(i) } : {},
|
|
90
|
-
...
|
|
90
|
+
...d !== void 0 ? { "--rm-ui-sidebar-space-1200": m(d) } : {}
|
|
91
91
|
};
|
|
92
92
|
return /* @__PURE__ */ e(
|
|
93
93
|
"div",
|
|
94
94
|
{
|
|
95
|
-
"data-testid":
|
|
96
|
-
className: l(
|
|
97
|
-
style:
|
|
95
|
+
"data-testid": s(r, "data-testid", "sidebar-space"),
|
|
96
|
+
className: l(n.Space, s(r, "className")),
|
|
97
|
+
style: o
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
}, W = Object.assign(
|
|
100
|
+
}, W = Object.assign(w, {
|
|
101
101
|
Title: $,
|
|
102
102
|
Steps: z,
|
|
103
103
|
Info: R,
|