aristid-ds 20.1.0 → 20.2.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 +63 -0
- package/dist/Kit/App/index.js +1 -1
- package/dist/Kit/DataDisplay/Card/index.js +1 -1
- package/dist/Kit/DataDisplay/Carousel/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/Kanban/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Tab/TabDropdownButton.d.ts +7 -0
- package/dist/Kit/DataDisplay/Tab/index.d.ts +6 -1
- package/dist/Kit/DataDisplay/Tab/index.js +1 -1
- package/dist/Kit/DataDisplay/Tab/types.d.ts +8 -0
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/types.d.ts +12 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +2 -0
- package/dist/Kit/DataEntry/Filter/FilterButton.d.ts +0 -1
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Filter/types.d.ts +0 -1
- package/dist/Kit/DataEntry/Input/index.js +1 -1
- package/dist/Kit/DataEntry/Input/types.d.ts +1 -0
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js +1 -1
- package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
- package/dist/Kit/DataEntry/Select/LoadingSuffix.d.ts +2 -0
- package/dist/Kit/DataEntry/Select/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/useIcons.d.ts +4 -2
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Notification/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/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +52 -38
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +1 -1
- package/dist/Kit/index.js +28 -28
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ColorPicker.css +1 -1
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/LoadingSuffix.css +1 -0
- package/dist/assets/Tab.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/icons/loader/faKitLoader.d.ts +2 -0
- package/dist/chunks/{App.BAznFPGK.js → App.DEAyG_cT.js} +1 -1
- package/dist/chunks/{Button.BvMCtuy-.js → Button.Cf2t8x-g.js} +42 -40
- package/dist/chunks/{Card.CPFdoSwO.js → Card.BifWds4Q.js} +1 -1
- package/dist/chunks/{Carousel.CkzT9Z2U.js → Carousel.D_UPa7c6.js} +2 -1
- package/dist/chunks/{ColorPicker.BO3g1Ccr.js → ColorPicker.CXPDOjlD.js} +4 -4
- package/dist/chunks/DatePicker.CZ7uUpci.js +283 -0
- package/dist/chunks/{DynamicActions.D-M49goY.js → DynamicActions.B0RCwP59.js} +1 -1
- package/dist/chunks/Filter.bcFfECQ2.js +91 -0
- package/dist/chunks/{Header.BG7zjt32.js → Header.CjmOOvCM.js} +1 -1
- package/dist/chunks/{Input.DAqyQC25.js → Input.NJ0gxOKB.js} +189 -174
- package/dist/chunks/InputNumber.ArmZWyjD.js +59 -0
- package/dist/chunks/{InternalSizeChanger.CY_UQjgi.js → InternalSizeChanger.4uhUYdQf.js} +1 -1
- package/dist/chunks/{ItemCard.UAMPsAeG.js → ItemCard.I_EZWDr7.js} +2 -2
- package/dist/chunks/{ItemList.DxIrTW2r.js → ItemList.ZRUcXI2B.js} +1 -1
- package/dist/chunks/{Kanban.DMLzdryr.js → Kanban.DlRMF3Pf.js} +3 -3
- package/dist/chunks/{LinkButton.bj3sa3Dz.js → LinkButton.VSCUoTOf.js} +3 -3
- package/dist/chunks/LoadingSuffix.DoHzo7nz.js +13 -0
- package/dist/chunks/{Modal.DhO42LCE.js → Modal.BGfgvCM-.js} +2 -2
- package/dist/chunks/{Notification.CmGBpBnD.js → Notification.BvB2WQpw.js} +1 -1
- package/dist/chunks/{PageHeader.BNe3xCFg.js → PageHeader.CK5neQHJ.js} +2 -2
- package/dist/chunks/{PageLayout.BjZqP-fP.js → PageLayout.CypWl6mK.js} +2 -2
- package/dist/chunks/{Pagination.DoydgcwL.js → Pagination.D2RZjMJN.js} +1 -1
- package/dist/chunks/{RedirectCard.DZz4x-RC.js → RedirectCard.NBOpek7n.js} +1 -1
- package/dist/chunks/{SearchInput.DPSQA6Hk.js → SearchInput.C7EnHTpX.js} +1 -1
- package/dist/chunks/Select.DAAdVERs.js +247 -0
- package/dist/chunks/{SideMenu.BGakreF_.js → SideMenu.Cd2GjK9u.js} +2 -2
- package/dist/chunks/{SidePanel.e4UuckCP.js → SidePanel.C-fXIhny.js} +2 -2
- package/dist/chunks/{SnackBar.Bjp5gpjk.js → SnackBar.CEjyTWJG.js} +2 -2
- package/dist/chunks/Tab.BQDQSuOg.js +281 -0
- package/dist/chunks/{Table.HPOQ6vNr.js → Table.DPRSm9mV.js} +2 -2
- package/dist/chunks/{Tag.8Hoq2HSD.js → Tag.By8jS_2F.js} +8 -8
- package/dist/chunks/{TreeSelect.C0h4AGX4.js → TreeSelect.DD8WhA4W.js} +95 -93
- package/dist/chunks/{Upload.DxOzcNcZ.js → Upload.DxszpKf4.js} +2 -2
- package/dist/chunks/faKitLoader.BJKbv-bm.js +13 -0
- package/dist/chunks/useLoadingWidthLock.CzCPeVNp.js +13 -0
- package/dist/index.es.js +28 -28
- package/dist/index.umd.js +4 -4
- package/dist/theme/aristid/general/utilities/index.js +12 -6
- package/dist/theme/types/utilities/index.d.ts +18 -0
- package/dist/translation/en-US/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/en-US/index.js +32 -30
- package/dist/translation/fr-FR/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/fr-FR/index.js +32 -30
- package/dist/translation/pt-PT/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/pt-PT/index.js +32 -30
- package/dist/translation/types/components/DataDisplay/Tab/index.d.ts +2 -0
- package/dist/utils/functions/index.d.ts +1 -2
- package/dist/utils/functions/types.d.ts +6 -0
- package/dist/utils/hooks/useLoadingWidthLock.d.ts +2 -0
- package/package.json +15 -16
- package/dist/assets/styles.css +0 -1
- package/dist/chunks/DatePicker.DlehA8r8.js +0 -273
- package/dist/chunks/Filter.BrhTPGgi.js +0 -85
- package/dist/chunks/InputNumber.BVLzytYW.js +0 -52
- package/dist/chunks/Select.C4L4tjyk.js +0 -248
- package/dist/chunks/Tab.BQlSFTkt.js +0 -188
- package/dist/chunks/styles.module.CAGtUY-F.js +0 -3
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as e } from "./InputWrapper.UG5UbUiq.js";
|
|
2
|
+
import { n as t } from "./useKitTheme.P5Q2DIyI.js";
|
|
3
|
+
import { t as n } from "./useDeprecatedInputWrapper.CZ2-c80o.js";
|
|
4
|
+
import { t as r } from "./faKitLoader.BJKbv-bm.js";
|
|
5
|
+
import { InputNumber as i } from "antd";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
import { forwardRef as o, useState as s } from "react";
|
|
8
|
+
import c from "classnames";
|
|
9
|
+
import { FontAwesomeIcon as l } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import '../assets/InputNumber.css';// src/Kit/DataEntry/InputNumber/styles.module.scss
|
|
11
|
+
var u = { "kit-input-number": "_kit-input-number_16760_1" }, d = o(({ label: o, helper: d, htmlFor: f, wrapperClassName: p, className: m, required: h, actions: g, extra: _, disabled: v, placeholder: y, readonly: b, loading: x = !1, onFocus: S, onBlur: C, size: w = "large", ...T }, E) => {
|
|
12
|
+
let { appId: D } = t(), [O, k] = s(!1);
|
|
13
|
+
n("InputNumber", {
|
|
14
|
+
label: o,
|
|
15
|
+
helper: d,
|
|
16
|
+
htmlFor: f,
|
|
17
|
+
clasName: p,
|
|
18
|
+
actions: g,
|
|
19
|
+
extra: _,
|
|
20
|
+
...T
|
|
21
|
+
});
|
|
22
|
+
let A = c(D, u["kit-input-number"], m, {
|
|
23
|
+
"kit-input-number-affix-wrapper-focused": O,
|
|
24
|
+
"kit-input-number-readonly": b
|
|
25
|
+
});
|
|
26
|
+
return a(e, {
|
|
27
|
+
label: o,
|
|
28
|
+
helper: d,
|
|
29
|
+
htmlFor: f,
|
|
30
|
+
disabled: v,
|
|
31
|
+
status: T.status,
|
|
32
|
+
className: p,
|
|
33
|
+
required: h,
|
|
34
|
+
extra: _ ?? g,
|
|
35
|
+
children: a(i, {
|
|
36
|
+
ref: E,
|
|
37
|
+
required: h,
|
|
38
|
+
size: w,
|
|
39
|
+
id: T.id ?? f,
|
|
40
|
+
onFocus: (e) => {
|
|
41
|
+
S?.(e), k(!0);
|
|
42
|
+
},
|
|
43
|
+
onBlur: (e) => {
|
|
44
|
+
C?.(e), k(!1);
|
|
45
|
+
},
|
|
46
|
+
className: A,
|
|
47
|
+
disabled: v || b,
|
|
48
|
+
suffix: x ? a(l, {
|
|
49
|
+
icon: r,
|
|
50
|
+
spin: !0
|
|
51
|
+
}) : void 0,
|
|
52
|
+
"aria-busy": x || void 0,
|
|
53
|
+
placeholder: b ? void 0 : y,
|
|
54
|
+
...T
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
d.displayName = "KitInputNumber";
|
|
59
|
+
export { d as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Select.
|
|
1
|
+
import { t as e } from "./Select.DAAdVERs.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { faChevronDown as n } from "@fortawesome/free-solid-svg-icons";
|
|
4
4
|
import { FontAwesomeIcon as r } from "@fortawesome/react-fontawesome";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./useWindowSize.DYK_ESLw.js";
|
|
2
|
-
import { t } from "./Tag.
|
|
2
|
+
import { t } from "./Tag.By8jS_2F.js";
|
|
3
3
|
import { t as n } from "./Checkbox.C0E-Lf9F.js";
|
|
4
4
|
import { t as r } from "./Switch.BTyPj5S0.js";
|
|
5
5
|
import { t as i } from "./Loader.B154m8Uo.js";
|
|
6
6
|
import { t as a } from "./Typography.dSdY4EZz.js";
|
|
7
7
|
import { n as o } from "./Breadcrumb.DUEiho8q.js";
|
|
8
8
|
import { n as s } from "./useKitTheme.P5Q2DIyI.js";
|
|
9
|
-
import { t as c } from "./Button.
|
|
9
|
+
import { t as c } from "./Button.Cf2t8x-g.js";
|
|
10
10
|
import { KitDropDown as l } from "../Kit/Navigation/DropDown/index.js";
|
|
11
11
|
import { n as u } from "./useKitLocale.Y5XHnnYS.js";
|
|
12
12
|
import { KitTooltip as d } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./IdCard.DcdzxJ6s.js";
|
|
2
2
|
import { KitTooltip as t } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
3
3
|
import { t as n } from "./Checkbox.C0E-Lf9F.js";
|
|
4
|
-
import { t as r } from "./Button.
|
|
4
|
+
import { t as r } from "./Button.Cf2t8x-g.js";
|
|
5
5
|
import { KitDropDown as i } from "../Kit/Navigation/DropDown/index.js";
|
|
6
6
|
import { n as a } from "./useKitTheme.P5Q2DIyI.js";
|
|
7
7
|
import { n as o } from "./useKitLocale.Y5XHnnYS.js";
|
|
@@ -2,12 +2,12 @@ import { n as e } from "./useKitTheme.P5Q2DIyI.js";
|
|
|
2
2
|
import { kitKanbanLocale as t } from "../translation/en-US/components/DataDisplay/Kanban/index.js";
|
|
3
3
|
import { n } from "./useKitLocale.Y5XHnnYS.js";
|
|
4
4
|
import { t as r } from "./Loader.B154m8Uo.js";
|
|
5
|
-
import { t as i } from "./SnackBar.
|
|
5
|
+
import { t as i } from "./SnackBar.CEjyTWJG.js";
|
|
6
6
|
import { t as a } from "./Checkbox.C0E-Lf9F.js";
|
|
7
|
-
import { t as o } from "./Card.
|
|
7
|
+
import { t as o } from "./Card.BifWds4Q.js";
|
|
8
8
|
import { m as s, p as c, r as l } from "./functions.m4ADIGGk.js";
|
|
9
9
|
import { colorsPalette as u } from "../theme/aristid/general/colors/index.js";
|
|
10
|
-
import { t as d } from "./Button.
|
|
10
|
+
import { t as d } from "./Button.Cf2t8x-g.js";
|
|
11
11
|
import { t as f } from "./Badge.tu17MdMt.js";
|
|
12
12
|
import { t as p } from "./IdCard.DcdzxJ6s.js";
|
|
13
13
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as e } from "./useKitLocale.Y5XHnnYS.js";
|
|
2
2
|
import { KitButtonTooltip as t } from "../Kit/DataEntry/RichText/MenuBar/ButtonTooltip/index.js";
|
|
3
|
-
import { t as n } from "./Input.
|
|
4
|
-
import { t as r } from "./Modal.
|
|
5
|
-
import { t as i } from "./Button.
|
|
3
|
+
import { t as n } from "./Input.NJ0gxOKB.js";
|
|
4
|
+
import { t as r } from "./Modal.BGfgvCM-.js";
|
|
5
|
+
import { t as i } from "./Button.Cf2t8x-g.js";
|
|
6
6
|
import { KitSpace as a } from "../Kit/General/Space/index.js";
|
|
7
7
|
import { Form as o } from "antd";
|
|
8
8
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as e } from "./faKitLoader.BJKbv-bm.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { FontAwesomeIcon as r } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import '../assets/LoadingSuffix.css';// src/Kit/DataEntry/Select/styles.module.scss
|
|
5
|
+
var i = { "kit-select": "_kit-select_1cppq_1" }, a = ({ children: i }) => n("span", {
|
|
6
|
+
className: "kit-select-loading-suffix",
|
|
7
|
+
children: [t(r, {
|
|
8
|
+
icon: e,
|
|
9
|
+
spin: !0,
|
|
10
|
+
className: "kit-select-loader"
|
|
11
|
+
}), i]
|
|
12
|
+
}), o = (e) => typeof e == "function" ? ((n) => t(a, { children: e(n) })) : t(a, { children: e });
|
|
13
|
+
export { i as n, o as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./App.
|
|
1
|
+
import { t as e } from "./App.DEAyG_cT.js";
|
|
2
2
|
import { f as t } from "./functions.m4ADIGGk.js";
|
|
3
|
-
import { t as n } from "./Button.
|
|
3
|
+
import { t as n } from "./Button.Cf2t8x-g.js";
|
|
4
4
|
import { t as r } from "./Icon.DbHbt0HM.js";
|
|
5
5
|
import { n as i } from "./useKitTheme.P5Q2DIyI.js";
|
|
6
6
|
import { KitSpace as a } from "../Kit/General/Space/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as e } from "./functions.m4ADIGGk.js";
|
|
2
2
|
import { KitTooltip as t } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
3
|
-
import { t as n } from "./Button.
|
|
3
|
+
import { t as n } from "./Button.Cf2t8x-g.js";
|
|
4
4
|
import { t as r } from "./Icon.DbHbt0HM.js";
|
|
5
5
|
import { t as i } from "./Typography.dSdY4EZz.js";
|
|
6
6
|
import { n as a } from "./useKitLocale.Y5XHnnYS.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./Input.
|
|
2
|
-
import { t } from "./Button.
|
|
1
|
+
import { t as e } from "./Input.NJ0gxOKB.js";
|
|
2
|
+
import { t } from "./Button.Cf2t8x-g.js";
|
|
3
3
|
import { KitSpace as n } from "../Kit/General/Space/index.js";
|
|
4
4
|
import { t as r } from "./Typography.dSdY4EZz.js";
|
|
5
5
|
import { n as i } from "./useKitTheme.P5Q2DIyI.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./Header.
|
|
2
|
-
import { t } from "./SideMenu.
|
|
1
|
+
import { t as e } from "./Header.CjmOOvCM.js";
|
|
2
|
+
import { t } from "./SideMenu.Cd2GjK9u.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { forwardRef as i } from "react";
|
|
5
5
|
import a from "classnames";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e } from "./useKitTheme.P5Q2DIyI.js";
|
|
2
2
|
import { n as t } from "./useKitLocale.Y5XHnnYS.js";
|
|
3
|
-
import { n, t as r } from "./InternalSizeChanger.
|
|
3
|
+
import { n, t as r } from "./InternalSizeChanger.4uhUYdQf.js";
|
|
4
4
|
import { Pagination as i } from "antd";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
import o from "classnames";
|
|
@@ -2,7 +2,7 @@ import { n as e } from "./useKitTheme.P5Q2DIyI.js";
|
|
|
2
2
|
import { t } from "./Icon.DbHbt0HM.js";
|
|
3
3
|
import { t as n } from "./Typography.dSdY4EZz.js";
|
|
4
4
|
import { t as r } from "./Divider.C-DXVgoI.js";
|
|
5
|
-
import { t as i } from "./Button.
|
|
5
|
+
import { t as i } from "./Button.Cf2t8x-g.js";
|
|
6
6
|
import { KitDropDown as a } from "../Kit/Navigation/DropDown/index.js";
|
|
7
7
|
import { n as o } from "./useKitLocale.Y5XHnnYS.js";
|
|
8
8
|
import { KitTooltip as s } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { t as e } from "./InputWrapper.UG5UbUiq.js";
|
|
2
|
+
import { n as t } from "./useKitTheme.P5Q2DIyI.js";
|
|
3
|
+
import { n } from "./useKitLocale.Y5XHnnYS.js";
|
|
4
|
+
import { n as r, t as i } from "./LoadingSuffix.DoHzo7nz.js";
|
|
5
|
+
import { t as a } from "./Icon.DbHbt0HM.js";
|
|
6
|
+
import { t as o } from "./Typography.dSdY4EZz.js";
|
|
7
|
+
import { t as s } from "./useDeprecatedInputWrapper.CZ2-c80o.js";
|
|
8
|
+
import { t as c } from "./useGetPopupContainer.Bcn4zw7O.js";
|
|
9
|
+
import { t as l } from "./useLoadingWidthLock.CzCPeVNp.js";
|
|
10
|
+
import { t as u } from "./IdCard.DcdzxJ6s.js";
|
|
11
|
+
import { t as d } from "./Tag.By8jS_2F.js";
|
|
12
|
+
import { Select as f } from "antd";
|
|
13
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
|
+
import { forwardRef as h, useEffect as g, useMemo as _, useRef as v, useState as ee } from "react";
|
|
15
|
+
import y from "classnames";
|
|
16
|
+
import { faCheck as te, faChevronDown as ne, faCircleXmark as re } from "@fortawesome/free-solid-svg-icons";
|
|
17
|
+
import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
|
|
18
|
+
import { useDebouncedCallback as ie } from "use-debounce";
|
|
19
|
+
import x from "short-unique-id";
|
|
20
|
+
// src/Kit/DataEntry/Select/guard.ts
|
|
21
|
+
var S = (e) => !!e.idCard, C = (e, t) => {
|
|
22
|
+
for (let n of t) {
|
|
23
|
+
let t = n.options ? C(e, n.options) : n.value === e ? n : void 0;
|
|
24
|
+
if (t) return t;
|
|
25
|
+
}
|
|
26
|
+
}, w = { MAX_PLACEHOLDER: "MAX_PLACEHOLDER" }, ae = (e, t, n, r, i, a) => {
|
|
27
|
+
if (e.label !== null && e.label !== void 0 && typeof e.label == "object" && "specialCase" in e.label && e.label.specialCase === w.MAX_PLACEHOLDER) {
|
|
28
|
+
let t = e.label;
|
|
29
|
+
return delete t.specialCase, p(d, { ...t });
|
|
30
|
+
}
|
|
31
|
+
let { labelToDisplay: o, onTagClose: s, isOptionDisabled: c } = C(e.value, r) ?? {}, l = E(o), f = o?.idCard ?? {
|
|
32
|
+
description: T(o, e),
|
|
33
|
+
...!!l && { avatarProps: {
|
|
34
|
+
icon: l,
|
|
35
|
+
shape: "square"
|
|
36
|
+
} }
|
|
37
|
+
}, m = (e) => {
|
|
38
|
+
e.preventDefault(), e.stopPropagation();
|
|
39
|
+
}, h = (t) => {
|
|
40
|
+
s?.(t), e.onClose(t);
|
|
41
|
+
}, g = t || !!c, _ = e.closable && !i;
|
|
42
|
+
return p(d, {
|
|
43
|
+
type: D(g, n),
|
|
44
|
+
size: O(a),
|
|
45
|
+
disabled: g,
|
|
46
|
+
onClose: _ ? h : void 0,
|
|
47
|
+
onMouseDown: m,
|
|
48
|
+
children: p(u, {
|
|
49
|
+
disabled: g,
|
|
50
|
+
description: f.description,
|
|
51
|
+
avatarProps: f.avatarProps ? {
|
|
52
|
+
...f.avatarProps,
|
|
53
|
+
size: "xs"
|
|
54
|
+
} : void 0
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}, oe = (e, t, n) => ({
|
|
58
|
+
specialCase: w.MAX_PLACEHOLDER,
|
|
59
|
+
type: D(t, n),
|
|
60
|
+
children: p(u, {
|
|
61
|
+
description: `+${e.length}`,
|
|
62
|
+
disabled: t
|
|
63
|
+
}),
|
|
64
|
+
disabled: t
|
|
65
|
+
}), T = (e, t) => e?.label ?? t.label ?? String(t.value), E = (e) => {
|
|
66
|
+
if (e?.color) return p("div", {
|
|
67
|
+
className: "kit-select-option-badge",
|
|
68
|
+
children: p("div", { style: { backgroundColor: e.color } })
|
|
69
|
+
});
|
|
70
|
+
if (e?.icon) return p(a, {
|
|
71
|
+
on: !0,
|
|
72
|
+
className: "kit-select-option-icon",
|
|
73
|
+
icon: e.icon
|
|
74
|
+
});
|
|
75
|
+
}, D = (e, t) => e || t === "warning" ? "neutral" : t === "error" ? "error" : "secondary", O = (e) => {
|
|
76
|
+
switch (e) {
|
|
77
|
+
case "large": return "medium";
|
|
78
|
+
case "middle": return "small";
|
|
79
|
+
case "small": return "small";
|
|
80
|
+
}
|
|
81
|
+
}, se = (e, t) => p("div", {
|
|
82
|
+
className: "kit-select-dropdown-content",
|
|
83
|
+
children: t ? t(e) : e
|
|
84
|
+
}), k = (e) => {
|
|
85
|
+
let t = document.getElementById(e)?.closest(".ant-select"), n = document.getElementById(`${e}_list`)?.closest(".ant-select-dropdown");
|
|
86
|
+
if (t && n) {
|
|
87
|
+
let e = n.className.indexOf("ant-select-dropdown-placement-top") >= 0, r = n.className.indexOf("ant-select-dropdown-placement-bottom") >= 0;
|
|
88
|
+
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"));
|
|
89
|
+
}
|
|
90
|
+
}, A = (e, t) => {
|
|
91
|
+
if (S(e)) {
|
|
92
|
+
let { idCard: t } = e;
|
|
93
|
+
return p("div", {
|
|
94
|
+
className: "kit-select-option",
|
|
95
|
+
children: p(u, { ...t })
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
let { icon: n, color: r, label: i } = e;
|
|
99
|
+
return m("div", {
|
|
100
|
+
className: "kit-select-option",
|
|
101
|
+
children: [
|
|
102
|
+
n && !t && p(a, {
|
|
103
|
+
className: "kit-select-option-icon",
|
|
104
|
+
icon: n,
|
|
105
|
+
on: !0
|
|
106
|
+
}),
|
|
107
|
+
r && !t && p("div", {
|
|
108
|
+
className: "kit-select-option-badge",
|
|
109
|
+
children: r && p("div", { style: { backgroundColor: r } })
|
|
110
|
+
}),
|
|
111
|
+
p("div", {
|
|
112
|
+
className: "kit-select-option-label",
|
|
113
|
+
children: p(o.Text, {
|
|
114
|
+
ellipsis: !0,
|
|
115
|
+
size: "fontSize5",
|
|
116
|
+
weight: "regular",
|
|
117
|
+
children: i
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}, j = (e, t) => e.map((e) => {
|
|
123
|
+
let { className: n, disabled: r, closable: i, value: a, options: o, label: s, onTagClose: c } = e;
|
|
124
|
+
if (o) return {
|
|
125
|
+
label: s,
|
|
126
|
+
options: j(o, t)
|
|
127
|
+
};
|
|
128
|
+
let l = !!r;
|
|
129
|
+
return {
|
|
130
|
+
label: A(e, t),
|
|
131
|
+
labelToDisplay: e,
|
|
132
|
+
rawLabel: e?.label ?? "",
|
|
133
|
+
className: n,
|
|
134
|
+
disabled: l || i === !1,
|
|
135
|
+
isOptionDisabled: l,
|
|
136
|
+
value: a,
|
|
137
|
+
onTagClose: c
|
|
138
|
+
};
|
|
139
|
+
}), ce = (e, t, n, i, a, o) => {
|
|
140
|
+
let s = n?.includes("top");
|
|
141
|
+
return y(e, r["kit-select"], t, {
|
|
142
|
+
"ant-select-top": s,
|
|
143
|
+
"ant-select-bottom": !s,
|
|
144
|
+
"kit-select-readonly-light": i,
|
|
145
|
+
"kit-select-readonly": a,
|
|
146
|
+
"kit-select-one-line": o
|
|
147
|
+
});
|
|
148
|
+
}, le = (e, t, n, r) => y(e, t, "kit-select-dropdown-content", {
|
|
149
|
+
"kit-select-dropdown-focus": n,
|
|
150
|
+
"kit-select-dropdown-error": r === "error",
|
|
151
|
+
"kit-select-dropdown-warning": r === "warning"
|
|
152
|
+
}), ue = new x({
|
|
153
|
+
length: 10,
|
|
154
|
+
dictionary: "alpha"
|
|
155
|
+
}), M = h(({ id: r, options: u, disabled: d, status: m, label: h, helper: x, htmlFor: S, placement: C, onChange: w, onClick: T, onClear: E, onBlur: D, onFocus: O, wrapperClassName: A, className: M, popupClassName: de, labelOnly: N = !1, oneLineTags: P = !1, allowClear: fe = !0, loading: F, required: I, actions: L, extra: R, placeholder: pe, dropdownRender: me, popupRender: he, getPopupContainer: ge, readonlyLight: z = !1, readonly: B = !1, suffixIcon: _e, suffix: ve, size: V = "large", optionFilterProp: ye = "rawLabel", ...H }, be) => {
|
|
156
|
+
let { appId: U } = t(), { locale: W } = n(), [G, K] = ee(!1), q = r ?? S ?? ue.rnd(), xe = v(null), J = v(!1);
|
|
157
|
+
s("Select", {
|
|
158
|
+
label: h,
|
|
159
|
+
helper: x,
|
|
160
|
+
htmlFor: S,
|
|
161
|
+
className: A,
|
|
162
|
+
actions: L,
|
|
163
|
+
extra: R,
|
|
164
|
+
...H
|
|
165
|
+
});
|
|
166
|
+
let Y = be ?? xe, Se = c(Y, ge), X = ie(() => {
|
|
167
|
+
k(q);
|
|
168
|
+
}, 15);
|
|
169
|
+
g(() => (requestAnimationFrame(() => {
|
|
170
|
+
k(q);
|
|
171
|
+
}), document.addEventListener("scroll", X), () => {
|
|
172
|
+
document.removeEventListener("scroll", X);
|
|
173
|
+
}), [X, q]), l(F, () => Y?.current?.nativeElement);
|
|
174
|
+
let Z = ve ?? _e ?? p(b, { icon: ne }), Q = _(() => j(u ?? [], N), [u, N]), Ce = (e) => {
|
|
175
|
+
var t;
|
|
176
|
+
(t = Y?.current) == null || t.focus(), G || K(!0), T?.(e);
|
|
177
|
+
}, we = () => {
|
|
178
|
+
E?.();
|
|
179
|
+
}, Te = (e) => {
|
|
180
|
+
J.current || (K(!1), D?.(e)), J.current = !1;
|
|
181
|
+
}, Ee = (e) => {
|
|
182
|
+
K(!0), O?.(e);
|
|
183
|
+
}, $ = typeof H.classNames == "function" ? void 0 : H.classNames;
|
|
184
|
+
return p(e, {
|
|
185
|
+
label: h,
|
|
186
|
+
extra: R ?? L,
|
|
187
|
+
helper: x,
|
|
188
|
+
htmlFor: S,
|
|
189
|
+
disabled: d,
|
|
190
|
+
status: m,
|
|
191
|
+
className: A,
|
|
192
|
+
required: I,
|
|
193
|
+
children: p(f, {
|
|
194
|
+
...H,
|
|
195
|
+
size: V,
|
|
196
|
+
ref: Y,
|
|
197
|
+
getPopupContainer: Se,
|
|
198
|
+
id: q,
|
|
199
|
+
"aria-required": H["aria-required"] ?? I,
|
|
200
|
+
className: y(ce(U, M, C, z, B, P), { "kit-select-loading": F }),
|
|
201
|
+
classNames: {
|
|
202
|
+
...$,
|
|
203
|
+
popup: {
|
|
204
|
+
...$?.popup,
|
|
205
|
+
root: y($?.popup?.root, le(U, de, G, m))
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
options: Q,
|
|
209
|
+
placement: C,
|
|
210
|
+
disabled: d || z || B,
|
|
211
|
+
"aria-busy": F || void 0,
|
|
212
|
+
variant: z ? "borderless" : void 0,
|
|
213
|
+
status: m,
|
|
214
|
+
menuItemSelectedIcon: p(a, {
|
|
215
|
+
icon: p(b, { icon: te }),
|
|
216
|
+
on: !0
|
|
217
|
+
}),
|
|
218
|
+
loading: F,
|
|
219
|
+
suffix: F ? i(Z) : Z,
|
|
220
|
+
allowClear: fe ? {
|
|
221
|
+
clearIcon: p(b, {
|
|
222
|
+
"aria-label": W.General?.clear,
|
|
223
|
+
icon: re
|
|
224
|
+
}),
|
|
225
|
+
label: W.General?.clear
|
|
226
|
+
} : !1,
|
|
227
|
+
popupRender: (e) => se(e, he ?? me),
|
|
228
|
+
tagRender: (e) => ae(e, d, m, Q, z || B, V),
|
|
229
|
+
maxTagCount: P ? "responsive" : void 0,
|
|
230
|
+
maxTagPlaceholder: P ? (e) => oe(e, d, m) : void 0,
|
|
231
|
+
placeholder: !z && !B ? p(o.Text, {
|
|
232
|
+
ellipsis: !0,
|
|
233
|
+
size: "fontSize5",
|
|
234
|
+
weight: "regular",
|
|
235
|
+
children: pe
|
|
236
|
+
}) : void 0,
|
|
237
|
+
optionFilterProp: ye,
|
|
238
|
+
onChange: w,
|
|
239
|
+
onClick: Ce,
|
|
240
|
+
onClear: we,
|
|
241
|
+
onBlur: Te,
|
|
242
|
+
onFocus: Ee
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
M.displayName = "KitSelect";
|
|
247
|
+
export { M as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./SearchInput.
|
|
2
|
-
import { t } from "./Button.
|
|
1
|
+
import { t as e } from "./SearchInput.C7EnHTpX.js";
|
|
2
|
+
import { t } from "./Button.Cf2t8x-g.js";
|
|
3
3
|
import { n } from "./useKitTheme.P5Q2DIyI.js";
|
|
4
4
|
import { n as r } from "./useKitLocale.Y5XHnnYS.js";
|
|
5
5
|
import i from "../hooks/useSecureClick/index.js";
|
|
@@ -2,7 +2,7 @@ import { n as e } from "./useKitTheme.P5Q2DIyI.js";
|
|
|
2
2
|
import { n as t } from "./useKitLocale.Y5XHnnYS.js";
|
|
3
3
|
import { n } from "./useGetPopupContainer.Bcn4zw7O.js";
|
|
4
4
|
import { t as r } from "./IdCard.DcdzxJ6s.js";
|
|
5
|
-
import { t as i } from "./Button.
|
|
5
|
+
import { t as i } from "./Button.Cf2t8x-g.js";
|
|
6
6
|
import { KitSpace as a } from "../Kit/General/Space/index.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";
|
|
@@ -14,7 +14,7 @@ var v = ({ ref: e, onClickOutside: t, active: n = !1 }) => {
|
|
|
14
14
|
u(() => {
|
|
15
15
|
if (!n) return;
|
|
16
16
|
let r = (n) => {
|
|
17
|
-
e.current && !
|
|
17
|
+
e.current && !n.composedPath().includes(e.current) && t();
|
|
18
18
|
};
|
|
19
19
|
return document.addEventListener("click", r), () => {
|
|
20
20
|
document.removeEventListener("click", r);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./Button.
|
|
2
|
-
import { t } from "./DynamicActions.
|
|
1
|
+
import { t as e } from "./Button.Cf2t8x-g.js";
|
|
2
|
+
import { t } from "./DynamicActions.B0RCwP59.js";
|
|
3
3
|
import { t as n } from "./Typography.dSdY4EZz.js";
|
|
4
4
|
import { t as r } from "./Divider.C-DXVgoI.js";
|
|
5
5
|
import { n as i } from "./useKitTheme.P5Q2DIyI.js";
|