aristid-ds 14.0.0-d129b0e → 14.0.0-e09fce2
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 +58 -17
- package/dist/Kit/App/index.js +15 -15
- package/dist/Kit/DataDisplay/Avatar/index.js +1 -1
- package/dist/Kit/DataDisplay/Avatar/types.d.ts +1 -0
- 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 +1 -1
- package/dist/Kit/DataDisplay/IdCard/index.js +59 -24
- package/dist/Kit/DataDisplay/IdCard/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +36 -22
- package/dist/Kit/DataDisplay/Tabs/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +57 -56
- package/dist/Kit/DataDisplay/Tag/types.d.ts +1 -0
- package/dist/Kit/DataEntry/AutoComplete/index.js +3 -3
- package/dist/Kit/DataEntry/Checkbox/index.js +2 -2
- package/dist/Kit/DataEntry/ColorPicker/index.js +70 -66
- package/dist/Kit/DataEntry/ColorPicker/types.d.ts +3 -1
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +1 -12
- package/dist/Kit/DataEntry/DatePicker/index.js +31 -29
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +4 -2
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Input/index.js +35 -31
- package/dist/Kit/DataEntry/Input/types.d.ts +3 -1
- package/dist/Kit/DataEntry/InputNumber/index.js +20 -19
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +2 -1
- package/dist/Kit/DataEntry/InputWrapper/InputWrapper.d.ts +2 -2
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/index.js +2 -2
- package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/index.js +51 -50
- package/dist/Kit/DataEntry/RichText/types.d.ts +1 -0
- package/dist/Kit/DataEntry/SearchInput/index.d.ts +3 -0
- package/dist/Kit/DataEntry/SearchInput/index.js +18 -0
- package/dist/Kit/DataEntry/SearchInput/types.d.ts +5 -0
- package/dist/Kit/DataEntry/Select/index.js +67 -66
- package/dist/Kit/DataEntry/Select/types.d.ts +3 -1
- package/dist/Kit/DataEntry/Slider/index.js +1 -1
- package/dist/Kit/DataEntry/Switch/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/index.js +3 -3
- package/dist/Kit/DataEntry/Upload/index.js +22 -22
- package/dist/Kit/Feedback/Alert/index.js +1 -1
- package/dist/Kit/Feedback/Loader/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Progress/index.js +1 -1
- package/dist/Kit/Feedback/Skeleton/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/SnackBarProvider.d.ts +3 -1
- package/dist/Kit/Feedback/SnackBar/index.d.ts +4 -3
- package/dist/Kit/Feedback/SnackBar/index.js +24 -23
- package/dist/Kit/Feedback/SnackBar/snack-bar-function.d.ts +2 -2
- package/dist/Kit/Feedback/SnackBar/types.d.ts +4 -0
- package/dist/Kit/General/Button/index.js +54 -54
- package/dist/Kit/General/Button/types.d.ts +0 -1
- package/dist/Kit/General/Icon/index.js +1 -1
- package/dist/Kit/Layout/Divider/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Layout/Section/index.js +1 -1
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +41 -41
- package/dist/Kit/Navigation/Header/index.js +29 -29
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +34 -34
- package/dist/Kit/Navigation/SidePanel/index.d.ts +2 -0
- package/dist/Kit/Navigation/SidePanel/index.js +71 -59
- package/dist/Kit/Navigation/SidePanel/types.d.ts +2 -1
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/index.d.ts +3 -0
- package/dist/Kit/index.js +147 -143
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.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/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index50.css +1 -0
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/assets/useGetPopupContainer.css +1 -1
- package/dist/chunks/Avatar.BvI60jet.js +47 -0
- package/dist/chunks/InputWrapper.hIFFr5AB.js +27 -0
- package/dist/chunks/SnackBarProvider.wBpPNyLk.js +23 -0
- package/dist/chunks/{styles.module.iV2bcv-5.js → styles.module.V-A2OGgm.js} +1 -1
- package/dist/chunks/useGetPopupContainer.IH43I5PS.js +18 -0
- package/dist/index.es.js +156 -152
- package/dist/index.umd.js +4 -4
- package/dist/theme/types/components/Navigation/SidePanel/index.d.ts +6 -1
- package/dist/utils/functions/colors.d.ts +2 -0
- package/dist/utils/functions/index.js +101 -60
- package/package.json +5 -7
- package/dist/chunks/Avatar.N2w2jq_C.js +0 -30
- package/dist/chunks/InputWrapper.XK7lKnUm.js +0 -24
- package/dist/chunks/SnackBarProvider.nqDzpFo3.js +0 -23
- package/dist/chunks/useGetPopupContainer.1ha3p9Qd.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,40 +2,68 @@
|
|
|
2
2
|
|
|
3
3
|
## [X.Y.Z](https://www.npmjs.com/package/aristid-ds/v/X.Y.Z) (2025-MM-DD)
|
|
4
4
|
|
|
5
|
-
### ✨ Features
|
|
6
|
-
|
|
5
|
+
### ✨ Features
|
|
6
|
+
|
|
7
|
+
- **⚠️ Breaking change - Button**:
|
|
8
|
+
- Remove `checked` prop from segmented button (@evoiron)
|
|
9
|
+
- **⚠️ Breaking change - IdCard**:
|
|
10
|
+
- Replacing `size` options (@fatb38)
|
|
11
|
+
- removing `medium` and `large`
|
|
12
|
+
- adding `xxs-medium`, `xs-medium`, `xs-bold`, `s`, `m`, `l`, `xl`
|
|
13
|
+
- **⚠️ Breaking change - Input**:
|
|
14
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
15
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
16
|
+
- **⚠️ Breaking change - DatePicker/RangePicker**:
|
|
17
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
18
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
7
19
|
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
8
|
-
|
|
9
|
-
-
|
|
20
|
+
- **⚠️ Breaking change - RichText**:
|
|
21
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
22
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
23
|
+
- **⚠️ Breaking change - Select**:
|
|
24
|
+
- Rename `readonly` property to `readonlyLight` (@philippechevieux)
|
|
25
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
10
26
|
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
11
|
-
|
|
12
|
-
-
|
|
27
|
+
- **⚠️ Breaking change - Avatar**:
|
|
28
|
+
- Replace `size` option by : `xs`, `s`, `m`, `l`, `xl` (@fatb38)
|
|
29
|
+
- **Header**:
|
|
30
|
+
- Change 'height' to 48px instead of 64px
|
|
31
|
+
- **SideMenu**:
|
|
32
|
+
- Change 'width' to 48px instead of 64px
|
|
33
|
+
- **AutoComplete**:
|
|
13
34
|
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
14
|
-
|
|
15
|
-
- **Input**:
|
|
35
|
+
- **ColorPicker**:
|
|
16
36
|
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
17
|
-
|
|
37
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
18
38
|
- **InputNumber**:
|
|
19
39
|
- Add `size` property to enable `small`, `middle` and `large` sizes (@fatb38)
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
- Add
|
|
23
|
-
|
|
40
|
+
- Add `readonly` property whith a render similar to disabled state (@philippechevieux)
|
|
41
|
+
- **SearchInput**:
|
|
42
|
+
- Add component SearchInput (@baloche)
|
|
24
43
|
- **SidePanel**:
|
|
25
44
|
- Add opening and closing animations (@philippechevieux)
|
|
26
|
-
|
|
27
|
-
- **SidePanel:**
|
|
45
|
+
- Add `l` size (@7Remy)
|
|
28
46
|
- Add `useChildrenOnly` property to display the side panel as a container for other components or not. Also export two new components `KitSidePanelHeader` and `KitSidePanelContent` for layout purpose (@philippechevieux)
|
|
29
47
|
- Add `headerExtraButtons` property to display buttons or any components on the right side of the header next to the close button (@philippechevieux)
|
|
30
48
|
- Add `showSeparator` property to display a separator between header and content (@philippechevieux)
|
|
49
|
+
- Add `onCloseAfterAnimation` callback that triggers after the closing animation completes instead of immediately on close (@philippechevieux)
|
|
31
50
|
- Allow user to use `size` property when using `idCardProps` (@philippechevieux)
|
|
32
51
|
- Reduce internal paddings to save space (@philippechevieux)
|
|
33
|
-
|
|
52
|
+
- Improve alignments of `KitSidePanelHeader` (@philippechevieux)
|
|
34
53
|
- **IdCard:**
|
|
35
54
|
- Add support for ReactNode in `title` and `descriptions` props to allow custom rendering (@philippechevieux)
|
|
36
|
-
|
|
55
|
+
- **Tabs:**
|
|
56
|
+
- Add `xsmall` size (@florianSimonAristid)
|
|
57
|
+
- **Tag:**
|
|
58
|
+
- Add `small` size (@florianSimonAristid)
|
|
37
59
|
- **All components with a DropDown:**
|
|
38
60
|
- All components using a dropdown inside a `SidePanel` component, will render the dropdown inside the `SidePanel`, to avoid issues with the `closeOnOutsideClick` property of `SidePanel` (@evoiron)
|
|
61
|
+
- **Snackbar**
|
|
62
|
+
- Allow multiple snackbar areas (@evoiron)
|
|
63
|
+
- **Button**
|
|
64
|
+
- Add size `m`and `s` to segmented button (@evoiron)
|
|
65
|
+
- **InputWrapper**:
|
|
66
|
+
- Add forwardRef support to enable ref forwarding to the wrapper element (@philippechevieux)
|
|
39
67
|
|
|
40
68
|
### 🐛 Bug Fixes
|
|
41
69
|
|
|
@@ -44,6 +72,19 @@
|
|
|
44
72
|
- **DropDown:**
|
|
45
73
|
- Clicking outside the `DropDown` now closes it even when inside an iframe (@philippechevieux)
|
|
46
74
|
- Keep the `DropDown` open when selecting items (@philippechevieux)
|
|
75
|
+
- Fix double toggle issue when clicking the trigger after closing via blur (@philippechevieux)
|
|
76
|
+
- **Upload:**
|
|
77
|
+
- Fix upload dragger height unexpectedly growing in some cases (@evoiron)
|
|
78
|
+
- **SidePanel**:
|
|
79
|
+
- Export `KitSidePanelHeader` and `KitSidePanelContent` components from the main package entry point (@philippechevieux)
|
|
80
|
+
- Fix CSS structure by extracting nested header and content styles into separate classes for proper component isolation (@philippechevieux)
|
|
81
|
+
|
|
82
|
+
### 📚 Documentation
|
|
83
|
+
|
|
84
|
+
- **Table**:
|
|
85
|
+
- Add `onRow` usage (@philippechevieux)
|
|
86
|
+
- **Filter**:
|
|
87
|
+
- Update `With custom Action` exemple implementation (@philippechevieux)
|
|
47
88
|
|
|
48
89
|
## [14.0.0](https://www.npmjs.com/package/aristid-ds/v/14.0.0) (2025-05-20)
|
|
49
90
|
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../assets/
|
|
1
|
+
import "../../assets/index30.css";
|
|
2
2
|
import { jsx as n, jsxs as f, Fragment as h } from "react/jsx-runtime";
|
|
3
3
|
import { useState as u, useLayoutEffect as L, useRef as S, useEffect as P } from "react";
|
|
4
4
|
import { ConfigProvider as C } from "antd";
|
|
5
|
-
import {
|
|
5
|
+
import { K as b } from "../../chunks/SnackBarProvider.wBpPNyLk.js";
|
|
6
6
|
import { toCssVariables as g, uuid as y } from "../../utils/functions/index.js";
|
|
7
7
|
import a from "lodash/merge";
|
|
8
8
|
import { Style as m } from "react-style-tag";
|
|
9
9
|
import { K as E } from "../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
import { KitAristidThemeGeneral as l } from "../../theme/aristid/general/index.js";
|
|
11
|
-
import { antdThemeConfig as
|
|
11
|
+
import { antdThemeConfig as T } from "../../theme/utils/tokens-mapper/index.js";
|
|
12
12
|
import { frFR as d } from "../../translation/fr-FR/index.js";
|
|
13
|
-
import { enUS as
|
|
14
|
-
import { K as
|
|
15
|
-
import { mapKitLocaleToAntdLocale as
|
|
16
|
-
import { d as
|
|
13
|
+
import { enUS as $ } from "../../translation/en-US/index.js";
|
|
14
|
+
import { K as j, u as k } from "../../chunks/useKitLocale.96CdK3og.js";
|
|
15
|
+
import { mapKitLocaleToAntdLocale as x } from "../../translation/utils/index.js";
|
|
16
|
+
import { d as A } from "../../chunks/notification-provider.9msrEKBe.js";
|
|
17
17
|
import { KitEmpty as p } from "../DataDisplay/Empty/index.js";
|
|
18
|
-
const
|
|
18
|
+
const F = "aristid-ds-global", I = (t, e) => {
|
|
19
19
|
const o = g(t);
|
|
20
20
|
return `
|
|
21
21
|
.${e} {
|
|
@@ -27,11 +27,11 @@ const A = "aristid-ds-global", F = (t, e) => {
|
|
|
27
27
|
return L(() => {
|
|
28
28
|
const s = g(l, "--general");
|
|
29
29
|
i(s);
|
|
30
|
-
}, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id:
|
|
30
|
+
}, []), n(E.Provider, { value: { theme: v, appId: c, spacing: K }, children: r !== null && f(h, { children: [n(m, { id: F, hasSourceMap: !1, children: `
|
|
31
31
|
:root {
|
|
32
32
|
${Object.keys(r).map((s) => `${s}: ${r[s]}`).join(";")}
|
|
33
33
|
}
|
|
34
|
-
` }), e && n(m, { hasSourceMap: !1, children:
|
|
34
|
+
` }), e && n(m, { hasSourceMap: !1, children: I(a({ general: { utilities: l.utilities } }, e), c) }), t] }) });
|
|
35
35
|
}, _ = (t, e) => {
|
|
36
36
|
var o;
|
|
37
37
|
const r = S(t || "ds-" + y().substring(0, 8)), i = a(l.spacing, (o = e == null ? void 0 : e.general) === null || o === void 0 ? void 0 : o.spacing);
|
|
@@ -42,7 +42,7 @@ const A = "aristid-ds-global", F = (t, e) => {
|
|
|
42
42
|
};
|
|
43
43
|
}, M = ({ children: t }) => {
|
|
44
44
|
const e = N();
|
|
45
|
-
return n(
|
|
45
|
+
return n(j.Provider, { value: e, children: t });
|
|
46
46
|
}, N = () => {
|
|
47
47
|
const [t, e] = u(d);
|
|
48
48
|
return { locale: t, setKitLocale: (r) => {
|
|
@@ -50,18 +50,18 @@ const A = "aristid-ds-global", F = (t, e) => {
|
|
|
50
50
|
const i = a(d, r);
|
|
51
51
|
e(i);
|
|
52
52
|
} else {
|
|
53
|
-
const i = a(
|
|
53
|
+
const i = a($, r);
|
|
54
54
|
e(i);
|
|
55
55
|
}
|
|
56
56
|
} };
|
|
57
57
|
}, te = ({ children: t, locale: e, customTheme: o, id: r }) => n(R, { customTheme: o, id: r, children: n(M, { children: n(O, { locale: e, children: t }) }) }), O = ({ children: t, locale: e }) => {
|
|
58
|
-
const { locale: o, setKitLocale: r } =
|
|
58
|
+
const { locale: o, setKitLocale: r } = k();
|
|
59
59
|
return P(() => {
|
|
60
60
|
e !== void 0 && r(e);
|
|
61
|
-
}, [e, r]), n(C, { theme:
|
|
61
|
+
}, [e, r]), n(C, { theme: T, locale: x(e), renderEmpty: () => {
|
|
62
62
|
var i;
|
|
63
63
|
return n(p, { className: "default-render", image: p.ASSET_LIST, description: (i = o.Empty) === null || i === void 0 ? void 0 : i.noData });
|
|
64
|
-
}, children: f(
|
|
64
|
+
}, children: f(A, { children: [n(b, {}), t] }) });
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
67
|
te as KitApp
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as t, K as n } from "../../../chunks/Avatar.
|
|
1
|
+
import { s as t, K as n } from "../../../chunks/Avatar.BvI60jet.js";
|
|
2
2
|
import { jsx as u } from "react/jsx-runtime";
|
|
3
3
|
import { Avatar as c } from "antd";
|
|
4
4
|
import { u as d } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
@@ -1,37 +1,72 @@
|
|
|
1
1
|
import "../../../assets/index2.css";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import n from "classnames";
|
|
4
|
-
import { t as
|
|
5
|
-
import { u as
|
|
6
|
-
import { K as
|
|
7
|
-
import { KitTooltip as
|
|
4
|
+
import { t as S } from "../../../chunks/styles.module.shsViPAW.js";
|
|
5
|
+
import { u as T } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import { K as v } from "../../../chunks/Avatar.BvI60jet.js";
|
|
7
|
+
import { KitTooltip as d } from "../Tooltip/index.js";
|
|
8
8
|
import { T as m } from "../../../chunks/constants.DINGxt3I.js";
|
|
9
|
-
const
|
|
10
|
-
"kit-id-card": "_kit-id-
|
|
9
|
+
const D = {
|
|
10
|
+
"kit-id-card": "_kit-id-card_1vabr_2"
|
|
11
11
|
}, h = [
|
|
12
|
-
|
|
12
|
+
S["kit-typography-text"],
|
|
13
13
|
"ant-typography",
|
|
14
14
|
"ant-typography-text",
|
|
15
15
|
"ant-typography-ellipsis",
|
|
16
16
|
"ant-typography-ellipsis-single-line"
|
|
17
|
-
],
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
17
|
+
], z = (t) => {
|
|
18
|
+
switch (t) {
|
|
19
|
+
case "xl":
|
|
20
|
+
return "kit-typography-fontSize5";
|
|
21
|
+
case "l":
|
|
22
|
+
return "kit-typography-fontSize6";
|
|
23
|
+
default:
|
|
24
|
+
return "kit-typography-fontSize7";
|
|
25
|
+
}
|
|
26
|
+
}, N = (t) => {
|
|
27
|
+
switch (t) {
|
|
28
|
+
case "xl":
|
|
29
|
+
return "kit-typography-fontSize1";
|
|
30
|
+
case "l":
|
|
31
|
+
return "kit-typography-fontSize2";
|
|
32
|
+
case "m":
|
|
33
|
+
return "kit-typography-fontSize3";
|
|
34
|
+
case "s":
|
|
35
|
+
return "kit-typography-fontSize4";
|
|
36
|
+
case "xs-bold":
|
|
37
|
+
case "xs-medium":
|
|
38
|
+
case "xxs-medium":
|
|
39
|
+
return "kit-typography-fontSize5";
|
|
40
|
+
}
|
|
41
|
+
}, _ = (t) => {
|
|
42
|
+
switch (t) {
|
|
43
|
+
case "xl":
|
|
44
|
+
case "l":
|
|
45
|
+
return "xl";
|
|
46
|
+
case "m":
|
|
47
|
+
case "s":
|
|
48
|
+
return "l";
|
|
49
|
+
case "xxs-medium":
|
|
50
|
+
return "s";
|
|
51
|
+
default:
|
|
52
|
+
return "m";
|
|
53
|
+
}
|
|
54
|
+
}, E = (t, e, r, i) => {
|
|
55
|
+
const s = n("kit-id-card-title", ...h, N(e), {
|
|
56
|
+
"ant-typography-bold": e !== "xs-medium",
|
|
57
|
+
"ant-typography-disabled": r
|
|
21
58
|
});
|
|
22
|
-
return
|
|
23
|
-
},
|
|
24
|
-
const s = n("kit-id-card-description", ...h, "ant-typography-regular", {
|
|
25
|
-
"
|
|
26
|
-
"kit-typography-fontSize7": t === "medium",
|
|
27
|
-
"ant-typography-disabled": a
|
|
59
|
+
return a("span", { className: s, children: a(d, { title: i ? "" : t, mouseEnterDelay: m, children: a("span", { children: t }) }) });
|
|
60
|
+
}, K = (t, e, r, i) => {
|
|
61
|
+
const s = n("kit-id-card-description", ...h, "ant-typography-regular", z(e), {
|
|
62
|
+
"ant-typography-disabled": r
|
|
28
63
|
});
|
|
29
|
-
return
|
|
30
|
-
},
|
|
31
|
-
const { appId:
|
|
32
|
-
return
|
|
64
|
+
return a("span", { className: s, children: a(d, { title: i ? "" : t, mouseEnterDelay: m, children: a("span", { children: t }) }) });
|
|
65
|
+
}, I = ({ className: t, title: e, description: r, avatarProps: i, size: s = "xs-bold", disabled: o = !1, disableTooltip: c = !1, ...u }) => {
|
|
66
|
+
const { appId: g } = T(), f = n(g, D["kit-id-card"], t), x = i !== void 0, p = e !== void 0, l = r !== void 0, k = p || l;
|
|
67
|
+
return y("div", { className: `${f} id-card-grid`, ...u, children: [x && a("div", { className: "card-avatar", children: a(v, { size: _(s), ...i, disabled: o }) }), k && y("div", { className: "card-info", children: [p && typeof e == "string" ? E(e, s, o, c) : e, l && typeof r == "string" ? K(r, s, o, c) : r] })] });
|
|
33
68
|
};
|
|
34
|
-
|
|
69
|
+
I.displayName = "KitIdCard";
|
|
35
70
|
export {
|
|
36
|
-
|
|
71
|
+
I as KitIdCard
|
|
37
72
|
};
|
|
@@ -4,7 +4,7 @@ import {IKitAvatar} from '../Avatar/types';
|
|
|
4
4
|
|
|
5
5
|
export interface IKitIdCard extends KitHTMLAttributes<HTMLDivElement> {
|
|
6
6
|
avatarProps?: IKitAvatar;
|
|
7
|
-
size?: 'medium' | '
|
|
7
|
+
size?: 'xxs-medium' | 'xs-medium' | 'xs-bold' | 's' | 'm' | 'l' | 'xl';
|
|
8
8
|
title?: ReactNode;
|
|
9
9
|
description?: ReactNode;
|
|
10
10
|
disabled?: boolean;
|
|
@@ -1,30 +1,44 @@
|
|
|
1
1
|
import "../../../assets/index5.css";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { u as
|
|
5
|
-
import
|
|
6
|
-
import { KitButton as
|
|
7
|
-
import { KitTypography as
|
|
2
|
+
import { jsxs as a, Fragment as I, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as D } from "react";
|
|
4
|
+
import { u as E } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
+
import x from "classnames";
|
|
6
|
+
import { KitButton as j } from "../../General/Button/index.js";
|
|
7
|
+
import { KitTypography as z } from "../../General/Typography/index.js";
|
|
8
8
|
import { KitBadge as C } from "../Badge/index.js";
|
|
9
9
|
import { FontAwesomeIcon as O } from "@fortawesome/react-fontawesome";
|
|
10
10
|
import { faPlus as U } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
-
import { F as
|
|
12
|
-
const
|
|
13
|
-
"kit-tabs": "_kit-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
import { F as L } from "../../../chunks/constants.DINGxt3I.js";
|
|
12
|
+
const P = {
|
|
13
|
+
"kit-tabs": "_kit-tabs_1kygn_2"
|
|
14
|
+
}, X = (s) => {
|
|
15
|
+
switch (s) {
|
|
16
|
+
case "xsmall":
|
|
17
|
+
return "fontSize7";
|
|
18
|
+
case "small":
|
|
19
|
+
return "fontSize6";
|
|
20
|
+
case "medium":
|
|
21
|
+
return "fontSize4";
|
|
22
|
+
default:
|
|
23
|
+
return "fontSize4";
|
|
24
|
+
}
|
|
25
|
+
}, g = ({ addTab: s, centered: _, className: h, activeKey: m, defaultKey: d, items: i, onChange: o, fullwidthTab: b, size: l = "small", variant: n = "classic" }) => {
|
|
26
|
+
var u, p;
|
|
27
|
+
const { appId: w } = E(), [y, f] = D(d ?? ((u = i[0]) === null || u === void 0 ? void 0 : u.key)), k = m ?? y, N = (p = i.find((t) => t.key === k)) === null || p === void 0 ? void 0 : p.tabContent, K = x(w, h, P["kit-tabs"], _ ? "centered" : "", l ?? "medium", n, b ? "fullwidth" : "", N && n === "pill" ? "tabs-bottom-spacing" : ""), T = (t) => {
|
|
28
|
+
f(t), o == null || o(t);
|
|
29
|
+
}, A = (t, r) => {
|
|
30
|
+
t.code === "Enter" && (f(r), o == null || o(r));
|
|
20
31
|
};
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
return a(I, { children: [a("div", { className: K, role: "tablist", children: [i == null ? void 0 : i.map(({ icon: t, label: r, badgeCount: S, key: c, disabled: v }) => {
|
|
33
|
+
const B = k === c;
|
|
34
|
+
return a("div", { className: x("kit-tab", "kit-tab-" + l, n, {
|
|
35
|
+
disabled: v,
|
|
36
|
+
active: B,
|
|
37
|
+
fullwidth: b
|
|
38
|
+
}), role: "tab", tabIndex: L, onClick: v ? void 0 : () => T(c), onKeyDown: v ? void 0 : (F) => A(F, c), children: [t && e("div", { className: "kit-tab-icon", children: t }), a("div", { className: "kit-tab-label-wrapper", children: [e(z.Text, { className: "kit-tab-label", size: X(l), children: r }), !!S && e(C, { className: "kit-tab-count", count: S })] })] }, c);
|
|
39
|
+
}), s && n === "classic" && e(j, { disableSecureClick: !0, type: "tertiary", icon: e(O, { icon: U }), onClick: s })] }), N] });
|
|
26
40
|
};
|
|
27
|
-
|
|
41
|
+
g.displayName = "KitTabs";
|
|
28
42
|
export {
|
|
29
|
-
|
|
43
|
+
g as KitTabs
|
|
30
44
|
};
|
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
import "../../../assets/
|
|
2
|
-
import { jsx as t, Fragment as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
import { Tag as
|
|
6
|
-
import { u as
|
|
7
|
-
import { FontAwesomeIcon as
|
|
8
|
-
import { faXmark as
|
|
9
|
-
import { KitIdCard as
|
|
10
|
-
import { N as
|
|
11
|
-
import { KitModal as
|
|
12
|
-
import { KitTooltip as
|
|
1
|
+
import "../../../assets/index39.css";
|
|
2
|
+
import { jsx as t, Fragment as A, jsxs as I } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as L, useState as C, useRef as W, useLayoutEffect as z } from "react";
|
|
4
|
+
import E from "classnames";
|
|
5
|
+
import { Tag as P } from "antd";
|
|
6
|
+
import { u as $ } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
|
+
import { FontAwesomeIcon as X } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import { faXmark as j } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
+
import { KitIdCard as M } from "../IdCard/index.js";
|
|
10
|
+
import { N as R, F as U } from "../../../chunks/constants.DINGxt3I.js";
|
|
11
|
+
import { KitModal as V } from "../../Feedback/Modal/index.js";
|
|
12
|
+
import { KitTooltip as H } from "../Tooltip/index.js";
|
|
13
13
|
import { u as F } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
14
|
-
const
|
|
15
|
-
"kit-tag": "_kit-
|
|
16
|
-
"kit-tag-group": "_kit-tag-
|
|
17
|
-
"kit-tag-group-measure": "_kit-tag-group-
|
|
18
|
-
"kit-tag-group-container": "_kit-tag-group-
|
|
19
|
-
}, h =
|
|
20
|
-
const { appId: b } =
|
|
21
|
-
[`kit-tag-${
|
|
22
|
-
"kit-tag-disabled":
|
|
23
|
-
"kit-tag-clickable":
|
|
14
|
+
const G = {
|
|
15
|
+
"kit-tag": "_kit-tag_7uxgn_2",
|
|
16
|
+
"kit-tag-group": "_kit-tag-group_7uxgn_120",
|
|
17
|
+
"kit-tag-group-measure": "_kit-tag-group-measure_7uxgn_126",
|
|
18
|
+
"kit-tag-group-container": "_kit-tag-group-container_7uxgn_133"
|
|
19
|
+
}, h = L(({ className: r, closeIcon: s, type: u = "neutral", disabled: o, disableTooltip: p = !1, onClick: v, idCardProps: i, size: d = "medium", ...a }, _) => {
|
|
20
|
+
const { appId: b } = $(), c = E(b, G["kit-tag"], r, {
|
|
21
|
+
[`kit-tag-${u}`]: u,
|
|
22
|
+
"kit-tag-disabled": o,
|
|
23
|
+
"kit-tag-clickable": v,
|
|
24
|
+
"kit-tag-small": d === "small"
|
|
24
25
|
});
|
|
25
|
-
return t(
|
|
26
|
-
}),
|
|
27
|
-
var
|
|
28
|
-
const [
|
|
29
|
-
return
|
|
30
|
-
const
|
|
31
|
-
var k,
|
|
32
|
-
const l = s.current, f =
|
|
26
|
+
return t(P, { tabIndex: o ? R : U, ref: _, ...a, className: c, closeIcon: s ?? t(X, { icon: j }), onClick: v, closable: !!a.onClose, children: t(M, { disabled: o, disableTooltip: p, avatarProps: i != null && i.avatarProps ? { ...i == null ? void 0 : i.avatarProps, size: "xs" } : void 0, description: i == null ? void 0 : i.description }) });
|
|
27
|
+
}), q = ({ tags: r, containerRef: s, measureRef: u, handleCloseTag: o }) => {
|
|
28
|
+
var p;
|
|
29
|
+
const [v, i] = C([]), [d, a] = C(0), [_, b] = C(t(A, {})), c = W(null), { locale: g } = F();
|
|
30
|
+
return z(() => {
|
|
31
|
+
const x = () => {
|
|
32
|
+
var k, T, e;
|
|
33
|
+
const l = s.current, f = u.current;
|
|
33
34
|
if (!l || !f)
|
|
34
35
|
return;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} }, y)), t(h, { idCardProps: { description: `+${d} ${(k =
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
for (let n = 0; n <
|
|
41
|
-
const y = ((e =
|
|
42
|
-
if (
|
|
43
|
-
|
|
36
|
+
b(I(A, { children: [r.map((n, y) => t(h, { type: n == null ? void 0 : n.type, disabled: n == null ? void 0 : n.disabled, idCardProps: n.idCardProps, onClose: () => {
|
|
37
|
+
o == null || o(y);
|
|
38
|
+
} }, y)), t(h, { idCardProps: { description: `+${d} ${(k = g.General) === null || k === void 0 ? void 0 : k.others}` } })] }));
|
|
39
|
+
const B = l == null ? void 0 : l.clientWidth, N = Array.from(f.children), D = (T = N[N.length - 1]) === null || T === void 0 ? void 0 : T.clientWidth;
|
|
40
|
+
let O = 0, w = 0;
|
|
41
|
+
for (let n = 0; n < N.length - 1; n++) {
|
|
42
|
+
const y = ((e = N[n]) === null || e === void 0 ? void 0 : e.clientWidth) + 8;
|
|
43
|
+
if (O + y + 8 + (n < r.length - 1 ? D : 0) <= B)
|
|
44
|
+
O += y, w++;
|
|
44
45
|
else
|
|
45
46
|
break;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
+
w < r.length ? (i(r.slice(0, w)), a(r.length - w)) : (i(r), a(0));
|
|
48
49
|
};
|
|
49
50
|
let m;
|
|
50
|
-
const
|
|
51
|
-
clearTimeout(m), m = setTimeout(
|
|
51
|
+
const K = () => {
|
|
52
|
+
clearTimeout(m), m = setTimeout(x, 100);
|
|
52
53
|
};
|
|
53
|
-
return
|
|
54
|
-
|
|
54
|
+
return x(), c.current = new ResizeObserver(K), s.current && c.current.observe(s.current), () => {
|
|
55
|
+
c.current && c.current.disconnect(), clearTimeout(m);
|
|
55
56
|
};
|
|
56
|
-
}, [s,
|
|
57
|
-
measureTags:
|
|
58
|
-
visibleTags:
|
|
57
|
+
}, [s, o, d, (p = g.General) === null || p === void 0 ? void 0 : p.others, u, r]), {
|
|
58
|
+
measureTags: _,
|
|
59
|
+
visibleTags: v,
|
|
59
60
|
hiddenCount: d
|
|
60
61
|
};
|
|
61
|
-
}, J = ({ tags: r, style: s, className:
|
|
62
|
-
var
|
|
63
|
-
const d =
|
|
62
|
+
}, J = ({ tags: r, style: s, className: u, handleCloseTag: o, othersTagType: p = "neutral", othersTagDisabled: v }) => {
|
|
63
|
+
var i;
|
|
64
|
+
const d = W(null), a = W(null), { locale: _ } = F(), { appId: b } = $(), [c, g] = C(!1), { measureTags: x, visibleTags: m, hiddenCount: K } = q({ tags: r, containerRef: d, measureRef: a, handleCloseTag: o }), k = () => r.slice(m.length).map((e, l) => {
|
|
64
65
|
var f;
|
|
65
66
|
return t("div", { children: (f = e.idCardProps) === null || f === void 0 ? void 0 : f.description }, l);
|
|
66
|
-
}),
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
} : void 0 }, l)),
|
|
70
|
-
|
|
71
|
-
} : void 0 }, l)) }) })] }), t("div", { ref:
|
|
67
|
+
}), T = E(b, G["kit-tag-group"], u);
|
|
68
|
+
return I("div", { className: G["kit-tag-group-container"], children: [I("div", { ref: d, style: s, className: T, children: [m.map((e, l) => t(h, { type: e == null ? void 0 : e.type, disabled: e == null ? void 0 : e.disabled, idCardProps: e.idCardProps, onClose: o ? () => {
|
|
69
|
+
o(l);
|
|
70
|
+
} : void 0 }, l)), K > 0 && t(H, { overlay: k(), children: t(h, { type: p, disabled: v, disableTooltip: !0, idCardProps: { description: `+${K} ${(i = _.General) === null || i === void 0 ? void 0 : i.others}` }, onClick: () => g(!0) }) }), t(V, { isOpen: c, close: () => g(!1), showCloseIcon: !0, title: "Tags", appElement: document.body, children: t("div", { style: { display: "flex", flexWrap: "wrap", rowGap: "8px" }, children: r.map((e, l) => t(h, { id: `tag-${l}`, type: e == null ? void 0 : e.type, disabled: e == null ? void 0 : e.disabled, idCardProps: e.idCardProps, onClose: o ? () => {
|
|
71
|
+
o(l);
|
|
72
|
+
} : void 0 }, l)) }) })] }), t("div", { ref: a, className: G["kit-tag-group-measure"], "aria-hidden": "true", children: x })] });
|
|
72
73
|
}, Q = J, S = h;
|
|
73
74
|
S.displayName = "KitTag";
|
|
74
75
|
S.Group = Q;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index12.css";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as O, useState as b, useRef as j } from "react";
|
|
4
4
|
import { AutoComplete as B } from "antd";
|
|
5
5
|
import { KitInput as M } from "../Input/index.js";
|
|
6
|
-
import { K as S } from "../../../chunks/InputWrapper.
|
|
6
|
+
import { K as S } from "../../../chunks/InputWrapper.hIFFr5AB.js";
|
|
7
7
|
import { FontAwesomeIcon as W } from "@fortawesome/react-fontawesome";
|
|
8
8
|
import { faMagnifyingGlass as q } from "@fortawesome/free-solid-svg-icons";
|
|
9
9
|
import z from "classnames";
|
|
10
|
-
import { u as D } from "../../../chunks/useGetPopupContainer.
|
|
10
|
+
import { u as D } from "../../../chunks/useGetPopupContainer.IH43I5PS.js";
|
|
11
11
|
const E = {
|
|
12
12
|
"kit-autocomplete": "_kit-autocomplete_kox09_2"
|
|
13
13
|
}, H = (t, r, o) => z(t, "ant-select-dropdown", "kit-select-dropdown-bottom", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index32.css";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as P, memo as p, forwardRef as O, useContext as R, useState as w, useEffect as I, useRef as ee } from "react";
|
|
4
4
|
import $ from "classnames";
|
|
@@ -7,7 +7,7 @@ import { u as ae } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
|
7
7
|
import ne from "rc-util/es/omit";
|
|
8
8
|
import { ConfigContext as ie } from "antd/es/config-provider/";
|
|
9
9
|
import ce from "antd/es/checkbox/style";
|
|
10
|
-
import { K as ue } from "../../../chunks/InputWrapper.
|
|
10
|
+
import { K as ue } from "../../../chunks/InputWrapper.hIFFr5AB.js";
|
|
11
11
|
const j = P(null), te = ({ defaultValue: b, children: v, options: a = [], prefixCls: f, className: e, wrapperClassName: x, status: g, rootClassName: t, style: i, onChange: d, label: h, helper: o, required: r, actions: B, extra: k, ...n }, D) => {
|
|
12
12
|
const { getPrefixCls: E, direction: T } = R(ie), [m, K] = w(n.value || b || []), [W, S] = w([]);
|
|
13
13
|
I(() => {
|