aristid-ds 13.0.0-a482bfb → 13.0.0-b2fece3
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/CHANGELOG.md +6 -0
- package/dist/Kit/App/index.js +14 -14
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +1 -1
- package/dist/Kit/DataDisplay/IdCard/index.js +29 -17
- package/dist/Kit/DataDisplay/IdCard/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Image/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +43 -43
- package/dist/Kit/DataDisplay/Tag/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Tree/index.js +1 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/Rate/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/index.js +1 -1
- package/dist/Kit/DataEntry/Slider/index.js +1 -1
- package/dist/Kit/DataEntry/Switch/index.js +1 -1
- package/dist/Kit/Feedback/Loader/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +15 -15
- package/dist/Kit/General/Icon/index.js +1 -1
- package/dist/Kit/General/Typography/index.js +36 -40
- package/dist/Kit/Layout/Divider/index.js +1 -1
- package/dist/Kit/Layout/Section/index.js +1 -1
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +1 -1
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/styles.css +1 -0
- package/dist/chunks/{SnackBarProvider.nqDzpFo3.js → SnackBarProvider.T-xLQpTN.js} +10 -10
- package/dist/chunks/styles.module.shsViPAW.js +9 -0
- package/dist/index.umd.js +4 -4
- package/dist/utils/constants.d.ts +1 -0
- package/package.json +1 -1
- package/dist/assets/index51.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
### ✨ Features
|
|
6
6
|
|
|
7
|
+
- **IdCard**:
|
|
8
|
+
- remove use of `Typography.Text` compoent (@evoiron)
|
|
9
|
+
- add `disableTooltip` property to disable tooltip on title and description (@evoiron)
|
|
7
10
|
- **⚠️ Breaking change - Upload**:
|
|
8
11
|
- Remove the following properties: (@philippechevieux)
|
|
9
12
|
- `listType`
|
|
@@ -23,6 +26,9 @@
|
|
|
23
26
|
|
|
24
27
|
### 🐛 Bug Fixes
|
|
25
28
|
|
|
29
|
+
- **Tag:**
|
|
30
|
+
- Hide `closeIcon` for tags in a group if handleCloseTag is not provided (@philippechevieux)
|
|
31
|
+
- Remove tooltip for other tags in TagGroup (@NicoSourimant)
|
|
26
32
|
- **DatePicker/RangePicker**
|
|
27
33
|
- Fix color of prefix icon when component is `disabled`, in `warning` or `error` status (@philippechevieux)
|
|
28
34
|
|
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 { K as b } from "../../chunks/SnackBarProvider.T-xLQpTN.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 T } 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 $ } 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";
|
|
17
17
|
import { KitEmpty as p } from "../DataDisplay/Empty/index.js";
|
|
18
|
-
const
|
|
18
|
+
const F = "aristid-ds-global", I = (t, e) => {
|
|
19
19
|
const o = g(t);
|
|
20
20
|
return `
|
|
21
21
|
.${e} {
|
|
@@ -27,11 +27,11 @@ const A = "aristid-ds-global", F = (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: F, 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: I(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 A = "aristid-ds-global", F = (t, e) => {
|
|
|
42
42
|
};
|
|
43
43
|
}, M = ({ children: t }) => {
|
|
44
44
|
const e = N();
|
|
45
|
-
return n(
|
|
45
|
+
return n(j.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 A = "aristid-ds-global", F = (t, e) => {
|
|
|
50
50
|
const i = a(d, r);
|
|
51
51
|
e(i);
|
|
52
52
|
} else {
|
|
53
|
-
const i = a(
|
|
53
|
+
const i = a($, 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 } = k();
|
|
59
59
|
return P(() => {
|
|
60
60
|
e !== void 0 && r(e);
|
|
61
|
-
}, [e, r]), n(C, { theme:
|
|
61
|
+
}, [e, r]), n(C, { theme: T, locale: x(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(A, { children: [n(b, {}), t] }) });
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
67
|
te as KitApp
|
|
@@ -1,22 +1,34 @@
|
|
|
1
|
-
import "../../../assets/
|
|
2
|
-
import { jsxs as
|
|
1
|
+
import "../../../assets/index23.css";
|
|
2
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import n from "classnames";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { K as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import { t as D } from "../../../chunks/styles.module.shsViPAW.js";
|
|
5
|
+
import { u as v } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import { K as N } from "../../../chunks/Avatar.N2w2jq_C.js";
|
|
7
|
+
import { KitTooltip as y } from "../Tooltip/index.js";
|
|
8
|
+
const _ = {
|
|
9
|
+
"kit-id-card": "_kit-id-card_1go5o_2"
|
|
10
|
+
}, m = 0.8, h = [
|
|
11
|
+
D["kit-typography-text"],
|
|
12
|
+
"ant-typography",
|
|
13
|
+
"ant-typography-text",
|
|
14
|
+
"ant-typography-ellipsis",
|
|
15
|
+
"ant-typography-ellipsis-single-line"
|
|
16
|
+
], T = (a, i, r, o) => {
|
|
17
|
+
const s = n("kit-id-card-title", ...h, "kit-typography-fontSize5", "ant-typography-bold", {
|
|
18
|
+
"kit-id-card-title-large": i === "large",
|
|
19
|
+
"ant-typography-disabled": r
|
|
12
20
|
});
|
|
13
|
-
return
|
|
14
|
-
},
|
|
15
|
-
const s =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
return t("span", { className: s, children: t(y, { title: o ? "" : a, mouseEnterDelay: m, children: t("span", { children: a }) }) });
|
|
22
|
+
}, E = (a, i, r, o) => {
|
|
23
|
+
const s = n("kit-id-card-description", ...h, "ant-typography-regular", {
|
|
24
|
+
"kit-typography-fontSize5": i !== "medium",
|
|
25
|
+
"kit-typography-fontSize7": i === "medium",
|
|
26
|
+
"ant-typography-disabled": r
|
|
27
|
+
});
|
|
28
|
+
return t("span", { className: s, children: t(y, { title: o ? "" : a, mouseEnterDelay: m, children: t("span", { children: a }) }) });
|
|
29
|
+
}, K = ({ className: a, title: i, description: r, avatarProps: o, size: s = "medium", disabled: e = !1, disableTooltip: p = !1, ...g }) => {
|
|
30
|
+
const { appId: u } = v(), f = n(u, _["kit-id-card"], a), k = o !== void 0, l = i !== void 0, d = r !== void 0, x = l || d;
|
|
31
|
+
return c("div", { className: `${f} id-card-grid`, ...g, children: [k && t("div", { className: "card-avatar", children: t(N, { ...o, disabled: e }) }), x && c("div", { className: "card-info", children: [l && T(i, s, e, p), d && E(r, s, e, p)] })] });
|
|
20
32
|
};
|
|
21
33
|
K.displayName = "KitIdCard";
|
|
22
34
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index3.css";
|
|
2
2
|
import { jsxs as v, jsx as t, Fragment as C } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as J, useState as M } from "react";
|
|
4
4
|
import { KitCheckbox as O } from "../../DataEntry/Checkbox/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../assets/index37.css";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as D, useState as
|
|
2
|
+
import { jsx as t, Fragment as q, jsxs as $ } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as D, useState as C, useRef as x, useLayoutEffect as E } from "react";
|
|
4
4
|
import O from "classnames";
|
|
5
5
|
import { Tag as F } from "antd";
|
|
6
6
|
import { u as z } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
@@ -15,60 +15,60 @@ const I = {
|
|
|
15
15
|
"kit-tag-group": "_kit-tag-group_6ocqb_111",
|
|
16
16
|
"kit-tag-group-measure": "_kit-tag-group-measure_6ocqb_117",
|
|
17
17
|
"kit-tag-group-container": "_kit-tag-group-container_6ocqb_124"
|
|
18
|
-
},
|
|
19
|
-
const { appId:
|
|
20
|
-
[`kit-tag-${
|
|
21
|
-
"kit-tag-disabled":
|
|
22
|
-
"kit-tag-clickable":
|
|
18
|
+
}, h = D(({ className: r, closeIcon: s, type: c = "neutral", disabled: i, disableTooltip: a = !1, onClick: p, idCardProps: o, ...d }, u) => {
|
|
19
|
+
const { appId: b } = z(), _ = O(b, I["kit-tag"], r, {
|
|
20
|
+
[`kit-tag-${c}`]: c,
|
|
21
|
+
"kit-tag-disabled": i,
|
|
22
|
+
"kit-tag-clickable": p
|
|
23
23
|
});
|
|
24
|
-
return
|
|
25
|
-
}), X = ({ tags:
|
|
26
|
-
var
|
|
27
|
-
const [
|
|
24
|
+
return t(F, { tabIndex: i ? -1 : 0, ref: u, ...d, className: _, closeIcon: s ?? t(L, { icon: M }), onClick: p, closable: !!d.onClose, children: t(R, { disabled: i, disableTooltip: a, avatarProps: o != null && o.avatarProps ? { ...o == null ? void 0 : o.avatarProps, size: "small" } : void 0, description: o == null ? void 0 : o.description }) });
|
|
25
|
+
}), X = ({ tags: r, containerRef: s, measureRef: c, handleCloseTag: i }) => {
|
|
26
|
+
var a;
|
|
27
|
+
const [p, o] = C([]), [d, u] = C(0), [b, _] = C(t(q, {})), v = x(null), { locale: k } = P();
|
|
28
28
|
return E(() => {
|
|
29
|
-
const
|
|
30
|
-
var
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
29
|
+
const K = () => {
|
|
30
|
+
var T, g, e;
|
|
31
|
+
const l = s.current, f = c.current;
|
|
32
|
+
if (!l || !f)
|
|
33
33
|
return;
|
|
34
|
-
$(
|
|
35
|
-
|
|
36
|
-
} },
|
|
37
|
-
const j =
|
|
38
|
-
let
|
|
39
|
-
for (let
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
42
|
-
|
|
34
|
+
_($(q, { children: [r.map((n, y) => t(h, { type: n == null ? void 0 : n.type, disabled: n == null ? void 0 : n.disabled, idCardProps: n.idCardProps, onClose: () => {
|
|
35
|
+
i == null || i(y);
|
|
36
|
+
} }, y)), t(h, { idCardProps: { description: `+${d} ${(T = k.General) === null || T === void 0 ? void 0 : T.others}` } })] }));
|
|
37
|
+
const j = l == null ? void 0 : l.clientWidth, G = Array.from(f.children), A = (g = G[G.length - 1]) === null || g === void 0 ? void 0 : g.clientWidth;
|
|
38
|
+
let N = 0, W = 0;
|
|
39
|
+
for (let n = 0; n < G.length - 1; n++) {
|
|
40
|
+
const y = ((e = G[n]) === null || e === void 0 ? void 0 : e.clientWidth) + 8;
|
|
41
|
+
if (N + y + 8 + (n < r.length - 1 ? A : 0) <= j)
|
|
42
|
+
N += y, W++;
|
|
43
43
|
else
|
|
44
44
|
break;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
W < r.length ? (o(r.slice(0, W)), u(r.length - W)) : (o(r), u(0));
|
|
47
47
|
};
|
|
48
48
|
let m;
|
|
49
|
-
const
|
|
50
|
-
clearTimeout(m), m = setTimeout(
|
|
49
|
+
const w = () => {
|
|
50
|
+
clearTimeout(m), m = setTimeout(K, 100);
|
|
51
51
|
};
|
|
52
|
-
return
|
|
52
|
+
return K(), v.current = new ResizeObserver(w), s.current && v.current.observe(s.current), () => {
|
|
53
53
|
v.current && v.current.disconnect(), clearTimeout(m);
|
|
54
54
|
};
|
|
55
|
-
}, [s,
|
|
56
|
-
measureTags:
|
|
57
|
-
visibleTags:
|
|
58
|
-
hiddenCount:
|
|
55
|
+
}, [s, i, d, (a = k.General) === null || a === void 0 ? void 0 : a.others, c, r]), {
|
|
56
|
+
measureTags: b,
|
|
57
|
+
visibleTags: p,
|
|
58
|
+
hiddenCount: d
|
|
59
59
|
};
|
|
60
|
-
}, B = ({ tags:
|
|
61
|
-
var
|
|
62
|
-
const
|
|
60
|
+
}, B = ({ tags: r, style: s, className: c, handleCloseTag: i, othersTagType: a = "neutral", othersTagDisabled: p }) => {
|
|
61
|
+
var o;
|
|
62
|
+
const d = x(null), u = x(null), { locale: b } = P(), { appId: _ } = z(), [v, k] = C(!1), { measureTags: K, visibleTags: m, hiddenCount: w } = X({ tags: r, containerRef: d, measureRef: u, handleCloseTag: i }), T = () => r.slice(m.length).map((e, l) => {
|
|
63
63
|
var f;
|
|
64
|
-
return
|
|
65
|
-
}),
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
} },
|
|
69
|
-
|
|
70
|
-
} },
|
|
71
|
-
}, J = B, S =
|
|
64
|
+
return t("div", { children: (f = e.idCardProps) === null || f === void 0 ? void 0 : f.description }, l);
|
|
65
|
+
}), g = O(_, I["kit-tag-group"], c);
|
|
66
|
+
return $("div", { className: I["kit-tag-group-container"], children: [$("div", { ref: d, style: s, className: g, children: [m.map((e, l) => t(h, { type: e == null ? void 0 : e.type, disabled: e == null ? void 0 : e.disabled, idCardProps: e.idCardProps, onClose: i ? () => {
|
|
67
|
+
i(l);
|
|
68
|
+
} : void 0 }, l)), w > 0 && t(H, { overlay: T(), children: t(h, { type: a, disabled: p, disableTooltip: !0, idCardProps: { description: `+${w} ${(o = b.General) === null || o === void 0 ? void 0 : o.others}` }, onClick: () => k(!0) }) }), t(V, { isOpen: v, close: () => k(!1), showCloseIcon: !0, title: "Tags", appElement: document.body, children: t("div", { style: { display: "flex", flexWrap: "wrap", rowGap: "8px" }, children: r.map((e, l) => t(h, { id: `tag-${l}`, type: e == null ? void 0 : e.type, disabled: e == null ? void 0 : e.disabled, idCardProps: e.idCardProps, onClose: i ? () => {
|
|
69
|
+
i(l);
|
|
70
|
+
} : void 0 }, l)) }) })] }), t("div", { ref: u, className: I["kit-tag-group-measure"], "aria-hidden": "true", children: K })] });
|
|
71
|
+
}, J = B, S = h;
|
|
72
72
|
S.displayName = "KitTag";
|
|
73
73
|
S.Group = J;
|
|
74
74
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../../../assets/
|
|
1
|
+
import "../../../../../assets/index22.css";
|
|
2
2
|
import { jsx as i, Fragment as z, jsxs as _ } from "react/jsx-runtime";
|
|
3
3
|
import { KitTypography as m } from "../../../../General/Typography/index.js";
|
|
4
4
|
import { KitDropDown as w } from "../../../../Navigation/DropDown/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index8.css";
|
|
2
2
|
import { jsxs as E, jsx as u } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as Q, useRef as V, useState as _, useEffect as f } from "react";
|
|
4
4
|
import { K as X } from "../../../chunks/InputWrapper.l5p7rU3g.js";
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import "../../../assets/index32.css";
|
|
2
|
-
import {
|
|
3
|
-
import { jsxs as m, jsx as
|
|
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";
|
|
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 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 = {
|
|
14
14
|
"kit-snackbar": "_kit-snackbar_1bxje_2"
|
|
15
|
-
},
|
|
16
|
-
var
|
|
17
|
-
const { appId: h } = A(), y =
|
|
18
|
-
c(),
|
|
19
|
-
}, K = (
|
|
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) => {
|
|
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 && 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 }), {
|
|
29
29
|
duration: i === 0 ? 1 / 0 : i,
|
|
30
|
-
id:
|
|
30
|
+
id: t ?? void 0
|
|
31
31
|
})), c = (i) => {
|
|
32
32
|
v.dismiss(i);
|
|
33
33
|
}, Q = P, W = c, Y = _;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef as c, useMemo as m } from "react";
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useMemo as m } from "react";
|
|
4
3
|
import K from "antd/es/typography/Base";
|
|
5
|
-
import
|
|
6
|
-
import { isValidColor as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"ant-typography-
|
|
12
|
-
"ant-typography-
|
|
13
|
-
|
|
4
|
+
import c from "classnames";
|
|
5
|
+
import { isValidColor as L, getColor as C } from "../../../utils/functions/index.js";
|
|
6
|
+
import { u as h } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
|
+
import { t as u } from "../../../chunks/styles.module.shsViPAW.js";
|
|
8
|
+
import { Typography as p } from "antd";
|
|
9
|
+
const k = (t = "regular") => c({
|
|
10
|
+
"ant-typography-regular": t === d.regular,
|
|
11
|
+
"ant-typography-medium": t === d.medium,
|
|
12
|
+
"ant-typography-bold": t === d.bold
|
|
13
|
+
}), T = (t) => c({ [`kit-typography-${t}`]: t }), d = {
|
|
14
14
|
regular: "regular",
|
|
15
15
|
medium: "medium",
|
|
16
16
|
bold: "bold"
|
|
@@ -19,8 +19,8 @@ const d = (t = "regular") => s({
|
|
|
19
19
|
h2: "h2",
|
|
20
20
|
h3: "h3",
|
|
21
21
|
h4: "h4"
|
|
22
|
-
},
|
|
23
|
-
if (!t || !(
|
|
22
|
+
}, P = (t) => ["primary", "grey", "black", "black60", "white"].includes(t), g = (t) => {
|
|
23
|
+
if (!t || !(L(t) || P(t)))
|
|
24
24
|
return null;
|
|
25
25
|
let e = "";
|
|
26
26
|
switch (t) {
|
|
@@ -31,43 +31,39 @@ const d = (t = "regular") => s({
|
|
|
31
31
|
e = "var(--general-colors-neutral-white)";
|
|
32
32
|
break;
|
|
33
33
|
default:
|
|
34
|
-
e =
|
|
34
|
+
e = C(t);
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
38
|
"--kit-typography-color": e
|
|
39
39
|
};
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"kit-typography-text": "_kit-typography-text_1gi19_35"
|
|
44
|
-
}, N = c(({ level: t = x.h1, ...e }, r) => {
|
|
45
|
-
const { appId: a } = g(), o = x[t], l = K, i = m(() => ({ ...e.style, ...h(e.color) }), [e.color, e.style]), n = s(a, p["kit-typography-title"], e.className);
|
|
46
|
-
return y(l, { ref: r, ...e, component: o, className: n, style: i });
|
|
40
|
+
}, f = y(({ level: t = x.h1, ...e }, l) => {
|
|
41
|
+
const { appId: a } = h(), o = x[t], r = K, n = m(() => ({ ...e.style, ...g(e.color) }), [e.color, e.style]), s = c(a, u["kit-typography-title"], e.className);
|
|
42
|
+
return i(r, { ref: l, ...e, component: o, className: s, style: n });
|
|
47
43
|
});
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const { appId:
|
|
51
|
-
return
|
|
44
|
+
f.displayName = "KitTitle";
|
|
45
|
+
const S = f, N = y(({ size: t = "medium", weight: e, className: l, ...a }, o) => {
|
|
46
|
+
const { appId: r } = h(), n = c(r, u["kit-typography-text"], T(t), k(e), l), s = m(() => ({ ...a.style, ...g(a.color) }), [a.color, a.style]);
|
|
47
|
+
return i(p.Text, { ...a, ref: o, className: n, style: s });
|
|
52
48
|
});
|
|
53
|
-
|
|
54
|
-
const E =
|
|
55
|
-
const { appId:
|
|
56
|
-
return
|
|
49
|
+
N.displayName = "KitText";
|
|
50
|
+
const E = N, b = y(({ size: t = "medium", weight: e, className: l, ...a }, o) => {
|
|
51
|
+
const { appId: r } = h(), n = c(r, u["kit-typography-link"], T(t), k(e), l), s = m(() => ({ ...a.style, ...g(a.color) }), [a.color, a.style]);
|
|
52
|
+
return i(p.Link, { ...a, ref: o, className: n, style: s });
|
|
57
53
|
});
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
const { appId:
|
|
61
|
-
return
|
|
54
|
+
b.displayName = "KitLink";
|
|
55
|
+
const V = b, I = y(({ size: t = "medium", weight: e, className: l, ...a }, o) => {
|
|
56
|
+
const { appId: r } = h(), n = c(r, u["kit-typography-paragraph"], T(t), k(e), l), s = m(() => ({ ...a.style, ...g(a.color) }), [a.color, a.style]);
|
|
57
|
+
return i(p.Paragraph, { ...a, ref: o, className: n, style: s });
|
|
62
58
|
});
|
|
63
59
|
I.displayName = "KitParagraph";
|
|
64
|
-
const
|
|
65
|
-
Title:
|
|
60
|
+
const w = I, v = {
|
|
61
|
+
Title: S,
|
|
66
62
|
Text: E,
|
|
67
|
-
Link:
|
|
68
|
-
Paragraph:
|
|
63
|
+
Link: V,
|
|
64
|
+
Paragraph: w
|
|
69
65
|
};
|
|
70
|
-
|
|
66
|
+
v.displayName = "KitTypography";
|
|
71
67
|
export {
|
|
72
|
-
|
|
68
|
+
v as KitTypography
|
|
73
69
|
};
|