aristid-ds 14.0.0-89febff → 14.0.0-bdfc247
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 +14 -5
- 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/IdCard/index.js +5 -4
- package/dist/Kit/DataDisplay/ItemCard/index.js +21 -20
- package/dist/Kit/DataDisplay/ItemList/index.js +31 -30
- package/dist/Kit/DataDisplay/RedirectCard/index.js +29 -28
- package/dist/Kit/DataDisplay/Table/index.js +46 -45
- package/dist/Kit/DataDisplay/Tabs/index.js +16 -15
- package/dist/Kit/DataDisplay/Tag/index.js +42 -41
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/Checkbox/index.js +2 -2
- package/dist/Kit/DataEntry/ColorPicker/index.js +2 -2
- 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 +1 -1
- 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/Progress/index.js +1 -1
- package/dist/Kit/Feedback/Skeleton/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +1 -1
- package/dist/Kit/General/Button/index.js +39 -38
- package/dist/Kit/General/Typography/index.js +32 -31
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +36 -21
- package/dist/Kit/Navigation/Header/index.js +29 -28
- 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 +1 -1
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/index.js +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/index48.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/chunks/{InputWrapper.OorNja9G.js → InputWrapper.aaS2HSev.js} +12 -11
- package/dist/chunks/constants.DINGxt3I.js +6 -0
- package/dist/chunks/{constants.15jUQk8h.js → styles.module.shsViPAW.js} +2 -3
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/utils/constants.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/assets/{constants.css → styles.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [X.Y.Z](https://www.npmjs.com/package/aristid-ds/v/X.Y.Z) (2025-MM-DD)
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **DropDown:**
|
|
8
|
+
- Clicking outside the `DropDown` now closes it even when inside an iframe (@philippechevieux)
|
|
9
|
+
- Keep the `DropDown` open when selecting items (@philippechevieux)
|
|
10
|
+
|
|
3
11
|
## [14.0.0](https://www.npmjs.com/package/aristid-ds/v/14.0.0) (2025-05-20)
|
|
4
12
|
|
|
5
13
|
### ✨ Features
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- `Text`, `Link`, `Title` and `Paragraph`
|
|
9
|
-
-
|
|
14
|
+
|
|
15
|
+
- **Typography**:
|
|
16
|
+
- Original `Text`, `Link`, `Title` and `Paragraph` have been renamed to `AdvancedText`, `AdvancedLink`, `AdvancedTitle` and `AdvancedParagraph`. (@evoiron)
|
|
17
|
+
- `Text`, `Link`, `Title` and `Paragraph` components are now lightweight versions of original ones providing only basic features. (@evoiron)
|
|
18
|
+
- Added `withTooltip` prop for non Advanced versions to add a tooltip which is now not displayed by deefault when content is ellipsed. (@evoiron)
|
|
10
19
|
- **IdCard**:
|
|
11
20
|
- Remove use of `Typography.Text` component (@evoiron)
|
|
12
21
|
- Add `disableTooltip` property to disable tooltip on title and description (@evoiron)
|
|
@@ -30,7 +39,7 @@
|
|
|
30
39
|
### 🐛 Bug Fixes
|
|
31
40
|
|
|
32
41
|
- **Modal:**
|
|
33
|
-
-
|
|
42
|
+
- KitModal.setAppElement was defined in typescript but not implemented (@evoiron)
|
|
34
43
|
- **Tag:**
|
|
35
44
|
- Hide `closeIcon` for tags in a group if handleCloseTag is not provided (@philippechevieux)
|
|
36
45
|
- Remove tooltip for other tags in TagGroup (@NicoSourimant)
|
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,10 +1,11 @@
|
|
|
1
1
|
import "../../../assets/index2.css";
|
|
2
2
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import n from "classnames";
|
|
4
|
-
import { t as D
|
|
4
|
+
import { t as D } from "../../../chunks/styles.module.shsViPAW.js";
|
|
5
5
|
import { u as v } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import { K as N } from "../../../chunks/Avatar.N2w2jq_C.js";
|
|
7
|
-
import { KitTooltip as
|
|
7
|
+
import { KitTooltip as y } from "../Tooltip/index.js";
|
|
8
|
+
import { T as m } from "../../../chunks/constants.DINGxt3I.js";
|
|
8
9
|
const T = {
|
|
9
10
|
"kit-id-card": "_kit-id-card_1go5o_2"
|
|
10
11
|
}, h = [
|
|
@@ -18,14 +19,14 @@ const T = {
|
|
|
18
19
|
"kit-id-card-title-large": i === "large",
|
|
19
20
|
"ant-typography-disabled": r
|
|
20
21
|
});
|
|
21
|
-
return t("span", { className: s, children: t(
|
|
22
|
+
return t("span", { className: s, children: t(y, { title: o ? "" : a, mouseEnterDelay: m, children: t("span", { children: a }) }) });
|
|
22
23
|
}, E = (a, i, r, o) => {
|
|
23
24
|
const s = n("kit-id-card-description", ...h, "ant-typography-regular", {
|
|
24
25
|
"kit-typography-fontSize5": i !== "medium",
|
|
25
26
|
"kit-typography-fontSize7": i === "medium",
|
|
26
27
|
"ant-typography-disabled": r
|
|
27
28
|
});
|
|
28
|
-
return t("span", { className: s, children: t(
|
|
29
|
+
return t("span", { className: s, children: t(y, { title: o ? "" : a, mouseEnterDelay: m, children: t("span", { children: a }) }) });
|
|
29
30
|
}, K = ({ className: a, title: i, description: r, avatarProps: o, size: s = "medium", disabled: e = !1, disableTooltip: p = !1, ...g }) => {
|
|
30
31
|
const { appId: u } = v(), f = n(u, T["kit-id-card"], a), k = o !== void 0, l = i !== void 0, d = r !== void 0, x = l || d;
|
|
31
32
|
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 && _(i, s, e, p), d && E(r, s, e, p)] })] });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index30.css";
|
|
2
2
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as b, useEffect as Q, forwardRef as V } from "react";
|
|
4
4
|
import Y from "classnames";
|
|
5
5
|
import { KitTypography as w } from "../../General/Typography/index.js";
|
|
6
6
|
import { KitCheckbox as Z } from "../../DataEntry/Checkbox/index.js";
|
|
@@ -10,38 +10,39 @@ import { u as ti } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
|
10
10
|
import { KitTag as ei } from "../Tag/index.js";
|
|
11
11
|
import { KitButton as B } from "../../General/Button/index.js";
|
|
12
12
|
import { KitTooltip as si } from "../Tooltip/index.js";
|
|
13
|
-
import { FontAwesomeIcon as
|
|
13
|
+
import { FontAwesomeIcon as O } from "@fortawesome/react-fontawesome";
|
|
14
14
|
import { faEllipsis as oi, faImage as ri } from "@fortawesome/free-solid-svg-icons";
|
|
15
15
|
import { KitDropDown as ai } from "../../Navigation/DropDown/index.js";
|
|
16
16
|
import { u as di } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
17
17
|
import { useDebouncedCallback as ci } from "use-debounce";
|
|
18
|
-
|
|
18
|
+
import { N as ni, F as li } from "../../../chunks/constants.DINGxt3I.js";
|
|
19
|
+
const mi = {
|
|
19
20
|
"kit-item-card": "_kit-item-card_308fs_2"
|
|
20
|
-
},
|
|
21
|
-
const [d, a] =
|
|
21
|
+
}, L = () => {
|
|
22
|
+
const [d, a] = b(window.innerWidth), [s, r] = b(window.innerHeight), t = ci(() => {
|
|
22
23
|
a(window.innerWidth), r(window.innerHeight);
|
|
23
24
|
}, 100);
|
|
24
|
-
return
|
|
25
|
-
},
|
|
25
|
+
return Q(() => (t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), [t]), { width: d, height: s };
|
|
26
|
+
}, hi = 1300, _ = ({ display: d = "card", disabled: a = !1, actions: s }) => {
|
|
26
27
|
var r;
|
|
27
|
-
const { locale: t } = di(), { width: c } =
|
|
28
|
-
return i("div", { className: "kit-item-card-actions", children: d === "list" && c <
|
|
29
|
-
},
|
|
30
|
-
const { appId:
|
|
28
|
+
const { locale: t } = di(), { width: c } = L();
|
|
29
|
+
return i("div", { className: "kit-item-card-actions", children: d === "list" && c < hi ? i(ai, { disabled: a, menu: { items: s }, children: i(B, { title: (r = t.General) === null || r === void 0 ? void 0 : r.more, icon: i(O, { icon: oi }) }) }) : s == null ? void 0 : s.map((o) => i(si, { title: o.label, children: i(B, { icon: o.icon, onClick: o.onClick, disabled: o.disabled || a }) }, o.key)) });
|
|
30
|
+
}, E = 900, pi = V(({ className: d, style: a, imageSrc: s, icon: r, tagGroup: t, breadcrumbItems: c, title: o, description: m, draggableHandler: u, selected: D, onSelect: g, activateLabel: R, activated: z, onActivate: y, extra: C, actions: h, display: n = "card", disabled: e = !1, imageAlt: F = "", imageCover: H = !1 }, S) => {
|
|
31
|
+
const { appId: W } = ti(), { width: N } = L(), T = g !== void 0, x = u !== void 0, j = s !== void 0, U = r !== void 0, p = t !== void 0, I = c !== void 0, X = o !== void 0 || m !== void 0, K = C !== void 0, P = y !== void 0, k = h !== void 0, A = [p, I, K].filter(Boolean).length, f = n === "list" && N > E, v = n === "card" || N <= E, $ = Y(mi["kit-item-card"], d, W, {
|
|
31
32
|
"kit-item-card-display-list": f,
|
|
32
33
|
"kit-item-card-display-card": v,
|
|
33
|
-
[`kit-item-card-display-list-with-${
|
|
34
|
-
"kit-item-card-display-card-checkbox-or-draggable-handler": v && (
|
|
34
|
+
[`kit-item-card-display-list-with-${A}-rows`]: f && A > 0,
|
|
35
|
+
"kit-item-card-display-card-checkbox-or-draggable-handler": v && (T || x),
|
|
35
36
|
"kit-item-card-disabled": e,
|
|
36
37
|
"kit-item-card-selected": D,
|
|
37
38
|
"kit-item-card-with-actions": k,
|
|
38
|
-
"kit-item-card-image-cover":
|
|
39
|
+
"kit-item-card-image-cover": H
|
|
39
40
|
});
|
|
40
|
-
e && p && (t.tags = t.tags.map((
|
|
41
|
-
const
|
|
42
|
-
return l("div", { tabIndex: e ?
|
|
41
|
+
e && p && (t.tags = t.tags.map((M) => ({ ...M, disabled: e })), t.othersTagDisabled = !0);
|
|
42
|
+
const q = i("div", { className: "kit-item-card-checkbox", children: i(Z, { onChange: g, checked: D, disabled: e }) }), J = i("div", { className: "kit-item-card-draggable-handler", children: u });
|
|
43
|
+
return l("div", { tabIndex: e ? ni : li, className: $, style: a, ref: S, children: [T && q, x && J, l("div", { className: "kit-item-card-image", children: [j ? i("img", { src: s, alt: F }) : i("div", { className: "kit-item-card-image-placeholder", children: U ? r : i(O, { icon: ri }) }), i("div", { className: "kit-item-card-actions-mask" }), k && v && i(_, { actions: h, disabled: e, display: "card" })] }), p && i("div", { className: "kit-item-card-tags", style: { width: n === "card" ? "inherit" : "auto" }, children: i(ei.Group, { tags: t.tags, othersTagType: t.othersTagType, othersTagDisabled: t.othersTagDisabled }) }), I && i("div", { className: "kit-item-card-breadcrumb", children: i(ii, { items: c }) }), X && l("div", { className: "kit-item-card-content", children: [o && i(w.AdvancedTitle, { level: "h3", ellipsis: { tooltip: !0, rows: 2 }, disabled: e, children: o }), m && i(w.AdvancedParagraph, { ellipsis: { tooltip: !0, rows: 2 }, disabled: e, children: m })] }), K && i("div", { className: "kit-item-card-extra", children: C }), k && f && i(_, { actions: h, disabled: e, display: n }), P && l("div", { className: "kit-item-card-switch", children: [i(G, { onChange: y, checked: z, disabled: e }), i(w.Text, { disabled: e, ellipsis: !0, children: R })] })] });
|
|
43
44
|
});
|
|
44
|
-
|
|
45
|
+
pi.displayName = "KitItemCard";
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
pi as KitItemCard
|
|
47
48
|
};
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import "../../../assets/index4.css";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { KitCheckbox as
|
|
5
|
-
import { KitIdCard as
|
|
6
|
-
import { KitButton as
|
|
7
|
-
import { KitDropDown as
|
|
8
|
-
import { u as
|
|
9
|
-
import { FontAwesomeIcon as
|
|
10
|
-
import { faEllipsis as
|
|
11
|
-
import
|
|
12
|
-
import { u as
|
|
2
|
+
import { jsxs as f, jsx as t, Fragment as C } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as z, useState as H } from "react";
|
|
4
|
+
import { KitCheckbox as J } from "../../DataEntry/Checkbox/index.js";
|
|
5
|
+
import { KitIdCard as M } from "../IdCard/index.js";
|
|
6
|
+
import { KitButton as p } from "../../General/Button/index.js";
|
|
7
|
+
import { KitDropDown as N } from "../../Navigation/DropDown/index.js";
|
|
8
|
+
import { u as Q } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
9
|
+
import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faEllipsis as E } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import B from "classnames";
|
|
12
|
+
import { u as S } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
13
|
+
import { N as W, F as Y } from "../../../chunks/constants.DINGxt3I.js";
|
|
13
14
|
const m = {
|
|
14
15
|
"kit-item-list": "_kit-item-list_1rfhx_2",
|
|
15
16
|
"kit-item-list-buttons": "_kit-item-list-buttons_1rfhx_42",
|
|
16
17
|
"kit-item-list-selected": "_kit-item-list-selected_1rfhx_49",
|
|
17
18
|
"kit-item-list-id-card": "_kit-item-list-id-card_1rfhx_60",
|
|
18
19
|
"kit-item-list-clickable": "_kit-item-list-clickable_1rfhx_64"
|
|
19
|
-
},
|
|
20
|
-
const { appId:
|
|
20
|
+
}, Z = z(({ idCardProps: o, idCardSubstitute: d, checkboxAriaLabel: h, draggableHandler: D, content: v, error: r, onSelect: a, onClick: _, className: F, showActionsOnHover: w, disabled: l = !1, actions: n = [], actionsInDropdown: A, ...L }, T) => {
|
|
21
|
+
const { appId: b } = Q(), { locale: y } = S(), [k, g] = H(!1), I = a !== void 0, U = n.length < 4, O = o !== void 0 && d === void 0, j = d !== void 0, G = () => {
|
|
21
22
|
var i;
|
|
22
|
-
return
|
|
23
|
+
return I ? t(J, { danger: r, disabled: l, checked: k, onClick: (s) => s.stopPropagation(), onChange: () => {
|
|
23
24
|
const s = !k;
|
|
24
25
|
return g(s), a(s);
|
|
25
26
|
}, "aria-label": (i = h ?? (o == null ? void 0 : o.title)) !== null && i !== void 0 ? i : o == null ? void 0 : o.description }) : null;
|
|
26
|
-
},
|
|
27
|
-
var i,
|
|
28
|
-
const s =
|
|
29
|
-
"kit-item-list-buttons-visible-on-hover":
|
|
27
|
+
}, V = () => {
|
|
28
|
+
var i, c;
|
|
29
|
+
const s = B(m["kit-item-list-buttons"], {
|
|
30
|
+
"kit-item-list-buttons-visible-on-hover": w
|
|
30
31
|
});
|
|
31
|
-
return n && n.length !== 0 && t("div", { className: s, onClick: (e) => e.stopPropagation(), children:
|
|
32
|
-
},
|
|
32
|
+
return n && n.length !== 0 && t("div", { className: s, onClick: (e) => e.stopPropagation(), children: A && n.length > 1 ? t(N, { disabled: l, menu: { items: n }, children: t(p, { danger: r, title: (i = y.General) === null || i === void 0 ? void 0 : i.more, type: "tertiary", icon: t(x, { icon: E }) }) }) : U ? t(C, { children: n.map((e) => t(p, { danger: r, disabled: e.disabled || l, type: "tertiary", icon: e.icon, onClick: e.onClick, title: e.title }, e.key)) }) : f(C, { children: [[0, 1].map((e) => t(p, { danger: r, disabled: l, type: "tertiary", icon: n[e].icon, onClick: n[e].onClick, title: n[e].title })), t(N, { disabled: l, menu: { items: n.slice(2) }, children: t(p, { danger: r, title: (c = y.General) === null || c === void 0 ? void 0 : c.more, type: "tertiary", icon: t(x, { icon: E }) }) })] }) });
|
|
33
|
+
}, X = () => f("div", { className: m["kit-item-list-id-card"], children: [O && t(M, { ...o, disabled: l }), j && d] }), R = () => v && t("div", { className: m["kit-item-list-content"], children: v }), K = (i) => {
|
|
33
34
|
if (i.stopPropagation(), l)
|
|
34
35
|
return;
|
|
35
|
-
const
|
|
36
|
-
if (i.type === "click" ||
|
|
37
|
-
if (
|
|
38
|
-
return
|
|
36
|
+
const c = (u) => "key" in u;
|
|
37
|
+
if (i.type === "click" || c(i) && ["Enter", " "].includes(i.key)) {
|
|
38
|
+
if (_ != null)
|
|
39
|
+
return _();
|
|
39
40
|
if (a != null) {
|
|
40
41
|
const u = !k;
|
|
41
42
|
return g(u), a(u);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
-
[m["kit-item-list-clickable"]]:
|
|
45
|
+
}, q = B(b, m["kit-item-list"], F, {
|
|
46
|
+
[m["kit-item-list-clickable"]]: I || _ != null,
|
|
46
47
|
[m["kit-item-list-selected"]]: k,
|
|
47
48
|
"kit-item-list-disabled": l,
|
|
48
|
-
"kit-item-list-on-error":
|
|
49
|
+
"kit-item-list-on-error": r
|
|
49
50
|
});
|
|
50
|
-
return
|
|
51
|
+
return f("div", { "aria-disabled": l, ref: T, tabIndex: l ? W : Y, className: q, onClick: K, onKeyUp: K, ...L, children: [D, G(), X(), R(), V()] });
|
|
51
52
|
});
|
|
52
|
-
|
|
53
|
+
Z.displayName = "KitItemList";
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
Z as KitItemList
|
|
55
56
|
};
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
import "../../../assets/
|
|
2
|
-
import { jsx as
|
|
1
|
+
import "../../../assets/index25.css";
|
|
2
|
+
import { jsx as r, jsxs as d, Fragment as D } from "react/jsx-runtime";
|
|
3
3
|
import T from "classnames";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { u as
|
|
4
|
+
import { forwardRef as x } from "react";
|
|
5
|
+
import { u as F } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { faEllipsis as
|
|
7
|
+
import { faEllipsis as A, faArrowRight as E } from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
import { KitIcon as C } from "../../General/Icon/index.js";
|
|
9
|
-
import { KitTypography as
|
|
10
|
-
import { KitDivider as
|
|
9
|
+
import { KitTypography as N } from "../../General/Typography/index.js";
|
|
10
|
+
import { KitDivider as L } from "../../Layout/Divider/index.js";
|
|
11
11
|
import { KitButton as k } from "../../General/Button/index.js";
|
|
12
|
-
import { KitTooltip as
|
|
13
|
-
import { KitDropDown as
|
|
14
|
-
import { u as
|
|
15
|
-
|
|
12
|
+
import { KitTooltip as R } from "../Tooltip/index.js";
|
|
13
|
+
import { KitDropDown as g } from "../../Navigation/DropDown/index.js";
|
|
14
|
+
import { u as P } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
15
|
+
import { N as O, F as S } from "../../../chunks/constants.DINGxt3I.js";
|
|
16
|
+
const j = {
|
|
16
17
|
"kit-redirect-card": "_kit-redirect-card_poxps_2"
|
|
17
|
-
},
|
|
18
|
+
}, K = ({ actions: i, actionsInDropdown: m = !1, disabled: e = !1 }) => {
|
|
18
19
|
var n, s;
|
|
19
|
-
const { locale: l } =
|
|
20
|
-
if (!
|
|
20
|
+
const { locale: l } = P();
|
|
21
|
+
if (!i)
|
|
21
22
|
return null;
|
|
22
|
-
const o =
|
|
23
|
+
const o = i.length < 4;
|
|
23
24
|
let c;
|
|
24
|
-
if (m &&
|
|
25
|
-
c =
|
|
25
|
+
if (m && i.length > 1)
|
|
26
|
+
c = r(g, { disabled: e, menu: { items: i }, children: r(k, { title: (n = l.General) === null || n === void 0 ? void 0 : n.more, type: "secondary", icon: r(f, { icon: A }), disableSecureClick: !0, onClick: (t) => t.stopPropagation() }) });
|
|
26
27
|
else if (o)
|
|
27
|
-
c =
|
|
28
|
+
c = i.map((t) => r(_, { action: t, disabled: e }, t.key));
|
|
28
29
|
else {
|
|
29
|
-
const [t, p, ...h] =
|
|
30
|
-
c = d(
|
|
30
|
+
const [t, p, ...h] = i;
|
|
31
|
+
c = d(D, { children: [[t, p].map((a) => r(_, { action: a, disabled: e }, a.key)), r(g, { disabled: e, menu: { items: h }, children: r(k, { title: (s = l.General) === null || s === void 0 ? void 0 : s.more, type: "secondary", icon: r(f, { icon: A }), disableSecureClick: !0, onClick: (a) => a.stopPropagation() }) })] });
|
|
31
32
|
}
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
e.stopPropagation(),
|
|
35
|
-
}, disabled:
|
|
36
|
-
const v = s !== void 0 && l === void 0, y = l !== void 0, u = c !== void 0,
|
|
33
|
+
return r("div", { className: "kit-redirect-card-actions", children: c });
|
|
34
|
+
}, _ = ({ action: i, disabled: m }) => r(R, { title: i.label, children: r(k, { type: "secondary", icon: i.icon, onClick: (e) => {
|
|
35
|
+
e.stopPropagation(), i.onClick(e);
|
|
36
|
+
}, disabled: i.disabled || m, disableSecureClick: !0 }) }), G = x(({ className: i, style: m, title: e, description: n, icon: s, coverSrc: l, disabled: o, actions: c, actionsInDropdown: t, onClick: p, coverAlt: h = "" }, a) => {
|
|
37
|
+
const v = s !== void 0 && l === void 0, y = l !== void 0, u = c !== void 0, w = 2, { appId: B } = F(), I = T(j["kit-redirect-card"], i, B, {
|
|
37
38
|
"kit-redirect-card-disabled": o,
|
|
38
39
|
"kit-redirect-card-with-cover": y,
|
|
39
40
|
"kit-redirect-card-with-actions": u
|
|
40
41
|
});
|
|
41
|
-
return d("div", { className:
|
|
42
|
+
return d("div", { className: I, tabIndex: o ? O : S, style: m, onClick: p, ref: a, children: [u && v && r(K, { actions: c, disabled: o, actionsInDropdown: !!t }), v && r(C, { className: "kit-redirect-card-icon", icon: s }), y && d(D, { children: [d("div", { className: "kit-redirect-card-cover", children: [r("img", { alt: h, src: l }), r("div", { className: "kit-redirect-card-actions-mask" }), u && r(K, { actions: c, actionsInDropdown: !!t, disabled: o })] }), r(L, { noMargin: !0 })] }), d("div", { className: "kit-redirect-card-content", children: [d("section", { children: [r(N.Title, { ellipsis: !0, level: "h3", disabled: o, children: e }), n && r(N.AdvancedParagraph, { ellipsis: { rows: w, tooltip: n }, disabled: o, children: n })] }), r(C, { className: "kit-redirect-card-redirect-icon", icon: r(f, { icon: E }) })] })] });
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
+
G.displayName = "KitRedirectCard";
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
G as KitRedirectCard
|
|
46
47
|
};
|
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index45.css";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as z, useMemo as k } from "react";
|
|
4
4
|
import { Table as y } from "antd";
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
5
|
+
import I from "classnames";
|
|
6
|
+
import { u as B } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
|
+
import { F as w } from "../../../chunks/constants.DINGxt3I.js";
|
|
8
|
+
import { KitIcon as F } from "../../General/Icon/index.js";
|
|
9
|
+
import { FontAwesomeIcon as _ } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faUpDown as W, faArrowDown as E, faArrowUp as M, faGripLines as G, faCaretDown as X, faCaretRight as $ } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import { KitButton as N } from "../../General/Button/index.js";
|
|
12
|
+
const x = {
|
|
12
13
|
"kit-table": "_kit-table_1sgby_2",
|
|
13
14
|
"expand-button": "_expand-button_1sgby_667"
|
|
14
|
-
},
|
|
15
|
+
}, g = (n) => {
|
|
15
16
|
const l = n == null ? void 0 : n.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
17
|
return {
|
|
17
18
|
antCell: t,
|
|
18
19
|
internalCell: r
|
|
19
20
|
};
|
|
20
|
-
},
|
|
21
|
+
}, q = (n) => ({
|
|
21
22
|
header: {
|
|
22
|
-
cell: ({ children: l, className: t, style: r, title: a, rowSpan: b, colSpan: u, ...
|
|
23
|
-
const s =
|
|
24
|
-
return o("th", { className: s.antCell, style: r, title: a, rowSpan: b, colSpan: u, ...
|
|
23
|
+
cell: ({ children: l, className: t, style: r, title: a, rowSpan: b, colSpan: u, ...C }) => {
|
|
24
|
+
const s = g(t);
|
|
25
|
+
return o("th", { className: s.antCell, style: r, title: a, rowSpan: b, colSpan: u, ...C, children: o("div", { className: s.internalCell, children: l }) });
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
body: {
|
|
28
|
-
cell: ({ children: l, className: t, style: r, title: a, rowSpan: b, colSpan: u, ...
|
|
29
|
+
cell: ({ children: l, className: t, style: r, title: a, rowSpan: b, colSpan: u, ...C }) => {
|
|
29
30
|
var s, f;
|
|
30
|
-
const v = (s = n == null ? void 0 : n.body) === null || s === void 0 ? void 0 : s.cell,
|
|
31
|
+
const v = (s = n == null ? void 0 : n.body) === null || s === void 0 ? void 0 : s.cell, h = g(t);
|
|
31
32
|
let i = "";
|
|
32
|
-
return !((f =
|
|
33
|
+
return !((f = h.antCell) === null || f === void 0) && f.includes("ant-table-cell-ellipsis") && (i = a), o("td", { className: h.antCell, style: r, title: i, rowSpan: b, colSpan: u, children: o("div", { className: h.internalCell, children: v ? o(v, { title: a, ...C, children: l }) : l }) });
|
|
33
34
|
},
|
|
34
35
|
row: ({ children: l, ...t }) => {
|
|
35
36
|
var r;
|
|
36
37
|
const a = (r = n == null ? void 0 : n.body) === null || r === void 0 ? void 0 : r.row;
|
|
37
|
-
return a ? o(a, { ...t, tabIndex:
|
|
38
|
+
return a ? o(a, { ...t, tabIndex: w, children: l }) : o("tr", { ...t, tabIndex: w, children: l });
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
}), J = ({ sortOrder: n }) => {
|
|
41
42
|
let l, t;
|
|
42
43
|
switch (n) {
|
|
43
44
|
case "ascend":
|
|
44
|
-
l =
|
|
45
|
+
l = M, t = "blue";
|
|
45
46
|
break;
|
|
46
47
|
case "descend":
|
|
47
|
-
l =
|
|
48
|
+
l = E, t = "blue";
|
|
48
49
|
break;
|
|
49
50
|
default:
|
|
50
|
-
l =
|
|
51
|
+
l = W;
|
|
51
52
|
break;
|
|
52
53
|
}
|
|
53
|
-
return o(
|
|
54
|
-
},
|
|
55
|
-
const a =
|
|
56
|
-
return o(
|
|
57
|
-
}), Q = ({ className: n, style: l, cellsBackgroundColor: t, backgroundColor: r, borderedRows: a, columns: b, onChange: u, components:
|
|
58
|
-
const { appId: T, theme:
|
|
59
|
-
"kit-table-line-size-m":
|
|
54
|
+
return o(F, { color: t, icon: o(_, { icon: l }) });
|
|
55
|
+
}, S = z(({ className: n, isDragging: l, ...t }, r) => {
|
|
56
|
+
const a = I("kit-table-drag-handle", n, { "kit-table-drag-handle--dragging": l });
|
|
57
|
+
return o(N, { ...t, iconSize: "l", type: "tertiary", className: a, icon: o(_, { icon: G }), ref: r });
|
|
58
|
+
}), Q = ({ className: n, style: l, cellsBackgroundColor: t, backgroundColor: r, borderedRows: a, columns: b, onChange: u, components: C, showDragHandle: s, showHeader: f, dragHandleElement: v, lineSize: h = "l", ...i }) => {
|
|
59
|
+
const { appId: T, theme: K } = B(), D = I(T, x["kit-table"], n, {
|
|
60
|
+
"kit-table-line-size-m": h === "m",
|
|
60
61
|
"kit-table-bordered-rows": a,
|
|
61
62
|
"kit-table-headless": !f
|
|
62
|
-
}), p =
|
|
63
|
+
}), p = k(() => i != null && i.rowSelection ? { ...i == null ? void 0 : i.rowSelection, columnWidth: "var(--kit-table-checkbox-width)" } : i == null ? void 0 : i.rowSelection, [i == null ? void 0 : i.rowSelection]), L = k(() => {
|
|
63
64
|
const e = [...b].map((c) => s ? {
|
|
64
65
|
...c,
|
|
65
66
|
sorter: void 0
|
|
@@ -67,42 +68,42 @@ const w = {
|
|
|
67
68
|
return s && (p && e.unshift(y.SELECTION_COLUMN), e.unshift({
|
|
68
69
|
key: "drag-handle",
|
|
69
70
|
align: "center",
|
|
70
|
-
render: () => v ?? o(
|
|
71
|
+
render: () => v ?? o(S, {})
|
|
71
72
|
})), e;
|
|
72
|
-
}, [b, p, s, v]),
|
|
73
|
+
}, [b, p, s, v]), R = (e, c, m, d) => {
|
|
73
74
|
u == null || u(e, m, d);
|
|
74
|
-
},
|
|
75
|
+
}, O = ({ record: e, expanded: c, onExpand: m }) => {
|
|
75
76
|
var d;
|
|
76
77
|
if (!(!Array.isArray(e == null ? void 0 : e.children) || !(!((d = e == null ? void 0 : e.children) === null || d === void 0) && d.length)))
|
|
77
|
-
return o(
|
|
78
|
-
},
|
|
78
|
+
return o(N, { className: x["expand-button"], type: "tertiary", onClick: (j) => m(e, j), children: o(_, { icon: c ? X : $ }) });
|
|
79
|
+
}, U = (e, c, m) => {
|
|
79
80
|
var d;
|
|
80
81
|
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" : "";
|
|
81
82
|
};
|
|
82
83
|
return o(y, {
|
|
83
|
-
className:
|
|
84
|
+
className: D,
|
|
84
85
|
style: {
|
|
85
86
|
"--kit-table-cells-background-color": t,
|
|
86
87
|
"--kit-table-background": r,
|
|
87
88
|
...l
|
|
88
89
|
},
|
|
89
|
-
columns:
|
|
90
|
-
components:
|
|
91
|
-
onChange:
|
|
90
|
+
columns: L,
|
|
91
|
+
components: q(C),
|
|
92
|
+
onChange: R,
|
|
92
93
|
// Pour l'instant on garde expandable dans les props à Omit<>
|
|
93
94
|
// A voir si on permet de custom uniquement certaines propriété
|
|
94
95
|
expandable: {
|
|
95
|
-
expandedRowClassName:
|
|
96
|
-
expandIcon:
|
|
97
|
-
indentSize:
|
|
96
|
+
expandedRowClassName: U,
|
|
97
|
+
expandIcon: O,
|
|
98
|
+
indentSize: K.spacing.m
|
|
98
99
|
},
|
|
99
100
|
...i,
|
|
100
101
|
rowSelection: p,
|
|
101
102
|
showHeader: f
|
|
102
103
|
});
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
}, A = Q;
|
|
105
|
+
A.displayName = "KitTable";
|
|
106
|
+
A.DragHandle = S;
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
+
A as KitTable
|
|
108
109
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import "../../../assets/index5.css";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as r, Fragment as I, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { useState as S } from "react";
|
|
4
4
|
import { u as D } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
-
import
|
|
6
|
-
import { KitButton as
|
|
7
|
-
import { KitTypography as
|
|
5
|
+
import K from "classnames";
|
|
6
|
+
import { KitButton as E } from "../../General/Button/index.js";
|
|
7
|
+
import { KitTypography as j } from "../../General/Typography/index.js";
|
|
8
8
|
import { KitBadge as C } from "../Badge/index.js";
|
|
9
|
-
import { FontAwesomeIcon as
|
|
10
|
-
import { faPlus as
|
|
11
|
-
|
|
9
|
+
import { FontAwesomeIcon as O } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faPlus as U } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import { F as z } from "../../../chunks/constants.DINGxt3I.js";
|
|
12
|
+
const L = {
|
|
12
13
|
"kit-tabs": "_kit-tabs_1i9lf_2"
|
|
13
|
-
},
|
|
14
|
+
}, P = ({ addTab: v, centered: h, className: w, activeKey: n, defaultKey: a, items: o, onChange: i, fullwidthTab: u, size: b = "small", variant: s = "classic" }) => {
|
|
14
15
|
var m, d;
|
|
15
|
-
const { appId:
|
|
16
|
+
const { appId: x } = D(), [y, f] = S(a ?? ((m = o[0]) === null || m === void 0 ? void 0 : m.key)), k = n ?? y, N = (d = o.find((t) => t.key === k)) === null || d === void 0 ? void 0 : d.tabContent, A = K(x, w, L["kit-tabs"], h ? "centered" : "", b === "small" ? "small" : "medium", s, u ? "fullwidth" : "", N && s === "pill" ? "tabs-bottom-spacing" : ""), T = (t) => {
|
|
16
17
|
f(t), i == null || i(t);
|
|
17
|
-
},
|
|
18
|
+
}, B = (t, c) => {
|
|
18
19
|
t.code === "Enter" && (f(c), i == null || i(c));
|
|
19
20
|
};
|
|
20
|
-
return
|
|
21
|
+
return r(I, { children: [r("div", { className: A, role: "tablist", children: [o == null ? void 0 : o.map(({ icon: t, label: c, badgeCount: _, key: e, disabled: p }) => r("div", { className: K("kit-tab", s, {
|
|
21
22
|
disabled: p,
|
|
22
23
|
active: k === e,
|
|
23
24
|
fullwidth: u
|
|
24
|
-
}), role: "tab", tabIndex:
|
|
25
|
+
}), role: "tab", tabIndex: z, onClick: p ? void 0 : () => T(e), onKeyDown: p ? void 0 : (F) => B(F, e), children: [t && l("div", { className: "kit-tab-icon", children: t }), r("div", { className: "kit-tab-label-wrapper", children: [l(j.Text, { className: "kit-tab-label", size: b === "medium" ? "fontSize4" : void 0, children: c }), !!_ && l(C, { className: "kit-tab-count", count: _ })] })] }, e)), v && s === "classic" && l(E, { disableSecureClick: !0, type: "tertiary", icon: l(O, { icon: U }), onClick: v })] }), N] });
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
P.displayName = "KitTabs";
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
P as KitTabs
|
|
29
30
|
};
|