@arthurzakharov/ui-kit 3.3.0 → 3.4.0

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
+ ._Sidebar_bino6_1{display:block}._Board_bino6_5{display:flex;flex-direction:column;border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-lg);background-color:var(--rm-ui-sidebar-bg)}._Steps_bino6_13,._Info_bino6_14{display:flex;flex-direction:column;align-items:flex-start;gap:var(--rm-ui-padding-sm)}._Step_bino6_13{display:inline-flex;align-items:center;gap:var(--rm-ui-padding-xs)}._InfoRow_bino6_27{display:inline-flex;align-items:center;justify-content:space-between;gap:var(--rm-ui-padding-xs);width:100%}._SidebarButton_bino6_35{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}._Timetable_bino6_42{display:flex;flex-direction:column;gap:var(--rm-ui-padding-xxs)}._Space_bino6_48{flex-shrink:0;height:var(--rm-ui-sidebar-space-base)}@media screen and (min-width:768px){._Space_bino6_48{height:var(--rm-ui-sidebar-space-768, var(--rm-ui-sidebar-space-base))}}@media screen and (min-width:1024px){._Space_bino6_48{height:var(--rm-ui-sidebar-space-1024, var(--rm-ui-sidebar-space-768, var(--rm-ui-sidebar-space-base)))}}@media screen and (min-width:1200px){._Space_bino6_48{height:var( --rm-ui-sidebar-space-1200, var(--rm-ui-sidebar-space-1024, var(--rm-ui-sidebar-space-768, var(--rm-ui-sidebar-space-base))) )}}@media screen and (min-width:1024px){._Board_bino6_5{padding:var(--rm-ui-padding-xl)}}@media screen and (min-width:1200px){._Board_bino6_5{padding:var(--rm-ui-padding-xxl)}}
@@ -28,6 +28,12 @@ interface SidebarTimetableProps extends Base {
28
28
  title: string;
29
29
  lines: string[];
30
30
  }
31
+ interface SidebarSpaceProps extends Base {
32
+ height: string;
33
+ 768?: string;
34
+ 1024?: string;
35
+ 1200?: string;
36
+ }
31
37
  export declare const Sidebar: (({ children, ...base }: PropsWithChildren<Base>) => import("react/jsx-runtime").JSX.Element) & {
32
38
  Title: ({ children, ...base }: PropsWithChildren<Base>) => import("react/jsx-runtime").JSX.Element;
33
39
  Steps: ({ steps, ...base }: SidebarStepsProps) => import("react/jsx-runtime").JSX.Element;
@@ -37,5 +43,6 @@ export declare const Sidebar: (({ children, ...base }: PropsWithChildren<Base>)
37
43
  Certifications: (props: CertificationsProps) => import("react/jsx-runtime").JSX.Element;
38
44
  Timetable: ({ title, lines, ...base }: SidebarTimetableProps) => import("react/jsx-runtime").JSX.Element;
39
45
  Line: () => import("react/jsx-runtime").JSX.Element;
46
+ Space: ({ height, 768: h768, 1024: h1024, 1200: h1200, ...base }: SidebarSpaceProps) => import("react/jsx-runtime").JSX.Element;
40
47
  };
41
48
  export {};
@@ -1,96 +1,113 @@
1
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { clsx as c, baseProps as i } from "../../utils/functions/functions.util.js";
1
+ import { jsx as e, jsxs as b } from "react/jsx-runtime";
2
+ import { clsx as l, baseProps as d, parseSpacingValue as m } from "../../utils/functions/functions.util.js";
3
3
  import { FadeScale as p } from "../../animations/fade-scale/fade-scale.component.js";
4
- import { Certifications as b } from "../certifications/certifications.component.js";
5
- import { Line as S } from "../line/line.component.js";
6
- import { Text as n } from "../text/text.component.js";
4
+ import { Certifications as S } from "../certifications/certifications.component.js";
5
+ import { Line as _ } from "../line/line.component.js";
6
+ import { Text as c } from "../text/text.component.js";
7
7
  import { UserPanel as f } from "../user-panel/user-panel.component.js";
8
8
  import "../../controls/primitives/box/box.component.js";
9
9
  import "../../utils/content/content.component.js";
10
10
  import "lucide-react";
11
11
  import "usehooks-ts";
12
- import { Status as _ } from "../../controls/primitives/status/status.component.js";
13
- import '../../assets/sidebar-BxN_2Ut_.css';const N = "_Sidebar_p7prx_1", h = "_Board_p7prx_5", u = "_Steps_p7prx_14", x = "_Info_p7prx_15", g = "_Step_p7prx_14", I = "_InfoRow_p7prx_28", v = "_SidebarButton_p7prx_36", T = "_Timetable_p7prx_43", d = {
12
+ import { Status as u } from "../../controls/primitives/status/status.component.js";
13
+ import '../../assets/sidebar-C-EyF8q9.css';const N = "_Sidebar_bino6_1", h = "_Board_bino6_5", v = "_Steps_bino6_13", g = "_Info_bino6_14", I = "_Step_bino6_13", y = "_InfoRow_bino6_27", T = "_SidebarButton_bino6_35", B = "_Timetable_bino6_42", w = "_Space_bino6_48", o = {
14
14
  Sidebar: N,
15
15
  Board: h,
16
- Steps: u,
17
- Info: x,
18
- Step: g,
19
- InfoRow: I,
20
- SidebarButton: v,
21
- Timetable: T
22
- }, y = ({ children: a, ...t }) => /* @__PURE__ */ e(
16
+ Steps: v,
17
+ Info: g,
18
+ Step: I,
19
+ InfoRow: y,
20
+ SidebarButton: T,
21
+ Timetable: B,
22
+ Space: w
23
+ }, x = ({ children: a, ...t }) => /* @__PURE__ */ e(
23
24
  "div",
24
25
  {
25
- "data-testid": i(t, "data-testid", "sidebar"),
26
- className: c(d.Sidebar, i(t, "className")),
27
- children: /* @__PURE__ */ e("div", { className: d.Board, children: a })
26
+ "data-testid": d(t, "data-testid", "sidebar"),
27
+ className: l(o.Sidebar, d(t, "className")),
28
+ children: /* @__PURE__ */ e("div", { className: o.Board, children: a })
28
29
  }
29
- ), B = ({ children: a, ...t }) => /* @__PURE__ */ e(
30
- n,
30
+ ), $ = ({ children: a, ...t }) => /* @__PURE__ */ e(
31
+ c,
31
32
  {
32
33
  preset: "sidebar-title",
33
- "data-testid": i(t, "data-testid", "sidebar-title"),
34
- className: i(t, "className"),
34
+ "data-testid": d(t, "data-testid", "sidebar-title"),
35
+ className: d(t, "className"),
35
36
  children: a
36
37
  }
37
- ), w = ({ steps: a, ...t }) => /* @__PURE__ */ e(
38
+ ), z = ({ steps: a, ...t }) => /* @__PURE__ */ e(
38
39
  "div",
39
40
  {
40
- "data-testid": i(t, "data-testid", "sidebar-steps"),
41
- className: c(d.Steps, i(t, "className")),
42
- children: a.map(({ state: s, text: r }) => /* @__PURE__ */ m("div", { className: d.Step, "data-testid": "sidebar-step", children: [
43
- /* @__PURE__ */ e(_, { state: s }),
44
- /* @__PURE__ */ e(n, { tag: "span", weight: "medium", size: "body-small", color: s === "idle" ? "grey-400" : "text-primary", children: r })
45
- ] }, r))
41
+ "data-testid": d(t, "data-testid", "sidebar-steps"),
42
+ className: l(o.Steps, d(t, "className")),
43
+ children: a.map(({ state: i, text: s }) => /* @__PURE__ */ b("div", { className: o.Step, "data-testid": "sidebar-step", children: [
44
+ /* @__PURE__ */ e(u, { state: i }),
45
+ /* @__PURE__ */ e(c, { tag: "span", weight: "medium", size: "body-small", color: i === "idle" ? "grey-400" : "text-primary", children: s })
46
+ ] }, s))
46
47
  }
47
- ), $ = ({ rows: a, ...t }) => {
48
- const s = a.filter(([, r]) => r.trim() !== "");
49
- return s.length === 0 ? null : /* @__PURE__ */ e(
48
+ ), R = ({ rows: a, ...t }) => {
49
+ const i = a.filter(([, s]) => s.trim() !== "");
50
+ return i.length === 0 ? null : /* @__PURE__ */ e(
50
51
  "div",
51
52
  {
52
- "data-testid": i(t, "data-testid", "sidebar-info"),
53
- className: c(d.Info, i(t, "className")),
54
- children: s.map(([r, l], o) => /* @__PURE__ */ m("div", { className: d.InfoRow, "data-testid": "sidebar-info-row", children: [
55
- /* @__PURE__ */ e(n, { tag: "span", size: "body-small", color: "text-secondary", children: r }),
56
- /* @__PURE__ */ e(n, { tag: "span", size: "body-small", align: "right", children: l })
57
- ] }, `${r}-${o}`))
53
+ "data-testid": d(t, "data-testid", "sidebar-info"),
54
+ className: l(o.Info, d(t, "className")),
55
+ children: i.map(([s, n], r) => /* @__PURE__ */ b("div", { className: o.InfoRow, "data-testid": "sidebar-info-row", children: [
56
+ /* @__PURE__ */ e(c, { tag: "span", size: "body-small", color: "text-secondary", children: s }),
57
+ /* @__PURE__ */ e(c, { tag: "span", size: "body-small", align: "right", children: n })
58
+ ] }, `${s}-${r}`))
58
59
  }
59
60
  );
60
- }, z = ({ isOpen: a, title: t, data: s, button: r, onClick: l, ...o }) => /* @__PURE__ */ e(
61
+ }, j = ({ isOpen: a, title: t, data: i, button: s, onClick: n, ...r }) => /* @__PURE__ */ e(
61
62
  p,
62
63
  {
63
64
  name: "sidebar-user",
64
65
  condition: a,
65
- "data-testid": i(o, "data-testid", "sidebar-user"),
66
- className: i(o, "className"),
67
- children: /* @__PURE__ */ e(f, { title: t, data: s, button: r, onClick: l })
66
+ "data-testid": d(r, "data-testid", "sidebar-user"),
67
+ className: d(r, "className"),
68
+ children: /* @__PURE__ */ e(f, { title: t, data: i, button: s, onClick: n })
68
69
  }
69
- ), R = ({ isVisible: a, children: t, ...s }) => /* @__PURE__ */ e(
70
+ ), C = ({ isVisible: a, children: t, ...i }) => /* @__PURE__ */ e(
70
71
  p,
71
72
  {
72
73
  name: "sidebar-submit",
73
74
  condition: a,
74
- "data-testid": i(s, "data-testid", "sidebar-submit"),
75
- className: i(s, "className"),
76
- children: /* @__PURE__ */ e("div", { className: d.SidebarButton, children: t })
75
+ "data-testid": d(i, "data-testid", "sidebar-submit"),
76
+ className: d(i, "className"),
77
+ children: /* @__PURE__ */ e("div", { className: o.SidebarButton, children: t })
77
78
  }
78
- ), j = (a) => /* @__PURE__ */ e(b, { ...a }), C = ({ title: a, lines: t, ...s }) => {
79
- const r = i(s, "data-testid", "sidebar-timetable");
80
- return /* @__PURE__ */ m("div", { "data-testid": r, className: c(d.Timetable, i(s, "className")), children: [
81
- /* @__PURE__ */ e(n, { tag: "span", size: "body-small", color: "text-secondary", "data-testid": `${r}-title`, children: a }),
82
- t.map((l, o) => /* @__PURE__ */ e(n, { tag: "span", size: "body-small", "data-testid": `${r}-line-${o}`, children: l }, o))
79
+ ), L = (a) => /* @__PURE__ */ e(S, { ...a }), U = ({ title: a, lines: t, ...i }) => {
80
+ const s = d(i, "data-testid", "sidebar-timetable");
81
+ return /* @__PURE__ */ b("div", { "data-testid": s, className: l(o.Timetable, d(i, "className")), children: [
82
+ /* @__PURE__ */ e(c, { tag: "span", size: "body-small", color: "text-secondary", "data-testid": `${s}-title`, children: a }),
83
+ t.map((n, r) => /* @__PURE__ */ e(c, { tag: "span", size: "body-small", "data-testid": `${s}-line-${r}`, children: n }, r))
83
84
  ] });
84
- }, L = () => /* @__PURE__ */ e(S, {}), M = Object.assign(y, {
85
- Title: B,
86
- Steps: w,
87
- Info: $,
88
- User: z,
89
- Submit: R,
90
- Certifications: j,
91
- Timetable: C,
92
- Line: L
85
+ }, P = () => /* @__PURE__ */ e(_, {}), F = ({ height: a, 768: t, 1024: i, 1200: s, ...n }) => {
86
+ const r = {
87
+ "--rm-ui-sidebar-space-base": m(a),
88
+ ...t !== void 0 ? { "--rm-ui-sidebar-space-768": m(t) } : {},
89
+ ...i !== void 0 ? { "--rm-ui-sidebar-space-1024": m(i) } : {},
90
+ ...s !== void 0 ? { "--rm-ui-sidebar-space-1200": m(s) } : {}
91
+ };
92
+ return /* @__PURE__ */ e(
93
+ "div",
94
+ {
95
+ "data-testid": d(n, "data-testid", "sidebar-space"),
96
+ className: l(o.Space, d(n, "className")),
97
+ style: r
98
+ }
99
+ );
100
+ }, W = Object.assign(x, {
101
+ Title: $,
102
+ Steps: z,
103
+ Info: R,
104
+ User: j,
105
+ Submit: C,
106
+ Certifications: L,
107
+ Timetable: U,
108
+ Line: P,
109
+ Space: F
93
110
  });
94
111
  export {
95
- M as Sidebar
112
+ W as Sidebar
96
113
  };
package/dist/main.d.ts CHANGED
@@ -53,4 +53,4 @@ export { Svg, type SvgProps } from './utils/svg/svg.component';
53
53
  export { Text, type TextProps } from './components/text';
54
54
  export { UserPanel } from './components/user-panel';
55
55
  export { Warranty, type WarrantyProps } from './components/warranty';
56
- export { birthDateToGerman, blurAfterClick, clsx, containsHtml, convertDateFormat, convertToDateNumber, convertToEuro, defaultTo, deleteUrlParameters, fakeAwait, formatDate, formatEuroAmount, formatNumber, getDate, getFromJson, getKeysFromUrlParams, getPath, getSalutationLabel, getSecretFromUrlParams, getSettlementPercent, getTimeStamp, isHtmlString, isLeapYear, isString, isValidBirthDate, isValidDate, isValidHouseNumber, isWithinTimeStamps, last, once, pickValues, publicSrcPath, removeLastNumberSuffix, removeSlashAtEnd, searchParams, sortSearchParams, stripRequestName, toGermanDate, trimAllStringKeys, updateLastPathSubdirectory, withControl, } from './utils/functions';
56
+ export { birthDateToGerman, blurAfterClick, clsx, containsHtml, convertDateFormat, convertToDateNumber, convertToEuro, defaultTo, deleteUrlParameters, fakeAwait, formatDate, formatEuroAmount, formatNumber, getDate, getFromJson, getKeysFromUrlParams, getPath, getSalutationLabel, getSecretFromUrlParams, getSettlementPercent, getTimeStamp, isHtmlString, isLeapYear, isString, isValidBirthDate, isValidDate, isValidHouseNumber, isWithinTimeStamps, last, once, parseSpacingValue, pickValues, publicSrcPath, removeLastNumberSuffix, removeSlashAtEnd, searchParams, sortSearchParams, stripRequestName, toGermanDate, trimAllStringKeys, updateLastPathSubdirectory, withControl, } from './utils/functions';
package/dist/main.js CHANGED
@@ -16,8 +16,8 @@ import { Radio as v } from "./controls/interactives/radio/radio.component.js";
16
16
  import { TextArea as N } from "./controls/interactives/text-area/text-area.component.js";
17
17
  import { TextField as w } from "./controls/interactives/text-field/text-field.component.js";
18
18
  import { Box as H } from "./controls/primitives/box/box.component.js";
19
- import { Caption as M } from "./controls/primitives/caption/caption.component.js";
20
- import { Choice as V } from "./controls/primitives/choice/choice.component.js";
19
+ import { Caption as V } from "./controls/primitives/caption/caption.component.js";
20
+ import { Choice as U } from "./controls/primitives/choice/choice.component.js";
21
21
  import { ErrorMessage as K } from "./controls/primitives/error-message/error-message.component.js";
22
22
  import { HiddenInput as q } from "./controls/primitives/hidden-input/hidden-input.component.js";
23
23
  import { Label as J } from "./controls/primitives/label/label.component.js";
@@ -43,8 +43,8 @@ import { Loader as vr } from "./components/loader/loader.component.js";
43
43
  import { MainAttachment as Nr } from "./components/main-attachment/main-attachment.component.js";
44
44
  import { Message as wr } from "./components/message/message.component.js";
45
45
  import { MessageBlock as Hr } from "./components/message-block/message-block.component.js";
46
- import { NotFound as Mr } from "./components/not-found/not-found.component.js";
47
- import { Payment as Vr } from "./components/payment/payment.component.js";
46
+ import { NotFound as Vr } from "./components/not-found/not-found.component.js";
47
+ import { Payment as Ur } from "./components/payment/payment.component.js";
48
48
  import { PriceLine as Kr } from "./components/price-line/price-line.component.js";
49
49
  import { Sidebar as qr } from "./components/sidebar/sidebar.component.js";
50
50
  import { SignCtaTracker as Jr } from "./components/sign-cta-tracker/sign-cta-tracker.component.js";
@@ -53,7 +53,7 @@ import { Svg as Qr } from "./utils/svg/svg.component.js";
53
53
  import { Text as Zr } from "./components/text/text.component.js";
54
54
  import { UserPanel as $r } from "./components/user-panel/user-panel.component.js";
55
55
  import { Warranty as oo } from "./components/warranty/warranty.component.js";
56
- import { birthDateToGerman as to, blurAfterClick as ao, clsx as mo, containsHtml as po, convertDateFormat as fo, convertToDateNumber as xo, convertToEuro as io, defaultTo as no, deleteUrlParameters as so, fakeAwait as lo, formatDate as co, formatEuroAmount as uo, formatNumber as go, getDate as So, getFromJson as bo, getKeysFromUrlParams as Po, getPath as ho, getSalutationLabel as Do, getSecretFromUrlParams as To, getSettlementPercent as Fo, getTimeStamp as Lo, isHtmlString as Ao, isLeapYear as Co, isString as Bo, isValidBirthDate as ko, isValidDate as vo, isValidHouseNumber as yo, isWithinTimeStamps as No, last as Ro, once as wo, pickValues as Eo, publicSrcPath as Ho, removeLastNumberSuffix as Io, removeSlashAtEnd as Mo, searchParams as Uo, sortSearchParams as Vo, stripRequestName as Go, toGermanDate as Ko, trimAllStringKeys as Wo, updateLastPathSubdirectory as qo, withControl as zo } from "./utils/functions/functions.util.js";
56
+ import { birthDateToGerman as to, blurAfterClick as ao, clsx as mo, containsHtml as po, convertDateFormat as fo, convertToDateNumber as xo, convertToEuro as io, defaultTo as no, deleteUrlParameters as so, fakeAwait as lo, formatDate as co, formatEuroAmount as uo, formatNumber as go, getDate as So, getFromJson as bo, getKeysFromUrlParams as Po, getPath as ho, getSalutationLabel as Do, getSecretFromUrlParams as To, getSettlementPercent as Fo, getTimeStamp as Lo, isHtmlString as Ao, isLeapYear as Co, isString as Bo, isValidBirthDate as ko, isValidDate as vo, isValidHouseNumber as yo, isWithinTimeStamps as No, last as Ro, once as wo, parseSpacingValue as Eo, pickValues as Ho, publicSrcPath as Io, removeLastNumberSuffix as Vo, removeSlashAtEnd as Mo, searchParams as Uo, sortSearchParams as Go, stripRequestName as Ko, toGermanDate as Wo, trimAllStringKeys as qo, updateLastPathSubdirectory as zo, withControl as Jo } from "./utils/functions/functions.util.js";
57
57
  import './assets/main-DZmlIs7j.css';export {
58
58
  Z as Accordion,
59
59
  $ as AccordionTable,
@@ -63,12 +63,12 @@ import './assets/main-DZmlIs7j.css';export {
63
63
  c as ButtonCard,
64
64
  u as ButtonRadio,
65
65
  S as ButtonText,
66
- M as Caption,
66
+ V as Caption,
67
67
  P as CardImage,
68
68
  D as CardText,
69
69
  mr as Certifications,
70
70
  F as Checkbox,
71
- V as Choice,
71
+ U as Choice,
72
72
  fr as DataProtectedLabel,
73
73
  ir as Dialog,
74
74
  sr as DialogArticle,
@@ -93,8 +93,8 @@ import './assets/main-DZmlIs7j.css';export {
93
93
  Nr as MainAttachment,
94
94
  wr as Message,
95
95
  Hr as MessageBlock,
96
- Mr as NotFound,
97
- Vr as Payment,
96
+ Vr as NotFound,
97
+ Ur as Payment,
98
98
  Kr as PriceLine,
99
99
  v as Radio,
100
100
  j as RadioLabel,
@@ -139,15 +139,16 @@ import './assets/main-DZmlIs7j.css';export {
139
139
  No as isWithinTimeStamps,
140
140
  Ro as last,
141
141
  wo as once,
142
- Eo as pickValues,
143
- Ho as publicSrcPath,
144
- Io as removeLastNumberSuffix,
142
+ Eo as parseSpacingValue,
143
+ Ho as pickValues,
144
+ Io as publicSrcPath,
145
+ Vo as removeLastNumberSuffix,
145
146
  Mo as removeSlashAtEnd,
146
147
  Uo as searchParams,
147
- Vo as sortSearchParams,
148
- Go as stripRequestName,
149
- Ko as toGermanDate,
150
- Wo as trimAllStringKeys,
151
- qo as updateLastPathSubdirectory,
152
- zo as withControl
148
+ Go as sortSearchParams,
149
+ Ko as stripRequestName,
150
+ Wo as toGermanDate,
151
+ qo as trimAllStringKeys,
152
+ zo as updateLastPathSubdirectory,
153
+ Jo as withControl
153
154
  };
@@ -43,6 +43,13 @@ export declare const convertToEuro: (num: number, options?: {
43
43
  * Accepts strings, numbers, bigints, arrays (recursively), and dictionaries (truthy values' keys are included).
44
44
  * Falsy values (`null`, `undefined`, `false`, `0`, `0n`, `''`) are skipped.
45
45
  */
46
+ /**
47
+ * Resolves a spacing-style string to a valid CSS value.
48
+ * - `'--foo'` (starts with `--`) → `var(--foo)` — treated as a CSS custom property reference.
49
+ * - `'12'` / `'-4'` (integer-like) → `'12px'` / `'-4px'` — appended with `px`.
50
+ * - anything else → passed through unchanged (so `'1rem'`, `'50%'`, `'auto'`, etc. work).
51
+ */
52
+ export declare const parseSpacingValue: (value: string) => string;
46
53
  export declare const clsx: (...inputs: ClsxClassValue[]) => string;
47
54
  export declare const removeSlashAtEnd: (url: string | null) => string;
48
55
  export declare const convertDateFormat: (dateString: string) => string;
@@ -1,4 +1,4 @@
1
- function $(t, e, r) {
1
+ function y(t, e, r) {
2
2
  return e <= t && t < r;
3
3
  }
4
4
  function S(t) {
@@ -14,10 +14,10 @@ function D(t) {
14
14
  function P(t) {
15
15
  return b(t) && D(t);
16
16
  }
17
- const E = (t, e) => (r) => {
17
+ const x = (t, e) => (r) => {
18
18
  e?.prevent && r.preventDefault(), e?.stop && r.stopPropagation(), e?.blur && r.currentTarget.blur(), e?.withEvent ? t(r) : t();
19
19
  };
20
- function x(t, e, r) {
20
+ function E(t, e, r) {
21
21
  return t[e] ? t[e] : r;
22
22
  }
23
23
  const j = (t, e) => new Intl.NumberFormat("de-DE", {
@@ -25,7 +25,7 @@ const j = (t, e) => new Intl.NumberFormat("de-DE", {
25
25
  currency: "EUR",
26
26
  minimumFractionDigits: e?.skipZeroCents && t % 1 === 0 ? 0 : 2,
27
27
  maximumFractionDigits: e?.skipZeroCents && t % 1 === 0 ? 0 : 2
28
- }).format(t), N = (...t) => {
28
+ }).format(t), R = (t) => t.startsWith("--") ? `var(${t})` : /^-?\d+$/.test(t) ? `${t}px` : t, N = (...t) => {
29
29
  const e = [];
30
30
  for (const r of t)
31
31
  if (r) {
@@ -43,13 +43,13 @@ const j = (t, e) => new Intl.NumberFormat("de-DE", {
43
43
  r[n] && e.push(n);
44
44
  }
45
45
  return e.join(" ");
46
- }, v = (t) => typeof t != "string" ? "" : t.replace(/\/$/, ""), R = (t) => {
46
+ }, H = (t) => typeof t != "string" ? "" : t.replace(/\/$/, ""), O = (t) => {
47
47
  const e = t.split("/");
48
48
  return e[2] + "-" + e[1] + "-" + e[0];
49
49
  }, w = (t) => {
50
50
  const e = Array.from(t.entries());
51
51
  return e.sort(([r], [n]) => r === "secret" ? -1 : n === "secret" ? 1 : r === "page" ? -1 : n === "page" ? 1 : 0), new URLSearchParams(e);
52
- }, F = (t) => parseFloat(String(t)).toFixed().replace(".", ","), H = (t, e = !0) => {
52
+ }, F = (t) => parseFloat(String(t)).toFixed().replace(".", ","), Y = (t, e = !0) => {
53
53
  const r = [
54
54
  { value: "male", label: "Herr" },
55
55
  { value: "female", label: "Frau" },
@@ -59,7 +59,7 @@ const j = (t, e) => new Intl.NumberFormat("de-DE", {
59
59
  { value: "Divers", label: "Divers" }
60
60
  ].find((n) => n.value === t)?.label || "";
61
61
  return (t === "male" || t === "Herr") && e ? "Herrn" : r;
62
- }, O = (t, e) => t > 0 ? String(F(e / t * 100)) : "0,00", Y = async (t) => {
62
+ }, v = (t, e) => t > 0 ? String(F(e / t * 100)) : "0,00", z = async (t) => {
63
63
  const e = typeof t == "string" ? Number(t) : t;
64
64
  return await new Promise((r) => {
65
65
  setTimeout(() => {
@@ -79,15 +79,15 @@ const j = (t, e) => new Intl.NumberFormat("de-DE", {
79
79
  else if (s > 30 && (o === 4 || o === 6 || o === 9 || o === 11))
80
80
  return !1;
81
81
  return !0;
82
- }, z = (t) => {
82
+ }, L = (t) => {
83
83
  if (/^\s*(3[01]|[12][0-9]|0?[1-9])\/(1[012]|0?[1-9])\/((?:19|20)\d{2})\s*$/g.test(t) && M(t)) {
84
84
  const [r, n, s] = t.split("/"), o = /* @__PURE__ */ new Date(), a = String(o.getFullYear() - 18), i = l(String(o.getMonth() + 1)), c = l(`${o.getDate()}`), u = /* @__PURE__ */ new Date(`${s}-${n}-${r}T00:00:00`), f = /* @__PURE__ */ new Date(`${a}-${i}-${c}T00:00:00`);
85
85
  return u <= f;
86
86
  }
87
87
  return !1;
88
- }, L = (t) => $(t.length, 1, 20), I = (t, e) => {
88
+ }, I = (t) => y(t.length, 1, 20), U = (t, e) => {
89
89
  t.currentTarget.blur(), e();
90
- }, U = (t, e) => e === "/" ? e + t + "/" : e + "/" + t + "/", C = (t, e) => "/" + [e !== "/" ? e : "", t].join("*").replace(/\//g, "*").split("*").filter(Boolean).join("/"), h = (t) => new URLSearchParams(t), A = (t, e) => t == null || Object.is(t, NaN) ? e : t, B = (t) => A(h(t).get("secret"), "");
90
+ }, C = (t, e) => e === "/" ? e + t + "/" : e + "/" + t + "/", V = (t, e) => "/" + [e !== "/" ? e : "", t].join("*").replace(/\//g, "*").split("*").filter(Boolean).join("/"), h = (t) => new URLSearchParams(t), A = (t, e) => t == null || Object.is(t, NaN) ? e : t, B = (t) => A(h(t).get("secret"), "");
91
91
  function G(t, e, r = "") {
92
92
  const n = h(e), s = (o) => n.get(o)?.trim() || r;
93
93
  return Array.isArray(t) ? t.map((o) => s(o)) : s(t);
@@ -96,24 +96,24 @@ const J = (t, ...e) => {
96
96
  const r = new URL(t), n = new URLSearchParams(r.search);
97
97
  return e.forEach((s) => n.delete(s)), `${r.origin}${r.pathname}?${w(n).toString()}${r.hash}`;
98
98
  };
99
- function V(t = /* @__PURE__ */ new Date()) {
100
- const e = t.getTimezoneOffset(), r = e > 0 ? "-" : "+", n = (y) => String(Math.floor(Math.abs(y))).padStart(2, "0"), s = t.getFullYear(), o = n(t.getMonth() + 1), a = n(t.getDate()), i = n(t.getHours()), c = n(t.getMinutes()), u = n(t.getSeconds()), f = n(e / 60), p = n(e % 60), d = `${r}${f}:${p}`;
99
+ function W(t = /* @__PURE__ */ new Date()) {
100
+ const e = t.getTimezoneOffset(), r = e > 0 ? "-" : "+", n = ($) => String(Math.floor(Math.abs($))).padStart(2, "0"), s = t.getFullYear(), o = n(t.getMonth() + 1), a = n(t.getDate()), i = n(t.getHours()), c = n(t.getMinutes()), u = n(t.getSeconds()), f = n(e / 60), p = n(e % 60), d = `${r}${f}:${p}`;
101
101
  return `${s}-${o}-${a}T${i}:${c}:${u}${d}`;
102
102
  }
103
103
  function k(t, e) {
104
104
  const r = (/* @__PURE__ */ new Date()).getTime(), n = new Date(t).getTime() || r, s = new Date(e).getTime() || r;
105
105
  return r > n && r < s;
106
106
  }
107
- const K = (t) => t[t.length - 1], W = (t) => new Intl.NumberFormat("de-DE", { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(t), Z = (t) => {
107
+ const K = (t) => t[t.length - 1], Z = (t) => new Intl.NumberFormat("de-DE", { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(t), q = (t) => {
108
108
  if (!t) return "";
109
109
  const e = t.split("/");
110
110
  if (e.length !== 3 || !e.every((o) => /^\d+$/.test(o))) return "";
111
111
  const [r, n, s] = e;
112
112
  return `${r}.${n}.${s}`;
113
- }, q = (t) => {
113
+ }, _ = (t) => {
114
114
  let e, r = !1;
115
115
  return () => (r || (e = t(), r = !0), e);
116
- }, _ = (t) => {
116
+ }, Q = (t) => {
117
117
  if (!t) return "";
118
118
  if (/^\d{2}\.\d{2}\.\d{4}$/.test(t)) return t;
119
119
  const e = t.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
@@ -127,21 +127,21 @@ const K = (t) => t[t.length - 1], W = (t) => new Intl.NumberFormat("de-DE", { mi
127
127
  return `${o}.${s}.${n}`;
128
128
  }
129
129
  return "";
130
- }, Q = (t) => {
130
+ }, X = (t) => {
131
131
  const e = t.match(new RegExp(/GET\/authenticate/)), r = t.match(new RegExp(/POST\/marketing\/case/));
132
132
  return e ? e[0] : r ? r[0] : t;
133
133
  };
134
- function X(t) {
134
+ function tt(t) {
135
135
  const e = t.match(/^(.*)_(\d+)$/);
136
136
  return e ? [e[1], Number.parseInt(e[2])] : [t, -1];
137
137
  }
138
- function tt(t, e) {
138
+ function et(t, e) {
139
139
  const r = t.endsWith("/"), n = r ? t.slice(0, -1) : t;
140
140
  if (!/^\/([^/]+\/)*[^/]+$/.test(n)) return t;
141
141
  const s = n.split("/");
142
142
  return s.length <= 2 ? t : (s[s.length - 1] = e, s.join("/") + (r ? "/" : ""));
143
143
  }
144
- function et(t, e) {
144
+ function rt(t, e) {
145
145
  const r = t.getFullYear(), n = t.getMonth() + 1, s = t.getDate();
146
146
  if (e?.daysFromNow) {
147
147
  const o = new Date(t);
@@ -167,18 +167,18 @@ const m = (t) => typeof t == "object" && t !== null && !Array.isArray(t), g = (t
167
167
  ) : m(n) ? e[r] = g(n) : e[r] = n;
168
168
  return e;
169
169
  };
170
- function rt(t) {
170
+ function nt(t) {
171
171
  if (!t) return "";
172
172
  const e = new Date(t);
173
173
  if (isNaN(e.getTime())) return "";
174
174
  const r = String(e.getDate()).padStart(2, "0"), n = String(e.getMonth() + 1).padStart(2, "0"), s = e.getFullYear();
175
175
  return `${r}.${n}.${s}`;
176
176
  }
177
- function nt(t) {
177
+ function st(t) {
178
178
  const e = Object.entries(t).filter(([, r]) => S(r) ? !1 : typeof r == "string" ? r.trim() !== "" : !0);
179
179
  return e.length ? Object.fromEntries(e) : null;
180
180
  }
181
- const st = (t, e, r) => {
181
+ const ot = (t, e, r) => {
182
182
  try {
183
183
  const n = JSON.parse(t);
184
184
  if (!e) return n;
@@ -192,46 +192,47 @@ const st = (t, e, r) => {
192
192
  }
193
193
  };
194
194
  export {
195
- x as baseProps,
196
- Z as birthDateToGerman,
197
- I as blurAfterClick,
195
+ E as baseProps,
196
+ q as birthDateToGerman,
197
+ U as blurAfterClick,
198
198
  N as clsx,
199
199
  D as containsHtml,
200
- R as convertDateFormat,
200
+ O as convertDateFormat,
201
201
  l as convertToDateNumber,
202
202
  j as convertToEuro,
203
203
  A as defaultTo,
204
204
  J as deleteUrlParameters,
205
- Y as fakeAwait,
206
- rt as formatDate,
207
- W as formatEuroAmount,
205
+ z as fakeAwait,
206
+ nt as formatDate,
207
+ Z as formatEuroAmount,
208
208
  F as formatNumber,
209
- et as getDate,
210
- st as getFromJson,
209
+ rt as getDate,
210
+ ot as getFromJson,
211
211
  G as getKeysFromUrlParams,
212
- U as getPath,
213
- H as getSalutationLabel,
212
+ C as getPath,
213
+ Y as getSalutationLabel,
214
214
  B as getSecretFromUrlParams,
215
- O as getSettlementPercent,
216
- V as getTimeStamp,
215
+ v as getSettlementPercent,
216
+ W as getTimeStamp,
217
217
  P as isHtmlString,
218
218
  T as isLeapYear,
219
219
  b as isString,
220
- z as isValidBirthDate,
220
+ L as isValidBirthDate,
221
221
  M as isValidDate,
222
- L as isValidHouseNumber,
222
+ I as isValidHouseNumber,
223
223
  k as isWithinTimeStamps,
224
224
  K as last,
225
- q as once,
226
- nt as pickValues,
227
- C as publicSrcPath,
228
- X as removeLastNumberSuffix,
229
- v as removeSlashAtEnd,
225
+ _ as once,
226
+ R as parseSpacingValue,
227
+ st as pickValues,
228
+ V as publicSrcPath,
229
+ tt as removeLastNumberSuffix,
230
+ H as removeSlashAtEnd,
230
231
  h as searchParams,
231
232
  w as sortSearchParams,
232
- Q as stripRequestName,
233
- _ as toGermanDate,
233
+ X as stripRequestName,
234
+ Q as toGermanDate,
234
235
  g as trimAllStringKeys,
235
- tt as updateLastPathSubdirectory,
236
- E as withControl
236
+ et as updateLastPathSubdirectory,
237
+ x as withControl
237
238
  };
@@ -1,10 +1,10 @@
1
- import { baseProps as a, birthDateToGerman as r, blurAfterClick as o, clsx as m, containsHtml as i, convertDateFormat as s, convertToDateNumber as l, convertToEuro as n, defaultTo as u, deleteUrlParameters as c, fakeAwait as S, formatDate as g, formatEuroAmount as b, formatNumber as h, getDate as P, getFromJson as f, getKeysFromUrlParams as p, getPath as d, getSalutationLabel as D, getSecretFromUrlParams as T, getSettlementPercent as v, getTimeStamp as A, isHtmlString as N, isLeapYear as F, isString as L, isValidBirthDate as V, isValidDate as k, isValidHouseNumber as x, isWithinTimeStamps as y, last as E, once as H, pickValues as U, publicSrcPath as w, removeLastNumberSuffix as C, removeSlashAtEnd as G, searchParams as K, sortSearchParams as q, stripRequestName as B, toGermanDate as J, trimAllStringKeys as R, updateLastPathSubdirectory as W, withControl as Y } from "./functions.util.js";
1
+ import { baseProps as a, birthDateToGerman as r, blurAfterClick as o, clsx as i, containsHtml as m, convertDateFormat as s, convertToDateNumber as l, convertToEuro as n, defaultTo as u, deleteUrlParameters as c, fakeAwait as S, formatDate as g, formatEuroAmount as p, formatNumber as b, getDate as h, getFromJson as P, getKeysFromUrlParams as f, getPath as d, getSalutationLabel as D, getSecretFromUrlParams as T, getSettlementPercent as v, getTimeStamp as A, isHtmlString as N, isLeapYear as V, isString as F, isValidBirthDate as L, isValidDate as k, isValidHouseNumber as x, isWithinTimeStamps as y, last as E, once as H, parseSpacingValue as U, pickValues as w, publicSrcPath as C, removeLastNumberSuffix as G, removeSlashAtEnd as K, searchParams as q, sortSearchParams as B, stripRequestName as J, toGermanDate as R, trimAllStringKeys as W, updateLastPathSubdirectory as Y, withControl as j } from "./functions.util.js";
2
2
  export {
3
3
  a as baseProps,
4
4
  r as birthDateToGerman,
5
5
  o as blurAfterClick,
6
- m as clsx,
7
- i as containsHtml,
6
+ i as clsx,
7
+ m as containsHtml,
8
8
  s as convertDateFormat,
9
9
  l as convertToDateNumber,
10
10
  n as convertToEuro,
@@ -12,34 +12,35 @@ export {
12
12
  c as deleteUrlParameters,
13
13
  S as fakeAwait,
14
14
  g as formatDate,
15
- b as formatEuroAmount,
16
- h as formatNumber,
17
- P as getDate,
18
- f as getFromJson,
19
- p as getKeysFromUrlParams,
15
+ p as formatEuroAmount,
16
+ b as formatNumber,
17
+ h as getDate,
18
+ P as getFromJson,
19
+ f as getKeysFromUrlParams,
20
20
  d as getPath,
21
21
  D as getSalutationLabel,
22
22
  T as getSecretFromUrlParams,
23
23
  v as getSettlementPercent,
24
24
  A as getTimeStamp,
25
25
  N as isHtmlString,
26
- F as isLeapYear,
27
- L as isString,
28
- V as isValidBirthDate,
26
+ V as isLeapYear,
27
+ F as isString,
28
+ L as isValidBirthDate,
29
29
  k as isValidDate,
30
30
  x as isValidHouseNumber,
31
31
  y as isWithinTimeStamps,
32
32
  E as last,
33
33
  H as once,
34
- U as pickValues,
35
- w as publicSrcPath,
36
- C as removeLastNumberSuffix,
37
- G as removeSlashAtEnd,
38
- K as searchParams,
39
- q as sortSearchParams,
40
- B as stripRequestName,
41
- J as toGermanDate,
42
- R as trimAllStringKeys,
43
- W as updateLastPathSubdirectory,
44
- Y as withControl
34
+ U as parseSpacingValue,
35
+ w as pickValues,
36
+ C as publicSrcPath,
37
+ G as removeLastNumberSuffix,
38
+ K as removeSlashAtEnd,
39
+ q as searchParams,
40
+ B as sortSearchParams,
41
+ J as stripRequestName,
42
+ R as toGermanDate,
43
+ W as trimAllStringKeys,
44
+ Y as updateLastPathSubdirectory,
45
+ j as withControl
45
46
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "3.3.0",
4
+ "version": "3.4.0",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._Sidebar_p7prx_1{display:block}._Board_p7prx_5{display:flex;flex-direction:column;gap:var(--rm-ui-padding-md);border-radius:var(--rm-ui-border-radius-md);padding:var(--rm-ui-padding-lg);background-color:var(--rm-ui-sidebar-bg)}._Steps_p7prx_14,._Info_p7prx_15{display:flex;flex-direction:column;align-items:flex-start;gap:var(--rm-ui-padding-sm)}._Step_p7prx_14{display:inline-flex;align-items:center;gap:var(--rm-ui-padding-xs)}._InfoRow_p7prx_28{display:inline-flex;align-items:center;justify-content:space-between;gap:var(--rm-ui-padding-xs);width:100%}._SidebarButton_p7prx_36{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}._Timetable_p7prx_43{display:flex;flex-direction:column;gap:var(--rm-ui-padding-xxs)}@media screen and (min-width:1024px){._Board_p7prx_5{padding:var(--rm-ui-padding-xl)}}@media screen and (min-width:1200px){._Board_p7prx_5{padding:var(--rm-ui-padding-xxl);gap:var(--rm-ui-padding-lg)}}