@arthurzakharov/ui-kit 3.11.0 → 3.13.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
+ ._Dropzone_1pg48_1{display:flex;flex-direction:column;align-items:stretch;gap:var(--rm-ui-padding-sm);width:100%}._Area_1pg48_9{display:flex;flex-direction:column;align-items:stretch;gap:var(--rm-ui-padding-xs);width:100%;padding:var(--rm-ui-padding-xl);background-color:var(--rm-ui-color-background-primary, #fff);border:1px dashed var(--rm-ui-grey-300);border-radius:var(--rm-ui-border-radius-md);transition:border-color .12s ease,background-color .12s ease}._Area_1pg48_9._HasChildren_1pg48_24{padding-left:var(--rm-ui-padding-md);padding-right:var(--rm-ui-padding-md)}._Area_1pg48_9._Active_1pg48_29{border-color:var(--rm-ui-color-action)}._Area_1pg48_9._Disabled_1pg48_33{opacity:.5}._HiddenInput_1pg48_37{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._Trigger_1pg48_49{display:flex;flex-direction:column;align-items:center;gap:var(--rm-ui-padding-xs);width:100%;padding:0;background:none;border:0;cursor:pointer;color:inherit;font:inherit}._Trigger_1pg48_49:disabled{cursor:not-allowed}._Trigger_1pg48_49:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:4px}._Icon_1pg48_72{width:24px;height:24px;flex-shrink:0;stroke:var(--rm-ui-color-action);fill:var(--rm-ui-color-action)}._Icon_1pg48_72>path{stroke:#fff;fill:none}._Invitation_1pg48_85{text-align:center;font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Invitation_1pg48_85 strong{font-weight:var(--rm-ui-font-weight-medium);text-decoration:underline}._HelpText_1pg48_97{text-align:center;font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-text-secondary);opacity:.55}
@@ -0,0 +1 @@
1
+ ._FileItem_5ospg_1{display:flex;flex-direction:row;align-items:center;gap:var(--rm-ui-padding-sm);width:100%;padding:var(--rm-ui-padding-sm);border:1px solid rgba(0,0,0,.1);border-radius:12px}._CheckIcon_5ospg_12{flex-shrink:0;width:24px;height:24px;stroke:var(--rm-ui-color-uploade-icon);fill:var(--rm-ui-color-uploade-icon)}._CheckIcon_5ospg_12>path{stroke:#fff;fill:none}._FileIcon_5ospg_25{flex-shrink:0;width:24px;height:24px;color:var(--rm-ui-color-text-primary)}._Body_5ospg_32{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}._Name_5ospg_39{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._Size_5ospg_48{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-text-secondary)}._DeleteButton_5ospg_54{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;background:none;border:0;cursor:pointer;color:var(--rm-ui-color-delete-icon);transition:opacity .12s ease}._DeleteButton_5ospg_54:hover:not(:disabled){opacity:.8}._DeleteButton_5ospg_54:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:2px}._DeleteButton_5ospg_54:disabled{cursor:not-allowed;opacity:.5}._DeleteIcon_5ospg_81{width:24px;height:24px}
@@ -1 +1 @@
1
- *,*:before,*:after{margin:0;padding:0;box-sizing:border-box}body{background-color:var(--rm-ui-body-bg)}body,input,textarea{font-family:Lato,sans-serif;font-weight:var(--rm-ui-font-weight-regular);font-size:16px;line-height:24px;-webkit-hyphens:manual;hyphens:manual;white-space:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul,ol{list-style:none;margin:0;padding:0}h1,h2,h3,h4,h5,h6,b,strong{font-weight:var(--rm-ui-font-weight-medium)}h1{font-size:var(--rm-ui-font-size-hl1);line-height:var(--rm-ui-line-height-hl1)}h2{font-size:var(--rm-ui-font-size-hl2);line-height:var(--rm-ui-line-height-hl2)}h3{font-size:var(--rm-ui-font-size-hl3);line-height:var(--rm-ui-line-height-hl3)}h4{font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4)}h5,h6{font-size:var(--rm-ui-font-size-hl5);line-height:var(--rm-ui-line-height-hl5)}a{text-decoration:none;color:inherit;border-radius:var(--rm-ui-border-radius-sm);outline:2px solid transparent}button,*[role=button]{border:none;border-radius:0;background-color:transparent;font-family:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;color:inherit;-webkit-hyphens:inherit;hyphens:inherit;white-space:inherit;outline-offset:-2px;outline:2px solid transparent}a:hover,button:hover,*[role=button]:hover{cursor:pointer}a:active,button:active,*[role=button]:active{outline:none}a:focus-visible,button:focus-visible,*[role=button]:focus-visible{outline-color:var(--rm-ui-color-focus);outline-offset:-2px;transition:outline-color var(--rm-ui-amimation-speed-primary) ease-in-out;transition-delay:calc(var(--rm-ui-amimation-speed-primary) / 2)}.text-primary{color:var(--rm-ui-color-text-primary)}.text-secondary{color:var(--rm-ui-color-text-secondary)}.fw-light{font-weight:var(--rm-ui-font-weight-light)}.fw-regular{font-weight:var(--rm-ui-font-weight-regular)}.fw-medium{font-weight:var(--rm-ui-font-weight-medium)}.fw-bold{font-weight:var(--rm-ui-font-weight-bold)}:root{--rm-ui-padding-xxs: 4px;--rm-ui-padding-xs: 8px;--rm-ui-padding-sm: 12px;--rm-ui-padding-md: 16px;--rm-ui-padding-lg: 24px;--rm-ui-padding-xl: 32px;--rm-ui-padding-xxl: 40px;--rm-ui-padding-xxxl: 48px;--rm-ui-border-radius-sm: 8px;--rm-ui-border-radius-md: 12px;--rm-ui-border-radius-lg: 16px;--rm-ui-border-radius-xl: 24px;--rm-ui-font-size-body-extra-small: 12px;--rm-ui-line-height-body-extra-small: 16px;--rm-ui-font-size-body-small: 14px;--rm-ui-line-height-body-small: 20px;--rm-ui-font-size-body: 16px;--rm-ui-line-height-body: 24px;--rm-ui-font-size-body-large: 20px;--rm-ui-line-height-body-large: 30px;--rm-ui-font-size-hl5: 14px;--rm-ui-line-height-hl5: 22px;--rm-ui-font-size-hl4: 18px;--rm-ui-line-height-hl4: 24px;--rm-ui-font-size-hl3: 20px;--rm-ui-line-height-hl3: 28px;--rm-ui-font-size-hl2: 24px;--rm-ui-line-height-hl2: 32px;--rm-ui-font-size-hl1: 28px;--rm-ui-line-height-hl1: 36px;--rm-ui-font-weight-light: 300;--rm-ui-font-weight-regular: 400;--rm-ui-font-weight-medium: 700;--rm-ui-font-weight-bold: 900;--rm-ui-grey-950: #0a0a0a;--rm-ui-grey-900: #171717;--rm-ui-grey-800: #262626;--rm-ui-grey-700: #404040;--rm-ui-grey-600: #525252;--rm-ui-grey-500: #737373;--rm-ui-grey-400: #a3a3a3;--rm-ui-grey-300: #d4d4d4;--rm-ui-grey-200: #e5e5e5;--rm-ui-grey-100: #f5f5f5;--rm-ui-grey-50: #fafafa;--rm-ui-color-text-primary: var(--rm-ui-grey-800);--rm-ui-color-text-secondary: var(--rm-ui-grey-500);--rm-ui-color-accent-primary: #23bf96;--rm-ui-color-accent-secondary: #ff9900;--rm-ui-color-accent-tertiary: #f5a623;--rm-ui-color-theme-primary: #302677;--rm-ui-color-theme-secondary: #302677;--rm-ui-color-action: #006cff;--rm-ui-color-inverted: #ffffff;--rm-ui-color-error: #dc2626;--rm-ui-color-delete-icon: #ff5549;--rm-ui-color-uploadeicon: #6dc1ae;--rm-ui-color-success: #00b649;--rm-ui-color-focus: #ff8d02;--rm-ui-color-link: #ff8206;--rm-ui-color-text-under-submit: #bdbdbd;--rm-ui-color-button-under-submit: #006699b3;--rm-ui-body-color: #f0faff;--rm-ui-box-border-radius: 10px;--rm-ui-header-logo-height: 30px;--rm-ui-header-phone: #ff9900;--rm-ui-header-phone-size: 22px;--rm-ui-header-text: var(--rm-ui-color-text-primary);--rm-ui-header-check-icon: var(--rm-ui-color-text-primary);--rm-ui-certifications-color: #b1b4c7;--rm-ui-certifications-size: 20px;--rm-ui-message-success-primary: #29c667;--rm-ui-message-success-secondary: #f1fdf4;--rm-ui-message-question-primary: #a76000;--rm-ui-message-question-secondary: #fefce8;--rm-ui-message-error-primary: var(--rm-ui-color-error);--rm-ui-message-error-secondary: #fef3f3;--rm-ui-message-info-primary: #3289c4;--rm-ui-message-info-secondary: #f3f7fe;--rm-ui-payment-info-bg: #edf9f6;--rm-ui-payment-sidebar-bg: #f6f6f6;--rm-ui-payment-text-blocks-gap: var(--rm-ui-padding-lg);--rm-ui-data-protected-label-icon: var(--rm-ui-next-btn-bg);--rm-ui-data-protected-label-text: var(--rm-ui-color-text-primary);--rm-ui-status-idle-color: #82868f;--rm-ui-status-success-color: var(--rm-ui-color-accent-primary);--rm-ui-status-error-color: var(--rm-ui-color-error);--rm-ui-not-found-color: var(--rm-ui-color-text-primary);--rm-ui-not-found-border: var(--rm-ui-grey-300);--rm-ui-card-background: #ffffff;--rm-ui-next-btn-bg: rgba(35, 191, 150, 1);--rm-ui-next-btn-bg-hover: rgba(35, 191, 150, .9);--rm-ui-info-panel-bg: var(--rm-ui-body-color);--rm-ui-sidebar-bg: #f6f6f6;--rm-ui-sidebar-line-color: var(--rm-ui-grey-200);--rm-ui-loading-screen-height: 400px;--rm-ui-body-bg: #f9fcff;--rm-ui-content-bg: #ffffff;--rm-ui-amimation-speed-primary: .15s;--rm-ui-amimation-speed-secondary: .3s;--rm-ui-amimation-speed-tertiary: .45s;--rm-ui-amimation-cubic-primary: cubic-bezier(.3, 0, 0, 1);--rm-ui-amimation-cubic-secondary: cubic-bezier(.65, 0, .35, 1);--rm-ui-amimation-cubic-tertiary: cubic-bezier(.68, -.6, .32, 1.6);--rm-ui-warranty-bg: #f9fcff}
1
+ *,*:before,*:after{margin:0;padding:0;box-sizing:border-box}body{background-color:var(--rm-ui-body-bg)}body,input,textarea{font-family:Lato,sans-serif;font-weight:var(--rm-ui-font-weight-regular);font-size:16px;line-height:24px;-webkit-hyphens:manual;hyphens:manual;white-space:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul,ol{list-style:none;margin:0;padding:0}h1,h2,h3,h4,h5,h6,b,strong{font-weight:var(--rm-ui-font-weight-medium)}h1{font-size:var(--rm-ui-font-size-hl1);line-height:var(--rm-ui-line-height-hl1)}h2{font-size:var(--rm-ui-font-size-hl2);line-height:var(--rm-ui-line-height-hl2)}h3{font-size:var(--rm-ui-font-size-hl3);line-height:var(--rm-ui-line-height-hl3)}h4{font-size:var(--rm-ui-font-size-hl4);line-height:var(--rm-ui-line-height-hl4)}h5,h6{font-size:var(--rm-ui-font-size-hl5);line-height:var(--rm-ui-line-height-hl5)}a{text-decoration:none;color:inherit;border-radius:var(--rm-ui-border-radius-sm);outline:2px solid transparent}button,*[role=button]{border:none;border-radius:0;background-color:transparent;font-family:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;color:inherit;-webkit-hyphens:inherit;hyphens:inherit;white-space:inherit;outline-offset:-2px;outline:2px solid transparent}a:hover,button:hover,*[role=button]:hover{cursor:pointer}a:active,button:active,*[role=button]:active{outline:none}a:focus-visible,button:focus-visible,*[role=button]:focus-visible{outline-color:var(--rm-ui-color-focus);outline-offset:-2px;transition:outline-color var(--rm-ui-amimation-speed-primary) ease-in-out;transition-delay:calc(var(--rm-ui-amimation-speed-primary) / 2)}.text-primary{color:var(--rm-ui-color-text-primary)}.text-secondary{color:var(--rm-ui-color-text-secondary)}.fw-light{font-weight:var(--rm-ui-font-weight-light)}.fw-regular{font-weight:var(--rm-ui-font-weight-regular)}.fw-medium{font-weight:var(--rm-ui-font-weight-medium)}.fw-bold{font-weight:var(--rm-ui-font-weight-bold)}:root{--rm-ui-padding-xxs: 4px;--rm-ui-padding-xs: 8px;--rm-ui-padding-sm: 12px;--rm-ui-padding-md: 16px;--rm-ui-padding-lg: 24px;--rm-ui-padding-xl: 32px;--rm-ui-padding-xxl: 40px;--rm-ui-padding-xxxl: 48px;--rm-ui-border-radius-sm: 8px;--rm-ui-border-radius-md: 12px;--rm-ui-border-radius-lg: 16px;--rm-ui-border-radius-xl: 24px;--rm-ui-font-size-body-extra-small: 12px;--rm-ui-line-height-body-extra-small: 16px;--rm-ui-font-size-body-small: 14px;--rm-ui-line-height-body-small: 20px;--rm-ui-font-size-body: 16px;--rm-ui-line-height-body: 24px;--rm-ui-font-size-body-large: 20px;--rm-ui-line-height-body-large: 30px;--rm-ui-font-size-hl5: 14px;--rm-ui-line-height-hl5: 22px;--rm-ui-font-size-hl4: 18px;--rm-ui-line-height-hl4: 24px;--rm-ui-font-size-hl3: 20px;--rm-ui-line-height-hl3: 28px;--rm-ui-font-size-hl2: 24px;--rm-ui-line-height-hl2: 32px;--rm-ui-font-size-hl1: 28px;--rm-ui-line-height-hl1: 36px;--rm-ui-font-weight-light: 300;--rm-ui-font-weight-regular: 400;--rm-ui-font-weight-medium: 700;--rm-ui-font-weight-bold: 900;--rm-ui-grey-950: #0a0a0a;--rm-ui-grey-900: #171717;--rm-ui-grey-800: #262626;--rm-ui-grey-700: #404040;--rm-ui-grey-600: #525252;--rm-ui-grey-500: #737373;--rm-ui-grey-400: #a3a3a3;--rm-ui-grey-300: #d4d4d4;--rm-ui-grey-200: #e5e5e5;--rm-ui-grey-100: #f5f5f5;--rm-ui-grey-50: #fafafa;--rm-ui-color-text-primary: var(--rm-ui-grey-800);--rm-ui-color-text-secondary: var(--rm-ui-grey-500);--rm-ui-color-accent-primary: #23bf96;--rm-ui-color-accent-secondary: #ff9900;--rm-ui-color-accent-tertiary: #f5a623;--rm-ui-color-theme-primary: #302677;--rm-ui-color-theme-secondary: #302677;--rm-ui-color-action: #006cff;--rm-ui-color-inverted: #ffffff;--rm-ui-color-error: #dc2626;--rm-ui-color-delete-icon: #ff5549;--rm-ui-color-uploade-icon: #6dc1ae;--rm-ui-color-success: #00b649;--rm-ui-color-focus: #ff8d02;--rm-ui-color-link: #ff8206;--rm-ui-color-text-under-submit: #bdbdbd;--rm-ui-color-button-under-submit: #006699b3;--rm-ui-body-color: #f0faff;--rm-ui-box-border-radius: 10px;--rm-ui-header-logo-height: 30px;--rm-ui-header-phone: #ff9900;--rm-ui-header-phone-size: 22px;--rm-ui-header-text: var(--rm-ui-color-text-primary);--rm-ui-header-check-icon: var(--rm-ui-color-text-primary);--rm-ui-certifications-color: #b1b4c7;--rm-ui-certifications-size: 20px;--rm-ui-message-success-primary: #29c667;--rm-ui-message-success-secondary: #f1fdf4;--rm-ui-message-question-primary: #a76000;--rm-ui-message-question-secondary: #fefce8;--rm-ui-message-error-primary: var(--rm-ui-color-error);--rm-ui-message-error-secondary: #fef3f3;--rm-ui-message-info-primary: #3289c4;--rm-ui-message-info-secondary: #f3f7fe;--rm-ui-payment-info-bg: #edf9f6;--rm-ui-payment-sidebar-bg: #f6f6f6;--rm-ui-payment-text-blocks-gap: var(--rm-ui-padding-lg);--rm-ui-data-protected-label-icon: var(--rm-ui-next-btn-bg);--rm-ui-data-protected-label-text: var(--rm-ui-color-text-primary);--rm-ui-status-idle-color: #82868f;--rm-ui-status-success-color: var(--rm-ui-color-accent-primary);--rm-ui-status-error-color: var(--rm-ui-color-error);--rm-ui-not-found-color: var(--rm-ui-color-text-primary);--rm-ui-not-found-border: var(--rm-ui-grey-300);--rm-ui-card-background: #ffffff;--rm-ui-next-btn-bg: rgba(35, 191, 150, 1);--rm-ui-next-btn-bg-hover: rgba(35, 191, 150, .9);--rm-ui-info-panel-bg: var(--rm-ui-body-color);--rm-ui-sidebar-bg: #f6f6f6;--rm-ui-sidebar-line-color: var(--rm-ui-grey-200);--rm-ui-loading-screen-height: 400px;--rm-ui-body-bg: #f9fcff;--rm-ui-content-bg: #ffffff;--rm-ui-amimation-speed-primary: .15s;--rm-ui-amimation-speed-secondary: .3s;--rm-ui-amimation-speed-tertiary: .45s;--rm-ui-amimation-cubic-primary: cubic-bezier(.3, 0, 0, 1);--rm-ui-amimation-cubic-secondary: cubic-bezier(.65, 0, .35, 1);--rm-ui-amimation-cubic-tertiary: cubic-bezier(.68, -.6, .32, 1.6);--rm-ui-warranty-bg: #f9fcff}
@@ -6,10 +6,10 @@ export interface DropzoneProps extends Base {
6
6
  multiple?: boolean;
7
7
  maxSize?: number;
8
8
  disabled?: boolean;
9
- title?: ReactNode;
10
9
  invitation: ReactNode;
11
10
  helpText?: ReactNode;
11
+ children?: ReactNode;
12
12
  onDrop: (files: File[]) => void;
13
13
  onReject?: (files: File[], reason: DropzoneRejectionReason) => void;
14
14
  }
15
- export declare const Dropzone: ({ accept, multiple, maxSize, disabled, title, invitation, helpText, onDrop, onReject, ...base }: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Dropzone: ({ accept, multiple, maxSize, disabled, invitation, helpText, children, onDrop, onReject, ...base }: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,110 +1,123 @@
1
- import { jsxs as L, jsx as l } from "react/jsx-runtime";
2
- import { useRef as P, useState as W } from "react";
3
- import { Upload as k } from "lucide-react";
4
- import { baseProps as I, clsx as E } from "../../utils/functions/functions.util.js";
5
- import '../../assets/dropzone-CxglLL5C.css';const K = "_Dropzone_e3zu0_1", O = "_Active_e3zu0_21", $ = "_Disabled_e3zu0_31", b = "_HiddenInput_e3zu0_36", B = "_Title_e3zu0_48", F = "_Icon_e3zu0_54", U = "_Invitation_e3zu0_58", q = "_HelpText_e3zu0_64", o = {
6
- Dropzone: K,
7
- Active: O,
8
- Disabled: $,
9
- HiddenInput: b,
10
- Title: B,
11
- Icon: F,
12
- Invitation: U,
13
- HelpText: q
14
- }, G = (r, d) => {
15
- const s = d.split(",").map((e) => e.trim()).filter(Boolean);
1
+ import { jsxs as D, jsx as g } from "react/jsx-runtime";
2
+ import { useRef as $, useState as E } from "react";
3
+ import { CirclePlus as K } from "lucide-react";
4
+ import { baseProps as C, clsx as T } from "../../utils/functions/functions.util.js";
5
+ import '../../assets/dropzone-PjQM7FtZ.css';const O = "_Dropzone_1pg48_1", b = "_Area_1pg48_9", k = "_HasChildren_1pg48_24", B = "_Active_1pg48_29", F = "_Disabled_1pg48_33", q = "_HiddenInput_1pg48_37", G = "_Trigger_1pg48_49", J = "_Icon_1pg48_72", M = "_Invitation_1pg48_85", Q = "_HelpText_1pg48_97", n = {
6
+ Dropzone: O,
7
+ Area: b,
8
+ HasChildren: k,
9
+ Active: B,
10
+ Disabled: F,
11
+ HiddenInput: q,
12
+ Trigger: G,
13
+ Icon: J,
14
+ Invitation: M,
15
+ HelpText: Q
16
+ }, S = (o, u) => {
17
+ const s = u.split(",").map((e) => e.trim()).filter(Boolean);
16
18
  return s.length === 0 ? !0 : s.some((e) => {
17
19
  if (e.startsWith("."))
18
- return r.name.toLowerCase().endsWith(e.toLowerCase());
20
+ return o.name.toLowerCase().endsWith(e.toLowerCase());
19
21
  if (e.endsWith("/*")) {
20
- const a = e.slice(0, -1);
21
- return r.type.startsWith(a);
22
+ const d = e.slice(0, -1);
23
+ return o.type.startsWith(d);
22
24
  }
23
- return r.type === e;
25
+ return o.type === e;
24
26
  });
25
- }, V = ({
26
- accept: r,
27
- multiple: d = !1,
27
+ }, Z = ({
28
+ accept: o,
29
+ multiple: u = !1,
28
30
  maxSize: s,
29
31
  disabled: e = !1,
30
- title: a,
31
- invitation: z,
32
+ invitation: d,
32
33
  helpText: f,
33
- onDrop: y,
34
+ children: c,
35
+ onDrop: N,
34
36
  onReject: p,
35
- ...g
37
+ ...m
36
38
  }) => {
37
- const h = P(null), [T, _] = W(!1), D = I(g, "data-testid", "dropzone"), x = (t) => {
38
- const u = [], i = [], c = [];
39
- for (const n of t) {
40
- if (!G(n, r)) {
41
- c.push(n);
39
+ const v = $(null), [w, _] = E(!1), h = C(m, "data-testid", "dropzone"), I = c != null && c !== !1, x = (t) => {
40
+ const l = [], a = [], i = [];
41
+ for (const r of t) {
42
+ if (!S(r, o)) {
43
+ i.push(r);
42
44
  continue;
43
45
  }
44
- if (s !== void 0 && n.size > s) {
45
- i.push(n);
46
+ if (s !== void 0 && r.size > s) {
47
+ a.push(r);
46
48
  continue;
47
49
  }
48
- u.push(n);
50
+ l.push(r);
49
51
  }
50
- return { accepted: u, tooLarge: i, wrongType: c };
51
- }, m = (t) => {
52
+ return { accepted: l, tooLarge: a, wrongType: i };
53
+ }, y = (t) => {
52
54
  if (!t || t.length === 0) return;
53
- const u = Array.from(t), { accepted: i, tooLarge: c, wrongType: n } = x(u);
54
- i.length > 0 && y(i), c.length > 0 && p && p(c, "tooLarge"), n.length > 0 && p && p(n, "wrongType");
55
+ const l = Array.from(t), { accepted: a, tooLarge: i, wrongType: r } = x(l);
56
+ a.length > 0 && N(a), i.length > 0 && p && p(i, "tooLarge"), r.length > 0 && p && p(r, "wrongType");
55
57
  }, A = () => {
56
- e || h.current?.click();
58
+ e || v.current?.click();
59
+ }, z = (t) => {
60
+ e || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), A());
61
+ }, L = (t) => {
62
+ y(t.target.files), t.target.value = "";
57
63
  }, H = (t) => {
58
- e || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), h.current?.click());
59
- }, w = (t) => {
60
- m(t.target.files), t.target.value = "";
61
- }, v = (t) => {
62
64
  t.preventDefault(), t.stopPropagation(), !e && _(!0);
63
- }, N = (t) => {
65
+ }, P = (t) => {
64
66
  t.preventDefault(), t.stopPropagation(), _(!1);
65
- }, C = (t) => {
66
- t.preventDefault(), t.stopPropagation(), _(!1), !e && m(t.dataTransfer.files);
67
+ }, W = (t) => {
68
+ t.preventDefault(), t.stopPropagation(), _(!1), !e && y(t.dataTransfer.files);
67
69
  };
68
- return /* @__PURE__ */ L(
69
- "div",
70
- {
71
- "data-testid": D,
72
- className: E(o.Dropzone, I(g, "className"), {
73
- [o.Active]: T,
74
- [o.Disabled]: e
75
- }),
76
- role: "button",
77
- tabIndex: e ? -1 : 0,
78
- "aria-disabled": e,
79
- onClick: A,
80
- onKeyDown: H,
81
- onDragOver: v,
82
- onDragEnter: v,
83
- onDragLeave: N,
84
- onDrop: C,
85
- children: [
86
- /* @__PURE__ */ l(
87
- "input",
88
- {
89
- ref: h,
90
- type: "file",
91
- className: o.HiddenInput,
92
- accept: r,
93
- multiple: d,
94
- disabled: e,
95
- onChange: w,
96
- "data-testid": `${D}-input`,
97
- tabIndex: -1
98
- }
99
- ),
100
- a != null && /* @__PURE__ */ l("div", { className: o.Title, children: a }),
101
- /* @__PURE__ */ l(k, { size: 32, className: o.Icon, "aria-hidden": !0 }),
102
- /* @__PURE__ */ l("div", { className: o.Invitation, children: z }),
103
- f != null && /* @__PURE__ */ l("div", { className: o.HelpText, children: f })
104
- ]
105
- }
106
- );
70
+ return /* @__PURE__ */ D("div", { "data-testid": h, className: T(n.Dropzone, C(m, "className")), children: [
71
+ /* @__PURE__ */ D(
72
+ "div",
73
+ {
74
+ className: T(n.Area, {
75
+ [n.Active]: w,
76
+ [n.Disabled]: e,
77
+ [n.HasChildren]: I
78
+ }),
79
+ onDragOver: H,
80
+ onDragEnter: H,
81
+ onDragLeave: P,
82
+ onDrop: W,
83
+ children: [
84
+ /* @__PURE__ */ g(
85
+ "input",
86
+ {
87
+ ref: v,
88
+ type: "file",
89
+ className: n.HiddenInput,
90
+ accept: o,
91
+ multiple: u,
92
+ disabled: e,
93
+ onChange: L,
94
+ "data-testid": `${h}-input`,
95
+ tabIndex: -1
96
+ }
97
+ ),
98
+ I && c,
99
+ /* @__PURE__ */ D(
100
+ "button",
101
+ {
102
+ type: "button",
103
+ className: n.Trigger,
104
+ onClick: A,
105
+ onKeyDown: z,
106
+ disabled: e,
107
+ "aria-disabled": e,
108
+ "data-testid": `${h}-trigger`,
109
+ children: [
110
+ /* @__PURE__ */ g(K, { className: n.Icon, "aria-hidden": !0 }),
111
+ /* @__PURE__ */ g("div", { className: n.Invitation, children: d })
112
+ ]
113
+ }
114
+ )
115
+ ]
116
+ }
117
+ ),
118
+ f != null && /* @__PURE__ */ g("div", { className: n.HelpText, children: f })
119
+ ] });
107
120
  };
108
121
  export {
109
- V as Dropzone
122
+ Z as Dropzone
110
123
  };
@@ -1,18 +1,18 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import { CircleCheck as _, File as m, Trash2 as I } from "lucide-react";
3
- import { baseProps as l, clsx as f } from "../../utils/functions/functions.util.js";
4
- import '../../assets/file-item-CcHpaSJj.css';const h = "_FileItem_16osf_1", N = "_CheckIcon_16osf_12", u = "_FileIcon_16osf_25", F = "_Body_16osf_32", p = "_Name_16osf_39", B = "_Size_16osf_48", D = "_DeleteButton_16osf_54", C = "_DeleteIcon_16osf_81", e = {
3
+ import { baseProps as l, clsx as p } from "../../utils/functions/functions.util.js";
4
+ import '../../assets/file-item-lIthpI8v.css';const h = "_FileItem_5ospg_1", N = "_CheckIcon_5ospg_12", u = "_FileIcon_5ospg_25", F = "_Body_5ospg_32", g = "_Name_5ospg_39", B = "_Size_5ospg_48", D = "_DeleteButton_5ospg_54", C = "_DeleteIcon_5ospg_81", e = {
5
5
  FileItem: h,
6
6
  CheckIcon: N,
7
7
  FileIcon: u,
8
8
  Body: F,
9
- Name: p,
9
+ Name: g,
10
10
  Size: B,
11
11
  DeleteButton: D,
12
12
  DeleteIcon: C
13
- }, z = ({ name: o, size: a, disabled: i = !1, onDelete: d, deleteAriaLabel: r, ...s }) => {
13
+ }, x = ({ name: o, size: a, disabled: i = !1, onDelete: d, deleteAriaLabel: r, ...s }) => {
14
14
  const c = l(s, "data-testid", "file-item");
15
- return /* @__PURE__ */ n("div", { "data-testid": c, className: f(e.FileItem, l(s, "className")), children: [
15
+ return /* @__PURE__ */ n("div", { "data-testid": c, className: p(e.FileItem, l(s, "className")), children: [
16
16
  /* @__PURE__ */ t(_, { className: e.CheckIcon, "aria-hidden": !0 }),
17
17
  /* @__PURE__ */ t(m, { className: e.FileIcon, "aria-hidden": !0 }),
18
18
  /* @__PURE__ */ n("div", { className: e.Body, children: [
@@ -34,5 +34,5 @@ import '../../assets/file-item-CcHpaSJj.css';const h = "_FileItem_16osf_1", N =
34
34
  ] });
35
35
  };
36
36
  export {
37
- z as FileItem
37
+ x as FileItem
38
38
  };
package/dist/main.js CHANGED
@@ -55,7 +55,7 @@ import { Text as $r } from "./components/text/text.component.js";
55
55
  import { UserPanel as oo } from "./components/user-panel/user-panel.component.js";
56
56
  import { Warranty as to } from "./components/warranty/warranty.component.js";
57
57
  import { birthDateToGerman as mo, blurAfterClick as po, clsx as fo, containsHtml as xo, convertDateFormat as io, convertToDateNumber as no, convertToEuro as so, defaultTo as lo, deleteUrlParameters as co, fakeAwait as uo, formatDate as go, formatEuroAmount as So, formatNumber as bo, getDate as Po, getFromJson as ho, getKeysFromUrlParams as Do, getPath as To, getSalutationLabel as Fo, getSecretFromUrlParams as Lo, getSettlementPercent as Ao, getTimeStamp as Co, isHtmlString as Bo, isLeapYear as ko, isString as vo, isValidBirthDate as yo, isValidDate as Io, isValidHouseNumber as No, isWithinTimeStamps as Ro, last as wo, once as Eo, parseSpacingValue as Ho, pickValues as Vo, publicSrcPath as Mo, removeLastNumberSuffix as Uo, removeSlashAtEnd as Go, searchParams as Ko, sortSearchParams as Wo, stripRequestName as qo, toGermanDate as zo, trimAllStringKeys as Jo, updateLastPathSubdirectory as Yo, withControl as jo } from "./utils/functions/functions.util.js";
58
- import './assets/main-cXwa4FWx.css';export {
58
+ import './assets/main-C5vBKK8f.css';export {
59
59
  Z as Accordion,
60
60
  $ as AccordionTable,
61
61
  tr as BottomBar,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "3.11.0",
4
+ "version": "3.13.0",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1 +0,0 @@
1
- ._Dropzone_e3zu0_1{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--rm-ui-padding-xs);width:100%;min-height:160px;padding:var(--rm-ui-padding-md);border:2px dashed var(--rm-ui-grey-300);border-radius:var(--rm-ui-border-radius-md, 8px);background-color:var(--rm-ui-grey-50);text-align:center;cursor:pointer;transition:border-color .12s ease,background-color .12s ease}._Dropzone_e3zu0_1:hover,._Active_e3zu0_21{border-color:var(--rm-ui-color-theme-primary);background-color:var(--rm-ui-color-background-primary, #fff)}._Dropzone_e3zu0_1:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:2px}._Disabled_e3zu0_31{cursor:not-allowed;opacity:.5}._HiddenInput_e3zu0_36{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._Title_e3zu0_48{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._Icon_e3zu0_54{color:var(--rm-ui-color-theme-primary)}._Invitation_e3zu0_58{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary)}._HelpText_e3zu0_64{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-text-secondary)}
@@ -1 +0,0 @@
1
- ._FileItem_16osf_1{display:flex;flex-direction:row;align-items:center;gap:var(--rm-ui-padding-sm);width:100%;padding:var(--rm-ui-padding-sm);border:1px solid rgba(0,0,0,.1);border-radius:12px}._CheckIcon_16osf_12{flex-shrink:0;width:24px;height:24px;stroke:var(--rm-ui-color-uploadeicon);fill:var(--rm-ui-color-uploadeicon)}._CheckIcon_16osf_12>path{stroke:#fff;fill:none}._FileIcon_16osf_25{flex-shrink:0;width:24px;height:24px;color:var(--rm-ui-color-text-primary)}._Body_16osf_32{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}._Name_16osf_39{font-size:var(--rm-ui-font-size-body);line-height:var(--rm-ui-line-height-body);color:var(--rm-ui-color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._Size_16osf_48{font-size:var(--rm-ui-font-size-body-small);line-height:var(--rm-ui-line-height-body-small);color:var(--rm-ui-color-text-secondary)}._DeleteButton_16osf_54{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;background:none;border:0;cursor:pointer;color:var(--rm-ui-color-delete-icon);transition:opacity .12s ease}._DeleteButton_16osf_54:hover:not(:disabled){opacity:.8}._DeleteButton_16osf_54:focus-visible{outline:2px solid var(--rm-ui-color-focus);outline-offset:2px}._DeleteButton_16osf_54:disabled{cursor:not-allowed;opacity:.5}._DeleteIcon_16osf_81{width:24px;height:24px}