@arthurzakharov/ui-kit 1.0.55 → 1.0.57

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
+ ._Button_1utzs_1{position:relative;box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center}._ButtonSizeSm_1utzs_11{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._ButtonSizeLg_1utzs_16._ButtonColorTertiary_1utzs_16{padding:calc(var(--rm-ui-padding-xs) - 1px) calc(var(--rm-ui-padding-sm) - 1px)}._ButtonSizeSm_1utzs_11 ._ButtonText_1utzs_20{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)}._ButtonSizeMd_1utzs_26{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-lg)}._ButtonSizeMd_1utzs_26._ButtonColorTertiary_1utzs_16{padding:calc(var(--rm-ui-padding-sm) - 1px) calc(var(--rm-ui-padding-lg) - 1px)}._ButtonSizeLg_1utzs_16{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-lg)}._ButtonSizeLg_1utzs_16._ButtonColorTertiary_1utzs_16{padding:calc(var(--rm-ui-padding-sm) - 1px) calc(var(--rm-ui-padding-lg) - 1px)}._ButtonSizeMd_1utzs_26 ._ButtonText_1utzs_20{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._ButtonSizeLg_1utzs_16 ._ButtonText_1utzs_20{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._ButtonColorPrimary_1utzs_54{background-color:var(--rm-ui-next-btn-bg)}._ButtonColorPrimary_1utzs_54 ._ButtonText_1utzs_20{color:#fff}._ButtonColorSecondary_1utzs_62{background-color:transparent}._ButtonColorSecondary_1utzs_62 ._ButtonText_1utzs_20{color:var(--rm-ui-color-text-secondary)}._ButtonColorTertiary_1utzs_16{border:1px solid var(--rm-ui-grey-300);background-color:transparent}._ButtonColorTertiary_1utzs_16 ._ButtonText_1utzs_20{color:var(--rm-ui-color-text-primary)}._Button_1utzs_1:not(._ButtonLoading_1utzs_79):not(:disabled):hover{cursor:pointer}._Button_1utzs_1:focus{outline-color:var(--rm-ui-color-focus)}._ButtonFullWidth_1utzs_87{width:100%}._ButtonText_1utzs_20{font-weight:var(--rm-ui-font-weight-medium)}._ButtonInfo_1utzs_95{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px);color:#fff}._ButtonContent_1utzs_102{transition:opacity .2s ease-in-out .2s}._ButtonContentLoading_1utzs_106{opacity:0}._ButtonContentIdle_1utzs_110{opacity:1}._ButtonLoaderWrap_1utzs_114{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._ButtonLoaderAnimationWrap_1utzs_121{display:flex;flex-direction:column;align-items:center;justify-content:center}
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  export interface ButtonProps extends PropsWithChildren {
3
- color: 'next' | 'previous';
3
+ color: 'primary' | 'secondary' | 'tertiary';
4
4
  size: 'sm' | 'md' | 'lg';
5
5
  type: 'submit' | 'reset' | 'button';
6
6
  disabled?: boolean;
@@ -1,70 +1,72 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
2
  import i from "clsx";
3
3
  import { Animation as C } from "../../../animation/animation.component.js";
4
4
  import { Loader as L } from "../../../loader/loader.component.js";
5
5
  import { containsHtml as S } from "../../utils/utils.js";
6
- import '../../../../assets/button-DZ6T9O3D.css';const f = "_Button_1dpso_1", g = "_ButtonSizeSm_1dpso_11", z = "_ButtonText_1dpso_16", h = "_ButtonSizeMd_1dpso_22", x = "_ButtonSizeLg_1dpso_23", W = "_ButtonColorNext_1dpso_38", N = "_ButtonColorPrevious_1dpso_46", I = "_ButtonLoading_1dpso_54", v = "_ButtonFullWidth_1dpso_62", F = "_ButtonInfo_1dpso_70", A = "_ButtonContent_1dpso_77", M = "_ButtonContentLoading_1dpso_81", T = "_ButtonContentIdle_1dpso_85", b = "_ButtonLoaderWrap_1dpso_89", P = "_ButtonLoaderAnimationWrap_1dpso_96", t = {
7
- Button: f,
8
- ButtonSizeSm: g,
9
- ButtonText: z,
10
- ButtonSizeMd: h,
11
- ButtonSizeLg: x,
12
- ButtonColorNext: W,
13
- ButtonColorPrevious: N,
14
- ButtonLoading: I,
15
- ButtonFullWidth: v,
16
- ButtonInfo: F,
6
+ import '../../../../assets/button-4MJZ7yPE.css';const p = "_Button_1utzs_1", y = "_ButtonSizeSm_1utzs_11", f = "_ButtonSizeLg_1utzs_16", g = "_ButtonColorTertiary_1utzs_16", h = "_ButtonText_1utzs_20", W = "_ButtonSizeMd_1utzs_26", I = "_ButtonColorPrimary_1utzs_54", T = "_ButtonColorSecondary_1utzs_62", x = "_ButtonLoading_1utzs_79", F = "_ButtonFullWidth_1utzs_87", N = "_ButtonInfo_1utzs_95", A = "_ButtonContent_1utzs_102", M = "_ButtonContentLoading_1utzs_106", b = "_ButtonContentIdle_1utzs_110", P = "_ButtonLoaderWrap_1utzs_114", j = "_ButtonLoaderAnimationWrap_1utzs_121", t = {
7
+ Button: p,
8
+ ButtonSizeSm: y,
9
+ ButtonSizeLg: f,
10
+ ButtonColorTertiary: g,
11
+ ButtonText: h,
12
+ ButtonSizeMd: W,
13
+ ButtonColorPrimary: I,
14
+ ButtonColorSecondary: T,
15
+ ButtonLoading: x,
16
+ ButtonFullWidth: F,
17
+ ButtonInfo: N,
17
18
  ButtonContent: A,
18
19
  ButtonContentLoading: M,
19
- ButtonContentIdle: T,
20
- ButtonLoaderWrap: b,
21
- ButtonLoaderAnimationWrap: P
22
- }, $ = (l) => {
20
+ ButtonContentIdle: b,
21
+ ButtonLoaderWrap: P,
22
+ ButtonLoaderAnimationWrap: j
23
+ }, q = (l) => {
23
24
  const {
24
- children: a,
25
- color: s,
26
- size: u,
25
+ children: s,
26
+ color: e,
27
+ size: a,
27
28
  type: B,
28
- disabled: r = !1,
29
+ disabled: d = !1,
29
30
  info: n = "",
30
- fullWidth: _ = !1,
31
- loading: e = !1,
32
- onClick: c,
33
- onFocus: p,
34
- onBlur: m
31
+ fullWidth: c = !1,
32
+ loading: u = !1,
33
+ onClick: _,
34
+ onFocus: m,
35
+ onBlur: z
35
36
  } = l;
36
- return /* @__PURE__ */ d(
37
+ return /* @__PURE__ */ r(
37
38
  "button",
38
39
  {
39
40
  "data-testid": "button",
40
41
  type: B,
41
- disabled: r || e,
42
+ disabled: d || u,
42
43
  className: i(t.Button, {
43
- [t.ButtonSizeSm]: u === "sm",
44
- [t.ButtonSizeMd]: u === "md",
45
- [t.ButtonSizeLg]: u === "lg",
46
- [t.ButtonColorNext]: s === "next",
47
- [t.ButtonColorPrevious]: s === "previous",
48
- [t.ButtonFullWidth]: _,
49
- [t.ButtonLoading]: e
44
+ [t.ButtonSizeSm]: a === "sm",
45
+ [t.ButtonSizeMd]: a === "md",
46
+ [t.ButtonSizeLg]: a === "lg",
47
+ [t.ButtonColorPrimary]: e === "primary",
48
+ [t.ButtonColorSecondary]: e === "secondary",
49
+ [t.ButtonColorTertiary]: e === "tertiary",
50
+ [t.ButtonFullWidth]: c,
51
+ [t.ButtonLoading]: u
50
52
  }),
51
- onClick: () => c?.call(null),
52
- onFocus: () => p?.call(null),
53
- onBlur: () => m?.call(null),
53
+ onClick: () => _?.call(null),
54
+ onFocus: () => m?.call(null),
55
+ onBlur: () => z?.call(null),
54
56
  children: [
55
57
  /* @__PURE__ */ o("div", { className: t.ButtonLoaderWrap, children: /* @__PURE__ */ o(
56
58
  C.FadeScale,
57
59
  {
58
60
  name: "loader",
59
- condition: e,
61
+ condition: u,
60
62
  duration: 0.2,
61
63
  delay: 0.2,
62
64
  className: t.ButtonLoaderAnimationWrap,
63
65
  children: /* @__PURE__ */ o(L, { size: 24, color: "white" })
64
66
  }
65
67
  ) }),
66
- /* @__PURE__ */ d("div", { className: i(t.ButtonContent, e ? t.ButtonContentLoading : t.ButtonContentIdle), children: [
67
- /* @__PURE__ */ o("span", { className: t.ButtonText, children: a }),
68
+ /* @__PURE__ */ r("div", { className: i(t.ButtonContent, u ? t.ButtonContentLoading : t.ButtonContentIdle), children: [
69
+ /* @__PURE__ */ o("span", { className: t.ButtonText, children: s }),
68
70
  S(n) && n ? /* @__PURE__ */ o("span", { className: t.ButtonInfo, dangerouslySetInnerHTML: { __html: n } }) : /* @__PURE__ */ o("span", { className: t.ButtonInfo, children: n })
69
71
  ] })
70
72
  ]
@@ -72,5 +74,5 @@ import '../../../../assets/button-DZ6T9O3D.css';const f = "_Button_1dpso_1", g =
72
74
  );
73
75
  };
74
76
  export {
75
- $ as Button
77
+ q as Button
76
78
  };
@@ -29,17 +29,17 @@ import '../../../../assets/dropdown-DLXy_DVj.css';const Y = "_Dropdown_1bylm_1",
29
29
  DropdownChoice: Do,
30
30
  DropdownChoiceNoResult: mo
31
31
  }, Ro = (s) => {
32
- const { choices: f = [], value: a = [], isSearchHidden: k = !1, multiple: i = !1, onChange: h, onOpen: H, onClose: z } = s, V = s.label || "", I = s.placeholder || "Wählen Sie Ihre private Krankenversicherung...", O = s.noResult || "Keine Versicherung gefunden.", W = s.closeButton || "Schließen", v = u(null), w = u(null), x = u(null), { value: t, setFalse: D, toggle: A } = M(!1), [m, G] = C(""), [l, L] = C({ width: 0, height: 0 }), [p, y] = C([]);
32
+ const { choices: f = [], value: a = [], isSearchHidden: k = !1, multiple: i = !1, onChange: h, onOpen: H, onClose: z } = s, V = s.label || "", I = s.placeholder || "Wählen Sie Ihre private Krankenversicherung...", O = s.noResult || "Keine Versicherung gefunden.", W = s.closeButton || "Schließen", v = u(null), w = u(null), y = u(null), { value: t, setFalse: D, toggle: A } = M(!1), [m, G] = C(""), [l, L] = C({ width: 0, height: 0 }), [p, x] = C([]);
33
33
  T({
34
34
  ref: w,
35
35
  onResize: (o) => L({ width: o.width || 0, height: o.height || 0 })
36
36
  }), E(w, (o) => {
37
37
  U(o, v) || (i && h(p), D());
38
- }), g(() => y(Array.isArray(a) ? a : []), [a]), g(() => {
39
- t && l.width && l.height ? (x.current?.focus(), H?.call(null, l.height, l.width)) : z?.call(null);
38
+ }), g(() => x(Array.isArray(a) ? a : []), [a]), g(() => {
39
+ t && l.width && l.height ? (y.current?.focus(), H?.call(null, l.height, l.width)) : z?.call(null);
40
40
  }, [t, l]);
41
41
  const j = (o, c) => {
42
- y((d) => d.some(({ value: _ }) => _ === o) ? d.filter(({ value: _ }) => _ !== o) : [...d, { value: o, label: c }]);
42
+ x((d) => d.some(({ value: _ }) => _ === o) ? d.filter(({ value: _ }) => _ !== o) : [...d, { value: o, label: c }]);
43
43
  }, F = () => {
44
44
  D(), h(p);
45
45
  }, B = K(
@@ -59,7 +59,7 @@ import '../../../../assets/dropdown-DLXy_DVj.css';const Y = "_Dropdown_1bylm_1",
59
59
  /* @__PURE__ */ n(
60
60
  "input",
61
61
  {
62
- ref: x,
62
+ ref: y,
63
63
  value: m,
64
64
  type: "text",
65
65
  className: e.DropdownInput,
@@ -88,7 +88,7 @@ import '../../../../assets/dropdown-DLXy_DVj.css';const Y = "_Dropdown_1bylm_1",
88
88
  },
89
89
  o + d
90
90
  )) : /* @__PURE__ */ n("li", { className: N(e.DropdownChoice, e.DropdownChoiceNoResult), children: /* @__PURE__ */ n(b, { size: "lg", checked: !1, children: O }) }) }),
91
- i && /* @__PURE__ */ n("div", { className: e.DropdownClose, children: /* @__PURE__ */ n(J, { color: "next", size: "sm", type: "button", onClick: () => F(), children: W }) })
91
+ i && /* @__PURE__ */ n("div", { className: e.DropdownClose, children: /* @__PURE__ */ n(J, { color: "primary", size: "sm", type: "button", onClick: () => F(), children: W }) })
92
92
  ] }) })
93
93
  ] });
94
94
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.0.55",
4
+ "version": "1.0.57",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._Button_1dpso_1{position:relative;box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center}._ButtonSizeSm_1dpso_11{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._ButtonSizeSm_1dpso_11 ._ButtonText_1dpso_16{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)}._ButtonSizeMd_1dpso_22,._ButtonSizeLg_1dpso_23{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-md)}._ButtonSizeMd_1dpso_22 ._ButtonText_1dpso_16{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._ButtonSizeLg_1dpso_23 ._ButtonText_1dpso_16{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._ButtonColorNext_1dpso_38{background-color:var(--rm-ui-next-btn-bg)}._ButtonColorNext_1dpso_38 ._ButtonText_1dpso_16{color:#fff}._ButtonColorPrevious_1dpso_46{background-color:transparent}._ButtonColorPrevious_1dpso_46 ._ButtonText_1dpso_16{color:var(--rm-ui-color-text-secondary)}._Button_1dpso_1:not(._ButtonLoading_1dpso_54):not(:disabled):hover{cursor:pointer}._Button_1dpso_1:focus{outline-color:var(--rm-ui-color-focus)}._ButtonFullWidth_1dpso_62{width:100%}._ButtonText_1dpso_16{font-weight:var(--rm-ui-font-weight-medium)}._ButtonInfo_1dpso_70{font-weight:var(--rm-ui-font-weight-regular);font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px);color:#fff}._ButtonContent_1dpso_77{transition:opacity .2s ease-in-out .2s}._ButtonContentLoading_1dpso_81{opacity:0}._ButtonContentIdle_1dpso_85{opacity:1}._ButtonLoaderWrap_1dpso_89{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._ButtonLoaderAnimationWrap_1dpso_96{display:flex;flex-direction:column;align-items:center;justify-content:center}