aristid-ds 15.1.0 → 15.2.0-efdeb96
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 +20 -0
- package/README.md +14 -0
- package/dist/Kit/App/index.js +46 -52
- package/dist/Kit/DataDisplay/Avatar/index.js +2 -2
- package/dist/Kit/DataDisplay/Badge/index.js +1 -1
- package/dist/Kit/DataDisplay/Collapse/index.js +2 -2
- package/dist/Kit/DataDisplay/Comment/index.js +1 -1
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +2 -2
- package/dist/Kit/DataDisplay/IdCard/index.js +25 -24
- package/dist/Kit/DataDisplay/Image/index.js +2 -2
- package/dist/Kit/DataDisplay/ItemCard/index.js +2 -2
- package/dist/Kit/DataDisplay/ItemList/index.js +2 -2
- package/dist/Kit/DataDisplay/RedirectCard/index.js +2 -2
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +64 -61
- package/dist/Kit/DataDisplay/Tag/index.js +2 -2
- package/dist/Kit/DataDisplay/Tour/index.js +1 -1
- package/dist/Kit/DataDisplay/Tree/index.js +2 -2
- 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 +3 -3
- package/dist/Kit/DataEntry/DatePicker/index.js +2 -2
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Input/index.js +2 -2
- package/dist/Kit/DataEntry/InputNumber/index.js +2 -2
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/index.js +2 -2
- package/dist/Kit/DataEntry/Rate/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontStylesButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/IndentListButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ListButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/TextAlignButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/UndoRedoButtons/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +2 -2
- package/dist/Kit/DataEntry/RichText/index.js +2 -2
- package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
- package/dist/Kit/DataEntry/Select/index.js +2 -2
- package/dist/Kit/DataEntry/Slider/index.js +1 -1
- package/dist/Kit/DataEntry/Switch/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/index.js +2 -2
- package/dist/Kit/DataEntry/Upload/index.js +2 -2
- package/dist/Kit/Feedback/Alert/index.js +2 -2
- package/dist/Kit/Feedback/Loader/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +2 -2
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/Progress/index.js +7 -7
- package/dist/Kit/Feedback/SnackBar/index.js +1 -1
- package/dist/Kit/General/Button/index.js +2 -2
- package/dist/Kit/General/DynamicActions/index.js +1 -1
- package/dist/Kit/General/Icon/index.js +1 -1
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/Layout/Divider/index.js +1 -1
- package/dist/Kit/Layout/Space/index.js +1 -1
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/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 +1 -1
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/index.js +2 -2
- package/dist/assets/index30.css +1 -1
- package/dist/chunks/{Avatar.B2Q0k3WU.js → Avatar.D0il2_w4.js} +1 -1
- package/dist/chunks/{InputWrapper.D7QArlvo.js → InputWrapper.C8J9OC0v.js} +1 -1
- package/dist/chunks/Thread.D5B5-g9M.js +25 -0
- package/dist/chunks/index.CKC2Gl0d.js +23 -0
- package/dist/chunks/{useKitLocale.C5F-tmnC.js → useKitLocale.DD7mnAZn.js} +3 -3
- package/dist/chunks/{useKitTheme.BdeSOGoj.js → useKitTheme.C7yw6CDw.js} +3 -3
- package/dist/index.es.js +4 -4
- package/dist/index.umd.js +5 -5
- package/dist/translation/pt-PT/components/DataDisplay/Collapse/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataDisplay/Collapse/index.js +7 -0
- package/dist/translation/pt-PT/components/DataDisplay/Empty/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataDisplay/Empty/index.js +6 -0
- package/dist/translation/pt-PT/components/DataDisplay/Error/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataDisplay/Error/index.js +6 -0
- package/dist/translation/pt-PT/components/DataDisplay/Image/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataDisplay/Image/index.js +6 -0
- package/dist/translation/pt-PT/components/DataDisplay/ItemList/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataDisplay/ItemList/index.js +8 -0
- package/dist/translation/pt-PT/components/DataDisplay/Tabs/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataDisplay/Tabs/index.js +6 -0
- package/dist/translation/pt-PT/components/DataEntry/ColorPicker/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataEntry/ColorPicker/index.js +6 -0
- package/dist/translation/pt-PT/components/DataEntry/RichText/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataEntry/RichText/index.js +31 -0
- package/dist/translation/pt-PT/components/DataEntry/Upload/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/DataEntry/Upload/index.js +11 -0
- package/dist/translation/pt-PT/components/Feedback/Alert/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/Feedback/Alert/index.js +6 -0
- package/dist/translation/pt-PT/components/General/Button/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/General/Button/index.js +7 -0
- package/dist/translation/pt-PT/general/index.d.ts +2 -0
- package/dist/translation/pt-PT/general/index.js +13 -0
- package/dist/translation/pt-PT/index.d.ts +2 -0
- package/dist/translation/pt-PT/index.js +28 -0
- package/dist/translation/types/index.d.ts +1 -1
- package/dist/translation/utils/index.js +2 -13
- package/dist/translation/utils/localesByLang.d.ts +11 -0
- package/package.json +154 -154
- package/dist/chunks/Thread.DHhk0Z5U.js +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [X.Y.Z](https://www.npmjs.com/package/aristid-ds/v/X.Y.Z) (2026-MM-DD)
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **IdCard:**
|
|
8
|
+
- Fix avatar color from `avatarProps` being overwritten when `color` prop is not set on IdCard (@philippechevieux)
|
|
9
|
+
|
|
10
|
+
## [15.2.0](https://www.npmjs.com/package/aristid-ds/v/15.2.0) (2026-0226)
|
|
11
|
+
|
|
12
|
+
### ✨ Features
|
|
13
|
+
|
|
14
|
+
- **Locales:**
|
|
15
|
+
- Add `portuguese` locale (@evoiron)
|
|
16
|
+
- Update locale context to simplify the process of adding a locale (@evoiron)
|
|
17
|
+
|
|
18
|
+
### 🐛 Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **Tabs:**
|
|
21
|
+
- Fix alignment issue causing Pill Tabs not to be centered within their parent element (@YanDevDz)
|
|
22
|
+
|
|
3
23
|
## [15.1.0](https://www.npmjs.com/package/aristid-ds/v/15.1.0) (2026-02-24)
|
|
4
24
|
|
|
5
25
|
### ✨ Features
|
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ ARiSTiD Design System Readme.
|
|
|
22
22
|
- [Component code](#component-code)
|
|
23
23
|
- [Component theming](#component-theming)
|
|
24
24
|
- [Component documentation](#component-documentation)
|
|
25
|
+
- [Adding a locale](#add-a-locale)
|
|
25
26
|
- [Nightly build](#nightly-build)
|
|
26
27
|
- [Important](#important)
|
|
27
28
|
- [Contributing](#contributing)
|
|
@@ -456,6 +457,19 @@ Every components **style** of the design system can be **override** by tokens.
|
|
|
456
457
|
|
|
457
458
|
After the script run, section `Design Tokens` documentation is up to date with all design tokens.
|
|
458
459
|
|
|
460
|
+
#### Add a new locale
|
|
461
|
+
|
|
462
|
+
1. **create a new directory for the new locale in `src/translation`**
|
|
463
|
+
|
|
464
|
+
You can duplicate src/translations/enUS and name it according to the locale code you're adding (ptPT for ortuguese, enUS for english, etc.). Then update your tranlsations in each fileinside his new directory.
|
|
465
|
+
|
|
466
|
+
2. **Add the locale code to the list of known languages**
|
|
467
|
+
|
|
468
|
+
- Edit the file `src/translation/utils/localesByLang.ts`, and your locale datas. import the translations from `antd` and the translations from the directory you created in previous step. Then Update `localesByLang` and `antdLocalesByLang` objects . Be careful of the naming, it must match the locale. Refer to the existing locales in this file.
|
|
469
|
+
- Edit `src/translation/types/index.d.ts`, and add your locale code to `LanguageSupported``
|
|
470
|
+
|
|
471
|
+
That's it. The locale is now available. It is also available in th locale selector in storybook.
|
|
472
|
+
|
|
459
473
|
## Nightly build
|
|
460
474
|
|
|
461
475
|
A nightly version of the package is published on daily basis on branch develop (assuming new commits have been pushed on develop branch). To use it just install the more recent next version :
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,66 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ConfigProvider as
|
|
4
|
-
import { K as
|
|
5
|
-
import { toCssVariables as
|
|
6
|
-
import
|
|
7
|
-
import { Style as
|
|
8
|
-
import { K as
|
|
9
|
-
import { KitAristidThemeGeneral as
|
|
10
|
-
import { antdThemeConfig as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
import '../../assets/index28.css';const A = "aristid-ds-global", F = (t, e) => {
|
|
17
|
-
const o = g(t);
|
|
1
|
+
import { jsx as a, jsxs as g, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as K, useLayoutEffect as S, useRef as b, useEffect as y } from "react";
|
|
3
|
+
import { ConfigProvider as C } from "antd";
|
|
4
|
+
import { K as P } from "../../chunks/SnackBarProvider.D44OffUd.js";
|
|
5
|
+
import { toCssVariables as L, uuid as T } from "../../utils/functions/index.js";
|
|
6
|
+
import p from "lodash/merge";
|
|
7
|
+
import { Style as u } from "react-style-tag";
|
|
8
|
+
import { K as $ } from "../../chunks/useKitTheme.C7yw6CDw.js";
|
|
9
|
+
import { KitAristidThemeGeneral as c } from "../../theme/aristid/general/index.js";
|
|
10
|
+
import { antdThemeConfig as j } from "../../theme/utils/tokens-mapper/index.js";
|
|
11
|
+
import { K as k, u as E } from "../../chunks/useKitLocale.DD7mnAZn.js";
|
|
12
|
+
import { l as m, f, m as x } from "../../chunks/index.CKC2Gl0d.js";
|
|
13
|
+
import { KitEmpty as v } from "../DataDisplay/Empty/index.js";
|
|
14
|
+
import '../../assets/index28.css';const A = "aristid-ds-global", I = (o, e) => {
|
|
15
|
+
const r = L(o);
|
|
18
16
|
return `
|
|
19
17
|
.${e} {
|
|
20
|
-
${Object.keys(
|
|
18
|
+
${Object.keys(r).map((t) => `${t}: ${r[t]}`).join(";")}
|
|
21
19
|
}
|
|
22
20
|
`;
|
|
23
|
-
},
|
|
24
|
-
const [
|
|
25
|
-
return
|
|
26
|
-
const
|
|
27
|
-
i(
|
|
28
|
-
}, []),
|
|
21
|
+
}, _ = ({ children: o, customTheme: e, id: r }) => {
|
|
22
|
+
const [t, i] = K(null), { theme: n, appId: s, spacing: d } = B(r, e);
|
|
23
|
+
return S(() => {
|
|
24
|
+
const l = L(c, "--general");
|
|
25
|
+
i(l);
|
|
26
|
+
}, []), a($.Provider, { value: { theme: n, appId: s, spacing: d }, children: t !== null && g(h, { children: [a(u, { id: A, hasSourceMap: !1, children: `
|
|
29
27
|
:root {
|
|
30
|
-
${Object.keys(
|
|
28
|
+
${Object.keys(t).map((l) => `${l}: ${t[l]}`).join(";")}
|
|
31
29
|
}
|
|
32
|
-
` }), e &&
|
|
33
|
-
},
|
|
34
|
-
var
|
|
35
|
-
const
|
|
30
|
+
` }), e && a(u, { hasSourceMap: !1, children: I(p({ general: { utilities: c.utilities } }, e), s) }), o] }) });
|
|
31
|
+
}, B = (o, e) => {
|
|
32
|
+
var r;
|
|
33
|
+
const t = b(o || "ds-" + T().substring(0, 8)), i = p(c.spacing, (r = e?.general) === null || r === void 0 ? void 0 : r.spacing);
|
|
36
34
|
return {
|
|
37
|
-
theme:
|
|
38
|
-
appId:
|
|
35
|
+
theme: c,
|
|
36
|
+
appId: t.current,
|
|
39
37
|
spacing: i
|
|
40
38
|
};
|
|
41
|
-
},
|
|
42
|
-
const e =
|
|
43
|
-
return
|
|
44
|
-
},
|
|
45
|
-
const [
|
|
46
|
-
return { locale:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} else {
|
|
51
|
-
const i = a($, r);
|
|
52
|
-
e(i);
|
|
53
|
-
}
|
|
39
|
+
}, D = ({ children: o }) => {
|
|
40
|
+
const e = F();
|
|
41
|
+
return a(k.Provider, { value: e, children: o });
|
|
42
|
+
}, F = () => {
|
|
43
|
+
const [o, e] = K(m.frFR);
|
|
44
|
+
return { locale: o, setKitLocale: (t) => {
|
|
45
|
+
var i, n;
|
|
46
|
+
const s = (n = m[(i = t.locale) !== null && i !== void 0 ? i : f]) !== null && n !== void 0 ? n : m[f], d = p(s, t);
|
|
47
|
+
e(d);
|
|
54
48
|
} };
|
|
55
|
-
},
|
|
56
|
-
const { locale:
|
|
57
|
-
return
|
|
58
|
-
e !== void 0 &&
|
|
59
|
-
}, [e,
|
|
49
|
+
}, X = ({ children: o, locale: e, customTheme: r, id: t }) => a(_, { customTheme: r, id: t, children: a(D, { children: a(M, { locale: e, children: o }) }) }), M = ({ children: o, locale: e }) => {
|
|
50
|
+
const { locale: r, setKitLocale: t } = E();
|
|
51
|
+
return y(() => {
|
|
52
|
+
e !== void 0 && t(e);
|
|
53
|
+
}, [e, t]), g(C, { theme: j, locale: x(e), renderEmpty: () => {
|
|
60
54
|
var i;
|
|
61
|
-
return
|
|
62
|
-
}, children: [
|
|
55
|
+
return a(v, { className: "default-render", image: v.ASSET_LIST, description: (i = r.Empty) === null || i === void 0 ? void 0 : i.noData });
|
|
56
|
+
}, children: [a(P, {}), o] });
|
|
63
57
|
};
|
|
64
58
|
export {
|
|
65
|
-
|
|
59
|
+
X as KitApp
|
|
66
60
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as t, K as u } from "../../../chunks/Avatar.
|
|
1
|
+
import { s as t, K as u } from "../../../chunks/Avatar.D0il2_w4.js";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { Avatar as d } from "antd";
|
|
4
|
-
import { u as c } from "../../../chunks/useKitTheme.
|
|
4
|
+
import { u as c } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
5
5
|
import K from "classnames";
|
|
6
6
|
const f = ({ className: a, disabled: s, max: o, ...v }) => {
|
|
7
7
|
var r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p, useMemo as d } from "react";
|
|
3
3
|
import { Badge as u } from "antd";
|
|
4
|
-
import { u as n } from "../../../chunks/useKitTheme.
|
|
4
|
+
import { u as n } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
5
5
|
import { isValidColor as c, getLighterColor as k, getColor as b } from "../../../utils/functions/index.js";
|
|
6
6
|
import { kitBadgeCssTokens as s } from "../../../theme/aristid/components/DataDisplay/Badge/index.js";
|
|
7
7
|
import B from "classnames";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { cloneElement as C, useState as y } from "react";
|
|
3
3
|
import { Collapse as E } from "antd";
|
|
4
|
-
import { u as H } from "../../../chunks/useKitTheme.
|
|
4
|
+
import { u as H } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
5
5
|
import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { faChevronDown as _, faEye as T, faEllipsisVertical as A } from "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import D from "classnames";
|
|
@@ -12,7 +12,7 @@ import { KitSwitch as S } from "../../DataEntry/Switch/index.js";
|
|
|
12
12
|
import { KitTooltip as h } from "../Tooltip/index.js";
|
|
13
13
|
import { KitButton as v } from "../../General/Button/index.js";
|
|
14
14
|
import { KitDropDown as b } from "../../Navigation/DropDown/index.js";
|
|
15
|
-
import { u as z } from "../../../chunks/useKitLocale.
|
|
15
|
+
import { u as z } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
16
16
|
import '../../../assets/index37.css';const u = {
|
|
17
17
|
"kit-collapse": "_kit-collapse_djtan_2",
|
|
18
18
|
"kit-collapse-header": "_kit-collapse-header_djtan_78",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Empty as p } from "antd";
|
|
3
|
-
import { u as m } from "../../../chunks/useKitTheme.
|
|
3
|
+
import { u as m } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
4
4
|
import { KitTypography as C } from "../../General/Typography/index.js";
|
|
5
5
|
import { KitSpace as u } from "../../Layout/Space/index.js";
|
|
6
6
|
import x from "classnames";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as t, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as v } from "react";
|
|
3
3
|
import { Empty as d } from "antd";
|
|
4
|
-
import { u as w } from "../../../chunks/useKitLocale.
|
|
5
|
-
import { u as p } from "../../../chunks/useKitTheme.
|
|
4
|
+
import { u as w } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
5
|
+
import { u as p } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
6
6
|
import { KitTypography as M } from "../../General/Typography/index.js";
|
|
7
7
|
import { KitSpace as g } from "../../Layout/Space/index.js";
|
|
8
8
|
import f from "classnames";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
import { u as
|
|
5
|
-
import { K as
|
|
6
|
-
import { KitTooltip as
|
|
7
|
-
import { T as
|
|
8
|
-
import '../../../assets/index2.css';const
|
|
1
|
+
import { jsxs as h, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import { t as z } from "../../../chunks/styles.module.BiErj37W.js";
|
|
4
|
+
import { u as N } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
5
|
+
import { K as _ } from "../../../chunks/Avatar.D0il2_w4.js";
|
|
6
|
+
import { KitTooltip as u } from "../Tooltip/index.js";
|
|
7
|
+
import { T as g } from "../../../chunks/constants.CctH0M4n.js";
|
|
8
|
+
import '../../../assets/index2.css';const E = {
|
|
9
9
|
"kit-id-card": "_kit-id-card_1m63u_2"
|
|
10
|
-
},
|
|
11
|
-
|
|
10
|
+
}, f = [
|
|
11
|
+
z["kit-typography-text"],
|
|
12
12
|
"ant-typography",
|
|
13
13
|
"ant-typography-text",
|
|
14
14
|
"ant-typography-ellipsis",
|
|
15
15
|
"ant-typography-ellipsis-single-line"
|
|
16
|
-
],
|
|
16
|
+
], K = (t) => {
|
|
17
17
|
switch (t) {
|
|
18
18
|
case "xl":
|
|
19
19
|
return "kit-typography-fontSize5";
|
|
@@ -22,7 +22,7 @@ import '../../../assets/index2.css';const _ = {
|
|
|
22
22
|
default:
|
|
23
23
|
return "kit-typography-fontSize7";
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, C = (t) => {
|
|
26
26
|
switch (t) {
|
|
27
27
|
case "xl":
|
|
28
28
|
return "kit-typography-fontSize1";
|
|
@@ -37,7 +37,7 @@ import '../../../assets/index2.css';const _ = {
|
|
|
37
37
|
case "xxs-medium":
|
|
38
38
|
return "kit-typography-fontSize5";
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, I = (t) => {
|
|
41
41
|
switch (t) {
|
|
42
42
|
case "xl":
|
|
43
43
|
case "l":
|
|
@@ -50,22 +50,23 @@ import '../../../assets/index2.css';const _ = {
|
|
|
50
50
|
default:
|
|
51
51
|
return "m";
|
|
52
52
|
}
|
|
53
|
-
},
|
|
54
|
-
const
|
|
53
|
+
}, A = (t, e, r, s) => {
|
|
54
|
+
const o = p("kit-id-card-title", ...f, C(e), {
|
|
55
55
|
"ant-typography-bold": e !== "xs-medium",
|
|
56
56
|
"ant-typography-disabled": r
|
|
57
57
|
});
|
|
58
|
-
return
|
|
59
|
-
},
|
|
60
|
-
const
|
|
58
|
+
return i("span", { className: o, children: i(u, { title: s ? "" : t, mouseEnterDelay: g, children: i("span", { children: t }) }) });
|
|
59
|
+
}, b = (t, e, r, s) => {
|
|
60
|
+
const o = p("kit-id-card-description", ...f, "ant-typography-regular", K(e), {
|
|
61
61
|
"ant-typography-disabled": r
|
|
62
62
|
});
|
|
63
|
-
return
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
return i("span", { className: o, children: i(u, { title: s ? "" : t, mouseEnterDelay: g, children: i("span", { children: t }) }) });
|
|
64
|
+
}, w = ({ className: t, title: e, description: r, avatarProps: s, avatar: o, color: a, size: n = "xs-bold", disabled: l = !1, disableTooltip: d = !1, ...x }) => {
|
|
65
|
+
var c;
|
|
66
|
+
const { appId: k } = N(), S = p(k, E["kit-id-card"], t), v = s !== void 0 || o !== void 0, y = e !== void 0, D = a !== void 0, m = r !== void 0, T = y || m;
|
|
67
|
+
return h("div", { className: `${S} id-card-grid`, ...x, children: [D && i("div", { className: "card-color", style: { backgroundColor: a } }), v && i("div", { className: "card-avatar", children: o ?? i(_, { size: I(n), ...s, color: (c = s?.color) !== null && c !== void 0 ? c : a, disabled: l }) }), T && h("div", { className: "card-info", children: [y && typeof e == "string" ? A(e, n, l, d) : e, m && typeof r == "string" ? b(r, n, l, d) : r] })] });
|
|
67
68
|
};
|
|
68
|
-
|
|
69
|
+
w.displayName = "KitIdCard";
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
w as KitIdCard
|
|
71
72
|
};
|
|
@@ -3,8 +3,8 @@ import { Image as a } from "antd";
|
|
|
3
3
|
import d from "classnames";
|
|
4
4
|
import { FontAwesomeIcon as v } from "@fortawesome/react-fontawesome";
|
|
5
5
|
import { faEye as I } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
-
import { u as _ } from "../../../chunks/useKitLocale.
|
|
7
|
-
import { u as j } from "../../../chunks/useKitTheme.
|
|
6
|
+
import { u as _ } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
7
|
+
import { u as j } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
8
8
|
import '../../../assets/index3.css';const m = {
|
|
9
9
|
"kit-image": "_kit-image_t5juo_2",
|
|
10
10
|
"mask-container": "_mask-container_t5juo_23"
|
|
@@ -5,14 +5,14 @@ import { KitTypography as w } from "../../General/Typography/index.js";
|
|
|
5
5
|
import { KitCheckbox as Z } from "../../DataEntry/Checkbox/index.js";
|
|
6
6
|
import { KitSwitch as G } from "../../DataEntry/Switch/index.js";
|
|
7
7
|
import { KitBreadcrumb as ii } from "../../Navigation/Breadcrumb/index.js";
|
|
8
|
-
import { u as ti } from "../../../chunks/useKitTheme.
|
|
8
|
+
import { u as ti } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
9
9
|
import { KitTag as ei } from "../Tag/index.js";
|
|
10
10
|
import { KitButton as B } from "../../General/Button/index.js";
|
|
11
11
|
import { KitTooltip as si } from "../Tooltip/index.js";
|
|
12
12
|
import { FontAwesomeIcon as O } from "@fortawesome/react-fontawesome";
|
|
13
13
|
import { faEllipsis as oi, faImage as ri } from "@fortawesome/free-solid-svg-icons";
|
|
14
14
|
import { KitDropDown as ai } from "../../Navigation/DropDown/index.js";
|
|
15
|
-
import { u as di } from "../../../chunks/useKitLocale.
|
|
15
|
+
import { u as di } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
16
16
|
import { useDebouncedCallback as ci } from "use-debounce";
|
|
17
17
|
import { N as ni, F as li } from "../../../chunks/constants.CctH0M4n.js";
|
|
18
18
|
import '../../../assets/index29.css';const mi = {
|
|
@@ -4,11 +4,11 @@ import { KitCheckbox as J } from "../../DataEntry/Checkbox/index.js";
|
|
|
4
4
|
import { KitIdCard as M } from "../IdCard/index.js";
|
|
5
5
|
import { KitButton as d } from "../../General/Button/index.js";
|
|
6
6
|
import { KitDropDown as N } from "../../Navigation/DropDown/index.js";
|
|
7
|
-
import { u as Q } from "../../../chunks/useKitTheme.
|
|
7
|
+
import { u as Q } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
8
8
|
import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
|
|
9
9
|
import { faEllipsis as E } from "@fortawesome/free-solid-svg-icons";
|
|
10
10
|
import F from "classnames";
|
|
11
|
-
import { u as W } from "../../../chunks/useKitLocale.
|
|
11
|
+
import { u as W } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
12
12
|
import { N as Y, F as Z } from "../../../chunks/constants.CctH0M4n.js";
|
|
13
13
|
import { getStringFromReactNode as B } from "../../../utils/functions/index.js";
|
|
14
14
|
import '../../../assets/index4.css';const m = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as d, Fragment as D } from "react/jsx-runtime";
|
|
2
2
|
import T from "classnames";
|
|
3
3
|
import { forwardRef as x } from "react";
|
|
4
|
-
import { u as F } from "../../../chunks/useKitTheme.
|
|
4
|
+
import { u as F } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
5
5
|
import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { faEllipsis as A, faArrowRight as E } from "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import { KitIcon as C } from "../../General/Icon/index.js";
|
|
@@ -10,7 +10,7 @@ import { KitDivider as L } from "../../Layout/Divider/index.js";
|
|
|
10
10
|
import { KitButton as k } from "../../General/Button/index.js";
|
|
11
11
|
import { KitTooltip as R } from "../Tooltip/index.js";
|
|
12
12
|
import { KitDropDown as g } from "../../Navigation/DropDown/index.js";
|
|
13
|
-
import { u as P } from "../../../chunks/useKitLocale.
|
|
13
|
+
import { u as P } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
14
14
|
import { N as O, F as S } from "../../../chunks/constants.CctH0M4n.js";
|
|
15
15
|
import '../../../assets/index24.css';const j = {
|
|
16
16
|
"kit-redirect-card": "_kit-redirect-card_1yxds_2"
|
|
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as B, useMemo as y } from "react";
|
|
3
3
|
import { Table as N } from "antd";
|
|
4
4
|
import S from "classnames";
|
|
5
|
-
import { u as F } from "../../../chunks/useKitTheme.
|
|
5
|
+
import { u as F } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
6
6
|
import { F as x } from "../../../chunks/constants.CctH0M4n.js";
|
|
7
7
|
import { KitIcon as R } from "../../General/Icon/index.js";
|
|
8
8
|
import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as F, useState as
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as _, Fragment as A, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as F, useState as R, useLayoutEffect as G } from "react";
|
|
3
|
+
import { u as H } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
4
|
+
import O from "classnames";
|
|
5
5
|
import { KitButton as B } from "../../General/Button/index.js";
|
|
6
6
|
import { FontAwesomeIcon as D } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { faPlus as
|
|
8
|
-
import { F as
|
|
9
|
-
import { KitDropDown as
|
|
10
|
-
import { u as
|
|
11
|
-
import { KitTypography as
|
|
12
|
-
import { KitBadge as
|
|
13
|
-
import '../../../assets/index30.css';const
|
|
14
|
-
"kit-tabs": "_kit-
|
|
7
|
+
import { faPlus as J, faEllipsisVertical as M } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
import { F as Q } from "../../../chunks/constants.CctH0M4n.js";
|
|
9
|
+
import { KitDropDown as Y } from "../../Navigation/DropDown/index.js";
|
|
10
|
+
import { u as Z } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
11
|
+
import { KitTypography as tt } from "../../General/Typography/index.js";
|
|
12
|
+
import { KitBadge as et } from "../Badge/index.js";
|
|
13
|
+
import '../../../assets/index30.css';const I = {
|
|
14
|
+
"kit-tabs-wrapper": "_kit-tabs-wrapper_htrca_2",
|
|
15
|
+
"kit-tabs": "_kit-tabs_htrca_2"
|
|
15
16
|
};
|
|
16
|
-
function
|
|
17
|
-
const o = F(null), s = F({}), u = F(null),
|
|
18
|
-
return
|
|
17
|
+
function ot({ items: e, addTab: n, disableOverflow: i }) {
|
|
18
|
+
const o = F(null), s = F({}), u = F(null), a = 16, v = 40, r = n ? 56 : 0, [d, w] = R([]), [h, f] = R(!1);
|
|
19
|
+
return G(() => {
|
|
19
20
|
const p = () => {
|
|
20
21
|
if (i) {
|
|
21
22
|
f(!0);
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
25
|
+
const k = o.current;
|
|
26
|
+
if (!k)
|
|
26
27
|
return;
|
|
27
|
-
const m =
|
|
28
|
-
let
|
|
29
|
-
const
|
|
30
|
-
for (let
|
|
31
|
-
const K =
|
|
32
|
-
if (!
|
|
28
|
+
const m = nt(k);
|
|
29
|
+
let y = r;
|
|
30
|
+
const g = [];
|
|
31
|
+
for (let c = 0; c < e.length; c++) {
|
|
32
|
+
const K = e[c], T = s.current[K.key];
|
|
33
|
+
if (!T)
|
|
33
34
|
return;
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
y += T.offsetWidth + a;
|
|
36
|
+
const C = c === e.length - 1 ? 0 : v;
|
|
37
|
+
y > m - C + a && g.push(K.key);
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
w((c) => c.join() === g.join() ? c : g), f(!0);
|
|
39
40
|
};
|
|
40
41
|
let S;
|
|
41
42
|
const x = () => {
|
|
@@ -44,16 +45,16 @@ function te({ items: t, addTab: n, disableOverflow: i }) {
|
|
|
44
45
|
return p(), window.addEventListener("resize", x), () => {
|
|
45
46
|
window.removeEventListener("resize", x);
|
|
46
47
|
};
|
|
47
|
-
}, [
|
|
48
|
+
}, [e, r, o, u, i]), {
|
|
48
49
|
containerRef: o,
|
|
49
50
|
tabRefs: s,
|
|
50
51
|
overflowedKeys: d,
|
|
51
|
-
overflowedItems:
|
|
52
|
-
overflowCalculated:
|
|
52
|
+
overflowedItems: e.filter((p) => d.includes(p.key)),
|
|
53
|
+
overflowCalculated: h
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
let n =
|
|
56
|
+
function nt(e) {
|
|
57
|
+
let n = e.parentElement;
|
|
57
58
|
for (; n; ) {
|
|
58
59
|
const i = window.getComputedStyle(n), o = i.width;
|
|
59
60
|
if (o !== "auto" && o !== "fit-content" && o !== "min-content" && o !== "max-content" && n.clientWidth > 0)
|
|
@@ -65,9 +66,9 @@ function oe(t) {
|
|
|
65
66
|
}
|
|
66
67
|
return window.innerWidth;
|
|
67
68
|
}
|
|
68
|
-
const
|
|
69
|
-
function
|
|
70
|
-
switch (
|
|
69
|
+
const j = ({ icon: e, label: n, size: i, badgeCount: o, badgeOverflowCount: s }) => _(A, { children: [e && l("div", { className: "kit-tab-icon", children: e }), _("div", { className: "kit-tab-label-wrapper", children: [l(tt.Text, { className: "kit-tab-label", size: it(i), children: n }), !!o && l(et, { className: "kit-tab-count", count: o, overflowCount: s })] })] });
|
|
70
|
+
function it(e) {
|
|
71
|
+
switch (e) {
|
|
71
72
|
case "xsmall":
|
|
72
73
|
return "fontSize7";
|
|
73
74
|
case "small":
|
|
@@ -78,38 +79,40 @@ function ne(t) {
|
|
|
78
79
|
return "fontSize4";
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
const
|
|
82
|
-
var
|
|
83
|
-
const { appId: p } =
|
|
82
|
+
const lt = ({ addTab: e, centered: n, className: i, activeKey: o, defaultKey: s, items: u, onChange: a, fullwidthTab: v, size: r = "small", variant: d = "classic" }) => {
|
|
83
|
+
var w, h, f;
|
|
84
|
+
const { appId: p } = H(), { locale: S } = Z(), [x, k] = R(s ?? ((w = u[0]) === null || w === void 0 ? void 0 : w.key)), m = o ?? x, y = (h = u.find((t) => t.key === m)) === null || h === void 0 ? void 0 : h.tabContent, g = O(p, i, I["kit-tabs"], r ?? "medium", d, v ? "fullwidth" : "", y && d === "pill" ? "tabs-bottom-spacing" : ""), c = O(I["kit-tabs-wrapper"], {
|
|
85
|
+
centered: n
|
|
86
|
+
}), { containerRef: K, tabRefs: T, overflowedKeys: C, overflowedItems: z, overflowCalculated: U } = ot({
|
|
84
87
|
items: u,
|
|
85
|
-
addTab: !!
|
|
86
|
-
disableOverflow: !!
|
|
87
|
-
}), L = (
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
88
|
+
addTab: !!e,
|
|
89
|
+
disableOverflow: !!v
|
|
90
|
+
}), L = (t) => {
|
|
91
|
+
k(t), a?.(t);
|
|
92
|
+
}, P = (t, N) => {
|
|
93
|
+
t.code === "Enter" && (k(N), a?.(N));
|
|
91
94
|
};
|
|
92
|
-
return
|
|
93
|
-
const
|
|
94
|
-
return
|
|
95
|
-
visible:
|
|
95
|
+
return _(A, { children: [l("div", { className: c, ref: K, children: _("div", { className: g, role: "tablist", children: [u.map(({ icon: t, label: N, badgeCount: V, badgeOverflowCount: X, key: b, disabled: E }) => {
|
|
96
|
+
const $ = C.includes(b), q = m === b;
|
|
97
|
+
return l("div", { ref: (W) => T.current[b] = W, className: O("kit-tab", "kit-tab-" + r, d, {
|
|
98
|
+
visible: U && !$,
|
|
96
99
|
// hide tabs until overflow is calculated to avoid layout shift
|
|
97
|
-
disabled:
|
|
98
|
-
active:
|
|
99
|
-
fullwidth:
|
|
100
|
-
}), role: "tab", tabIndex:
|
|
101
|
-
}),
|
|
102
|
-
items:
|
|
103
|
-
label:
|
|
100
|
+
disabled: E,
|
|
101
|
+
active: q,
|
|
102
|
+
fullwidth: v
|
|
103
|
+
}), role: "tab", tabIndex: Q, onClick: E ? void 0 : () => L(b), onKeyDown: E ? void 0 : (W) => P(W, b), children: l(j, { icon: t, label: N, size: r, badgeCount: V, badgeOverflowCount: X }) }, b);
|
|
104
|
+
}), e && d === "classic" && l(B, { disableSecureClick: !0, type: "tertiary", icon: l(D, { icon: J }), onClick: e, size: r === "xsmall" ? "s" : "m" }), C.length > 0 && l(Y, { menu: {
|
|
105
|
+
items: z.map((t) => ({
|
|
106
|
+
label: l("div", { className: O("kit-tab-dropdown", `kit-tab-dropdown-${r}`), children: l(j, { icon: t.icon, label: t.label, size: r, badgeCount: t.badgeCount, badgeOverflowCount: t.badgeOverflowCount }) }),
|
|
104
107
|
type: "item",
|
|
105
|
-
key:
|
|
106
|
-
disabled:
|
|
107
|
-
onClick: () => !
|
|
108
|
+
key: t.key,
|
|
109
|
+
disabled: t.disabled,
|
|
110
|
+
onClick: () => !t.disabled && L(t.key)
|
|
108
111
|
})),
|
|
109
112
|
selectedKeys: [m]
|
|
110
|
-
}, trigger: ["click"], children:
|
|
113
|
+
}, trigger: ["click"], children: l(B, { icon: l(D, { icon: M }), type: C.includes(m) ? "primary" : "tertiary", "aria-label": (f = S.Tabs) === null || f === void 0 ? void 0 : f.moreOptions, size: r === "xsmall" ? "s" : "m" }) })] }) }), y] });
|
|
111
114
|
};
|
|
112
|
-
|
|
115
|
+
lt.displayName = "KitTabs";
|
|
113
116
|
export {
|
|
114
|
-
|
|
117
|
+
lt as KitTabs
|
|
115
118
|
};
|
|
@@ -2,13 +2,13 @@ import { jsx as t, Fragment as C, jsxs as K } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as B, useState as G, useRef as W, useLayoutEffect as U } from "react";
|
|
3
3
|
import D from "classnames";
|
|
4
4
|
import { Tag as z } from "antd";
|
|
5
|
-
import { u as S } from "../../../chunks/useKitTheme.
|
|
5
|
+
import { u as S } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
6
6
|
import { FontAwesomeIcon as M } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faXmark as R } from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
import { KitIdCard as X } from "../IdCard/index.js";
|
|
9
9
|
import { T as P, N as V, F as H } from "../../../chunks/constants.CctH0M4n.js";
|
|
10
10
|
import { KitTooltip as L } from "../Tooltip/index.js";
|
|
11
|
-
import { u as j } from "../../../chunks/useKitLocale.
|
|
11
|
+
import { u as j } from "../../../chunks/useKitLocale.DD7mnAZn.js";
|
|
12
12
|
import { KitModal as Y } from "../../Feedback/Modal/index.js";
|
|
13
13
|
import '../../../assets/index38.css';const N = {
|
|
14
14
|
"kit-tag": "_kit-tag_2tdjx_2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Tour as p } from "antd";
|
|
3
|
-
import { u as e } from "../../../chunks/useKitTheme.
|
|
3
|
+
import { u as e } from "../../../chunks/useKitTheme.C7yw6CDw.js";
|
|
4
4
|
import i from "classnames";
|
|
5
5
|
const f = ({ rootClassName: o, ...r }) => {
|
|
6
6
|
const { appId: t } = e(), m = i(t, o);
|