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.
@@ -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 { K as b } from "../../chunks/SnackBarProvider.T-xLQpTN.js";
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 T } from "../../theme/utils/tokens-mapper/index.js";
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 $ } from "../../translation/en-US/index.js";
14
- import { K as j, u as k } from "../../chunks/useKitLocale.96CdK3og.js";
15
- import { mapKitLocaleToAntdLocale as x } from "../../translation/utils/index.js";
16
- import { d as A } from "../../chunks/notification-provider.9msrEKBe.js";
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 F = "aristid-ds-global", I = (t, e) => {
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: F, hasSourceMap: !1, children: `
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: I(a({ general: { utilities: l.utilities } }, e), c) }), t] }) });
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(j.Provider, { value: e, children: t });
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($, r);
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 } = k();
58
+ const { locale: o, setKitLocale: r } = j();
59
59
  return P(() => {
60
60
  e !== void 0 && r(e);
61
- }, [e, r]), n(C, { theme: T, locale: x(e), renderEmpty: () => {
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(A, { children: [n(b, {}), t] }) });
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 { K as _ } from "../../../chunks/SnackBarProvider.T-xLQpTN.js";
3
- import { jsxs as m, jsx as s, Fragment as x } from "react/jsx-runtime";
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 T } from "../../Layout/Divider/index.js";
11
- import { KitButton as g } from "../../General/Button/index.js";
12
- import { KitTypography as w } from "../../General/Typography/index.js";
13
- const j = {
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
- }, E = (i) => s(g, { type: "tertiary", size: "m", icon: i.icon, onClick: i.onClick, className: i.className, disabled: i.disabled, children: i.label }, i.key), F = ({ message: i, actions: t, closable: a, onClose: r, actionsInDropDown: b, className: u, style: f }) => {
16
- var n;
17
- const { appId: h } = A(), y = t && t.length > 0, l = a !== void 0, N = k(h, j["kit-snackbar"], u), B = () => {
18
- c(), r == null || r();
19
- }, K = (n = t == null ? void 0 : t.map((o, S) => {
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 && n !== void 0 ? n : [];
27
- return m("div", { style: { ...f }, className: N, children: [l && s("div", { className: "kit-snackbar-close", children: s("div", { className: "kit-snackbar-close-button", onClick: B, children: s(d, { icon: C }) }) }), s("div", { className: "kit-snackbar-message", children: s(w.Text, { className: "kit-snackbar-title", children: i }) }), y && m(x, { children: [(i || l) && s(T, { type: "vertical", noMargin: !0, className: "kit-snackbar-divider" }), s("div", { className: "kit-snackbar-actions", children: s(p, { actions: K, actionsInDropdown: !!b, disabled: !1, actionRenderer: E, ellipsisButton: s(p.EllipsisButton, { type: "tertiary", size: "m", className: "kit-snackbar-action", icon: s(d, { icon: D }) }), threshold: 3 }) })] })] });
28
- }, I = F, z = 4e3, P = ({ duration: i = z, snackbarId: t = null, ...a }) => (c(), v(s(I, { ...a }), {
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: t ?? void 0
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 s } from "react";
3
- import { Toaster as n } from "react-hot-toast";
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", p = () => {
15
- const [o, e] = a(!0);
16
- return s(() => {
17
- const r = document.querySelector(`.${i}`);
18
- e(!!r);
19
- }, []), o ? t("div", {}) : t(n, { containerClassName: i, position: "bottom-center", toastOptions: { style: l } });
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 K
22
+ p as I
23
23
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aristid-ds",
3
3
  "description": "ARiSTiD design system",
4
- "version": "13.0.0-0d08d72",
4
+ "version": "13.0.0-4e097fb",
5
5
  "authors": [
6
6
  "e.voiron-levy@aristid.com",
7
7
  "p.chevieux@aristid.com",