aristid-ds 16.2.0 → 17.0.0
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 +50 -0
- package/README.md +1 -1
- package/dist/Kit/App/index.js +1 -1
- package/dist/Kit/DataDisplay/Avatar/index.js +1 -1
- package/dist/Kit/DataDisplay/Badge/index.js +1 -1
- package/dist/Kit/DataDisplay/Badge/types.d.ts +2 -0
- package/dist/Kit/DataDisplay/Collapse/index.js +1 -1
- package/dist/Kit/DataDisplay/Collapse/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Comment/index.js +1 -1
- package/dist/Kit/DataDisplay/Comment/types.d.ts +1 -0
- package/dist/Kit/DataDisplay/Empty/index.js +1 -1
- package/dist/Kit/DataDisplay/Error/index.js +1 -1
- package/dist/Kit/DataDisplay/IdCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/types.d.ts +4 -4
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Table/KitTableExpandButton.d.ts +1 -1
- package/dist/Kit/DataDisplay/Table/Table.d.ts +1 -1
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tabs/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/types.d.ts +7 -1
- package/dist/Kit/DataDisplay/Tag/useTagGroup.d.ts +3 -12
- package/dist/Kit/DataDisplay/Tree/index.js +1 -1
- package/dist/Kit/DataDisplay/Tree/types.d.ts +1 -1
- package/dist/Kit/DataDisplay/types.d.ts +3 -0
- package/dist/Kit/DataEntry/AutoComplete/index.js +60 -2
- package/dist/Kit/DataEntry/AutoComplete/types.d.ts +3 -2
- package/dist/Kit/DataEntry/Checkbox/index.js +1 -1
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/DatePicker.d.ts +1 -1
- package/dist/Kit/DataEntry/DatePicker/RangePicker.d.ts +2 -2
- package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/preset/useActiveDatePickerPreset.d.ts +2 -2
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +7 -3
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Input/index.js +1 -1
- package/dist/Kit/DataEntry/Input/types.d.ts +5 -2
- package/dist/Kit/DataEntry/InputNumber/index.d.ts +1 -1
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +3 -2
- package/dist/Kit/DataEntry/InputWrapper/index.js +1 -1
- package/dist/Kit/DataEntry/InputWrapper/types.d.ts +8 -1
- package/dist/Kit/DataEntry/Radio/index.js +1 -1
- package/dist/Kit/DataEntry/Rate/index.d.ts +1 -1
- package/dist/Kit/DataEntry/Rate/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/MenuActionList/index.js +5 -5
- package/dist/Kit/DataEntry/RichText/MenuBar/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/index.js +1 -1
- package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
- package/dist/Kit/DataEntry/Select/index.js +1 -1
- package/dist/Kit/DataEntry/Select/renders.d.ts +1 -1
- package/dist/Kit/DataEntry/Select/types.d.ts +3 -1
- package/dist/Kit/DataEntry/Slider/index.d.ts +1 -1
- package/dist/Kit/DataEntry/TreeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/renders.d.ts +1 -1
- package/dist/Kit/DataEntry/TreeSelect/types.d.ts +4 -1
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- package/dist/Kit/Feedback/Alert/index.js +1 -1
- package/dist/Kit/Feedback/Alert/types.d.ts +9 -5
- package/dist/Kit/Feedback/Loader/index.js +1 -1
- package/dist/Kit/Feedback/Loader/types.d.ts +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/Progress/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/DynamicActions/index.js +1 -1
- package/dist/Kit/General/Icon/types.d.ts +1 -2
- package/dist/Kit/General/Typography/index.js +1 -1
- package/dist/Kit/General/Typography/types.d.ts +1 -1
- package/dist/Kit/Layout/Divider/types.d.ts +2 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Layout/Space/index.js +18 -12
- package/dist/Kit/Navigation/DropDown/index.js +16 -15
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/types.d.ts +1 -0
- 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 +1 -1
- package/dist/Kit/Navigation/Steps/index.js +1 -1
- package/dist/Kit/Navigation/Steps/types.d.ts +2 -1
- package/dist/Kit/index.js +47 -47
- package/dist/assets/App.css +1 -1
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Collapse.css +1 -1
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/ItemCard.css +1 -1
- package/dist/assets/Loader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/Radio.css +1 -1
- package/dist/assets/SideMenu.css +1 -1
- package/dist/assets/Steps.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/Tree.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/chunks/{Alert.CptjyHNo.js → Alert.CLGWsecl.js} +1 -1
- package/dist/chunks/{App.B-o65pBo.js → App.DMKfu33b.js} +1 -1
- package/dist/chunks/{Avatar.C7Y05jlE.js → Avatar.Cod8BuVs.js} +5 -4
- package/dist/chunks/{Avatar.BkWsGZQz.js → Avatar.DMy3wRdr.js} +1 -1
- package/dist/chunks/Badge.85bpGcH7.js +36 -0
- package/dist/chunks/{Button.W4yUc4_g.js → Button.BwZ9TVAy.js} +8 -8
- package/dist/chunks/{Checkbox.CD7_4xKA.js → Checkbox.UZ_xOkpB.js} +59 -58
- package/dist/chunks/{Collapse.Kx-SBhE4.js → Collapse.DineX-8_.js} +62 -51
- package/dist/chunks/{ColorPicker.CiLVQ7ma.js → ColorPicker.CIfnJxzt.js} +1 -1
- package/dist/chunks/Comment.C28oythd.js +48 -0
- package/dist/chunks/{DatePicker.s-w_Yoy_.js → DatePicker.B6MnduRh.js} +7 -7
- package/dist/chunks/{DynamicActions.DLAChqhe.js → DynamicActions.Cm8BsY8r.js} +1 -1
- package/dist/chunks/{Empty.kKYv59Zi.js → Empty.ChbH81Kb.js} +1 -1
- package/dist/chunks/{Error.BUEl7nbL.js → Error.B1hGHo8i.js} +2 -2
- package/dist/chunks/{Filter.CEQpPFYE.js → Filter.BqMbNcsH.js} +2 -2
- package/dist/chunks/{FontSizeSelect.XLWRKIOf.js → FontSizeSelect.Rc82wPGZ.js} +1 -1
- package/dist/chunks/{Header.BJgzh9IF.js → Header.DwTjCAR4.js} +2 -2
- package/dist/chunks/{IdCard.BBfDw0-e.js → IdCard.CWE38g68.js} +3 -1
- package/dist/chunks/{Input.CtZ4tgRD.js → Input.DrLszrjk.js} +2 -2
- package/dist/chunks/{InputNumber.BEYbLzDt.js → InputNumber.CUVPnyxG.js} +1 -1
- package/dist/chunks/{InputWrapper.DuqdZ-tp.js → InputWrapper.By9kN0xU.js} +2 -1
- package/dist/chunks/ItemCard.CdfDmmnw.js +188 -0
- package/dist/chunks/{ItemList.D3ZOFW5C.js → ItemList.DAwKyhy1.js} +3 -3
- package/dist/chunks/{LinkButton.BBk_vytt.js → LinkButton.BVCE_uhb.js} +3 -3
- package/dist/chunks/Loader.BL2-LOk7.js +35 -0
- package/dist/chunks/{MenuBar.pdIb57up.js → MenuBar.CMHSAtol.js} +4 -4
- package/dist/chunks/{Modal.CvtoS2TF.js → Modal.CsGHowNT.js} +3 -3
- package/dist/chunks/{Notification.DRllbqkG.js → Notification.D-vgkwp1.js} +3 -2
- package/dist/chunks/PageHeader.BsBe2qmv.js +61 -0
- package/dist/chunks/{PageLayout.BS_4gV3M.js → PageLayout.DxAVdp5a.js} +2 -2
- package/dist/chunks/{Pagination.D4RHg4eu.js → Pagination.D0KoqOs0.js} +1 -1
- package/dist/chunks/{Progress.ZWy41SUW.js → Progress.5NGz8Onb.js} +2 -1
- package/dist/chunks/Radio.CEJd1j6E.js +118 -0
- package/dist/chunks/Rate.66ssppnZ.js +34 -0
- package/dist/chunks/{RedirectCard.DvR9Spw2.js → RedirectCard.C9L2Ym_b.js} +3 -2
- package/dist/chunks/{RichText.BR_A94YI.js → RichText.mJKHbN6t.js} +15 -11
- package/dist/chunks/{SearchInput.CZnUAGz5.js → SearchInput.CNgLpnTf.js} +1 -1
- package/dist/chunks/{Select.CepppHZ6.js → Select.v3Ly7XpX.js} +86 -80
- package/dist/chunks/SideMenu.CSrmEHB_.js +137 -0
- package/dist/chunks/{SidePanel.CaUEt3pC.js → SidePanel.CTtyKSw5.js} +2 -2
- package/dist/chunks/{SnackBar.Dvnae0aa.js → SnackBar.Bdq4XTnk.js} +4 -4
- package/dist/chunks/{Steps.CF_4sPDw.js → Steps.Cv9QH9E2.js} +10 -6
- package/dist/chunks/{Table.DvFA660k.js → Table.CodO0Y9t.js} +3 -3
- package/dist/chunks/{Tabs.YH0DNmKq.js → Tabs.CUVbsW1C.js} +4 -3
- package/dist/chunks/Tag.ucduTbaH.js +157 -0
- package/dist/chunks/{Tree.DI2X_dWa.js → Tree.UCxeoAGW.js} +1 -1
- package/dist/chunks/TreeSelect.-QrLhdAJ.js +169 -0
- package/dist/chunks/{Typography.LjOcXtjO.js → Typography.DVDv9LwQ.js} +12 -4
- package/dist/chunks/{Upload.C_TOub0N.js → Upload.B93h1Ueu.js} +7 -5
- package/dist/chunks/{styles.module.Bfe7jTpt.js → styles.module.I-VT2CFc.js} +1 -1
- package/dist/index.es.js +47 -47
- package/dist/index.umd.js +3 -3
- package/dist/translation/en-US/components/DataDisplay/Collapse/index.js +5 -1
- package/dist/translation/en-US/components/Feedback/Progress/index.d.ts +2 -0
- package/dist/translation/en-US/components/Feedback/Progress/index.js +4 -0
- package/dist/translation/en-US/components/Navigation/PageHeader/index.d.ts +2 -0
- package/dist/translation/en-US/components/Navigation/PageHeader/index.js +4 -0
- package/dist/translation/en-US/components/Navigation/SideMenu/index.d.ts +2 -0
- package/dist/translation/en-US/components/Navigation/SideMenu/index.js +7 -0
- package/dist/translation/en-US/index.js +18 -12
- package/dist/translation/fr-FR/components/DataDisplay/Collapse/index.js +5 -1
- package/dist/translation/fr-FR/components/Feedback/Progress/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/Feedback/Progress/index.js +4 -0
- package/dist/translation/fr-FR/components/Navigation/PageHeader/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/Navigation/PageHeader/index.js +4 -0
- package/dist/translation/fr-FR/components/Navigation/SideMenu/index.d.ts +2 -0
- package/dist/translation/fr-FR/components/Navigation/SideMenu/index.js +7 -0
- package/dist/translation/fr-FR/index.js +18 -12
- package/dist/translation/pt-PT/components/DataDisplay/Collapse/index.js +5 -1
- package/dist/translation/pt-PT/components/Feedback/Progress/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/Feedback/Progress/index.js +4 -0
- package/dist/translation/pt-PT/components/Navigation/PageHeader/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/Navigation/PageHeader/index.js +4 -0
- package/dist/translation/pt-PT/components/Navigation/SideMenu/index.d.ts +2 -0
- package/dist/translation/pt-PT/components/Navigation/SideMenu/index.js +7 -0
- package/dist/translation/pt-PT/index.js +18 -12
- package/dist/translation/types/components/DataDisplay/Collapse/index.d.ts +2 -0
- package/dist/translation/types/components/Feedback/Progress/index.d.ts +3 -0
- package/dist/translation/types/components/Navigation/PageHeader/index.d.ts +3 -0
- package/dist/translation/types/components/Navigation/SideMenu/index.d.ts +4 -0
- package/dist/translation/types/index.d.ts +6 -0
- package/dist/utils/hooks/useGetPopupContainer.d.ts +2 -2
- package/package.json +3 -3
- package/dist/Kit/DataEntry/DatePicker/preset/useActiveRangePickerPreset.d.ts +0 -17
- package/dist/assets/AutoComplete.css +0 -1
- package/dist/chunks/AutoComplete.DjcjDCwe.js +0 -55
- package/dist/chunks/Badge.BmH3YSz4.js +0 -57
- package/dist/chunks/Comment.Cd7i1Ope.js +0 -47
- package/dist/chunks/ItemCard.CZWby7um.js +0 -160
- package/dist/chunks/Loader.C-wRwi_O.js +0 -16
- package/dist/chunks/PageHeader.StAURUeV.js +0 -54
- package/dist/chunks/Radio.DWGDlt8U.js +0 -117
- package/dist/chunks/Rate.Dmfwlgev.js +0 -27
- package/dist/chunks/SideMenu.BFZc2x69.js +0 -135
- package/dist/chunks/Tag.B9K2nEub.js +0 -158
- package/dist/chunks/TreeSelect.k8HffaA-.js +0 -161
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { n as e } from "./useKitTheme.Bcv-etUA.js";
|
|
2
|
+
import { t } from "./InputWrapper.By9kN0xU.js";
|
|
3
|
+
import { t as n } from "./CheckableTile.G1mWLqE7.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as i, forwardRef as a, memo as o, useContext as s } from "react";
|
|
6
|
+
import { Radio as c } from "antd";
|
|
7
|
+
import l from "classnames";
|
|
8
|
+
import { ConfigContext as u } from "antd/es/config-provider/";
|
|
9
|
+
import d from "antd/es/config-provider/hooks/useCSSVarCls";
|
|
10
|
+
import f from "@rc-component/util/es/hooks/useMergedState";
|
|
11
|
+
import p from "antd/es/config-provider/SizeContext";
|
|
12
|
+
import m from "@rc-component/util/es/pickAttrs";
|
|
13
|
+
import h from "antd/es/radio/style";
|
|
14
|
+
import '../assets/Radio.css';//#region src/Kit/DataEntry/Radio/context.tsx
|
|
15
|
+
var g = i(null), _ = g.Provider, v = {
|
|
16
|
+
"kit-radio": "_kit-radio_x0bxw_11",
|
|
17
|
+
"kit-radio-tile-group": "_kit-radio-tile-group_x0bxw_160"
|
|
18
|
+
}, y = a((t, i) => {
|
|
19
|
+
let a = s(g), { appId: o } = e(), { className: u, danger: d, tile: f, icon: p, ...m } = t, h = (e) => {
|
|
20
|
+
var n, r;
|
|
21
|
+
(n = t.onChange) == null || n.call(t, e), (r = a?.onChange) == null || r.call(a, e);
|
|
22
|
+
};
|
|
23
|
+
if (f) {
|
|
24
|
+
let e = a ? t.value === a.value : t.checked, s = t.disabled ?? a?.disabled;
|
|
25
|
+
return r(n, {
|
|
26
|
+
ref: i,
|
|
27
|
+
className: l(o, u),
|
|
28
|
+
label: t.children,
|
|
29
|
+
icon: p,
|
|
30
|
+
checked: e,
|
|
31
|
+
disabled: s,
|
|
32
|
+
onChange: (e, n) => {
|
|
33
|
+
e && h({
|
|
34
|
+
target: {
|
|
35
|
+
value: t.value,
|
|
36
|
+
checked: !0
|
|
37
|
+
},
|
|
38
|
+
stopPropagation: () => n.stopPropagation(),
|
|
39
|
+
preventDefault: () => n.preventDefault(),
|
|
40
|
+
nativeEvent: n.nativeEvent
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
let _ = { ...m };
|
|
46
|
+
return a && (_.name = a.name, _.onChange = h, _.checked = t.value === a.value, _.disabled = _.disabled ?? a.disabled), r(c, {
|
|
47
|
+
ref: i,
|
|
48
|
+
className: l(o, v["kit-radio"], u, { "ant-radio-wrapper-danger": d }),
|
|
49
|
+
..._
|
|
50
|
+
});
|
|
51
|
+
}), b = o(a((e, n) => {
|
|
52
|
+
let { getPrefixCls: i, direction: a } = s(u), o = s(p), [c, g] = f(e.defaultValue, { value: e.value }), b = (t) => {
|
|
53
|
+
let n = t.target.value;
|
|
54
|
+
"value" in e || g(n);
|
|
55
|
+
let { onChange: r } = e;
|
|
56
|
+
r && n !== c && r(t);
|
|
57
|
+
}, { prefixCls: x, className: S, rootClassName: C, label: w, helper: T, status: E, wrapperClassName: D, bordered: O, options: k, buttonStyle: A = "outline", disabled: j, children: M, size: N, style: P, id: F, onMouseEnter: I, onMouseLeave: L, onFocus: R, onBlur: z, required: B, actions: V, extra: H, tile: U } = e, W = i("radio", x), G = `${W}-group`, K = d(W), [q, J] = h(W, K), Y = M;
|
|
58
|
+
k && k.length > 0 && (Y = k.map((e) => typeof e == "string" || typeof e == "number" ? r(y, {
|
|
59
|
+
tile: U,
|
|
60
|
+
prefixCls: W,
|
|
61
|
+
disabled: j,
|
|
62
|
+
value: e,
|
|
63
|
+
checked: c === e,
|
|
64
|
+
children: e
|
|
65
|
+
}, e.toString()) : r(y, {
|
|
66
|
+
tile: U,
|
|
67
|
+
icon: e.icon,
|
|
68
|
+
prefixCls: W,
|
|
69
|
+
disabled: e.disabled || j,
|
|
70
|
+
value: e.value,
|
|
71
|
+
checked: c === e.value,
|
|
72
|
+
style: e.style,
|
|
73
|
+
children: e.label
|
|
74
|
+
}, `radio-group-value-options-${e.value}`)));
|
|
75
|
+
let X = N || o, Z = l(G, `${G}-${A}`, {
|
|
76
|
+
[`${G}-${X}`]: X,
|
|
77
|
+
[`${G}-rtl`]: a === "rtl"
|
|
78
|
+
}, S, C, J, K, q);
|
|
79
|
+
return r("div", {
|
|
80
|
+
...m(e, {
|
|
81
|
+
aria: !0,
|
|
82
|
+
data: !0
|
|
83
|
+
}),
|
|
84
|
+
className: Z,
|
|
85
|
+
style: P,
|
|
86
|
+
onMouseEnter: I,
|
|
87
|
+
onMouseLeave: L,
|
|
88
|
+
onFocus: R,
|
|
89
|
+
onBlur: z,
|
|
90
|
+
id: F,
|
|
91
|
+
ref: n,
|
|
92
|
+
children: r(_, {
|
|
93
|
+
value: {
|
|
94
|
+
onChange: b,
|
|
95
|
+
value: c,
|
|
96
|
+
disabled: e.disabled,
|
|
97
|
+
name: e.name
|
|
98
|
+
},
|
|
99
|
+
children: r(t, {
|
|
100
|
+
label: w,
|
|
101
|
+
helper: T,
|
|
102
|
+
disabled: j,
|
|
103
|
+
bordered: O,
|
|
104
|
+
status: E,
|
|
105
|
+
className: D,
|
|
106
|
+
required: B,
|
|
107
|
+
extra: H ?? V,
|
|
108
|
+
children: U ? r("div", {
|
|
109
|
+
className: v["kit-radio-tile-group"],
|
|
110
|
+
children: Y
|
|
111
|
+
}) : Y
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
})), x = y;
|
|
116
|
+
x.displayName = "KitRadio", x.Group = b;
|
|
117
|
+
//#endregion
|
|
118
|
+
export { x as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as e, u as t } from "./functions.BxvU3RXB.js";
|
|
2
|
+
import { n } from "./useKitTheme.Bcv-etUA.js";
|
|
3
|
+
import { kitRateCssTokens as r } from "../theme/aristid/components/DataEntry/Rate/index.js";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRef as a, useEffect as o, useId as s, useMemo as c } from "react";
|
|
6
|
+
import { Rate as l } from "antd";
|
|
7
|
+
import u from "classnames";
|
|
8
|
+
import { FontAwesomeIcon as d } from "@fortawesome/react-fontawesome";
|
|
9
|
+
import { faStar as f } from "@fortawesome/free-solid-svg-icons";
|
|
10
|
+
import { faStar as p, faStarHalfStroke as m } from "@fortawesome/free-regular-svg-icons";
|
|
11
|
+
import '../assets/Rate.css';//#region src/Kit/DataEntry/Rate/styles.module.scss
|
|
12
|
+
var h = { "kit-rate": "_kit-rate_lw2xy_1" }, g = (e, t, n, r) => e.index !== void 0 && e.value !== void 0 && e.index < e.value ? e.index + .5 === e.value ? n ?? i(d, { icon: m }) : r ?? i(d, { icon: f }) : t ?? i(d, { icon: p }), _ = (n) => !n || !t(n) ? null : { [r.colors.star.default]: e(n) }, v = a(({ color: e, defaultIcon: t, halfIcon: r, activeIcon: a, className: d, style: f, ...p }, m) => {
|
|
13
|
+
let { appId: v } = n(), y = s(), b = p.id ?? y, x = c(() => ({
|
|
14
|
+
...f,
|
|
15
|
+
..._(e)
|
|
16
|
+
}), [e, f]), S = u(v, h["kit-rate"], d);
|
|
17
|
+
return o(() => {
|
|
18
|
+
let e = document.getElementById(b);
|
|
19
|
+
e && (e.querySelectorAll("li.ant-rate-star").forEach((e) => e.setAttribute("role", "presentation")), e.querySelectorAll("[role=\"radio\"]").forEach((e) => {
|
|
20
|
+
let t = e.getAttribute("aria-posinset");
|
|
21
|
+
t && e.setAttribute("aria-label", t);
|
|
22
|
+
}));
|
|
23
|
+
}, [b, p.count]), i(l, {
|
|
24
|
+
...p,
|
|
25
|
+
id: b,
|
|
26
|
+
style: x,
|
|
27
|
+
className: S,
|
|
28
|
+
ref: m,
|
|
29
|
+
character: (e) => g(e, t, r, a)
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
v.displayName = "KitRate";
|
|
33
|
+
//#endregion
|
|
34
|
+
export { v as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as e } from "./useKitTheme.Bcv-etUA.js";
|
|
2
2
|
import { n as t } from "./useKitLocale.45Rjhfd0.js";
|
|
3
|
-
import { t as n } from "./Typography.
|
|
3
|
+
import { t as n } from "./Typography.DVDv9LwQ.js";
|
|
4
4
|
import { KitTooltip as r } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
5
|
-
import { t as i } from "./Button.
|
|
5
|
+
import { t as i } from "./Button.BwZ9TVAy.js";
|
|
6
6
|
import { KitDropDown as a } from "../Kit/Navigation/DropDown/index.js";
|
|
7
7
|
import { t as o } from "./Icon.CxPVsgjL.js";
|
|
8
8
|
import { t as s } from "./Divider.BmAL40z9.js";
|
|
@@ -55,6 +55,7 @@ var g = { "kit-redirect-card": "_kit-redirect-card_1d86p_1" }, _ = ({ actions: e
|
|
|
55
55
|
}, v = ({ action: e, disabled: t }) => l(r, {
|
|
56
56
|
title: e.label,
|
|
57
57
|
children: l(i, {
|
|
58
|
+
"aria-label": e.label,
|
|
58
59
|
type: "secondary",
|
|
59
60
|
icon: e.icon,
|
|
60
61
|
onClick: (t) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { f as e } from "./functions.BxvU3RXB.js";
|
|
2
2
|
import { n as t } from "./useKitTheme.Bcv-etUA.js";
|
|
3
|
-
import { t as n } from "./InputWrapper.
|
|
3
|
+
import { t as n } from "./InputWrapper.By9kN0xU.js";
|
|
4
4
|
import { KitDropDown as r } from "../Kit/Navigation/DropDown/index.js";
|
|
5
|
-
import { t as i } from "./MenuBar.
|
|
5
|
+
import { t as i } from "./MenuBar.CMHSAtol.js";
|
|
6
6
|
import { t as a } from "./EditorContentCharacterCount.UlQyKE4A.js";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
import { forwardRef as c, useEffect as l, useImperativeHandle as u, useRef as d, useState as f } from "react";
|
|
@@ -10,10 +10,10 @@ import p from "classnames";
|
|
|
10
10
|
import { EditorContent as m, ReactRenderer as h, useEditor as g } from "@tiptap/react";
|
|
11
11
|
import _ from "@tiptap/starter-kit";
|
|
12
12
|
import v from "@tiptap/extension-underline";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { CharacterCount as
|
|
13
|
+
import y from "@tiptap/extension-mention";
|
|
14
|
+
import b from "@tiptap/extension-text-align";
|
|
15
|
+
import ee from "@tiptap/extension-link";
|
|
16
|
+
import { CharacterCount as te, Placeholder as x } from "@tiptap/extensions";
|
|
17
17
|
import '../assets/RichText.css';//#region src/Kit/DataEntry/RichText/styles.module.scss
|
|
18
18
|
var S = {
|
|
19
19
|
"kit-rich-text-wrapper": "_kit-rich-text-wrapper_1snsw_2",
|
|
@@ -91,7 +91,11 @@ var S = {
|
|
|
91
91
|
}), Q = g({
|
|
92
92
|
editable: !A && !j && !M,
|
|
93
93
|
content: I,
|
|
94
|
-
editorProps: { attributes: {
|
|
94
|
+
editorProps: { attributes: {
|
|
95
|
+
role: "textbox",
|
|
96
|
+
...r ?? k ? { "aria-label": r ?? k } : {},
|
|
97
|
+
...M || j ? { tabindex: "0" } : {}
|
|
98
|
+
} },
|
|
95
99
|
extensions: [
|
|
96
100
|
_.configure({ heading: { levels: [
|
|
97
101
|
1,
|
|
@@ -100,14 +104,14 @@ var S = {
|
|
|
100
104
|
4
|
|
101
105
|
] } }),
|
|
102
106
|
v,
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
b.configure({ types: ["heading", "paragraph"] }),
|
|
108
|
+
ee.extend({ inclusive: !1 }).configure({ openOnClick: !1 }),
|
|
105
109
|
x.configure({
|
|
106
110
|
placeholder: !j && !M ? k : void 0,
|
|
107
111
|
showOnlyWhenEditable: !1
|
|
108
112
|
}),
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
te.configure({ limit: V }),
|
|
114
|
+
y.configure({
|
|
111
115
|
HTMLAttributes: { class: W ? "mention-ai" : "mention" },
|
|
112
116
|
deleteTriggerWithBackspace: !0,
|
|
113
117
|
suggestion: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e } from "./useKitTheme.Bcv-etUA.js";
|
|
2
2
|
import { n as t } from "./useKitLocale.45Rjhfd0.js";
|
|
3
3
|
import { KitTooltip as n } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
4
|
-
import { t as r } from "./Input.
|
|
4
|
+
import { t as r } from "./Input.DrLszrjk.js";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
import { forwardRef as a, useState as o } from "react";
|
|
7
7
|
import s from "classnames";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { n as e } from "./useKitTheme.Bcv-etUA.js";
|
|
2
|
-
import { t } from "./Typography.
|
|
3
|
-
import { t as n } from "./IdCard.
|
|
4
|
-
import { t as r } from "./InputWrapper.
|
|
5
|
-
import { t as i } from "./Tag.
|
|
2
|
+
import { t } from "./Typography.DVDv9LwQ.js";
|
|
3
|
+
import { t as n } from "./IdCard.CWE38g68.js";
|
|
4
|
+
import { t as r } from "./InputWrapper.By9kN0xU.js";
|
|
5
|
+
import { t as i } from "./Tag.ucduTbaH.js";
|
|
6
6
|
import { t as a } from "./useGetPopupContainer.C6KjVnVk.js";
|
|
7
7
|
import { t as o } from "./Icon.CxPVsgjL.js";
|
|
8
|
-
import { t as s } from "./styles.module.
|
|
8
|
+
import { t as s } from "./styles.module.I-VT2CFc.js";
|
|
9
9
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
10
|
import { forwardRef as u, useEffect as d, useMemo as f, useRef as p, useState as ee } from "react";
|
|
11
11
|
import { Select as te } from "antd";
|
|
12
12
|
import m from "classnames";
|
|
13
13
|
import { FontAwesomeIcon as h } from "@fortawesome/react-fontawesome";
|
|
14
|
-
import { faCheck as ne, faChevronDown as
|
|
15
|
-
import { useDebouncedCallback as
|
|
16
|
-
import
|
|
14
|
+
import { faCheck as ne, faChevronDown as re, faCircleNotch as g, faCircleXmark as _ } from "@fortawesome/free-solid-svg-icons";
|
|
15
|
+
import { useDebouncedCallback as ie } from "use-debounce";
|
|
16
|
+
import v from "short-unique-id";
|
|
17
17
|
//#region src/Kit/DataEntry/Select/guard.ts
|
|
18
|
-
var
|
|
19
|
-
if (e.label !== null && e.label !== void 0 && typeof e.label == "object" && "specialCase" in e.label && e.label.specialCase ===
|
|
18
|
+
var y = (e) => !!e.idCard, b = ({ value: e }, t) => t.filter((t) => t.value === e).pop(), x = { MAX_PLACEHOLDER: "MAX_PLACEHOLDER" }, S = (e, t, r, a, s, l) => {
|
|
19
|
+
if (e.label !== null && e.label !== void 0 && typeof e.label == "object" && "specialCase" in e.label && e.label.specialCase === x.MAX_PLACEHOLDER) {
|
|
20
20
|
let t = e.label;
|
|
21
21
|
return delete t.specialCase, c(i, { ...t });
|
|
22
22
|
}
|
|
23
|
-
let u =
|
|
23
|
+
let u = b(e, a), d = u?.labelToDisplay, f = !0;
|
|
24
24
|
d || (d = { label: e.value }, f = !1);
|
|
25
25
|
let p = d?.idCard;
|
|
26
26
|
if (!p) {
|
|
@@ -38,8 +38,8 @@ var b = (e) => !!e.idCard, x = ({ value: e }, t) => t.filter((t) => t.value ===
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
return c(i, {
|
|
41
|
-
type:
|
|
42
|
-
size:
|
|
41
|
+
type: w(t, r),
|
|
42
|
+
size: T(l),
|
|
43
43
|
disabled: t,
|
|
44
44
|
onClose: t || s ? void 0 : (t) => {
|
|
45
45
|
var n;
|
|
@@ -57,31 +57,31 @@ var b = (e) => !!e.idCard, x = ({ value: e }, t) => t.filter((t) => t.value ===
|
|
|
57
57
|
} : void 0
|
|
58
58
|
})
|
|
59
59
|
});
|
|
60
|
-
},
|
|
61
|
-
specialCase:
|
|
62
|
-
type:
|
|
60
|
+
}, C = (e, t, r) => ({
|
|
61
|
+
specialCase: x.MAX_PLACEHOLDER,
|
|
62
|
+
type: w(t, r),
|
|
63
63
|
children: c(n, {
|
|
64
64
|
description: `+${e.length}`,
|
|
65
65
|
disabled: t
|
|
66
66
|
}),
|
|
67
67
|
disabled: t
|
|
68
|
-
}),
|
|
68
|
+
}), w = (e, t) => e || t === "warning" ? "neutral" : t === "error" ? "error" : "secondary", T = (e) => {
|
|
69
69
|
switch (e) {
|
|
70
70
|
case "large": return "medium";
|
|
71
71
|
case "middle": return "small";
|
|
72
72
|
case "small": return "small";
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, ae = (e, t) => c("div", {
|
|
75
75
|
className: "kit-select-dropdown-content",
|
|
76
76
|
children: t ? t(e) : e
|
|
77
|
-
}),
|
|
77
|
+
}), E = (e) => {
|
|
78
78
|
let t = document.getElementById(e)?.closest(".ant-select"), n = document.getElementById(e + "_list")?.closest(".ant-select-dropdown");
|
|
79
79
|
if (t && n) {
|
|
80
80
|
let e = n.className.indexOf("ant-select-dropdown-placement-top") >= 0, r = n.className.indexOf("ant-select-dropdown-placement-bottom") >= 0;
|
|
81
81
|
e && (t.classList.remove("ant-select-bottom"), t.classList.add("ant-select-top")), r && (t.classList.remove("ant-select-top"), t.classList.add("ant-select-bottom"));
|
|
82
82
|
}
|
|
83
|
-
},
|
|
84
|
-
if (
|
|
83
|
+
}, D = (e, r) => {
|
|
84
|
+
if (y(e)) {
|
|
85
85
|
let { idCard: t } = e;
|
|
86
86
|
return c("div", {
|
|
87
87
|
className: "kit-select-option",
|
|
@@ -112,13 +112,13 @@ var b = (e) => !!e.idCard, x = ({ value: e }, t) => t.filter((t) => t.value ===
|
|
|
112
112
|
})
|
|
113
113
|
]
|
|
114
114
|
});
|
|
115
|
-
},
|
|
115
|
+
}, O = (e, t) => e.map((e) => {
|
|
116
116
|
let { className: n, disabled: r, value: i, options: a, label: o, onTagClose: s } = e;
|
|
117
117
|
return a ? {
|
|
118
118
|
label: o,
|
|
119
|
-
options:
|
|
119
|
+
options: O(a, t)
|
|
120
120
|
} : {
|
|
121
|
-
label:
|
|
121
|
+
label: D(e, t),
|
|
122
122
|
labelToDisplay: e,
|
|
123
123
|
rawLabel: e?.label ?? "",
|
|
124
124
|
className: n,
|
|
@@ -126,7 +126,7 @@ var b = (e) => !!e.idCard, x = ({ value: e }, t) => t.filter((t) => t.value ===
|
|
|
126
126
|
value: i,
|
|
127
127
|
onTagClose: s
|
|
128
128
|
};
|
|
129
|
-
}),
|
|
129
|
+
}), oe = (e, t, n, r, i, a) => {
|
|
130
130
|
let o = n && n.includes("top");
|
|
131
131
|
return m(e, s["kit-select"], t, {
|
|
132
132
|
"ant-select-top": o,
|
|
@@ -135,89 +135,95 @@ var b = (e) => !!e.idCard, x = ({ value: e }, t) => t.filter((t) => t.value ===
|
|
|
135
135
|
"kit-select-readonly": i,
|
|
136
136
|
"kit-select-one-line": a
|
|
137
137
|
});
|
|
138
|
-
},
|
|
138
|
+
}, se = (e, t, n, r) => m(e, t, "kit-select-dropdown-content", {
|
|
139
139
|
"kit-select-dropdown-focus": n,
|
|
140
140
|
"kit-select-dropdown-error": r === "error",
|
|
141
141
|
"kit-select-dropdown-warning": r === "warning"
|
|
142
|
-
}),
|
|
142
|
+
}), ce = new v({
|
|
143
143
|
length: 10,
|
|
144
144
|
dictionary: "alpha"
|
|
145
|
-
}),
|
|
146
|
-
let { appId:
|
|
147
|
-
|
|
145
|
+
}), k = u(({ id: n, options: i, defaultValue: s, disabled: l, status: u, mode: m, label: v, helper: y, htmlFor: b, placement: x, onChange: w, onClick: T, onClear: D, onBlur: k, onFocus: le, wrapperClassName: ue, className: de, popupClassName: fe, labelOnly: A = !1, oneLineTags: j = !1, allowClear: M = !0, loading: N, required: P, actions: F, extra: I, placeholder: L, dropdownRender: R, getPopupContainer: z, readonlyLight: B = !1, readonly: V = !1, suffixIcon: pe, size: H = "large", optionFilterProp: me = "rawLabel", ...U }, he) => {
|
|
146
|
+
let { appId: W } = e(), [G, K] = ee(!1), q = n ?? b ?? ce.rnd(), ge = p(null), J = p(!1), Y = he ?? ge, _e = a(Y, z), X = ie(() => {
|
|
147
|
+
E(q);
|
|
148
148
|
}, 15);
|
|
149
149
|
d(() => (requestAnimationFrame(() => {
|
|
150
|
-
|
|
151
|
-
}), document.addEventListener("scroll",
|
|
152
|
-
document.removeEventListener("scroll",
|
|
153
|
-
}), [
|
|
154
|
-
let
|
|
150
|
+
E(q);
|
|
151
|
+
}), document.addEventListener("scroll", X), () => {
|
|
152
|
+
document.removeEventListener("scroll", X);
|
|
153
|
+
}), [X, q]);
|
|
154
|
+
let Z = f(() => O(i ?? [], A), [i, A]), Q = (e) => {
|
|
155
155
|
var t;
|
|
156
|
-
(t =
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
}, ve = (e) => {
|
|
160
|
-
Y.current || (q(!1), A?.(e)), Y.current = !1;
|
|
156
|
+
(t = Y?.current) == null || t.focus(), G || K(!0), T?.(e);
|
|
157
|
+
}, ve = () => {
|
|
158
|
+
D?.();
|
|
161
159
|
}, ye = (e) => {
|
|
162
|
-
|
|
163
|
-
}
|
|
160
|
+
J.current || (K(!1), k?.(e)), J.current = !1;
|
|
161
|
+
}, be = (e) => {
|
|
162
|
+
K(!0), le?.(e);
|
|
163
|
+
}, $ = typeof U.classNames == "function" ? void 0 : U.classNames;
|
|
164
164
|
return c(r, {
|
|
165
|
-
label:
|
|
166
|
-
extra:
|
|
167
|
-
helper:
|
|
168
|
-
htmlFor:
|
|
165
|
+
label: v,
|
|
166
|
+
extra: I ?? F,
|
|
167
|
+
helper: y,
|
|
168
|
+
htmlFor: b,
|
|
169
169
|
disabled: l,
|
|
170
170
|
status: u,
|
|
171
|
-
className:
|
|
172
|
-
required:
|
|
171
|
+
className: ue,
|
|
172
|
+
required: P,
|
|
173
173
|
children: c(te, {
|
|
174
|
-
...
|
|
175
|
-
size:
|
|
176
|
-
ref:
|
|
177
|
-
getPopupContainer:
|
|
178
|
-
id:
|
|
179
|
-
"aria-required":
|
|
180
|
-
className:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
174
|
+
...U,
|
|
175
|
+
size: H,
|
|
176
|
+
ref: Y,
|
|
177
|
+
getPopupContainer: _e,
|
|
178
|
+
id: q,
|
|
179
|
+
"aria-required": P,
|
|
180
|
+
className: oe(W, de, x, B, V, j),
|
|
181
|
+
classNames: {
|
|
182
|
+
...$,
|
|
183
|
+
popup: {
|
|
184
|
+
...$?.popup,
|
|
185
|
+
root: se(W, fe, G, u)
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
options: Z,
|
|
189
|
+
placement: x,
|
|
190
|
+
disabled: l || B || V,
|
|
191
|
+
variant: B ? "borderless" : void 0,
|
|
186
192
|
status: u,
|
|
187
193
|
menuItemSelectedIcon: c(o, {
|
|
188
194
|
icon: c(h, { icon: ne }),
|
|
189
195
|
on: !0
|
|
190
196
|
}),
|
|
191
197
|
mode: m,
|
|
192
|
-
loading:
|
|
193
|
-
suffixIcon:
|
|
194
|
-
icon:
|
|
195
|
-
spin:
|
|
198
|
+
loading: N,
|
|
199
|
+
suffixIcon: pe ?? c(h, {
|
|
200
|
+
icon: N ? g : re,
|
|
201
|
+
spin: N
|
|
196
202
|
}),
|
|
197
|
-
allowClear:
|
|
203
|
+
allowClear: M ? { clearIcon: c(h, {
|
|
198
204
|
"aria-label": "clear",
|
|
199
|
-
icon:
|
|
205
|
+
icon: _
|
|
200
206
|
}) } : !1,
|
|
201
|
-
|
|
202
|
-
tagRender: (e) =>
|
|
203
|
-
maxTagCount:
|
|
204
|
-
maxTagPlaceholder:
|
|
207
|
+
popupRender: (e) => ae(e, R),
|
|
208
|
+
tagRender: (e) => S(e, l, u, Z, B || V, H),
|
|
209
|
+
maxTagCount: j ? "responsive" : void 0,
|
|
210
|
+
maxTagPlaceholder: j ? (e) => C(e, l, u) : void 0,
|
|
205
211
|
defaultValue: s,
|
|
206
|
-
placeholder: !
|
|
212
|
+
placeholder: !B && !V ? c(t.Text, {
|
|
207
213
|
ellipsis: !0,
|
|
208
214
|
size: "fontSize5",
|
|
209
215
|
weight: "medium",
|
|
210
|
-
children:
|
|
216
|
+
children: L
|
|
211
217
|
}) : void 0,
|
|
212
|
-
optionFilterProp:
|
|
213
|
-
onChange:
|
|
214
|
-
onClick:
|
|
215
|
-
onClear:
|
|
216
|
-
onBlur:
|
|
217
|
-
onFocus:
|
|
218
|
+
optionFilterProp: me,
|
|
219
|
+
onChange: w,
|
|
220
|
+
onClick: Q,
|
|
221
|
+
onClear: ve,
|
|
222
|
+
onBlur: ye,
|
|
223
|
+
onFocus: be
|
|
218
224
|
})
|
|
219
225
|
});
|
|
220
226
|
});
|
|
221
|
-
|
|
227
|
+
k.displayName = "KitSelect";
|
|
222
228
|
//#endregion
|
|
223
|
-
export {
|
|
229
|
+
export { k as t };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { n as e } from "./useKitTheme.Bcv-etUA.js";
|
|
2
|
+
import { n as t } from "./useKitLocale.45Rjhfd0.js";
|
|
3
|
+
import { KitTooltip as n } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
4
|
+
import r from "../hooks/useSecureClick/index.js";
|
|
5
|
+
import { t as i } from "./Button.BwZ9TVAy.js";
|
|
6
|
+
import { t as a } from "./SearchInput.CNgLpnTf.js";
|
|
7
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { createElement as l, useEffect as u, useState as d } from "react";
|
|
9
|
+
import f from "classnames";
|
|
10
|
+
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
11
|
+
import { faChevronRight as m, faMagnifyingGlass as h } from "@fortawesome/free-solid-svg-icons";
|
|
12
|
+
import '../assets/SideMenu.css';//#region src/Kit/Navigation/SideMenu/styles.module.scss
|
|
13
|
+
var g = {
|
|
14
|
+
"kit-side-menu": "_kit-side-menu_vre2l_1",
|
|
15
|
+
"kit-side-menu-item": "_kit-side-menu-item_vre2l_90",
|
|
16
|
+
"kit-side-menu-separator": "_kit-side-menu-separator_vre2l_181",
|
|
17
|
+
"kit-side-menu-group": "_kit-side-menu-group_vre2l_189"
|
|
18
|
+
}, _ = ({ type: t = "default", itemKey: i = "", title: a, tooltip: l, complement: u, icon: d, disabled: p, large: m, active: h, onClick: _, disabledSecureClick: v, className: y, ...b }) => {
|
|
19
|
+
let { appId: x } = e(), S = (e) => {
|
|
20
|
+
e.stopPropagation(), _?.(i);
|
|
21
|
+
}, C = r(S), w = () => {
|
|
22
|
+
let e = f(x, g["kit-side-menu-item"], {
|
|
23
|
+
large: m,
|
|
24
|
+
active: h,
|
|
25
|
+
clickable: _ && !p,
|
|
26
|
+
disabled: p
|
|
27
|
+
}, y);
|
|
28
|
+
return c("button", {
|
|
29
|
+
...b,
|
|
30
|
+
"data-role": "menuitem",
|
|
31
|
+
disabled: p,
|
|
32
|
+
onClick: v ? S : C,
|
|
33
|
+
className: e,
|
|
34
|
+
children: [d && s("div", {
|
|
35
|
+
className: "kit-side-menu-item-icon",
|
|
36
|
+
children: d
|
|
37
|
+
}), m && c(o, { children: [s("div", {
|
|
38
|
+
className: "kit-side-menu-item-title",
|
|
39
|
+
children: s("span", { children: a })
|
|
40
|
+
}), u && s("div", {
|
|
41
|
+
className: "kit-side-menu-item-complement",
|
|
42
|
+
children: u
|
|
43
|
+
})] })]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return t === "separator" ? s("hr", { className: `${x} ${g["kit-side-menu-separator"]}` }) : t === "group" ? c("div", {
|
|
47
|
+
className: f(x, g["kit-side-menu-group"], { large: m }, y),
|
|
48
|
+
children: [d && s("div", {
|
|
49
|
+
className: "kit-side-menu-item-icon",
|
|
50
|
+
children: d
|
|
51
|
+
}), m && c(o, { children: [s("div", {
|
|
52
|
+
className: "kit-side-menu-item-title",
|
|
53
|
+
children: s("span", { children: a })
|
|
54
|
+
}), u && s("div", {
|
|
55
|
+
className: "kit-side-menu-item-complement",
|
|
56
|
+
children: u
|
|
57
|
+
})] })]
|
|
58
|
+
}) : m ? w() : s(n, {
|
|
59
|
+
title: l ?? (typeof a == "string" ? a : void 0),
|
|
60
|
+
children: w()
|
|
61
|
+
});
|
|
62
|
+
}, v = ({ open: n = !1, showSearch: r, searchOptions: o, customContent: v, items: y = [], onMenuClick: b, onOpenChanged: x, defaultActiveItemKey: S, activeItemKey: C, disabledSecureClick: w, className: T, ...E }) => {
|
|
63
|
+
let { appId: D } = e(), [O, k] = d(n), [A, j] = d(S), { locale: M } = t(), N = C !== void 0, P = N ? C : A;
|
|
64
|
+
u(() => {
|
|
65
|
+
k(n);
|
|
66
|
+
}, [n]), u(() => {
|
|
67
|
+
N || j(S);
|
|
68
|
+
}, [S, N]);
|
|
69
|
+
let F = f(D, g["kit-side-menu"], { open: O }, T), I = () => {
|
|
70
|
+
x?.(!O), k(!O);
|
|
71
|
+
}, L = () => {
|
|
72
|
+
k(!0);
|
|
73
|
+
}, R = (e) => (t) => {
|
|
74
|
+
N || j(t), b?.(t), e?.(t);
|
|
75
|
+
}, z = () => r ? s(a, {
|
|
76
|
+
prefix: s(p, { icon: h }),
|
|
77
|
+
...o,
|
|
78
|
+
expandable: !O,
|
|
79
|
+
size: "middle",
|
|
80
|
+
onFocus: (e) => {
|
|
81
|
+
var t;
|
|
82
|
+
L(), (t = o?.onFocus) == null || t.call(o, e);
|
|
83
|
+
}
|
|
84
|
+
}) : null, B = () => v && s("div", {
|
|
85
|
+
className: "kit-side-menu-custom-content",
|
|
86
|
+
children: v(O)
|
|
87
|
+
}), V = (e, t) => {
|
|
88
|
+
let n = e.key ?? t.toString();
|
|
89
|
+
return e.type === "separator" ? s(_, {
|
|
90
|
+
itemKey: n,
|
|
91
|
+
large: O,
|
|
92
|
+
type: "separator"
|
|
93
|
+
}, n) : e.type === "group" ? s(_, {
|
|
94
|
+
itemKey: n,
|
|
95
|
+
large: O,
|
|
96
|
+
title: e.title,
|
|
97
|
+
icon: e.icon,
|
|
98
|
+
complement: e.complement,
|
|
99
|
+
type: "group"
|
|
100
|
+
}, n) : l(_, {
|
|
101
|
+
...e,
|
|
102
|
+
key: n,
|
|
103
|
+
itemKey: n,
|
|
104
|
+
large: O,
|
|
105
|
+
active: !!P && e.key === P,
|
|
106
|
+
disabledSecureClick: e.disabledSecureClick || w,
|
|
107
|
+
onClick: R(e.onClick)
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
return c("nav", {
|
|
111
|
+
className: F,
|
|
112
|
+
...E,
|
|
113
|
+
children: [
|
|
114
|
+
s("div", { className: "content-bg" }),
|
|
115
|
+
c("div", {
|
|
116
|
+
className: "header",
|
|
117
|
+
children: [
|
|
118
|
+
s(i, {
|
|
119
|
+
"aria-label": O ? M.SideMenu?.collapse : M.SideMenu?.expand,
|
|
120
|
+
className: "kit-side-menu-toggle",
|
|
121
|
+
icon: s(p, { icon: m }),
|
|
122
|
+
onClick: I
|
|
123
|
+
}),
|
|
124
|
+
z(),
|
|
125
|
+
B()
|
|
126
|
+
]
|
|
127
|
+
}),
|
|
128
|
+
s("div", {
|
|
129
|
+
className: "menu-items",
|
|
130
|
+
children: y.map((e, t) => V(e, t))
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
v.displayName = "KitSideMenu";
|
|
136
|
+
//#endregion
|
|
137
|
+
export { v as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as e } from "./useKitTheme.Bcv-etUA.js";
|
|
2
2
|
import { n as t } from "./useKitLocale.45Rjhfd0.js";
|
|
3
3
|
import { KitSpace as n } from "../Kit/Layout/Space/index.js";
|
|
4
|
-
import { t as r } from "./IdCard.
|
|
5
|
-
import { t as i } from "./Button.
|
|
4
|
+
import { t as r } from "./IdCard.CWE38g68.js";
|
|
5
|
+
import { t as i } from "./Button.BwZ9TVAy.js";
|
|
6
6
|
import { n as a } from "./useGetPopupContainer.C6KjVnVk.js";
|
|
7
7
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
8
|
import { forwardRef as l, useEffect as u, useImperativeHandle as d, useRef as f, useState as p } from "react";
|