@arthurzakharov/ui-kit 3.10.0 → 3.11.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Accordion_1l7nf_1{display:block;width:100%;background-color:var(--rm-ui-color-background-primary, #fff);border:1px solid var(--rm-ui-grey-100);border-radius:var(--rm-ui-border-radius-md, 8px);overflow:hidden}._Header_1l7nf_10{display:flex;align-items:center;gap:var(--rm-ui-padding-sm);width:100%;padding:var(--rm-ui-padding-md) var(--rm-ui-padding-md);background:transparent;border:0;cursor:pointer;text-align:left;font-family:inherit}._Header_1l7nf_10:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:-2px}._Index_1l7nf_31{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:28px;height:28px;padding:0 var(--rm-ui-padding-xxs);border-radius:50%;background-color:var(--rm-ui-color-theme-primary);color:var(--rm-ui-color-text-on-theme, #fff);font-size:var(--rm-ui-font-size-body-small);font-weight:var(--rm-ui-font-weight-medium);line-height:1}._Title_1l7nf_47{flex:1 1 auto;min-width:0}._Chevron_1l7nf_52{flex:0 0 auto;display:inline-flex;color:var(--rm-ui-color-text-secondary)}._Body_1l7nf_58{position:relative;padding:0 var(--rm-ui-padding-md) var(--rm-ui-padding-md)}._Subtitle_1l7nf_63{margin:0 0 var(--rm-ui-padding-sm)}._Content_1l7nf_67{display:block}._LoaderOverlay_1l7nf_71{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#ffffffbf;z-index:1}._Stepped_1l7nf_81{background:transparent;border:0;border-radius:0;overflow:visible}._Stepped_1l7nf_81 ._Header_1l7nf_10{gap:var(--rm-ui-padding-md);padding:0}._Stepped_1l7nf_81 ._Index_1l7nf_31{min-width:24px;width:24px;height:24px;padding:0;background-color:var(--rm-ui-color-action);color:#fff;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._Stepped_1l7nf_81 ._Chevron_1l7nf_52{color:var(--rm-ui-color-text-primary)}._Stepped_1l7nf_81 ._Body_1l7nf_58{padding:var(--rm-ui-padding-xs) 0 var(--rm-ui-padding-md) 28px;margin:var(--rm-ui-padding-sm) 0 0 11px;border-left:2px solid var(--rm-ui-color-action)}._Stepped_1l7nf_81 ._Subtitle_1l7nf_63{margin:0 0 var(--rm-ui-padding-md)}._Stepped_1l7nf_81 ._Content_1l7nf_67{display:flex;flex-direction:column;gap:var(--rm-ui-padding-md)}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronDown as C } from "lucide-react";
|
|
3
|
-
import { baseProps as
|
|
3
|
+
import { baseProps as l, clsx as s } from "../../utils/functions/functions.util.js";
|
|
4
4
|
import { FadeGrow as S } from "../../animations/fade-grow/fade-grow.component.js";
|
|
5
|
-
import { Rotate as
|
|
6
|
-
import { Loader as
|
|
5
|
+
import { Rotate as N } from "../../animations/rotate/rotate.component.js";
|
|
6
|
+
import { Loader as H } from "../loader/loader.component.js";
|
|
7
7
|
import { Text as m } from "../text/text.component.js";
|
|
8
|
-
import '../../assets/accordion-
|
|
9
|
-
Accordion:
|
|
10
|
-
Header:
|
|
11
|
-
HeaderOpen:
|
|
12
|
-
Index:
|
|
13
|
-
Title:
|
|
14
|
-
Chevron:
|
|
15
|
-
Body:
|
|
16
|
-
Subtitle:
|
|
8
|
+
import '../../assets/accordion-CBUfe0V-.css';const $ = "_Accordion_1l7nf_1", g = "_Header_1l7nf_10", z = "_HeaderOpen_1l7nf_28", A = "_Index_1l7nf_31", I = "_Title_1l7nf_47", L = "_Chevron_1l7nf_52", T = "_Body_1l7nf_58", w = "_Subtitle_1l7nf_63", B = "_Content_1l7nf_67", O = "_LoaderOverlay_1l7nf_71", j = "_Stepped_1l7nf_81", e = {
|
|
9
|
+
Accordion: $,
|
|
10
|
+
Header: g,
|
|
11
|
+
HeaderOpen: z,
|
|
12
|
+
Index: A,
|
|
13
|
+
Title: I,
|
|
14
|
+
Chevron: L,
|
|
15
|
+
Body: T,
|
|
16
|
+
Subtitle: w,
|
|
17
17
|
Content: B,
|
|
18
18
|
LoaderOverlay: O,
|
|
19
19
|
Stepped: j
|
|
20
20
|
}, E = ({
|
|
21
21
|
title: _,
|
|
22
|
-
isOpen:
|
|
22
|
+
isOpen: d,
|
|
23
23
|
onTitleClick: p,
|
|
24
|
-
index:
|
|
25
|
-
subtitle:
|
|
26
|
-
loading:
|
|
27
|
-
variant:
|
|
28
|
-
children:
|
|
24
|
+
index: i,
|
|
25
|
+
subtitle: r,
|
|
26
|
+
loading: f = !1,
|
|
27
|
+
variant: h = "default",
|
|
28
|
+
children: y,
|
|
29
29
|
...c
|
|
30
30
|
}) => {
|
|
31
|
-
const o =
|
|
32
|
-
return /* @__PURE__ */
|
|
31
|
+
const o = l(c, "data-testid", "accordion"), n = h === "stepped", v = n ? "body" : "body-large", b = !n && d ? "theme-primary" : "text-primary", x = n ? "body" : "body-small", u = n ? "text-primary" : "text-secondary";
|
|
32
|
+
return /* @__PURE__ */ a(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
"data-testid": o,
|
|
36
|
-
className:
|
|
36
|
+
className: s(e.Accordion, { [e.Stepped]: n }, l(c, "className")),
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
39
|
"button",
|
|
40
40
|
{
|
|
41
41
|
type: "button",
|
|
42
42
|
"data-testid": `${o}-header`,
|
|
43
|
-
className:
|
|
43
|
+
className: s(e.Header, { [e.HeaderOpen]: d }),
|
|
44
44
|
onClick: p,
|
|
45
|
-
"aria-expanded":
|
|
45
|
+
"aria-expanded": d,
|
|
46
46
|
children: [
|
|
47
|
-
|
|
48
|
-
/* @__PURE__ */ t(m, { tag: "span", className: e.Title, weight: "medium", size:
|
|
49
|
-
/* @__PURE__ */ t("span", { className: e.Chevron, children: /* @__PURE__ */ t(
|
|
47
|
+
i !== void 0 && /* @__PURE__ */ t("span", { "data-testid": `${o}-index`, className: e.Index, children: i }),
|
|
48
|
+
/* @__PURE__ */ t(m, { tag: "span", className: e.Title, weight: "medium", size: v, color: b, children: _ }),
|
|
49
|
+
/* @__PURE__ */ t("span", { className: e.Chevron, children: /* @__PURE__ */ t(N, { name: `${o}-chevron`, condition: d, from: "top", to: "bottom", children: /* @__PURE__ */ t(C, { size: n ? 24 : 20 }) }) })
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */ t(S, { name: `${o}-body`, condition:
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
/* @__PURE__ */ t(S, { name: `${o}-body`, condition: d, children: /* @__PURE__ */ a("div", { "data-testid": `${o}-body`, className: e.Body, children: [
|
|
54
|
+
f && /* @__PURE__ */ t("div", { "data-testid": `${o}-loader`, className: e.LoaderOverlay, children: /* @__PURE__ */ t(H, { color: "accent-primary", size: "md" }) }),
|
|
55
|
+
r != null && /* @__PURE__ */ t(
|
|
56
56
|
m,
|
|
57
57
|
{
|
|
58
58
|
tag: "div",
|
|
@@ -61,10 +61,10 @@ import '../../assets/accordion-Bzio9jMo.css';const H = "_Accordion_o1wti_1", $ =
|
|
|
61
61
|
weight: "regular",
|
|
62
62
|
size: x,
|
|
63
63
|
color: u,
|
|
64
|
-
children:
|
|
64
|
+
children: r
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
/* @__PURE__ */ t("div", { className: e.Content, children:
|
|
67
|
+
/* @__PURE__ */ t("div", { className: e.Content, children: y })
|
|
68
68
|
] }) })
|
|
69
69
|
]
|
|
70
70
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._Accordion_o1wti_1{display:block;width:100%;background-color:var(--rm-ui-color-background-primary, #fff);border:1px solid var(--rm-ui-grey-100);border-radius:var(--rm-ui-border-radius-md, 8px);overflow:hidden}._Header_o1wti_10{display:flex;align-items:center;gap:var(--rm-ui-padding-sm);width:100%;padding:var(--rm-ui-padding-md) var(--rm-ui-padding-md);background:transparent;border:0;cursor:pointer;text-align:left;font-family:inherit}._Header_o1wti_10:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:-2px}._Index_o1wti_31{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:28px;height:28px;padding:0 var(--rm-ui-padding-xxs);border-radius:50%;background-color:var(--rm-ui-color-theme-primary);color:var(--rm-ui-color-text-on-theme, #fff);font-size:var(--rm-ui-font-size-body-small);font-weight:var(--rm-ui-font-weight-medium);line-height:1}._Title_o1wti_47{flex:1 1 auto;min-width:0}._Chevron_o1wti_52{flex:0 0 auto;display:inline-flex;color:var(--rm-ui-color-text-secondary)}._Body_o1wti_58{position:relative;padding:0 var(--rm-ui-padding-md) var(--rm-ui-padding-md)}._Subtitle_o1wti_63{margin:0 0 var(--rm-ui-padding-sm)}._Content_o1wti_67{display:block}._LoaderOverlay_o1wti_71{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#ffffffbf;z-index:1}._Stepped_o1wti_81{background:transparent;border:0;border-radius:0;overflow:visible}._Stepped_o1wti_81 ._Header_o1wti_10{gap:var(--rm-ui-padding-md);padding:0}._Stepped_o1wti_81 ._Index_o1wti_31{min-width:24px;width:24px;height:24px;padding:0;background-color:var(--rm-ui-color-action);color:#fff;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._Stepped_o1wti_81 ._Chevron_o1wti_52{color:var(--rm-ui-color-text-primary)}._Stepped_o1wti_81 ._Body_o1wti_58{padding:var(--rm-ui-padding-xs) 0 var(--rm-ui-padding-md) 28px;margin-left:11px;border-left:2px solid var(--rm-ui-color-action)}._Stepped_o1wti_81 ._Subtitle_o1wti_63{margin:0 0 var(--rm-ui-padding-md)}._Stepped_o1wti_81 ._Content_o1wti_67{display:flex;flex-direction:column;gap:var(--rm-ui-padding-md)}
|