aristid-ds 9.0.0-dbbce41 → 9.0.0-e0ef209

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 (83) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/README.md +1 -1
  3. package/dist/Kit/App/index.js +11 -126
  4. package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
  5. package/dist/Kit/DataDisplay/Empty/index.js +1 -1
  6. package/dist/Kit/DataDisplay/Error/index.js +7 -2
  7. package/dist/Kit/DataDisplay/Error/types.d.ts +6 -1
  8. package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
  9. package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
  10. package/dist/Kit/DataDisplay/ItemList/types.d.ts +3 -1
  11. package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
  12. package/dist/Kit/DataDisplay/Table/index.js +47 -43
  13. package/dist/Kit/DataDisplay/Tag/index.js +1 -1
  14. package/dist/Kit/DataDisplay/index.js +1 -1
  15. package/dist/Kit/DataEntry/AutoComplete/index.js +18 -17
  16. package/dist/Kit/DataEntry/AutoComplete/types.d.ts +1 -0
  17. package/dist/Kit/DataEntry/Checkbox/index.js +1 -1
  18. package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
  19. package/dist/Kit/DataEntry/DatePicker/index.js +21 -19
  20. package/dist/Kit/DataEntry/DatePicker/types.d.ts +2 -0
  21. package/dist/Kit/DataEntry/Input/index.js +26 -25
  22. package/dist/Kit/DataEntry/Input/types.d.ts +3 -0
  23. package/dist/Kit/DataEntry/InputNumber/index.js +12 -11
  24. package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -0
  25. package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
  26. package/dist/Kit/DataEntry/InputWrapper/types.d.ts +4 -0
  27. package/dist/Kit/DataEntry/Radio/index.js +2 -2
  28. package/dist/Kit/DataEntry/Select/index.js +3 -3
  29. package/dist/Kit/DataEntry/Select/types.d.ts +1 -0
  30. package/dist/Kit/DataEntry/index.js +5 -5
  31. package/dist/Kit/Feedback/Modal/index.js +2 -158
  32. package/dist/Kit/Feedback/Notification/index.js +1 -1
  33. package/dist/Kit/Feedback/Skeleton/index.js +1 -1
  34. package/dist/Kit/Feedback/SnackBar/index.js +6 -6
  35. package/dist/Kit/Feedback/index.js +5 -5
  36. package/dist/Kit/General/Typography/index.js +1 -1
  37. package/dist/Kit/Layout/Grid/index.js +1 -1
  38. package/dist/Kit/Layout/PageLayout/PageLayout.d.ts +3 -0
  39. package/dist/Kit/Layout/PageLayout/index.d.ts +2 -0
  40. package/dist/Kit/Layout/PageLayout/index.js +4 -0
  41. package/dist/Kit/Layout/PageLayout/types.d.ts +8 -0
  42. package/dist/Kit/Layout/index.d.ts +1 -0
  43. package/dist/Kit/Layout/index.js +7 -6
  44. package/dist/Kit/Navigation/Header/index.js +1 -1
  45. package/dist/Kit/Navigation/Menu/index.js +1 -1
  46. package/dist/Kit/Navigation/PageHeader/index.js +1 -1
  47. package/dist/Kit/Navigation/SideMenu/index.js +2 -2
  48. package/dist/Kit/Navigation/SideMenu/types.d.ts +1 -0
  49. package/dist/Kit/Navigation/index.js +3 -3
  50. package/dist/Kit/index.js +149 -150
  51. package/dist/assets/InputWrapper.css +1 -1
  52. package/dist/assets/error/common-error.d.ts +1 -0
  53. package/dist/assets/error/error-401.d.ts +3 -0
  54. package/dist/assets/error/error-403.d.ts +3 -0
  55. package/dist/assets/error/error-404.d.ts +3 -1
  56. package/dist/assets/error/error-500.d.ts +3 -0
  57. package/dist/assets/error/error-502.d.ts +3 -0
  58. package/dist/assets/error/error-503.d.ts +3 -0
  59. package/dist/assets/index20.css +1 -1
  60. package/dist/assets/index25.css +1 -1
  61. package/dist/assets/index26.css +1 -1
  62. package/dist/assets/index27.css +1 -1
  63. package/dist/assets/index28.css +1 -1
  64. package/dist/assets/index29.css +1 -1
  65. package/dist/assets/index30.css +1 -1
  66. package/dist/chunks/InputWrapper.tJodbKzs.js +32 -0
  67. package/dist/chunks/{KitNotification.5nMicwaN.js → KitNotification.m5Z-BPRz.js} +7 -8
  68. package/dist/chunks/SnackBarProvider.xMKXdZ88.js +22 -0
  69. package/dist/chunks/index.1blqoZQ8.js +963 -0
  70. package/dist/index.es.js +128 -130
  71. package/dist/index.umd.js +15 -15
  72. package/dist/theme/aristid/general/index.js +6 -5
  73. package/dist/theme/types/index.d.ts +5 -0
  74. package/dist/translation/en-US/components/DataDisplay/Error/index.js +1 -1
  75. package/dist/translation/fr-FR/components/DataDisplay/Error/index.js +1 -1
  76. package/dist/translation/types/components/DataDisplay/Error/index.d.ts +1 -1
  77. package/package.json +1 -1
  78. package/dist/assets/index31.css +0 -1
  79. package/dist/assets/index32.css +0 -1
  80. package/dist/chunks/InputWrapper.ZM2BYw23.js +0 -30
  81. package/dist/chunks/SnackBarProvider.iuCIyLXl.js +0 -22
  82. package/dist/chunks/index.yWVMx2TR.js +0 -611
  83. package/dist/chunks/notification-provider.5EFnJe91.js +0 -74
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [X.X.X](https://www.npmjs.com/package/aristid-ds/v/X.X.X) (202X-XX-XX)
4
+
5
+ ### ✨ Features
6
+
7
+ - **New - PageLayout:**
8
+
9
+ - Add PageLayout component (@Delmotte-Vincent)
10
+
11
+ - **SideMenu:**
12
+ - Add `customContent` property to display a custom component depending on `open` side menu state (@philippechevieux)
13
+ - **ItemList:**
14
+ - Make `idCardProps` property optional (@philippechevieux)
15
+ - Add `idCardSubstitute` to display a custom component (@philippechevieux)
16
+ - Add `checkboxAriaLabel` property because the `aria-label` of the checkbox was only based on `idCardProps` (@philippechevieux)
17
+ - **InputWrapper:**
18
+ - Add `hoverable` to change border color when `bordered` is set to `true` (@philippechevieux)
19
+ - Add `onFocus` to trigger a given function when content is focused. Also if `bordered` is set to `true` it will change the border render (@philippechevieux)
20
+ - Add `htmlFor` property to link the label to the wrapped content. This property is also available for: (@philippechevieux)
21
+ - `AutoComplete`
22
+ - `DatePicker` and `RangePicker`
23
+ - `Input`, `Password` and `TextArea`
24
+ - `InputNumber`
25
+ - `Select`
26
+ - **Error**
27
+ - Add `httpErrorCode` property to choose which error to display (@fatb38 / @renaudamsellem)
28
+ - **Modal:**
29
+ - Handle `maxHeight` in modal with a scrollbar if there is too much content. (@renaudamsellem)
30
+
31
+ ### 🐛 Bug Fixes
32
+
33
+ - **Table**:
34
+ - Fix checkbox hidden when ellipsis is true (@renaudamsellem)
35
+
36
+ ### 📚 Documentation
37
+
38
+ - Fix design tokens page that crashed every time it was consulted (@philippechevieux)
39
+
3
40
  ## [9.0.0](https://www.npmjs.com/package/aristid-ds/v/9.0.0) (2024-08-28)
4
41
 
5
42
  ### 🎨 Theming
@@ -29,12 +66,14 @@
29
66
  - Change expected value of `size` prop. `small`, `medium` and `large` are replaced by fontSize from `fontSize1` to `fontSize7` (@philippechevieux)
30
67
  - Remove `type` prop because it is not used anymore and has been replaced by `color` (@philippechevieux)
31
68
  - **⚠️ Breaking change - RedirectCard:**
69
+
32
70
  - Rename `imageSrc` as `coverSrc` and `imageAlt` as `coverAlt` (@philippechevieux)
33
71
  - Add `actions` prop to display between 1 and 3 buttons (@philippechevieux)
34
72
  - Fix cover divider render on hover (@philippechevieux)
35
73
 
36
74
  - **⚠️ Breaking change - Grid Component:**
37
- - Update `Grid` internal code. We have moved from the Antd Grid component to a home-made component. Please refer to the documentation for use.
75
+
76
+ - Update `Grid` internal code. We have moved from the Antd Grid component to a home-made component. Please refer to the documentation for use.
38
77
 
39
78
  - **Dropdown:**
40
79
  - Update border, active & selected styles (@renaudAmsellem)
package/README.md CHANGED
@@ -59,7 +59,7 @@ mkdir DESIGN-SYSTEM
59
59
  2. Clone the repo
60
60
 
61
61
  ```sh dark
62
- git clone https://gitlab.aristid.com/dev/design-system.git
62
+ git clone git@github.com:aristid-dev/design-system.git
63
63
  ```
64
64
 
65
65
  3. Install requiered packages
@@ -1,136 +1,21 @@
1
- import "../../assets/index25.css";
2
- import { jsx as n, jsxs as v, Fragment as x } from "react/jsx-runtime";
3
- import { useMemo as K, useState as k, useLayoutEffect as b, useRef as S, useEffect as P } from "react";
4
- import { ConfigProvider as L } from "antd";
5
- import { I as y } from "../../chunks/SnackBarProvider.iuCIyLXl.js";
6
- import { createGlobalStyle as R } from "styled-components";
7
- import { toCssVariables as h, uuid as C } from "../../utils/functions/index.js";
8
- import s from "lodash/merge";
9
- import { Style as w } from "react-style-tag";
10
- import { K as G } from "../../chunks/useKitTheme.KSAU-Pdv.js";
11
- import { KitAristidThemeGeneral as a } from "../../theme/aristid/general/index.js";
12
- import { antdThemeConfig as I } from "../../theme/utils/tokens-mapper/index.js";
13
- import { frFR as f } from "../../translation/fr-FR/index.js";
14
- import { enUS as E } from "../../translation/en-US/index.js";
15
- import { a as _, u as j } from "../../chunks/index.qBmLATvd.js";
16
- import { mapKitLocaleToAntdLocale as A } from "../../translation/utils/index.js";
17
- import { d as F } from "../../chunks/notification-provider.5EFnJe91.js";
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "antd";
4
+ import "../../chunks/SnackBarProvider.xMKXdZ88.js";
5
+ import { K as k } from "../../chunks/index.1blqoZQ8.js";
6
+ import "../../theme/utils/tokens-mapper/index.js";
7
+ import "../../translation/utils/index.js";
8
+ import "../../chunks/index.qBmLATvd.js";
18
9
  import "../DataDisplay/Avatar/index.js";
19
10
  import "../DataDisplay/Badge/index.js";
20
- import { l as z } from "../../chunks/index.yWVMx2TR.js";
21
- import { KitEmpty as $ } from "../DataDisplay/Empty/index.js";
11
+ import "../DataDisplay/Empty/index.js";
22
12
  import "../DataDisplay/IdCard/index.js";
23
13
  import "../DataDisplay/Table/index.js";
24
14
  import "../DataDisplay/Tabs/index.js";
25
15
  import "../DataDisplay/Tree/index.js";
26
16
  import "../DataDisplay/Tooltip/index.js";
17
+ import "../../chunks/useKitTheme.KSAU-Pdv.js";
27
18
  import "classnames";
28
- const M = "aristid-ds-grid", m = (i, o) => !i && !o ? "" : i ? o ? `@media screen and (min-width: ${i}px) and (max-width: ${o}px)` : `@media screen and (min-width: ${i}px)` : `@media screen and (max-width: ${o}px)`, g = (i) => {
29
- var o, t;
30
- const e = (o = i.closed.colWidth) !== null && o !== void 0 ? o : "auto", r = (t = i.open.colWidth) !== null && t !== void 0 ? t : "auto";
31
- return `
32
- .kit-row-inner {
33
- grid-template-columns: repeat(${i.columns}, ${e === "auto" ? "1fr" : `${e}px`});
34
- column-gap: ${i.closed.colGap}px;
35
- width: ${e === "auto" ? "100%" : "auto"};
36
- ${i.closed.marginRight ? `margin-right: ${i.closed.marginRight}px;` : ""}
37
- ${i.horizontalPadding ? `padding: 0 ${i.horizontalPadding}px` : ""}
38
- }
39
- &.kit-row-menu-open {
40
- .kit-row-inner {
41
- grid-template-columns: repeat(${i.columns}, ${r === "auto" ? "1fr" : `${r}px`});
42
- column-gap: ${i.open.colGap}px;
43
- width: ${r === "auto" ? "100%" : "auto"};
44
- ${i.open.marginRight ? `margin-right: ${i.open.marginRight}px;` : ""}
45
- ${i.horizontalPadding ? `padding: 0 ${i.horizontalPadding}px` : ""}
46
- }
47
- }
48
- `;
49
- }, B = ({ theme: i, customTheme: o, id: t }) => {
50
- const r = K(() => s(i, o == null ? void 0 : o.general), [i, o]).breakpoints.reverse(), c = [
51
- // add css rules for fixed rows breakpoints (non mediaQueries)
52
- ...r.map((d) => `
53
- .${t}.kit-row.kit-row-fixed.${d} {
54
- ${g(i.grid[d])}
55
- }
56
- `),
57
- // add css rules for non width > larger breakpoints
58
- `
59
- ${m(i.grid[r[0]].width + 1, void 0)} {
60
- /* breakpoint: ${r[0]}*/
61
- .${t}.kit-row:not(.kit-row-fixed) {
62
- ${g(i.grid[r[0]])}
63
- }
64
- }
65
- `,
66
- // add css rules for intermediate breakpoints breakpoints
67
- ...r.slice(0, -1).map((d, l) => `
68
- ${m(i.grid[r[l + 1]].width + 1, i.grid[d].width)} {
69
- /* breakpoint: ${d}*/
70
- .${t}.kit-row:not(.kit-row-fixed) {
71
- ${g(i.grid[d])}
72
- }
73
- }
74
- `),
75
- // css rules for width < smallest breakpoint
76
- `
77
- ${m(void 0, i.grid[r[r.length - 1]].width)} {
78
- /* breakpoint: ${r[r.length - 1]}*/
79
- .${t}.kit-row:not(.kit-row-fixed) {
80
- ${g(i.grid[r[r.length - 1]])}
81
- }
82
- }
83
- `
84
- ];
85
- return n(w, { id: M, hasSourceMap: !1, children: c.join("") });
86
- }, N = R`
87
- .${(i) => i.id} {
88
- ${(i) => h(i.customTheme)};
89
-
90
- }
91
- `, U = "aristid-ds-global", V = ({ children: i, customTheme: o, id: t, useMediaQueries: e = !0 }) => {
92
- const [r, c] = k(null), { theme: d, appId: l, spacing: u } = D(t, o);
93
- return b(() => {
94
- const p = h(a, "--general");
95
- c(p);
96
- }, []), n(G.Provider, { value: { theme: d, appId: l, spacing: u }, children: r !== null && v(x, { children: [n(w, { id: U, hasSourceMap: !1, children: `
97
- :root{
98
- ${Object.keys(r).map((p) => `${p}: ${r[p]}`).join(";")}
99
- }
100
- ` }), o && n(N, { id: l, customTheme: s({ general: { utilities: a.utilities } }, o) }), e && n(B, { theme: a, customTheme: o, id: l }), i] }) });
101
- }, D = (i, o) => {
102
- var t, e, r;
103
- const c = S(i || "ds-" + C().substring(0, 8)), d = s(a.spacing, (t = o == null ? void 0 : o.general) === null || t === void 0 ? void 0 : t.spacing), l = s(a.breakpoints, (e = o == null ? void 0 : o.general) === null || e === void 0 ? void 0 : e.breakpoints), u = s(a.grid, (r = o == null ? void 0 : o.general) === null || r === void 0 ? void 0 : r.grid);
104
- return {
105
- theme: a,
106
- appId: c.current,
107
- spacing: d,
108
- breakpoints: l,
109
- grid: u
110
- };
111
- }, O = ({ children: i }) => {
112
- const o = Q();
113
- return n(_.Provider, { value: o, children: i });
114
- }, Q = () => {
115
- const [i, o] = k(f);
116
- return { locale: i, setKitLocale: (e) => {
117
- if (e.locale === "frFR") {
118
- const r = s(f, e);
119
- o(r);
120
- } else {
121
- const r = s(E, e);
122
- o(r);
123
- }
124
- } };
125
- }, wi = ({ children: i, locale: o, customTheme: t, id: e, useMediaQueries: r }) => n(V, { customTheme: t, id: e, useMediaQueries: r, children: n(O, { children: n(q, { locale: o, children: n(z, { children: i }) }) }) }), q = ({ children: i, locale: o }) => {
126
- const { locale: t, setKitLocale: e } = j();
127
- return P(() => {
128
- o !== void 0 && e(o);
129
- }, [o, e]), n(L, { theme: I, locale: A(o), renderEmpty: () => {
130
- var r;
131
- return n($, { className: "default-render", image: $.ASSET_LIST, description: (r = t.Empty) === null || r === void 0 ? void 0 : r.noData });
132
- }, children: v(F, { children: [n(y, {}), i] }) });
133
- };
134
19
  export {
135
- wi as KitApp
20
+ k as KitApp
136
21
  };
@@ -1,4 +1,4 @@
1
- import { a as e } from "../../../chunks/index.yWVMx2TR.js";
1
+ import { b as e } from "../../../chunks/index.1blqoZQ8.js";
2
2
  export {
3
3
  e as KitCollapse
4
4
  };
@@ -1,4 +1,4 @@
1
- import "../../../assets/index31.css";
1
+ import "../../../assets/index29.css";
2
2
  import { jsxs as e, jsx as a } from "react/jsx-runtime";
3
3
  import { Empty as m } from "antd";
4
4
  import { u } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
@@ -1,4 +1,5 @@
1
1
  import "react/jsx-runtime";
2
+ import "react";
2
3
  import "antd";
3
4
  import "../../../chunks/index.qBmLATvd.js";
4
5
  import "../../../chunks/useKitTheme.KSAU-Pdv.js";
@@ -12,7 +13,11 @@ import "color-string";
12
13
  import "lodash/isEmpty";
13
14
  import "classnames";
14
15
  import "../../../chunks/styles.module.Q_QQjQdX.js";
15
- import { b as g } from "../../../chunks/index.yWVMx2TR.js";
16
+ import { c as n } from "../../../chunks/index.1blqoZQ8.js";
17
+ import "../../Feedback/Alert/index.js";
18
+ import "../../Feedback/Progress/index.js";
19
+ import "../../Feedback/Loader/index.js";
20
+ import "react-hot-toast";
16
21
  export {
17
- g as KitError
22
+ n as KitError
18
23
  };
@@ -1,10 +1,15 @@
1
1
  import {EmptyProps} from 'antd';
2
2
  import {KitHTMLAttributes} from '../../../types';
3
- import {ReactNode} from 'react';
3
+ import {ReactElement, ReactNode} from 'react';
4
4
 
5
5
  type AntdEmptyTypesToOmit = 'description';
6
6
 
7
+ type KitHttpErrorCode = '401' | '403' | '404' | '500' | '502' | '503';
8
+
9
+ type KitErrorImageAlt = ({alt: string}) => ReactElement;
10
+
7
11
  export interface IKitError extends KitHTMLAttributes<HTMLDivElement>, Omit<EmptyProps, AntdEmptyTypesToOmit> {
8
12
  title: string;
9
13
  description: ReactNode;
14
+ httpErrorCode?: KitHttpErrorCode;
10
15
  }
@@ -9,7 +9,7 @@ import "../../DataEntry/Input/index.js";
9
9
  import "../../DataEntry/InputNumber/index.js";
10
10
  import "../../DataEntry/Radio/index.js";
11
11
  import "../../DataEntry/Rate/index.js";
12
- import { K as y } from "../../../chunks/index.yWVMx2TR.js";
12
+ import { a as y } from "../../../chunks/index.1blqoZQ8.js";
13
13
  import "../../DataEntry/Switch/index.js";
14
14
  import "../../DataEntry/DatePicker/index.js";
15
15
  import "../../DataEntry/AutoComplete/index.js";
@@ -5,7 +5,7 @@ import "../../DataEntry/Input/index.js";
5
5
  import "../../DataEntry/InputNumber/index.js";
6
6
  import "../../DataEntry/Radio/index.js";
7
7
  import "../../DataEntry/Rate/index.js";
8
- import { c as H } from "../../../chunks/index.yWVMx2TR.js";
8
+ import { d as H } from "../../../chunks/index.1blqoZQ8.js";
9
9
  import "../../DataEntry/Switch/index.js";
10
10
  import "../../DataEntry/DatePicker/index.js";
11
11
  import "../../DataEntry/AutoComplete/index.js";
@@ -4,9 +4,11 @@ import {IKitActionButton} from '../../DataDisplay/types';
4
4
  import {KitHTMLAttributes} from '../../../types';
5
5
 
6
6
  export interface IKitItemList extends KitHTMLAttributes<HTMLDivElement> {
7
- idCardProps: IKitIdCard;
7
+ idCardProps?: IKitIdCard;
8
+ idCardSubstitute?: ReactNode;
8
9
  draggableHandler?: ReactNode;
9
10
  onSelect?: (isChecked: boolean) => void;
11
+ checkboxAriaLabel?: string;
10
12
  onClick?: () => void;
11
13
  actions?: IKitActionButton[];
12
14
  content?: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "classnames";
3
- import { d as g } from "../../../chunks/index.yWVMx2TR.js";
3
+ import { e as g } from "../../../chunks/index.1blqoZQ8.js";
4
4
  import "react";
5
5
  import "../../../chunks/useKitTheme.KSAU-Pdv.js";
6
6
  import "@fortawesome/react-fontawesome";
@@ -1,43 +1,43 @@
1
1
  import "../../../assets/index20.css";
2
- import { jsx as a } from "react/jsx-runtime";
2
+ import { jsx as o } from "react/jsx-runtime";
3
3
  import { Table as I } from "antd";
4
- import k from "classnames";
5
- import { u as N } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
6
- import { KitButton as g } from "../../General/Button/index.js";
4
+ import N from "classnames";
5
+ import { u as g } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
6
+ import { KitButton as A } from "../../General/Button/index.js";
7
7
  import "../../General/Typography/index.js";
8
- import { KitIcon as A } from "../../General/Icon/index.js";
9
- import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
10
- import { faUpDown as K, faArrowDown as T, faArrowUp as R, faCaretDown as j, faCaretRight as z } from "@fortawesome/free-solid-svg-icons";
11
- const h = {
12
- "kit-table": "_kit-table_ztqiv_2",
13
- "expand-button": "_expand-button_ztqiv_555"
8
+ import { KitIcon as S } from "../../General/Icon/index.js";
9
+ import { FontAwesomeIcon as w } from "@fortawesome/react-fontawesome";
10
+ import { faUpDown as K, faArrowDown as T, faArrowUp as R, faCaretDown as W, faCaretRight as j } from "@fortawesome/free-solid-svg-icons";
11
+ const f = {
12
+ "kit-table": "_kit-table_nebkd_2",
13
+ "expand-button": "_expand-button_nebkd_556"
14
14
  }, _ = (n) => {
15
- const l = n == null ? void 0 : n.split(" "), i = l == null ? void 0 : l.filter((e) => e !== "ant-table-cell").join(" "), o = l == null ? void 0 : l.filter((e) => ["ant-table-cell", "ant-table-cell-ellipsis", "ant-table-selection-column"].includes(e)).join(" ");
15
+ const l = n == null ? void 0 : n.split(" "), i = l == null ? void 0 : l.filter((t) => t !== "ant-table-cell").join(" "), a = l == null ? void 0 : l.filter((t) => ["ant-table-cell", "ant-table-cell-ellipsis", "ant-table-selection-column"].includes(t)).join(" ");
16
16
  return {
17
17
  antCell: i,
18
- internalCell: o
18
+ internalCell: a
19
19
  };
20
20
  }, D = (n) => ({
21
21
  header: {
22
- cell: ({ children: l, className: i, style: o, title: e, rowSpan: d, colSpan: c, ...v }) => {
23
- const s = _(i);
24
- return a("th", { className: s.antCell, style: o, title: e, rowSpan: d, colSpan: c, ...v, children: a("div", { className: s.internalCell, children: l }) });
22
+ cell: ({ children: l, className: i, style: a, title: t, rowSpan: c, colSpan: s, ...v }) => {
23
+ const d = _(i);
24
+ return o("th", { className: d.antCell, style: a, title: t, rowSpan: c, colSpan: s, ...v, children: o("div", { className: d.internalCell, children: l }) });
25
25
  }
26
26
  },
27
27
  body: {
28
- cell: ({ children: l, className: i, style: o, title: e, rowSpan: d, colSpan: c, ...v }) => {
29
- var s, u;
30
- const C = (s = n == null ? void 0 : n.body) === null || s === void 0 ? void 0 : s.cell, b = _(i);
31
- let f = "";
32
- return !((u = b.antCell) === null || u === void 0) && u.includes("ant-table-cell-ellipsis") && (f = e), a("td", { className: b.antCell, style: o, title: f, rowSpan: d, colSpan: c, children: a("div", { className: b.internalCell, children: C ? a(C, { title: e, ...v, children: l }) : l }) });
28
+ cell: ({ children: l, className: i, style: a, title: t, rowSpan: c, colSpan: s, ...v }) => {
29
+ var d, u;
30
+ const h = (d = n == null ? void 0 : n.body) === null || d === void 0 ? void 0 : d.cell, b = _(i);
31
+ let C = "";
32
+ return !((u = b.antCell) === null || u === void 0) && u.includes("ant-table-cell-ellipsis") && (C = t), o("td", { className: b.antCell, style: a, title: C, rowSpan: c, colSpan: s, children: o("div", { className: b.internalCell, children: h ? o(h, { title: t, ...v, children: l }) : l }) });
33
33
  },
34
34
  row: ({ children: l, ...i }) => {
35
- var o;
36
- const e = (o = n == null ? void 0 : n.body) === null || o === void 0 ? void 0 : o.row;
37
- return e ? a("tr", { ...i, tabIndex: 0, children: a(e, { children: l }) }) : a("tr", { ...i, tabIndex: 0, children: l });
35
+ var a;
36
+ const t = (a = n == null ? void 0 : n.body) === null || a === void 0 ? void 0 : a.row;
37
+ return t ? o("tr", { ...i, tabIndex: 0, children: o(t, { children: l }) }) : o("tr", { ...i, tabIndex: 0, children: l });
38
38
  }
39
39
  }
40
- }), S = ({ sortOrder: n }) => {
40
+ }), U = ({ sortOrder: n }) => {
41
41
  let l, i;
42
42
  switch (n) {
43
43
  case "ascend":
@@ -50,35 +50,39 @@ const h = {
50
50
  l = K;
51
51
  break;
52
52
  }
53
- return a(A, { color: i, icon: a(x, { icon: l }) });
54
- }, W = ({ className: n, style: l, cellsBackgroundColor: i, columns: o, onChange: e, components: d, ...c }) => {
55
- const { appId: v, theme: s } = N(), u = k(v, h["kit-table"], n), C = o == null ? void 0 : o.map((t) => (t.sorter && (t.sortIcon = ({ sortOrder: p }) => a(S, { sortOrder: p })), t)), b = (t, p, m, r) => {
56
- e == null || e(t, m, r);
57
- }, f = ({ record: t, expanded: p, onExpand: m }) => {
53
+ return o(S, { color: i, icon: o(w, { icon: l }) });
54
+ }, z = ({ className: n, style: l, cellsBackgroundColor: i, columns: a, onChange: t, components: c, ...s }) => {
55
+ const { appId: v, theme: d } = g(), u = N(v, f["kit-table"], n), h = a == null ? void 0 : a.map((e) => (e.sorter && (e.sortIcon = ({ sortOrder: m }) => o(U, { sortOrder: m })), e)), b = (e, m, p, r) => {
56
+ t == null || t(e, p, r);
57
+ }, C = ({ record: e, expanded: m, onExpand: p }) => {
58
58
  var r;
59
- if (!(!Array.isArray(t == null ? void 0 : t.children) || !(!((r = t == null ? void 0 : t.children) === null || r === void 0) && r.length)))
60
- return a(g, { className: h["expand-button"], type: "tertiary", onClick: (y) => m(t, y), children: a(x, { icon: p ? j : z }) });
61
- }, w = (t, p, m) => {
59
+ if (!(!Array.isArray(e == null ? void 0 : e.children) || !(!((r = e == null ? void 0 : e.children) === null || r === void 0) && r.length)))
60
+ return o(A, { className: f["expand-button"], type: "tertiary", onClick: (y) => p(e, y), children: o(w, { icon: m ? W : j }) });
61
+ }, x = (e, m, p) => {
62
62
  var r;
63
- return m > 0 && (!Array.isArray(t == null ? void 0 : t.children) || !(!((r = t == null ? void 0 : t.children) === null || r === void 0) && r.length)) ? "last-expandable-level" : "";
64
- };
65
- return a(I, {
63
+ return p > 0 && (!Array.isArray(e == null ? void 0 : e.children) || !(!((r = e == null ? void 0 : e.children) === null || r === void 0) && r.length)) ? "last-expandable-level" : "";
64
+ }, k = { ...s == null ? void 0 : s.rowSelection };
65
+ return o(I, {
66
66
  className: u,
67
67
  style: { "--kit-table-cells-background-color": i, ...l },
68
- columns: C,
69
- components: D(d),
68
+ columns: h,
69
+ components: D(c),
70
70
  onChange: b,
71
71
  // Pour l'instant on garde expandable dans les props à Omit<>
72
72
  // A voir si on permet de custom uniquement certaines propriété
73
73
  expandable: {
74
- expandedRowClassName: w,
75
- expandIcon: f,
76
- indentSize: s.spacing.m
74
+ expandedRowClassName: x,
75
+ expandIcon: C,
76
+ indentSize: d.spacing.m
77
77
  },
78
- ...c
78
+ ...s,
79
+ rowSelection: {
80
+ ...k,
81
+ columnWidth: "var(--kit-table-checkbox-width)"
82
+ }
79
83
  });
80
84
  };
81
- W.displayName = "KitTable";
85
+ z.displayName = "KitTable";
82
86
  export {
83
- W as KitTable
87
+ z as KitTable
84
88
  };
@@ -1,4 +1,4 @@
1
- import { e as o } from "../../../chunks/index.yWVMx2TR.js";
1
+ import { f as o } from "../../../chunks/index.1blqoZQ8.js";
2
2
  export {
3
3
  o as KitTag
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { KitAvatar as o } from "./Avatar/index.js";
2
2
  import { KitBadge as a } from "./Badge/index.js";
3
- import { a as K, b as m, K as p, c as f, d as x, e as s } from "../../chunks/index.yWVMx2TR.js";
3
+ import { b as K, c as m, a as p, d as f, e as x, f as s } from "../../chunks/index.1blqoZQ8.js";
4
4
  import { KitEmpty as T } from "./Empty/index.js";
5
5
  import { KitIdCard as C } from "./IdCard/index.js";
6
6
  import { K as b } from "../../chunks/index.qBmLATvd.js";
@@ -1,27 +1,28 @@
1
1
  import "../../../assets/index8.css";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import { forwardRef as I, useState as N } from "react";
4
- import { AutoComplete as y } from "antd";
5
- import { KitInput as O } from "../Input/index.js";
6
- import { K as P } from "../../../chunks/InputWrapper.ZM2BYw23.js";
7
- import { FontAwesomeIcon as j } from "@fortawesome/react-fontawesome";
8
- import { faMagnifyingGlass as B } from "@fortawesome/free-solid-svg-icons";
9
- import G from "classnames";
10
- const M = {
3
+ import { forwardRef as F, useState as v } from "react";
4
+ import { AutoComplete as O } from "antd";
5
+ import { KitInput as P } from "../Input/index.js";
6
+ import { K as j } from "../../../chunks/InputWrapper.tJodbKzs.js";
7
+ import { FontAwesomeIcon as B } from "@fortawesome/react-fontawesome";
8
+ import { faMagnifyingGlass as G } from "@fortawesome/free-solid-svg-icons";
9
+ import M from "classnames";
10
+ const R = {
11
11
  "kit-autocomplete": "_kit-autocomplete_kox09_2"
12
- }, R = (e, r, o) => G(e, "ant-select-dropdown", "kit-select-dropdown-bottom", {
12
+ }, S = (e, r, o) => M(e, "ant-select-dropdown", "kit-select-dropdown-bottom", {
13
13
  "kit-select-dropdown-focus": r,
14
14
  "kit-select-dropdown-error": o === "error",
15
15
  "kit-select-dropdown-warning": o === "warning"
16
- }), S = I(({ allowClear: e, label: r, helper: o, autoFocus: l, defaultValue: a, disabled: i, placeholder: f, status: n, value: u, onFocus: s, onBlur: m, popupClassName: d, wrapperClassName: w, required: k, infoIcon: _, actions: g, onInfoClick: C, ...K }, h) => {
17
- const [x, c] = N(!1), A = (p) => {
18
- c(!0), s && s(p);
19
- }, F = (p) => {
20
- c(!1), m && m(p);
16
+ }), W = F(({ allowClear: e, label: r, helper: o, htmlFor: s, autoFocus: d, defaultValue: u, disabled: m, placeholder: w, status: i, value: k, onFocus: c, onBlur: l, popupClassName: _, wrapperClassName: g, required: C, infoIcon: K, actions: x, onInfoClick: A, ...a }, I) => {
17
+ var n;
18
+ const [N, f] = v(!1), h = (p) => {
19
+ f(!0), c && c(p);
20
+ }, y = (p) => {
21
+ f(!1), l && l(p);
21
22
  };
22
- return t(P, { label: r, helper: o, disabled: i, status: n, className: w, required: k, infoIcon: _, actions: g, onInfoClick: C, children: t(y, { ...K, disabled: i, ref: h, className: M["kit-autocomplete"], popupClassName: R(d, x, n), children: t(O, { prefix: t(j, { icon: B }), allowClear: e, autoFocus: l, defaultValue: a, placeholder: f, status: n, value: u, onBlur: F, onFocus: A }) }) });
23
+ return t(j, { label: r, helper: o, htmlFor: s, disabled: m, status: i, className: g, required: C, infoIcon: K, actions: x, onInfoClick: A, children: t(O, { ...a, id: (n = a.id) !== null && n !== void 0 ? n : s, disabled: m, ref: I, className: R["kit-autocomplete"], popupClassName: S(_, N, i), children: t(P, { prefix: t(B, { icon: G }), allowClear: e, autoFocus: d, defaultValue: u, placeholder: w, status: i, value: k, onBlur: y, onFocus: h }) }) });
23
24
  });
24
- S.displayName = "KitAutoComplete";
25
+ W.displayName = "KitAutoComplete";
25
26
  export {
26
- S as KitAutoComplete
27
+ W as KitAutoComplete
27
28
  };
@@ -5,6 +5,7 @@ import {ReactNode, ReactElement, MouseEvent} from 'react';
5
5
  export interface IKitAutoComplete extends AutoCompleteProps<T, E>, KitHTMLAttributes<HTMLInputElement> {
6
6
  label?: string;
7
7
  helper?: string;
8
+ htmlFor?: string;
8
9
  allowClear?: boolean;
9
10
  placeholder?: string;
10
11
  wrapperClassName?: string;
@@ -7,7 +7,7 @@ import w from "classnames";
7
7
  import te from "rc-util/es/omit";
8
8
  import { ConfigContext as ce } from "antd/es/config-provider/";
9
9
  import ie from "antd/es/checkbox/style";
10
- import { K as ue } from "../../../chunks/InputWrapper.ZM2BYw23.js";
10
+ import { K as ue } from "../../../chunks/InputWrapper.tJodbKzs.js";
11
11
  const R = p(null), de = ({ defaultValue: v, children: o, options: a = [], prefixCls: m, className: l, wrapperClassName: f, status: b, rootClassName: u, style: t, onChange: d, label: x, helper: j, required: A, infoIcon: B, actions: D, onInfoClick: E, ...n }, T) => {
12
12
  const { getPrefixCls: W, direction: q } = O(ce), [s, G] = S(n.value || v || []), [z, y] = S([]);
13
13
  V(() => {
@@ -1,6 +1,6 @@
1
1
  import "../../../assets/index10.css";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import { K as f } from "../../../chunks/InputWrapper.ZM2BYw23.js";
3
+ import { K as f } from "../../../chunks/InputWrapper.tJodbKzs.js";
4
4
  import { u as C } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
5
5
  import { ColorPicker as K } from "antd";
6
6
  import i from "classnames";
@@ -1,24 +1,26 @@
1
1
  import "../../../assets/index22.css";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { faCircleXmark as I, faClock as K, faCalendar as h, faArrowRight as A } from "@fortawesome/free-solid-svg-icons";
4
- import { FontAwesomeIcon as i } from "@fortawesome/react-fontawesome";
5
- import { K as R } from "../../../chunks/InputWrapper.ZM2BYw23.js";
6
- import { u as w } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
7
- import { DatePicker as C } from "antd";
8
- import D from "classnames";
9
- import { forwardRef as x } from "react";
10
- const N = {
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { faCircleXmark as R, faClock as w, faCalendar as C, faArrowRight as W } from "@fortawesome/free-solid-svg-icons";
4
+ import { FontAwesomeIcon as a } from "@fortawesome/react-fontawesome";
5
+ import { K as D } from "../../../chunks/InputWrapper.tJodbKzs.js";
6
+ import { u as h } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
7
+ import { DatePicker as x } from "antd";
8
+ import N from "classnames";
9
+ import { forwardRef as g } from "react";
10
+ const z = {
11
11
  "kit-datepicker": "_kit-datepicker_122z1_2",
12
12
  "kit-rangepicker": "_kit-rangepicker_122z1_133"
13
- }, S = x(({ label: d, helper: m, suffixIcon: a, className: r, wrapperClassName: o, picker: c = "date", allowClear: f = !0, required: p, infoIcon: u, actions: k, onInfoClick: l, readonly: t = !1, disabled: n, ...s }, b) => {
14
- const { appId: v } = w(), _ = () => c === "time" ? e(i, { icon: K }) : e(i, { icon: h }), z = D(v, N["kit-datepicker"], r, t ? "kit-picker-readonly" : "");
15
- return e(R, { label: d, helper: m, disabled: n, status: s.status, className: o, required: p, infoIcon: u, actions: k, onInfoClick: l, children: e("div", { children: e(C, { ...s, picker: c, disabled: t || n, variant: t ? "borderless" : void 0, ref: b, suffixIcon: a ?? _(), allowClear: !t && f ? { clearIcon: e(i, { "aria-label": "clear", icon: I }) } : !1, className: z }) }) });
16
- }), W = x(({ label: d, className: m, helper: a, suffixIcon: r, picker: o, allowClear: c = !0, required: f, infoIcon: p, actions: u, onInfoClick: k, readonly: l = !1, ...t }, n) => {
17
- const { appId: s } = w(), b = () => o === "time" ? e(i, { icon: K }) : e(i, { icon: h }), v = () => t.disabled === void 0 ? !1 : typeof t.disabled == "boolean" ? t.disabled : t.disabled[0] && t.disabled[1], _ = D(s, N["kit-rangepicker"], m, l ? "kit-picker-readonly" : "");
18
- return e(R, { label: d, helper: a, disabled: v(), status: t.status, required: f, infoIcon: p, actions: u, onInfoClick: k, children: e("div", { children: e(C.RangePicker, { ...t, picker: o, ref: n, disabled: l || t.disabled, variant: l ? "borderless" : void 0, suffixIcon: r ?? b(), allowClear: c ? { clearIcon: e(i, { "aria-label": "clear", icon: I }) } : !1, className: _, separator: e(i, { icon: A }) }) }) });
19
- }), j = W, g = S;
20
- g.displayName = "KitDatePicker";
21
- g.RangePicker = j;
13
+ }, j = g(({ label: m, helper: u, htmlFor: c, suffixIcon: r, className: l, wrapperClassName: s, picker: d = "date", allowClear: p = !0, required: b, infoIcon: k, actions: v, onInfoClick: n, readonly: i = !1, disabled: f, ...e }, _) => {
14
+ var o;
15
+ const { appId: I } = h(), K = () => d === "time" ? t(a, { icon: w }) : t(a, { icon: C }), S = N(I, z["kit-datepicker"], l, i ? "kit-picker-readonly" : "");
16
+ return t(D, { label: m, helper: u, htmlFor: c, disabled: f, status: e.status, className: s, required: b, infoIcon: k, actions: v, onInfoClick: n, children: t("div", { children: t(x, { ...e, id: (o = e.id) !== null && o !== void 0 ? o : c, picker: d, disabled: i || f, variant: i ? "borderless" : void 0, ref: _, suffixIcon: r ?? K(), allowClear: !i && p ? { clearIcon: t(a, { "aria-label": "clear", icon: R }) } : !1, className: S }) }) });
17
+ }), T = g(({ label: m, className: u, helper: c, htmlFor: r, suffixIcon: l, picker: s, allowClear: d = !0, required: p, infoIcon: b, actions: k, onInfoClick: v, readonly: n = !1, ...i }, f) => {
18
+ var e;
19
+ const { appId: _ } = h(), o = () => s === "time" ? t(a, { icon: w }) : t(a, { icon: C }), I = () => i.disabled === void 0 ? !1 : typeof i.disabled == "boolean" ? i.disabled : i.disabled[0] && i.disabled[1], K = N(_, z["kit-rangepicker"], u, n ? "kit-picker-readonly" : "");
20
+ return t(D, { label: m, helper: c, htmlFor: r, disabled: I(), status: i.status, required: p, infoIcon: b, actions: k, onInfoClick: v, children: t("div", { children: t(x.RangePicker, { ...i, id: (e = i.id) !== null && e !== void 0 ? e : r, picker: s, ref: f, disabled: n || i.disabled, variant: n ? "borderless" : void 0, suffixIcon: l ?? o(), allowClear: d ? { clearIcon: t(a, { "aria-label": "clear", icon: R }) } : !1, className: K, separator: t(a, { icon: W }) }) }) });
21
+ }), X = T, A = j;
22
+ A.displayName = "KitDatePicker";
23
+ A.RangePicker = X;
22
24
  export {
23
- g as KitDatePicker
25
+ A as KitDatePicker
24
26
  };
@@ -7,6 +7,7 @@ interface IInternalDatePicker {
7
7
  bordered?: never;
8
8
  label?: string;
9
9
  helper?: string;
10
+ htmlFor?: string;
10
11
  allowClear?: boolean;
11
12
  cellRender?: DatePickerProps['cellrender'];
12
13
  wrapperClassName?: string;
@@ -31,6 +32,7 @@ interface IInternalRangerPicker {
31
32
  bordered?: never;
32
33
  label?: string;
33
34
  helper?: string;
35
+ htmlFor?: string;
34
36
  allowClear?: boolean;
35
37
  required?: boolean;
36
38
  infoIcon?: ReactNode;