@arthurzakharov/ui-kit 1.5.0 → 1.5.2

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
+ ._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)}
@@ -0,0 +1 @@
1
+ ._User_svj2j_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_svj2j_13{margin-bottom:var(--rm-ui-padding-xs);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_svj2j_26{display:inline-flex;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start}
@@ -1,25 +1,28 @@
1
- import { TagProps } from '../text/text.component';
2
- interface BottomBarInfoItem<T> extends Pick<TagProps, 'lined' | 'weight' | 'size' | 'color'> {
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
- interface BottomBarButton {
8
+ };
9
+ type BottomBarButton = {
6
10
  text: string;
7
11
  onClick: () => void;
8
12
  loading?: boolean;
9
13
  disabled?: boolean;
10
- }
11
- interface BottomBarInfo {
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
- export interface BottomBarProps {
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: (props: BottomBarProps) => import("react/jsx-runtime").JSX.Element;
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 c, jsx as e } from "react/jsx-runtime";
2
- import { useRef as b, useEffect as p, useMemo as u } from "react";
3
- import y from "clsx";
4
- import { useResizeObserver as f, useWindowSize as w } from "usehooks-ts";
5
- import { ControlButton as z } from "../../controls/control-button/control-button.component.js";
6
- import { Flex as n } from "../flex/flex.component.js";
7
- import { Text as m } from "../text/text.component.js";
8
- import '../../assets/bottom-bar-DDgm0BQh.css';const R = "_BottomBar_1ao8k_1", _ = "_BottomBarFixed_1ao8k_7", L = "_BottomBarStatic_1ao8k_16", d = {
9
- BottomBar: R,
10
- BottomBarFixed: _,
11
- BottomBarStatic: L
12
- }, l = (o, t) => o ? typeof o == "string" ? {
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__ */ e("wbr", {}),
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__ */ e("wbr", {}),
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
- }, I = (o) => {
31
- const { button: t, info: i, message: s = "", className: g = "", staticFrom: x = 768 } = o, h = b(null), { height: a } = f({
32
- ref: h,
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: B } = w({ initializeWithValue: !0, debounceDelay: 150 });
35
- p(() => (a ? document.body.style.marginBottom = `${Math.round(a)}px` : document.body.style.removeProperty("margin-bottom"), () => {
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
- }), [a]);
38
- const r = u(() => ({
39
- topLeft: l(i.topLeft, { weight: "medium", color: "text-primary" }),
40
- topRight: l(i.topRight, { weight: "medium", color: "text-primary" }),
41
- bottomLeft: l(i.bottomLeft, { weight: "regular", color: "text-secondary" }),
42
- bottomRight: l(i.bottomRight, { weight: "regular", color: "text-secondary" })
43
- }), [i]);
44
- return /* @__PURE__ */ c(
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
- ref: h,
48
- className: y(d.BottomBar, g, B >= x ? d.BottomBarStatic : d.BottomBarFixed),
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__ */ c(n, { direction: "row", grow: "equal", children: [
51
- /* @__PURE__ */ c(n, { direction: "column", align: "start", children: [
52
- /* @__PURE__ */ e(m, { ...r.topLeft, children: r.topLeft.text }),
53
- /* @__PURE__ */ e(m, { ...r.bottomLeft, children: r.bottomLeft.text })
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__ */ c(n, { direction: "column", align: "end", children: [
56
- /* @__PURE__ */ e(m, { ...r.topRight, children: r.topRight.text }),
57
- /* @__PURE__ */ e(m, { ...r.bottomRight, children: r.bottomRight.text })
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
- s && /* @__PURE__ */ e(n, { justify: "center", mt: "sm", mb: "md", children: /* @__PURE__ */ e(m, { color: "text-secondary", children: s }) }),
61
- /* @__PURE__ */ e(n, { direction: "row", mt: "md", children: /* @__PURE__ */ e(
62
- z,
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: t.loading,
68
- disabled: t.disabled,
69
- onClick: t.onClick,
70
- children: t.text
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
- I as BottomBar
92
+ $ as BottomBar
79
93
  };
@@ -0,0 +1 @@
1
+ export { BottomBar } from './bottom-bar.component';
@@ -0,0 +1,4 @@
1
+ import { BottomBar as t } from "./bottom-bar.component.js";
2
+ export {
3
+ t as BottomBar
4
+ };