aristid-ds 13.0.0-0d08d72 → 13.0.0-4e097fb
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/Kit/App/index.js
CHANGED
|
@@ -2,20 +2,20 @@ import "../../assets/index28.css";
|
|
|
2
2
|
import { jsx as n, jsxs as f, Fragment as h } from "react/jsx-runtime";
|
|
3
3
|
import { useState as u, useLayoutEffect as L, useRef as S, useEffect as P } from "react";
|
|
4
4
|
import { ConfigProvider as C } from "antd";
|
|
5
|
-
import {
|
|
5
|
+
import { I as b } from "../../chunks/SnackBarProvider.nqDzpFo3.js";
|
|
6
6
|
import { toCssVariables as g, uuid as y } from "../../utils/functions/index.js";
|
|
7
7
|
import a from "lodash/merge";
|
|
8
8
|
import { Style as m } from "react-style-tag";
|
|
9
9
|
import { K as E } from "../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
import { KitAristidThemeGeneral as l } from "../../theme/aristid/general/index.js";
|
|
11
|
-
import { antdThemeConfig as
|
|
11
|
+
import { antdThemeConfig as I } from "../../theme/utils/tokens-mapper/index.js";
|
|
12
12
|
import { frFR as d } from "../../translation/fr-FR/index.js";
|
|
13
|
-
import { enUS as
|
|
14
|
-
import { K as
|
|
15
|
-
import { mapKitLocaleToAntdLocale as
|
|
16
|
-
import { d as
|
|
13
|
+
import { enUS as T } from "../../translation/en-US/index.js";
|
|
14
|
+
import { K as $, u as j } from "../../chunks/useKitLocale.96CdK3og.js";
|
|
15
|
+
import { mapKitLocaleToAntdLocale as k } from "../../translation/utils/index.js";
|
|
16
|
+
import { d as x } from "../../chunks/notification-provider.9msrEKBe.js";
|
|
17
17
|
import { KitEmpty as p } from "../DataDisplay/Empty/index.js";
|
|
18
|
-
const
|
|
18
|
+
const A = "aristid-ds-global", F = (t, e) => {
|
|
19
19
|
const o = g(t);
|
|
20
20
|
return `
|
|
21
21
|
.${e} {
|
|
@@ -27,11 +27,11 @@ const F = "aristid-ds-global", I = (t, e) => {
|
|
|
27
27
|
return L(() => {
|
|
28
28
|
const s = g(l, "--general");
|
|
29
29
|
i(s);
|
|
30
|
-
}, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id:
|
|
30
|
+
}, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id: A, hasSourceMap: !1, children: `
|
|
31
31
|
:root {
|
|
32
32
|
${Object.keys(r).map((s) => `${s}: ${r[s]}`).join(";")}
|
|
33
33
|
}
|
|
34
|
-
` }), e && n(m, { hasSourceMap: !1, children:
|
|
34
|
+
` }), e && n(m, { hasSourceMap: !1, children: F(a({ general: { utilities: l.utilities } }, e), c) }), t] }) });
|
|
35
35
|
}, _ = (t, e) => {
|
|
36
36
|
var o;
|
|
37
37
|
const r = S(t || "ds-" + y().substring(0, 8)), i = a(l.spacing, (o = e == null ? void 0 : e.general) === null || o === void 0 ? void 0 : o.spacing);
|
|
@@ -42,7 +42,7 @@ const F = "aristid-ds-global", I = (t, e) => {
|
|
|
42
42
|
};
|
|
43
43
|
}, M = ({ children: t }) => {
|
|
44
44
|
const e = N();
|
|
45
|
-
return n(
|
|
45
|
+
return n($.Provider, { value: e, children: t });
|
|
46
46
|
}, N = () => {
|
|
47
47
|
const [t, e] = u(d);
|
|
48
48
|
return { locale: t, setKitLocale: (r) => {
|
|
@@ -50,18 +50,18 @@ const F = "aristid-ds-global", I = (t, e) => {
|
|
|
50
50
|
const i = a(d, r);
|
|
51
51
|
e(i);
|
|
52
52
|
} else {
|
|
53
|
-
const i = a(
|
|
53
|
+
const i = a(T, r);
|
|
54
54
|
e(i);
|
|
55
55
|
}
|
|
56
56
|
} };
|
|
57
57
|
}, te = ({ children: t, locale: e, customTheme: o, id: r }) => n(R, { customTheme: o, id: r, children: n(M, { children: n(O, { locale: e, children: t }) }) }), O = ({ children: t, locale: e }) => {
|
|
58
|
-
const { locale: o, setKitLocale: r } =
|
|
58
|
+
const { locale: o, setKitLocale: r } = j();
|
|
59
59
|
return P(() => {
|
|
60
60
|
e !== void 0 && r(e);
|
|
61
|
-
}, [e, r]), n(C, { theme:
|
|
61
|
+
}, [e, r]), n(C, { theme: I, locale: k(e), renderEmpty: () => {
|
|
62
62
|
var i;
|
|
63
63
|
return n(p, { className: "default-render", image: p.ASSET_LIST, description: (i = o.Empty) === null || i === void 0 ? void 0 : i.noData });
|
|
64
|
-
}, children: f(
|
|
64
|
+
}, children: f(x, { children: [n(b, {}), t] }) });
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
67
|
te as KitApp
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import "../../../assets/index33.css";
|
|
2
|
-
import {
|
|
3
|
-
import { jsxs as m, jsx as
|
|
2
|
+
import { I as _ } from "../../../chunks/SnackBarProvider.nqDzpFo3.js";
|
|
3
|
+
import { jsxs as m, jsx as a, Fragment as x } from "react/jsx-runtime";
|
|
4
4
|
import { toast as v } from "react-hot-toast";
|
|
5
5
|
import { u as A } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import { FontAwesomeIcon as d } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faXmark as C, faEllipsisV as D } from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
import k from "classnames";
|
|
9
9
|
import p from "../../General/DynamicActions/index.js";
|
|
10
|
-
import { KitDivider as
|
|
11
|
-
import { KitButton as
|
|
12
|
-
import { KitTypography as
|
|
13
|
-
const
|
|
10
|
+
import { KitDivider as I } from "../../Layout/Divider/index.js";
|
|
11
|
+
import { KitButton as T } from "../../General/Button/index.js";
|
|
12
|
+
import { KitTypography as g } from "../../General/Typography/index.js";
|
|
13
|
+
const w = {
|
|
14
14
|
"kit-snackbar": "_kit-snackbar_1bxje_2"
|
|
15
|
-
},
|
|
16
|
-
var
|
|
17
|
-
const { appId: h } = A(), y =
|
|
18
|
-
c(),
|
|
19
|
-
}, K = (
|
|
15
|
+
}, j = (i) => a(T, { type: "tertiary", size: "m", icon: i.icon, onClick: i.onClick, className: i.className, disabled: i.disabled, children: i.label }, i.key), E = ({ message: i, actions: s, closable: t, onClose: n, actionsInDropDown: b, className: u, style: f }) => {
|
|
16
|
+
var r;
|
|
17
|
+
const { appId: h } = A(), y = s && s.length > 0, l = t !== void 0, N = k(h, w["kit-snackbar"], u), B = () => {
|
|
18
|
+
c(), n == null || n();
|
|
19
|
+
}, K = (r = s == null ? void 0 : s.map((o, S) => {
|
|
20
20
|
var e;
|
|
21
21
|
return {
|
|
22
22
|
...o,
|
|
23
23
|
key: (e = o.key) !== null && e !== void 0 ? e : S,
|
|
24
24
|
className: k(o.className, "kit-snackbar-action")
|
|
25
25
|
};
|
|
26
|
-
})) !== null &&
|
|
27
|
-
return m("div", { style: { ...f }, className: N, children: [l &&
|
|
28
|
-
},
|
|
26
|
+
})) !== null && r !== void 0 ? r : [];
|
|
27
|
+
return m("div", { style: { ...f }, className: N, children: [l && a("div", { className: "kit-snackbar-close", children: a("div", { className: "kit-snackbar-close-button", onClick: B, children: a(d, { icon: C }) }) }), a("div", { className: "kit-snackbar-message", children: a(g.Text, { className: "kit-snackbar-title", children: i }) }), y && m(x, { children: [(i || l) && a(I, { type: "vertical", noMargin: !0, className: "kit-snackbar-divider" }), a("div", { className: "kit-snackbar-actions", children: a(p, { actions: K, actionsInDropdown: !!b, disabled: !1, actionRenderer: j, ellipsisButton: a(p.EllipsisButton, { type: "tertiary", size: "m", className: "kit-snackbar-action", icon: a(d, { icon: D }) }), threshold: 3 }) })] })] });
|
|
28
|
+
}, F = E, z = 4e3, P = ({ duration: i = z, snackbarId: s = null, ...t }) => (c(), v(a(F, { ...t }), {
|
|
29
29
|
duration: i === 0 ? 1 / 0 : i,
|
|
30
|
-
id:
|
|
30
|
+
id: s ?? void 0
|
|
31
31
|
})), c = (i) => {
|
|
32
32
|
v.dismiss(i);
|
|
33
33
|
}, Q = P, W = c, Y = _;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as a, useEffect as
|
|
3
|
-
import { Toaster as
|
|
2
|
+
import { useState as a, useEffect as n } from "react";
|
|
3
|
+
import { Toaster as s } from "react-hot-toast";
|
|
4
4
|
const l = {
|
|
5
5
|
background: "initial",
|
|
6
6
|
padding: "initial",
|
|
@@ -11,13 +11,13 @@ const l = {
|
|
|
11
11
|
alignItems: "initial",
|
|
12
12
|
borderRadius: "initial",
|
|
13
13
|
maxWidth: "800px"
|
|
14
|
-
}, i = "aristid-ds-toaster",
|
|
15
|
-
const [o,
|
|
16
|
-
return
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
}, []), o ? t("div", {}) : t(
|
|
20
|
-
};
|
|
14
|
+
}, i = "aristid-ds-toaster", d = () => {
|
|
15
|
+
const [o, r] = a(!0);
|
|
16
|
+
return n(() => {
|
|
17
|
+
const e = document.querySelector(`.${i}`);
|
|
18
|
+
r(!!e);
|
|
19
|
+
}, []), o ? t("div", {}) : t(s, { containerClassName: i, position: "bottom-center", toastOptions: { style: l } });
|
|
20
|
+
}, p = d;
|
|
21
21
|
export {
|
|
22
|
-
p as
|
|
22
|
+
p as I
|
|
23
23
|
};
|