@arthurzakharov/ui-kit 1.5.0 → 1.5.1
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/bottom-bar-B35eeXqR.css +1 -0
- package/dist/assets/signature-EuXLu4YT.css +1 -0
- package/dist/components/bottom-bar/bottom-bar.component.d.ts +13 -10
- package/dist/components/bottom-bar/bottom-bar.component.js +59 -45
- package/dist/components/bottom-bar/index.d.ts +1 -0
- package/dist/components/bottom-bar/index.js +4 -0
- package/dist/components/signature/signature.component.js +539 -533
- package/dist/main.d.ts +1 -1
- package/package.json +1 -1
- package/dist/assets/bottom-bar-DDgm0BQh.css +0 -1
- package/dist/assets/flex-BpQNkmJA.css +0 -1
- package/dist/assets/signature-qHi3xUi4.css +0 -1
- package/dist/components/flex/flex.component.d.ts +0 -311
- package/dist/components/flex/flex.component.js +0 -55
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._BottomBar_xd6ok_1{background-color:var(--rm-ui-content-bg);flex-direction:column;justify-content:stretch}._Fixed_xd6ok_7{position:fixed;z-index:8000000;bottom:0;left:0;width:100%;padding:var(--rm-ui-padding-md) var(--rm-ui-padding-xl) var(--rm-ui-padding-lg)}._Static_xd6ok_16{position:static}._TopBlock_xd6ok_20{display:flex}._LeftBlock_xd6ok_24{flex-grow:1;display:flex;flex-direction:column;align-items:flex-start}._RightBlock_xd6ok_31{flex-grow:1;display:flex;flex-direction:column;align-items:flex-end}._Message_xd6ok_38{margin-top:var(--rm-ui-padding-sm);margin-bottom:var(--rm-ui-padding-md)}._Button_xd6ok_43{margin-top:var(--rm-ui-padding-md)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._Signature_qgimg_1{background-color:transparent}._SignatureMain_qgimg_5{--title-height: 40px;overflow:hidden;position:relative;padding:calc(var(--rm-ui-padding-md) + var(--title-height)) var(--rm-ui-padding-md) calc(var(--rm-ui-padding-md) + var(--title-height));border:1px solid var(--rm-ui-grey-300);border-radius:var(--rm-ui-border-radius-sm)}._SignatureMainAuto_qgimg_15{padding:calc(var(--rm-ui-padding-md) + var(--title-height)) var(--rm-ui-padding-md) var(--rm-ui-padding-md)}._SignatureMainManual_qgimg_19{padding:calc(var(--rm-ui-padding-md) + var(--title-height)) var(--rm-ui-padding-md) calc(var(--rm-ui-padding-md) + var(--title-height))}._Buttons_qgimg_24{margin-top:var(--rm-ui-padding-md);display:flex;align-items:center;justify-content:space-between;gap:var(--rm-ui-padding-md)}._Header_qgimg_34{position:absolute;z-index:1;top:var(--rm-ui-padding-md);left:var(--rm-ui-padding-md);right:var(--rm-ui-padding-md);display:flex}._HeaderManualDraw_qgimg_43{justify-content:flex-end}._HeaderNotManualDraw_qgimg_47{justify-content:center}._Content_qgimg_51{display:flex;align-items:flex-end;justify-content:center}._AutoContent_qgimg_57{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}._SignatureHeaderReset_qgimg_64{position:relative;z-index:1}._SignatureManualPanel_qgimg_71>canvas,._SignatureManualPanel_qgimg_71>img{position:absolute;top:0;left:0}._SignatureManualPanelPlaceholder_qgimg_78{height:94px}._SignatureManualPanelButton_qgimg_82{position:absolute;z-index:1;bottom:var(--rm-ui-padding-md);left:var(--rm-ui-padding-md);right:var(--rm-ui-padding-md);display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center}._SignatureAutoPanelImage_qgimg_97{height:46px;max-width:100%;display:block}._SignatureAutoPanelLoader_qgimg_103{height:142px;display:inline-flex;align-items:center;padding:var(--rm-ui-padding-xs)}._SignatureAutoPanelNoteIcon_qgimg_110{stroke:var(--rm-ui-color-success)}._SignatureAutoPanelButton_qgimg_114{margin:8px 0}._SignatureAutoLabel_qgimg_118{margin:var(--rm-ui-padding-xs) 0;display:flex;align-items:center;justify-content:center;gap:var(--rm-ui-padding-xxs)}._SignatureErrorLoading_qgimg_127{height:86px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--rm-ui-padding-xs)}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Base, FontColor, FontSize, FontWeight } from '../../utils/types';
|
|
2
|
+
type BottomBarInfoItem<T> = {
|
|
3
|
+
lined?: boolean;
|
|
4
|
+
weight?: FontWeight;
|
|
5
|
+
size?: FontSize;
|
|
6
|
+
color?: FontColor;
|
|
3
7
|
text: T;
|
|
4
|
-
}
|
|
5
|
-
|
|
8
|
+
};
|
|
9
|
+
type BottomBarButton = {
|
|
6
10
|
text: string;
|
|
7
11
|
onClick: () => void;
|
|
8
12
|
loading?: boolean;
|
|
9
13
|
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
14
|
+
};
|
|
15
|
+
type BottomBarInfo = {
|
|
12
16
|
topLeft?: BottomBarInfoItem<string> | string;
|
|
13
17
|
topRight?: BottomBarInfoItem<string> | string;
|
|
14
18
|
bottomLeft?: BottomBarInfoItem<string> | string;
|
|
15
19
|
bottomRight?: BottomBarInfoItem<string> | string;
|
|
16
|
-
}
|
|
17
|
-
|
|
20
|
+
};
|
|
21
|
+
interface BottomBarProps extends Base {
|
|
18
22
|
button: BottomBarButton;
|
|
19
23
|
info: BottomBarInfo;
|
|
20
24
|
message?: string;
|
|
21
|
-
className?: string;
|
|
22
25
|
staticFrom?: number;
|
|
23
26
|
}
|
|
24
|
-
export declare const BottomBar: (
|
|
27
|
+
export declare const BottomBar: ({ button, info, message, className, staticFrom, ...base }: BottomBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
28
|
export {};
|
|
@@ -1,79 +1,93 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import { useResizeObserver as
|
|
5
|
-
import { ControlButton as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import '../../assets/bottom-bar-
|
|
9
|
-
BottomBar:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useEffect as B, useMemo as b } from "react";
|
|
3
|
+
import _ from "clsx";
|
|
4
|
+
import { useResizeObserver as k, useWindowSize as u } from "usehooks-ts";
|
|
5
|
+
import { ControlButton as y } from "../../controls/control-button/control-button.component.js";
|
|
6
|
+
import { Text as c } from "../text/text.component.js";
|
|
7
|
+
import { baseProps as g } from "../../utils/functions/functions.util.js";
|
|
8
|
+
import '../../assets/bottom-bar-B35eeXqR.css';const f = "_BottomBar_xd6ok_1", w = "_Fixed_xd6ok_7", R = "_Static_xd6ok_16", z = "_TopBlock_xd6ok_20", L = "_LeftBlock_xd6ok_24", N = "_RightBlock_xd6ok_31", v = "_Message_xd6ok_38", M = "_Button_xd6ok_43", r = {
|
|
9
|
+
BottomBar: f,
|
|
10
|
+
Fixed: w,
|
|
11
|
+
Static: R,
|
|
12
|
+
TopBlock: z,
|
|
13
|
+
LeftBlock: L,
|
|
14
|
+
RightBlock: N,
|
|
15
|
+
Message: v,
|
|
16
|
+
Button: M
|
|
17
|
+
}, s = (o, t) => o ? typeof o == "string" ? {
|
|
13
18
|
text: o,
|
|
14
19
|
lined: !1,
|
|
15
20
|
weight: t.weight || "regular",
|
|
16
21
|
size: t.size || "body",
|
|
17
22
|
color: t.color || "text-primary"
|
|
18
23
|
} : {
|
|
19
|
-
text: o.text || /* @__PURE__ */
|
|
24
|
+
text: o.text || /* @__PURE__ */ i("wbr", {}),
|
|
20
25
|
lined: o.lined,
|
|
21
26
|
weight: o.weight || t.weight || "regular",
|
|
22
27
|
size: o.size || t.size || "body",
|
|
23
28
|
color: o.color || t.color || "text-primary"
|
|
24
29
|
} : {
|
|
25
|
-
text: /* @__PURE__ */
|
|
30
|
+
text: /* @__PURE__ */ i("wbr", {}),
|
|
26
31
|
lined: !1,
|
|
27
32
|
weight: t.weight || "regular",
|
|
28
33
|
size: t.size || "body",
|
|
29
34
|
color: t.color || "text-primary"
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
}, $ = ({
|
|
36
|
+
button: o,
|
|
37
|
+
info: t,
|
|
38
|
+
message: a = "",
|
|
39
|
+
className: S = "",
|
|
40
|
+
staticFrom: h = 768,
|
|
41
|
+
...m
|
|
42
|
+
}) => {
|
|
43
|
+
const d = p(null), { height: n } = k({
|
|
44
|
+
ref: d,
|
|
33
45
|
box: "border-box"
|
|
34
|
-
}), { width:
|
|
35
|
-
|
|
46
|
+
}), { width: x } = u({ initializeWithValue: !0, debounceDelay: 150 });
|
|
47
|
+
B(() => (n ? document.body.style.marginBottom = `${Math.round(n)}px` : document.body.style.removeProperty("margin-bottom"), () => {
|
|
36
48
|
document.body.style.removeProperty("margin-bottom");
|
|
37
|
-
}), [
|
|
38
|
-
const
|
|
39
|
-
topLeft:
|
|
40
|
-
topRight:
|
|
41
|
-
bottomLeft:
|
|
42
|
-
bottomRight:
|
|
43
|
-
}), [
|
|
44
|
-
return /* @__PURE__ */
|
|
49
|
+
}), [n]);
|
|
50
|
+
const e = b(() => ({
|
|
51
|
+
topLeft: s(t.topLeft, { weight: "medium", color: "text-primary" }),
|
|
52
|
+
topRight: s(t.topRight, { weight: "medium", color: "text-primary" }),
|
|
53
|
+
bottomLeft: s(t.bottomLeft, { weight: "regular", color: "text-secondary" }),
|
|
54
|
+
bottomRight: s(t.bottomRight, { weight: "regular", color: "text-secondary" })
|
|
55
|
+
}), [t]);
|
|
56
|
+
return /* @__PURE__ */ l(
|
|
45
57
|
"div",
|
|
46
58
|
{
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
"data-testid": g(m, "data-testid", "bottom-bar"),
|
|
60
|
+
ref: d,
|
|
61
|
+
className: _(r.BottomBar, g(m, "className"), x >= h ? r.Static : r.Fixed),
|
|
49
62
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ l("div", { className: r.TopBlock, children: [
|
|
64
|
+
/* @__PURE__ */ l("div", { className: r.LeftBlock, children: [
|
|
65
|
+
/* @__PURE__ */ i(c, { ...e.topLeft, children: e.topLeft.text }),
|
|
66
|
+
/* @__PURE__ */ i(c, { ...e.bottomLeft, children: e.bottomLeft.text })
|
|
54
67
|
] }),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ l("div", { className: r.RightBlock, children: [
|
|
69
|
+
/* @__PURE__ */ i(c, { ...e.topRight, children: e.topRight.text }),
|
|
70
|
+
/* @__PURE__ */ i(c, { ...e.bottomRight, children: e.bottomRight.text })
|
|
58
71
|
] })
|
|
59
72
|
] }),
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
73
|
+
a && /* @__PURE__ */ i(c, { color: "text-secondary", align: "center", className: r.Message, children: a }),
|
|
74
|
+
/* @__PURE__ */ i(
|
|
75
|
+
y,
|
|
63
76
|
{
|
|
64
77
|
fullWidth: !0,
|
|
65
78
|
color: "primary",
|
|
66
79
|
size: "lg",
|
|
67
|
-
loading:
|
|
68
|
-
disabled:
|
|
69
|
-
|
|
70
|
-
|
|
80
|
+
loading: o.loading,
|
|
81
|
+
disabled: o.disabled,
|
|
82
|
+
className: r.Button,
|
|
83
|
+
onClick: o.onClick,
|
|
84
|
+
children: o.text
|
|
71
85
|
}
|
|
72
|
-
)
|
|
86
|
+
)
|
|
73
87
|
]
|
|
74
88
|
}
|
|
75
89
|
);
|
|
76
90
|
};
|
|
77
91
|
export {
|
|
78
|
-
|
|
92
|
+
$ as BottomBar
|
|
79
93
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BottomBar } from './bottom-bar.component';
|