aristid-ds 11.0.0 → 12.0.0-e651b01
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 +108 -2
- package/README.md +9 -8
- package/dist/Kit/App/index.js +66 -16
- package/dist/Kit/DataDisplay/Avatar/index.js +22 -2
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/Collapse/index.js +80 -2
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +40 -19
- package/dist/Kit/DataDisplay/IdCard/index.js +22 -8
- package/dist/Kit/DataDisplay/Image/index.js +22 -8
- package/dist/Kit/DataDisplay/ItemCard/index.js +45 -18
- package/dist/Kit/DataDisplay/ItemList/index.js +53 -24
- package/dist/Kit/DataDisplay/RedirectCard/index.js +46 -12
- package/dist/Kit/DataDisplay/Table/index.js +104 -2
- package/dist/Kit/DataDisplay/Table/types.d.ts +2 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +37 -13
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +2 -0
- package/dist/Kit/DataDisplay/Tag/index.js +74 -2
- package/dist/Kit/DataDisplay/Tag/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Tag/useTagGroup.d.ts +13 -3
- package/dist/Kit/DataDisplay/Tree/index.js +13 -11
- package/dist/Kit/DataDisplay/index.js +31 -23
- package/dist/Kit/DataDisplay/types.d.ts +3 -2
- package/dist/Kit/DataEntry/AutoComplete/index.js +26 -8
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +5 -8
- package/dist/Kit/DataEntry/Checkbox/index.js +67 -2
- package/dist/Kit/DataEntry/Checkbox/types.d.ts +3 -7
- package/dist/Kit/DataEntry/ColorPicker/index.js +80 -7
- package/dist/Kit/DataEntry/ColorPicker/types.d.ts +9 -13
- package/dist/Kit/DataEntry/DatePicker/DatePicker.d.ts +2 -1
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +2 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +28 -2
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +3 -15
- package/dist/Kit/DataEntry/Filter/index.js +21 -19
- package/dist/Kit/DataEntry/Input/index.js +31 -2
- package/dist/Kit/DataEntry/Input/types.d.ts +7 -22
- package/dist/Kit/DataEntry/InputNumber/index.js +22 -7
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +3 -8
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/InputWrapper/types.d.ts +11 -6
- package/dist/Kit/DataEntry/Radio/index.js +53 -2
- package/dist/Kit/DataEntry/Radio/types.d.ts +9 -8
- package/dist/Kit/DataEntry/Rate/index.js +1 -1
- package/dist/Kit/DataEntry/Rate/types.d.ts +1 -1
- package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js +4 -12
- package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +64 -16
- package/dist/Kit/DataEntry/RichText/MenuBar/FontStylesButtons/index.js +18 -6
- package/dist/Kit/DataEntry/RichText/MenuBar/IndentListButtons/index.js +15 -6
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +73 -7
- package/dist/Kit/DataEntry/RichText/MenuBar/ListButtons/index.js +16 -6
- package/dist/Kit/DataEntry/RichText/MenuBar/TextAlignButtons/index.js +20 -6
- package/dist/Kit/DataEntry/RichText/MenuBar/UndoRedoButtons/index.js +15 -6
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +19 -11
- package/dist/Kit/DataEntry/RichText/index.js +76 -15
- package/dist/Kit/DataEntry/RichText/types.d.ts +3 -8
- package/dist/Kit/DataEntry/Select/guard.d.ts +1 -2
- package/dist/Kit/DataEntry/Select/index.js +136 -9
- package/dist/Kit/DataEntry/Select/renders.d.ts +3 -15
- package/dist/Kit/DataEntry/Select/types.d.ts +8 -14
- package/dist/Kit/DataEntry/Select/useIcons.d.ts +5 -7
- package/dist/Kit/DataEntry/Slider/index.js +1 -1
- package/dist/Kit/DataEntry/Switch/index.js +1 -1
- package/dist/Kit/DataEntry/Upload/index.js +27 -3
- package/dist/Kit/DataEntry/index.js +30 -19
- package/dist/Kit/Feedback/Alert/index.js +59 -5
- package/dist/Kit/Feedback/Loader/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +152 -2
- package/dist/Kit/Feedback/Modal/types.d.ts +4 -3
- package/dist/Kit/Feedback/Notification/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.d.ts +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +35 -26
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.d.ts +1 -1
- package/dist/Kit/Feedback/SnackBar/types.d.ts +7 -13
- package/dist/Kit/Feedback/index.js +15 -14
- package/dist/Kit/General/Button/index.js +83 -4
- package/dist/Kit/General/DynamicActions/DynamicActions.d.ts +3 -0
- package/dist/Kit/General/DynamicActions/EllipsisButton.d.ts +3 -0
- package/dist/Kit/General/DynamicActions/index.d.ts +7 -0
- package/dist/Kit/General/DynamicActions/index.js +34 -0
- package/dist/Kit/General/DynamicActions/types.d.ts +14 -0
- package/dist/Kit/General/Icon/index.js +1 -1
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/General/index.js +5 -5
- package/dist/Kit/Layout/Divider/index.js +1 -1
- package/dist/Kit/Layout/Divider/types.d.ts +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +17 -2
- package/dist/Kit/Layout/Section/index.js +1 -1
- package/dist/Kit/Layout/index.js +1 -1
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +37 -9
- package/dist/Kit/Navigation/Header/index.js +58 -2
- package/dist/Kit/Navigation/PageHeader/index.js +37 -19
- package/dist/Kit/Navigation/Pagination/index.js +11 -9
- package/dist/Kit/Navigation/Pagination/types.d.ts +3 -1
- package/dist/Kit/Navigation/SideMenu/index.js +56 -2
- package/dist/Kit/Navigation/SidePanel/index.js +66 -2
- package/dist/Kit/Navigation/SidePanel/types.d.ts +2 -0
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/Navigation/index.js +14 -11
- package/dist/Kit/index.js +174 -146
- package/dist/assets/Avatar.css +1 -0
- package/dist/assets/InputWrapper.css +1 -0
- package/dist/assets/icons/chevrons/LeftChevrons.d.ts +2 -0
- package/dist/assets/icons/chevrons/RightChevrons.d.ts +2 -0
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -0
- package/dist/assets/index21.css +1 -0
- package/dist/assets/index22.css +1 -0
- package/dist/assets/index23.css +1 -0
- package/dist/assets/index24.css +1 -0
- package/dist/assets/index25.css +1 -0
- package/dist/assets/index26.css +1 -0
- package/dist/assets/index27.css +1 -0
- package/dist/assets/index28.css +1 -0
- package/dist/assets/index29.css +1 -0
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -0
- package/dist/assets/index31.css +1 -0
- package/dist/assets/index32.css +1 -0
- package/dist/assets/index33.css +1 -0
- package/dist/assets/index34.css +1 -0
- package/dist/assets/index35.css +1 -0
- package/dist/assets/index36.css +1 -0
- package/dist/assets/index37.css +1 -0
- package/dist/assets/index38.css +1 -0
- package/dist/assets/index39.css +1 -0
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -0
- package/dist/assets/index41.css +1 -0
- package/dist/assets/index42.css +1 -0
- package/dist/assets/index43.css +1 -0
- package/dist/assets/index44.css +1 -0
- package/dist/assets/index45.css +1 -0
- package/dist/assets/index46.css +1 -0
- package/dist/assets/index47.css +1 -0
- package/dist/assets/index48.css +1 -0
- package/dist/assets/index49.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index50.css +1 -0
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/chunks/Avatar.N2w2jq_C.js +30 -0
- package/dist/chunks/InputWrapper._05UBJgS.js +23 -0
- package/dist/chunks/KitNotification.RhW3PPyX.js +53 -0
- package/dist/chunks/SnackBarProvider.nqDzpFo3.js +23 -0
- package/dist/chunks/getButtonActiveClass.SjojTAbN.js +4 -0
- package/dist/chunks/notification-provider.9msrEKBe.js +73 -0
- package/dist/chunks/{styles.module.Q_QQjQdX.js → styles.module.4eW8VunD.js} +1 -1
- package/dist/chunks/useKitLocale.96CdK3og.js +11 -0
- package/dist/index.es.js +180 -150
- package/dist/index.umd.js +5 -5
- package/dist/theme/aristid/components/Navigation/DropDown/index.js +0 -1
- package/dist/theme/types/components/Navigation/DropDown/index.d.ts +0 -6
- package/dist/theme/utils/tokens-mapper/DataEntry/InputNumber/index.js +1 -1
- package/dist/translation/en-US/components/DataEntry/ColorPicker/index.d.ts +2 -0
- package/dist/translation/en-US/components/DataEntry/ColorPicker/index.js +6 -0
- package/dist/translation/en-US/index.js +13 -11
- package/dist/translation/fr-FR/components/DataEntry/ColorPicker/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/DataEntry/ColorPicker/index.js +6 -0
- package/dist/translation/fr-FR/index.js +9 -7
- package/dist/translation/types/components/DataEntry/ColorPicker/index.d.ts +3 -0
- package/dist/translation/types/index.d.ts +2 -0
- package/dist/utils/hooks/useClickOutside.d.ts +8 -0
- package/dist/utils/hooks/useKeyboardShortcut.d.ts +7 -0
- package/package.json +152 -151
- package/dist/assets/styles2.css +0 -1
- package/dist/chunks/KitNotification.GTRTPM11.js +0 -58
- package/dist/chunks/SnackBarProvider.xMKXdZ88.js +0 -22
- package/dist/chunks/index.2xXr1nME.js +0 -1616
- package/dist/chunks/index.S1tc6cnV.js +0 -31
- package/dist/chunks/index.bf78FwPu.js +0 -41
- package/dist/chunks/styles.module.YmhPHVHy.js +0 -7
|
@@ -1,20 +1,47 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import "../../General/Typography/index.js";
|
|
6
|
-
import "../../
|
|
7
|
-
import "../../DataEntry/
|
|
8
|
-
import "../../
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "../../
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
1
|
+
import "../../../assets/index29.css";
|
|
2
|
+
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { useState as B, useEffect as V, forwardRef as X } from "react";
|
|
4
|
+
import Y from "classnames";
|
|
5
|
+
import { KitTypography as w } from "../../General/Typography/index.js";
|
|
6
|
+
import { KitCheckbox as Z } from "../../DataEntry/Checkbox/index.js";
|
|
7
|
+
import { KitSwitch as G } from "../../DataEntry/Switch/index.js";
|
|
8
|
+
import { KitBreadcrumb as ii } from "../../Navigation/Breadcrumb/index.js";
|
|
9
|
+
import { u as ti } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
|
+
import { KitTag as ei } from "../Tag/index.js";
|
|
11
|
+
import { KitButton as A } from "../../General/Button/index.js";
|
|
12
|
+
import { KitTooltip as oi } from "../Tooltip/index.js";
|
|
13
|
+
import { FontAwesomeIcon as _ } from "@fortawesome/react-fontawesome";
|
|
14
|
+
import { faEllipsis as si, faImage as ri } from "@fortawesome/free-solid-svg-icons";
|
|
15
|
+
import { KitDropDown as ai } from "../../Navigation/DropDown/index.js";
|
|
16
|
+
import { u as di } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
17
|
+
import { useDebouncedCallback as ci } from "use-debounce";
|
|
18
|
+
const ni = {
|
|
19
|
+
"kit-item-card": "_kit-item-card_308fs_2"
|
|
20
|
+
}, z = () => {
|
|
21
|
+
const [d, a] = B(window.innerWidth), [o, r] = B(window.innerHeight), t = ci(() => {
|
|
22
|
+
a(window.innerWidth), r(window.innerHeight);
|
|
23
|
+
}, 100);
|
|
24
|
+
return V(() => (t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), [t]), { width: d, height: o };
|
|
25
|
+
}, li = 1300, E = ({ display: d = "card", disabled: a = !1, actions: o }) => {
|
|
26
|
+
var r;
|
|
27
|
+
const { locale: t } = di(), { width: c } = z();
|
|
28
|
+
return i("div", { className: "kit-item-card-actions", children: d === "list" && c < li ? i(ai, { disabled: a, menu: { items: o }, children: i(A, { title: (r = t.General) === null || r === void 0 ? void 0 : r.more, icon: i(_, { icon: si }) }) }) : o == null ? void 0 : o.map((s) => i(oi, { title: s.label, children: i(A, { icon: s.icon, onClick: s.onClick, disabled: s.disabled || a }) }, s.key)) });
|
|
29
|
+
}, R = 900, mi = X(({ className: d, style: a, imageSrc: o, icon: r, tagGroup: t, breadcrumbItems: c, title: s, description: m, draggableHandler: u, selected: D, onSelect: g, activateLabel: H, activated: L, onActivate: y, extra: C, actions: h, display: n = "card", disabled: e = !1, imageAlt: O = "", imageCover: W = !1 }, j) => {
|
|
30
|
+
const { appId: S } = ti(), { width: T } = z(), N = g !== void 0, x = u !== void 0, F = o !== void 0, P = r !== void 0, p = t !== void 0, K = c !== void 0, $ = s !== void 0 || m !== void 0, b = C !== void 0, q = y !== void 0, k = h !== void 0, I = [p, K, b].filter(Boolean).length, f = n === "list" && T > R, v = n === "card" || T <= R, J = Y(ni["kit-item-card"], d, S, {
|
|
31
|
+
"kit-item-card-display-list": f,
|
|
32
|
+
"kit-item-card-display-card": v,
|
|
33
|
+
[`kit-item-card-display-list-with-${I}-rows`]: f && I > 0,
|
|
34
|
+
"kit-item-card-display-card-checkbox-or-draggable-handler": v && (N || x),
|
|
35
|
+
"kit-item-card-disabled": e,
|
|
36
|
+
"kit-item-card-selected": D,
|
|
37
|
+
"kit-item-card-with-actions": k,
|
|
38
|
+
"kit-item-card-image-cover": W
|
|
39
|
+
});
|
|
40
|
+
e && p && (t.tags = t.tags.map((U) => ({ ...U, disabled: e })), t.othersTagDisabled = !0);
|
|
41
|
+
const M = i("div", { className: "kit-item-card-checkbox", children: i(Z, { onChange: g, checked: D, disabled: e }) }), Q = i("div", { className: "kit-item-card-draggable-handler", children: u });
|
|
42
|
+
return l("div", { tabIndex: e ? -1 : 0, className: J, style: a, ref: j, children: [N && M, x && Q, l("div", { className: "kit-item-card-image", children: [F ? i("img", { src: o, alt: O }) : i("div", { className: "kit-item-card-image-placeholder", children: P ? r : i(_, { icon: ri }) }), i("div", { className: "kit-item-card-actions-mask" }), k && v && i(E, { 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 }) }), K && i("div", { className: "kit-item-card-breadcrumb", children: i(ii, { items: c }) }), $ && l("div", { className: "kit-item-card-content", children: [s && i(w.Title, { level: "h3", ellipsis: { tooltip: !0, rows: 2 }, disabled: e, children: s }), m && i(w.Paragraph, { ellipsis: { tooltip: !0, rows: 2 }, disabled: e, children: m })] }), b && i("div", { className: "kit-item-card-extra", children: C }), k && f && i(E, { actions: h, disabled: e, display: n }), q && l("div", { className: "kit-item-card-switch", children: [i(G, { onChange: y, checked: L, disabled: e }), i(w.Text, { disabled: e, ellipsis: { tooltip: !0 }, children: H })] })] });
|
|
43
|
+
});
|
|
44
|
+
mi.displayName = "KitItemCard";
|
|
18
45
|
export {
|
|
19
|
-
|
|
46
|
+
mi as KitItemCard
|
|
20
47
|
};
|
|
@@ -1,26 +1,55 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../../DataEntry/
|
|
5
|
-
import "
|
|
6
|
-
import "../../
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import "../../../assets/index4.css";
|
|
2
|
+
import { jsxs as v, jsx as t, Fragment as C } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as J, useState as M } from "react";
|
|
4
|
+
import { KitCheckbox as O } from "../../DataEntry/Checkbox/index.js";
|
|
5
|
+
import { KitIdCard as Q } from "../IdCard/index.js";
|
|
6
|
+
import { KitButton as d } from "../../General/Button/index.js";
|
|
7
|
+
import { KitDropDown as x } from "../../Navigation/DropDown/index.js";
|
|
8
|
+
import { u as W } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
9
|
+
import { FontAwesomeIcon as w } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faEllipsis as N } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import b from "classnames";
|
|
12
|
+
import { u as X } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
13
|
+
const m = {
|
|
14
|
+
"kit-item-list": "_kit-item-list_1rfhx_2",
|
|
15
|
+
"kit-item-list-buttons": "_kit-item-list-buttons_1rfhx_42",
|
|
16
|
+
"kit-item-list-selected": "_kit-item-list-selected_1rfhx_49",
|
|
17
|
+
"kit-item-list-id-card": "_kit-item-list-id-card_1rfhx_60",
|
|
18
|
+
"kit-item-list-clickable": "_kit-item-list-clickable_1rfhx_64"
|
|
19
|
+
}, Y = J(({ idCardProps: o, idCardSubstitute: p, checkboxAriaLabel: h, draggableHandler: D, content: _, error: c, onSelect: a, onClick: f, className: E, showActionsOnHover: F, disabled: l = !1, actions: n = [], actionsInDropdown: L, ...j }, B) => {
|
|
20
|
+
const { appId: G } = W(), { locale: y } = X(), [k, g] = M(!1), K = a !== void 0, T = n.length < 4, U = o !== void 0 && p === void 0, V = p !== void 0, A = () => {
|
|
21
|
+
var i;
|
|
22
|
+
return K ? t(O, { danger: c, disabled: l, checked: k, onClick: (s) => s.stopPropagation(), onChange: () => {
|
|
23
|
+
const s = !k;
|
|
24
|
+
return g(s), a(s);
|
|
25
|
+
}, "aria-label": (i = h ?? (o == null ? void 0 : o.title)) !== null && i !== void 0 ? i : o == null ? void 0 : o.description }) : null;
|
|
26
|
+
}, R = () => {
|
|
27
|
+
var i, r;
|
|
28
|
+
const s = b(m["kit-item-list-buttons"], {
|
|
29
|
+
"kit-item-list-buttons-visible-on-hover": F
|
|
30
|
+
});
|
|
31
|
+
return n && n.length !== 0 && t("div", { className: s, onClick: (e) => e.stopPropagation(), children: L && n.length > 1 ? t(x, { disabled: l, menu: { items: n }, children: t(d, { danger: c, title: (i = y.General) === null || i === void 0 ? void 0 : i.more, type: "tertiary", icon: t(w, { icon: N }) }) }) : T ? t(C, { children: n.map((e) => t(d, { danger: c, disabled: e.disabled || l, type: "tertiary", icon: e.icon, onClick: e.onClick, title: e.title }, e.key)) }) : v(C, { children: [[0, 1].map((e) => t(d, { danger: c, disabled: l, type: "tertiary", icon: n[e].icon, onClick: n[e].onClick, title: n[e].title })), t(x, { disabled: l, menu: { items: n.slice(2) }, children: t(d, { danger: c, title: (r = y.General) === null || r === void 0 ? void 0 : r.more, type: "tertiary", icon: t(w, { icon: N }) }) })] }) });
|
|
32
|
+
}, q = () => v("div", { className: m["kit-item-list-id-card"], children: [U && t(Q, { ...o, disabled: l }), V && p] }), z = () => _ && t("div", { className: m["kit-item-list-content"], children: _ }), I = (i) => {
|
|
33
|
+
if (i.stopPropagation(), l)
|
|
34
|
+
return;
|
|
35
|
+
const r = (u) => "key" in u;
|
|
36
|
+
if (i.type === "click" || r(i) && ["Enter", " "].includes(i.key)) {
|
|
37
|
+
if (f != null)
|
|
38
|
+
return f();
|
|
39
|
+
if (a != null) {
|
|
40
|
+
const u = !k;
|
|
41
|
+
return g(u), a(u);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, H = b(G, m["kit-item-list"], E, {
|
|
45
|
+
[m["kit-item-list-clickable"]]: K || f != null,
|
|
46
|
+
[m["kit-item-list-selected"]]: k,
|
|
47
|
+
"kit-item-list-disabled": l,
|
|
48
|
+
"kit-item-list-on-error": c
|
|
49
|
+
});
|
|
50
|
+
return v("div", { "aria-disabled": l, ref: B, tabIndex: l ? -1 : 0, className: H, onClick: I, onKeyUp: I, ...j, children: [D, A(), q(), z(), R()] });
|
|
51
|
+
});
|
|
52
|
+
Y.displayName = "KitItemList";
|
|
24
53
|
export {
|
|
25
|
-
|
|
54
|
+
Y as KitItemList
|
|
26
55
|
};
|
|
@@ -1,18 +1,52 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import "react";
|
|
5
|
-
import "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
-
import "@fortawesome/react-fontawesome";
|
|
7
|
-
import "@fortawesome/free-solid-svg-icons";
|
|
8
|
-
import "../../General/
|
|
9
|
-
import "../../General/
|
|
10
|
-
import "../../Layout/Divider/index.js";
|
|
1
|
+
import "../../../assets/index25.css";
|
|
2
|
+
import { jsx as i, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
3
|
+
import T from "classnames";
|
|
4
|
+
import { forwardRef as _ } from "react";
|
|
5
|
+
import { u as B } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { faEllipsis as g, faArrowRight as P } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
import { KitIcon as C } from "../../General/Icon/index.js";
|
|
9
|
+
import { KitTypography as K } from "../../General/Typography/index.js";
|
|
10
|
+
import { KitDivider as F } from "../../Layout/Divider/index.js";
|
|
11
11
|
import "../../Layout/Space/index.js";
|
|
12
12
|
import "color-convert";
|
|
13
13
|
import "color-string";
|
|
14
14
|
import "lodash/isEmpty";
|
|
15
|
-
import "../../../chunks/styles.module.
|
|
15
|
+
import "../../../chunks/styles.module.4eW8VunD.js";
|
|
16
|
+
import "../../Layout/PageLayout/index.js";
|
|
17
|
+
import { KitButton as k } from "../../General/Button/index.js";
|
|
18
|
+
import { KitTooltip as L } from "../Tooltip/index.js";
|
|
19
|
+
import { KitDropDown as A } from "../../Navigation/DropDown/index.js";
|
|
20
|
+
import { u as j } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
21
|
+
const G = {
|
|
22
|
+
"kit-redirect-card": "_kit-redirect-card_poxps_2"
|
|
23
|
+
}, w = ({ actions: r, actionsInDropdown: m = !1, disabled: t = !1 }) => {
|
|
24
|
+
var n, s;
|
|
25
|
+
const { locale: l } = j();
|
|
26
|
+
if (!r)
|
|
27
|
+
return null;
|
|
28
|
+
const o = r.length < 4;
|
|
29
|
+
let c;
|
|
30
|
+
if (m && r.length > 1)
|
|
31
|
+
c = i(A, { disabled: t, 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: (e) => e.stopPropagation() }) });
|
|
32
|
+
else if (o)
|
|
33
|
+
c = r.map((e) => i(N, { action: e, disabled: t }, e.key));
|
|
34
|
+
else {
|
|
35
|
+
const [e, p, ...h] = r;
|
|
36
|
+
c = d(x, { children: [[e, p].map((a) => i(N, { action: a, disabled: t }, a.key)), i(A, { disabled: t, 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
|
+
}
|
|
38
|
+
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: (t) => {
|
|
40
|
+
t.stopPropagation(), r.onClick(t);
|
|
41
|
+
}, disabled: r.disabled || m, disableSecureClick: !0 }) }), M = _(({ className: r, style: m, title: t, description: n, icon: s, coverSrc: l, disabled: o, actions: c, actionsInDropdown: e, onClick: p, coverAlt: h = "" }, a) => {
|
|
42
|
+
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
|
+
"kit-redirect-card-disabled": o,
|
|
44
|
+
"kit-redirect-card-with-cover": y,
|
|
45
|
+
"kit-redirect-card-with-actions": u
|
|
46
|
+
});
|
|
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: !!e }), 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: !!e, 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: t }), 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
|
+
});
|
|
49
|
+
M.displayName = "KitRedirectCard";
|
|
16
50
|
export {
|
|
17
|
-
|
|
51
|
+
M as KitRedirectCard
|
|
18
52
|
};
|
|
@@ -1,4 +1,106 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../assets/index45.css";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as z, useMemo as _ } from "react";
|
|
4
|
+
import { Table as w } from "antd";
|
|
5
|
+
import g from "classnames";
|
|
6
|
+
import { u as O } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
|
+
import { KitIcon as U } from "../../General/Icon/index.js";
|
|
8
|
+
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
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
|
+
import { KitButton as I } from "../../General/Button/index.js";
|
|
11
|
+
const y = {
|
|
12
|
+
"kit-table": "_kit-table_1ks06_2",
|
|
13
|
+
"expand-button": "_expand-button_1ks06_649"
|
|
14
|
+
}, x = (i) => {
|
|
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
|
+
return {
|
|
17
|
+
antCell: t,
|
|
18
|
+
internalCell: r
|
|
19
|
+
};
|
|
20
|
+
}, q = (i) => ({
|
|
21
|
+
header: {
|
|
22
|
+
cell: ({ children: l, className: t, style: r, title: a, rowSpan: f, colSpan: v, ...b }) => {
|
|
23
|
+
const s = x(t);
|
|
24
|
+
return o("th", { className: s.antCell, style: r, title: a, rowSpan: f, colSpan: v, ...b, children: o("div", { className: s.internalCell, children: l }) });
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
cell: ({ children: l, className: t, style: r, title: a, rowSpan: f, colSpan: v, ...b }) => {
|
|
29
|
+
var s, c;
|
|
30
|
+
const h = (s = i == null ? void 0 : i.body) === null || s === void 0 ? void 0 : s.cell, n = x(t);
|
|
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: v, children: o("div", { className: n.internalCell, children: h ? o(h, { title: a, ...b, children: l }) : l }) });
|
|
33
|
+
},
|
|
34
|
+
row: ({ children: l, ...t }) => {
|
|
35
|
+
var r;
|
|
36
|
+
const a = (r = i == null ? void 0 : i.body) === null || r === void 0 ? void 0 : r.row;
|
|
37
|
+
return a ? o(a, { ...t, tabIndex: 0, children: l }) : o("tr", { ...t, tabIndex: 0, children: l });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}), E = ({ sortOrder: i }) => {
|
|
41
|
+
let l, t;
|
|
42
|
+
switch (i) {
|
|
43
|
+
case "ascend":
|
|
44
|
+
l = B, t = "blue";
|
|
45
|
+
break;
|
|
46
|
+
case "descend":
|
|
47
|
+
l = M, t = "blue";
|
|
48
|
+
break;
|
|
49
|
+
default:
|
|
50
|
+
l = W;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
return o(U, { color: t, icon: o(p, { icon: l }) });
|
|
54
|
+
}, N = z(({ className: i, isDragging: l, ...t }, r) => {
|
|
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(p, { icon: F }), ref: r });
|
|
57
|
+
}), J = ({ className: i, style: l, cellsBackgroundColor: t, backgroundColor: r, borderedRows: a, columns: f, onChange: v, components: b, showDragHandle: s, dragHandleElement: c, lineSize: h = "l", ...n }) => {
|
|
58
|
+
const { appId: C, theme: T } = O(), A = g(C, y["kit-table"], i, {
|
|
59
|
+
"kit-table-line-size-m": h === "m",
|
|
60
|
+
"kit-table-bordered-rows": a
|
|
61
|
+
}), 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 = _(() => {
|
|
62
|
+
const e = [...f].map((u) => s ? {
|
|
63
|
+
...u,
|
|
64
|
+
sorter: void 0
|
|
65
|
+
} : (u.sorter && (u.sortIcon = ({ sortOrder: m }) => o(E, { sortOrder: m })), u));
|
|
66
|
+
return s && (k && e.unshift(w.SELECTION_COLUMN), e.unshift({
|
|
67
|
+
key: "drag-handle",
|
|
68
|
+
align: "center",
|
|
69
|
+
render: () => c ?? o(N, {})
|
|
70
|
+
})), e;
|
|
71
|
+
}, [f, k, s, c]), R = (e, u, m, d) => {
|
|
72
|
+
v == null || v(e, m, d);
|
|
73
|
+
}, D = ({ record: e, expanded: u, onExpand: m }) => {
|
|
74
|
+
var d;
|
|
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(p, { icon: u ? G : $ }) });
|
|
77
|
+
}, L = (e, u, m) => {
|
|
78
|
+
var d;
|
|
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
|
+
};
|
|
81
|
+
return o(w, {
|
|
82
|
+
className: A,
|
|
83
|
+
style: {
|
|
84
|
+
"--kit-table-cells-background-color": t,
|
|
85
|
+
"--kit-table-background": r,
|
|
86
|
+
...l
|
|
87
|
+
},
|
|
88
|
+
columns: K,
|
|
89
|
+
components: q(b),
|
|
90
|
+
onChange: R,
|
|
91
|
+
// Pour l'instant on garde expandable dans les props à Omit<>
|
|
92
|
+
// A voir si on permet de custom uniquement certaines propriété
|
|
93
|
+
expandable: {
|
|
94
|
+
expandedRowClassName: L,
|
|
95
|
+
expandIcon: D,
|
|
96
|
+
indentSize: T.spacing.m
|
|
97
|
+
},
|
|
98
|
+
...n,
|
|
99
|
+
rowSelection: k
|
|
100
|
+
});
|
|
101
|
+
}, S = J;
|
|
102
|
+
S.displayName = "KitTable";
|
|
103
|
+
S.DragHandle = N;
|
|
2
104
|
export {
|
|
3
|
-
|
|
105
|
+
S as KitTable
|
|
4
106
|
};
|
|
@@ -42,7 +42,8 @@ type AntdTableTypesToOmit =
|
|
|
42
42
|
| 'summary'
|
|
43
43
|
| 'responsive'
|
|
44
44
|
| 'getPopupContainer'
|
|
45
|
-
| 'columns'
|
|
45
|
+
| 'columns'
|
|
46
|
+
| 'rowHoverable';
|
|
46
47
|
|
|
47
48
|
export type onChangePagination = Parameters<TableProps<RecordType>['onChange']>[0];
|
|
48
49
|
export type onChangeSorter = Parameters<TableProps<RecordType>['onChange']>[2];
|
|
@@ -1,19 +1,43 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import "../../General/
|
|
7
|
-
import "../../General/
|
|
8
|
-
import "
|
|
9
|
-
import "../Badge/index.js";
|
|
1
|
+
import "../../../assets/index5.css";
|
|
2
|
+
import { jsxs as c, Fragment as j, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useState as B } from "react";
|
|
4
|
+
import { u as D } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
+
import h from "classnames";
|
|
6
|
+
import { KitButton as F } from "../../General/Button/index.js";
|
|
7
|
+
import { KitTypography as z } from "../../General/Typography/index.js";
|
|
8
|
+
import "../Avatar/index.js";
|
|
9
|
+
import { KitBadge as C } from "../Badge/index.js";
|
|
10
|
+
import "../ItemCard/index.js";
|
|
11
|
+
import "../Collapse/index.js";
|
|
10
12
|
import "../Empty/index.js";
|
|
11
|
-
import "
|
|
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";
|
|
12
19
|
import "../Tree/index.js";
|
|
13
20
|
import "../Tooltip/index.js";
|
|
14
21
|
import "antd";
|
|
15
|
-
import "
|
|
16
|
-
import "@fortawesome/
|
|
22
|
+
import "../RedirectCard/index.js";
|
|
23
|
+
import { FontAwesomeIcon as E } from "@fortawesome/react-fontawesome";
|
|
24
|
+
import { faPlus as O } from "@fortawesome/free-solid-svg-icons";
|
|
25
|
+
const P = {
|
|
26
|
+
"kit-tabs": "_kit-tabs_1i9lf_2"
|
|
27
|
+
}, U = ({ addTab: v, centered: w, className: x, activeKey: e, defaultKey: n, items: o, onChange: i, fullwidthTab: u, size: b = "small", variant: l = "classic" }) => {
|
|
28
|
+
var a, p;
|
|
29
|
+
const { appId: y } = D(), [_, f] = B(n ?? ((a = o[0]) === null || a === void 0 ? void 0 : a.key)), k = e ?? _, N = (p = o.find((t) => t.key === k)) === null || p === void 0 ? void 0 : p.tabContent, T = h(y, x, P["kit-tabs"], w ? "centered" : "", b === "small" ? "small" : "medium", l, u ? "fullwidth" : "", N && l === "pill" ? "tabs-bottom-spacing" : ""), A = (t) => {
|
|
30
|
+
f(t), i == null || i(t);
|
|
31
|
+
}, I = (t, s) => {
|
|
32
|
+
t.code === "Enter" && (f(s), i == null || i(s));
|
|
33
|
+
};
|
|
34
|
+
return c(j, { children: [c("div", { className: T, role: "tablist", children: [o == null ? void 0 : o.map(({ icon: t, label: s, badgeCount: K, key: m, disabled: d }) => c("div", { className: h("kit-tab", l, {
|
|
35
|
+
disabled: d,
|
|
36
|
+
active: k === m,
|
|
37
|
+
fullwidth: u
|
|
38
|
+
}), role: "tab", tabIndex: 0, onClick: d ? void 0 : () => A(m), onKeyDown: d ? void 0 : (S) => I(S, m), children: [t && r("div", { className: "kit-tab-icon", children: t }), c("div", { className: "kit-tab-label-wrapper", children: [r(z.Text, { className: "kit-tab-label", size: b === "medium" ? "fontSize4" : void 0, children: s }), !!K && r(C, { className: "kit-tab-count", count: K })] })] }, m)), v && l === "classic" && r(F, { disableSecureClick: !0, type: "tertiary", icon: r(E, { icon: O }), onClick: v })] }), N] });
|
|
39
|
+
};
|
|
40
|
+
U.displayName = "KitTabs";
|
|
17
41
|
export {
|
|
18
|
-
|
|
42
|
+
U as KitTabs
|
|
19
43
|
};
|
|
@@ -1,4 +1,76 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../assets/index38.css";
|
|
2
|
+
import { jsx as i, Fragment as C, jsxs as x } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as D, useState as W, useRef as N, useLayoutEffect as E } from "react";
|
|
4
|
+
import O from "classnames";
|
|
5
|
+
import { Tag as F } from "antd";
|
|
6
|
+
import { u as z } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
|
+
import { FontAwesomeIcon as L } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import { faXmark as M } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
+
import { KitIdCard as R } from "../IdCard/index.js";
|
|
10
|
+
import { KitModal as V } from "../../Feedback/Modal/index.js";
|
|
11
|
+
import { KitTooltip as H } from "../Tooltip/index.js";
|
|
12
|
+
import { u as P } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
13
|
+
const I = {
|
|
14
|
+
"kit-tag": "_kit-tag_6ocqb_2",
|
|
15
|
+
"kit-tag-group": "_kit-tag-group_6ocqb_111",
|
|
16
|
+
"kit-tag-group-measure": "_kit-tag-group-measure_6ocqb_117",
|
|
17
|
+
"kit-tag-group-container": "_kit-tag-group-container_6ocqb_124"
|
|
18
|
+
}, b = D(({ className: t, closeIcon: s, type: u = "neutral", disabled: e, onClick: c, idCardProps: r, ...d }, a) => {
|
|
19
|
+
const { appId: p } = z(), h = O(p, I["kit-tag"], t, {
|
|
20
|
+
[`kit-tag-${u}`]: u,
|
|
21
|
+
"kit-tag-disabled": e,
|
|
22
|
+
"kit-tag-clickable": c
|
|
23
|
+
});
|
|
24
|
+
return i(F, { tabIndex: e ? -1 : 0, ref: a, ...d, className: h, closeIcon: s ?? i(L, { icon: M }), onClick: c, closable: !!d.onClose, children: i(R, { disabled: e, avatarProps: r != null && r.avatarProps ? { ...r == null ? void 0 : r.avatarProps, size: "small" } : void 0, description: r == null ? void 0 : r.description }) });
|
|
25
|
+
}), X = ({ tags: t, containerRef: s, measureRef: u, handleCloseTag: e }) => {
|
|
26
|
+
var c;
|
|
27
|
+
const [r, d] = W([]), [a, p] = W(0), [h, $] = W(i(C, {})), v = N(null), { locale: _ } = P();
|
|
28
|
+
return E(() => {
|
|
29
|
+
const T = () => {
|
|
30
|
+
var k, y, o;
|
|
31
|
+
const n = s.current, f = u.current;
|
|
32
|
+
if (!n || !f)
|
|
33
|
+
return;
|
|
34
|
+
$(x(C, { children: [t.map((l, g) => i(b, { type: l == null ? void 0 : l.type, disabled: l == null ? void 0 : l.disabled, idCardProps: l.idCardProps, onClose: () => {
|
|
35
|
+
e == null || e(g);
|
|
36
|
+
} }, g)), i(b, { idCardProps: { description: `+${a} ${(k = _.General) === null || k === void 0 ? void 0 : k.others}` } })] }));
|
|
37
|
+
const j = n == null ? void 0 : n.clientWidth, w = Array.from(f.children), A = (y = w[w.length - 1]) === null || y === void 0 ? void 0 : y.clientWidth;
|
|
38
|
+
let q = 0, G = 0;
|
|
39
|
+
for (let l = 0; l < w.length - 1; l++) {
|
|
40
|
+
const g = ((o = w[l]) === null || o === void 0 ? void 0 : o.clientWidth) + 8;
|
|
41
|
+
if (q + g + 8 + (l < t.length - 1 ? A : 0) <= j)
|
|
42
|
+
q += g, G++;
|
|
43
|
+
else
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
G < t.length ? (d(t.slice(0, G)), p(t.length - G)) : (d(t), p(0));
|
|
47
|
+
};
|
|
48
|
+
let m;
|
|
49
|
+
const K = () => {
|
|
50
|
+
clearTimeout(m), m = setTimeout(T, 100);
|
|
51
|
+
};
|
|
52
|
+
return T(), v.current = new ResizeObserver(K), s.current && v.current.observe(s.current), () => {
|
|
53
|
+
v.current && v.current.disconnect(), clearTimeout(m);
|
|
54
|
+
};
|
|
55
|
+
}, [s, e, a, (c = _.General) === null || c === void 0 ? void 0 : c.others, u, t]), {
|
|
56
|
+
measureTags: h,
|
|
57
|
+
visibleTags: r,
|
|
58
|
+
hiddenCount: a
|
|
59
|
+
};
|
|
60
|
+
}, B = ({ tags: t, style: s, className: u, handleCloseTag: e, othersTagType: c = "neutral", othersTagDisabled: r }) => {
|
|
61
|
+
var d;
|
|
62
|
+
const a = N(null), p = N(null), { locale: h } = P(), { appId: $ } = z(), [v, _] = W(!1), { measureTags: T, visibleTags: m, hiddenCount: K } = X({ tags: t, containerRef: a, measureRef: p, handleCloseTag: e }), k = () => t.slice(m.length).map((o, n) => {
|
|
63
|
+
var f;
|
|
64
|
+
return i("div", { children: (f = o.idCardProps) === null || f === void 0 ? void 0 : f.description }, n);
|
|
65
|
+
}), y = O($, I["kit-tag-group"], u);
|
|
66
|
+
return x("div", { className: I["kit-tag-group-container"], children: [x("div", { ref: a, style: s, className: y, children: [m.map((o, n) => i(b, { type: o == null ? void 0 : o.type, disabled: o == null ? void 0 : o.disabled, idCardProps: o.idCardProps, onClose: () => {
|
|
67
|
+
e == null || e(n);
|
|
68
|
+
} }, n)), K > 0 && i(H, { overlay: k(), children: i(b, { type: c, disabled: r, idCardProps: { description: `+${K} ${(d = h.General) === null || d === void 0 ? void 0 : d.others}` }, onClick: () => _(!0) }) }), i(V, { isOpen: v, close: () => _(!1), showCloseIcon: !0, title: "Tags", appElement: document.body, children: i("div", { style: { display: "flex", flexWrap: "wrap", rowGap: "8px" }, children: t.map((o, n) => i(b, { id: `tag-${n}`, type: o == null ? void 0 : o.type, disabled: o == null ? void 0 : o.disabled, idCardProps: o.idCardProps, onClose: () => {
|
|
69
|
+
e == null || e(n);
|
|
70
|
+
} }, n)) }) })] }), i("div", { ref: p, className: I["kit-tag-group-measure"], "aria-hidden": "true", children: T })] });
|
|
71
|
+
}, J = B, S = b;
|
|
72
|
+
S.displayName = "KitTag";
|
|
73
|
+
S.Group = J;
|
|
2
74
|
export {
|
|
3
|
-
|
|
75
|
+
S as KitTag
|
|
4
76
|
};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { IKitTagConfig
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { IKitTagConfig } from './types';
|
|
3
|
+
type TagGroupProps = {
|
|
4
|
+
tags: IKitTagConfig[];
|
|
5
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
6
|
+
measureRef: RefObject<HTMLDivElement>;
|
|
7
|
+
handleCloseTag?: (index: number) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const useTagGroup: ({ tags, containerRef, measureRef, handleCloseTag }: TagGroupProps) => {
|
|
10
|
+
measureTags: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
visibleTags: IKitTagConfig[];
|
|
12
|
+
hiddenCount: number;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import "../../../assets/
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Tree as
|
|
4
|
-
import { u as
|
|
1
|
+
import "../../../assets/index6.css";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Tree as n } from "antd";
|
|
4
|
+
import { u as a } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
5
|
import s from "classnames";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { faCircleNotch as d } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
const c = {
|
|
9
|
+
"kit-tree": "_kit-tree_8rr59_2"
|
|
10
|
+
}, l = ({ className: e, switcherLoadingIcon: o, ...t }) => {
|
|
11
|
+
const { appId: i } = a(), m = s(i, c["kit-tree"], e);
|
|
12
|
+
return r(n, { ...t, switcherLoadingIcon: o ?? r(p, { icon: d, spin: !0 }), className: m, blockNode: !0, draggable: !1, onDragEnd: void 0, onDragEnter: void 0, onDragLeave: void 0, onDragOver: void 0, onDragStart: void 0, onDrop: void 0 });
|
|
11
13
|
};
|
|
12
|
-
|
|
14
|
+
l.displayName = "KitTree";
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
l as KitTree
|
|
15
17
|
};
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { KitBadge as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { KitAvatar as o } from "./Avatar/index.js";
|
|
2
|
+
import { KitBadge as m } from "./Badge/index.js";
|
|
3
|
+
import { KitItemCard as p } from "./ItemCard/index.js";
|
|
4
|
+
import { KitCollapse as x } from "./Collapse/index.js";
|
|
5
|
+
import { KitEmpty as a } from "./Empty/index.js";
|
|
6
|
+
import { KitError as T } from "./Error/index.js";
|
|
7
|
+
import { KitIdCard as C } from "./IdCard/index.js";
|
|
8
|
+
import { KitImage as g } from "./Image/index.js";
|
|
9
|
+
import { KitItemList as b } from "./ItemList/index.js";
|
|
10
|
+
import { KitTable as c } from "./Table/index.js";
|
|
11
|
+
import { KitTag as v } from "./Tag/index.js";
|
|
12
|
+
import { KitTabs as A } from "./Tabs/index.js";
|
|
13
|
+
import { KitTree as L } from "./Tree/index.js";
|
|
14
|
+
import { KitTooltip as h } from "./Tooltip/index.js";
|
|
15
|
+
import { KitTour as k } from "./Tour/index.js";
|
|
16
|
+
import { KitRedirectCard as q } from "./RedirectCard/index.js";
|
|
9
17
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
o as KitAvatar,
|
|
19
|
+
m as KitBadge,
|
|
20
|
+
x as KitCollapse,
|
|
21
|
+
a as KitEmpty,
|
|
22
|
+
T as KitError,
|
|
23
|
+
C as KitIdCard,
|
|
24
|
+
g as KitImage,
|
|
17
25
|
p as KitItemCard,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
b as KitItemList,
|
|
27
|
+
q as KitRedirectCard,
|
|
28
|
+
c as KitTable,
|
|
29
|
+
A as KitTabs,
|
|
30
|
+
v as KitTag,
|
|
31
|
+
h as KitTooltip,
|
|
32
|
+
k as KitTour,
|
|
33
|
+
L as KitTree
|
|
26
34
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {ReactNode} from 'react';
|
|
2
2
|
|
|
3
3
|
export interface IKitActionButton {
|
|
4
|
-
key: string;
|
|
4
|
+
key: string | number;
|
|
5
5
|
label: string;
|
|
6
|
-
icon: ReactNode;
|
|
7
6
|
onClick: (e: unknown) => void;
|
|
7
|
+
icon?: ReactNode;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
title?: string;
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|