@arthurzakharov/ui-kit 1.2.8 → 1.2.9
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/loader-C0f3AvRU.css +1 -0
- package/dist/assets/user-panel-BJB6pJ70.css +1 -0
- package/dist/components/loader/loader.component.d.ts +2 -1
- package/dist/components/loader/loader.component.js +66 -35
- package/dist/components/user-panel/index.d.ts +1 -0
- package/dist/components/user-panel/index.js +4 -0
- package/dist/components/user-panel/user-panel.component.d.ts +6 -5
- package/dist/components/user-panel/user-panel.component.js +27 -27
- package/dist/main.d.ts +1 -2
- package/dist/main.js +34 -36
- package/dist/utils/functions/functions.util.d.ts +7 -0
- package/dist/utils/functions/functions.util.js +9 -5
- package/dist/utils/functions/index.js +4 -3
- package/package.json +1 -1
- package/dist/assets/loader-BBn4lDjH.css +0 -1
- package/dist/assets/loading-block-al0S6J3z.css +0 -1
- package/dist/assets/user-panel-BEeXLR6v.css +0 -1
- package/dist/components/loading-block/loading-block.component.d.ts +0 -1
- package/dist/components/loading-block/loading-block.component.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Loader_11mao_1{display:inline-flex}._Padding_11mao_5{display:flex;justify-content:center}._XXS_11mao_10{padding:32px}._XS_11mao_14{padding:64px}._SM_11mao_18{padding:96px}._MD_11mao_22{padding:128px}._LG_11mao_26{padding:160px}._XL_11mao_30{padding:192px}._XXL_11mao_34{padding:224px}._XXXL_11mao_38{padding:256px}._Icon_11mao_42{animation:_spinPulse_11mao_1 2s linear infinite;transform-origin:center}._White_11mao_47{stroke:#fff}._Primary_11mao_51{stroke:var(--rm-ui-color-accent-primary)}._Secondary_11mao_55{stroke:var(--rm-ui-color-accent-secondary)}._Icon_11mao_42>path{animation:_dash_11mao_1 2s linear infinite}@keyframes _spinPulse_11mao_1{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.25)}to{transform:rotate(360deg) scale(1)}}@keyframes _dash_11mao_1{0%{stroke-opacity:1}50%{stroke-opacity:.5}to{stroke-opacity:1}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._User_12b2p_1{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--rm-ui-padding-sm);font-weight:var(--rm-ui-font-weight-light);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-secondary)}._Head_12b2p_13{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;font-weight:var(--rm-ui-font-weight-medium);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Info_12b2p_25{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start}
|
|
@@ -3,6 +3,7 @@ type LoaderColor = 'white' | 'primary' | 'secondary';
|
|
|
3
3
|
export interface LoaderProps extends BaseProps {
|
|
4
4
|
size: Size;
|
|
5
5
|
color: LoaderColor;
|
|
6
|
+
padding?: Size;
|
|
6
7
|
}
|
|
7
|
-
export declare const Loader: ({ size, color, className }: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Loader: ({ size, color, padding, className }: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,41 +1,72 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Loader as
|
|
4
|
-
import '../../assets/loader-
|
|
1
|
+
import { jsxs as t, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import { Loader as X } from "lucide-react";
|
|
4
|
+
import '../../assets/loader-C0f3AvRU.css';const n = "_Loader_11mao_1", m = "_Padding_11mao_5", L = "_XXS_11mao_10", x = "_XS_11mao_14", i = "_SM_11mao_18", S = "_MD_11mao_22", d = "_LG_11mao_26", l = "_XL_11mao_30", y = "_XXL_11mao_34", u = "_XXXL_11mao_38", M = "_Icon_11mao_42", P = "_White_11mao_47", h = "_Primary_11mao_51", D = "_Secondary_11mao_55", o = {
|
|
5
5
|
Loader: n,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
Padding: m,
|
|
7
|
+
XXS: L,
|
|
8
|
+
XS: x,
|
|
9
|
+
SM: i,
|
|
10
|
+
MD: S,
|
|
11
|
+
LG: d,
|
|
12
|
+
XL: l,
|
|
13
|
+
XXL: y,
|
|
14
|
+
XXXL: u,
|
|
15
|
+
Icon: M,
|
|
16
|
+
White: P,
|
|
17
|
+
Primary: h,
|
|
18
|
+
Secondary: D
|
|
19
|
+
}, f = ({ size: e, color: r, padding: a, className: _ = "" }) => /* @__PURE__ */ t(
|
|
20
|
+
"div",
|
|
11
21
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
"data-testid": "loader",
|
|
23
|
+
className: s(o.Loader, _, {
|
|
24
|
+
[o.Padding]: !!a,
|
|
25
|
+
[o.XXS]: a === "xxs",
|
|
26
|
+
[o.XS]: a === "xs",
|
|
27
|
+
[o.SM]: a === "sm",
|
|
28
|
+
[o.MD]: a === "md",
|
|
29
|
+
[o.LG]: a === "lg",
|
|
30
|
+
[o.XL]: a === "xl",
|
|
31
|
+
[o.XXL]: a === "xxl",
|
|
32
|
+
[o.XXXL]: a === "xxxl"
|
|
33
|
+
}),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ c(
|
|
36
|
+
X,
|
|
37
|
+
{
|
|
38
|
+
"data-testid": "loader-icon",
|
|
39
|
+
size: (() => {
|
|
40
|
+
switch (e) {
|
|
41
|
+
case "xxs":
|
|
42
|
+
return 16;
|
|
43
|
+
case "xs":
|
|
44
|
+
return 24;
|
|
45
|
+
case "sm":
|
|
46
|
+
return 32;
|
|
47
|
+
case "md":
|
|
48
|
+
return 40;
|
|
49
|
+
case "lg":
|
|
50
|
+
return 48;
|
|
51
|
+
case "xl":
|
|
52
|
+
return 56;
|
|
53
|
+
case "xxl":
|
|
54
|
+
return 64;
|
|
55
|
+
case "xxxl":
|
|
56
|
+
return 72;
|
|
57
|
+
}
|
|
58
|
+
})(),
|
|
59
|
+
className: s(o.Icon, {
|
|
60
|
+
[o.White]: r === "white",
|
|
61
|
+
[o.Primary]: r === "primary",
|
|
62
|
+
[o.Secondary]: r === "secondary"
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
" "
|
|
67
|
+
]
|
|
37
68
|
}
|
|
38
69
|
);
|
|
39
70
|
export {
|
|
40
|
-
|
|
71
|
+
f as Loader
|
|
41
72
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UserPanel, type UserPanelProps } from './user-panel.component';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { BaseProps } from '../../utils/types';
|
|
2
|
+
export interface UserPanelProps extends BaseProps {
|
|
3
|
+
title: string;
|
|
4
|
+
button: string;
|
|
5
|
+
data: string[];
|
|
5
6
|
onClick: () => void;
|
|
6
7
|
}
|
|
7
|
-
export declare const UserPanel: (
|
|
8
|
+
export declare const UserPanel: ({ title, button, data, onClick, className }: UserPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Pencil as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Pencil as d } from "lucide-react";
|
|
3
|
+
import m from "clsx";
|
|
4
|
+
import { C as p } from "../../control.component-Cq46ev8T.js";
|
|
5
|
+
import '../../assets/user-panel-BJB6pJ70.css';const f = "_Head_12b2p_13", u = "_Info_12b2p_25", r = {
|
|
6
|
+
Head: f,
|
|
7
|
+
Info: u
|
|
8
|
+
}, I = ({ title: n, button: o, data: i, onClick: s, className: a = "" }) => /* @__PURE__ */ t("div", { "data-testid": "user-panel", className: m(r.UserPanel, a), children: [
|
|
9
|
+
/* @__PURE__ */ t("div", { className: r.Head, children: [
|
|
10
|
+
/* @__PURE__ */ e("span", { "data-testid": "user-panel-title", children: n }),
|
|
11
|
+
/* @__PURE__ */ e(
|
|
12
|
+
p.ButtonText,
|
|
13
|
+
{
|
|
14
|
+
preventDefault: !0,
|
|
15
|
+
blurAfterClick: !0,
|
|
16
|
+
icon: /* @__PURE__ */ e(d, {}),
|
|
17
|
+
iconPosition: "right",
|
|
18
|
+
size: "md",
|
|
19
|
+
color: "primary",
|
|
20
|
+
onClick: s,
|
|
21
|
+
children: o
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ e("ul", { className: r.Info, children: i.map((l, c) => /* @__PURE__ */ e("li", { children: l }, c)) })
|
|
26
|
+
] });
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
I as UserPanel
|
|
29
29
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export { Information, type InformationProps } from './components/information/inf
|
|
|
16
16
|
export { Layout, type LayoutProps } from './components/layout/layout.component';
|
|
17
17
|
export { Line } from './components/line/line.component';
|
|
18
18
|
export { Loader, type LoaderProps } from './components/loader';
|
|
19
|
-
export { LoadingBlock } from './components/loading-block/loading-block.component';
|
|
20
19
|
export { MainAttachment, type MainAttachmentProps } from './components/main-attachment/main-attachment.component';
|
|
21
20
|
export { Message, type MessageProps } from './components/message';
|
|
22
21
|
export { MessageBlock, type MessageBlockProps } from './components/message-block/message-block.component';
|
|
@@ -26,5 +25,5 @@ export { Sidebar, type SidebarProps } from './components/sidebar/sidebar.compone
|
|
|
26
25
|
export { Signature, type SignatureProps, type SignatureMode } from './components/signature/signature.component';
|
|
27
26
|
export { Svg, type SvgProps } from './components/svg/svg.component';
|
|
28
27
|
export { Text } from './components/text/text.component';
|
|
29
|
-
export { UserPanel, type UserPanelProps } from './components/user-panel
|
|
28
|
+
export { UserPanel, type UserPanelProps } from './components/user-panel';
|
|
30
29
|
export { Warranty, type WarrantyProps } from './components/warranty';
|
package/dist/main.js
CHANGED
|
@@ -5,29 +5,28 @@ import { Certifications as a } from "./components/certifications/certifications.
|
|
|
5
5
|
import { C as i } from "./control.component-Cq46ev8T.js";
|
|
6
6
|
import { DataProtectedLabel as s } from "./components/data-protected-label/data-protected-label.component.js";
|
|
7
7
|
import { Dialog as d } from "./components/dialog/dialog.component.js";
|
|
8
|
-
import { DialogArticle as
|
|
9
|
-
import { Expenses as
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { Footer as
|
|
8
|
+
import { DialogArticle as A } from "./components/dialog-article/dialog-article.component.js";
|
|
9
|
+
import { Expenses as L } from "./components/expenses/expenses.component.js";
|
|
10
|
+
import { Flex as b } from "./components/flex/flex.component.js";
|
|
11
|
+
import { Footer as y } from "./components/footer/footer.component.js";
|
|
12
12
|
import { FormRow as C } from "./components/form-row/form-row.component.js";
|
|
13
13
|
import { Header as M } from "./components/header/header.component.js";
|
|
14
|
-
import { InfoPanel as
|
|
15
|
-
import { Information as
|
|
14
|
+
import { InfoPanel as I } from "./components/info-panel/info-panel.component.js";
|
|
15
|
+
import { Information as h } from "./components/information/information.component.js";
|
|
16
16
|
import { Layout as v } from "./components/layout/layout.component.js";
|
|
17
17
|
import { Line as E } from "./components/line/line.component.js";
|
|
18
18
|
import { Loader as N } from "./components/loader/loader.component.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { Warranty as xo } from "./components/warranty/warranty.component.js";
|
|
19
|
+
import { MainAttachment as U } from "./components/main-attachment/main-attachment.component.js";
|
|
20
|
+
import { Message as j } from "./components/message/message.component.js";
|
|
21
|
+
import { MessageBlock as z } from "./components/message-block/message-block.component.js";
|
|
22
|
+
import { NotFound as J } from "./components/not-found/not-found.component.js";
|
|
23
|
+
import { Payment as O } from "./components/payment/payment.component.js";
|
|
24
|
+
import { Sidebar as V } from "./components/sidebar/sidebar.component.js";
|
|
25
|
+
import { Signature as Y } from "./components/signature/signature.component.js";
|
|
26
|
+
import { Svg as _ } from "./components/svg/svg.component.js";
|
|
27
|
+
import { Text as oo } from "./components/text/text.component.js";
|
|
28
|
+
import { UserPanel as eo } from "./components/user-panel/user-panel.component.js";
|
|
29
|
+
import { Warranty as mo } from "./components/warranty/warranty.component.js";
|
|
31
30
|
import './assets/main-BK_1RcKG.css';export {
|
|
32
31
|
e as AccordionTable,
|
|
33
32
|
m as Animation,
|
|
@@ -36,27 +35,26 @@ import './assets/main-BK_1RcKG.css';export {
|
|
|
36
35
|
i as Control,
|
|
37
36
|
s as DataProtectedLabel,
|
|
38
37
|
d as Dialog,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
A as DialogArticle,
|
|
39
|
+
L as Expenses,
|
|
40
|
+
b as Flex,
|
|
41
|
+
y as Footer,
|
|
43
42
|
C as FormRow,
|
|
44
43
|
M as Header,
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
I as InfoPanel,
|
|
45
|
+
h as Information,
|
|
47
46
|
v as Layout,
|
|
48
47
|
E as Line,
|
|
49
48
|
N as Loader,
|
|
50
|
-
U as
|
|
51
|
-
j as
|
|
52
|
-
z as
|
|
53
|
-
J as
|
|
54
|
-
O as
|
|
55
|
-
V as
|
|
56
|
-
Y as
|
|
57
|
-
_ as
|
|
58
|
-
oo as
|
|
59
|
-
eo as
|
|
60
|
-
mo as
|
|
61
|
-
xo as Warranty
|
|
49
|
+
U as MainAttachment,
|
|
50
|
+
j as Message,
|
|
51
|
+
z as MessageBlock,
|
|
52
|
+
J as NotFound,
|
|
53
|
+
O as Payment,
|
|
54
|
+
V as Sidebar,
|
|
55
|
+
Y as Signature,
|
|
56
|
+
_ as Svg,
|
|
57
|
+
oo as Text,
|
|
58
|
+
eo as UserPanel,
|
|
59
|
+
mo as Warranty
|
|
62
60
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Type guard: checks whether value is a string
|
|
3
4
|
*/
|
|
@@ -12,3 +13,9 @@ export declare function containsHtml(value: string): boolean;
|
|
|
12
13
|
* Checks if unknown value is a string containing HTML markup
|
|
13
14
|
*/
|
|
14
15
|
export declare function isHtmlString(value: unknown): value is string;
|
|
16
|
+
type ControlAction = 'prevent' | 'stop' | 'blur';
|
|
17
|
+
/**
|
|
18
|
+
* A higher-order function to wrap event handlers with common event control logic.
|
|
19
|
+
*/
|
|
20
|
+
export declare const withControl: <E extends SyntheticEvent<HTMLElement>>(handler: (e: E) => void, ...actions: ControlAction[]) => (e: E) => void;
|
|
21
|
+
export {};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
function
|
|
1
|
+
function e(t) {
|
|
2
2
|
return typeof t == "string";
|
|
3
3
|
}
|
|
4
4
|
function i(t) {
|
|
5
5
|
return /<\/?[a-z][\s\S]*>/i.test(t);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function o(t) {
|
|
8
|
+
return e(t) && i(t);
|
|
9
9
|
}
|
|
10
|
+
const u = (t, ...n) => (r) => {
|
|
11
|
+
n.includes("prevent") && r.preventDefault(), n.includes("stop") && r.stopPropagation(), n.includes("blur") && r.currentTarget.blur(), t(r);
|
|
12
|
+
};
|
|
10
13
|
export {
|
|
11
14
|
i as containsHtml,
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
o as isHtmlString,
|
|
16
|
+
e as isString,
|
|
17
|
+
u as withControl
|
|
14
18
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { containsHtml as n, isHtmlString as
|
|
1
|
+
import { containsHtml as n, isHtmlString as o, isString as r, withControl as l } from "./functions.util.js";
|
|
2
2
|
export {
|
|
3
3
|
n as containsHtml,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
o as isHtmlString,
|
|
5
|
+
r as isString,
|
|
6
|
+
l as withControl
|
|
6
7
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._Loader_2orye_1{animation:_spinPulse_2orye_1 2s linear infinite;transform-origin:center}._White_2orye_6{stroke:#fff}._Primary_2orye_10{stroke:var(--rm-ui-color-accent-primary)}._Secondary_2orye_14{stroke:var(--rm-ui-color-accent-secondary)}._Loader_2orye_1>path{animation:_dash_2orye_1 2s linear infinite}@keyframes _spinPulse_2orye_1{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.25)}to{transform:rotate(360deg) scale(1)}}@keyframes _dash_2orye_1{0%{stroke-opacity:1}50%{stroke-opacity:.5}to{stroke-opacity:1}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._LoadingBlock_1h5nh_1{height:var(--rm-ui-loading-screen-height);display:flex;align-items:center;justify-content:center;background-color:transparent}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._User_1kveo_1{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--rm-ui-padding-sm)}._UserHead_1kveo_9{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}._UserTitle_1kveo_17{font-weight:var(--rm-ui-font-weight-medium);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._UserButton_1kveo_24{padding:0;border:none;background-color:transparent;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:var(--rm-ui-padding-xs)}._UserButton_1kveo_24:focus-visible{outline-offset:2px;outline-color:var(--rm-ui-color-focus)}._UserButtonText_1kveo_41{font-weight:var(--rm-ui-font-weight-medium);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._UserButtonIcon_1kveo_48{width:24px;height:24px;stroke-width:2px;stroke:var(--rm-ui-color-text-primary)}._UserInfo_1kveo_55{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start}._UserInfoRaw_1kveo_63{font-weight:var(--rm-ui-font-weight-light);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-secondary)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LoadingBlock: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Loader as c } from "../loader/loader.component.js";
|
|
3
|
-
import '../../assets/loading-block-al0S6J3z.css';const n = "_LoadingBlock_1h5nh_1", r = {
|
|
4
|
-
LoadingBlock: n
|
|
5
|
-
}, l = () => /* @__PURE__ */ o("div", { className: r.LoadingBlock, children: /* @__PURE__ */ o(c, { size: "lg", color: "primary" }) });
|
|
6
|
-
export {
|
|
7
|
-
l as LoadingBlock
|
|
8
|
-
};
|