aristid-ds 12.0.0-eaca419 → 12.0.0-fe240df
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 -1
- package/dist/Kit/App/index.js +14 -14
- package/dist/Kit/DataDisplay/Table/index.js +22 -22
- package/dist/Kit/DataDisplay/Tree/index.js +12 -12
- package/dist/Kit/DataDisplay/Tree/types.d.ts +3 -1
- package/dist/Kit/DataEntry/Checkbox/index.js +6 -6
- package/dist/Kit/Feedback/SnackBar/index.d.ts +2 -2
- package/dist/Kit/Feedback/SnackBar/index.js +22 -21
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.d.ts +2 -2
- package/dist/Kit/Feedback/SnackBar/types.d.ts +1 -0
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/chunks/{SnackBarProvider.T-xLQpTN.js → SnackBarProvider.nqDzpFo3.js} +10 -10
- package/dist/index.umd.js +3 -3
- package/dist/theme/utils/tokens-mapper/DataDisplay/Tree/index.d.ts +4 -0
- package/dist/theme/utils/tokens-mapper/DataDisplay/Tree/index.js +11 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### ✨ CI
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Add a pre-commit hook. Now, `eslint` and `tscheck` are run before each commit (@evoiron)
|
|
8
8
|
|
|
9
9
|
### 📦 Upgrade
|
|
10
10
|
|
|
@@ -60,6 +60,11 @@ The following points are the impact of this version upgrade:
|
|
|
60
60
|
|
|
61
61
|
### ✨ Features
|
|
62
62
|
|
|
63
|
+
- **Snackbar**:
|
|
64
|
+
- Add `snackbarId` property to allow to update a snackbar (@evoiron)
|
|
65
|
+
- **⚠️ Breaking change - Tree**:
|
|
66
|
+
- Remove `showLine` and `switcherIcon` properties (@philippechevieux)
|
|
67
|
+
- Update component render (@philippechevieux)
|
|
63
68
|
- **Tabs**:
|
|
64
69
|
- Add controlled state to handle navigation within tabs (@renaudamsellem)
|
|
65
70
|
- **SidePanel**:
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -2,20 +2,20 @@ import "../../assets/index29.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,16 +1,16 @@
|
|
|
1
1
|
import "../../../assets/index46.css";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as z, useMemo as
|
|
3
|
+
import { forwardRef as z, useMemo as k } from "react";
|
|
4
4
|
import { Table as w } from "antd";
|
|
5
5
|
import g from "classnames";
|
|
6
6
|
import { u as O } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
7
|
import { KitIcon as U } from "../../General/Icon/index.js";
|
|
8
|
-
import { FontAwesomeIcon as
|
|
8
|
+
import { FontAwesomeIcon as _ } from "@fortawesome/react-fontawesome";
|
|
9
9
|
import { faUpDown as W, faArrowDown as M, faArrowUp as B, faGripLines as F, faCaretDown as G, faCaretRight as $ } from "@fortawesome/free-solid-svg-icons";
|
|
10
10
|
import { KitButton as I } from "../../General/Button/index.js";
|
|
11
11
|
const y = {
|
|
12
|
-
"kit-table": "_kit-
|
|
13
|
-
"expand-button": "_expand-
|
|
12
|
+
"kit-table": "_kit-table_bvvfm_2",
|
|
13
|
+
"expand-button": "_expand-button_bvvfm_661"
|
|
14
14
|
}, x = (i) => {
|
|
15
15
|
const l = i == null ? void 0 : i.split(" "), t = l == null ? void 0 : l.filter((a) => a !== "ant-table-cell").join(" "), r = l == null ? void 0 : l.filter((a) => ["ant-table-cell", "ant-table-cell-ellipsis", "ant-table-selection-column"].includes(a)).join(" ");
|
|
16
16
|
return {
|
|
@@ -19,17 +19,17 @@ const y = {
|
|
|
19
19
|
};
|
|
20
20
|
}, q = (i) => ({
|
|
21
21
|
header: {
|
|
22
|
-
cell: ({ children: l, className: t, style: r, title: a, rowSpan: f, colSpan:
|
|
22
|
+
cell: ({ children: l, className: t, style: r, title: a, rowSpan: f, colSpan: u, ...b }) => {
|
|
23
23
|
const s = x(t);
|
|
24
|
-
return o("th", { className: s.antCell, style: r, title: a, rowSpan: f, colSpan:
|
|
24
|
+
return o("th", { className: s.antCell, style: r, title: a, rowSpan: f, colSpan: u, ...b, children: o("div", { className: s.internalCell, children: l }) });
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
body: {
|
|
28
|
-
cell: ({ children: l, className: t, style: r, title: a, rowSpan: f, colSpan:
|
|
28
|
+
cell: ({ children: l, className: t, style: r, title: a, rowSpan: f, colSpan: u, ...b }) => {
|
|
29
29
|
var s, c;
|
|
30
30
|
const h = (s = i == null ? void 0 : i.body) === null || s === void 0 ? void 0 : s.cell, n = x(t);
|
|
31
31
|
let C = "";
|
|
32
|
-
return !((c = n.antCell) === null || c === void 0) && c.includes("ant-table-cell-ellipsis") && (C = a), o("td", { className: n.antCell, style: r, title: C, rowSpan: f, colSpan:
|
|
32
|
+
return !((c = n.antCell) === null || c === void 0) && c.includes("ant-table-cell-ellipsis") && (C = a), o("td", { className: n.antCell, style: r, title: C, rowSpan: f, colSpan: u, children: o("div", { className: n.internalCell, children: h ? o(h, { title: a, ...b, children: l }) : l }) });
|
|
33
33
|
},
|
|
34
34
|
row: ({ children: l, ...t }) => {
|
|
35
35
|
var r;
|
|
@@ -50,31 +50,31 @@ const y = {
|
|
|
50
50
|
l = W;
|
|
51
51
|
break;
|
|
52
52
|
}
|
|
53
|
-
return o(U, { color: t, icon: o(
|
|
53
|
+
return o(U, { color: t, icon: o(_, { icon: l }) });
|
|
54
54
|
}, N = z(({ className: i, isDragging: l, ...t }, r) => {
|
|
55
55
|
const a = g("kit-table-drag-handle", i, { "kit-table-drag-handle--dragging": l });
|
|
56
|
-
return o(I, { ...t, iconSize: "l", type: "tertiary", className: a, icon: o(
|
|
57
|
-
}), J = ({ className: i, style: l, cellsBackgroundColor: t, backgroundColor: r, borderedRows: a, columns: f, onChange:
|
|
56
|
+
return o(I, { ...t, iconSize: "l", type: "tertiary", className: a, icon: o(_, { icon: F }), ref: r });
|
|
57
|
+
}), J = ({ className: i, style: l, cellsBackgroundColor: t, backgroundColor: r, borderedRows: a, columns: f, onChange: u, components: b, showDragHandle: s, dragHandleElement: c, lineSize: h = "l", ...n }) => {
|
|
58
58
|
const { appId: C, theme: T } = O(), A = g(C, y["kit-table"], i, {
|
|
59
59
|
"kit-table-line-size-m": h === "m",
|
|
60
60
|
"kit-table-bordered-rows": a
|
|
61
|
-
}),
|
|
62
|
-
const e = [...f].map((
|
|
63
|
-
...
|
|
61
|
+
}), p = k(() => n != null && n.rowSelection ? { ...n == null ? void 0 : n.rowSelection, columnWidth: "var(--kit-table-checkbox-width)" } : n == null ? void 0 : n.rowSelection, [n == null ? void 0 : n.rowSelection]), K = k(() => {
|
|
62
|
+
const e = [...f].map((v) => s ? {
|
|
63
|
+
...v,
|
|
64
64
|
sorter: void 0
|
|
65
|
-
} : (
|
|
66
|
-
return s && (
|
|
65
|
+
} : (v.sorter && (v.sortIcon = ({ sortOrder: m }) => o(E, { sortOrder: m })), v));
|
|
66
|
+
return s && (p && e.unshift(w.SELECTION_COLUMN), e.unshift({
|
|
67
67
|
key: "drag-handle",
|
|
68
68
|
align: "center",
|
|
69
69
|
render: () => c ?? o(N, {})
|
|
70
70
|
})), e;
|
|
71
|
-
}, [f,
|
|
72
|
-
|
|
73
|
-
}, D = ({ record: e, expanded:
|
|
71
|
+
}, [f, p, s, c]), R = (e, v, m, d) => {
|
|
72
|
+
u == null || u(e, m, d);
|
|
73
|
+
}, D = ({ record: e, expanded: v, onExpand: m }) => {
|
|
74
74
|
var d;
|
|
75
75
|
if (!(!Array.isArray(e == null ? void 0 : e.children) || !(!((d = e == null ? void 0 : e.children) === null || d === void 0) && d.length)))
|
|
76
|
-
return o(I, { className: y["expand-button"], type: "tertiary", onClick: (j) => m(e, j), children: o(
|
|
77
|
-
}, L = (e,
|
|
76
|
+
return o(I, { className: y["expand-button"], type: "tertiary", onClick: (j) => m(e, j), children: o(_, { icon: v ? G : $ }) });
|
|
77
|
+
}, L = (e, v, m) => {
|
|
78
78
|
var d;
|
|
79
79
|
return m > 0 && (!Array.isArray(e == null ? void 0 : e.children) || !(!((d = e == null ? void 0 : e.children) === null || d === void 0) && d.length)) ? "last-expandable-level" : "";
|
|
80
80
|
};
|
|
@@ -96,7 +96,7 @@ const y = {
|
|
|
96
96
|
indentSize: T.spacing.m
|
|
97
97
|
},
|
|
98
98
|
...n,
|
|
99
|
-
rowSelection:
|
|
99
|
+
rowSelection: p
|
|
100
100
|
});
|
|
101
101
|
}, S = J;
|
|
102
102
|
S.displayName = "KitTable";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "../../../assets/index6.css";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { Tree as
|
|
4
|
-
import { u as
|
|
5
|
-
import
|
|
6
|
-
import { FontAwesomeIcon as
|
|
7
|
-
import { faCircleNotch as
|
|
8
|
-
const
|
|
9
|
-
"kit-tree": "_kit-
|
|
10
|
-
},
|
|
11
|
-
const { appId:
|
|
12
|
-
return r(
|
|
3
|
+
import { Tree as p } from "antd";
|
|
4
|
+
import { u as s } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
+
import d from "classnames";
|
|
6
|
+
import { FontAwesomeIcon as e } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { faCircleNotch as c, faCaretRight as l } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
const v = {
|
|
9
|
+
"kit-tree": "_kit-tree_1dpps_2"
|
|
10
|
+
}, f = ({ className: t, switcherLoadingIcon: o, ...i }) => {
|
|
11
|
+
const { appId: n } = s(), a = d(n, v["kit-tree"], t);
|
|
12
|
+
return r(p, { ...i, switcherLoadingIcon: o ?? r(e, { icon: c, spin: !0 }), switcherIcon: (m) => r(e, { icon: l, rotation: m.expanded ? 90 : void 0 }), className: a, blockNode: !0, draggable: !1, onDragEnd: void 0, onDragEnter: void 0, onDragLeave: void 0, onDragOver: void 0, onDragStart: void 0, onDrop: void 0 });
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
f.displayName = "KitTree";
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as KitTree
|
|
17
17
|
};
|
|
@@ -12,7 +12,9 @@ type AntdTreeTypesToOmit =
|
|
|
12
12
|
| 'onDragOver'
|
|
13
13
|
| 'onDragStart'
|
|
14
14
|
| 'onDrop'
|
|
15
|
-
| 'filterTreeNode'
|
|
15
|
+
| 'filterTreeNode'
|
|
16
|
+
| 'showLine'
|
|
17
|
+
| 'switcherIcon';
|
|
16
18
|
|
|
17
19
|
export interface IKitTree
|
|
18
20
|
extends Omit<TreeProps<BasicDataNode | DataNode>, AntdTreeTypesToOmit>,
|
|
@@ -16,7 +16,7 @@ const j = P(null), te = ({ defaultValue: b, children: v, options: a = [], prefix
|
|
|
16
16
|
const _ = () => a.map((l) => typeof l == "string" || typeof l == "number" ? {
|
|
17
17
|
label: l,
|
|
18
18
|
value: l
|
|
19
|
-
} : l),
|
|
19
|
+
} : l), q = (l) => {
|
|
20
20
|
S((c) => c.filter((u) => u !== l));
|
|
21
21
|
}, F = (l) => {
|
|
22
22
|
S((c) => [...c, l]);
|
|
@@ -29,7 +29,7 @@ const j = P(null), te = ({ defaultValue: b, children: v, options: a = [], prefix
|
|
|
29
29
|
return Y - Z;
|
|
30
30
|
}));
|
|
31
31
|
}, C = E("checkbox", f), V = `${C}-group`, [J, L] = ce(C), M = ne(n, ["value", "disabled", "bordered"]);
|
|
32
|
-
a && a.length > 0 && (v = _().map((l) => s(
|
|
32
|
+
a && a.length > 0 && (v = _().map((l) => s(z, { prefixCls: C, danger: "danger" in l ? l.danger : n.danger, disabled: "disabled" in l ? l.disabled : n.disabled, value: l.value, checked: m.includes(l.value), onChange: l.onChange, className: `${V}-item`, style: l.style, children: l.label }, l.value.toString())));
|
|
33
33
|
const Q = {
|
|
34
34
|
toggleOption: H,
|
|
35
35
|
value: m,
|
|
@@ -37,14 +37,14 @@ const j = P(null), te = ({ defaultValue: b, children: v, options: a = [], prefix
|
|
|
37
37
|
name: n.name,
|
|
38
38
|
// https://github.com/ant-design/ant-design/issues/16376
|
|
39
39
|
registerValue: F,
|
|
40
|
-
cancelValue:
|
|
40
|
+
cancelValue: q
|
|
41
41
|
}, U = $(V, {
|
|
42
42
|
[`${V}-rtl`]: T === "rtl"
|
|
43
43
|
}, e, t, L);
|
|
44
44
|
return J(s("div", { className: U, style: i, ...M, ref: D, children: s(j.Provider, { value: Q, children: s(ue, { label: h, helper: o, disabled: n.disabled, bordered: n.bordered, status: g, className: x, required: r, extra: k ?? B, children: v }) }) }));
|
|
45
45
|
}, de = p(O(te)), oe = de, re = {
|
|
46
|
-
"kit-checkbox": "_kit-
|
|
47
|
-
},
|
|
46
|
+
"kit-checkbox": "_kit-checkbox_ohoez_2"
|
|
47
|
+
}, z = O(({ danger: b, className: v, ...a }, f) => {
|
|
48
48
|
const e = R(j), { appId: x } = ae(), g = (e == null ? void 0 : e.disabled) || a.disabled, t = ee(a.value);
|
|
49
49
|
I(() => {
|
|
50
50
|
e == null || e.registerValue(a.value);
|
|
@@ -61,7 +61,7 @@ const j = P(null), te = ({ defaultValue: b, children: v, options: a = [], prefix
|
|
|
61
61
|
"ant-checkbox-wrapper-danger": b
|
|
62
62
|
});
|
|
63
63
|
return s(le, { ...i, ref: f, disabled: g, className: d });
|
|
64
|
-
}), A =
|
|
64
|
+
}), A = z;
|
|
65
65
|
A.displayName = "KitCheckbox";
|
|
66
66
|
A.Group = oe;
|
|
67
67
|
export {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const openKitSnackBar: ({ duration, ...props }: import("./types").IKitOpenSnackBar) => string;
|
|
2
|
-
export declare const closeKitSnackBar: () => void;
|
|
1
|
+
export declare const openKitSnackBar: ({ duration, snackbarId, ...props }: import("./types").IKitOpenSnackBar) => string;
|
|
2
|
+
export declare const closeKitSnackBar: (snackbarId?: string | undefined) => void;
|
|
3
3
|
export declare const KitSnackBarProvider: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import "../../../assets/index34.css";
|
|
2
|
-
import {
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { toast 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
|
+
import { toast as v } from "react-hot-toast";
|
|
5
5
|
import { u as A } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
-
import { FontAwesomeIcon as
|
|
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
|
-
import
|
|
9
|
+
import p from "../../General/DynamicActions/index.js";
|
|
10
10
|
import { KitDivider as I } from "../../Layout/Divider/index.js";
|
|
11
11
|
import { KitButton as T } from "../../General/Button/index.js";
|
|
12
12
|
import { KitTypography as g } from "../../General/Typography/index.js";
|
|
13
13
|
const w = {
|
|
14
14
|
"kit-snackbar": "_kit-snackbar_1bxje_2"
|
|
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:
|
|
16
|
-
var
|
|
17
|
-
const { appId:
|
|
18
|
-
|
|
19
|
-
}, K = (
|
|
20
|
-
var
|
|
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
|
+
var e;
|
|
21
21
|
return {
|
|
22
|
-
...
|
|
23
|
-
key: (
|
|
24
|
-
className: k(
|
|
22
|
+
...o,
|
|
23
|
+
key: (e = o.key) !== null && e !== void 0 ? e : S,
|
|
24
|
+
className: k(o.className, "kit-snackbar-action")
|
|
25
25
|
};
|
|
26
|
-
})) !== null &&
|
|
27
|
-
return
|
|
28
|
-
}, F = E, z = 4e3, P = ({ duration: i = z,
|
|
29
|
-
duration: i === 0 ? 1 / 0 : i
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
duration: i === 0 ? 1 / 0 : i,
|
|
30
|
+
id: s ?? void 0
|
|
31
|
+
})), c = (i) => {
|
|
32
|
+
v.dismiss(i);
|
|
33
|
+
}, Q = P, W = c, Y = _;
|
|
33
34
|
export {
|
|
34
35
|
Y as KitSnackBarProvider,
|
|
35
36
|
W as closeKitSnackBar,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IKitOpenSnackBar } from './types';
|
|
2
|
-
export declare const openSnackBar: ({ duration, ...props }: IKitOpenSnackBar) => string;
|
|
3
|
-
export declare const closeSnackBar: () => void;
|
|
2
|
+
export declare const openSnackBar: ({ duration, snackbarId, ...props }: IKitOpenSnackBar) => string;
|
|
3
|
+
export declare const closeSnackBar: (snackbarId?: string) => void;
|
package/dist/assets/index31.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! Sass Fairy v1 | (c) roydukkey | https://sass-fairy.com/license */._kit-
|
|
1
|
+
/*! Sass Fairy v1 | (c) roydukkey | https://sass-fairy.com/license */._kit-checkbox_ohoez_2{font-weight:var(--components-Checkbox-typography-fontWeight, var(--general-typography-mediumfontWeight));font-size:calc(var(--components-Checkbox-typography-fontSize, var(--general-typography-fontSize5)) * 1px);line-height:var(--components-Checkbox-typography-lineHeight, var(--general-typography-lineHeight5));border-radius:calc(var(--components-Checkbox-border-radius, var(--general-border-radius-xs)) * 1px)}._kit-checkbox_ohoez_2 .ant-checkbox-inner,._kit-checkbox_ohoez_2 .ant-tree-checkbox-inner{border-width:calc(var(--components-Checkbox-typography-lineWidth, 1) * 1px)}._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-danger) .ant-checkbox-disabled+span{color:var(--components-Checkbox-colors-typography-disabled, var(--general-utilities-text-disabled))}._kit-checkbox_ohoez_2 .ant-checkbox-disabled,._kit-checkbox_ohoez_2.ant-tree-checkbox-disabled{color:var(--components-Checkbox-colors-typography-disabled, var(--general-utilities-disabled))}._kit-checkbox_ohoez_2 .ant-checkbox-disabled .ant-checkbox-inner,._kit-checkbox_ohoez_2 .ant-checkbox-disabled .ant-tree-checkbox-inner,._kit-checkbox_ohoez_2.ant-tree-checkbox-disabled .ant-checkbox-inner,._kit-checkbox_ohoez_2.ant-tree-checkbox-disabled .ant-tree-checkbox-inner{background-color:var(--components-Checkbox-colors-background-disabled, var(--general-utilities-neutral-light))!important;border:1px solid var(--components-Checkbox-colors-border-disabled, var(--general-utilities-border))!important}._kit-checkbox_ohoez_2 .ant-checkbox-disabled .ant-checkbox-inner:after,._kit-checkbox_ohoez_2 .ant-checkbox-disabled .ant-tree-checkbox-inner:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-disabled .ant-checkbox-inner:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-disabled, var(--general-utilities-disabled))}._kit-checkbox_ohoez_2 .ant-checkbox-indeterminate:not(.ant-checkbox-disabled) .ant-checkbox-inner,._kit-checkbox_ohoez_2 .ant-checkbox-indeterminate:not(.ant-tree-checkbox-disabled) .ant-tree-checkbox-inner,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate:not(.ant-checkbox-disabled) .ant-checkbox-inner,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate:not(.ant-tree-checkbox-disabled) .ant-tree-checkbox-inner{background-color:var(--components-Checkbox-colors-background-check, var(--general-utilities-main-default))!important;border-color:var(--components-Checkbox-colors-border-check, var(--general-utilities-main-default))!important}._kit-checkbox_ohoez_2 .ant-checkbox-indeterminate .ant-checkbox-inner:after,._kit-checkbox_ohoez_2 .ant-checkbox-indeterminate .ant-tree-checkbox-inner:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate .ant-checkbox-inner:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner:after{width:8px;height:0;border:1px solid var(--general-utilities-light)}._kit-checkbox_ohoez_2 .ant-checkbox-indeterminate.ant-checkbox-disabled .ant-checkbox-inner:after,._kit-checkbox_ohoez_2 .ant-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate.ant-checkbox-disabled .ant-checkbox-inner:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-disabled, var(--general-utilities-border))}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger .ant-checkbox+span{color:var(--components-Checkbox-colors-typography-danger-disabled, var(--general-utilities-text-error))}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger .ant-checkbox .ant-checkbox-inner{background-color:var(--components-Checkbox-colors-background-danger-default, var(--general-utilities-error-light))!important;border:1px solid var(--components-Checkbox-colors-border-danger-default, var(--general-utilities-error-default))!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger .ant-checkbox .ant-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-danger-default, var(--general-utilities-error-default))}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger .ant-checkbox-disabled .ant-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-danger-default, var(--general-utilities-error-default))}._kit-checkbox_ohoez_2 .ant-checkbox-checked+span{font-weight:var(--components-Checkbox-typography-fontWeight, var(--general-typography-mediumfontWeight))}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger .ant-checkbox-checked:after,._kit-checkbox_ohoez_2 .ant-checkbox-checked:after,._kit-checkbox_ohoez_2.ant-tree-checkbox-checked:after{border:none}._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-disabled):hover .ant-checkbox-inner,._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-disabled):hover .ant-tree-checkbox-inner,._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-disabled) .ant-checkbox:hover .ant-checkbox-inner,._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-disabled) .ant-checkbox:hover .ant-tree-checkbox-inner,._kit-checkbox_ohoez_2:not(.ant-tree-checkbox-disabled):hover .ant-checkbox-inner,._kit-checkbox_ohoez_2:not(.ant-tree-checkbox-disabled):hover .ant-tree-checkbox-inner{border-color:var(--components-Checkbox-colors-border-hover, var(--general-utilities-main-default))}._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-disabled) .ant-checkbox-indeterminate:hover .ant-checkbox-inner,._kit-checkbox_ohoez_2:not(.ant-checkbox-wrapper-disabled) .ant-checkbox-indeterminate:hover .ant-tree-checkbox-inner,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate:not(.ant-tree-checkbox-disabled):hover .ant-checkbox-inner,._kit-checkbox_ohoez_2.ant-tree-checkbox-indeterminate:not(.ant-tree-checkbox-disabled):hover .ant-tree-checkbox-inner{background-color:var(--components-Checkbox-colors-background-hover, var(--general-utilities-main-dark))!important;border-color:var(--components-Checkbox-colors-border-hover, var(--general-utilities-main-default))!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger:not(.ant-checkbox-wrapper-disabled):hover .ant-checkbox-inner,._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger:not(.ant-checkbox-wrapper-disabled):hover .ant-checkbox-checked .ant-checkbox-inner,._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger:not(.ant-checkbox-wrapper-disabled) .ant-checkbox:hover .ant-checkbox-inner{background-color:var(--components-Checkbox-colors-background-danger-hover, var(--general-utilities-error-dark))!important;border-color:var(--general-utilities-error-default)!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper .ant-checkbox-input:focus+.ant-checkbox-inner{box-shadow:0 0 0 3px var(--components-Checkbox-colors-border-focus, var(--general-utilities-focus));border-color:transparent}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger .ant-checkbox-input:focus+.ant-checkbox-inner{box-shadow:0 0 0 3px var(--components-Checkbox-colors-border-danger-focus, var(--general-utilities-error-medium))}._kit-checkbox_ohoez_2.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):not(.ant-checkbox-wrapper-danger):hover .ant-checkbox:focus-within .ant-checkbox-inner{box-shadow:0 0 0 3px var(--components-Checkbox-colors-border-focus, var(--general-utilities-focus));border-color:transparent!important;background-color:var(--components-Checkbox-colors-background-focus, var(--general-utilities-light))!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):not(.ant-checkbox-wrapper-danger):hover .ant-checkbox:focus-within .ant-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-focus, var(--general-utilities-main-default));border-top:0;border-inline-start:0}._kit-checkbox_ohoez_2.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):not(.ant-checkbox-wrapper-danger) .ant-checkbox:focus-within .ant-checkbox-inner{background-color:var(--components-Checkbox-colors-background-focus, var(--general-utilities-main-default))!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):not(.ant-checkbox-wrapper-danger) .ant-checkbox:focus-within .ant-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-focus, var(--general-utilities-main-default));border-top:0;border-inline-start:0}._kit-checkbox_ohoez_2.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):not(.ant-checkbox-wrapper-danger) .ant-checkbox:focus-within .ant-checkbox-inner{background-color:var(--components-Checkbox-colors-background-focus, var(--general-utilities-light))!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):not(.ant-checkbox-wrapper-danger) .ant-checkbox:focus-within .ant-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-focus, var(--general-utilities-main-default));border-inline-start:0;border-width:2px}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger:not(.ant-checkbox-wrapper-disabled) .ant-checkbox:focus-within .ant-checkbox-inner{background-color:var(--components-Checkbox-colors-background-focus, var(--general-utilities-light))!important}._kit-checkbox_ohoez_2.ant-checkbox-wrapper-danger:not(.ant-checkbox-wrapper-disabled) .ant-checkbox:focus-within .ant-checkbox-inner:after{border-color:var(--components-Checkbox-colors-border-danger-focus, var(--general-utilities-error-default));border-inline-start:0;border-width:2px}
|