aristid-ds 15.3.1-ceb83cd → 15.3.1-e2acd66

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 (47) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/Kit/App/index.js +1 -1
  3. package/dist/Kit/DataDisplay/IdCard/index.js +1 -1
  4. package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
  5. package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
  6. package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
  7. package/dist/Kit/DataDisplay/Table/index.js +1 -1
  8. package/dist/Kit/DataDisplay/Tabs/index.js +1 -1
  9. package/dist/Kit/DataDisplay/Tag/index.js +1 -1
  10. package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
  11. package/dist/Kit/DataEntry/CheckableTile/CheckableTile.d.ts +2 -1
  12. package/dist/Kit/DataEntry/CheckableTile/index.js +1 -1
  13. package/dist/Kit/DataEntry/Checkbox/index.js +73 -59
  14. package/dist/Kit/DataEntry/Checkbox/types.d.ts +4 -0
  15. package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
  16. package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
  17. package/dist/Kit/DataEntry/Filter/index.js +1 -1
  18. package/dist/Kit/DataEntry/Input/index.js +1 -1
  19. package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
  20. package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
  21. package/dist/Kit/DataEntry/Radio/index.js +67 -49
  22. package/dist/Kit/DataEntry/Radio/types.d.ts +7 -1
  23. package/dist/Kit/DataEntry/RichText/index.js +1 -1
  24. package/dist/Kit/DataEntry/Select/index.js +1 -1
  25. package/dist/Kit/DataEntry/TreeSelect/index.js +1 -1
  26. package/dist/Kit/Feedback/Modal/index.js +8 -6
  27. package/dist/Kit/Feedback/Notification/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/Navigation/Header/index.js +1 -1
  32. package/dist/Kit/index.js +2 -2
  33. package/dist/assets/index29.css +1 -1
  34. package/dist/assets/index38.css +1 -1
  35. package/dist/assets/index46.css +1 -1
  36. package/dist/chunks/CheckableTile.BOiSgMpa.js +44 -0
  37. package/dist/chunks/{InputWrapper._DzN8nB8.js → InputWrapper.ChsMnD5W.js} +1 -1
  38. package/dist/chunks/{SnackBarProvider.tNFJ5yIw.js → SnackBarProvider._Oi0PzOH.js} +1 -1
  39. package/dist/chunks/constants.DcAEmIjR.js +9 -0
  40. package/dist/index.es.js +2 -2
  41. package/dist/index.umd.js +4 -4
  42. package/dist/theme/aristid/general/utilities/index.js +9 -6
  43. package/dist/theme/types/utilities/index.d.ts +4 -1
  44. package/dist/utils/constants.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/dist/chunks/CheckableTile.0URltVZ0.js +0 -31
  47. package/dist/chunks/constants.clto0NGz.js +0 -8
package/CHANGELOG.md CHANGED
@@ -18,6 +18,10 @@
18
18
  - Add `enableSpellCheck` prop to `KitTextArea` to display inline correction highlights with suggestion dropdown (@philippechevieux)
19
19
  - **Upload:**
20
20
  - Add `itemRender` and `horizontal` props, and export `KitUpload.UploadedFileItem` to allow customisation of file list items (@evoiron)
21
+ - **Checkbox:**
22
+ - Add `tile` props to `KitCheckbox` and `KitCheckbox.Group` to display as `CheckableTile` (@evoiron)
23
+ - **Radio:**
24
+ - Add `tile` props to `KitRadio` and `KitRadio.Group` to display as `CheckableTile` (@evoiron)
21
25
 
22
26
  ### 🐛 Bug Fixes
23
27
 
@@ -41,6 +45,7 @@
41
45
  - Fix display full months names in dropdown (@evoiron)
42
46
  - **Modal:**
43
47
  - Prevent outline clipping caused by overflow property on modal content (@philippechevieux)
48
+ - set z-index lower than alerts and notifications z-index when in fullscreen (@evoiron)
44
49
 
45
50
  ### 📝 Documentation
46
51
 
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as g, Fragment as L } from "react/jsx-runtime";
2
2
  import { useState as K, useLayoutEffect as S, useRef as C, useEffect as P } from "react";
3
3
  import { ConfigProvider as b } from "antd";
4
- import { K as k } from "../../chunks/SnackBarProvider.tNFJ5yIw.js";
4
+ import { K as k } from "../../chunks/SnackBarProvider._Oi0PzOH.js";
5
5
  import { toCssVariables as h, uuid as y } from "../../utils/functions/index.js";
6
6
  import p from "lodash/merge";
7
7
  import { Style as f } from "react-style-tag";
@@ -4,7 +4,7 @@ import { t as D, u as m } from "../../../chunks/useEllipsisTooltip.L5G7alX3.js";
4
4
  import { u as E } from "../../../chunks/useKitTheme.BdeSOGoj.js";
5
5
  import { K as N } from "../../../chunks/Avatar.B2Q0k3WU.js";
6
6
  import { KitTooltip as h } from "../Tooltip/index.js";
7
- import { T as g } from "../../../chunks/constants.clto0NGz.js";
7
+ import { T as g } from "../../../chunks/constants.DcAEmIjR.js";
8
8
  import '../../../assets/index2.css';const C = {
9
9
  "kit-id-card": "_kit-id-card_8jvfq_2"
10
10
  }, f = [
@@ -14,7 +14,7 @@ import { faEllipsis as oi, faImage as ri } from "@fortawesome/free-solid-svg-ico
14
14
  import { KitDropDown as ai } from "../../Navigation/DropDown/index.js";
15
15
  import { u as di } from "../../../chunks/useKitLocale.C5F-tmnC.js";
16
16
  import { useDebouncedCallback as ci } from "use-debounce";
17
- import { N as ni, F as li } from "../../../chunks/constants.clto0NGz.js";
17
+ import { N as ni, F as li } from "../../../chunks/constants.DcAEmIjR.js";
18
18
  import '../../../assets/index27.css';const mi = {
19
19
  "kit-item-card": "_kit-item-card_124tz_2"
20
20
  }, L = () => {
@@ -9,7 +9,7 @@ import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
9
9
  import { faEllipsis as E } from "@fortawesome/free-solid-svg-icons";
10
10
  import F from "classnames";
11
11
  import { u as W } from "../../../chunks/useKitLocale.C5F-tmnC.js";
12
- import { N as Y, F as Z } from "../../../chunks/constants.clto0NGz.js";
12
+ import { N as Y, F as Z } from "../../../chunks/constants.DcAEmIjR.js";
13
13
  import { getStringFromReactNode as B } from "../../../utils/functions/index.js";
14
14
  import '../../../assets/index4.css';const m = {
15
15
  "kit-item-list": "_kit-item-list_1rfhx_2",
@@ -11,7 +11,7 @@ import { KitButton as k } from "../../General/Button/index.js";
11
11
  import { KitTooltip as R } from "../Tooltip/index.js";
12
12
  import { KitDropDown as g } from "../../Navigation/DropDown/index.js";
13
13
  import { u as P } from "../../../chunks/useKitLocale.C5F-tmnC.js";
14
- import { N as O, F as S } from "../../../chunks/constants.clto0NGz.js";
14
+ import { N as O, F as S } from "../../../chunks/constants.DcAEmIjR.js";
15
15
  import '../../../assets/index22.css';const j = {
16
16
  "kit-redirect-card": "_kit-redirect-card_1yxds_2"
17
17
  }, K = ({ actions: i, actionsInDropdown: m = !1, disabled: e = !1 }) => {
@@ -3,7 +3,7 @@ import { forwardRef as O, useMemo as g } from "react";
3
3
  import { Table as y } from "antd";
4
4
  import I from "classnames";
5
5
  import { u as U } from "../../../chunks/useKitTheme.BdeSOGoj.js";
6
- import { F as N } from "../../../chunks/constants.clto0NGz.js";
6
+ import { F as N } from "../../../chunks/constants.DcAEmIjR.js";
7
7
  import { KitIcon as j } from "../../General/Icon/index.js";
8
8
  import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
9
9
  import { faUpDown as E, faArrowDown as F, faArrowUp as R, faGripLines as W, faCaretDown as $, faCaretRight as M } from "@fortawesome/free-solid-svg-icons";
@@ -5,7 +5,7 @@ import O from "classnames";
5
5
  import { KitButton as B } from "../../General/Button/index.js";
6
6
  import { FontAwesomeIcon as D } from "@fortawesome/react-fontawesome";
7
7
  import { faPlus as J, faEllipsisVertical as M } from "@fortawesome/free-solid-svg-icons";
8
- import { F as Q } from "../../../chunks/constants.clto0NGz.js";
8
+ import { F as Q } from "../../../chunks/constants.DcAEmIjR.js";
9
9
  import { KitDropDown as Y } from "../../Navigation/DropDown/index.js";
10
10
  import { u as Z } from "../../../chunks/useKitLocale.C5F-tmnC.js";
11
11
  import { KitTypography as tt } from "../../General/Typography/index.js";
@@ -6,7 +6,7 @@ import { u as L } from "../../../chunks/useKitTheme.BdeSOGoj.js";
6
6
  import { FontAwesomeIcon as R } from "@fortawesome/react-fontawesome";
7
7
  import { faXmark as X } from "@fortawesome/free-solid-svg-icons";
8
8
  import { KitIdCard as j } from "../IdCard/index.js";
9
- import { T as P, N as V, F as H } from "../../../chunks/constants.clto0NGz.js";
9
+ import { T as P, N as V, F as H } from "../../../chunks/constants.DcAEmIjR.js";
10
10
  import { KitTooltip as $ } from "../Tooltip/index.js";
11
11
  import { u as A } from "../../../chunks/useKitLocale.C5F-tmnC.js";
12
12
  import { KitModal as Y } from "../../Feedback/Modal/index.js";
@@ -2,7 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as O, useState as b, useRef as j } from "react";
3
3
  import { AutoComplete as B } from "antd";
4
4
  import { KitInput as M } from "../Input/index.js";
5
- import { K as S } from "../../../chunks/InputWrapper._DzN8nB8.js";
5
+ import { K as S } from "../../../chunks/InputWrapper.ChsMnD5W.js";
6
6
  import { FontAwesomeIcon as W } from "@fortawesome/react-fontawesome";
7
7
  import { faMagnifyingGlass as q } from "@fortawesome/free-solid-svg-icons";
8
8
  import z from "classnames";
@@ -1,2 +1,3 @@
1
1
  import { IKitCheckableTile } from './types';
2
- export declare const KitCheckableTile: import('react').ForwardRefExoticComponent<IKitCheckableTile & import('react').RefAttributes<HTMLButtonElement>>;
2
+ import { CheckboxRef } from 'antd';
3
+ export declare const KitCheckableTile: import('react').ForwardRefExoticComponent<IKitCheckableTile & import('react').RefAttributes<CheckboxRef>>;
@@ -1,4 +1,4 @@
1
- import { K as i } from "../../../chunks/CheckableTile.0URltVZ0.js";
1
+ import { K as i } from "../../../chunks/CheckableTile.BOiSgMpa.js";
2
2
  export {
3
3
  i as KitCheckableTile
4
4
  };
@@ -1,68 +1,82 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { memo as P, createContext as p, forwardRef as O, useContext as R, useState as w, useEffect as I, useRef as ee } from "react";
3
- import $ from "classnames";
4
- import { Checkbox as le } from "antd";
5
- import { u as ae } from "../../../chunks/useKitTheme.BdeSOGoj.js";
6
- import ne from "rc-util/es/omit";
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { memo as ee, createContext as le, forwardRef as E, useContext as T, useState as D, useEffect as w, useRef as ae } from "react";
3
+ import N from "classnames";
4
+ import { Checkbox as ne } from "antd";
5
+ import { u as ce } from "../../../chunks/useKitTheme.BdeSOGoj.js";
6
+ import ie from "rc-util/es/omit";
7
7
  import { ConfigContext as te } from "antd/es/config-provider/";
8
- import ce from "antd/es/checkbox/style";
9
- import { K as ie } from "../../../chunks/InputWrapper._DzN8nB8.js";
10
- import '../../../assets/index29.css';const j = p(null), ue = ({ defaultValue: f, children: v, options: l = [], prefixCls: b, className: a, wrapperClassName: x, status: g, rootClassName: u, style: t, onChange: d, label: h, helper: r, required: s, actions: D, extra: k, ...n }, E) => {
11
- const { getPrefixCls: T, direction: W } = R(te), [m, K] = w(n.value || f || []), [q, S] = w([]);
12
- I(() => {
13
- "value" in n && K(n.value || []);
8
+ import ue from "antd/es/checkbox/style";
9
+ import { K as de } from "../../../chunks/InputWrapper.ChsMnD5W.js";
10
+ import { K as oe } from "../../../chunks/CheckableTile.BOiSgMpa.js";
11
+ import '../../../assets/index29.css';const j = {
12
+ "kit-checkbox": "_kit-checkbox_1fo4w_12",
13
+ "kit-checkbox-tile-group": "_kit-checkbox-tile-group_1fo4w_167"
14
+ }, A = le(null), re = ({ defaultValue: C, children: d, options: b = [], prefixCls: G, className: e, wrapperClassName: h, status: a, rootClassName: g, style: k, onChange: i, label: o, helper: V, required: f, actions: t, extra: c, tile: r, ...n }, m) => {
15
+ const { getPrefixCls: q, direction: z } = T(te), [x, S] = D(n.value || C || []), [F, O] = D([]);
16
+ w(() => {
17
+ "value" in n && S(n.value || []);
14
18
  }, [n]);
15
- const _ = () => l.map((e) => typeof e == "string" || typeof e == "number" ? {
16
- label: e,
17
- value: e
18
- } : e), z = (e) => {
19
- S((c) => c.filter((i) => i !== e));
20
- }, F = (e) => {
21
- S((c) => [...c, e]);
22
- }, H = (e) => {
23
- const c = m.indexOf(e.value), i = [...m];
24
- c === -1 ? i.push(e.value) : i.splice(c, 1), "value" in n || K(i);
25
- const N = _();
26
- d?.(i.filter((G) => q.includes(G)).sort((G, X) => {
27
- const Y = N.findIndex((y) => y.value === G), Z = N.findIndex((y) => y.value === X);
28
- return Y - Z;
19
+ const R = () => b.map((l) => typeof l == "string" || typeof l == "number" ? {
20
+ label: l,
21
+ value: l
22
+ } : l), H = (l) => {
23
+ O((s) => s.filter((v) => v !== l));
24
+ }, J = (l) => {
25
+ O((s) => [...s, l]);
26
+ }, L = (l) => {
27
+ const s = x.indexOf(l.value), v = [...x];
28
+ s === -1 ? v.push(l.value) : v.splice(s, 1), "value" in n || S(v);
29
+ const $ = R();
30
+ i?.(v.filter((y) => F.includes(y)).sort((y, Z) => {
31
+ const P = $.findIndex((I) => I.value === y), p = $.findIndex((I) => I.value === Z);
32
+ return P - p;
29
33
  }));
30
- }, C = T("checkbox", b), V = `${C}-group`, [J, L] = ce(C), M = ne(n, ["value", "disabled", "bordered"]);
31
- l && l.length > 0 && (v = _().map((e) => o(A, { prefixCls: C, danger: "danger" in e ? e.danger : n.danger, disabled: "disabled" in e ? e.disabled : n.disabled, value: e.value, checked: m.includes(e.value), onChange: e.onChange, className: `${V}-item`, style: e.style, children: e.label }, e.value.toString())));
32
- const Q = {
33
- toggleOption: H,
34
- value: m,
34
+ }, _ = q("checkbox", G), K = `${_}-group`, [M, Q] = ue(_), U = ie(n, ["value", "disabled", "bordered"]);
35
+ b && b.length > 0 && (d = R().map((l) => u(B, { tile: r, icon: l.icon, prefixCls: _, danger: "danger" in l ? l.danger : n.danger, disabled: "disabled" in l ? l.disabled : n.disabled, value: l.value, checked: x.includes(l.value), onChange: l.onChange, className: `${K}-item`, style: l.style, children: l.label }, l.value.toString())));
36
+ const X = {
37
+ toggleOption: L,
38
+ value: x,
35
39
  disabled: n.disabled,
36
40
  name: n.name,
37
41
  // https://github.com/ant-design/ant-design/issues/16376
38
- registerValue: F,
39
- cancelValue: z
40
- }, U = $(V, {
41
- [`${V}-rtl`]: W === "rtl"
42
- }, a, u, L);
43
- return J(o("div", { className: U, style: t, ...M, ref: E, children: o(j.Provider, { value: Q, children: o(ie, { label: h, helper: r, disabled: n.disabled, bordered: n.bordered, status: g, className: x, required: s, extra: k ?? D, children: v }) }) }));
44
- }, de = P(O(ue)), re = {
45
- "kit-checkbox": "_kit-checkbox_itvx3_12"
46
- }, A = O(({ danger: f, className: v, ...l }, b) => {
47
- const a = R(j), { appId: x } = ae(), g = a?.disabled || l.disabled, u = ee(l.value);
48
- I(() => {
49
- if (!(l.skipGroup || !a))
50
- return a.registerValue(l.value), () => a.cancelValue(l.value);
51
- }, []), I(() => {
52
- l.skipGroup || !a || l.value !== u.current && (a.cancelValue(u.current), a.registerValue(l.value), u.current = l.value);
53
- }, [a, l.skipGroup, l.value]);
54
- const t = { ...l };
55
- a && !l.skipGroup && (t.onChange = (...h) => {
56
- var r, s;
57
- (r = l.onChange) === null || r === void 0 || r.call(l, ...h), (s = a.toggleOption) === null || s === void 0 || s.call(a, { label: l.children, value: l.value });
58
- }, t.name = a.name, t.checked = a.value.includes(l.value));
59
- const d = $(x, re["kit-checkbox"], v, {
60
- "ant-checkbox-wrapper-danger": f
42
+ registerValue: J,
43
+ cancelValue: H
44
+ }, Y = N(K, {
45
+ [`${K}-rtl`]: z === "rtl"
46
+ }, e, g, Q);
47
+ return M(u("div", { className: Y, style: k, ...U, ref: m, children: u(A.Provider, { value: X, children: u(de, { label: o, helper: V, disabled: n.disabled, bordered: n.bordered, status: a, className: h, required: f, extra: c ?? t, children: r ? u("div", { className: j["kit-checkbox-tile-group"], children: d }) : d }) }) }));
48
+ }, se = ee(E(re)), B = E(({ danger: C, className: d, tile: b, icon: G, ...e }, h) => {
49
+ const a = T(A), { appId: g } = ce(), k = a?.disabled || e.disabled, i = ae(e.value);
50
+ if (w(() => {
51
+ if (!(e.skipGroup || !a))
52
+ return a.registerValue(e.value), () => a.cancelValue(e.value);
53
+ }, []), w(() => {
54
+ e.skipGroup || !a || e.value !== i.current && (a.cancelValue(i.current), a.registerValue(e.value), i.current = e.value);
55
+ }, [a, e.skipGroup, e.value]), b) {
56
+ const f = a && !e.skipGroup ? a.value.includes(e.value) : e.checked, t = (c, r) => {
57
+ var n, m;
58
+ a && !e.skipGroup && ((n = a.toggleOption) === null || n === void 0 || n.call(a, { label: e.children, value: e.value })), (m = e.onChange) === null || m === void 0 || m.call(e, {
59
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
60
+ target: { checked: c, value: e.value },
61
+ stopPropagation: () => r.stopPropagation(),
62
+ preventDefault: () => r.preventDefault(),
63
+ nativeEvent: r.nativeEvent
64
+ });
65
+ };
66
+ return u(oe, { ref: h, className: N(g, d), label: e.children, icon: G, checked: f, disabled: k, onChange: t });
67
+ }
68
+ const o = { ...e };
69
+ a && !e.skipGroup && (o.onChange = (...f) => {
70
+ var t, c;
71
+ (t = e.onChange) === null || t === void 0 || t.call(e, ...f), (c = a.toggleOption) === null || c === void 0 || c.call(a, { label: e.children, value: e.value });
72
+ }, o.name = a.name, o.checked = a.value.includes(e.value));
73
+ const V = N(g, j["kit-checkbox"], d, {
74
+ "ant-checkbox-wrapper-danger": C
61
75
  });
62
- return o(le, { ...t, ref: b, disabled: g, className: d });
63
- }), B = A;
64
- B.displayName = "KitCheckbox";
65
- B.Group = de;
76
+ return u(ne, { ...o, ref: h, disabled: k, className: V });
77
+ }), W = B;
78
+ W.displayName = "KitCheckbox";
79
+ W.Group = se;
66
80
  export {
67
- B as KitCheckbox
81
+ W as KitCheckbox
68
82
  };
@@ -5,6 +5,8 @@ import { CheckboxChangeEvent } from 'antd/es/checkbox/Checkbox';
5
5
  import { IKitInputWrapperBase } from '../InputWrapper/types';
6
6
  export interface IKitCheckbox extends CheckboxProps, KitHTMLAttributes<HTMLLabelElement> {
7
7
  danger?: boolean;
8
+ tile?: boolean;
9
+ icon?: ReactNode;
8
10
  }
9
11
 
10
12
  type CheckboxValueType = string | number | boolean;
@@ -12,6 +14,7 @@ type CheckboxValueType = string | number | boolean;
12
14
  export interface CheckboxOptionType {
13
15
  label: ReactNode;
14
16
  value: CheckboxValueType;
17
+ icon?: ReactNode;
15
18
  style?: CSSProperties;
16
19
  disabled?: boolean;
17
20
  danger?: boolean;
@@ -38,6 +41,7 @@ export interface ICheckboxGroup extends AbstractCheckboxGroup, Omit<IKitInputWra
38
41
  onChange?: (checkedValue: Array<CheckboxValueType>) => void;
39
42
  children?: ReactNode;
40
43
  required?: boolean;
44
+ tile?: boolean;
41
45
  }
42
46
 
43
47
  export interface ICheckboxGroupContext {
@@ -1,6 +1,6 @@
1
1
  import { forwardRef as Z, useRef as V, useState as h, useEffect as K, useImperativeHandle as oo, createElement as to } from "react";
2
2
  import { jsxs as ro, jsx as s } from "react/jsx-runtime";
3
- import { K as eo } from "../../../chunks/InputWrapper._DzN8nB8.js";
3
+ import { K as eo } from "../../../chunks/InputWrapper.ChsMnD5W.js";
4
4
  import { u as io } from "../../../chunks/useKitTheme.BdeSOGoj.js";
5
5
  import { ColorPicker as no } from "antd";
6
6
  import b from "classnames";
@@ -4,7 +4,7 @@ import { DatePicker as L } from "antd";
4
4
  import G from "classnames";
5
5
  import { FontAwesomeIcon as s } from "@fortawesome/react-fontawesome";
6
6
  import { faChevronLeft as V, faChevronRight as j, faCheck as pe, faClock as ee, faCalendar as ne, faCircleXmark as te, faArrowRight as be } from "@fortawesome/free-solid-svg-icons";
7
- import { K as ie } from "../../../chunks/InputWrapper._DzN8nB8.js";
7
+ import { K as ie } from "../../../chunks/InputWrapper.ChsMnD5W.js";
8
8
  import { u as oe } from "../../../chunks/useKitTheme.BdeSOGoj.js";
9
9
  import { u as re } from "../../../chunks/useGetPopupContainer.bCZKSUsz.js";
10
10
  import { KitTypography as _e } from "../../General/Typography/index.js";
@@ -7,7 +7,7 @@ import { FontAwesomeIcon as F } from "@fortawesome/react-fontawesome";
7
7
  import { faCaretDown as I } from "@fortawesome/free-solid-svg-icons";
8
8
  import { KitBadge as L } from "../../DataDisplay/Badge/index.js";
9
9
  import { KitTooltip as E } from "../../DataDisplay/Tooltip/index.js";
10
- import { T as b } from "../../../chunks/constants.clto0NGz.js";
10
+ import { T as b } from "../../../chunks/constants.DcAEmIjR.js";
11
11
  import '../../../assets/index24.css';const R = {
12
12
  "kit-filter": "_kit-filter_urt2b_2"
13
13
  }, O = N(({ leftIcon: a, values: e = [], active: i = !1, readonly: c = !1, disabled: n = !1, showSingleValue: s = !1, expandable: m = !1, label: l = "", isDropdownOpen: d = !1, buttonKey: h, ...r }, f) => {
@@ -3,7 +3,7 @@ import { useEffect as N, useState as A, useRef as x, useLayoutEffect as Z, useCa
3
3
  import { Input as F } from "antd";
4
4
  import { faCircleInfo as q, faCircleXmark as H, faEye as P, faEyeSlash as tt } from "@fortawesome/free-solid-svg-icons";
5
5
  import { FontAwesomeIcon as B } from "@fortawesome/react-fontawesome";
6
- import { K as V } from "../../../chunks/InputWrapper._DzN8nB8.js";
6
+ import { K as V } from "../../../chunks/InputWrapper.ChsMnD5W.js";
7
7
  import { u as j } from "../../../chunks/useKitTheme.BdeSOGoj.js";
8
8
  import { KitDropDown as et } from "../../Navigation/DropDown/index.js";
9
9
  import { KitSpace as Y } from "../../Layout/Space/index.js";
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { forwardRef as x, useState as w } from "react";
3
3
  import { InputNumber as g } from "antd";
4
- import { K as j } from "../../../chunks/InputWrapper._DzN8nB8.js";
4
+ import { K as j } from "../../../chunks/InputWrapper.ChsMnD5W.js";
5
5
  import { u as y } from "../../../chunks/useKitTheme.BdeSOGoj.js";
6
6
  import H from "classnames";
7
7
  import '../../../assets/index6.css';const R = {
@@ -1,4 +1,4 @@
1
- import { K as t } from "../../../chunks/InputWrapper._DzN8nB8.js";
1
+ import { K as t } from "../../../chunks/InputWrapper.ChsMnD5W.js";
2
2
  export {
3
3
  t as KitInputWrapper
4
4
  };
@@ -1,54 +1,72 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import $ from "classnames";
3
- import J from "rc-util/es/hooks/useMergedState";
4
- import { createContext as O, forwardRef as z, useContext as p, memo as Q } from "react";
5
- import { ConfigContext as U } from "antd/es/config-provider/";
6
- import X from "antd/es/config-provider/SizeContext";
7
- import Y from "rc-util/es/pickAttrs";
8
- import { Radio as Z } from "antd";
9
- import { u as ee } from "../../../chunks/useKitTheme.BdeSOGoj.js";
10
- import { K as ae } from "../../../chunks/InputWrapper._DzN8nB8.js";
11
- import te from "antd/es/radio/style";
12
- import '../../../assets/index38.css';const K = O(null), re = K.Provider, oe = {
13
- "kit-radio": "_kit-radio_kjgeu_12"
14
- }, y = z((a, m) => {
15
- var l;
16
- const t = p(K), { appId: v } = ee(), { className: o, danger: f, ...g } = a, h = (d) => {
17
- var n, s;
18
- (n = a.onChange) === null || n === void 0 || n.call(a, d), (s = t?.onChange) === null || s === void 0 || s.call(t, d);
19
- }, r = { ...g };
20
- t && (r.name = t.name, r.onChange = h, r.checked = a.value === t.value, r.disabled = (l = r.disabled) !== null && l !== void 0 ? l : t.disabled);
21
- const C = $(v, oe["kit-radio"], o, {
22
- "ant-radio-wrapper-danger": f
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import K from "classnames";
3
+ import Q from "rc-util/es/hooks/useMergedState";
4
+ import { createContext as U, forwardRef as G, useContext as P, memo as X } from "react";
5
+ import { ConfigContext as Y } from "antd/es/config-provider/";
6
+ import Z from "antd/es/config-provider/SizeContext";
7
+ import ee from "rc-util/es/pickAttrs";
8
+ import { Radio as ae } from "antd";
9
+ import { u as te } from "../../../chunks/useKitTheme.BdeSOGoj.js";
10
+ import { K as ie } from "../../../chunks/CheckableTile.BOiSgMpa.js";
11
+ import { K as le } from "../../../chunks/InputWrapper.ChsMnD5W.js";
12
+ import oe from "antd/es/radio/style";
13
+ import '../../../assets/index38.css';const T = U(null), re = T.Provider, D = {
14
+ "kit-radio": "_kit-radio_tk6pf_12",
15
+ "kit-radio-tile-group": "_kit-radio-tile-group_tk6pf_161"
16
+ }, $ = G((e, m) => {
17
+ var c, u;
18
+ const t = P(T), { appId: r } = te(), { className: v, danger: C, tile: b, icon: x, ...k } = e, f = (s) => {
19
+ var n, i;
20
+ (n = e.onChange) === null || n === void 0 || n.call(e, s), (i = t?.onChange) === null || i === void 0 || i.call(t, s);
21
+ };
22
+ if (b) {
23
+ const s = t ? e.value === t.value : e.checked, n = (c = e.disabled) !== null && c !== void 0 ? c : t?.disabled, i = (p, d) => {
24
+ if (!p)
25
+ return;
26
+ const R = {
27
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
28
+ target: { value: e.value, checked: !0 },
29
+ stopPropagation: () => d.stopPropagation(),
30
+ preventDefault: () => d.preventDefault(),
31
+ nativeEvent: d.nativeEvent
32
+ };
33
+ f(R);
34
+ };
35
+ return o(ie, { ref: m, className: K(r, v), label: e.children, icon: x, checked: s, disabled: n, onChange: i });
36
+ }
37
+ const l = { ...k };
38
+ t && (l.name = t.name, l.onChange = f, l.checked = e.value === t.value, l.disabled = (u = l.disabled) !== null && u !== void 0 ? u : t.disabled);
39
+ const _ = K(r, D["kit-radio"], v, {
40
+ "ant-radio-wrapper-danger": C
23
41
  });
24
- return i(Z, { ref: m, className: C, ...r });
25
- }), ie = Q(z((a, m) => {
26
- const { getPrefixCls: l, direction: t } = p(U), v = p(X), [o, f] = J(a.defaultValue, {
27
- value: a.value
28
- }), g = (e) => {
29
- const N = e.target.value;
30
- "value" in a || f(N);
31
- const { onChange: _ } = a;
32
- _ && N !== o && _(e);
33
- }, { prefixCls: h, className: r, rootClassName: C, label: d, helper: n, status: s, wrapperClassName: w, bordered: G, options: x, buttonStyle: I = "outline", disabled: b, children: M, size: j, style: T, id: V, onMouseEnter: q, onMouseLeave: A, onFocus: B, onBlur: E, required: F, actions: L, extra: R } = a, u = l("radio", h), c = `${u}-group`, [W, D] = te(u);
34
- let S = M;
35
- x && x.length > 0 && (S = x.map((e) => typeof e == "string" || typeof e == "number" ? i(y, { prefixCls: u, disabled: b, value: e, checked: o === e, children: e }, e.toString()) : i(y, { prefixCls: u, disabled: e.disabled || b, value: e.value, checked: o === e.value, style: e.style, children: e.label }, `radio-group-value-options-${e.value}`)));
36
- const k = j || v, H = $(c, `${c}-${I}`, {
37
- [`${c}-${k}`]: k,
38
- [`${c}-rtl`]: t === "rtl"
39
- }, r, C, D);
40
- return W(i("div", { ...Y(a, {
42
+ return o(ae, { ref: m, className: _, ...l });
43
+ }), ne = X(G((e, m) => {
44
+ const { getPrefixCls: c, direction: u } = P(Y), t = P(Z), [r, v] = Q(e.defaultValue, {
45
+ value: e.value
46
+ }), C = (a) => {
47
+ const w = a.target.value;
48
+ "value" in e || v(w);
49
+ const { onChange: E } = e;
50
+ E && w !== r && E(a);
51
+ }, { prefixCls: b, className: x, rootClassName: k, label: f, helper: l, status: _, wrapperClassName: s, bordered: n, options: i, buttonStyle: p = "outline", disabled: d, children: R, size: M, style: V, id: j, onMouseEnter: q, onMouseLeave: A, onFocus: B, onBlur: F, required: L, actions: W, extra: y, tile: N } = e, h = c("radio", b), g = `${h}-group`, [H, J] = oe(h);
52
+ let S = R;
53
+ i && i.length > 0 && (S = i.map((a) => typeof a == "string" || typeof a == "number" ? o($, { tile: N, prefixCls: h, disabled: d, value: a, checked: r === a, children: a }, a.toString()) : o($, { tile: N, icon: a.icon, prefixCls: h, disabled: a.disabled || d, value: a.value, checked: r === a.value, style: a.style, children: a.label }, `radio-group-value-options-${a.value}`)));
54
+ const z = M || t, O = K(g, `${g}-${p}`, {
55
+ [`${g}-${z}`]: z,
56
+ [`${g}-rtl`]: u === "rtl"
57
+ }, x, k, J);
58
+ return H(o("div", { ...ee(e, {
41
59
  aria: !0,
42
60
  data: !0
43
- }), className: H, style: T, onMouseEnter: q, onMouseLeave: A, onFocus: B, onBlur: E, id: V, ref: m, children: i(re, { value: {
44
- onChange: g,
45
- value: o,
46
- disabled: a.disabled,
47
- name: a.name
48
- }, children: i(ae, { label: d, helper: n, disabled: b, bordered: G, status: s, className: w, required: F, extra: R ?? L, children: S }) }) }));
49
- })), P = y;
50
- P.displayName = "KitRadio";
51
- P.Group = ie;
61
+ }), className: O, style: V, onMouseEnter: q, onMouseLeave: A, onFocus: B, onBlur: F, id: j, ref: m, children: o(re, { value: {
62
+ onChange: C,
63
+ value: r,
64
+ disabled: e.disabled,
65
+ name: e.name
66
+ }, children: o(le, { label: f, helper: l, disabled: d, bordered: n, status: _, className: s, required: L, extra: y ?? W, children: N ? o("div", { className: D["kit-radio-tile-group"], children: S }) : S }) }) }));
67
+ })), I = $;
68
+ I.displayName = "KitRadio";
69
+ I.Group = ne;
52
70
  export {
53
- P as KitRadio
71
+ I as KitRadio
54
72
  };
@@ -2,7 +2,9 @@ import { RadioProps, RadioGroupProps } from 'antd';
2
2
  import { KitHTMLAttributes } from '../../../types';
3
3
  import { ReactNode, CSSProperties } from 'react';
4
4
  import { IKitInputWrapperBase } from '../InputWrapper/types';
5
+ import { CheckboxOptionType } from '../Checkbox/types';
5
6
  type AntdRadioTypesToOmit = 'block';
7
+ type AntdRadioGroupTypesToOmit = 'options';
6
8
 
7
9
  export interface KitRadioProps extends Omit<RadioProps, AntdRadioTypesToOmit>, KitHTMLAttributes<HTMLLabelElement> {
8
10
  danger?: boolean;
@@ -14,16 +16,20 @@ export interface KitRadioProps extends Omit<RadioProps, AntdRadioTypesToOmit>, K
14
16
  value?: any;
15
17
  checked?: boolean;
16
18
  style?: CSSProperties;
19
+ tile?: boolean;
20
+ icon?: ReactNode;
17
21
  }
18
22
 
19
23
  export interface KitRadioGroup
20
- extends RadioGroupProps,
24
+ extends Omit<RadioGroupProps, AntdRadioGroupTypesToOmit>,
21
25
  KitHTMLAttributes<HTMLDivElement>,
22
26
  Omit<IKitInputWrapperBase, 'htmlFor'> {
23
27
  defaultValue?: any;
24
28
  value?: any;
29
+ options?: Array<CheckboxOptionType | string | number>;
25
30
  status?: '' | 'warning' | 'error';
26
31
  bordered?: boolean;
27
32
  wrapperClassName?: string;
28
33
  required?: boolean;
34
+ tile?: boolean;
29
35
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as h, jsxs as D } from "react/jsx-runtime";
2
2
  import { forwardRef as W, useState as P, useEffect as E, useImperativeHandle as U, useRef as q } from "react";
3
- import { K as Z } from "../../../chunks/InputWrapper._DzN8nB8.js";
3
+ import { K as Z } from "../../../chunks/InputWrapper.ChsMnD5W.js";
4
4
  import { u as $ } from "../../../chunks/useKitTheme.BdeSOGoj.js";
5
5
  import N from "classnames";
6
6
  import { ReactRenderer as ee, useEditor as te, EditorContent as oe } from "@tiptap/react";
@@ -4,7 +4,7 @@ import { Select as De } from "antd";
4
4
  import $ from "classnames";
5
5
  import Ee from "short-unique-id";
6
6
  import { useDebouncedCallback as Pe } from "use-debounce";
7
- import { K as Ne } from "../../../chunks/InputWrapper._DzN8nB8.js";
7
+ import { K as Ne } from "../../../chunks/InputWrapper.ChsMnD5W.js";
8
8
  import { u as Oe } from "../../../chunks/useKitTheme.BdeSOGoj.js";
9
9
  import { s as Ae } from "../../../chunks/styles.module.B2L5GB8H.js";
10
10
  import { FontAwesomeIcon as k } from "@fortawesome/react-fontawesome";
@@ -3,7 +3,7 @@ import { forwardRef as se, useState as q, useRef as A, useEffect as le } from "r
3
3
  import { TreeSelect as ce } from "antd";
4
4
  import M from "classnames";
5
5
  import ie from "short-unique-id";
6
- import { K as ae } from "../../../chunks/InputWrapper._DzN8nB8.js";
6
+ import { K as ae } from "../../../chunks/InputWrapper.ChsMnD5W.js";
7
7
  import { u as de } from "../../../chunks/useKitTheme.BdeSOGoj.js";
8
8
  import { u as pe } from "../../../chunks/useGetPopupContainer.bCZKSUsz.js";
9
9
  import { s as ue } from "../../../chunks/styles.module.B2L5GB8H.js";
@@ -2,13 +2,13 @@ import { jsx as e, jsxs as C, Fragment as b } from "react/jsx-runtime";
2
2
  import z from "react-modal";
3
3
  import { u as R } from "../../../chunks/useKitTheme.BdeSOGoj.js";
4
4
  import T from "classnames";
5
- import { faXmark as P, faTriangleExclamation as q, faExclamation as W, faCheck as S, faInfo as G } from "@fortawesome/free-solid-svg-icons";
5
+ import { faXmark as P, faTriangleExclamation as W, faExclamation as q, faCheck as S, faInfo as G } from "@fortawesome/free-solid-svg-icons";
6
6
  import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
7
7
  import { KitTooltip as X } from "../../DataDisplay/Tooltip/index.js";
8
8
  import { KitButton as I } from "../../General/Button/index.js";
9
9
  import { KitTypography as Y } from "../../General/Typography/index.js";
10
10
  import { u as J } from "../../../chunks/useKitLocale.C5F-tmnC.js";
11
- import { T as Q } from "../../../chunks/constants.clto0NGz.js";
11
+ import { T as Q } from "../../../chunks/constants.DcAEmIjR.js";
12
12
  import { KitSpace as V } from "../../Layout/Space/index.js";
13
13
  import { createRoot as Z } from "react-dom/client";
14
14
  import { KitIcon as M } from "../../General/Icon/index.js";
@@ -16,7 +16,7 @@ import { useLocale as $ } from "antd/es/locale";
16
16
  import { uuid as U } from "../../../utils/functions/index.js";
17
17
  import { KitApp as oo } from "../../App/index.js";
18
18
  import '../../../assets/index46.css';const eo = {
19
- "kit-modal": "_kit-modal_fn3qf_2"
19
+ "kit-modal": "_kit-modal_11iyg_2"
20
20
  }, A = ({ title: o, showCloseIcon: n, onClose: l }) => {
21
21
  var s;
22
22
  const { locale: i } = J(), a = typeof o == "string" || typeof o == "number" ? e(Y.Title, { level: "h2", children: o }) : o;
@@ -41,7 +41,9 @@ import '../../../assets/index46.css';const eo = {
41
41
  y.stopPropagation(), (t.showCloseIcon || t.shouldCloseOnOverlayClick) && ((r = t.close) === null || r === void 0 || r.call(t));
42
42
  }, N = T(c, "kit-modal-wrapper", {
43
43
  "kit-modal-wrapper-fullscreen": a
44
- }, t.className), x = T(c, "kit-modal-overlay", d), K = {
44
+ }, t.className), x = T(c, "kit-modal-overlay", {
45
+ "kit-modal-overlay-fullscreen": a
46
+ }, d), K = {
45
47
  ...t,
46
48
  style: u,
47
49
  className: N,
@@ -61,11 +63,11 @@ import '../../../assets/index46.css';const eo = {
61
63
  g = e(M, { icon: e(f, { icon: S }), on: !0, className: "kit-confirm-icon kit-confirm-icon-success" });
62
64
  break;
63
65
  case "error":
64
- g = e(M, { icon: e(f, { icon: W }), on: !0, className: "kit-confirm-icon kit-confirm-icon-error" });
66
+ g = e(M, { icon: e(f, { icon: q }), on: !0, className: "kit-confirm-icon kit-confirm-icon-error" });
65
67
  break;
66
68
  case "warning":
67
69
  default:
68
- g = e(M, { icon: e(f, { icon: q }), on: !0, className: "kit-confirm-icon kit-confirm-icon-warning" });
70
+ g = e(M, { icon: e(f, { icon: W }), on: !0, className: "kit-confirm-icon kit-confirm-icon-warning" });
69
71
  break;
70
72
  }
71
73
  const E = t || a === "confirm", O = (F) => () => {