@alixpartners/ui-components 2.0.0-beta.18.2 → 2.0.0-beta.18.3
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.
package/dist/assets/Banner.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Banner-module__root___thkfk{width:fit-content}.Banner-module__root___thkfk.Banner-module__info___xuru-{color:#3b4648}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__lg___3Ebme{border:1px solid #b0deeb;border-radius:8px;background:#f6fdff}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__md___ClFFt{border:1px solid #b0deeb;border-radius:6px;background:#f6fdff}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__warning___3hSt-{color:#b86a0f}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__lg___3Ebme{border:1px solid #ffd0a7;border-radius:8px;background:#fffcf8}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__md___ClFFt{border:1px solid #ffd0a7;border-radius:6px;background:#fffcf8}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__error___b9QKF{color:#bf494e}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__lg___3Ebme{border:1px solid #f1b5b7;border-radius:8px;background:#fff5f6}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__md___ClFFt{border:1px solid #f1b5b7;border-radius:6px;background:#fff5f6}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__success___ZM5V0{color:#3f702a}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__lg___3Ebme{border:1px solid #a5d192;border-radius:8px;background:#f1f6f0}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__md___ClFFt{border:1px solid #a5d192;border-radius:6px;background:#f1f6f0}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__ai___RlIcg{color:#632494}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__lg___3Ebme{border:1px solid #d3adf7;border-radius:8px;background:#faf6fe}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__md___ClFFt{border:1px solid #d3adf7;border-radius:6px;background:#faf6fe}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__full-width___qGjmw{width:100%}.Banner-module__inner___S3o73{display:grid;align-items:flex-start;font-size:14px;font-weight:400;line-height:19px}.Banner-module__inner___S3o73.Banner-module__info___xuru-{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__info___xuru-.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__info___xuru-.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__info___xuru-.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__info___xuru- .Banner-module__icon___ZtVmk{color:#006176;font-size:20px}.Banner-module__inner___S3o73.Banner-module__info___xuru- span{font-size:14px;color:#3b4648}.Banner-module__inner___S3o73.Banner-module__info___xuru- span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__info___xuru- span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__info___xuru- .Banner-module__closeIcon___ON0vc{font-size:16px;color:#3b4648}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- .Banner-module__icon___ZtVmk{color:#ce7309;font-size:20px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- span{font-size:14px;color:#b86a0f}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- .Banner-module__closeIcon___ON0vc{font-size:16px;color:#3b4648}.Banner-module__inner___S3o73.Banner-module__error___b9QKF{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__error___b9QKF .Banner-module__icon___ZtVmk{color:#cb282e;font-size:20px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF span{font-size:14px;color:#bf494e}.Banner-module__inner___S3o73.Banner-module__error___b9QKF span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__error___b9QKF span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__error___b9QKF .Banner-module__closeIcon___ON0vc{font-size:16px;color:#4a4a4a}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 .Banner-module__icon___ZtVmk{color:#498e2b;font-size:20px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 span{font-size:14px;color:#3f702a}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 .Banner-module__closeIcon___ON0vc{font-size:16px;color:#4a4a4a}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg .Banner-module__icon___ZtVmk{color:#632494;font-size:20px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg span{font-size:14px;color:#632494}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg .Banner-module__closeIcon___ON0vc{font-size:16px;color:#4a4a4a}.Banner-module__inner___S3o73 span b,.Banner-module__inner___S3o73 span strong{display:inline-block;font-weight:500;font-size:14px;line-height:19px}.Banner-module__btnClose___hjsC7{display:flex;background:none;border:none;cursor:pointer;height:20px;padding:0;margin:0;align-items:center}
|
|
1
|
+
.Banner-module__root___thkfk{width:fit-content;box-sizing:border-box}.Banner-module__root___thkfk.Banner-module__info___xuru-{color:#3b4648}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__lg___3Ebme{border:1px solid #b0deeb;border-radius:8px;background:#f6fdff}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__md___ClFFt{border:1px solid #b0deeb;border-radius:6px;background:#f6fdff}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__info___xuru-.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__warning___3hSt-{color:#b86a0f}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__lg___3Ebme{border:1px solid #ffd0a7;border-radius:8px;background:#fffcf8}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__md___ClFFt{border:1px solid #ffd0a7;border-radius:6px;background:#fffcf8}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__warning___3hSt-.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__error___b9QKF{color:#bf494e}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__lg___3Ebme{border:1px solid #f1b5b7;border-radius:8px;background:#fff5f6}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__md___ClFFt{border:1px solid #f1b5b7;border-radius:6px;background:#fff5f6}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__error___b9QKF.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__success___ZM5V0{color:#3f702a}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__lg___3Ebme{border:1px solid #a5d192;border-radius:8px;background:#f1f6f0}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__md___ClFFt{border:1px solid #a5d192;border-radius:6px;background:#f1f6f0}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__success___ZM5V0.Banner-module__full-width___qGjmw{width:100%}.Banner-module__root___thkfk.Banner-module__ai___RlIcg{color:#632494}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__lg___3Ebme{border:1px solid #d3adf7;border-radius:8px;background:#faf6fe}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__md___ClFFt{border:1px solid #d3adf7;border-radius:6px;background:#faf6fe}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__sm___KWc4x{background:none}.Banner-module__root___thkfk.Banner-module__ai___RlIcg.Banner-module__full-width___qGjmw{width:100%}.Banner-module__inner___S3o73{display:grid;align-items:flex-start;font-size:14px;font-weight:400;line-height:19px}.Banner-module__inner___S3o73.Banner-module__info___xuru-{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__info___xuru-.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__info___xuru-.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__info___xuru-.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__info___xuru- .Banner-module__icon___ZtVmk{color:#006176;font-size:20px}.Banner-module__inner___S3o73.Banner-module__info___xuru- span{font-size:14px;color:#3b4648}.Banner-module__inner___S3o73.Banner-module__info___xuru- span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__info___xuru- span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__info___xuru- .Banner-module__closeIcon___ON0vc{font-size:16px;color:#3b4648}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt-.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- .Banner-module__icon___ZtVmk{color:#ce7309;font-size:20px}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- span{font-size:14px;color:#b86a0f}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__warning___3hSt- .Banner-module__closeIcon___ON0vc{font-size:16px;color:#3b4648}.Banner-module__inner___S3o73.Banner-module__error___b9QKF{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__error___b9QKF .Banner-module__icon___ZtVmk{color:#cb282e;font-size:20px}.Banner-module__inner___S3o73.Banner-module__error___b9QKF span{font-size:14px;color:#bf494e}.Banner-module__inner___S3o73.Banner-module__error___b9QKF span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__error___b9QKF span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__error___b9QKF .Banner-module__closeIcon___ON0vc{font-size:16px;color:#4a4a4a}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 .Banner-module__icon___ZtVmk{color:#498e2b;font-size:20px}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 span{font-size:14px;color:#3f702a}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__success___ZM5V0 .Banner-module__closeIcon___ON0vc{font-size:16px;color:#4a4a4a}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg{grid-template-columns:max-content 1fr max-content;grid-column-gap:6px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg.Banner-module__lg___3Ebme{padding:12px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg.Banner-module__md___ClFFt{padding:6px 8px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg.Banner-module__sm___KWc4x{padding:4px 0}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg .Banner-module__icon___ZtVmk{color:#632494;font-size:20px}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg span{font-size:14px;color:#632494}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg span a{display:inline-block;color:#0369a3;text-decoration:none;line-height:19px;font-size:14px;font-weight:400}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg span a:hover{color:#024870;text-decoration:underline}.Banner-module__inner___S3o73.Banner-module__ai___RlIcg .Banner-module__closeIcon___ON0vc{font-size:16px;color:#4a4a4a}.Banner-module__inner___S3o73 span b,.Banner-module__inner___S3o73 span strong{display:inline-block;font-weight:500;font-size:14px;line-height:19px}.Banner-module__btnClose___hjsC7{display:flex;background:none;border:none;cursor:pointer;height:20px;padding:0;margin:0;align-items:center}
|
package/dist/assets/Dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Dialog-module__dialog___r4ljx{border:solid #cccccc 1px;border-radius:8px;box-shadow:0 0 10px #0000001a;padding:20px;width:520px}.Dialog-module__dialog___r4ljx:has(.Dialog-module__dialog-illustration___IHiQl) .Dialog-module__dialog-content___3hOGc{text-align:center}.Dialog-module__dialog-
|
|
1
|
+
.Dialog-module__dialog___r4ljx{border:solid #cccccc 1px;border-radius:8px;box-shadow:0 0 10px #0000001a;padding:20px;width:520px;position:relative}.Dialog-module__dialog___r4ljx:has(.Dialog-module__dialog-illustration___IHiQl) .Dialog-module__dialog-content___3hOGc{text-align:center}.Dialog-module__dialog-illustration___IHiQl{display:flex;justify-content:center;padding-bottom:16px}.Dialog-module__dialog-content___3hOGc{display:flex;flex-direction:column;justify-content:center;text-align:start;gap:8px;padding-bottom:12px}.Dialog-module__dialog-title___KACAJ{margin:0;color:#4a4a4a;font-size:17px;font-weight:700;line-height:100%}.Dialog-module__dialog-description___hL8fm{margin:0;color:#727272;font-size:17px;font-weight:400;line-height:22px}.Dialog-module__dialog-buttons___x-v2M{display:flex;justify-content:center;gap:16px;padding-top:16px}.Dialog-module__dialog-close-button___-PzEz{position:absolute;top:12px;right:12px;cursor:pointer;width:20px;height:20px}.Dialog-module__dialog-close-button-icon___BeGg2{font-size:20px!important;color:#878787!important}
|
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, useEffect as I } from "react";
|
|
3
|
+
import f from "../Button/Button.js";
|
|
4
|
+
import H from "../Icon/Icon.js";
|
|
5
|
+
import '../../assets/Dialog.css';const J = "Dialog-module__dialog___r4ljx", a = {
|
|
6
|
+
dialog: J,
|
|
6
7
|
"dialog-illustration": "Dialog-module__dialog-illustration___IHiQl",
|
|
7
8
|
"dialog-content": "Dialog-module__dialog-content___3hOGc",
|
|
8
|
-
"dialog-close-button-container": "Dialog-module__dialog-close-button-container___35uPS",
|
|
9
9
|
"dialog-title": "Dialog-module__dialog-title___KACAJ",
|
|
10
10
|
"dialog-description": "Dialog-module__dialog-description___hL8fm",
|
|
11
|
-
"dialog-buttons": "Dialog-module__dialog-buttons___x-v2M"
|
|
11
|
+
"dialog-buttons": "Dialog-module__dialog-buttons___x-v2M",
|
|
12
|
+
"dialog-close-button": "Dialog-module__dialog-close-button___-PzEz",
|
|
13
|
+
"dialog-close-button-icon": "Dialog-module__dialog-close-button-icon___BeGg2"
|
|
12
14
|
};
|
|
13
|
-
function
|
|
14
|
-
children:
|
|
15
|
-
isOpen:
|
|
15
|
+
function q({
|
|
16
|
+
children: g,
|
|
17
|
+
isOpen: d,
|
|
16
18
|
onClose: l,
|
|
17
19
|
title: v,
|
|
18
|
-
description:
|
|
19
|
-
illustrationSrc:
|
|
20
|
-
confirmButtonText:
|
|
20
|
+
description: b,
|
|
21
|
+
illustrationSrc: s,
|
|
22
|
+
confirmButtonText: _,
|
|
21
23
|
cancelButtonText: u,
|
|
22
|
-
confirmButtonType:
|
|
23
|
-
cancelButtonType:
|
|
24
|
-
confirmButtonVariant:
|
|
25
|
-
cancelButtonVariant:
|
|
26
|
-
confirmButtonSize:
|
|
27
|
-
cancelButtonSize:
|
|
28
|
-
confirmButtonIcon:
|
|
29
|
-
cancelButtonIcon:
|
|
24
|
+
confirmButtonType: D = "primary",
|
|
25
|
+
cancelButtonType: p = "primary",
|
|
26
|
+
confirmButtonVariant: N = "default",
|
|
27
|
+
cancelButtonVariant: k = "cancel",
|
|
28
|
+
confirmButtonSize: y = "md",
|
|
29
|
+
cancelButtonSize: z = "md",
|
|
30
|
+
confirmButtonIcon: j,
|
|
31
|
+
cancelButtonIcon: x,
|
|
30
32
|
onConfirm: e,
|
|
31
33
|
onCancel: r,
|
|
32
34
|
className: M,
|
|
33
35
|
...R
|
|
34
36
|
}) {
|
|
35
|
-
const w =
|
|
36
|
-
|
|
37
|
-
var i,
|
|
38
|
-
|
|
39
|
-
}, [
|
|
37
|
+
const w = h(null), t = h(null);
|
|
38
|
+
I(() => {
|
|
39
|
+
var i, m;
|
|
40
|
+
d !== void 0 && (d ? (i = t.current) == null || i.showModal() : (m = t.current) == null || m.close());
|
|
41
|
+
}, [d]);
|
|
40
42
|
const A = () => {
|
|
41
43
|
var i;
|
|
42
|
-
(i =
|
|
43
|
-
},
|
|
44
|
+
(i = t.current) == null || i.showModal();
|
|
45
|
+
}, n = () => {
|
|
44
46
|
var i;
|
|
45
|
-
l == null || l(),
|
|
47
|
+
l == null || l(), d === void 0 && ((i = t.current) == null || i.close());
|
|
46
48
|
}, E = () => {
|
|
47
49
|
var i;
|
|
48
|
-
e == null || e(),
|
|
50
|
+
e == null || e(), d === void 0 && ((i = t.current) == null || i.close(), l == null || l());
|
|
49
51
|
}, G = () => {
|
|
50
52
|
var i;
|
|
51
|
-
r == null || r(),
|
|
53
|
+
r == null || r(), d === void 0 && ((i = t.current) == null || i.close(), l == null || l());
|
|
52
54
|
};
|
|
53
55
|
return /* @__PURE__ */ c("div", { className: M, ...R, children: [
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */ c("dialog", { className:
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */ c("div", { className:
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
56
|
+
g && /* @__PURE__ */ o("div", { ref: w, onClick: A, children: g }),
|
|
57
|
+
/* @__PURE__ */ c("dialog", { className: a.dialog, ref: t, onClose: n, children: [
|
|
58
|
+
l && /* @__PURE__ */ o("button", { className: a["dialog-close-button"], onClick: n, children: /* @__PURE__ */ o(H, { className: a["dialog-close-button-icon"], icon: "ap-icon-close" }) }),
|
|
59
|
+
s && /* @__PURE__ */ o("div", { className: a["dialog-illustration"], children: /* @__PURE__ */ o("img", { src: s, alt: "Dialog illustration" }) }),
|
|
60
|
+
/* @__PURE__ */ c("div", { className: a["dialog-content"], children: [
|
|
61
|
+
/* @__PURE__ */ o("h2", { className: a["dialog-title"], children: v }),
|
|
62
|
+
/* @__PURE__ */ o("div", { className: a["dialog-description"], children: b })
|
|
61
63
|
] }),
|
|
62
|
-
/* @__PURE__ */ c("div", { className:
|
|
63
|
-
u && /* @__PURE__ */
|
|
64
|
-
|
|
64
|
+
/* @__PURE__ */ c("div", { className: a["dialog-buttons"], children: [
|
|
65
|
+
u && /* @__PURE__ */ o(f, { type: p, variant: k, size: z, onClick: G, icon: x, children: u }),
|
|
66
|
+
_ && /* @__PURE__ */ o(f, { type: D, variant: N, size: y, onClick: E, icon: j, children: _ })
|
|
65
67
|
] })
|
|
66
68
|
] })
|
|
67
69
|
] });
|
|
68
70
|
}
|
|
69
71
|
export {
|
|
70
|
-
|
|
72
|
+
q as default
|
|
71
73
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import { useId as
|
|
3
|
-
import
|
|
4
|
-
import { c as
|
|
5
|
-
import
|
|
6
|
-
import '../../assets/DragAndDrop.css';const
|
|
1
|
+
import { jsxs as n, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useId as J, useRef as w, useState as K, useCallback as R } from "react";
|
|
3
|
+
import M from "../Button/Button.js";
|
|
4
|
+
import { c as V } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import b from "../Icon/Icon.js";
|
|
6
|
+
import '../../assets/DragAndDrop.css';const X = "DragAndDrop-module__disabled___h47do", Z = "DragAndDrop-module__required___z3cHB", U = "DragAndDrop-module__active___ZMuEx", a = {
|
|
7
7
|
"drag-and-drop-container": "DragAndDrop-module__drag-and-drop-container___WHqGh",
|
|
8
|
-
disabled:
|
|
9
|
-
required:
|
|
8
|
+
disabled: X,
|
|
9
|
+
required: Z,
|
|
10
10
|
"drag-and-drop-space-text-message": "DragAndDrop-module__drag-and-drop-space-text-message___fL-Ac",
|
|
11
11
|
"drag-and-drop-space-text-constraints": "DragAndDrop-module__drag-and-drop-space-text-constraints___YrL7J",
|
|
12
12
|
"drag-and-drop-space": "DragAndDrop-module__drag-and-drop-space___09a0I",
|
|
13
|
-
active:
|
|
13
|
+
active: U,
|
|
14
14
|
"drag-and-drop-space-text": "DragAndDrop-module__drag-and-drop-space-text___-8rqC",
|
|
15
15
|
"drag-and-drop-files-list": "DragAndDrop-module__drag-and-drop-files-list___7WNCk",
|
|
16
16
|
"drag-and-drop-files-list-item": "DragAndDrop-module__drag-and-drop-files-list-item___vQO6M",
|
|
@@ -24,98 +24,97 @@ import '../../assets/DragAndDrop.css';const V = "DragAndDrop-module__disabled___
|
|
|
24
24
|
"drag-and-drop-files-list-item-error": "DragAndDrop-module__drag-and-drop-files-list-item-error___yR0DY",
|
|
25
25
|
"drag-and-drop-files-list-item-icon-error": "DragAndDrop-module__drag-and-drop-files-list-item-icon-error___17EE-"
|
|
26
26
|
};
|
|
27
|
-
function
|
|
28
|
-
label:
|
|
29
|
-
type:
|
|
30
|
-
disabled:
|
|
31
|
-
required:
|
|
27
|
+
function de({
|
|
28
|
+
label: B,
|
|
29
|
+
type: o = "single",
|
|
30
|
+
disabled: A,
|
|
31
|
+
required: j,
|
|
32
32
|
fileExtensionsAllowed: f,
|
|
33
33
|
maxSize: _,
|
|
34
|
-
maxFiles:
|
|
34
|
+
maxFiles: u,
|
|
35
35
|
value: g,
|
|
36
|
-
onUpload:
|
|
37
|
-
onRemoveFile:
|
|
38
|
-
queueFiles:
|
|
39
|
-
className:
|
|
40
|
-
...
|
|
36
|
+
onUpload: t,
|
|
37
|
+
onRemoveFile: N,
|
|
38
|
+
queueFiles: p,
|
|
39
|
+
className: q,
|
|
40
|
+
...s
|
|
41
41
|
}) {
|
|
42
|
-
const
|
|
42
|
+
const I = J(), O = w(null), D = w(null), [h, x] = K([]), v = g !== void 0, y = f.join(", "), C = _ ? `up to ${_}MB` : "", E = f.map((e) => `.${e.replace(/^\./, "")}`).join(","), P = () => {
|
|
43
43
|
var e;
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
return
|
|
50
|
-
file:
|
|
51
|
-
error:
|
|
44
|
+
A || (e = O.current) == null || e.click();
|
|
45
|
+
}, L = R((e) => {
|
|
46
|
+
const i = _ ? _ * 1024 * 1024 : Number.POSITIVE_INFINITY, r = new Set(f.map((c) => c.toLowerCase().replace(/^\./, ""))), l = e.map((c) => {
|
|
47
|
+
const k = c.size <= i, T = c.name.toLowerCase(), W = T.includes(".") ? T.split(".").pop() ?? "" : "", G = r.size === 0 || r.has(W);
|
|
48
|
+
let z;
|
|
49
|
+
return k || (z = `File size is too large. Must be ${C}.`), G || (z = `The file format is incorrect. Please make sure it is one of the extensions: ${y}.`), {
|
|
50
|
+
file: c,
|
|
51
|
+
error: z
|
|
52
52
|
};
|
|
53
53
|
});
|
|
54
|
-
return
|
|
55
|
-
}, [_, f,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
D(d);
|
|
60
|
-
}
|
|
61
|
-
}, [g, h]);
|
|
62
|
-
const E = (e) => {
|
|
54
|
+
return o === "single" ? l.slice(0, 1) : u && u > 0 ? l.slice(0, u) : l;
|
|
55
|
+
}, [_, f, C, y, o, u]), m = v ? (() => {
|
|
56
|
+
const e = Array.isArray(g) ? g : g ? [g] : [];
|
|
57
|
+
return L(e);
|
|
58
|
+
})() : h, Y = (e) => {
|
|
63
59
|
if (!e.target.files) return;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
}, F = (e) => {
|
|
67
|
-
const d = o.filter((a) => a.file.name !== e);
|
|
68
|
-
D(d), A == null || A(e);
|
|
69
|
-
}, P = (e) => (e / 1024).toFixed(2) + " KB", Y = (e) => {
|
|
70
|
-
var d, a;
|
|
71
|
-
e.preventDefault(), (d = u.current) == null || d.classList.add(r.active), (a = i.onDragOver) == null || a.call(i, e);
|
|
60
|
+
const i = Array.from(e.target.files), r = L(i);
|
|
61
|
+
v ? t == null || t(r) : (x((l) => p ? [...l, ...r] : r), p ? t == null || t([...h, ...r]) : t == null || t(r)), e.target.value = "";
|
|
72
62
|
}, $ = (e) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
63
|
+
if (!v) {
|
|
64
|
+
const i = h.filter((r) => r.file.name !== e);
|
|
65
|
+
x(i);
|
|
66
|
+
}
|
|
67
|
+
N == null || N(e);
|
|
68
|
+
}, F = (e) => (e / 1024).toFixed(2) + " KB", H = (e) => {
|
|
69
|
+
var i, r;
|
|
70
|
+
e.preventDefault(), (i = D.current) == null || i.classList.add(a.active), (r = s.onDragOver) == null || r.call(s, e);
|
|
71
|
+
}, Q = (e) => {
|
|
72
|
+
var i, r;
|
|
73
|
+
e.preventDefault(), (i = D.current) == null || i.classList.remove(a.active), (r = s.onDragLeave) == null || r.call(s, e);
|
|
74
|
+
}, S = (e) => {
|
|
75
|
+
var l, c;
|
|
77
76
|
e.preventDefault();
|
|
78
|
-
const
|
|
79
|
-
|
|
77
|
+
const i = Array.from(e.dataTransfer.files), r = L(i);
|
|
78
|
+
v ? t == null || t(r) : (x((k) => p ? [...k, ...r] : r), p ? t == null || t([...h, ...r]) : t == null || t(r)), e.dataTransfer.clearData(), (l = D.current) == null || l.classList.remove(a.active), (c = s.onDrop) == null || c.call(s, e);
|
|
80
79
|
};
|
|
81
|
-
return /* @__PURE__ */ n("div", { className:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
return /* @__PURE__ */ n("div", { className: V(a["drag-and-drop-container"], A && a.disabled, q), ...s, children: [
|
|
81
|
+
B && /* @__PURE__ */ n("label", { htmlFor: I, children: [
|
|
82
|
+
B,
|
|
83
|
+
j && /* @__PURE__ */ d("span", { "aria-hidden": "true", className: a.required, children: "*" })
|
|
85
84
|
] }),
|
|
86
|
-
/* @__PURE__ */ n("div", { ref:
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ n("div", { ref: D, className: a["drag-and-drop-space"], onDragOver: H, onDragLeave: Q, onDrop: S, ...s, children: [
|
|
86
|
+
/* @__PURE__ */ d(M, { type: "secondary", variant: "default", size: "sm", disabled: A, onClick: P, children: o === "single" ? "Browse file" : "Browse files" }),
|
|
87
|
+
/* @__PURE__ */ d("input", { id: I, ref: O, type: "file", style: {
|
|
89
88
|
display: "none"
|
|
90
|
-
}, multiple:
|
|
91
|
-
/* @__PURE__ */ n("div", { className:
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */ n("span", { className:
|
|
89
|
+
}, multiple: o === "multiple", accept: E, onChange: Y }),
|
|
90
|
+
/* @__PURE__ */ n("div", { className: a["drag-and-drop-space-text"], children: [
|
|
91
|
+
/* @__PURE__ */ d("span", { className: a["drag-and-drop-space-text-message"], children: o === "single" ? "or drag your file" : "or drag multiple files" }),
|
|
92
|
+
/* @__PURE__ */ n("span", { className: a["drag-and-drop-space-text-constraints"], children: [
|
|
94
93
|
" ",
|
|
95
|
-
|
|
94
|
+
y,
|
|
96
95
|
" ",
|
|
97
|
-
|
|
96
|
+
o === "single" ? "file" : "files",
|
|
98
97
|
" ",
|
|
99
|
-
|
|
98
|
+
C
|
|
100
99
|
] })
|
|
101
100
|
] })
|
|
102
101
|
] }),
|
|
103
|
-
(
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */ n("div", { className:
|
|
106
|
-
/* @__PURE__ */ n("div", { className:
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
e.error && /* @__PURE__ */ n("span", { className:
|
|
110
|
-
/* @__PURE__ */
|
|
102
|
+
(m == null ? void 0 : m.length) > 0 && /* @__PURE__ */ d("ul", { className: a["drag-and-drop-files-list"], children: m == null ? void 0 : m.map((e, i) => /* @__PURE__ */ d("li", { className: a["drag-and-drop-files-list-item"], children: /* @__PURE__ */ n("div", { className: a["drag-and-drop-files-list-item-content"], children: [
|
|
103
|
+
/* @__PURE__ */ d("span", { className: a["drag-and-drop-files-list-item-icon-container"], children: /* @__PURE__ */ d(b, { icon: "ap-icon-document", className: a["drag-and-drop-files-list-item-icon"] }) }),
|
|
104
|
+
/* @__PURE__ */ n("div", { className: a["drag-and-drop-files-list-item-content-data"], children: [
|
|
105
|
+
/* @__PURE__ */ n("div", { className: a["drag-and-drop-files-list-item-text"], children: [
|
|
106
|
+
/* @__PURE__ */ d("span", { className: a["drag-and-drop-files-list-item-name"], children: e.file.name }),
|
|
107
|
+
/* @__PURE__ */ d("span", { className: a["drag-and-drop-files-list-item-size"], children: F(e.file.size) }),
|
|
108
|
+
e.error && /* @__PURE__ */ n("span", { className: a["drag-and-drop-files-list-item-error"], children: [
|
|
109
|
+
/* @__PURE__ */ d(b, { icon: "ap-icon-alert", className: a["drag-and-drop-files-list-item-icon-error"] }),
|
|
111
110
|
e.error
|
|
112
111
|
] })
|
|
113
112
|
] }),
|
|
114
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ d(M, { type: "tertiary", variant: "default", size: "sm", onClick: () => $(e.file.name), icon: "ap-icon-delete" })
|
|
115
114
|
] })
|
|
116
|
-
] }) },
|
|
115
|
+
] }) }, i)) })
|
|
117
116
|
] });
|
|
118
117
|
}
|
|
119
118
|
export {
|
|
120
|
-
|
|
119
|
+
de as default
|
|
121
120
|
};
|