@arthurzakharov/ui-kit 1.6.9 → 1.7.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.
@@ -0,0 +1 @@
1
+ ._BottomBar_1pxm3_1{background-color:var(--rm-ui-content-bg);flex-direction:column;justify-content:stretch}._Fixed_1pxm3_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_1pxm3_16{position:static}._TopBlock_1pxm3_20{display:flex}._LeftBlock_1pxm3_24{flex-grow:1;display:flex;flex-direction:column;align-items:flex-start}._RightBlock_1pxm3_31{flex-grow:1;display:flex;flex-direction:column;align-items:flex-end;text-align:right}._Message_1pxm3_39{margin-top:var(--rm-ui-padding-sm);margin-bottom:var(--rm-ui-padding-md)}._Button_1pxm3_44{margin-top:var(--rm-ui-padding-md)}
@@ -0,0 +1 @@
1
+ ._Expenses_hfqkm_1{display:block}._Title_hfqkm_5{margin-bottom:var(--rm-ui-padding-md);font-weight:var(--rm-ui-font-weight-bold);font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4);color:var(--rm-ui-color-text-primary)}._Content_hfqkm_13{margin-bottom:var(--rm-ui-padding-md)}._Content_hfqkm_13,._SubContent_hfqkm_18{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Content_hfqkm_13>*[data-color=accent],._SubContent_hfqkm_18>*[data-color=accent]{color:var(--rm-ui-color-accent-primary)}._Content_hfqkm_13>*[role=button],._SubContent_hfqkm_18>*[role=button],._Content_hfqkm_13>button,._SubContent_hfqkm_18>button{color:var(--rm-ui-color-link)}._SubContent_hfqkm_18{display:block;margin-top:var(--rm-ui-padding-md)}._Amount_hfqkm_42{display:flex;align-items:center;justify-content:space-between;color:var(--rm-ui-color-theme-primary)}._AmountKey_hfqkm_49{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._AmountValue_hfqkm_55{font-weight:var(--rm-ui-font-weight-medium);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}
@@ -1,10 +1,11 @@
1
1
  import { TextProps } from '../text/text.component';
2
- import { Base, FontColor, FontSize, FontWeight } from '../../utils/types';
2
+ import { Base } from '../../utils/types';
3
3
  type BottomBarInfoItem<T> = {
4
4
  lined?: boolean;
5
- weight?: FontWeight;
6
- size?: FontSize;
7
- color?: FontColor;
5
+ weight?: TextProps['weight'];
6
+ size?: TextProps['size'];
7
+ color?: TextProps['color'];
8
+ align?: TextProps['align'];
8
9
  text: T;
9
10
  };
10
11
  type BottomBarButton = {
@@ -1,14 +1,14 @@
1
1
  import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
- import { useRef as p, useEffect as B, useMemo as u } from "react";
3
- import b from "clsx";
4
- import { useResizeObserver as _, useWindowSize as k } from "usehooks-ts";
5
- import { Text as l } from "../text/text.component.js";
2
+ import { useRef as x, useEffect as B, useMemo as b } from "react";
3
+ import _ from "clsx";
4
+ import { useResizeObserver as f, useWindowSize as u } from "usehooks-ts";
5
+ import { Text as c } from "../text/text.component.js";
6
6
  import { Button as y } from "../../controls/buttons/button/button.component.js";
7
7
  import "../../controls/primitives/box/box.component.js";
8
- import { baseProps as h } from "../../utils/functions/functions.util.js";
8
+ import { baseProps as d } from "../../utils/functions/functions.util.js";
9
9
  import "lucide-react";
10
- 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", v = "_RightBlock_xd6ok_31", N = "_Message_xd6ok_38", M = "_Button_xd6ok_43", r = {
11
- BottomBar: f,
10
+ import '../../assets/bottom-bar-DE6QuEjZ.css';const k = "_BottomBar_1pxm3_1", w = "_Fixed_1pxm3_7", R = "_Static_1pxm3_16", z = "_TopBlock_1pxm3_20", L = "_LeftBlock_1pxm3_24", v = "_RightBlock_1pxm3_31", N = "_Message_1pxm3_39", M = "_Button_1pxm3_44", r = {
11
+ BottomBar: k,
12
12
  Fixed: w,
13
13
  Static: R,
14
14
  TopBlock: z,
@@ -16,59 +16,71 @@ import '../../assets/bottom-bar-B35eeXqR.css';const f = "_BottomBar_xd6ok_1", w
16
16
  RightBlock: v,
17
17
  Message: N,
18
18
  Button: M
19
- }, s = (o, t) => o ? typeof o == "string" ? {
19
+ }, a = (o, t) => o ? typeof o == "string" ? {
20
20
  text: o,
21
21
  lined: !1,
22
22
  weight: t.weight || "regular",
23
23
  size: t.size || "body",
24
- color: t.color || "text-primary"
24
+ color: t.color || "text-primary",
25
+ align: t.align || "left"
25
26
  } : {
26
27
  text: o.text || /* @__PURE__ */ i("wbr", {}),
27
28
  lined: o.lined,
28
29
  weight: o.weight || t.weight || "regular",
29
30
  size: o.size || t.size || "body",
30
- color: o.color || t.color || "text-primary"
31
+ color: o.color || t.color || "text-primary",
32
+ align: o.align || t.align || "left"
31
33
  } : {
32
34
  text: /* @__PURE__ */ i("wbr", {}),
33
35
  lined: !1,
34
36
  weight: t.weight || "regular",
35
37
  size: t.size || "body",
36
- color: t.color || "text-primary"
37
- }, I = ({ button: o, info: t, message: c, staticFrom: x = 768, ...a }) => {
38
- const m = p(null), { height: d } = _({
39
- ref: m,
38
+ color: t.color || "text-primary",
39
+ align: t.align || "left"
40
+ }, I = ({ button: o, info: t, message: l, staticFrom: p = 768, ...s }) => {
41
+ const g = x(null), { height: m } = f({
42
+ ref: g,
40
43
  box: "border-box"
41
- }), { width: g } = k({ initializeWithValue: !0, debounceDelay: 150 });
42
- B(() => (d ? document.body.style.marginBottom = `${Math.round(d)}px` : document.body.style.removeProperty("margin-bottom"), () => {
44
+ }), { width: h } = u({ initializeWithValue: !0, debounceDelay: 150 });
45
+ B(() => (m ? document.body.style.marginBottom = `${Math.round(m)}px` : document.body.style.removeProperty("margin-bottom"), () => {
43
46
  document.body.style.removeProperty("margin-bottom");
44
- }), [d]);
45
- const e = u(
47
+ }), [m]);
48
+ const e = b(
46
49
  () => ({
47
- topLeft: s(t.topLeft, { weight: "medium", color: "text-primary" }),
48
- topRight: s(t.topRight, { weight: "medium", color: "text-primary" }),
49
- bottomLeft: s(t.bottomLeft, { weight: "regular", color: "text-secondary" }),
50
- bottomRight: s(t.bottomRight, { weight: "regular", color: "text-secondary" })
50
+ topLeft: a(t.topLeft, { weight: "medium", color: "text-primary", align: "left" }),
51
+ topRight: a(t.topRight, { weight: "medium", color: "text-primary", align: "right" }),
52
+ bottomLeft: a(t.bottomLeft, { weight: "regular", color: "text-secondary", align: "left" }),
53
+ bottomRight: a(t.bottomRight, { weight: "regular", color: "text-secondary", align: "right" })
51
54
  }),
52
55
  [t]
53
56
  );
54
57
  return /* @__PURE__ */ n(
55
58
  "div",
56
59
  {
57
- "data-testid": h(a, "data-testid", "bottom-bar"),
58
- ref: m,
59
- className: b(r.BottomBar, h(a, "className"), g >= x ? r.Static : r.Fixed),
60
+ "data-testid": d(s, "data-testid", "bottom-bar"),
61
+ ref: g,
62
+ className: _(r.BottomBar, d(s, "className"), h >= p ? r.Static : r.Fixed),
60
63
  children: [
61
64
  /* @__PURE__ */ n("div", { className: r.TopBlock, children: [
62
65
  /* @__PURE__ */ n("div", { className: r.LeftBlock, children: [
63
- /* @__PURE__ */ i(l, { ...e.topLeft, children: e.topLeft.text }),
64
- /* @__PURE__ */ i(l, { ...e.bottomLeft, children: e.bottomLeft.text })
66
+ /* @__PURE__ */ i(c, { ...e.topLeft, children: e.topLeft.text }),
67
+ /* @__PURE__ */ i(c, { ...e.bottomLeft, children: e.bottomLeft.text })
65
68
  ] }),
66
69
  /* @__PURE__ */ n("div", { className: r.RightBlock, children: [
67
- /* @__PURE__ */ i(l, { ...e.topRight, children: e.topRight.text }),
68
- /* @__PURE__ */ i(l, { ...e.bottomRight, children: e.bottomRight.text })
70
+ /* @__PURE__ */ i(c, { ...e.topRight, children: e.topRight.text }),
71
+ /* @__PURE__ */ i(c, { ...e.bottomRight, children: e.bottomRight.text })
69
72
  ] })
70
73
  ] }),
71
- c && !c.hidden && /* @__PURE__ */ i(l, { color: c.color || "text-secondary", align: c.align || "center", className: r.Message, children: c.text }),
74
+ l && !l.hidden && /* @__PURE__ */ i(
75
+ c,
76
+ {
77
+ size: "body-small",
78
+ color: l.color || "text-secondary",
79
+ align: l.align || "center",
80
+ className: r.Message,
81
+ children: l.text
82
+ }
83
+ ),
72
84
  /* @__PURE__ */ i(
73
85
  y,
74
86
  {
@@ -1,28 +1,30 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import r from "clsx";
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import d from "clsx";
3
3
  import { baseProps as a } from "../../utils/functions/functions.util.js";
4
- import '../../assets/expenses-AU5q4idk.css';const p = "_Expenses_zr16l_1", m = "_Title_zr16l_5", _ = "_Content_zr16l_13", x = "_SubContent_zr16l_18", u = "_Amount_zr16l_42", t = {
5
- Expenses: p,
6
- Title: m,
7
- Content: _,
8
- SubContent: x,
9
- Amount: u
10
- }, z = ({ title: c, content: i, subContent: s, amountTitle: l, amountNumber: d, ...n }) => /* @__PURE__ */ o(
4
+ import '../../assets/expenses-BWqSN6hG.css';const u = "_Expenses_hfqkm_1", _ = "_Title_hfqkm_5", p = "_Content_hfqkm_13", h = "_SubContent_hfqkm_18", r = "_Amount_hfqkm_42", x = "_AmountKey_hfqkm_49", A = "_AmountValue_hfqkm_55", e = {
5
+ Expenses: u,
6
+ Title: _,
7
+ Content: p,
8
+ SubContent: h,
9
+ Amount: r,
10
+ AmountKey: x,
11
+ AmountValue: A
12
+ }, q = ({ title: m, content: c, subContent: n, amountTitle: l, amountNumber: i, ...s }) => /* @__PURE__ */ o(
11
13
  "div",
12
14
  {
13
- "data-testid": a(n, "data-testid", "expenses"),
14
- className: r(t.Expenses, a(n, "className")),
15
+ "data-testid": a(s, "data-testid", "expenses"),
16
+ className: d(e.Expenses, a(s, "className")),
15
17
  children: [
16
- /* @__PURE__ */ e("h6", { "data-testid": "expenses-title", className: t.Title, children: c }),
17
- /* @__PURE__ */ e("p", { "data-testid": "expenses-content", className: t.Content, children: i }),
18
- /* @__PURE__ */ o("div", { "data-testid": "expenses-amount", className: t.Amount, children: [
19
- /* @__PURE__ */ e("span", { children: l }),
20
- /* @__PURE__ */ e("span", { children: d.join("") })
18
+ /* @__PURE__ */ t("h6", { "data-testid": "expenses-title", className: e.Title, children: m }),
19
+ /* @__PURE__ */ t("p", { "data-testid": "expenses-content", className: e.Content, children: c }),
20
+ /* @__PURE__ */ o("div", { "data-testid": "expenses-amount", className: e.Amount, children: [
21
+ /* @__PURE__ */ t("span", { className: e.AmountKey, children: l }),
22
+ /* @__PURE__ */ t("span", { className: e.AmountValue, children: i.join("") })
21
23
  ] }),
22
- s && /* @__PURE__ */ e("p", { "data-testid": "expenses-sub-content", className: t.SubContent, children: s })
24
+ n && /* @__PURE__ */ t("p", { "data-testid": "expenses-sub-content", className: e.SubContent, children: n })
23
25
  ]
24
26
  }
25
27
  );
26
28
  export {
27
- z as Expenses
29
+ q as Expenses
28
30
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.6.9",
4
+ "version": "1.7.1",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
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)}
@@ -1 +0,0 @@
1
- ._Expenses_zr16l_1{display:block}._Title_zr16l_5{margin-bottom:var(--rm-ui-padding-md);font-weight:var(--rm-ui-font-weight-medium);font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4);color:var(--rm-ui-color-text-primary)}._Content_zr16l_13{margin-bottom:var(--rm-ui-padding-md)}._Content_zr16l_13,._SubContent_zr16l_18{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Content_zr16l_13>*[data-color=accent],._SubContent_zr16l_18>*[data-color=accent]{color:var(--rm-ui-color-accent-primary)}._Content_zr16l_13>*[role=button],._SubContent_zr16l_18>*[role=button],._Content_zr16l_13>button,._SubContent_zr16l_18>button{color:var(--rm-ui-color-link)}._SubContent_zr16l_18{display:block;margin-top:var(--rm-ui-padding-md)}._Amount_zr16l_42{display:flex;align-items:center;justify-content:space-between;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-theme-primary)}