@arthurzakharov/ui-kit 1.5.5 → 1.5.6

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.
@@ -0,0 +1 @@
1
+ ._Sidebar_17t5d_1{display:block}._Board_17t5d_5{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-lg);background-color:var(--rm-ui-sidebar-bg)}._SidebarTitle_17t5d_11,._SidebarButton_17t5d_12{padding-bottom:var(--rm-ui-padding-md)}._Steps_17t5d_16,._Info_17t5d_17{display:flex;flex-direction:column;align-items:flex-start;gap:var(--rm-ui-padding-sm)}._Step_17t5d_16{display:inline-flex;align-items:center;gap:var(--rm-ui-padding-xs)}._InfoRow_17t5d_30{display:inline-flex;align-items:center;justify-content:space-between;gap:var(--rm-ui-padding-xs)}._SidebarButton_17t5d_12{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}._NothingAbove_17t5d_44{margin-top:var(--rm-ui-padding-lg)}@media screen and (min-width:1024px){._Board_17t5d_5{padding:var(--rm-ui-padding-xl)}}@media screen and (min-width:1200px){._Board_17t5d_5{padding:var(--rm-ui-padding-xxl)}._SidebarTitle_17t5d_11,._SidebarButton_17t5d_12{padding-bottom:var(--rm-ui-padding-lg)}}
@@ -1,66 +1,91 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import N from "clsx";
3
- import { FadeScale as l } from "../../animations/fade-scale/fade-scale.component.js";
4
- import { Certifications as B } from "../certifications/certifications.component.js";
5
- import { Line as d } from "../line/line.component.js";
6
- import { Text as s } from "../text/text.component.js";
7
- import { UserPanel as u } from "../user-panel/user-panel.component.js";
8
- import { Status as v } from "../../controls/status/status.component.js";
9
- import { baseProps as c } from "../../utils/functions/functions.util.js";
10
- import '../../assets/sidebar-ODZFjsSe.css';const x = "_Sidebar_13hlr_1", g = "_Board_13hlr_5", w = "_SidebarTitle_13hlr_11", y = "_SidebarButton_13hlr_12", T = "_Steps_13hlr_16", R = "_Info_13hlr_17", z = "_Step_13hlr_16", C = "_InfoRow_13hlr_30", e = {
11
- Sidebar: x,
12
- Board: g,
13
- SidebarTitle: w,
14
- SidebarButton: y,
15
- Steps: T,
16
- Info: R,
17
- Step: z,
18
- InfoRow: C
19
- }, D = ({
20
- children: m,
21
- isButtonVisible: p = !1,
22
- isUserOpen: b = !1,
23
- title: h = "Ihre Übersicht",
24
- steps: _ = [],
25
- info: S = [],
26
- certifications: f = [],
1
+ import { jsx as t, jsxs as o, Fragment as u } from "react/jsx-runtime";
2
+ import l from "clsx";
3
+ import { FadeScale as p } from "../../animations/fade-scale/fade-scale.component.js";
4
+ import { Certifications as x } from "../certifications/certifications.component.js";
5
+ import { Line as s } from "../line/line.component.js";
6
+ import { Text as n } from "../text/text.component.js";
7
+ import { UserPanel as B } from "../user-panel/user-panel.component.js";
8
+ import { Status as w } from "../../controls/status/status.component.js";
9
+ import { baseProps as f } from "../../utils/functions/functions.util.js";
10
+ import '../../assets/sidebar-DyDlIXV0.css';const y = "_Sidebar_17t5d_1", A = "_Board_17t5d_5", T = "_SidebarTitle_17t5d_11", R = "_SidebarButton_17t5d_12", z = "_Steps_17t5d_16", C = "_Info_17t5d_17", $ = "_Step_17t5d_16", j = "_InfoRow_17t5d_30", F = "_NothingAbove_17t5d_44", e = {
11
+ Sidebar: y,
12
+ Board: A,
13
+ SidebarTitle: T,
14
+ SidebarButton: R,
15
+ Steps: z,
16
+ Info: C,
17
+ Step: $,
18
+ InfoRow: j,
19
+ NothingAbove: F
20
+ }, K = ({
21
+ // Sidebar props
22
+ children: h,
23
+ isButtonVisible: m = !1,
24
+ isUserOpen: c = !1,
25
+ title: S = "Ihre Übersicht",
26
+ steps: N = [],
27
+ info: g = [],
28
+ certifications: v = [],
27
29
  user: a,
28
- ...n
29
- }) => /* @__PURE__ */ t(
30
- "div",
31
- {
32
- "data-testid": c(n, "data-testid", "sidebar"),
33
- className: N(e.Sidebar, c(n, "className")),
34
- children: /* @__PURE__ */ o("div", { className: e.Board, children: [
35
- /* @__PURE__ */ t(s, { preset: "sidebar-title", className: e.SidebarTitle, children: h }),
36
- /* @__PURE__ */ t("div", { className: e.Steps, "data-testid": "sidebar-steps", children: _.map(({ state: i, text: r }) => /* @__PURE__ */ o("div", { className: e.Step, "data-testid": "sidebar-step", children: [
37
- /* @__PURE__ */ t(v, { state: i }),
30
+ // Base props
31
+ ...b
32
+ }) => {
33
+ const _ = g.filter(([, i]) => i.trim() !== ""), d = _.length > 0;
34
+ return /* @__PURE__ */ t(
35
+ "div",
36
+ {
37
+ "data-testid": f(b, "data-testid", "sidebar"),
38
+ className: l(e.Sidebar, f(b, "className")),
39
+ children: /* @__PURE__ */ o("div", { className: e.Board, children: [
40
+ /* @__PURE__ */ t(n, { preset: "sidebar-title", className: e.SidebarTitle, children: S }),
41
+ /* @__PURE__ */ t("div", { className: e.Steps, "data-testid": "sidebar-steps", children: N.map(({ state: i, text: r }) => /* @__PURE__ */ o("div", { className: e.Step, "data-testid": "sidebar-step", children: [
42
+ /* @__PURE__ */ t(w, { state: i }),
43
+ /* @__PURE__ */ t(
44
+ n,
45
+ {
46
+ tag: "span",
47
+ weight: "medium",
48
+ size: "body-small",
49
+ color: i === "idle" ? "text-secondary" : "text-primary",
50
+ children: r
51
+ }
52
+ )
53
+ ] }, r)) }),
54
+ d && /* @__PURE__ */ o(u, { children: [
55
+ /* @__PURE__ */ t(s, {}),
56
+ /* @__PURE__ */ t("div", { className: e.Info, "data-testid": "sidebar-info", children: _.map(([i, r], I) => /* @__PURE__ */ o("div", { className: e.InfoRow, "data-testid": "sidebar-info-row", children: [
57
+ /* @__PURE__ */ t(n, { tag: "span", size: "body-small", color: "text-secondary", children: i }),
58
+ /* @__PURE__ */ t(n, { tag: "span", size: "body-small", align: "right", children: r })
59
+ ] }, `${i}-${I}`)) }),
60
+ /* @__PURE__ */ t(s, {})
61
+ ] }),
62
+ /* @__PURE__ */ o(p, { name: "user", condition: c, children: [
63
+ !d && /* @__PURE__ */ t(s, {}),
64
+ /* @__PURE__ */ t(B, { title: a.title, button: a.button, data: a.data, onClick: a.onClick }),
65
+ /* @__PURE__ */ t(s, {})
66
+ ] }),
67
+ /* @__PURE__ */ t(p, { name: "button", condition: m, children: /* @__PURE__ */ t(
68
+ "div",
69
+ {
70
+ className: l(e.SidebarButton, {
71
+ [e.NothingAbove]: !d && !c
72
+ }),
73
+ children: h
74
+ }
75
+ ) }),
38
76
  /* @__PURE__ */ t(
39
- s,
77
+ x,
40
78
  {
41
- tag: "span",
42
- weight: "medium",
43
- size: "body-small",
44
- color: i === "idle" ? "text-secondary" : "text-primary",
45
- children: r
79
+ icons: v,
80
+ className: l({
81
+ [e.NothingAbove]: !d && !c && !m
82
+ })
46
83
  }
47
84
  )
48
- ] }, r)) }),
49
- /* @__PURE__ */ t(d, {}),
50
- /* @__PURE__ */ t("div", { className: e.Info, "data-testid": "sidebar-info", children: S.map(([i, r], I) => /* @__PURE__ */ o("div", { className: e.InfoRow, "data-testid": "sidebar-info-row", children: [
51
- /* @__PURE__ */ t(s, { tag: "span", size: "body-small", color: "text-secondary", children: i }),
52
- /* @__PURE__ */ t(s, { tag: "span", size: "body-small", align: "right", children: r })
53
- ] }, `${i}-${I}`)) }),
54
- /* @__PURE__ */ t(d, {}),
55
- /* @__PURE__ */ o(l, { name: "user", condition: b, children: [
56
- /* @__PURE__ */ t(u, { title: a.title, button: a.button, data: a.data, onClick: a.onClick }),
57
- /* @__PURE__ */ t(d, {})
58
- ] }),
59
- /* @__PURE__ */ t(l, { name: "button", condition: p, children: /* @__PURE__ */ t("div", { className: e.SidebarButton, children: m }) }),
60
- /* @__PURE__ */ t(B, { icons: f })
61
- ] })
62
- }
63
- );
85
+ ] })
86
+ }
87
+ );
88
+ };
64
89
  export {
65
- D as Sidebar
90
+ K as Sidebar
66
91
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.5.5",
4
+ "version": "1.5.6",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._Sidebar_13hlr_1{display:block}._Board_13hlr_5{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-lg);background-color:var(--rm-ui-sidebar-bg)}._SidebarTitle_13hlr_11,._SidebarButton_13hlr_12{padding-bottom:var(--rm-ui-padding-md)}._Steps_13hlr_16,._Info_13hlr_17{display:flex;flex-direction:column;align-items:flex-start;gap:var(--rm-ui-padding-sm)}._Step_13hlr_16{display:inline-flex;align-items:center;gap:var(--rm-ui-padding-xs)}._InfoRow_13hlr_30{display:inline-flex;align-items:center;justify-content:space-between;gap:var(--rm-ui-padding-xs)}._SidebarButton_13hlr_12{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}@media screen and (min-width:1024px){._Board_13hlr_5{padding:var(--rm-ui-padding-xl)}}@media screen and (min-width:1200px){._Board_13hlr_5{padding:var(--rm-ui-padding-xxl)}._SidebarTitle_13hlr_11,._SidebarButton_13hlr_12{padding-bottom:var(--rm-ui-padding-lg)}}