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.
- package/CHANGELOG.md +40 -1
- package/README.md +1 -1
- package/dist/Kit/App/index.js +11 -126
- package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +7 -2
- package/dist/Kit/DataDisplay/Error/types.d.ts +6 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/types.d.ts +3 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Table/index.js +47 -43
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/index.js +1 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +18 -17
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +1 -0
- package/dist/Kit/DataEntry/Checkbox/index.js +1 -1
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +21 -19
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +2 -0
- package/dist/Kit/DataEntry/Input/index.js +26 -25
- package/dist/Kit/DataEntry/Input/types.d.ts +3 -0
- package/dist/Kit/DataEntry/InputNumber/index.js +12 -11
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -0
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/InputWrapper/types.d.ts +4 -0
- package/dist/Kit/DataEntry/Radio/index.js +2 -2
- package/dist/Kit/DataEntry/Select/index.js +3 -3
- package/dist/Kit/DataEntry/Select/types.d.ts +1 -0
- package/dist/Kit/DataEntry/index.js +5 -5
- package/dist/Kit/Feedback/Modal/index.js +2 -158
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/Skeleton/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +6 -6
- package/dist/Kit/Feedback/index.js +5 -5
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/Layout/Grid/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/PageLayout.d.ts +3 -0
- package/dist/Kit/Layout/PageLayout/index.d.ts +2 -0
- package/dist/Kit/Layout/PageLayout/index.js +4 -0
- package/dist/Kit/Layout/PageLayout/types.d.ts +8 -0
- package/dist/Kit/Layout/index.d.ts +1 -0
- package/dist/Kit/Layout/index.js +7 -6
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/Menu/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +2 -2
- package/dist/Kit/Navigation/SideMenu/types.d.ts +1 -0
- package/dist/Kit/Navigation/index.js +3 -3
- package/dist/Kit/index.js +149 -150
- package/dist/assets/InputWrapper.css +1 -1
- package/dist/assets/error/common-error.d.ts +1 -0
- package/dist/assets/error/error-401.d.ts +3 -0
- package/dist/assets/error/error-403.d.ts +3 -0
- package/dist/assets/error/error-404.d.ts +3 -1
- package/dist/assets/error/error-500.d.ts +3 -0
- package/dist/assets/error/error-502.d.ts +3 -0
- package/dist/assets/error/error-503.d.ts +3 -0
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/chunks/InputWrapper.tJodbKzs.js +32 -0
- package/dist/chunks/{KitNotification.5nMicwaN.js → KitNotification.m5Z-BPRz.js} +7 -8
- package/dist/chunks/SnackBarProvider.xMKXdZ88.js +22 -0
- package/dist/chunks/index.1blqoZQ8.js +963 -0
- package/dist/index.es.js +128 -130
- package/dist/index.umd.js +15 -15
- package/dist/theme/aristid/general/index.js +6 -5
- package/dist/theme/types/index.d.ts +5 -0
- package/dist/translation/en-US/components/DataDisplay/Error/index.js +1 -1
- package/dist/translation/fr-FR/components/DataDisplay/Error/index.js +1 -1
- package/dist/translation/types/components/DataDisplay/Error/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/assets/index31.css +0 -1
- package/dist/assets/index32.css +0 -1
- package/dist/chunks/InputWrapper.ZM2BYw23.js +0 -30
- package/dist/chunks/SnackBarProvider.iuCIyLXl.js +0 -22
- package/dist/chunks/index.yWVMx2TR.js +0 -611
- 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
|
-
|
|
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
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,136 +1,21 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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
|
|
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
|
-
|
|
20
|
+
k as KitApp
|
|
136
21
|
};
|
|
@@ -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 {
|
|
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
|
-
|
|
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 {
|
|
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 {
|
|
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
|
|
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 {
|
|
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
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { Table as I } from "antd";
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
import { KitButton as
|
|
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
|
|
9
|
-
import { FontAwesomeIcon as
|
|
10
|
-
import { faUpDown as K, faArrowDown as T, faArrowUp as R, faCaretDown as
|
|
11
|
-
const
|
|
12
|
-
"kit-table": "_kit-
|
|
13
|
-
"expand-button": "_expand-
|
|
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((
|
|
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:
|
|
18
|
+
internalCell: a
|
|
19
19
|
};
|
|
20
20
|
}, D = (n) => ({
|
|
21
21
|
header: {
|
|
22
|
-
cell: ({ children: l, className: i, style:
|
|
23
|
-
const
|
|
24
|
-
return
|
|
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:
|
|
29
|
-
var
|
|
30
|
-
const
|
|
31
|
-
let
|
|
32
|
-
return !((u = b.antCell) === null || u === void 0) && u.includes("ant-table-cell-ellipsis") && (
|
|
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
|
|
36
|
-
const
|
|
37
|
-
return
|
|
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
|
-
}),
|
|
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
|
|
54
|
-
},
|
|
55
|
-
const { appId: v, theme:
|
|
56
|
-
|
|
57
|
-
},
|
|
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(
|
|
60
|
-
return
|
|
61
|
-
},
|
|
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
|
|
64
|
-
};
|
|
65
|
-
return
|
|
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:
|
|
69
|
-
components: 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:
|
|
75
|
-
expandIcon:
|
|
76
|
-
indentSize:
|
|
74
|
+
expandedRowClassName: x,
|
|
75
|
+
expandIcon: C,
|
|
76
|
+
indentSize: d.spacing.m
|
|
77
77
|
},
|
|
78
|
-
...
|
|
78
|
+
...s,
|
|
79
|
+
rowSelection: {
|
|
80
|
+
...k,
|
|
81
|
+
columnWidth: "var(--kit-table-checkbox-width)"
|
|
82
|
+
}
|
|
79
83
|
});
|
|
80
84
|
};
|
|
81
|
-
|
|
85
|
+
z.displayName = "KitTable";
|
|
82
86
|
export {
|
|
83
|
-
|
|
87
|
+
z as KitTable
|
|
84
88
|
};
|
|
@@ -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 {
|
|
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
|
|
4
|
-
import { AutoComplete as
|
|
5
|
-
import { KitInput as
|
|
6
|
-
import { K as
|
|
7
|
-
import { FontAwesomeIcon as
|
|
8
|
-
import { faMagnifyingGlass as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
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
|
-
},
|
|
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
|
-
}),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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(
|
|
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
|
-
|
|
25
|
+
W.displayName = "KitAutoComplete";
|
|
25
26
|
export {
|
|
26
|
-
|
|
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.
|
|
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.
|
|
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
|
|
3
|
-
import { faCircleXmark as
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { K as
|
|
6
|
-
import { u as
|
|
7
|
-
import { DatePicker as
|
|
8
|
-
import
|
|
9
|
-
import { forwardRef as
|
|
10
|
-
const
|
|
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
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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;
|