@arthurzakharov/ui-kit 1.0.40 → 1.0.42

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_md2b6_1{position:relative;box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center}._ButtonSizeSm_md2b6_11{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._ButtonSizeSm_md2b6_11 ._ButtonText_md2b6_16{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._ButtonSizeMd_md2b6_22,._ButtonSizeLg_md2b6_23{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-md)}._ButtonSizeMd_md2b6_22 ._ButtonText_md2b6_16{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._ButtonSizeLg_md2b6_23 ._ButtonText_md2b6_16{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._ButtonColorNext_md2b6_38{background-color:var(--rm-ui-next-btn-bg)}._ButtonColorNext_md2b6_38 ._ButtonText_md2b6_16{color:#fff}._ButtonColorPrevious_md2b6_46{background-color:transparent}._ButtonColorPrevious_md2b6_46 ._ButtonText_md2b6_16{color:var(--rm-ui-color-text-secondary)}._Button_md2b6_1:not(._ButtonLoading_md2b6_54):not(:disabled):hover{cursor:pointer}._Button_md2b6_1:focus{outline-color:var(--rm-ui-color-focus)}._ButtonFullWidth_md2b6_62{width:100%}._ButtonText_md2b6_16{font-family:var(--rm-ui-font-family-medium),sans-serif}._ButtonInfo_md2b6_70{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px);color:#fff}._ButtonContent_md2b6_77{transition:opacity .2s ease-in-out .2s}._ButtonContentLoading_md2b6_81{opacity:0}._ButtonContentIdle_md2b6_85{opacity:1}._ButtonLoaderWrap_md2b6_89{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._ButtonLoader_md2b6_89{stroke:#fff;animation:_spinPulse_md2b6_1 2s linear infinite;transform-origin:center}._ButtonLoader_md2b6_89 path{animation:_dash_md2b6_1 2s ease-in-out infinite}@keyframes _spinPulse_md2b6_1{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.25)}to{transform:rotate(360deg) scale(1)}}@keyframes _dash_md2b6_1{0%{stroke-opacity:1}50%{stroke-opacity:.6}to{stroke-opacity:1}}
@@ -0,0 +1 @@
1
+ ._SidebarTitle_1sscs_1,._SidebarButton_1sscs_2{padding-bottom:var(--rm-ui-padding-md)}._SidebarButton_1sscs_2{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}@media screen and (min-width:1200px){._SidebarTitle_1sscs_1,._SidebarButton_1sscs_2{padding-bottom:var(--rm-ui-padding-lg)}}
@@ -6,6 +6,7 @@ export interface ButtonProps extends PropsWithChildren {
6
6
  disabled?: boolean;
7
7
  info?: string;
8
8
  fullWidth?: boolean;
9
+ loading?: boolean;
9
10
  onClick?: () => void;
10
11
  onFocus?: () => void;
11
12
  onBlur?: () => void;
@@ -1,53 +1,66 @@
1
- import { jsxs as d, jsx as u } from "react/jsx-runtime";
2
- import m from "clsx";
3
- import { containsHtml as p } from "../../utils/utils.js";
4
- import '../../../../assets/button-Bg4CwXVJ.css';const S = "_Button_1npja_1", x = "_ButtonSizeSm_1npja_10", z = "_ButtonText_1npja_15", f = "_ButtonSizeMd_1npja_21", j = "_ButtonSizeLg_1npja_22", C = "_ButtonColorNext_1npja_37", h = "_ButtonColorPrevious_1npja_45", N = "_ButtonFullWidth_1npja_61", g = "_ButtonInfo_1npja_69", t = {
5
- Button: S,
6
- ButtonSizeSm: x,
7
- ButtonText: z,
8
- ButtonSizeMd: f,
9
- ButtonSizeLg: j,
10
- ButtonColorNext: C,
11
- ButtonColorPrevious: h,
12
- ButtonFullWidth: N,
13
- ButtonInfo: g
14
- }, L = (e) => {
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import { Loader as L } from "lucide-react";
3
+ import B from "clsx";
4
+ import { Animation as b } from "../../../animation/animation.component.js";
5
+ import { containsHtml as S } from "../../utils/utils.js";
6
+ import '../../../../assets/button-CMUsPT4x.css';const f = "_Button_md2b6_1", g = "_ButtonSizeSm_md2b6_11", p = "_ButtonText_md2b6_16", x = "_ButtonSizeMd_md2b6_22", z = "_ButtonSizeLg_md2b6_23", h = "_ButtonColorNext_md2b6_38", N = "_ButtonColorPrevious_md2b6_46", I = "_ButtonLoading_md2b6_54", W = "_ButtonFullWidth_md2b6_62", v = "_ButtonInfo_md2b6_70", F = "_ButtonContent_md2b6_77", M = "_ButtonContentLoading_md2b6_81", T = "_ButtonContentIdle_md2b6_85", P = "_ButtonLoaderWrap_md2b6_89", y = "_ButtonLoader_md2b6_89", t = {
7
+ Button: f,
8
+ ButtonSizeSm: g,
9
+ ButtonText: p,
10
+ ButtonSizeMd: x,
11
+ ButtonSizeLg: z,
12
+ ButtonColorNext: h,
13
+ ButtonColorPrevious: N,
14
+ ButtonLoading: I,
15
+ ButtonFullWidth: W,
16
+ ButtonInfo: v,
17
+ ButtonContent: F,
18
+ ButtonContentLoading: M,
19
+ ButtonContentIdle: T,
20
+ ButtonLoaderWrap: P,
21
+ ButtonLoader: y
22
+ }, q = (a) => {
15
23
  const {
16
- children: s,
17
- color: l,
18
- size: n,
19
- type: B,
20
- disabled: i = !1,
21
- info: o = "",
22
- fullWidth: a = !1,
24
+ children: i,
25
+ color: d,
26
+ size: e,
27
+ type: s,
28
+ disabled: r = !1,
29
+ info: n = "",
30
+ fullWidth: _ = !1,
31
+ loading: u = !1,
23
32
  onClick: c,
24
- onFocus: r,
25
- onBlur: _
26
- } = e;
27
- return /* @__PURE__ */ d(
33
+ onFocus: m,
34
+ onBlur: C
35
+ } = a;
36
+ return /* @__PURE__ */ l(
28
37
  "button",
29
38
  {
30
39
  "data-testid": "button",
31
- type: B,
32
- disabled: i,
33
- className: m(t.Button, {
34
- [t.ButtonSizeSm]: n === "sm",
35
- [t.ButtonSizeMd]: n === "md",
36
- [t.ButtonSizeLg]: n === "lg",
37
- [t.ButtonColorNext]: l === "next",
38
- [t.ButtonColorPrevious]: l === "previous",
39
- [t.ButtonFullWidth]: a
40
+ type: s,
41
+ disabled: r || u,
42
+ className: B(t.Button, {
43
+ [t.ButtonSizeSm]: e === "sm",
44
+ [t.ButtonSizeMd]: e === "md",
45
+ [t.ButtonSizeLg]: e === "lg",
46
+ [t.ButtonColorNext]: d === "next",
47
+ [t.ButtonColorPrevious]: d === "previous",
48
+ [t.ButtonFullWidth]: _,
49
+ [t.ButtonLoading]: u
40
50
  }),
41
51
  onClick: () => c?.call(null),
42
- onFocus: () => r?.call(null),
43
- onBlur: () => _?.call(null),
52
+ onFocus: () => m?.call(null),
53
+ onBlur: () => C?.call(null),
44
54
  children: [
45
- /* @__PURE__ */ u("span", { className: t.ButtonText, children: s }),
46
- p(o) && o ? /* @__PURE__ */ u("span", { className: t.ButtonInfo, dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ u("span", { className: t.ButtonInfo, children: o })
55
+ /* @__PURE__ */ o("div", { className: t.ButtonLoaderWrap, children: /* @__PURE__ */ o(b.FadeScale, { name: "loader", condition: u, duration: 0.2, delay: 0.2, children: /* @__PURE__ */ o(L, { className: t.ButtonLoader }) }) }),
56
+ /* @__PURE__ */ l("div", { className: B(t.ButtonContent, u ? t.ButtonContentLoading : t.ButtonContentIdle), children: [
57
+ /* @__PURE__ */ o("span", { className: t.ButtonText, children: i }),
58
+ S(n) && n ? /* @__PURE__ */ o("span", { className: t.ButtonInfo, dangerouslySetInnerHTML: { __html: n } }) : /* @__PURE__ */ o("span", { className: t.ButtonInfo, children: n })
59
+ ] })
47
60
  ]
48
61
  }
49
62
  );
50
63
  };
51
64
  export {
52
- L as Button
65
+ q as Button
53
66
  };
@@ -1,14 +1,15 @@
1
- export type { InfoProps } from './components/info/info.component';
2
- export type { DataBoardProps } from './components/data-board/data-board.component';
3
- export type { StepProps } from './components/step/step.component';
4
- export type { StepsProps } from './components/steps/steps.component';
5
- export type { UserProps } from './components/user/user.component';
6
- export declare const Sidebar: {
7
- Board: (props: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
8
- DataBoard: (props: import('./sidebar.component').DataBoardProps) => import("react/jsx-runtime").JSX.Element;
9
- Info: (props: import('./sidebar.component').InfoProps) => import("react/jsx-runtime").JSX.Element;
10
- Line: () => import("react/jsx-runtime").JSX.Element;
11
- Step: (props: import('./sidebar.component').StepProps) => import("react/jsx-runtime").JSX.Element;
12
- Steps: (props: import('./sidebar.component').StepsProps) => import("react/jsx-runtime").JSX.Element;
13
- User: (props: import('./sidebar.component').UserProps) => import("react/jsx-runtime").JSX.Element;
14
- };
1
+ import { PropsWithChildren } from 'react';
2
+ import { CertificationsProps } from '../certifications/certifications.component';
3
+ import { InfoProps } from './components/info/info.component';
4
+ import { StepsProps } from './components/steps/steps.component';
5
+ import { UserProps } from './components/user/user.component';
6
+ export interface SidebarProps extends PropsWithChildren {
7
+ isButtonVisible: boolean;
8
+ isUserOpen: boolean;
9
+ title: string;
10
+ steps: StepsProps['data'];
11
+ info: InfoProps['data'];
12
+ user: UserProps;
13
+ certifications: CertificationsProps['icons'];
14
+ }
15
+ export declare const Sidebar: (props: SidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,44 @@
1
- import { Board as o } from "./components/board/board.component.js";
2
- import { DataBoard as r } from "./components/data-board/data-board.component.js";
3
- import { Info as m } from "./components/info/info.component.js";
4
- import { Line as t } from "./components/line/line.component.js";
5
- import { Step as p } from "./components/step/step.component.js";
6
- import { Steps as i } from "./components/steps/steps.component.js";
7
- import { User as f } from "./components/user/user.component.js";
8
- const b = { Board: o, DataBoard: r, Info: m, Line: t, Step: p, Steps: i, User: f };
1
+ import { jsxs as f, jsx as t } from "react/jsx-runtime";
2
+ import { Animation as b } from "../animation/animation.component.js";
3
+ import { Text as p } from "../text/text.component.js";
4
+ import { Certifications as u } from "../certifications/certifications.component.js";
5
+ import { Board as S } from "./components/board/board.component.js";
6
+ import { DataBoard as h } from "./components/data-board/data-board.component.js";
7
+ import { Line as r } from "./components/line/line.component.js";
8
+ import { Info as B } from "./components/info/info.component.js";
9
+ import { Steps as T } from "./components/steps/steps.component.js";
10
+ import { User as _ } from "./components/user/user.component.js";
11
+ import '../../assets/sidebar-B3KPFpFU.css';const x = "_SidebarTitle_1sscs_1", C = "_SidebarButton_1sscs_2", o = {
12
+ SidebarTitle: x,
13
+ SidebarButton: C
14
+ }, L = (e) => {
15
+ const {
16
+ children: a,
17
+ isButtonVisible: n = !1,
18
+ isUserOpen: s = !1,
19
+ title: d = "Ihre Übersicht",
20
+ steps: c = [],
21
+ info: m = [],
22
+ certifications: l = [],
23
+ user: i
24
+ } = e;
25
+ return /* @__PURE__ */ f(S, { children: [
26
+ /* @__PURE__ */ t("div", { className: o.SidebarTitle, children: /* @__PURE__ */ t(p.SidebarTitle, { children: d }) }),
27
+ /* @__PURE__ */ t(T, { data: c }),
28
+ /* @__PURE__ */ t(r, {}),
29
+ /* @__PURE__ */ t(
30
+ h,
31
+ {
32
+ isUserOpen: s,
33
+ user: /* @__PURE__ */ t(_, { title: i.title, button: i.button, data: i.data, onClick: i.onClick }),
34
+ info: /* @__PURE__ */ t(B, { data: m })
35
+ }
36
+ ),
37
+ /* @__PURE__ */ t(r, {}),
38
+ /* @__PURE__ */ t(b.FadeScale, { name: "button", condition: n, duration: 0.2, delay: 0.1, children: /* @__PURE__ */ t("div", { className: o.SidebarButton, children: a }) }),
39
+ /* @__PURE__ */ t(u, { icons: l })
40
+ ] });
41
+ };
9
42
  export {
10
- b as Sidebar
43
+ L as Sidebar
11
44
  };
package/dist/main.d.ts CHANGED
@@ -5,5 +5,5 @@ export { Footer, type FooterProps } from './components/footer/footer.component';
5
5
  export { Header, type HeaderProps } from './components/header/header.component';
6
6
  export { InfoPanel, type InfoPanelProps } from './components/info-panel/info-panel.component';
7
7
  export { Layout, type LayoutProps } from './components/layout/layout.component';
8
- export { Sidebar, type InfoProps, type DataBoardProps, type StepProps, type StepsProps, type UserProps, } from './components/sidebar/sidebar.component';
8
+ export { Sidebar, type SidebarProps } from './components/sidebar/sidebar.component';
9
9
  export { Text } from './components/text/text.component';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.0.40",
4
+ "version": "1.0.42",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._Button_1npja_1{box-sizing:border-box;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center}._ButtonSizeSm_1npja_10{border-radius:var(--rm-ui-border-radius-sm);padding:var(--rm-ui-padding-xs) var(--rm-ui-padding-sm)}._ButtonSizeSm_1npja_10 ._ButtonText_1npja_15{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small)}._ButtonSizeMd_1npja_21,._ButtonSizeLg_1npja_22{border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-sm) var(--rm-ui-padding-md)}._ButtonSizeMd_1npja_21 ._ButtonText_1npja_15{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body)}._ButtonSizeLg_1npja_22 ._ButtonText_1npja_15{font-size:var(--rm-ui-font-size-body-large);line-height:var(--rm-ui-line-height-body-large)}._ButtonColorNext_1npja_37{background-color:var(--rm-ui-next-btn-bg)}._ButtonColorNext_1npja_37 ._ButtonText_1npja_15{color:#fff}._ButtonColorPrevious_1npja_45{background-color:transparent}._ButtonColorPrevious_1npja_45 ._ButtonText_1npja_15{color:var(--rm-ui-color-text-secondary)}._Button_1npja_1:hover{cursor:pointer}._Button_1npja_1:focus{outline-color:var(--rm-ui-color-focus)}._ButtonFullWidth_1npja_61{width:100%}._ButtonText_1npja_15{font-family:var(--rm-ui-font-family-medium),sans-serif}._ButtonInfo_1npja_69{font-family:var(--rm-ui-font-family-regular),sans-serif;font-size:var(--rm-ui-font-size-body-small);line-height:calc(var(--rm-ui-line-height-body-small) - 2px);color:#fff}