@arthurzakharov/ui-kit 2.7.0 → 2.8.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/assets/accordion-D1OVgv7W.css +1 -0
- package/dist/components/accordion/accordion.component.d.ts +12 -0
- package/dist/components/accordion/accordion.component.js +61 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/index.js +4 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +65 -63
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Accordion_1k5zy_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_1k5zy_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;color:var(--rm-ui-color-text-primary);font-family:inherit;font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large);font-weight:var(--rm-ui-font-weight-medium)}._Header_1k5zy_10:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:-2px}._HeaderOpen_1k5zy_32{color:var(--rm-ui-color-theme-primary)}._Index_1k5zy_36{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_1k5zy_52{flex:1 1 auto;min-width:0}._Chevron_1k5zy_57{flex:0 0 auto;display:inline-flex;color:var(--rm-ui-color-text-secondary)}._Body_1k5zy_63{position:relative;padding:0 var(--rm-ui-padding-md) var(--rm-ui-padding-md)}._Subtitle_1k5zy_68{margin:0 0 var(--rm-ui-padding-sm);color:var(--rm-ui-color-text-secondary);font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._Content_1k5zy_75{display:block}._LoaderOverlay_1k5zy_79{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#ffffffbf;z-index:1}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Base } from '../../utils/types';
|
|
3
|
+
export interface AccordionProps extends Base {
|
|
4
|
+
title: string;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onTitleClick: () => void;
|
|
7
|
+
index?: number | string;
|
|
8
|
+
subtitle?: ReactNode;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Accordion: ({ title, isOpen, onTitleClick, index, subtitle, loading, children, ...base }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as h } from "lucide-react";
|
|
3
|
+
import { baseProps as i, clsx as s } from "../../utils/functions/functions.util.js";
|
|
4
|
+
import { FadeGrow as v } from "../../animations/fade-grow/fade-grow.component.js";
|
|
5
|
+
import { Rotate as p } from "../../animations/rotate/rotate.component.js";
|
|
6
|
+
import { Loader as z } from "../loader/loader.component.js";
|
|
7
|
+
import '../../assets/accordion-D1OVgv7W.css';const k = "_Accordion_1k5zy_1", C = "_Header_1k5zy_10", N = "_HeaderOpen_1k5zy_32", x = "_Index_1k5zy_36", b = "_Title_1k5zy_52", f = "_Chevron_1k5zy_57", H = "_Body_1k5zy_63", $ = "_Subtitle_1k5zy_68", u = "_Content_1k5zy_75", A = "_LoaderOverlay_1k5zy_79", o = {
|
|
8
|
+
Accordion: k,
|
|
9
|
+
Header: C,
|
|
10
|
+
HeaderOpen: N,
|
|
11
|
+
Index: x,
|
|
12
|
+
Title: b,
|
|
13
|
+
Chevron: f,
|
|
14
|
+
Body: H,
|
|
15
|
+
Subtitle: $,
|
|
16
|
+
Content: u,
|
|
17
|
+
LoaderOverlay: A
|
|
18
|
+
}, j = ({
|
|
19
|
+
title: l,
|
|
20
|
+
isOpen: d,
|
|
21
|
+
onTitleClick: _,
|
|
22
|
+
index: r,
|
|
23
|
+
subtitle: a,
|
|
24
|
+
loading: m = !1,
|
|
25
|
+
children: y,
|
|
26
|
+
...c
|
|
27
|
+
}) => {
|
|
28
|
+
const t = i(c, "data-testid", "accordion");
|
|
29
|
+
return /* @__PURE__ */ n(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
"data-testid": t,
|
|
33
|
+
className: s(o.Accordion, i(c, "className")),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ n(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
type: "button",
|
|
39
|
+
"data-testid": `${t}-header`,
|
|
40
|
+
className: s(o.Header, { [o.HeaderOpen]: d }),
|
|
41
|
+
onClick: _,
|
|
42
|
+
"aria-expanded": d,
|
|
43
|
+
children: [
|
|
44
|
+
r !== void 0 && /* @__PURE__ */ e("span", { "data-testid": `${t}-index`, className: o.Index, children: r }),
|
|
45
|
+
/* @__PURE__ */ e("span", { className: o.Title, children: l }),
|
|
46
|
+
/* @__PURE__ */ e("span", { className: o.Chevron, children: /* @__PURE__ */ e(p, { name: `${t}-chevron`, condition: d, from: "top", to: "bottom", children: /* @__PURE__ */ e(h, { size: 20 }) }) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ e(v, { name: `${t}-body`, condition: d, children: /* @__PURE__ */ n("div", { "data-testid": `${t}-body`, className: o.Body, children: [
|
|
51
|
+
m && /* @__PURE__ */ e("div", { "data-testid": `${t}-loader`, className: o.LoaderOverlay, children: /* @__PURE__ */ e(z, { color: "accent-primary", size: "md" }) }),
|
|
52
|
+
a != null && /* @__PURE__ */ e("div", { "data-testid": `${t}-subtitle`, className: o.Subtitle, children: a }),
|
|
53
|
+
/* @__PURE__ */ e("div", { className: o.Content, children: y })
|
|
54
|
+
] }) })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
j as Accordion
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordion, type AccordionProps } from './accordion.component';
|
package/dist/main.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { HiddenInput, type HiddenInputProps } from './controls/primitives/hidden
|
|
|
23
23
|
export { Label, type LabelProps } from './controls/primitives/label';
|
|
24
24
|
export { RadioLabel, type RadioLabelProps } from './controls/primitives/radio-label';
|
|
25
25
|
export { Status, type StatusProps } from './controls/primitives/status';
|
|
26
|
+
export { Accordion, type AccordionProps } from './components/accordion';
|
|
26
27
|
export { AccordionTable, type AccordionTableProps } from './components/accordion-table/accordion-table.component';
|
|
27
28
|
export { BottomBar } from './components/bottom-bar';
|
|
28
29
|
export { Certifications, type CertificationsProps } from './components/certifications';
|
package/dist/main.js
CHANGED
|
@@ -4,14 +4,14 @@ import { FadeSlide as f } from "./animations/fade-slide/fade-slide.component.js"
|
|
|
4
4
|
import { Rotate as n } from "./animations/rotate/rotate.component.js";
|
|
5
5
|
import "usehooks-ts";
|
|
6
6
|
import { Button as d } from "./controls/buttons/button/button.component.js";
|
|
7
|
-
import { ButtonCard as
|
|
7
|
+
import { ButtonCard as l } from "./controls/buttons/button-card/button-card.component.js";
|
|
8
8
|
import { ButtonRadio as u } from "./controls/buttons/button-radio/button-radio.component.js";
|
|
9
9
|
import { ButtonText as B } from "./controls/buttons/button-text/button-text.component.js";
|
|
10
10
|
import { CardImage as F } from "./controls/interactives/card-image/card-image.component.js";
|
|
11
11
|
import { CardText as T } from "./controls/interactives/card-text/card-text.component.js";
|
|
12
12
|
import { Checkbox as S } from "./controls/interactives/checkbox/checkbox.component.js";
|
|
13
|
-
import { Dropdown as
|
|
14
|
-
import { Input as
|
|
13
|
+
import { Dropdown as I } from "./controls/interactives/dropdown/dropdown.component.js";
|
|
14
|
+
import { Input as R } from "./controls/interactives/input/input.component.js";
|
|
15
15
|
import { Radio as M } from "./controls/interactives/radio/radio.component.js";
|
|
16
16
|
import { TextArea as w } from "./controls/interactives/text-area/text-area.component.js";
|
|
17
17
|
import { TextField as E } from "./controls/interactives/text-field/text-field.component.js";
|
|
@@ -23,86 +23,88 @@ import { HiddenInput as z } from "./controls/primitives/hidden-input/hidden-inpu
|
|
|
23
23
|
import { Label as K } from "./controls/primitives/label/label.component.js";
|
|
24
24
|
import { RadioLabel as Q } from "./controls/primitives/radio-label/radio-label.component.js";
|
|
25
25
|
import { Status as X } from "./controls/primitives/status/status.component.js";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
26
|
+
import { Accordion as Z } from "./components/accordion/accordion.component.js";
|
|
27
|
+
import { AccordionTable as $ } from "./components/accordion-table/accordion-table.component.js";
|
|
28
|
+
import { BottomBar as ro } from "./components/bottom-bar/bottom-bar.component.js";
|
|
29
|
+
import { Certifications as to } from "./components/certifications/certifications.component.js";
|
|
30
|
+
import { DataProtectedLabel as mo } from "./components/data-protected-label/data-protected-label.component.js";
|
|
31
|
+
import { Dialog as fo } from "./components/dialog/dialog.component.js";
|
|
32
|
+
import { DialogArticle as no } from "./components/dialog-article/dialog-article.component.js";
|
|
33
|
+
import { Expenses as co } from "./components/expenses/expenses.component.js";
|
|
34
|
+
import { Footer as so } from "./components/footer/footer.component.js";
|
|
35
|
+
import { FormRow as go } from "./components/form-row/form-row.component.js";
|
|
36
|
+
import { Header as Co } from "./components/header/header.component.js";
|
|
37
|
+
import { InfoPanel as Lo } from "./components/info-panel/info-panel.component.js";
|
|
38
|
+
import { Information as bo } from "./components/information/information.component.js";
|
|
39
|
+
import { Layout as Ao } from "./components/layout/layout.component.js";
|
|
40
|
+
import { Line as Po } from "./components/line/line.component.js";
|
|
41
|
+
import { Loader as Do } from "./components/loader/loader.component.js";
|
|
42
|
+
import { MainAttachment as ho } from "./components/main-attachment/main-attachment.component.js";
|
|
43
|
+
import { Message as yo } from "./components/message/message.component.js";
|
|
44
|
+
import { MessageBlock as ko } from "./components/message-block/message-block.component.js";
|
|
45
|
+
import { NotFound as Ho } from "./components/not-found/not-found.component.js";
|
|
46
|
+
import { Payment as No } from "./components/payment/payment.component.js";
|
|
47
|
+
import { PriceLine as Wo } from "./components/price-line/price-line.component.js";
|
|
48
|
+
import { Sidebar as qo } from "./components/sidebar/sidebar.component.js";
|
|
49
|
+
import { Signature as Jo } from "./components/signature/signature.component.js";
|
|
50
|
+
import { Svg as Oo } from "./utils/svg/svg.component.js";
|
|
51
|
+
import { Text as Vo } from "./components/text/text.component.js";
|
|
52
|
+
import { UserPanel as Yo } from "./components/user-panel/user-panel.component.js";
|
|
53
|
+
import { Warranty as _o } from "./components/warranty/warranty.component.js";
|
|
54
|
+
import { clsx as or, convertToEuro as rr } from "./utils/functions/functions.util.js";
|
|
54
55
|
import './assets/main-DZmlIs7j.css';export {
|
|
55
|
-
Z as
|
|
56
|
-
$ as
|
|
56
|
+
Z as Accordion,
|
|
57
|
+
$ as AccordionTable,
|
|
58
|
+
ro as BottomBar,
|
|
57
59
|
v as Box,
|
|
58
60
|
d as Button,
|
|
59
|
-
|
|
61
|
+
l as ButtonCard,
|
|
60
62
|
u as ButtonRadio,
|
|
61
63
|
B as ButtonText,
|
|
62
64
|
G as Caption,
|
|
63
65
|
F as CardImage,
|
|
64
66
|
T as CardText,
|
|
65
|
-
|
|
67
|
+
to as Certifications,
|
|
66
68
|
S as Checkbox,
|
|
67
69
|
U as Choice,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
mo as DataProtectedLabel,
|
|
71
|
+
fo as Dialog,
|
|
72
|
+
no as DialogArticle,
|
|
73
|
+
I as Dropdown,
|
|
72
74
|
j as ErrorMessage,
|
|
73
|
-
|
|
75
|
+
co as Expenses,
|
|
74
76
|
t as FadeGrow,
|
|
75
77
|
m as FadeScale,
|
|
76
78
|
f as FadeSlide,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
so as Footer,
|
|
80
|
+
go as FormRow,
|
|
81
|
+
Co as Header,
|
|
80
82
|
z as HiddenInput,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
Lo as InfoPanel,
|
|
84
|
+
bo as Information,
|
|
85
|
+
R as Input,
|
|
84
86
|
K as Label,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
Ao as Layout,
|
|
88
|
+
Po as Line,
|
|
89
|
+
Do as Loader,
|
|
90
|
+
ho as MainAttachment,
|
|
91
|
+
yo as Message,
|
|
92
|
+
ko as MessageBlock,
|
|
93
|
+
Ho as NotFound,
|
|
94
|
+
No as Payment,
|
|
95
|
+
Wo as PriceLine,
|
|
94
96
|
M as Radio,
|
|
95
97
|
Q as RadioLabel,
|
|
96
98
|
n as Rotate,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
qo as Sidebar,
|
|
100
|
+
Jo as Signature,
|
|
99
101
|
X as Status,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
Oo as Svg,
|
|
103
|
+
Vo as Text,
|
|
102
104
|
w as TextArea,
|
|
103
105
|
E as TextField,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
Yo as UserPanel,
|
|
107
|
+
_o as Warranty,
|
|
108
|
+
or as clsx,
|
|
109
|
+
rr as convertToEuro
|
|
108
110
|
};
|