aristid-ds 15.0.0 → 15.1.0-020ccc8

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +14 -0
  3. package/dist/Kit/App/index.js +46 -52
  4. package/dist/Kit/DataDisplay/Badge/index.d.ts +2 -2
  5. package/dist/Kit/DataDisplay/Badge/index.js +21 -15
  6. package/dist/Kit/DataDisplay/Comment/index.js +1 -1
  7. package/dist/Kit/DataDisplay/RedirectCard/index.js +13 -13
  8. package/dist/Kit/DataDisplay/Table/index.js +63 -64
  9. package/dist/Kit/DataDisplay/Table/types.d.ts +0 -1
  10. package/dist/Kit/DataDisplay/Tabs/index.js +64 -61
  11. package/dist/Kit/DataDisplay/Tag/index.js +49 -48
  12. package/dist/Kit/DataDisplay/Tree/index.js +9 -9
  13. package/dist/Kit/DataEntry/Rate/index.js +7 -7
  14. package/dist/Kit/DataEntry/RichText/index.js +36 -36
  15. package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
  16. package/dist/Kit/DataEntry/Select/index.js +50 -50
  17. package/dist/Kit/DataEntry/Switch/index.js +4 -4
  18. package/dist/Kit/DataEntry/TreeSelect/index.js +23 -22
  19. package/dist/Kit/Feedback/Modal/index.js +91 -89
  20. package/dist/Kit/Feedback/Modal/types.d.ts +1 -0
  21. package/dist/Kit/Feedback/Progress/index.js +6 -6
  22. package/dist/Kit/Navigation/Breadcrumb/index.js +7 -7
  23. package/dist/Kit/Navigation/Pagination/index.js +3 -3
  24. package/dist/Kit/index.js +1 -1
  25. package/dist/assets/Thread.css +1 -1
  26. package/dist/assets/index17.css +1 -1
  27. package/dist/assets/index21.css +1 -1
  28. package/dist/assets/index24.css +1 -1
  29. package/dist/assets/index28.css +1 -1
  30. package/dist/assets/index30.css +1 -1
  31. package/dist/assets/index38.css +1 -1
  32. package/dist/assets/index41.css +1 -1
  33. package/dist/assets/index42.css +1 -1
  34. package/dist/assets/index45.css +1 -1
  35. package/dist/assets/index5.css +1 -1
  36. package/dist/assets/index7.css +1 -1
  37. package/dist/assets/index8.css +1 -1
  38. package/dist/assets/index9.css +1 -1
  39. package/dist/chunks/Thread.DfvaoSxN.js +25 -0
  40. package/dist/chunks/index.CKC2Gl0d.js +23 -0
  41. package/dist/index.es.js +1 -1
  42. package/dist/index.umd.js +4 -4
  43. package/dist/translation/pt-PT/components/DataDisplay/Collapse/index.d.ts +2 -0
  44. package/dist/translation/pt-PT/components/DataDisplay/Collapse/index.js +7 -0
  45. package/dist/translation/pt-PT/components/DataDisplay/Empty/index.d.ts +2 -0
  46. package/dist/translation/pt-PT/components/DataDisplay/Empty/index.js +6 -0
  47. package/dist/translation/pt-PT/components/DataDisplay/Error/index.d.ts +2 -0
  48. package/dist/translation/pt-PT/components/DataDisplay/Error/index.js +6 -0
  49. package/dist/translation/pt-PT/components/DataDisplay/Image/index.d.ts +2 -0
  50. package/dist/translation/pt-PT/components/DataDisplay/Image/index.js +6 -0
  51. package/dist/translation/pt-PT/components/DataDisplay/ItemList/index.d.ts +2 -0
  52. package/dist/translation/pt-PT/components/DataDisplay/ItemList/index.js +8 -0
  53. package/dist/translation/pt-PT/components/DataDisplay/Tabs/index.d.ts +2 -0
  54. package/dist/translation/pt-PT/components/DataDisplay/Tabs/index.js +6 -0
  55. package/dist/translation/pt-PT/components/DataEntry/ColorPicker/index.d.ts +2 -0
  56. package/dist/translation/pt-PT/components/DataEntry/ColorPicker/index.js +6 -0
  57. package/dist/translation/pt-PT/components/DataEntry/RichText/index.d.ts +2 -0
  58. package/dist/translation/pt-PT/components/DataEntry/RichText/index.js +31 -0
  59. package/dist/translation/pt-PT/components/DataEntry/Upload/index.d.ts +2 -0
  60. package/dist/translation/pt-PT/components/DataEntry/Upload/index.js +11 -0
  61. package/dist/translation/pt-PT/components/Feedback/Alert/index.d.ts +2 -0
  62. package/dist/translation/pt-PT/components/Feedback/Alert/index.js +6 -0
  63. package/dist/translation/pt-PT/components/General/Button/index.d.ts +2 -0
  64. package/dist/translation/pt-PT/components/General/Button/index.js +7 -0
  65. package/dist/translation/pt-PT/general/index.d.ts +2 -0
  66. package/dist/translation/pt-PT/general/index.js +13 -0
  67. package/dist/translation/pt-PT/index.d.ts +2 -0
  68. package/dist/translation/pt-PT/index.js +28 -0
  69. package/dist/translation/types/index.d.ts +1 -1
  70. package/dist/translation/utils/index.js +2 -13
  71. package/dist/translation/utils/localesByLang.d.ts +11 -0
  72. package/package.json +154 -154
  73. package/dist/Kit/DataDisplay/Table/getRowClassName.d.ts +0 -1
  74. package/dist/chunks/Thread.Cb7BFNKI.js +0 -25
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## [X.X.X](https://www.npmjs.com/package/aristid-ds/v/X.X.X) (2026-XX-XX)
4
+
5
+ ### ✨ Features
6
+
7
+ - **Locales:**
8
+ - Add `portuguese` locale (@evoiron)
9
+ - Update locale context to simplify the process of adding a locale (@evoiron)
10
+
11
+ ### 🐛 Bug Fixes
12
+
13
+ - **Tabs:**
14
+ - Fix alignment issue causing Pill Tabs not to be centered within their parent element (@YanDevDz)
15
+
16
+ ## [15.1.0](https://www.npmjs.com/package/aristid-ds/v/15.1.0) (2026-02-24)
17
+
18
+ ### ✨ Features
19
+
20
+ - **⚠️ Breaking change - Table**:
21
+ - Keep table generic by removing `getRowClassName` function (@baloche)
22
+ - **Modal:**
23
+ - Add `extraRight` prop to display extra right content (@philippechevieux)
24
+ - **SearchInput:**
25
+ - Set minimum width to the SearchInput component (@alechapelain)
26
+ - Adapt icon color based on state and input content (@alechapelain)
27
+
28
+ ### 🐛 Bug Fixes
29
+
30
+ - **Tag:**
31
+ - Fix tooltip color of tags using `IdCard` component in TagGroup (@philippechevieux)
32
+ - **Badge:**
33
+ - Remove default `title` tooltip on Badge component (if needed we can use a `KitTooltip` component) (@philippechevieux)
34
+ - Fix warning when Badge component is used inside a Tooltip component (@alechapelain)
35
+ - **Table:**
36
+ - Fix pagination position (@cedeymard9)
37
+ - Fix background color issue when header is sticky (@cedeymard9)
38
+ - **Select:**
39
+ - Use `<KitIdCard/>` component as children instead of `idCardProps` deprecated property (@cedeymard9)
40
+ - **TreeSelect:**
41
+ - Use `<KitIdCard/>` component as children instead of `idCardProps` deprecated property (@cedeymard9)
42
+ - Fix scrolling issue (@cedeymard9)
43
+
44
+ ### 📚 Documentation
45
+
46
+ - **Changelog:**
47
+ - Add `Changelog` page to storybook (@evoiron)
48
+ - **Collapse:**
49
+ - Remove link that no longer exists (@cedeymard9)
50
+
3
51
  ## [15.0.0](https://www.npmjs.com/package/aristid-ds/v/15.0.0) (2026-01-23)
4
52
 
5
53
  ### ✨ 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 :
@@ -1,66 +1,60 @@
1
- import { jsx as n, jsxs as f, Fragment as h } from "react/jsx-runtime";
2
- import { useState as u, useLayoutEffect as L, useRef as S, useEffect as C } from "react";
3
- import { ConfigProvider as P } from "antd";
4
- import { K as b } from "../../chunks/SnackBarProvider.D44OffUd.js";
5
- import { toCssVariables as g, uuid as y } from "../../utils/functions/index.js";
6
- import a from "lodash/merge";
7
- import { Style as m } from "react-style-tag";
8
- import { K as E } from "../../chunks/useKitTheme.BdeSOGoj.js";
9
- import { KitAristidThemeGeneral as l } from "../../theme/aristid/general/index.js";
10
- import { antdThemeConfig as T } from "../../theme/utils/tokens-mapper/index.js";
11
- import { frFR as d } from "../../translation/fr-FR/index.js";
12
- import { enUS as $ } from "../../translation/en-US/index.js";
13
- import { K as j, u as k } from "../../chunks/useKitLocale.C5F-tmnC.js";
14
- import { mapKitLocaleToAntdLocale as x } from "../../translation/utils/index.js";
15
- import { KitEmpty as p } from "../DataDisplay/Empty/index.js";
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.BdeSOGoj.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.C5F-tmnC.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(o).map((r) => `${r}: ${o[r]}`).join(";")}
18
+ ${Object.keys(r).map((t) => `${t}: ${r[t]}`).join(";")}
21
19
  }
22
20
  `;
23
- }, I = ({ children: t, customTheme: e, id: o }) => {
24
- const [r, i] = u(null), { theme: v, appId: c, spacing: K } = R(o, e);
25
- return L(() => {
26
- const s = g(l, "--general");
27
- i(s);
28
- }, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id: A, hasSourceMap: !1, children: `
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(r).map((s) => `${s}: ${r[s]}`).join(";")}
28
+ ${Object.keys(t).map((l) => `${l}: ${t[l]}`).join(";")}
31
29
  }
32
- ` }), e && n(m, { hasSourceMap: !1, children: F(a({ general: { utilities: l.utilities } }, e), c) }), t] }) });
33
- }, R = (t, e) => {
34
- var o;
35
- const r = S(t || "ds-" + y().substring(0, 8)), i = a(l.spacing, (o = e?.general) === null || o === void 0 ? void 0 : o.spacing);
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: l,
38
- appId: r.current,
35
+ theme: c,
36
+ appId: t.current,
39
37
  spacing: i
40
38
  };
41
- }, _ = ({ children: t }) => {
42
- const e = M();
43
- return n(j.Provider, { value: e, children: t });
44
- }, M = () => {
45
- const [t, e] = u(d);
46
- return { locale: t, setKitLocale: (r) => {
47
- if (r.locale === "frFR") {
48
- const i = a(d, r);
49
- e(i);
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
- }, Z = ({ children: t, locale: e, customTheme: o, id: r }) => n(I, { customTheme: o, id: r, children: n(_, { children: n(O, { locale: e, children: t }) }) }), O = ({ children: t, locale: e }) => {
56
- const { locale: o, setKitLocale: r } = k();
57
- return C(() => {
58
- e !== void 0 && r(e);
59
- }, [e, r]), f(P, { theme: T, locale: x(e), renderEmpty: () => {
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 n(p, { className: "default-render", image: p.ASSET_LIST, description: (i = o.Empty) === null || i === void 0 ? void 0 : i.noData });
62
- }, children: [n(b, {}), t] });
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
- Z as KitApp
59
+ X as KitApp
66
60
  };
@@ -1,3 +1,3 @@
1
- import { FunctionComponent } from 'react';
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  import { IKitBadge } from './types';
3
- export declare const KitBadge: FunctionComponent<IKitBadge>;
3
+ export declare const KitBadge: ForwardRefExoticComponent<IKitBadge & RefAttributes<HTMLSpanElement>>;
@@ -1,20 +1,26 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useMemo as l } from "react";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as p, useMemo as d } from "react";
3
3
  import { Badge as u } from "antd";
4
- import { u as d } from "../../../chunks/useKitTheme.BdeSOGoj.js";
5
- import { isValidColor as f, getLighterColor as n, getColor as c } from "../../../utils/functions/index.js";
4
+ import { u as n } from "../../../chunks/useKitTheme.BdeSOGoj.js";
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
- import k from "classnames";
8
- import '../../../assets/index.css';const b = {
7
+ import B from "classnames";
8
+ import '../../../assets/index.css';const C = {
9
9
  "kit-badge": "_kit-badge_8zlso_2"
10
- }, B = (t, o) => !t || !f(t) ? null : {
11
- [s.colors.background.default]: c(t, o),
12
- [s.colors.typography.default]: n(t, o)
13
- }, C = ({ color: t, style: o, secondaryColorInvert: e = !1, className: m, ...r }) => {
14
- const { appId: i } = d(), a = l(() => ({ ...o, ...B(t, e) }), [t, e, o]), g = k(i, b["kit-badge"], m);
15
- return p(u, { style: a, ...r, className: g });
16
- };
17
- C.displayName = "KitBadge";
10
+ }, h = (t, o) => !t || !c(t) ? null : {
11
+ [s.colors.background.default]: b(t, o),
12
+ [s.colors.typography.default]: k(t, o)
13
+ }, x = p(({ color: t, style: o, secondaryColorInvert: e = !1, className: r, ...i }, m) => {
14
+ const { appId: a } = n(), f = d(() => ({ ...o, ...h(t, e) }), [t, e, o]), g = B(a, C["kit-badge"], r);
15
+ return l(u, {
16
+ style: f,
17
+ ...i,
18
+ title: "",
19
+ className: g,
20
+ ref: m
21
+ });
22
+ });
23
+ x.displayName = "KitBadge";
18
24
  export {
19
- C as KitBadge
25
+ x as KitBadge
20
26
  };
@@ -1,4 +1,4 @@
1
- import { K as e, a as m } from "../../../chunks/Thread.Cb7BFNKI.js";
1
+ import { K as e, a as m } from "../../../chunks/Thread.DfvaoSxN.js";
2
2
  export {
3
3
  e as KitComment,
4
4
  m as KitThread
@@ -3,17 +3,17 @@ import T from "classnames";
3
3
  import { forwardRef as x } from "react";
4
4
  import { u as F } from "../../../chunks/useKitTheme.BdeSOGoj.js";
5
5
  import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
6
- import { faEllipsis as g, faArrowRight as E } from "@fortawesome/free-solid-svg-icons";
7
- import { KitIcon as A } from "../../General/Icon/index.js";
8
- import { KitTypography as C } from "../../General/Typography/index.js";
6
+ import { faEllipsis as A, faArrowRight as E } from "@fortawesome/free-solid-svg-icons";
7
+ import { KitIcon as C } from "../../General/Icon/index.js";
8
+ import { KitTypography as N } from "../../General/Typography/index.js";
9
9
  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
- import { KitDropDown as N } from "../../Navigation/DropDown/index.js";
12
+ import { KitDropDown as g } from "../../Navigation/DropDown/index.js";
13
13
  import { u as P } from "../../../chunks/useKitLocale.C5F-tmnC.js";
14
14
  import { N as O, F as S } from "../../../chunks/constants.CctH0M4n.js";
15
- import '../../../assets/index24.css';const b = {
16
- "kit-redirect-card": "_kit-redirect-card_bgg2g_2"
15
+ import '../../../assets/index24.css';const j = {
16
+ "kit-redirect-card": "_kit-redirect-card_1yxds_2"
17
17
  }, K = ({ actions: i, actionsInDropdown: m = !1, disabled: e = !1 }) => {
18
18
  var n, s;
19
19
  const { locale: l } = P();
@@ -22,25 +22,25 @@ import '../../../assets/index24.css';const b = {
22
22
  const o = i.length < 4;
23
23
  let c;
24
24
  if (m && i.length > 1)
25
- c = r(N, { 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: g }), disableSecureClick: !0, onClick: (t) => t.stopPropagation() }) });
25
+ 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
26
  else if (o)
27
27
  c = i.map((t) => r(_, { action: t, disabled: e }, t.key));
28
28
  else {
29
29
  const [t, p, ...h] = i;
30
- c = d(D, { children: [[t, p].map((a) => r(_, { action: a, disabled: e }, a.key)), r(N, { 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: g }), disableSecureClick: !0, onClick: (a) => a.stopPropagation() }) })] });
30
+ 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
31
  }
32
32
  return r("div", { className: "kit-redirect-card-actions", children: c });
33
33
  }, _ = ({ action: i, disabled: m }) => r(R, { title: i.label, children: r(k, { type: "secondary", icon: i.icon, onClick: (e) => {
34
34
  e.stopPropagation(), i.onClick(e);
35
- }, disabled: i.disabled || m, disableSecureClick: !0 }) }), j = x(({ className: i, style: m, title: e, description: n, icon: s, coverSrc: l, disabled: o, actions: c, actionsInDropdown: t, onClick: p, coverAlt: h = "" }, a) => {
36
- const v = s !== void 0 && l === void 0, y = l !== void 0, u = c !== void 0, w = 2, { appId: B } = F(), I = T(b["kit-redirect-card"], i, B, {
35
+ }, 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) => {
36
+ 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
37
  "kit-redirect-card-disabled": o,
38
38
  "kit-redirect-card-with-cover": y,
39
39
  "kit-redirect-card-with-actions": u
40
40
  });
41
- 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(A, { 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(C.Title, { ellipsis: !0, level: "h3", disabled: o, children: e }), n && r(C.AdvancedParagraph, { ellipsis: { rows: w, tooltip: n }, disabled: o, children: n })] }), r(A, { className: "kit-redirect-card-redirect-icon", icon: r(f, { icon: E }) })] })] });
41
+ 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
42
  });
43
- j.displayName = "KitRedirectCard";
43
+ G.displayName = "KitRedirectCard";
44
44
  export {
45
- j as KitRedirectCard
45
+ G as KitRedirectCard
46
46
  };
@@ -1,105 +1,104 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as B, useMemo as g } from "react";
3
- import { Table as y } from "antd";
4
- import T from "classnames";
2
+ import { forwardRef as B, useMemo as y } from "react";
3
+ import { Table as N } from "antd";
4
+ import S from "classnames";
5
5
  import { u as F } from "../../../chunks/useKitTheme.BdeSOGoj.js";
6
- import { F as I } from "../../../chunks/constants.CctH0M4n.js";
7
- import { KitIcon as W } from "../../General/Icon/index.js";
8
- import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
9
- import { faUpDown as $, faArrowDown as E, faArrowUp as M, faGripLines as G, faCaretDown as X, faCaretRight as q } from "@fortawesome/free-solid-svg-icons";
10
- import { KitButton as A } from "../../General/Button/index.js";
11
- import '../../../assets/index45.css';const N = {
12
- "kit-table": "_kit-table_13g89_22",
13
- "expand-button": "_expand-button_13g89_798"
14
- }, S = (l) => {
15
- const e = l?.split(" "), a = e?.filter((n) => n !== "ant-table-cell").join(" "), r = e?.filter((n) => ["ant-table-cell", "ant-table-cell-ellipsis", "ant-table-selection-column"].includes(n)).join(" ");
6
+ import { F as x } from "../../../chunks/constants.CctH0M4n.js";
7
+ import { KitIcon as R } from "../../General/Icon/index.js";
8
+ import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
9
+ import { faUpDown as W, faArrowDown as $, faArrowUp as E, faGripLines as M, faCaretDown as G, faCaretRight as X } from "@fortawesome/free-solid-svg-icons";
10
+ import { KitButton as T } from "../../General/Button/index.js";
11
+ import '../../../assets/index45.css';const p = {
12
+ "kit-table": "_kit-table_1gybl_22",
13
+ "expand-button": "_expand-button_1gybl_816"
14
+ }, I = (l) => {
15
+ const i = l?.split(" "), a = i?.filter((o) => o !== "ant-table-cell").join(" "), r = i?.filter((o) => ["ant-table-cell", "ant-table-cell-ellipsis", "ant-table-selection-column"].includes(o)).join(" ");
16
16
  return {
17
17
  antCell: a,
18
18
  internalCell: r
19
19
  };
20
20
  };
21
- function J(l) {
22
- var e, a;
21
+ function q(l) {
22
+ var i, a;
23
23
  return {
24
24
  header: {
25
- wrapper: (e = l?.header) === null || e === void 0 ? void 0 : e.wrapper,
25
+ wrapper: (i = l?.header) === null || i === void 0 ? void 0 : i.wrapper,
26
26
  row: (a = l?.header) === null || a === void 0 ? void 0 : a.row,
27
- cell: ({ children: r, className: n, style: c, title: d, rowSpan: b, colSpan: v, ...C }) => {
28
- const s = S(n);
29
- return t("th", { className: s.antCell, style: c, title: d, rowSpan: b, colSpan: v, ...C, children: t("div", { className: s.internalCell, children: r }) });
27
+ cell: ({ children: r, className: o, style: c, title: d, rowSpan: m, colSpan: b, ...C }) => {
28
+ const s = I(o);
29
+ return t("th", { className: s.antCell, style: c, title: d, rowSpan: m, colSpan: b, ...C, children: t("div", { className: s.internalCell, children: r }) });
30
30
  }
31
31
  },
32
32
  body: {
33
- cell: ({ children: r, className: n, style: c, title: d, rowSpan: b, colSpan: v, ...C }) => {
34
- var s, m;
35
- const h = (s = l?.body) === null || s === void 0 ? void 0 : s.cell, i = S(n);
36
- let _ = "";
37
- return !((m = i.antCell) === null || m === void 0) && m.includes("ant-table-cell-ellipsis") && (_ = d), t("td", { className: i.antCell, style: c, title: _, rowSpan: b, colSpan: v, children: t("div", { className: i.internalCell, children: h ? t(h, { title: d, ...C, children: r }) : r }) });
33
+ cell: ({ children: r, className: o, style: c, title: d, rowSpan: m, colSpan: b, ...C }) => {
34
+ var s, w;
35
+ const h = (s = l?.body) === null || s === void 0 ? void 0 : s.cell, e = I(o);
36
+ let k = "";
37
+ return !((w = e.antCell) === null || w === void 0) && w.includes("ant-table-cell-ellipsis") && (k = d), t("td", { className: e.antCell, style: c, title: k, rowSpan: m, colSpan: b, children: t("div", { className: e.internalCell, children: h ? t(h, { title: d, ...C, children: r }) : r }) });
38
38
  },
39
- row: ({ children: r, ...n }) => {
39
+ row: ({ children: r, ...o }) => {
40
40
  var c;
41
41
  const d = (c = l?.body) === null || c === void 0 ? void 0 : c.row;
42
- return d ? t(d, { ...n, tabIndex: I, children: r }) : t("tr", { ...n, tabIndex: I, children: r });
42
+ return d ? t(d, { ...o, tabIndex: x, children: r }) : t("tr", { ...o, tabIndex: x, children: r });
43
43
  }
44
44
  }
45
45
  };
46
46
  }
47
- const Q = ({ sortOrder: l }) => {
48
- let e, a;
47
+ const J = ({ sortOrder: l }) => {
48
+ let i, a;
49
49
  switch (l) {
50
50
  case "ascend":
51
- e = M, a = "blue";
51
+ i = E, a = "blue";
52
52
  break;
53
53
  case "descend":
54
- e = E, a = "blue";
54
+ i = $, a = "blue";
55
55
  break;
56
56
  default:
57
- e = $;
57
+ i = W;
58
58
  break;
59
59
  }
60
- return t(W, { color: a, icon: t(p, { icon: e }) });
61
- }, K = B(({ className: l, isDragging: e, ...a }, r) => {
62
- const n = T("kit-table-drag-handle", l, { "kit-table-drag-handle--dragging": e });
63
- return t(A, { ...a, iconSize: "l", type: "tertiary", className: n, icon: t(p, { icon: G }), ref: r });
60
+ return t(R, { color: a, icon: t(g, { icon: i }) });
61
+ }, A = B(({ className: l, isDragging: i, ...a }, r) => {
62
+ const o = S("kit-table-drag-handle", l, { "kit-table-drag-handle--dragging": i });
63
+ return t(T, { ...a, iconSize: "l", type: "tertiary", className: o, icon: t(g, { icon: M }), ref: r });
64
64
  });
65
- function D(l) {
66
- return "table-row-level-" + l;
67
- }
68
- function V({ className: l, style: e, cellsBackgroundColor: a, backgroundColor: r, borderedRows: n, columns: c, onChange: d, components: b, showDragHandle: v, showHeader: C = !0, dragHandleElement: s, headerLineSize: m = "l", lineSize: h = "l", ...i }) {
69
- const { appId: _, theme: L } = F(), R = T(_, N["kit-table"], l, `kit-table-line-size-${h}`, `kit-table-header-line-size-${m}`, {
70
- "kit-table-bordered-rows": n,
65
+ function Q({ className: l, style: i, cellsBackgroundColor: a, backgroundColor: r, borderedRows: o, columns: c, onChange: d, components: m, showDragHandle: b, showHeader: C = !0, dragHandleElement: s, headerLineSize: w = "l", lineSize: h = "l", ...e }) {
66
+ const { appId: k, theme: D } = F(), L = S(k, p["kit-table"], l, `kit-table-line-size-${h}`, `kit-table-header-line-size-${w}`, {
67
+ "kit-table-bordered-rows": o,
71
68
  "kit-table-headless": C === !1
72
- }), k = g(() => i?.rowSelection ? { ...i?.rowSelection, columnWidth: "var(--kit-table-checkbox-width)" } : i?.rowSelection, [i?.rowSelection]), z = g(() => {
73
- const o = [...c].map((u) => v ? {
69
+ }), _ = y(() => e?.rowSelection ? { ...e?.rowSelection, columnWidth: "var(--kit-table-checkbox-width)" } : e?.rowSelection, [e?.rowSelection]), z = y(() => {
70
+ const n = [...c].map((u) => b ? {
74
71
  ...u,
75
72
  sorter: void 0
76
- } : (u.sorter && (u.sortIcon = ({ sortOrder: f }) => t(Q, { sortOrder: f })), u));
77
- return v && (k && o.unshift(y.SELECTION_COLUMN), o.unshift({
73
+ } : (u.sorter && (u.sortIcon = ({ sortOrder: v }) => t(J, { sortOrder: v })), u));
74
+ return b && (_ && n.unshift(N.SELECTION_COLUMN), n.unshift({
78
75
  key: "drag-handle",
79
76
  align: "center",
80
- render: () => s ?? t(K, {})
81
- })), o;
82
- }, [c, k, v, s]), O = (o, u, f, w) => {
83
- d?.(o, f, w);
84
- }, U = ({ record: o, expanded: u, onExpand: f }) => {
85
- var w;
86
- if (!(!Array.isArray(o?.children) || !(!((w = o?.children) === null || w === void 0) && w.length)))
87
- return t(A, { className: N["expand-button"], type: "tertiary", onClick: (j) => f(o, j), children: t(p, { icon: u ? X : q }) });
77
+ render: () => s ?? t(A, {})
78
+ })), n;
79
+ }, [c, _, b, s]), O = (n, u, v, f) => {
80
+ d?.(n, v, f);
81
+ }, U = ({ record: n, expanded: u, onExpand: v }) => {
82
+ var f;
83
+ if (!(!Array.isArray(n?.children) || !(!((f = n?.children) === null || f === void 0) && f.length)))
84
+ return t(T, { className: p["expand-button"], type: "tertiary", onClick: (j) => v(n, j), children: t(g, { icon: u ? G : X }) });
88
85
  };
89
- return t(y, { className: R, style: {
86
+ return t(N, { className: L, style: {
90
87
  "--kit-table-cells-background-color": a,
91
88
  "--kit-table-background": r,
92
- ...e
93
- }, rowClassName: (o, u, f) => D(f), columns: z, components: g(() => J(b), [b]), onChange: O, ...i, expandable: {
89
+ ...i
90
+ }, columns: z, components: y(() => q(m), [m]), onChange: O, ...e, rowClassName: (n, u, v) => {
91
+ let f = !v || v % 2 ? "" : "with-light-gray-background ";
92
+ return typeof e.rowClassName == "string" && (f += e.rowClassName), typeof e.rowClassName == "function" && (f += e.rowClassName(n, u, v)), f;
93
+ }, expandable: {
94
94
  expandIcon: U,
95
- indentSize: L.spacing.m,
96
- ...i.expandable
97
- }, rowSelection: k, showHeader: C });
95
+ indentSize: D.spacing.m,
96
+ ...e.expandable
97
+ }, rowSelection: _, showHeader: C });
98
98
  }
99
- const x = V;
100
- x.displayName = "KitTable";
101
- x.DragHandle = K;
102
- x.getRowClassName = D;
99
+ const K = Q;
100
+ K.displayName = "KitTable";
101
+ K.DragHandle = A;
103
102
  export {
104
- x as KitTable
103
+ K as KitTable
105
104
  };
@@ -92,7 +92,6 @@ export type KitTableColumnsType<RecordType> = KitColumnType<RecordType>[];
92
92
 
93
93
  export type KitTableCompoundedComponent = FunctionComponent<IKitTable> & {
94
94
  DragHandle: ForwardRefExoticComponent<HTMLButtonElement, IDragHandle>;
95
- getRowClassName: (indent: number) => string;
96
95
  };
97
96
 
98
97
  export {TableColumnType as KitTableColumnType};