aristid-ds 13.0.0-4e097fb → 13.0.0-caa1de8
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 +31 -4
- package/dist/Kit/Ant/index.d.ts +1 -0
- package/dist/Kit/App/index.js +14 -14
- package/dist/Kit/DataDisplay/Collapse/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/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tree/index.js +5 -5
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
- package/dist/Kit/DataEntry/Input/index.js +1 -1
- package/dist/Kit/DataEntry/Radio/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js +4 -4
- package/dist/Kit/DataEntry/RichText/MenuBar/ButtonTooltip/types.d.ts +1 -0
- 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/MenuActionList/index.d.ts +3 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js +11 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/types.d.ts +5 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +38 -18
- package/dist/Kit/DataEntry/RichText/MenuBar/miniLayout.d.ts +3 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/types.d.ts +7 -0
- package/dist/Kit/DataEntry/RichText/index.js +52 -47
- package/dist/Kit/DataEntry/RichText/types.d.ts +1 -0
- package/dist/Kit/DataEntry/Select/index.js +1 -1
- package/dist/Kit/DataEntry/Upload/UploadedItem.d.ts +4 -0
- package/dist/Kit/DataEntry/Upload/convertBytes.d.ts +2 -0
- package/dist/Kit/DataEntry/Upload/getBase64.d.ts +2 -0
- package/dist/Kit/DataEntry/Upload/index.d.ts +2 -8
- package/dist/Kit/DataEntry/Upload/index.js +81 -26
- package/dist/Kit/DataEntry/Upload/types.d.ts +30 -12
- package/dist/Kit/Feedback/Alert/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +16 -16
- package/dist/Kit/General/Button/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +50 -47
- 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/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/index6.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/chunks/{SnackBarProvider.nqDzpFo3.js → SnackBarProvider.T-xLQpTN.js} +10 -10
- package/dist/index.umd.js +4 -4
- package/dist/theme/types/index.d.ts +0 -2
- package/dist/translation/en-US/components/DataEntry/RichText/index.js +2 -1
- package/dist/translation/en-US/components/DataEntry/Upload/index.d.ts +2 -0
- package/dist/translation/en-US/components/DataEntry/Upload/index.js +11 -0
- package/dist/translation/en-US/index.js +6 -4
- package/dist/translation/fr-FR/components/DataEntry/RichText/index.js +2 -1
- package/dist/translation/fr-FR/components/DataEntry/Upload/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/DataEntry/Upload/index.js +11 -0
- package/dist/translation/fr-FR/index.js +8 -6
- package/dist/translation/types/components/DataEntry/RichText/index.d.ts +1 -0
- package/dist/translation/types/components/DataEntry/Upload/index.d.ts +8 -0
- package/dist/translation/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/theme/aristid/components/DataEntry/Upload/index.d.ts +0 -3
- package/dist/theme/aristid/components/DataEntry/Upload/index.js +0 -55
- package/dist/theme/types/components/DataEntry/Upload/index.d.ts +0 -178
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [X.X.X](https://www.npmjs.com/package/aristid-ds/v/X.X.X) (2025-XX-XX)
|
|
4
|
+
|
|
5
|
+
### ✨ Features
|
|
6
|
+
|
|
7
|
+
- **⚠️ Breaking change - Upload**:
|
|
8
|
+
- Remove the following properties: (@philippechevieux)
|
|
9
|
+
- `listType`
|
|
10
|
+
- `itemRender`
|
|
11
|
+
- `openFileDialogOnClick`
|
|
12
|
+
- `loading`
|
|
13
|
+
- `isImageUrl`
|
|
14
|
+
- `imageUrl`
|
|
15
|
+
- `progress`
|
|
16
|
+
- `previewFile`
|
|
17
|
+
- `showUploadList`
|
|
18
|
+
- Update component render (@philippechevieux)
|
|
19
|
+
- **RichText**:
|
|
20
|
+
- Add `mini` property to display a minified version of the component (@renaudamsellem)
|
|
21
|
+
- **SidePanel**:
|
|
22
|
+
- Add opening and closing animations (@philippechevieux)
|
|
23
|
+
|
|
24
|
+
### 📚 Documentation
|
|
25
|
+
|
|
26
|
+
- **Tree**:
|
|
27
|
+
- Add exemple of a long title with ellipsis (@philippechevieux)
|
|
28
|
+
|
|
3
29
|
## [13.0.0](https://www.npmjs.com/package/aristid-ds/v/13.0.0) (2025-02-17)
|
|
4
30
|
|
|
5
31
|
### ✨ CI
|
|
@@ -60,10 +86,6 @@ The following points are the impact of this version upgrade:
|
|
|
60
86
|
|
|
61
87
|
### ✨ Features
|
|
62
88
|
|
|
63
|
-
- **Snackbar**:
|
|
64
|
-
- Add `snackbarId` property to allow to update a snackbar (@evoiron)
|
|
65
|
-
- **Button**:
|
|
66
|
-
- Add `action` type button (@evoiron)
|
|
67
89
|
- **⚠️ Breaking change - Tree**:
|
|
68
90
|
- Remove `showLine` and `switcherIcon` properties (@philippechevieux)
|
|
69
91
|
- Update component render (@philippechevieux)
|
|
@@ -72,12 +94,17 @@ The following points are the impact of this version upgrade:
|
|
|
72
94
|
- Complete rewriting of the `Progress` component without Ant (@philippechevieux)
|
|
73
95
|
- Remove all Ant props (@philippechevieux)
|
|
74
96
|
- `circle` and `dashboard` type are no longer available (@philippechevieux)
|
|
97
|
+
- **Snackbar**:
|
|
98
|
+
- Add `snackbarId` property to allow to update a snackbar (@evoiron)
|
|
99
|
+
- **Button**:
|
|
100
|
+
- Add `action` type button (@evoiron)
|
|
75
101
|
- **Tabs**:
|
|
76
102
|
- Add controlled state to handle navigation within tabs (@renaudamsellem)
|
|
77
103
|
- **SidePanel**:
|
|
78
104
|
- Add `headerExtra` prop to display extra content above header title (@philippechevieux)
|
|
79
105
|
|
|
80
106
|
### 🐛 Bug Fixes
|
|
107
|
+
|
|
81
108
|
- **SidePanel**
|
|
82
109
|
- Fix `closeOnOutsideClick` behavior to listen to `click` event instead on `mousedeown` (@evoiron)
|
|
83
110
|
- **ColorPicker**
|
package/dist/Kit/Ant/index.d.ts
CHANGED
package/dist/Kit/App/index.js
CHANGED
|
@@ -2,20 +2,20 @@ import "../../assets/index28.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.T-xLQpTN.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 "../../../assets/
|
|
1
|
+
import "../../../assets/index37.css";
|
|
2
2
|
import { jsx as i, Fragment as C, jsxs as x } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as D, useState as W, useRef as N, useLayoutEffect as E } from "react";
|
|
4
4
|
import O from "classnames";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "../../../assets/index6.css";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { Tree as
|
|
3
|
+
import { Tree as c } from "antd";
|
|
4
4
|
import { u as p } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
5
|
import v from "classnames";
|
|
6
6
|
import { FontAwesomeIcon as n } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faCircleNotch as u, faCaretRight as f } from "@fortawesome/free-solid-svg-icons";
|
|
8
8
|
import { u as g } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
9
9
|
const D = {
|
|
10
|
-
"kit-tree": "_kit-
|
|
10
|
+
"kit-tree": "_kit-tree_gh8v4_2"
|
|
11
11
|
}, h = ({ className: l, switcherLoadingIcon: e, ...d }) => {
|
|
12
|
-
const { appId: m } = p(), { locale: i } = g(),
|
|
13
|
-
return o(
|
|
12
|
+
const { appId: m } = p(), { locale: i } = g(), s = v(m, D["kit-tree"], l);
|
|
13
|
+
return o(c, { ...d, switcherLoadingIcon: e ?? o(n, { icon: u, spin: !0 }), switcherIcon: (a) => {
|
|
14
14
|
var r, t;
|
|
15
15
|
return o("span", { role: "img", "aria-label": a.expanded ? (r = i.General) === null || r === void 0 ? void 0 : r.close : (t = i.General) === null || t === void 0 ? void 0 : t.open, children: o(n, { icon: f, rotation: a.expanded ? 90 : void 0 }) });
|
|
16
|
-
}, className:
|
|
16
|
+
}, className: s, blockNode: !0, draggable: !1, onDragEnd: void 0, onDragEnter: void 0, onDragLeave: void 0, onDragOver: void 0, onDragStart: void 0, onDrop: void 0 });
|
|
17
17
|
};
|
|
18
18
|
h.displayName = "KitTree";
|
|
19
19
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index25.css";
|
|
2
2
|
import { forwardRef as Y, useRef as q, useState as m, useEffect as b, useImperativeHandle as z, createElement as J } from "react";
|
|
3
3
|
import { jsxs as Q, jsx as s } from "react/jsx-runtime";
|
|
4
4
|
import { K as Z } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { KitTooltip as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { KitTooltip as i } from "../../../../DataDisplay/Tooltip/index.js";
|
|
3
|
+
const l = ({ title: o, open: t, children: p }) => e(i, { title: o, placement: "top", mouseEnterDelay: 0.8, open: t, children: p });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
l as KitButtonTooltip
|
|
6
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../../../assets/
|
|
1
|
+
import "../../../../../assets/index23.css";
|
|
2
2
|
import { jsx as i, Fragment as z, jsxs as _ } from "react/jsx-runtime";
|
|
3
3
|
import { KitTypography as m } from "../../../../General/Typography/index.js";
|
|
4
4
|
import { KitDropDown as w } from "../../../../Navigation/DropDown/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../../../assets/
|
|
1
|
+
import "../../../../../assets/index35.css";
|
|
2
2
|
import { jsx as t, jsxs as y, Fragment as S } from "react/jsx-runtime";
|
|
3
3
|
import { faClose as q, faCheck as w, faLink as N } from "@fortawesome/free-solid-svg-icons";
|
|
4
4
|
import { FontAwesomeIcon as _ } from "@fortawesome/react-fontawesome";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs as r, Fragment as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { KitFontStylesButtons as n } from "../FontStylesButtons/index.js";
|
|
3
|
+
import { KitDivider as o } from "../../../../Layout/Divider/index.js";
|
|
4
|
+
import { KitTextAlignButtons as e } from "../TextAlignButtons/index.js";
|
|
5
|
+
import { KitLinkButton as p } from "../LinkButton/index.js";
|
|
6
|
+
import { KitListButtons as s } from "../ListButtons/index.js";
|
|
7
|
+
import { KitIndentListButtons as c } from "../IndentListButtons/index.js";
|
|
8
|
+
const B = ({ editor: i }) => r(m, { children: [t(n, { editor: i }), t(o, { type: "vertical" }), t(e, { editor: i }), t(o, { type: "vertical" }), t(p, { editor: i }), t(o, { type: "vertical" }), t(s, { editor: i }), t(o, { type: "vertical" }), t(c, { editor: i })] });
|
|
9
|
+
export {
|
|
10
|
+
B as KitMenuActionList
|
|
11
|
+
};
|
|
@@ -1,21 +1,41 @@
|
|
|
1
|
-
import "../../../../assets/
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { u as
|
|
5
|
-
import { KitDivider as
|
|
6
|
-
import { KitUndoRedoButtons as
|
|
7
|
-
import { KitFontSizeSelect as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import "../../../../assets/index27.css";
|
|
2
|
+
import { jsxs as f, Fragment as _, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import a from "classnames";
|
|
4
|
+
import { u as b } from "../../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
|
+
import { KitDivider as d } from "../../../Layout/Divider/index.js";
|
|
6
|
+
import { KitUndoRedoButtons as K } from "./UndoRedoButtons/index.js";
|
|
7
|
+
import { KitFontSizeSelect as O } from "./FontSizeSelect/index.js";
|
|
8
|
+
import { faEllipsisVertical as M } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
+
import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { useState as L, useRef as R, useEffect as v } from "react";
|
|
11
|
+
import { u as S } from "../../../../chunks/useKitLocale.96CdK3og.js";
|
|
12
|
+
import { KitButtonTooltip as w } from "./ButtonTooltip/index.js";
|
|
13
|
+
import { Popover as B } from "antd";
|
|
14
|
+
import { KitMenuActionList as h } from "./MenuActionList/index.js";
|
|
15
|
+
const x = {
|
|
16
|
+
"kit-rich-text-menu-bar": "_kit-rich-text-menu-bar_1xmym_2",
|
|
17
|
+
"kit-rich-text-menu-popover": "_kit-rich-text-menu-popover_1xmym_3"
|
|
18
|
+
}, E = ({ editor: o, blurMenu: e }) => {
|
|
19
|
+
var i, r;
|
|
20
|
+
const { locale: c } = S(), [p, s] = L(!1), u = R(null);
|
|
21
|
+
return v(() => {
|
|
22
|
+
e && s(!1);
|
|
23
|
+
}, [e]), v(() => {
|
|
24
|
+
const m = (k) => {
|
|
25
|
+
var l;
|
|
26
|
+
const n = k.target, y = n.closest(".ant-popover") || n.contains(document.querySelector(".ant-popover"));
|
|
27
|
+
!(n.closest(".link-modal") || n.contains(document.querySelector(".link-modal"))) && !y && !(!((l = u.current) === null || l === void 0) && l.contains(n)) && s(!1);
|
|
28
|
+
};
|
|
29
|
+
return document.addEventListener("mousedown", m), () => {
|
|
30
|
+
document.removeEventListener("mousedown", m);
|
|
31
|
+
};
|
|
32
|
+
}, []), f(_, { children: [t(w, { title: (i = c.RichText) === null || i === void 0 ? void 0 : i.moreOptions, children: t("button", { ref: u, onClick: () => s((m) => !m), className: a({ "is-active": p }), "aria-label": (r = c.RichText) === null || r === void 0 ? void 0 : r.bold, children: t(g, { icon: M }) }) }), t(B, { trigger: "click", placement: "bottom", arrow: !1, open: p, overlayClassName: a(x["kit-rich-text-menu-popover"]), content: t("div", { className: "kit-rich-text-menu-popover-options", children: t(h, { editor: o }) }) })] });
|
|
33
|
+
}, J = ({ editor: o, mini: e, blurMenu: i }) => {
|
|
34
|
+
const { appId: r } = b(), c = a(r, x["kit-rich-text-menu-bar"], "menu-bar", {
|
|
35
|
+
"kit-rich-text-mini-layout": e
|
|
36
|
+
});
|
|
37
|
+
return f("div", { className: c, children: [t(K, { editor: o }), t(d, { type: "vertical" }), t(O, { editor: o }), t(d, { type: "vertical" }), e ? t(E, { editor: o, blurMenu: i }) : t(h, { editor: o })] });
|
|
18
38
|
};
|
|
19
39
|
export {
|
|
20
|
-
|
|
40
|
+
J as KitMenuBar
|
|
21
41
|
};
|
|
@@ -1,78 +1,83 @@
|
|
|
1
1
|
import "../../../assets/index9.css";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { K as
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import { useEditor as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { KitMenuBar as
|
|
15
|
-
import { KitEditorContentCharacterCount as
|
|
16
|
-
import { uuid as
|
|
17
|
-
const
|
|
18
|
-
"kit-rich-text-wrapper": "_kit-rich-text-
|
|
19
|
-
"kit-rich-text": "_kit-rich-
|
|
20
|
-
},
|
|
21
|
-
const { appId:
|
|
22
|
-
"kit-rich-text-disabled":
|
|
23
|
-
"kit-rich-text-readonly":
|
|
2
|
+
import { jsxs as E, jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as Q, useRef as V, useState as _, useEffect as f } from "react";
|
|
4
|
+
import { K as X } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
5
|
+
import { u as Y } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import K from "classnames";
|
|
7
|
+
import { useEditor as Z, EditorContent as $ } from "@tiptap/react";
|
|
8
|
+
import tt from "@tiptap/starter-kit";
|
|
9
|
+
import et from "@tiptap/extension-underline";
|
|
10
|
+
import rt from "@tiptap/extension-text-align";
|
|
11
|
+
import ot from "@tiptap/extension-placeholder";
|
|
12
|
+
import it from "@tiptap/extension-link";
|
|
13
|
+
import nt from "@tiptap/extension-character-count";
|
|
14
|
+
import { KitMenuBar as st } from "./MenuBar/index.js";
|
|
15
|
+
import { KitEditorContentCharacterCount as ct } from "./EditorContentCharacterCount/index.js";
|
|
16
|
+
import { uuid as at } from "../../../utils/functions/index.js";
|
|
17
|
+
const M = {
|
|
18
|
+
"kit-rich-text-wrapper": "_kit-rich-text-wrapper_1kq7z_2",
|
|
19
|
+
"kit-rich-text": "_kit-rich-text_1kq7z_2"
|
|
20
|
+
}, lt = Q(({ label: T, helper: L, htmlFor: R, wrapperClassName: b, className: q, required: N, actions: S, extra: n, placeholder: W, disabled: s, readonly: h, status: o, mini: x = !1, defaultValue: z, value: i, onChange: k, onFocus: v, onBlur: c, maxLength: g, autoFocus: H = !1, showCount: F = !1, ...O }, P) => {
|
|
21
|
+
const { appId: U } = Y(), w = V(null), [a, y] = _(H), [l, C] = _(!1), j = K(U, q, M["kit-rich-text"], {
|
|
22
|
+
"kit-rich-text-disabled": s,
|
|
23
|
+
"kit-rich-text-readonly": h,
|
|
24
24
|
"kit-rich-text-error": o === "error",
|
|
25
25
|
"kit-rich-text-warning": o === "warning",
|
|
26
|
-
"kit-rich-text-focused": a
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
"kit-rich-text-focused": a,
|
|
27
|
+
"kit-rich-text-mini-layout": x
|
|
28
|
+
}), t = Z({
|
|
29
|
+
editable: !s && !h,
|
|
30
|
+
content: z,
|
|
30
31
|
editorProps: {
|
|
31
32
|
attributes: {
|
|
32
33
|
role: "textbox"
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
extensions: [
|
|
36
|
-
|
|
37
|
+
tt.configure({
|
|
37
38
|
heading: {
|
|
38
39
|
levels: [1, 2, 3, 4]
|
|
39
40
|
}
|
|
40
41
|
}),
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
et,
|
|
43
|
+
rt.configure({
|
|
43
44
|
types: ["heading", "paragraph"]
|
|
44
45
|
}),
|
|
45
|
-
|
|
46
|
+
it.extend({ inclusive: !1 }).configure({
|
|
46
47
|
openOnClick: !1
|
|
47
48
|
}),
|
|
48
|
-
|
|
49
|
-
placeholder:
|
|
49
|
+
ot.configure({
|
|
50
|
+
placeholder: W,
|
|
50
51
|
showOnlyWhenEditable: !1
|
|
51
52
|
}),
|
|
52
|
-
|
|
53
|
-
limit:
|
|
53
|
+
nt.configure({
|
|
54
|
+
limit: g
|
|
54
55
|
})
|
|
55
56
|
],
|
|
56
57
|
onUpdate: ({ editor: e }) => {
|
|
57
|
-
|
|
58
|
+
k && k(e.getHTML());
|
|
58
59
|
}
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
});
|
|
61
|
+
f(() => {
|
|
62
|
+
l && C(!1);
|
|
63
|
+
}, [l]);
|
|
64
|
+
const p = "kit-rich-text-wrapper-" + at(), I = K(b, p, M["kit-rich-text-wrapper"]);
|
|
65
|
+
return f(() => {
|
|
66
|
+
const e = (A) => {
|
|
67
|
+
var m, d;
|
|
68
|
+
const r = A.target, D = r.closest("." + p), B = r.closest(".select-font-size"), G = r.closest(".link-modal") || r.contains(document.querySelector(".link-modal")), J = r.closest(".ant-popover") || r.contains(document.querySelector(".ant-popover"));
|
|
69
|
+
a && !(!((m = w.current) === null || m === void 0) && m.contains(r)) && !D && !B && !G && !J && (c && c((d = t == null ? void 0 : t.getHTML()) !== null && d !== void 0 ? d : ""), C(!0), y(!1));
|
|
65
70
|
};
|
|
66
71
|
return document.addEventListener("mousedown", e), document.addEventListener("focusin", e), () => {
|
|
67
72
|
document.removeEventListener("mousedown", e), document.removeEventListener("focusin", e);
|
|
68
73
|
};
|
|
69
|
-
}, [
|
|
74
|
+
}, [p, c, t, a]), f(() => {
|
|
70
75
|
t !== null && i !== void 0 && i !== t.getHTML() && t.commands.setContent(i);
|
|
71
|
-
}, [i, t]), t ?
|
|
72
|
-
|
|
73
|
-
} })] }),
|
|
76
|
+
}, [i, t]), t ? E(X, { className: I, label: T, helper: L, htmlFor: R, disabled: s, status: o, required: N, extra: n ?? S, children: [E("div", { ref: w, className: j, ...O, children: [u(st, { editor: t, mini: x, blurMenu: l }), u($, { ref: P, editor: t, className: "ant-typography", onFocus: (e) => {
|
|
77
|
+
v && v(e), y(!0);
|
|
78
|
+
} })] }), F && u(ct, { editor: t, status: o, maxLength: g })] }) : null;
|
|
74
79
|
});
|
|
75
|
-
|
|
80
|
+
lt.displayName = "KitRichText";
|
|
76
81
|
export {
|
|
77
|
-
|
|
82
|
+
lt as KitRichText
|
|
78
83
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index40.css";
|
|
2
2
|
import { jsx as s, jsxs as pe } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as ve, useState as j, useRef as q, useEffect as fe, useMemo as me } from "react";
|
|
4
4
|
import { Select as Ce } from "antd";
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type UploadCompoundedComponent = FunctionComponent<IKitUpload> & {
|
|
4
|
-
KitDragger: FunctionComponent<IKitDragger>;
|
|
5
|
-
LIST_IGNORE: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const KitUpload: UploadCompoundedComponent;
|
|
8
|
-
export {};
|
|
1
|
+
import { KitUploadCompoundedComponent } from './types';
|
|
2
|
+
export declare const KitUpload: KitUploadCompoundedComponent;
|