aristid-ds 12.0.0-d87eebf → 12.0.0-eaca419
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 +9 -3
- package/dist/Kit/App/index.js +1 -1
- 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/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +10 -16
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +10 -24
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/Checkbox/index.js +2 -2
- package/dist/Kit/DataEntry/ColorPicker/index.js +51 -49
- package/dist/Kit/DataEntry/DatePicker/index.js +2 -2
- package/dist/Kit/DataEntry/Input/index.js +2 -2
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- 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 +30 -30
- package/dist/Kit/DataEntry/Select/index.js +2 -2
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- 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 +1 -1
- package/dist/Kit/General/Button/index.js +1 -1
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Layout/Section/index.js +13 -10
- package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
- package/dist/Kit/Navigation/Header/index.js +1 -1
- 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 +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +42 -42
- package/dist/Kit/Navigation/SidePanel/types.d.ts +1 -0
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/index.d.ts +55 -6
- package/dist/Kit/index.js +182 -177
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.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/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -0
- package/dist/chunks/InputWrapper.DPygx2dQ.js +23 -0
- package/dist/index.es.js +180 -177
- package/dist/index.umd.js +4 -4
- package/package.json +13 -2
- package/dist/Kit/DataDisplay/index.d.ts +0 -16
- package/dist/Kit/DataDisplay/index.js +0 -34
- package/dist/Kit/DataEntry/index.d.ts +0 -15
- package/dist/Kit/DataEntry/index.js +0 -32
- package/dist/Kit/Feedback/index.d.ts +0 -7
- package/dist/Kit/Feedback/index.js +0 -19
- package/dist/Kit/General/index.d.ts +0 -3
- package/dist/Kit/General/index.js +0 -8
- package/dist/Kit/Layout/index.d.ts +0 -5
- package/dist/Kit/Layout/index.js +0 -12
- package/dist/Kit/Navigation/index.d.ts +0 -8
- package/dist/Kit/Navigation/index.js +0 -18
- package/dist/assets/styles.css +0 -1
- package/dist/chunks/InputWrapper._05UBJgS.js +0 -23
- package/dist/chunks/styles.module.4eW8VunD.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [X.X.
|
|
3
|
+
## [X.X.X](https://www.npmjs.com/package/aristid-ds/v/X.X.X) (202X-XX-XX)
|
|
4
|
+
|
|
5
|
+
### ✨ CI
|
|
6
|
+
|
|
7
|
+
- Add a pre-commit hook. Now, `eslint` and `tscheck` are run before each commit (@evoiron)
|
|
4
8
|
|
|
5
9
|
### 📦 Upgrade
|
|
6
10
|
|
|
@@ -58,13 +62,15 @@ The following points are the impact of this version upgrade:
|
|
|
58
62
|
|
|
59
63
|
- **Tabs**:
|
|
60
64
|
- Add controlled state to handle navigation within tabs (@renaudamsellem)
|
|
65
|
+
- **SidePanel**:
|
|
66
|
+
- Add `headerExtra` prop to display extra content above header title (@philippechevieux)
|
|
61
67
|
|
|
62
68
|
### 🐛 Bug Fixes
|
|
63
69
|
|
|
70
|
+
- **ColorPicker**
|
|
71
|
+
- Fix `onFormatChange` behavior (@philippechevieux)
|
|
64
72
|
- **Modal**
|
|
65
|
-
|
|
66
73
|
- Allow to pass className as props just like other components (@renaudamsellem)
|
|
67
|
-
|
|
68
74
|
- **Button**
|
|
69
75
|
- Fix hover and focus state color when redirect button is inside a typography text (@renaudamsellem)
|
|
70
76
|
|
package/dist/Kit/App/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../assets/
|
|
1
|
+
import "../../assets/index29.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index26.css";
|
|
2
2
|
import { jsx as i, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
3
3
|
import T from "classnames";
|
|
4
4
|
import { forwardRef as _ } from "react";
|
|
@@ -8,19 +8,13 @@ import { faEllipsis as g, faArrowRight as P } from "@fortawesome/free-solid-svg-
|
|
|
8
8
|
import { KitIcon as C } from "../../General/Icon/index.js";
|
|
9
9
|
import { KitTypography as K } from "../../General/Typography/index.js";
|
|
10
10
|
import { KitDivider as F } from "../../Layout/Divider/index.js";
|
|
11
|
-
import "../../Layout/Space/index.js";
|
|
12
|
-
import "color-convert";
|
|
13
|
-
import "color-string";
|
|
14
|
-
import "lodash/isEmpty";
|
|
15
|
-
import "../../../chunks/styles.module.4eW8VunD.js";
|
|
16
|
-
import "../../Layout/PageLayout/index.js";
|
|
17
11
|
import { KitButton as k } from "../../General/Button/index.js";
|
|
18
12
|
import { KitTooltip as L } from "../Tooltip/index.js";
|
|
19
13
|
import { KitDropDown as A } from "../../Navigation/DropDown/index.js";
|
|
20
14
|
import { u as j } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
21
15
|
const G = {
|
|
22
16
|
"kit-redirect-card": "_kit-redirect-card_poxps_2"
|
|
23
|
-
}, w = ({ actions: r, actionsInDropdown: m = !1, disabled:
|
|
17
|
+
}, w = ({ actions: r, actionsInDropdown: m = !1, disabled: e = !1 }) => {
|
|
24
18
|
var n, s;
|
|
25
19
|
const { locale: l } = j();
|
|
26
20
|
if (!r)
|
|
@@ -28,23 +22,23 @@ const G = {
|
|
|
28
22
|
const o = r.length < 4;
|
|
29
23
|
let c;
|
|
30
24
|
if (m && r.length > 1)
|
|
31
|
-
c = i(A, { disabled:
|
|
25
|
+
c = i(A, { disabled: e, menu: { items: r }, children: i(k, { title: (n = l.General) === null || n === void 0 ? void 0 : n.more, type: "secondary", icon: i(f, { icon: g }), disableSecureClick: !0, onClick: (t) => t.stopPropagation() }) });
|
|
32
26
|
else if (o)
|
|
33
|
-
c = r.map((
|
|
27
|
+
c = r.map((t) => i(N, { action: t, disabled: e }, t.key));
|
|
34
28
|
else {
|
|
35
|
-
const [
|
|
36
|
-
c = d(x, { children: [[
|
|
29
|
+
const [t, p, ...h] = r;
|
|
30
|
+
c = d(x, { children: [[t, p].map((a) => i(N, { action: a, disabled: e }, a.key)), i(A, { disabled: e, menu: { items: h }, children: i(k, { title: (s = l.General) === null || s === void 0 ? void 0 : s.more, type: "secondary", icon: i(f, { icon: g }), disableSecureClick: !0, onClick: (a) => a.stopPropagation() }) })] });
|
|
37
31
|
}
|
|
38
32
|
return i("div", { className: "kit-redirect-card-actions", children: c });
|
|
39
|
-
}, N = ({ action: r, disabled: m }) => i(L, { title: r.label, children: i(k, { type: "secondary", icon: r.icon, onClick: (
|
|
40
|
-
|
|
41
|
-
}, disabled: r.disabled || m, disableSecureClick: !0 }) }), M = _(({ className: r, style: m, title:
|
|
33
|
+
}, N = ({ action: r, disabled: m }) => i(L, { title: r.label, children: i(k, { type: "secondary", icon: r.icon, onClick: (e) => {
|
|
34
|
+
e.stopPropagation(), r.onClick(e);
|
|
35
|
+
}, disabled: r.disabled || m, disableSecureClick: !0 }) }), M = _(({ className: r, style: m, title: e, description: n, icon: s, coverSrc: l, disabled: o, actions: c, actionsInDropdown: t, onClick: p, coverAlt: h = "" }, a) => {
|
|
42
36
|
const v = s !== void 0 && l === void 0, y = l !== void 0, u = c !== void 0, D = 2, { appId: I } = B(), R = T(G["kit-redirect-card"], r, I, {
|
|
43
37
|
"kit-redirect-card-disabled": o,
|
|
44
38
|
"kit-redirect-card-with-cover": y,
|
|
45
39
|
"kit-redirect-card-with-actions": u
|
|
46
40
|
});
|
|
47
|
-
return d("div", { className: R, tabIndex: o ? -1 : 0, style: m, onClick: p, ref: a, children: [u && v && i(w, { actions: c, disabled: o, actionsInDropdown: !!
|
|
41
|
+
return d("div", { className: R, tabIndex: o ? -1 : 0, style: m, onClick: p, ref: a, children: [u && v && i(w, { actions: c, disabled: o, actionsInDropdown: !!t }), v && i(C, { className: "kit-redirect-card-icon", icon: s }), y && d(x, { children: [d("div", { className: "kit-redirect-card-cover", children: [i("img", { alt: h, src: l }), i("div", { className: "kit-redirect-card-actions-mask" }), u && i(w, { actions: c, actionsInDropdown: !!t, disabled: o })] }), i(F, { noMargin: !0 })] }), d("div", { className: "kit-redirect-card-content", children: [d("section", { children: [i(K.Title, { ellipsis: { tooltip: !0 }, level: "h3", disabled: o, children: e }), n && i(K.Paragraph, { ellipsis: { rows: D, tooltip: n }, disabled: o, children: n })] }), i(C, { className: "kit-redirect-card-redirect-icon", icon: i(f, { icon: P }) })] })] });
|
|
48
42
|
});
|
|
49
43
|
M.displayName = "KitRedirectCard";
|
|
50
44
|
export {
|
|
@@ -1,41 +1,27 @@
|
|
|
1
1
|
import "../../../assets/index5.css";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as n, Fragment as j, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import { useState as B } from "react";
|
|
4
4
|
import { u as D } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
5
5
|
import h from "classnames";
|
|
6
6
|
import { KitButton as F } from "../../General/Button/index.js";
|
|
7
7
|
import { KitTypography as z } from "../../General/Typography/index.js";
|
|
8
|
-
import "../Avatar/index.js";
|
|
9
8
|
import { KitBadge as C } from "../Badge/index.js";
|
|
10
|
-
import "../ItemCard/index.js";
|
|
11
|
-
import "../Collapse/index.js";
|
|
12
|
-
import "../Empty/index.js";
|
|
13
|
-
import "../Error/index.js";
|
|
14
|
-
import "../IdCard/index.js";
|
|
15
|
-
import "../Image/index.js";
|
|
16
|
-
import "../ItemList/index.js";
|
|
17
|
-
import "../Table/index.js";
|
|
18
|
-
import "../Tag/index.js";
|
|
19
|
-
import "../Tree/index.js";
|
|
20
|
-
import "../Tooltip/index.js";
|
|
21
|
-
import "antd";
|
|
22
|
-
import "../RedirectCard/index.js";
|
|
23
9
|
import { FontAwesomeIcon as E } from "@fortawesome/react-fontawesome";
|
|
24
10
|
import { faPlus as O } from "@fortawesome/free-solid-svg-icons";
|
|
25
11
|
const P = {
|
|
26
12
|
"kit-tabs": "_kit-tabs_1i9lf_2"
|
|
27
|
-
}, U = ({ addTab: v, centered: w, className: x, activeKey:
|
|
28
|
-
var
|
|
29
|
-
const { appId: y } = D(), [_, f] = B(
|
|
13
|
+
}, U = ({ addTab: v, centered: w, className: x, activeKey: r, defaultKey: a, items: o, onChange: i, fullwidthTab: u, size: b = "small", variant: s = "classic" }) => {
|
|
14
|
+
var m, d;
|
|
15
|
+
const { appId: y } = D(), [_, f] = B(a ?? ((m = o[0]) === null || m === void 0 ? void 0 : m.key)), k = r ?? _, N = (d = o.find((t) => t.key === k)) === null || d === void 0 ? void 0 : d.tabContent, T = h(y, x, P["kit-tabs"], w ? "centered" : "", b === "small" ? "small" : "medium", s, u ? "fullwidth" : "", N && s === "pill" ? "tabs-bottom-spacing" : ""), A = (t) => {
|
|
30
16
|
f(t), i == null || i(t);
|
|
31
|
-
}, I = (t,
|
|
32
|
-
t.code === "Enter" && (f(
|
|
17
|
+
}, I = (t, c) => {
|
|
18
|
+
t.code === "Enter" && (f(c), i == null || i(c));
|
|
33
19
|
};
|
|
34
|
-
return
|
|
35
|
-
disabled:
|
|
36
|
-
active: k ===
|
|
20
|
+
return n(j, { children: [n("div", { className: T, role: "tablist", children: [o == null ? void 0 : o.map(({ icon: t, label: c, badgeCount: K, key: e, disabled: p }) => n("div", { className: h("kit-tab", s, {
|
|
21
|
+
disabled: p,
|
|
22
|
+
active: k === e,
|
|
37
23
|
fullwidth: u
|
|
38
|
-
}), role: "tab", tabIndex: 0, onClick:
|
|
24
|
+
}), role: "tab", tabIndex: 0, onClick: p ? void 0 : () => A(e), onKeyDown: p ? void 0 : (S) => I(S, e), children: [t && l("div", { className: "kit-tab-icon", children: t }), n("div", { className: "kit-tab-label-wrapper", children: [l(z.Text, { className: "kit-tab-label", size: b === "medium" ? "fontSize4" : void 0, children: c }), !!K && l(C, { className: "kit-tab-count", count: K })] })] }, e)), v && s === "classic" && l(F, { disableSecureClick: !0, type: "tertiary", icon: l(E, { icon: O }), onClick: v })] }), N] });
|
|
39
25
|
};
|
|
40
26
|
U.displayName = "KitTabs";
|
|
41
27
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index39.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";
|
|
@@ -3,7 +3,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as x, useState as y } from "react";
|
|
4
4
|
import { AutoComplete as F } from "antd";
|
|
5
5
|
import { KitInput as O } from "../Input/index.js";
|
|
6
|
-
import { K as P } from "../../../chunks/InputWrapper.
|
|
6
|
+
import { K as P } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
7
7
|
import { FontAwesomeIcon as j } from "@fortawesome/react-fontawesome";
|
|
8
8
|
import { faMagnifyingGlass as B } from "@fortawesome/free-solid-svg-icons";
|
|
9
9
|
import G from "classnames";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index31.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.DPygx2dQ.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(() => {
|
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
import "../../../assets/
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { K as
|
|
5
|
-
import { u as
|
|
6
|
-
import { ColorPicker as
|
|
7
|
-
import
|
|
8
|
-
import { FontAwesomeIcon as
|
|
9
|
-
import { faCircleXmark as
|
|
10
|
-
import { u as
|
|
1
|
+
import "../../../assets/index27.css";
|
|
2
|
+
import { forwardRef as Y, useRef as q, useState as m, useEffect as b, useImperativeHandle as z, createElement as J } from "react";
|
|
3
|
+
import { jsxs as Q, jsx as s } from "react/jsx-runtime";
|
|
4
|
+
import { K as Z } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
5
|
+
import { u as V } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
|
+
import { ColorPicker as oo } from "antd";
|
|
7
|
+
import E from "classnames";
|
|
8
|
+
import { FontAwesomeIcon as to } from "@fortawesome/react-fontawesome";
|
|
9
|
+
import { faCircleXmark as eo } from "@fortawesome/free-solid-svg-icons";
|
|
10
|
+
import { u as ro } from "../../../chunks/useKitLocale.96CdK3og.js";
|
|
11
11
|
const h = {
|
|
12
12
|
"kit-colorpicker": "_kit-colorpicker_1dih2_2",
|
|
13
13
|
"kit-color-picker-clear": "_kit-color-picker-clear_1dih2_37",
|
|
14
14
|
"kit-color-picker-placeholder": "_kit-color-picker-placeholder_1dih2_41",
|
|
15
15
|
"kit-color-picker-text": "_kit-color-picker-text_1dih2_45"
|
|
16
|
-
},
|
|
17
|
-
if (o.length ===
|
|
18
|
-
const r = o.slice(-2),
|
|
19
|
-
return `${o.slice(0, 7)},${
|
|
16
|
+
}, io = 9, co = 16, no = 255, lo = (o) => {
|
|
17
|
+
if (o.length === io) {
|
|
18
|
+
const r = o.slice(-2), e = Math.round(parseInt(r, co) / no * 100);
|
|
19
|
+
return `${o.slice(0, 7)},${e}%`;
|
|
20
20
|
}
|
|
21
21
|
return o;
|
|
22
|
-
},
|
|
22
|
+
}, so = (o, r) => {
|
|
23
23
|
switch (r) {
|
|
24
24
|
case "hex":
|
|
25
|
-
return
|
|
25
|
+
return lo(o.toHexString());
|
|
26
26
|
case "rgb":
|
|
27
27
|
return o.toRgbString();
|
|
28
28
|
case "hsb":
|
|
29
29
|
return o.toHsbString();
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, ao = (o, r, e, c) => c ? s("span", { className: h["kit-color-picker-placeholder"], children: e }) : s("span", { children: so(o, r) }), po = ({ color: o, format: r, showText: e, placeholder: c, isColorPickerValueEmpty: _, allowClear: f, onClear: p }) => {
|
|
32
32
|
var n;
|
|
33
|
-
const { locale: l } =
|
|
34
|
-
return
|
|
33
|
+
const { locale: l } = ro(), a = e === !0, v = typeof e == "function" && e !== void 0, i = f === !0, d = c ?? ((n = l.ColorPicker) === null || n === void 0 ? void 0 : n.selectAColor);
|
|
34
|
+
return Q("div", { className: h["kit-color-picker-text"], children: [a && ao(o, r, d, _), v && s("span", { children: e(o) }), i && s(to, { className: h["kit-color-picker-clear"], "aria-label": "clear", icon: eo, onClick: (k) => {
|
|
35
35
|
k.stopPropagation(), p();
|
|
36
36
|
} })] });
|
|
37
|
-
},
|
|
38
|
-
const { appId:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, [l]),
|
|
37
|
+
}, ko = Y(({ label: o, className: r, helper: e, rootClassName: c, required: _, actions: f, extra: p, showText: n, allowClear: l, open: a = !1, placeholder: v, defaultValue: i, value: d, onChange: k, onClear: C, onOpenChange: x, onFormatChange: I, format: K = "hex", ...g }, N) => {
|
|
38
|
+
const { appId: S } = V(), O = q(null), [R, u] = m(a), [y, A] = m(i ?? d), [H, P] = m(l), [T, L] = m(K), [X, w] = m(0), D = n || H, j = E(S, "kit-colorpicker-panel", c), F = E(S, h["kit-colorpicker"], { "kit-colorpicker-with-text": !!n }, r);
|
|
39
|
+
b(() => {
|
|
40
|
+
P(l);
|
|
41
|
+
}, [l]), b(() => {
|
|
42
42
|
u(a);
|
|
43
|
-
}, [a]),
|
|
44
|
-
|
|
45
|
-
}, [
|
|
43
|
+
}, [a]), b(() => {
|
|
44
|
+
A(i ?? d);
|
|
45
|
+
}, [i, d]), z(N, () => ({
|
|
46
46
|
focus: () => {
|
|
47
47
|
u(!0);
|
|
48
48
|
},
|
|
49
49
|
blur: () => {
|
|
50
50
|
u(!1);
|
|
51
51
|
},
|
|
52
|
-
value:
|
|
52
|
+
value: y
|
|
53
53
|
}));
|
|
54
|
-
const
|
|
55
|
-
l &&
|
|
56
|
-
},
|
|
57
|
-
l && !
|
|
58
|
-
},
|
|
59
|
-
a || u(
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
const M = () => {
|
|
55
|
+
l && P(!1), A(void 0), w((t) => t + 1), C == null || C();
|
|
56
|
+
}, W = (t, U) => {
|
|
57
|
+
l && !H && P(!0), A(t), k == null || k(t, U);
|
|
58
|
+
}, $ = (t) => {
|
|
59
|
+
a || u(t), x == null || x(t);
|
|
60
|
+
}, B = (t) => {
|
|
61
|
+
L(t), I == null || I(t);
|
|
62
|
+
}, G = y === void 0;
|
|
63
|
+
return s(Z, { label: o, helper: e, disabled: g.disabled, required: _, extra: p ?? f, children: s("div", { ref: O, children: J(oo, {
|
|
64
|
+
...g,
|
|
63
65
|
// This is a hack to force the color picker to re-render and display a clear value
|
|
64
66
|
// https://react.dev/learn/preserving-and-resetting-state#option-2-resetting-state-with-a-key
|
|
65
|
-
key:
|
|
66
|
-
rootClassName:
|
|
67
|
+
key: X,
|
|
68
|
+
rootClassName: j,
|
|
67
69
|
className: F,
|
|
68
|
-
format:
|
|
69
|
-
value:
|
|
70
|
-
...
|
|
71
|
-
showText: (
|
|
70
|
+
format: T,
|
|
71
|
+
value: y,
|
|
72
|
+
...D && {
|
|
73
|
+
showText: (t) => s(po, { color: t, format: T, showText: n, placeholder: v, isColorPickerValueEmpty: G, allowClear: H, onClear: M })
|
|
72
74
|
},
|
|
73
|
-
open:
|
|
74
|
-
onOpenChange:
|
|
75
|
-
onFormatChange:
|
|
76
|
-
onChange:
|
|
75
|
+
open: R,
|
|
76
|
+
onOpenChange: $,
|
|
77
|
+
onFormatChange: B,
|
|
78
|
+
onChange: W
|
|
77
79
|
}) }) });
|
|
78
80
|
});
|
|
79
|
-
|
|
81
|
+
ko.displayName = "KitColorPicker";
|
|
80
82
|
export {
|
|
81
|
-
|
|
83
|
+
ko as KitColorPicker
|
|
82
84
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index47.css";
|
|
2
2
|
import { jsxs as R, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as C } from "react";
|
|
4
4
|
import { DatePicker as K } from "antd";
|
|
5
5
|
import D from "classnames";
|
|
6
6
|
import { FontAwesomeIcon as o } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import { faChevronLeft as p, faChevronRight as h, faClock as j, faCalendar as g, faCircleXmark as w, faArrowRight as z } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
-
import { K as A } from "../../../chunks/InputWrapper.
|
|
8
|
+
import { K as A } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
9
9
|
import { u as L } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
const W = {
|
|
11
11
|
"kit-datepicker": "_kit-datepicker_1nfj8_2",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index40.css";
|
|
2
2
|
import { jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as p } from "react";
|
|
4
4
|
import { Input as w } from "antd";
|
|
5
5
|
import { faCircleXmark as k, faEye as z, faEyeSlash as C } from "@fortawesome/free-solid-svg-icons";
|
|
6
6
|
import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { K as h } from "../../../chunks/InputWrapper.
|
|
7
|
+
import { K as h } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
8
8
|
import { u as K } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
9
9
|
import x from "classnames";
|
|
10
10
|
import { KitTypography as y } from "../../General/Typography/index.js";
|
|
@@ -2,7 +2,7 @@ import "../../../assets/index7.css";
|
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as k, useState as x } from "react";
|
|
4
4
|
import { InputNumber as _ } from "antd";
|
|
5
|
-
import { K as N } from "../../../chunks/InputWrapper.
|
|
5
|
+
import { K as N } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
6
6
|
import { u as h } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
7
7
|
import w from "classnames";
|
|
8
8
|
const y = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index41.css";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import k from "classnames";
|
|
4
4
|
import J from "rc-util/es/hooks/useMergedState";
|
|
@@ -8,7 +8,7 @@ import X from "antd/es/config-provider/SizeContext";
|
|
|
8
8
|
import Y from "rc-util/es/pickAttrs";
|
|
9
9
|
import { Radio as Z } from "antd";
|
|
10
10
|
import { u as ee } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
11
|
-
import { K as ae } from "../../../chunks/InputWrapper.
|
|
11
|
+
import { K as ae } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
12
12
|
import te from "antd/es/radio/style";
|
|
13
13
|
const K = O(null), re = K.Provider, oe = {
|
|
14
14
|
"kit-radio": "_kit-radio_lmqef_2"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../../../assets/
|
|
1
|
+
import "../../../../../assets/index25.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/index37.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";
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import "../../../assets/index9.css";
|
|
2
2
|
import { jsxs as v, jsx as d } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { K as
|
|
5
|
-
import { u as
|
|
3
|
+
import { forwardRef as A, useRef as D, useState as G, useEffect as w } from "react";
|
|
4
|
+
import { K as J } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
5
|
+
import { u as Q } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
6
6
|
import C from "classnames";
|
|
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
|
|
7
|
+
import { useEditor as V, EditorContent as X } from "@tiptap/react";
|
|
8
|
+
import Y from "@tiptap/starter-kit";
|
|
9
|
+
import Z from "@tiptap/extension-underline";
|
|
10
|
+
import $ from "@tiptap/extension-text-align";
|
|
11
|
+
import B from "@tiptap/extension-placeholder";
|
|
12
|
+
import tt from "@tiptap/extension-link";
|
|
13
|
+
import et from "@tiptap/extension-character-count";
|
|
14
|
+
import { KitMenuBar as rt } from "./MenuBar/index.js";
|
|
15
|
+
import { KitEditorContentCharacterCount as ot } from "./EditorContentCharacterCount/index.js";
|
|
16
|
+
import { uuid as it } from "../../../utils/functions/index.js";
|
|
17
17
|
const E = {
|
|
18
18
|
"kit-rich-text-wrapper": "_kit-rich-text-wrapper_1j8h5_2",
|
|
19
19
|
"kit-rich-text": "_kit-rich-text_1j8h5_2"
|
|
20
|
-
},
|
|
21
|
-
const { appId:
|
|
20
|
+
}, nt = A(({ label: _, helper: K, htmlFor: T, wrapperClassName: y, className: L, required: R, actions: M, extra: n, placeholder: N, disabled: c, readonly: f, status: o, defaultValue: W, value: i, onChange: u, onFocus: h, onBlur: s, maxLength: x, autoFocus: b = !1, showCount: j = !1, ...H }, S) => {
|
|
21
|
+
const { appId: F } = Q(), k = D(null), [a, g] = G(b), O = C(F, L, E["kit-rich-text"], {
|
|
22
22
|
"kit-rich-text-disabled": c,
|
|
23
23
|
"kit-rich-text-readonly": f,
|
|
24
24
|
"kit-rich-text-error": o === "error",
|
|
25
25
|
"kit-rich-text-warning": o === "warning",
|
|
26
26
|
"kit-rich-text-focused": a
|
|
27
|
-
}), t =
|
|
27
|
+
}), t = V({
|
|
28
28
|
editable: !c && !f,
|
|
29
29
|
content: W,
|
|
30
30
|
editorProps: {
|
|
@@ -33,46 +33,46 @@ const E = {
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
extensions: [
|
|
36
|
-
|
|
36
|
+
Y.configure({
|
|
37
37
|
heading: {
|
|
38
38
|
levels: [1, 2, 3, 4]
|
|
39
39
|
}
|
|
40
40
|
}),
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
Z,
|
|
42
|
+
$.configure({
|
|
43
43
|
types: ["heading", "paragraph"]
|
|
44
44
|
}),
|
|
45
|
-
|
|
45
|
+
tt.extend({ inclusive: !1 }).configure({
|
|
46
46
|
openOnClick: !1
|
|
47
47
|
}),
|
|
48
|
-
|
|
48
|
+
B.configure({
|
|
49
49
|
placeholder: N,
|
|
50
50
|
showOnlyWhenEditable: !1
|
|
51
51
|
}),
|
|
52
|
-
|
|
52
|
+
et.configure({
|
|
53
53
|
limit: x
|
|
54
54
|
})
|
|
55
55
|
],
|
|
56
56
|
onUpdate: ({ editor: e }) => {
|
|
57
57
|
u && u(e.getHTML());
|
|
58
58
|
}
|
|
59
|
-
}), l = "kit-rich-text-wrapper-" +
|
|
59
|
+
}), l = "kit-rich-text-wrapper-" + it(), U = C(y, l, E["kit-rich-text-wrapper"]);
|
|
60
60
|
return w(() => {
|
|
61
|
-
const e = (
|
|
61
|
+
const e = (q) => {
|
|
62
62
|
var m, p;
|
|
63
|
-
const r =
|
|
64
|
-
a && !(!((m = k.current) === null || m === void 0) && m.contains(r)) && !
|
|
63
|
+
const r = q.target, z = r.closest("." + l), I = r.closest(".select-font-size"), P = r.closest(".link-modal") || r.contains(document.querySelector(".link-modal"));
|
|
64
|
+
a && !(!((m = k.current) === null || m === void 0) && m.contains(r)) && !z && !I && !P && (s && s((p = t == null ? void 0 : t.getHTML()) !== null && p !== void 0 ? p : ""), g(!1));
|
|
65
65
|
};
|
|
66
66
|
return document.addEventListener("mousedown", e), document.addEventListener("focusin", e), () => {
|
|
67
67
|
document.removeEventListener("mousedown", e), document.removeEventListener("focusin", e);
|
|
68
68
|
};
|
|
69
69
|
}, [l, s, t, a]), w(() => {
|
|
70
70
|
t !== null && i !== void 0 && i !== t.getHTML() && t.commands.setContent(i);
|
|
71
|
-
}, [i, t]), t ? v(
|
|
71
|
+
}, [i, t]), t ? v(J, { className: U, label: _, helper: K, htmlFor: T, disabled: c, status: o, required: R, extra: n ?? M, children: [v("div", { ref: k, className: O, ...H, children: [d(rt, { editor: t }), d(X, { ref: S, editor: t, className: "ant-typography", onFocus: (e) => {
|
|
72
72
|
h && h(e), g(!0);
|
|
73
|
-
} })] }), j && d(
|
|
73
|
+
} })] }), j && d(ot, { editor: t, status: o, maxLength: x })] }) : null;
|
|
74
74
|
});
|
|
75
|
-
|
|
75
|
+
nt.displayName = "KitRichText";
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
nt as KitRichText
|
|
78
78
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index42.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";
|
|
5
5
|
import W from "classnames";
|
|
6
6
|
import _e from "short-unique-id";
|
|
7
7
|
import { useDebouncedCallback as be } from "use-debounce";
|
|
8
|
-
import { K as we } from "../../../chunks/InputWrapper.
|
|
8
|
+
import { K as we } from "../../../chunks/InputWrapper.DPygx2dQ.js";
|
|
9
9
|
import { u as Ie } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
|
|
10
10
|
import { FontAwesomeIcon as I } from "@fortawesome/react-fontawesome";
|
|
11
11
|
import { faCircleXmark as ge, faCircleNotch as ke, faChevronDown as he, faCheck as De } from "@fortawesome/free-solid-svg-icons";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../assets/
|
|
1
|
+
import "../../../assets/index34.css";
|
|
2
2
|
import { K as _ } from "../../../chunks/SnackBarProvider.T-xLQpTN.js";
|
|
3
3
|
import { jsxs as l, jsx as a, Fragment as x } from "react/jsx-runtime";
|
|
4
4
|
import { toast as p } from "react-hot-toast";
|