aristid-ds 12.0.0-e651b01 → 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 +21 -1
- package/dist/Kit/App/index.js +1 -1
- package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +10 -16
- package/dist/Kit/DataDisplay/Table/index.js +23 -23
- package/dist/Kit/DataDisplay/Tabs/index.js +10 -24
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tree/index.js +12 -12
- package/dist/Kit/DataDisplay/Tree/types.d.ts +3 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/Checkbox/index.js +8 -8
- package/dist/Kit/DataEntry/ColorPicker/index.js +51 -49
- package/dist/Kit/DataEntry/DatePicker/index.js +2 -2
- package/dist/Kit/DataEntry/Input/index.js +2 -2
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/index.js +2 -2
- 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/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/index.js +30 -30
- package/dist/Kit/DataEntry/Select/index.js +2 -2
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- package/dist/Kit/Feedback/Alert/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Modal/types.d.ts +1 -1
- package/dist/Kit/Feedback/SnackBar/index.d.ts +2 -2
- package/dist/Kit/Feedback/SnackBar/index.js +26 -25
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.d.ts +2 -2
- package/dist/Kit/Feedback/SnackBar/types.d.ts +1 -0
- package/dist/Kit/General/Button/index.js +9 -9
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Layout/Section/index.js +13 -10
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/Header/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/SideMenu/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +42 -42
- package/dist/Kit/Navigation/SidePanel/types.d.ts +1 -0
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/index.d.ts +55 -6
- package/dist/Kit/index.js +182 -177
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.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/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -0
- package/dist/assets/index6.css +1 -1
- package/dist/chunks/InputWrapper.DPygx2dQ.js +23 -0
- package/dist/index.es.js +180 -177
- package/dist/index.umd.js +4 -4
- 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 +13 -2
- package/dist/Kit/DataDisplay/index.d.ts +0 -16
- package/dist/Kit/DataDisplay/index.js +0 -34
- package/dist/Kit/DataEntry/index.d.ts +0 -15
- package/dist/Kit/DataEntry/index.js +0 -32
- package/dist/Kit/Feedback/index.d.ts +0 -7
- package/dist/Kit/Feedback/index.js +0 -19
- package/dist/Kit/General/index.d.ts +0 -3
- package/dist/Kit/General/index.js +0 -8
- package/dist/Kit/Layout/index.d.ts +0 -5
- package/dist/Kit/Layout/index.js +0 -12
- package/dist/Kit/Navigation/index.d.ts +0 -8
- package/dist/Kit/Navigation/index.js +0 -18
- package/dist/assets/styles.css +0 -1
- package/dist/chunks/InputWrapper._05UBJgS.js +0 -23
- package/dist/chunks/styles.module.4eW8VunD.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [X.X.
|
|
3
|
+
## [X.X.X](https://www.npmjs.com/package/aristid-ds/v/X.X.X) (202X-XX-XX)
|
|
4
|
+
|
|
5
|
+
### ✨ CI
|
|
6
|
+
|
|
7
|
+
- Add a pre-commit hook. Now, `eslint` and `tscheck` are run before each commit (@evoiron)
|
|
4
8
|
|
|
5
9
|
### 📦 Upgrade
|
|
6
10
|
|
|
@@ -56,8 +60,24 @@ The following points are the impact of this version upgrade:
|
|
|
56
60
|
|
|
57
61
|
### ✨ Features
|
|
58
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)
|
|
59
68
|
- **Tabs**:
|
|
60
69
|
- Add controlled state to handle navigation within tabs (@renaudamsellem)
|
|
70
|
+
- **SidePanel**:
|
|
71
|
+
- Add `headerExtra` prop to display extra content above header title (@philippechevieux)
|
|
72
|
+
|
|
73
|
+
### 🐛 Bug Fixes
|
|
74
|
+
|
|
75
|
+
- **ColorPicker**
|
|
76
|
+
- Fix `onFormatChange` behavior (@philippechevieux)
|
|
77
|
+
- **Modal**
|
|
78
|
+
- Allow to pass className as props just like other components (@renaudamsellem)
|
|
79
|
+
- **Button**
|
|
80
|
+
- Fix hover and focus state color when redirect button is inside a typography text (@renaudamsellem)
|
|
61
81
|
|
|
62
82
|
## [12.0.0](https://www.npmjs.com/package/aristid-ds/v/12.0.0) (2024-01-09)
|
|
63
83
|
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../assets/
|
|
1
|
+
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index26.css";
|
|
2
2
|
import { jsx as i, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
3
3
|
import T from "classnames";
|
|
4
4
|
import { forwardRef as _ } from "react";
|
|
@@ -8,19 +8,13 @@ import { faEllipsis as g, faArrowRight as P } from "@fortawesome/free-solid-svg-
|
|
|
8
8
|
import { KitIcon as C } from "../../General/Icon/index.js";
|
|
9
9
|
import { KitTypography as K } from "../../General/Typography/index.js";
|
|
10
10
|
import { KitDivider as F } from "../../Layout/Divider/index.js";
|
|
11
|
-
import "../../Layout/Space/index.js";
|
|
12
|
-
import "color-convert";
|
|
13
|
-
import "color-string";
|
|
14
|
-
import "lodash/isEmpty";
|
|
15
|
-
import "../../../chunks/styles.module.4eW8VunD.js";
|
|
16
|
-
import "../../Layout/PageLayout/index.js";
|
|
17
11
|
import { KitButton as k } from "../../General/Button/index.js";
|
|
18
12
|
import { KitTooltip as L } from "../Tooltip/index.js";
|
|
19
13
|
import { KitDropDown as A } from "../../Navigation/DropDown/index.js";
|
|
20
14
|
import { u as j } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
21
15
|
const G = {
|
|
22
16
|
"kit-redirect-card": "_kit-redirect-card_poxps_2"
|
|
23
|
-
}, w = ({ actions: r, actionsInDropdown: m = !1, disabled:
|
|
17
|
+
}, w = ({ actions: r, actionsInDropdown: m = !1, disabled: e = !1 }) => {
|
|
24
18
|
var n, s;
|
|
25
19
|
const { locale: l } = j();
|
|
26
20
|
if (!r)
|
|
@@ -28,23 +22,23 @@ const G = {
|
|
|
28
22
|
const o = r.length < 4;
|
|
29
23
|
let c;
|
|
30
24
|
if (m && r.length > 1)
|
|
31
|
-
c = i(A, { disabled:
|
|
25
|
+
c = i(A, { disabled: e, menu: { items: r }, children: i(k, { title: (n = l.General) === null || n === void 0 ? void 0 : n.more, type: "secondary", icon: i(f, { icon: g }), disableSecureClick: !0, onClick: (t) => t.stopPropagation() }) });
|
|
32
26
|
else if (o)
|
|
33
|
-
c = r.map((
|
|
27
|
+
c = r.map((t) => i(N, { action: t, disabled: e }, t.key));
|
|
34
28
|
else {
|
|
35
|
-
const [
|
|
36
|
-
c = d(x, { children: [[
|
|
29
|
+
const [t, p, ...h] = r;
|
|
30
|
+
c = d(x, { children: [[t, p].map((a) => i(N, { action: a, disabled: e }, a.key)), i(A, { disabled: e, menu: { items: h }, children: i(k, { title: (s = l.General) === null || s === void 0 ? void 0 : s.more, type: "secondary", icon: i(f, { icon: g }), disableSecureClick: !0, onClick: (a) => a.stopPropagation() }) })] });
|
|
37
31
|
}
|
|
38
32
|
return i("div", { className: "kit-redirect-card-actions", children: c });
|
|
39
|
-
}, N = ({ action: r, disabled: m }) => i(L, { title: r.label, children: i(k, { type: "secondary", icon: r.icon, onClick: (
|
|
40
|
-
|
|
41
|
-
}, disabled: r.disabled || m, disableSecureClick: !0 }) }), M = _(({ className: r, style: m, title:
|
|
33
|
+
}, N = ({ action: r, disabled: m }) => i(L, { title: r.label, children: i(k, { type: "secondary", icon: r.icon, onClick: (e) => {
|
|
34
|
+
e.stopPropagation(), r.onClick(e);
|
|
35
|
+
}, disabled: r.disabled || m, disableSecureClick: !0 }) }), M = _(({ className: r, style: m, title: e, description: n, icon: s, coverSrc: l, disabled: o, actions: c, actionsInDropdown: t, onClick: p, coverAlt: h = "" }, a) => {
|
|
42
36
|
const v = s !== void 0 && l === void 0, y = l !== void 0, u = c !== void 0, D = 2, { appId: I } = B(), R = T(G["kit-redirect-card"], r, I, {
|
|
43
37
|
"kit-redirect-card-disabled": o,
|
|
44
38
|
"kit-redirect-card-with-cover": y,
|
|
45
39
|
"kit-redirect-card-with-actions": u
|
|
46
40
|
});
|
|
47
|
-
return d("div", { className: R, tabIndex: o ? -1 : 0, style: m, onClick: p, ref: a, children: [u && v && i(w, { actions: c, disabled: o, actionsInDropdown: !!
|
|
41
|
+
return d("div", { className: R, tabIndex: o ? -1 : 0, style: m, onClick: p, ref: a, children: [u && v && i(w, { actions: c, disabled: o, actionsInDropdown: !!t }), v && i(C, { className: "kit-redirect-card-icon", icon: s }), y && d(x, { children: [d("div", { className: "kit-redirect-card-cover", children: [i("img", { alt: h, src: l }), i("div", { className: "kit-redirect-card-actions-mask" }), u && i(w, { actions: c, actionsInDropdown: !!t, disabled: o })] }), i(F, { noMargin: !0 })] }), d("div", { className: "kit-redirect-card-content", children: [d("section", { children: [i(K.Title, { ellipsis: { tooltip: !0 }, level: "h3", disabled: o, children: e }), n && i(K.Paragraph, { ellipsis: { rows: D, tooltip: n }, disabled: o, children: n })] }), i(C, { className: "kit-redirect-card-redirect-icon", icon: i(f, { icon: P }) })] })] });
|
|
48
42
|
});
|
|
49
43
|
M.displayName = "KitRedirectCard";
|
|
50
44
|
export {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "../../../assets/
|
|
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,41 +1,27 @@
|
|
|
1
1
|
import "../../../assets/index5.css";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as n, Fragment as j, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import { useState as B } from "react";
|
|
4
4
|
import { u as D } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
5
|
import h from "classnames";
|
|
6
6
|
import { KitButton as F } from "../../General/Button/index.js";
|
|
7
7
|
import { KitTypography as z } from "../../General/Typography/index.js";
|
|
8
|
-
import "../Avatar/index.js";
|
|
9
8
|
import { KitBadge as C } from "../Badge/index.js";
|
|
10
|
-
import "../ItemCard/index.js";
|
|
11
|
-
import "../Collapse/index.js";
|
|
12
|
-
import "../Empty/index.js";
|
|
13
|
-
import "../Error/index.js";
|
|
14
|
-
import "../IdCard/index.js";
|
|
15
|
-
import "../Image/index.js";
|
|
16
|
-
import "../ItemList/index.js";
|
|
17
|
-
import "../Table/index.js";
|
|
18
|
-
import "../Tag/index.js";
|
|
19
|
-
import "../Tree/index.js";
|
|
20
|
-
import "../Tooltip/index.js";
|
|
21
|
-
import "antd";
|
|
22
|
-
import "../RedirectCard/index.js";
|
|
23
9
|
import { FontAwesomeIcon as E } from "@fortawesome/react-fontawesome";
|
|
24
10
|
import { faPlus as O } from "@fortawesome/free-solid-svg-icons";
|
|
25
11
|
const P = {
|
|
26
12
|
"kit-tabs": "_kit-tabs_1i9lf_2"
|
|
27
|
-
}, U = ({ addTab: v, centered: w, className: x, activeKey:
|
|
28
|
-
var
|
|
29
|
-
const { appId: y } = D(), [_, f] = B(
|
|
13
|
+
}, U = ({ addTab: v, centered: w, className: x, activeKey: r, defaultKey: a, items: o, onChange: i, fullwidthTab: u, size: b = "small", variant: s = "classic" }) => {
|
|
14
|
+
var m, d;
|
|
15
|
+
const { appId: y } = D(), [_, f] = B(a ?? ((m = o[0]) === null || m === void 0 ? void 0 : m.key)), k = r ?? _, N = (d = o.find((t) => t.key === k)) === null || d === void 0 ? void 0 : d.tabContent, T = h(y, x, P["kit-tabs"], w ? "centered" : "", b === "small" ? "small" : "medium", s, u ? "fullwidth" : "", N && s === "pill" ? "tabs-bottom-spacing" : ""), A = (t) => {
|
|
30
16
|
f(t), i == null || i(t);
|
|
31
|
-
}, I = (t,
|
|
32
|
-
t.code === "Enter" && (f(
|
|
17
|
+
}, I = (t, c) => {
|
|
18
|
+
t.code === "Enter" && (f(c), i == null || i(c));
|
|
33
19
|
};
|
|
34
|
-
return
|
|
35
|
-
disabled:
|
|
36
|
-
active: k ===
|
|
20
|
+
return n(j, { children: [n("div", { className: T, role: "tablist", children: [o == null ? void 0 : o.map(({ icon: t, label: c, badgeCount: K, key: e, disabled: p }) => n("div", { className: h("kit-tab", s, {
|
|
21
|
+
disabled: p,
|
|
22
|
+
active: k === e,
|
|
37
23
|
fullwidth: u
|
|
38
|
-
}), role: "tab", tabIndex: 0, onClick:
|
|
24
|
+
}), role: "tab", tabIndex: 0, onClick: p ? void 0 : () => A(e), onKeyDown: p ? void 0 : (S) => I(S, e), children: [t && l("div", { className: "kit-tab-icon", children: t }), n("div", { className: "kit-tab-label-wrapper", children: [l(z.Text, { className: "kit-tab-label", size: b === "medium" ? "fontSize4" : void 0, children: c }), !!K && l(C, { className: "kit-tab-count", count: K })] })] }, e)), v && s === "classic" && l(F, { disableSecureClick: !0, type: "tertiary", icon: l(E, { icon: O }), onClick: v })] }), N] });
|
|
39
25
|
};
|
|
40
26
|
U.displayName = "KitTabs";
|
|
41
27
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index39.css";
|
|
2
2
|
import { jsx as i, Fragment as C, jsxs as x } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as D, useState as W, useRef as N, useLayoutEffect as E } from "react";
|
|
4
4
|
import O from "classnames";
|
|
@@ -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>,
|
|
@@ -3,7 +3,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as x, useState as y } from "react";
|
|
4
4
|
import { AutoComplete as F } from "antd";
|
|
5
5
|
import { KitInput as O } from "../Input/index.js";
|
|
6
|
-
import { K as P } from "../../../chunks/InputWrapper.
|
|
6
|
+
import { K as P } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
7
7
|
import { FontAwesomeIcon as j } from "@fortawesome/react-fontawesome";
|
|
8
8
|
import { faMagnifyingGlass as B } from "@fortawesome/free-solid-svg-icons";
|
|
9
9
|
import G from "classnames";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index31.css";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as P, memo as p, forwardRef as O, useContext as R, useState as w, useEffect as I, useRef as ee } from "react";
|
|
4
4
|
import $ from "classnames";
|
|
@@ -7,7 +7,7 @@ import { u as ae } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
|
7
7
|
import ne from "rc-util/es/omit";
|
|
8
8
|
import { ConfigContext as ie } from "antd/es/config-provider/";
|
|
9
9
|
import ce from "antd/es/checkbox/style";
|
|
10
|
-
import { K as ue } from "../../../chunks/InputWrapper.
|
|
10
|
+
import { K as ue } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
11
11
|
const j = P(null), te = ({ defaultValue: b, children: v, options: a = [], prefixCls: f, className: e, wrapperClassName: x, status: g, rootClassName: t, style: i, onChange: d, label: h, helper: o, required: r, actions: B, extra: k, ...n }, D) => {
|
|
12
12
|
const { getPrefixCls: E, direction: T } = R(ie), [m, K] = w(n.value || b || []), [W, S] = w([]);
|
|
13
13
|
I(() => {
|
|
@@ -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,82 +1,84 @@
|
|
|
1
|
-
import "../../../assets/
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { K as
|
|
5
|
-
import { u as
|
|
6
|
-
import { ColorPicker as
|
|
7
|
-
import
|
|
8
|
-
import { FontAwesomeIcon as
|
|
9
|
-
import { faCircleXmark as
|
|
10
|
-
import { u as
|
|
1
|
+
import "../../../assets/index27.css";
|
|
2
|
+
import { forwardRef as Y, useRef as q, useState as m, useEffect as b, useImperativeHandle as z, createElement as J } from "react";
|
|
3
|
+
import { jsxs as Q, jsx as s } from "react/jsx-runtime";
|
|
4
|
+
import { K as Z } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
5
|
+
import { u as V } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import { ColorPicker as oo } from "antd";
|
|
7
|
+
import E from "classnames";
|
|
8
|
+
import { FontAwesomeIcon as to } from "@fortawesome/react-fontawesome";
|
|
9
|
+
import { faCircleXmark as eo } from "@fortawesome/free-solid-svg-icons";
|
|
10
|
+
import { u as ro } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
11
11
|
const h = {
|
|
12
12
|
"kit-colorpicker": "_kit-colorpicker_1dih2_2",
|
|
13
13
|
"kit-color-picker-clear": "_kit-color-picker-clear_1dih2_37",
|
|
14
14
|
"kit-color-picker-placeholder": "_kit-color-picker-placeholder_1dih2_41",
|
|
15
15
|
"kit-color-picker-text": "_kit-color-picker-text_1dih2_45"
|
|
16
|
-
},
|
|
17
|
-
if (o.length ===
|
|
18
|
-
const r = o.slice(-2),
|
|
19
|
-
return `${o.slice(0, 7)},${
|
|
16
|
+
}, io = 9, co = 16, no = 255, lo = (o) => {
|
|
17
|
+
if (o.length === io) {
|
|
18
|
+
const r = o.slice(-2), e = Math.round(parseInt(r, co) / no * 100);
|
|
19
|
+
return `${o.slice(0, 7)},${e}%`;
|
|
20
20
|
}
|
|
21
21
|
return o;
|
|
22
|
-
},
|
|
22
|
+
}, so = (o, r) => {
|
|
23
23
|
switch (r) {
|
|
24
24
|
case "hex":
|
|
25
|
-
return
|
|
25
|
+
return lo(o.toHexString());
|
|
26
26
|
case "rgb":
|
|
27
27
|
return o.toRgbString();
|
|
28
28
|
case "hsb":
|
|
29
29
|
return o.toHsbString();
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, ao = (o, r, e, c) => c ? s("span", { className: h["kit-color-picker-placeholder"], children: e }) : s("span", { children: so(o, r) }), po = ({ color: o, format: r, showText: e, placeholder: c, isColorPickerValueEmpty: _, allowClear: f, onClear: p }) => {
|
|
32
32
|
var n;
|
|
33
|
-
const { locale: l } =
|
|
34
|
-
return
|
|
33
|
+
const { locale: l } = ro(), a = e === !0, v = typeof e == "function" && e !== void 0, i = f === !0, d = c ?? ((n = l.ColorPicker) === null || n === void 0 ? void 0 : n.selectAColor);
|
|
34
|
+
return Q("div", { className: h["kit-color-picker-text"], children: [a && ao(o, r, d, _), v && s("span", { children: e(o) }), i && s(to, { className: h["kit-color-picker-clear"], "aria-label": "clear", icon: eo, onClick: (k) => {
|
|
35
35
|
k.stopPropagation(), p();
|
|
36
36
|
} })] });
|
|
37
|
-
},
|
|
38
|
-
const { appId:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, [l]),
|
|
37
|
+
}, ko = Y(({ label: o, className: r, helper: e, rootClassName: c, required: _, actions: f, extra: p, showText: n, allowClear: l, open: a = !1, placeholder: v, defaultValue: i, value: d, onChange: k, onClear: C, onOpenChange: x, onFormatChange: I, format: K = "hex", ...g }, N) => {
|
|
38
|
+
const { appId: S } = V(), O = q(null), [R, u] = m(a), [y, A] = m(i ?? d), [H, P] = m(l), [T, L] = m(K), [X, w] = m(0), D = n || H, j = E(S, "kit-colorpicker-panel", c), F = E(S, h["kit-colorpicker"], { "kit-colorpicker-with-text": !!n }, r);
|
|
39
|
+
b(() => {
|
|
40
|
+
P(l);
|
|
41
|
+
}, [l]), b(() => {
|
|
42
42
|
u(a);
|
|
43
|
-
}, [a]),
|
|
44
|
-
|
|
45
|
-
}, [
|
|
43
|
+
}, [a]), b(() => {
|
|
44
|
+
A(i ?? d);
|
|
45
|
+
}, [i, d]), z(N, () => ({
|
|
46
46
|
focus: () => {
|
|
47
47
|
u(!0);
|
|
48
48
|
},
|
|
49
49
|
blur: () => {
|
|
50
50
|
u(!1);
|
|
51
51
|
},
|
|
52
|
-
value:
|
|
52
|
+
value: y
|
|
53
53
|
}));
|
|
54
|
-
const
|
|
55
|
-
l &&
|
|
56
|
-
},
|
|
57
|
-
l && !
|
|
58
|
-
},
|
|
59
|
-
a || u(
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
const M = () => {
|
|
55
|
+
l && P(!1), A(void 0), w((t) => t + 1), C == null || C();
|
|
56
|
+
}, W = (t, U) => {
|
|
57
|
+
l && !H && P(!0), A(t), k == null || k(t, U);
|
|
58
|
+
}, $ = (t) => {
|
|
59
|
+
a || u(t), x == null || x(t);
|
|
60
|
+
}, B = (t) => {
|
|
61
|
+
L(t), I == null || I(t);
|
|
62
|
+
}, G = y === void 0;
|
|
63
|
+
return s(Z, { label: o, helper: e, disabled: g.disabled, required: _, extra: p ?? f, children: s("div", { ref: O, children: J(oo, {
|
|
64
|
+
...g,
|
|
63
65
|
// This is a hack to force the color picker to re-render and display a clear value
|
|
64
66
|
// https://react.dev/learn/preserving-and-resetting-state#option-2-resetting-state-with-a-key
|
|
65
|
-
key:
|
|
66
|
-
rootClassName:
|
|
67
|
+
key: X,
|
|
68
|
+
rootClassName: j,
|
|
67
69
|
className: F,
|
|
68
|
-
format:
|
|
69
|
-
value:
|
|
70
|
-
...
|
|
71
|
-
showText: (
|
|
70
|
+
format: T,
|
|
71
|
+
value: y,
|
|
72
|
+
...D && {
|
|
73
|
+
showText: (t) => s(po, { color: t, format: T, showText: n, placeholder: v, isColorPickerValueEmpty: G, allowClear: H, onClear: M })
|
|
72
74
|
},
|
|
73
|
-
open:
|
|
74
|
-
onOpenChange:
|
|
75
|
-
onFormatChange:
|
|
76
|
-
onChange:
|
|
75
|
+
open: R,
|
|
76
|
+
onOpenChange: $,
|
|
77
|
+
onFormatChange: B,
|
|
78
|
+
onChange: W
|
|
77
79
|
}) }) });
|
|
78
80
|
});
|
|
79
|
-
|
|
81
|
+
ko.displayName = "KitColorPicker";
|
|
80
82
|
export {
|
|
81
|
-
|
|
83
|
+
ko as KitColorPicker
|
|
82
84
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index47.css";
|
|
2
2
|
import { jsxs as R, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as C } from "react";
|
|
4
4
|
import { DatePicker as K } from "antd";
|
|
5
5
|
import D from "classnames";
|
|
6
6
|
import { FontAwesomeIcon as o } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faChevronLeft as p, faChevronRight as h, faClock as j, faCalendar as g, faCircleXmark as w, faArrowRight as z } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
-
import { K as A } from "../../../chunks/InputWrapper.
|
|
8
|
+
import { K as A } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
9
9
|
import { u as L } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
const W = {
|
|
11
11
|
"kit-datepicker": "_kit-datepicker_1nfj8_2",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index40.css";
|
|
2
2
|
import { jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as p } from "react";
|
|
4
4
|
import { Input as w } from "antd";
|
|
5
5
|
import { faCircleXmark as k, faEye as z, faEyeSlash as C } from "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { K as h } from "../../../chunks/InputWrapper.
|
|
7
|
+
import { K as h } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
8
8
|
import { u as K } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
9
9
|
import x from "classnames";
|
|
10
10
|
import { KitTypography as y } from "../../General/Typography/index.js";
|
|
@@ -2,7 +2,7 @@ import "../../../assets/index7.css";
|
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as k, useState as x } from "react";
|
|
4
4
|
import { InputNumber as _ } from "antd";
|
|
5
|
-
import { K as N } from "../../../chunks/InputWrapper.
|
|
5
|
+
import { K as N } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
6
6
|
import { u as h } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
7
|
import w from "classnames";
|
|
8
8
|
const y = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index41.css";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import k from "classnames";
|
|
4
4
|
import J from "rc-util/es/hooks/useMergedState";
|
|
@@ -8,7 +8,7 @@ import X from "antd/es/config-provider/SizeContext";
|
|
|
8
8
|
import Y from "rc-util/es/pickAttrs";
|
|
9
9
|
import { Radio as Z } from "antd";
|
|
10
10
|
import { u as ee } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
11
|
-
import { K as ae } from "../../../chunks/InputWrapper.
|
|
11
|
+
import { K as ae } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
12
12
|
import te from "antd/es/radio/style";
|
|
13
13
|
const K = O(null), re = K.Provider, oe = {
|
|
14
14
|
"kit-radio": "_kit-radio_lmqef_2"
|