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.
Files changed (94) hide show
  1. package/CHANGELOG.md +9 -3
  2. package/dist/Kit/App/index.js +1 -1
  3. package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
  4. package/dist/Kit/DataDisplay/Empty/index.js +1 -1
  5. package/dist/Kit/DataDisplay/Error/index.js +1 -1
  6. package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
  7. package/dist/Kit/DataDisplay/RedirectCard/index.js +10 -16
  8. package/dist/Kit/DataDisplay/Table/index.js +1 -1
  9. package/dist/Kit/DataDisplay/Tabs/index.js +10 -24
  10. package/dist/Kit/DataDisplay/Tag/index.js +1 -1
  11. package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
  12. package/dist/Kit/DataEntry/Checkbox/index.js +2 -2
  13. package/dist/Kit/DataEntry/ColorPicker/index.js +51 -49
  14. package/dist/Kit/DataEntry/DatePicker/index.js +2 -2
  15. package/dist/Kit/DataEntry/Input/index.js +2 -2
  16. package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
  17. package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
  18. package/dist/Kit/DataEntry/Radio/index.js +2 -2
  19. package/dist/Kit/DataEntry/RichText/EditorContentCharacterCount/index.js +1 -1
  20. package/dist/Kit/DataEntry/RichText/MenuBar/FontSizeSelect/index.js +1 -1
  21. package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
  22. package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
  23. package/dist/Kit/DataEntry/RichText/index.js +30 -30
  24. package/dist/Kit/DataEntry/Select/index.js +2 -2
  25. package/dist/Kit/DataEntry/Upload/index.js +1 -1
  26. package/dist/Kit/Feedback/Alert/index.js +1 -1
  27. package/dist/Kit/Feedback/Modal/index.js +1 -1
  28. package/dist/Kit/Feedback/SnackBar/index.js +1 -1
  29. package/dist/Kit/General/Button/index.js +1 -1
  30. package/dist/Kit/General/Typography/index.js +1 -1
  31. package/dist/Kit/Layout/PageLayout/index.js +1 -1
  32. package/dist/Kit/Layout/Section/index.js +13 -10
  33. package/dist/Kit/Navigation/Breadcrumb/index.js +1 -1
  34. package/dist/Kit/Navigation/Header/index.js +1 -1
  35. package/dist/Kit/Navigation/PageHeader/index.js +1 -1
  36. package/dist/Kit/Navigation/Pagination/index.js +1 -1
  37. package/dist/Kit/Navigation/SideMenu/index.js +1 -1
  38. package/dist/Kit/Navigation/SidePanel/index.js +42 -42
  39. package/dist/Kit/Navigation/SidePanel/types.d.ts +1 -0
  40. package/dist/Kit/Navigation/Steps/index.js +1 -1
  41. package/dist/Kit/index.d.ts +55 -6
  42. package/dist/Kit/index.js +182 -177
  43. package/dist/assets/index18.css +1 -1
  44. package/dist/assets/index19.css +1 -1
  45. package/dist/assets/index20.css +1 -1
  46. package/dist/assets/index21.css +1 -1
  47. package/dist/assets/index22.css +1 -1
  48. package/dist/assets/index23.css +1 -1
  49. package/dist/assets/index24.css +1 -1
  50. package/dist/assets/index25.css +1 -1
  51. package/dist/assets/index26.css +1 -1
  52. package/dist/assets/index27.css +1 -1
  53. package/dist/assets/index28.css +1 -1
  54. package/dist/assets/index29.css +1 -1
  55. package/dist/assets/index30.css +1 -1
  56. package/dist/assets/index31.css +1 -1
  57. package/dist/assets/index32.css +1 -1
  58. package/dist/assets/index33.css +1 -1
  59. package/dist/assets/index34.css +1 -1
  60. package/dist/assets/index35.css +1 -1
  61. package/dist/assets/index36.css +1 -1
  62. package/dist/assets/index37.css +1 -1
  63. package/dist/assets/index38.css +1 -1
  64. package/dist/assets/index39.css +1 -1
  65. package/dist/assets/index40.css +1 -1
  66. package/dist/assets/index41.css +1 -1
  67. package/dist/assets/index42.css +1 -1
  68. package/dist/assets/index43.css +1 -1
  69. package/dist/assets/index44.css +1 -1
  70. package/dist/assets/index45.css +1 -1
  71. package/dist/assets/index46.css +1 -1
  72. package/dist/assets/index47.css +1 -1
  73. package/dist/assets/index49.css +1 -1
  74. package/dist/assets/index50.css +1 -1
  75. package/dist/assets/index51.css +1 -0
  76. package/dist/chunks/InputWrapper.DPygx2dQ.js +23 -0
  77. package/dist/index.es.js +180 -177
  78. package/dist/index.umd.js +4 -4
  79. package/package.json +13 -2
  80. package/dist/Kit/DataDisplay/index.d.ts +0 -16
  81. package/dist/Kit/DataDisplay/index.js +0 -34
  82. package/dist/Kit/DataEntry/index.d.ts +0 -15
  83. package/dist/Kit/DataEntry/index.js +0 -32
  84. package/dist/Kit/Feedback/index.d.ts +0 -7
  85. package/dist/Kit/Feedback/index.js +0 -19
  86. package/dist/Kit/General/index.d.ts +0 -3
  87. package/dist/Kit/General/index.js +0 -8
  88. package/dist/Kit/Layout/index.d.ts +0 -5
  89. package/dist/Kit/Layout/index.js +0 -12
  90. package/dist/Kit/Navigation/index.d.ts +0 -8
  91. package/dist/Kit/Navigation/index.js +0 -18
  92. package/dist/assets/styles.css +0 -1
  93. package/dist/chunks/InputWrapper._05UBJgS.js +0 -23
  94. 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.X0](https://www.npmjs.com/package/aristid-ds/v/X.X.X) (202X-XX-XX)
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
 
@@ -1,4 +1,4 @@
1
- import "../../assets/index28.css";
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/index37.css";
1
+ import "../../../assets/index38.css";
2
2
  import { jsx as t, jsxs as f } from "react/jsx-runtime";
3
3
  import { cloneElement as C, useState as N } from "react";
4
4
  import { Collapse as E } from "antd";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index50.css";
1
+ import "../../../assets/index51.css";
2
2
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
3
  import { Empty as p } from "antd";
4
4
  import { u as m } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index49.css";
1
+ import "../../../assets/index50.css";
2
2
  import { jsxs as r, jsx as c } from "react/jsx-runtime";
3
3
  import { Suspense as v } from "react";
4
4
  import { Empty as d } from "antd";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index29.css";
1
+ import "../../../assets/index30.css";
2
2
  import { jsx as i, jsxs as l } from "react/jsx-runtime";
3
3
  import { useState as B, useEffect as V, forwardRef as X } from "react";
4
4
  import Y from "classnames";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index25.css";
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: t = !1 }) => {
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: t, 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: (e) => e.stopPropagation() }) });
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((e) => i(N, { action: e, disabled: t }, e.key));
27
+ c = r.map((t) => i(N, { action: t, disabled: e }, t.key));
34
28
  else {
35
- const [e, p, ...h] = r;
36
- c = d(x, { children: [[e, p].map((a) => i(N, { action: a, disabled: t }, a.key)), i(A, { disabled: t, 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() }) })] });
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: (t) => {
40
- t.stopPropagation(), r.onClick(t);
41
- }, disabled: r.disabled || m, disableSecureClick: !0 }) }), M = _(({ className: r, style: m, title: t, description: n, icon: s, coverSrc: l, disabled: o, actions: c, actionsInDropdown: e, onClick: p, coverAlt: h = "" }, a) => {
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: !!e }), 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: !!e, 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: t }), 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 }) })] })] });
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,4 +1,4 @@
1
- import "../../../assets/index45.css";
1
+ import "../../../assets/index46.css";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
3
  import { forwardRef as z, useMemo as _ } from "react";
4
4
  import { Table as w } from "antd";
@@ -1,41 +1,27 @@
1
1
  import "../../../assets/index5.css";
2
- import { jsxs as c, Fragment as j, jsx as r } from "react/jsx-runtime";
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: e, defaultKey: n, items: o, onChange: i, fullwidthTab: u, size: b = "small", variant: l = "classic" }) => {
28
- var a, p;
29
- const { appId: y } = D(), [_, f] = B(n ?? ((a = o[0]) === null || a === void 0 ? void 0 : a.key)), k = e ?? _, N = (p = o.find((t) => t.key === k)) === null || p === void 0 ? void 0 : p.tabContent, T = h(y, x, P["kit-tabs"], w ? "centered" : "", b === "small" ? "small" : "medium", l, u ? "fullwidth" : "", N && l === "pill" ? "tabs-bottom-spacing" : ""), A = (t) => {
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, s) => {
32
- t.code === "Enter" && (f(s), i == null || i(s));
17
+ }, I = (t, c) => {
18
+ t.code === "Enter" && (f(c), i == null || i(c));
33
19
  };
34
- return c(j, { children: [c("div", { className: T, role: "tablist", children: [o == null ? void 0 : o.map(({ icon: t, label: s, badgeCount: K, key: m, disabled: d }) => c("div", { className: h("kit-tab", l, {
35
- disabled: d,
36
- active: k === m,
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: d ? void 0 : () => A(m), onKeyDown: d ? void 0 : (S) => I(S, m), children: [t && r("div", { className: "kit-tab-icon", children: t }), c("div", { className: "kit-tab-label-wrapper", children: [r(z.Text, { className: "kit-tab-label", size: b === "medium" ? "fontSize4" : void 0, children: s }), !!K && r(C, { className: "kit-tab-count", count: K })] })] }, m)), v && l === "classic" && r(F, { disableSecureClick: !0, type: "tertiary", icon: r(E, { icon: O }), onClick: v })] }), N] });
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/index38.css";
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._05UBJgS.js";
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/index30.css";
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._05UBJgS.js";
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/index26.css";
2
- import { forwardRef as G, useRef as U, useState as m, useEffect as H, useImperativeHandle as Y, createElement as q } from "react";
3
- import { jsxs as z, jsx as s } from "react/jsx-runtime";
4
- import { K as J } from "../../../chunks/InputWrapper._05UBJgS.js";
5
- import { u as Q } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
6
- import { ColorPicker as Z } from "antd";
7
- import T from "classnames";
8
- import { FontAwesomeIcon as V } from "@fortawesome/react-fontawesome";
9
- import { faCircleXmark as oo } from "@fortawesome/free-solid-svg-icons";
10
- import { u as to } from "../../../chunks/useKitLocale.96CdK3og.js";
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
- }, ro = 9, eo = 16, io = 255, co = (o) => {
17
- if (o.length === ro) {
18
- const r = o.slice(-2), t = Math.round(parseInt(r, eo) / io * 100);
19
- return `${o.slice(0, 7)},${t}%`;
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
- }, no = (o, r) => {
22
+ }, so = (o, r) => {
23
23
  switch (r) {
24
24
  case "hex":
25
- return co(o.toHexString());
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
- }, lo = (o, r, t, c) => c ? s("span", { className: h["kit-color-picker-placeholder"], children: t }) : s("span", { children: no(o, r) }), so = ({ color: o, format: r, showText: t, placeholder: c, isColorPickerValueEmpty: f, allowClear: _, onClear: p }) => {
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 } = to(), a = t === !0, v = typeof t == "function" && t !== void 0, e = _ === !0, d = c ?? ((n = l.ColorPicker) === null || n === void 0 ? void 0 : n.selectAColor);
34
- return z("div", { className: h["kit-color-picker-text"], children: [a && lo(o, r, d, f), v && s("span", { children: t(o) }), e && s(V, { className: h["kit-color-picker-clear"], "aria-label": "clear", icon: oo, onClick: (k) => {
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
- }, ao = G(({ label: o, className: r, helper: t, rootClassName: c, required: f, actions: _, extra: p, showText: n, allowClear: l, open: a = !1, placeholder: v, defaultValue: e, value: d, onChange: k, onClear: C, onOpenChange: x, format: E = "hex", ...P }, K) => {
38
- const { appId: b } = Q(), N = U(null), [O, u] = m(a), [I, y] = m(e ?? d), [A, g] = m(l), [S, R] = m(E), [L, X] = m(0), w = n || A, D = T(b, "kit-colorpicker-panel", c), F = T(b, h["kit-colorpicker"], { "kit-colorpicker-with-text": !!n }, r);
39
- H(() => {
40
- g(l);
41
- }, [l]), H(() => {
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]), H(() => {
44
- y(e ?? d);
45
- }, [e, d]), Y(K, () => ({
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: I
52
+ value: y
53
53
  }));
54
- const j = () => {
55
- l && g(!1), y(void 0), X((i) => i + 1), C == null || C();
56
- }, M = (i, B) => {
57
- l && !A && g(!0), y(i), k == null || k(i, B);
58
- }, W = (i) => {
59
- a || u(i), x == null || x(i);
60
- }, $ = I === void 0;
61
- return s(J, { label: o, helper: t, disabled: P.disabled, required: f, extra: p ?? _, children: s("div", { ref: N, children: q(Z, {
62
- ...P,
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: L,
66
- rootClassName: D,
67
+ key: X,
68
+ rootClassName: j,
67
69
  className: F,
68
- format: S,
69
- value: I,
70
- ...w && {
71
- showText: (i) => s(so, { color: i, format: S, showText: n, placeholder: v, isColorPickerValueEmpty: $, allowClear: A, onClear: j })
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: O,
74
- onOpenChange: W,
75
- onFormatChange: R,
76
- onChange: M
75
+ open: R,
76
+ onOpenChange: $,
77
+ onFormatChange: B,
78
+ onChange: W
77
79
  }) }) });
78
80
  });
79
- ao.displayName = "KitColorPicker";
81
+ ko.displayName = "KitColorPicker";
80
82
  export {
81
- ao as KitColorPicker
83
+ ko as KitColorPicker
82
84
  };
@@ -1,11 +1,11 @@
1
- import "../../../assets/index46.css";
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._05UBJgS.js";
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/index39.css";
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._05UBJgS.js";
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._05UBJgS.js";
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 { K as t } from "../../../chunks/InputWrapper._05UBJgS.js";
1
+ import { K as t } from "../../../chunks/InputWrapper.DPygx2dQ.js";
2
2
  export {
3
3
  t as KitInputWrapper
4
4
  };
@@ -1,4 +1,4 @@
1
- import "../../../assets/index40.css";
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._05UBJgS.js";
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/index23.css";
1
+ import "../../../../assets/index24.css";
2
2
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
3
3
  import h from "classnames";
4
4
  import { u as s } from "../../../../chunks/useKitTheme.KSAU-Pdv.js";
@@ -1,4 +1,4 @@
1
- import "../../../../../assets/index24.css";
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/index36.css";
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,4 +1,4 @@
1
- import "../../../../assets/index22.css";
1
+ import "../../../../assets/index23.css";
2
2
  import { jsxs as m, jsx as t } from "react/jsx-runtime";
3
3
  import n from "classnames";
4
4
  import { u as p } from "../../../../chunks/useKitTheme.KSAU-Pdv.js";
@@ -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 P, useRef as A, useState as D, useEffect as w } from "react";
4
- import { K as G } from "../../../chunks/InputWrapper._05UBJgS.js";
5
- import { u as J } from "../../../chunks/useKitTheme.KSAU-Pdv.js";
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 Q, EditorContent as V } from "@tiptap/react";
8
- import X from "@tiptap/starter-kit";
9
- import Y from "@tiptap/extension-underline";
10
- import Z from "@tiptap/extension-text-align";
11
- import $ from "@tiptap/extension-placeholder";
12
- import B from "@tiptap/extension-link";
13
- import tt from "@tiptap/extension-character-count";
14
- import { KitMenuBar as et } from "./MenuBar/index.js";
15
- import { KitEditorContentCharacterCount as rt } from "./EditorContentCharacterCount/index.js";
16
- import { uuid as ot } from "../../../utils/functions/index.js";
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
- }, it = P(({ 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) => {
21
- const { appId: S } = J(), k = A(null), [a, g] = D(b), F = C(S, L, E["kit-rich-text"], {
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 = Q({
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
- X.configure({
36
+ Y.configure({
37
37
  heading: {
38
38
  levels: [1, 2, 3, 4]
39
39
  }
40
40
  }),
41
- Y,
42
- Z.configure({
41
+ Z,
42
+ $.configure({
43
43
  types: ["heading", "paragraph"]
44
44
  }),
45
- B.extend({ inclusive: !1 }).configure({
45
+ tt.extend({ inclusive: !1 }).configure({
46
46
  openOnClick: !1
47
47
  }),
48
- $.configure({
48
+ B.configure({
49
49
  placeholder: N,
50
50
  showOnlyWhenEditable: !1
51
51
  }),
52
- tt.configure({
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-" + ot(), O = C(y, l, E["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 = (U) => {
61
+ const e = (q) => {
62
62
  var m, p;
63
- const r = U.target, q = r.closest("." + l), z = r.closest(".select-font-size"), I = r.closest(".link-modal") || r.contains(document.querySelector(".link-modal"));
64
- a && !(!((m = k.current) === null || m === void 0) && m.contains(r)) && !q && !z && !I && (s && s((p = t == null ? void 0 : t.getHTML()) !== null && p !== void 0 ? p : ""), g(!1));
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(G, { className: O, label: _, helper: K, htmlFor: T, disabled: c, status: o, required: R, extra: n ?? M, children: [v("div", { ref: k, className: F, children: [d(et, { editor: t }), d(V, { ref: H, editor: t, className: "ant-typography", onFocus: (e) => {
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(rt, { editor: t, status: o, maxLength: x })] }) : null;
73
+ } })] }), j && d(ot, { editor: t, status: o, maxLength: x })] }) : null;
74
74
  });
75
- it.displayName = "KitRichText";
75
+ nt.displayName = "KitRichText";
76
76
  export {
77
- it as KitRichText
77
+ nt as KitRichText
78
78
  };
@@ -1,11 +1,11 @@
1
- import "../../../assets/index41.css";
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._05UBJgS.js";
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/index31.css";
1
+ import "../../../assets/index32.css";
2
2
  import { Upload as s } from "antd";
3
3
  import { jsxs as n, jsx as r, Fragment as k } from "react/jsx-runtime";
4
4
  import { forwardRef as K } from "react";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index32.css";
1
+ import "../../../assets/index33.css";
2
2
  import { jsxs as n, Fragment as K, jsx as s } from "react/jsx-runtime";
3
3
  import v from "react-hot-toast";
4
4
  import b from "classnames";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index42.css";
1
+ import "../../../assets/index43.css";
2
2
  import { jsx as o, jsxs as y, Fragment as z } from "react/jsx-runtime";
3
3
  import B from "react-modal";
4
4
  import { KitSpace as D } from "../../Layout/Space/index.js";
@@ -1,4 +1,4 @@
1
- import "../../../assets/index33.css";
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";