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
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { KitTooltip as e } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
2
2
|
import t from "../hooks/useSecureClick/index.js";
|
|
3
3
|
import { n } from "./useKitTheme.P5Q2DIyI.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import f from "
|
|
9
|
-
import
|
|
4
|
+
import { t as r } from "./faKitLoader.BJKbv-bm.js";
|
|
5
|
+
import { KitDropDown as i } from "../Kit/Navigation/DropDown/index.js";
|
|
6
|
+
import { n as a } from "./useKitLocale.Y5XHnnYS.js";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import { cloneElement as c, forwardRef as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
9
|
+
import p from "classnames";
|
|
10
|
+
import { faArrowRight as m, faChevronDown as h, faWandMagicSparkles as g } from "@fortawesome/free-solid-svg-icons";
|
|
10
11
|
import { FontAwesomeIcon as _ } from "@fortawesome/react-fontawesome";
|
|
11
12
|
import '../assets/Button.css';// src/Kit/General/Button/styles.module.scss
|
|
12
|
-
var v = { "kit-btn": "_kit-
|
|
13
|
+
var v = { "kit-btn": "_kit-btn_wf9ju_1" }, y = (e) => {
|
|
13
14
|
if (!e) return null;
|
|
14
15
|
let t = e;
|
|
15
|
-
return
|
|
16
|
+
return c(t, { className: `${t.props?.className ?? ""} kit-btn-icon` });
|
|
16
17
|
}, b = (e) => {
|
|
17
18
|
if (typeof e == "object" && e) {
|
|
18
19
|
let t = e?.delay;
|
|
@@ -30,26 +31,26 @@ var v = { "kit-btn": "_kit-btn_yyv7s_1" }, y = (e) => {
|
|
|
30
31
|
"secondary",
|
|
31
32
|
"tertiary",
|
|
32
33
|
"segmented"
|
|
33
|
-
], S = x, C = x, w =
|
|
34
|
-
let { appId: R } = n(), [z, B] =
|
|
34
|
+
], S = x, C = x, w = l(({ iconSize: e, dangerModal: i, active: a, href: c, target: l, icon: h, danger: x, color: w, block: T, className: E, onClick: D, disableSecureClick: O, children: k, disabled: A, AI: j = !1, size: M = "l", type: N = "secondary", htmlType: P = "button", loading: F = !1, ...I }, L) => {
|
|
35
|
+
let { appId: R } = n(), [z, B] = f(!1), V = d(() => b(F), [F]), H = j && [
|
|
35
36
|
"primary",
|
|
36
37
|
"secondary",
|
|
37
38
|
"tertiary"
|
|
38
|
-
].includes(N), U = t(D), W = H && !
|
|
39
|
-
[`kit-btn-${N}`]: !
|
|
39
|
+
].includes(N), U = t(D), W = H && !h ? o(_, { icon: g }) : h, G = !k && W, K = p(R, v["kit-btn"], E, {
|
|
40
|
+
[`kit-btn-${N}`]: !i && N,
|
|
40
41
|
"kit-btn-ai": H,
|
|
41
|
-
"kit-btn-secondary":
|
|
42
|
+
"kit-btn-secondary": i || N === "secondary",
|
|
42
43
|
"kit-btn-disabled": A,
|
|
43
|
-
"kit-btn-danger-modal":
|
|
44
|
+
"kit-btn-danger-modal": i,
|
|
44
45
|
"kit-btn-danger": x,
|
|
45
46
|
"kit-btn-block": T,
|
|
46
|
-
"kit-btn-active":
|
|
47
|
+
"kit-btn-active": a && C.includes(N),
|
|
47
48
|
[`icon-${e ?? "m"}`]: e,
|
|
48
49
|
"kit-btn-icon-only": G,
|
|
49
50
|
[`kit-btn-color-${w}`]: w,
|
|
50
51
|
[`kit-btn-size-${M}`]: !!M && (!N || S.includes(N))
|
|
51
52
|
}), q = y(W);
|
|
52
|
-
|
|
53
|
+
u(() => {
|
|
53
54
|
let e = null;
|
|
54
55
|
V.delay > 0 ? e = setTimeout(() => {
|
|
55
56
|
e = null, B(!0);
|
|
@@ -62,10 +63,10 @@ var v = { "kit-btn": "_kit-btn_yyv7s_1" }, y = (e) => {
|
|
|
62
63
|
let J = (e) => {
|
|
63
64
|
e.preventDefault(), e.stopPropagation();
|
|
64
65
|
};
|
|
65
|
-
return
|
|
66
|
+
return s(N === "link" || N === "redirect" ? "a" : "button", {
|
|
66
67
|
onClick: A ? J : O ? D : U,
|
|
67
|
-
href: N === "link" || N === "redirect" ?
|
|
68
|
-
target: N === "link" || N === "redirect" ?
|
|
68
|
+
href: N === "link" || N === "redirect" ? c : void 0,
|
|
69
|
+
target: N === "link" || N === "redirect" ? l : void 0,
|
|
69
70
|
tabIndex: 0,
|
|
70
71
|
ref: L,
|
|
71
72
|
type: P,
|
|
@@ -73,48 +74,49 @@ var v = { "kit-btn": "_kit-btn_yyv7s_1" }, y = (e) => {
|
|
|
73
74
|
...I,
|
|
74
75
|
...A && { onAuxClick: J },
|
|
75
76
|
"aria-disabled": A || void 0,
|
|
77
|
+
"aria-busy": z || void 0,
|
|
76
78
|
className: K,
|
|
77
79
|
children: [
|
|
78
|
-
z ?
|
|
79
|
-
icon:
|
|
80
|
+
z ? o(_, {
|
|
81
|
+
icon: r,
|
|
80
82
|
spin: !0,
|
|
81
|
-
className: "kit-btn-icon"
|
|
83
|
+
className: "kit-btn-icon kit-btn-loader"
|
|
82
84
|
}) : q,
|
|
83
85
|
k,
|
|
84
|
-
N === "redirect" &&
|
|
85
|
-
icon:
|
|
86
|
+
N === "redirect" && o(_, {
|
|
87
|
+
icon: m,
|
|
86
88
|
className: "kit-btn-icon-redirect"
|
|
87
89
|
})
|
|
88
90
|
]
|
|
89
91
|
});
|
|
90
|
-
}), T = { "kit-btn-split": "_kit-btn-split_14lph_1" }, E =
|
|
91
|
-
let { appId: S } = n(), { locale: C } =
|
|
92
|
-
|
|
92
|
+
}), T = { "kit-btn-split": "_kit-btn-split_14lph_1" }, E = l(({ items: e, onClick: t, children: r, icon: c, className: l, id: u, style: d, open: m, block: g, splitClassName: v, getPopupContainer: y, ...b }, x) => {
|
|
93
|
+
let { appId: S } = n(), { locale: C } = a(), [E, D] = f(m), O = p(S, T["kit-btn-split"], { "kit-btn-block": g }, l), k = p("kit-btn-split-main", v?.main), A = p("kit-btn-split-split", { "kit-btn-split-open": E }, v?.split), j = (e) => {
|
|
94
|
+
m || D(e);
|
|
93
95
|
};
|
|
94
|
-
return
|
|
96
|
+
return s("div", {
|
|
95
97
|
className: O,
|
|
96
|
-
style:
|
|
98
|
+
style: d,
|
|
97
99
|
id: u,
|
|
98
|
-
children: [
|
|
100
|
+
children: [o(w, {
|
|
99
101
|
...b,
|
|
100
102
|
className: k,
|
|
101
103
|
ref: x,
|
|
102
104
|
icon: c,
|
|
103
105
|
onClick: t,
|
|
104
|
-
children:
|
|
105
|
-
}),
|
|
106
|
+
children: r
|
|
107
|
+
}), o(i, {
|
|
106
108
|
trigger: ["click"],
|
|
107
109
|
menu: { items: e },
|
|
108
110
|
placement: "bottomRight",
|
|
109
111
|
open: E,
|
|
110
112
|
getPopupContainer: y,
|
|
111
113
|
onOpenChange: j,
|
|
112
|
-
children:
|
|
114
|
+
children: o(w, {
|
|
113
115
|
...b,
|
|
114
116
|
className: A,
|
|
115
117
|
loading: !1,
|
|
116
118
|
"aria-label": C.Button?.more,
|
|
117
|
-
icon:
|
|
119
|
+
icon: o(_, { icon: h })
|
|
118
120
|
})
|
|
119
121
|
})]
|
|
120
122
|
});
|
|
@@ -125,24 +127,24 @@ var D = [
|
|
|
125
127
|
"primary",
|
|
126
128
|
"secondary",
|
|
127
129
|
"tertiary"
|
|
128
|
-
], O =
|
|
130
|
+
], O = l(({ items: e = [], type: t = "secondary", tooltipText: n, ...r }, i) => {
|
|
129
131
|
if (e?.length > 0) {
|
|
130
|
-
let
|
|
131
|
-
return k(n,
|
|
132
|
+
let a = D.includes(t) ? t : "secondary";
|
|
133
|
+
return k(n, o(E, {
|
|
132
134
|
...r,
|
|
133
|
-
type:
|
|
135
|
+
type: a,
|
|
134
136
|
items: e,
|
|
135
137
|
ref: i
|
|
136
138
|
}));
|
|
137
139
|
}
|
|
138
|
-
return k(n,
|
|
140
|
+
return k(n, o(w, {
|
|
139
141
|
...r,
|
|
140
142
|
type: t,
|
|
141
143
|
ref: i
|
|
142
144
|
}));
|
|
143
145
|
});
|
|
144
146
|
O.displayName = "KitButton";
|
|
145
|
-
var k = (t, n) => n.props.children || !t ? n :
|
|
147
|
+
var k = (t, n) => n.props.children || !t ? n : o(e, {
|
|
146
148
|
title: t,
|
|
147
149
|
placement: "bottom",
|
|
148
150
|
children: n
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e } from "./useKitTheme.P5Q2DIyI.js";
|
|
2
2
|
import { t } from "./useWindowSize.DYK_ESLw.js";
|
|
3
|
-
import { t as n } from "./Button.
|
|
3
|
+
import { t as n } from "./Button.Cf2t8x-g.js";
|
|
4
4
|
import { KitDropDown as r } from "../Kit/Navigation/DropDown/index.js";
|
|
5
5
|
import { n as i } from "./useKitLocale.Y5XHnnYS.js";
|
|
6
6
|
import { KitTooltip as a } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
@@ -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 { t as n } from "./Button.
|
|
3
|
+
import { t as n } from "./Button.Cf2t8x-g.js";
|
|
4
4
|
import { Carousel as r } from "antd";
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
import { Children as s, forwardRef as c, isValidElement as l, useEffect as u, useImperativeHandle as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
@@ -83,6 +83,7 @@ var x = { "kit-carousel": "_kit-carousel_175y3_1" }, S = 3, C = "0px", w = (e, t
|
|
|
83
83
|
slidesToShow: U,
|
|
84
84
|
centerMode: W,
|
|
85
85
|
centerPadding: C,
|
|
86
|
+
vertical: !1,
|
|
86
87
|
dots: !1,
|
|
87
88
|
arrows: !1,
|
|
88
89
|
beforeChange: X,
|
|
@@ -11,10 +11,10 @@ import { faCircleXmark as h } from "@fortawesome/free-solid-svg-icons";
|
|
|
11
11
|
import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
|
|
12
12
|
import '../assets/ColorPicker.css';// src/Kit/DataEntry/ColorPicker/styles.module.scss
|
|
13
13
|
var _ = {
|
|
14
|
-
"kit-colorpicker": "_kit-
|
|
15
|
-
"kit-color-picker-clear": "_kit-color-picker-
|
|
16
|
-
"kit-color-picker-placeholder": "_kit-color-picker-
|
|
17
|
-
"kit-color-picker-text": "_kit-color-picker-
|
|
14
|
+
"kit-colorpicker": "_kit-colorpicker_uliy7_1",
|
|
15
|
+
"kit-color-picker-clear": "_kit-color-picker-clear_uliy7_45",
|
|
16
|
+
"kit-color-picker-placeholder": "_kit-color-picker-placeholder_uliy7_65",
|
|
17
|
+
"kit-color-picker-text": "_kit-color-picker-text_uliy7_70"
|
|
18
18
|
}, v = 9, y = 16, b = 255, x = (e) => {
|
|
19
19
|
if (e.length === v) {
|
|
20
20
|
let t = e.slice(-2), n = Math.round(parseInt(t, y) / b * 100);
|
|
@@ -0,0 +1,283 @@
|
|
|
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 { t as r } from "./useDeprecatedInputWrapper.CZ2-c80o.js";
|
|
5
|
+
import { t as i } from "./useGetPopupContainer.Bcn4zw7O.js";
|
|
6
|
+
import { t as a } from "./faKitLoader.BJKbv-bm.js";
|
|
7
|
+
import { t as o } from "./Typography.dSdY4EZz.js";
|
|
8
|
+
import { DatePicker as s } from "antd";
|
|
9
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
import { forwardRef as d, useCallback as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
11
|
+
import _ from "classnames";
|
|
12
|
+
import { faArrowRight as v, faCalendar as y, faCheck as b, faChevronLeft as x, faChevronRight as S, faCircleXmark as ee, faClock as C } from "@fortawesome/free-solid-svg-icons";
|
|
13
|
+
import { FontAwesomeIcon as w } from "@fortawesome/react-fontawesome";
|
|
14
|
+
import '../assets/DatePicker.css';// src/assets/icons/chevrons/LeftChevrons.tsx
|
|
15
|
+
var T = () => u("div", {
|
|
16
|
+
className: "double-chevron",
|
|
17
|
+
children: [l(w, {
|
|
18
|
+
className: "chevron-icon",
|
|
19
|
+
icon: x
|
|
20
|
+
}), l(w, {
|
|
21
|
+
className: "chevron-icon double-chevron-left-icon",
|
|
22
|
+
icon: x
|
|
23
|
+
})]
|
|
24
|
+
}), E = () => u("div", {
|
|
25
|
+
className: "double-chevron",
|
|
26
|
+
children: [l(w, {
|
|
27
|
+
className: "chevron-icon double-chevron-right-icon",
|
|
28
|
+
icon: S
|
|
29
|
+
}), l(w, {
|
|
30
|
+
className: "chevron-icon",
|
|
31
|
+
icon: S
|
|
32
|
+
})]
|
|
33
|
+
}), D = { "kit-preset-label": "_kit-preset-label_g6thk_1" }, O = ({ label: e, active: t }) => {
|
|
34
|
+
let n = _(D["kit-preset-label"], { "kit-preset-active": t });
|
|
35
|
+
return u("span", {
|
|
36
|
+
className: n,
|
|
37
|
+
children: [l(o.Text, {
|
|
38
|
+
size: "fontSize7",
|
|
39
|
+
children: e
|
|
40
|
+
}), t && l(w, {
|
|
41
|
+
icon: b,
|
|
42
|
+
color: "var(--general-utilities-main-default)"
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
}, k = (e = "date", t) => (e === "date" || e === "week") && t ? "minute" : {
|
|
46
|
+
time: "minute",
|
|
47
|
+
date: "day",
|
|
48
|
+
week: "week",
|
|
49
|
+
month: "month",
|
|
50
|
+
quarter: "month",
|
|
51
|
+
year: "year"
|
|
52
|
+
}[e], A = (e, t, n) => !e || !t ? -1 : e.findIndex((e) => {
|
|
53
|
+
let r = typeof e.value == "function" ? e.value() : e.value;
|
|
54
|
+
return Array.isArray(t) || Array.isArray(r) ? !1 : t.isSame(r, n);
|
|
55
|
+
}), j = (e, t, n) => {
|
|
56
|
+
let r = t?.[0], i = t?.[1];
|
|
57
|
+
return !e || !r || !i ? -1 : e.findIndex((e) => {
|
|
58
|
+
let [t, a] = typeof e.value == "function" ? e.value() : e.value;
|
|
59
|
+
return !t || !a ? !1 : r.isSame(t, n) && i.isSame(a, n);
|
|
60
|
+
});
|
|
61
|
+
}, M = ({ presets: e, picker: t, showTime: n, onChange: r, onCalendarChange: i }) => {
|
|
62
|
+
let [a, o] = g(-1), s = k(t, n), c = f((t, n) => {
|
|
63
|
+
o(A(e, t, s)), r?.(t, n);
|
|
64
|
+
}, [
|
|
65
|
+
e,
|
|
66
|
+
s,
|
|
67
|
+
r
|
|
68
|
+
]), u = f((e, t, n) => {
|
|
69
|
+
o(-1), i?.(e, t, n);
|
|
70
|
+
}, [i]);
|
|
71
|
+
return {
|
|
72
|
+
enrichedPresets: m(() => e && e.map((e, t) => ({
|
|
73
|
+
...e,
|
|
74
|
+
label: l(O, {
|
|
75
|
+
label: e.label,
|
|
76
|
+
active: t === a
|
|
77
|
+
})
|
|
78
|
+
})), [e, a]),
|
|
79
|
+
onChange: c,
|
|
80
|
+
onCalendarChange: u
|
|
81
|
+
};
|
|
82
|
+
}, N = {
|
|
83
|
+
"kit-datepicker": "_kit-datepicker_2soyx_1",
|
|
84
|
+
"kit-rangepicker": "_kit-rangepicker_2soyx_237"
|
|
85
|
+
}, P = d(({ label: o, helper: c, htmlFor: u, suffixIcon: d, suffix: f, className: p, wrapperClassName: m, prefix: g, required: v, actions: b, extra: D, disabled: O, loading: k = !1, placeholder: A, getPopupContainer: j, picker: P = "date", size: F = "large", allowClear: I = !0, readonlyLight: L = !1, readonly: R = !1, presets: z, onChange: B, onCalendarChange: V, ...H }, U) => {
|
|
86
|
+
let { appId: W } = t(), { locale: G } = n(), K = h(null), q = i(U ?? K, j);
|
|
87
|
+
r("DatePicker", {
|
|
88
|
+
label: o,
|
|
89
|
+
helper: c,
|
|
90
|
+
htmlFor: u,
|
|
91
|
+
className: m,
|
|
92
|
+
actions: b,
|
|
93
|
+
extra: D,
|
|
94
|
+
...H
|
|
95
|
+
});
|
|
96
|
+
let { enrichedPresets: J, onChange: Y, onCalendarChange: X } = M({
|
|
97
|
+
presets: z,
|
|
98
|
+
picker: P,
|
|
99
|
+
showTime: H.showTime,
|
|
100
|
+
onChange: B,
|
|
101
|
+
onCalendarChange: V
|
|
102
|
+
}), Z = _(W, N["kit-datepicker"], p, {
|
|
103
|
+
"kit-picker-readonly-light": L,
|
|
104
|
+
"kit-picker-readonly": R
|
|
105
|
+
}), Q = g ?? (P === "time" ? l(w, { icon: C }) : l(w, { icon: y }));
|
|
106
|
+
return l(e, {
|
|
107
|
+
label: o,
|
|
108
|
+
helper: c,
|
|
109
|
+
htmlFor: u,
|
|
110
|
+
disabled: O,
|
|
111
|
+
status: H.status,
|
|
112
|
+
className: m,
|
|
113
|
+
required: v,
|
|
114
|
+
extra: D ?? b,
|
|
115
|
+
children: l(s, {
|
|
116
|
+
...H,
|
|
117
|
+
presets: J,
|
|
118
|
+
onChange: Y,
|
|
119
|
+
onCalendarChange: X,
|
|
120
|
+
id: H.id ?? u,
|
|
121
|
+
required: v,
|
|
122
|
+
picker: P,
|
|
123
|
+
disabled: L || R || O,
|
|
124
|
+
variant: L ? "borderless" : void 0,
|
|
125
|
+
ref: U ?? K,
|
|
126
|
+
size: F,
|
|
127
|
+
getPopupContainer: q,
|
|
128
|
+
placeholder: !L && !R ? A : void 0,
|
|
129
|
+
allowClear: !L && !R && !k && I && {
|
|
130
|
+
clearIcon: l(w, {
|
|
131
|
+
"aria-label": G.General?.clear,
|
|
132
|
+
icon: ee
|
|
133
|
+
}),
|
|
134
|
+
label: G.General?.clear
|
|
135
|
+
},
|
|
136
|
+
prefix: Q,
|
|
137
|
+
"aria-busy": k || void 0,
|
|
138
|
+
suffix: k ? l(w, {
|
|
139
|
+
icon: a,
|
|
140
|
+
spin: !0
|
|
141
|
+
}) : f ?? d ?? null,
|
|
142
|
+
className: Z,
|
|
143
|
+
prevIcon: l(w, {
|
|
144
|
+
className: "chevron-icon",
|
|
145
|
+
icon: x
|
|
146
|
+
}),
|
|
147
|
+
nextIcon: l(w, {
|
|
148
|
+
className: "chevron-icon",
|
|
149
|
+
icon: S
|
|
150
|
+
}),
|
|
151
|
+
superPrevIcon: l(T, {}),
|
|
152
|
+
superNextIcon: l(E, {})
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
}), F = ({ presets: e, picker: t, showTime: n, onChange: r, onCalendarChange: i }) => {
|
|
156
|
+
let [a, o] = g(-1), s = k(t, n), c = f((t, n) => {
|
|
157
|
+
o(j(e, t, s)), r?.(t, n);
|
|
158
|
+
}, [
|
|
159
|
+
e,
|
|
160
|
+
s,
|
|
161
|
+
r
|
|
162
|
+
]), u = f((e, t, n) => {
|
|
163
|
+
o(-1), i?.(e, t, n);
|
|
164
|
+
}, [i]);
|
|
165
|
+
return {
|
|
166
|
+
enrichedPresets: m(() => e && e.map((e, t) => ({
|
|
167
|
+
...e,
|
|
168
|
+
label: l(O, {
|
|
169
|
+
label: e.label,
|
|
170
|
+
active: t === a
|
|
171
|
+
})
|
|
172
|
+
})), [e, a]),
|
|
173
|
+
onChange: c,
|
|
174
|
+
onCalendarChange: u
|
|
175
|
+
};
|
|
176
|
+
}, I = d(({ label: o, className: d, helper: f, htmlFor: m, suffixIcon: b, suffix: D, picker: O, prefix: k, allowClear: A = !0, required: j, actions: M, extra: P, placeholder: I, readonlyLight: L = !1, readonly: R = !1, loading: z = !1, getPopupContainer: B, size: V = "large", presets: H, onChange: U, onCalendarChange: W, ...G }, K) => {
|
|
177
|
+
let { locale: q } = n(), [J, Y] = g(["", ""]), { appId: X } = t(), Z = h(null), Q = h(null), te = h(null), $ = K ?? Z, ne = i($, B);
|
|
178
|
+
r("RangePicker", {
|
|
179
|
+
label: o,
|
|
180
|
+
helper: f,
|
|
181
|
+
htmlFor: m,
|
|
182
|
+
actions: M,
|
|
183
|
+
extra: P,
|
|
184
|
+
...G
|
|
185
|
+
});
|
|
186
|
+
let { enrichedPresets: re, onChange: ie, onCalendarChange: ae } = F({
|
|
187
|
+
presets: H,
|
|
188
|
+
picker: O,
|
|
189
|
+
showTime: G.showTime,
|
|
190
|
+
onChange: U,
|
|
191
|
+
onCalendarChange: W
|
|
192
|
+
}), oe = () => G.disabled === void 0 ? !1 : typeof G.disabled == "boolean" ? G.disabled : G.disabled[0] && G.disabled[1], se = _(X, N["kit-rangepicker"], d, {
|
|
193
|
+
"kit-picker-readonly-light": L,
|
|
194
|
+
"kit-picker-readonly": R,
|
|
195
|
+
"kit-picker-loading": z
|
|
196
|
+
}), ce = k ?? (O === "time" ? l(w, { icon: C }) : l(w, { icon: y })), le = (e) => {
|
|
197
|
+
Y([e[0].value || e[0].placeholder || "", e[1].value || e[1].placeholder || ""]);
|
|
198
|
+
};
|
|
199
|
+
return p(() => {
|
|
200
|
+
let e = ($?.current)?.nativeElement.querySelectorAll(".ant-picker-input input");
|
|
201
|
+
if (!e || e.length < 2) return;
|
|
202
|
+
let t = [];
|
|
203
|
+
return e.forEach((n) => {
|
|
204
|
+
let r = new MutationObserver(() => le(e));
|
|
205
|
+
r.observe(n, {
|
|
206
|
+
attributes: !0,
|
|
207
|
+
attributeFilter: ["value"]
|
|
208
|
+
}), t.push(r);
|
|
209
|
+
}), le(e), () => {
|
|
210
|
+
t.forEach((e) => {
|
|
211
|
+
e.disconnect();
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
}, [$]), p(() => {
|
|
215
|
+
let e = ($?.current)?.nativeElement.querySelectorAll(".ant-picker-input");
|
|
216
|
+
!e || e.length < 2 || (e[0].style.flexBasis = `${Q.current?.offsetWidth}px`, e[1].style.flexBasis = `${te.current?.offsetWidth}px`);
|
|
217
|
+
}, [$, J]), u(c, { children: [u("div", {
|
|
218
|
+
className: _("range-mirror-wrapper", V, { "readonly-light": L }),
|
|
219
|
+
"aria-hidden": "true",
|
|
220
|
+
children: [l("span", {
|
|
221
|
+
className: "range-mirror-input",
|
|
222
|
+
ref: Q,
|
|
223
|
+
children: J[0]
|
|
224
|
+
}), l("span", {
|
|
225
|
+
className: "range-mirror-input",
|
|
226
|
+
ref: te,
|
|
227
|
+
children: J[1]
|
|
228
|
+
})]
|
|
229
|
+
}), l(e, {
|
|
230
|
+
label: o,
|
|
231
|
+
helper: f,
|
|
232
|
+
htmlFor: m,
|
|
233
|
+
disabled: oe(),
|
|
234
|
+
status: G.status,
|
|
235
|
+
required: j,
|
|
236
|
+
extra: P ?? M,
|
|
237
|
+
children: l(s.RangePicker, {
|
|
238
|
+
...G,
|
|
239
|
+
presets: re,
|
|
240
|
+
onChange: ie,
|
|
241
|
+
onCalendarChange: ae,
|
|
242
|
+
id: G.id ?? m,
|
|
243
|
+
picker: O,
|
|
244
|
+
ref: K ?? Z,
|
|
245
|
+
getPopupContainer: ne,
|
|
246
|
+
required: j,
|
|
247
|
+
size: V,
|
|
248
|
+
disabled: L || R || G.disabled,
|
|
249
|
+
variant: L ? "borderless" : void 0,
|
|
250
|
+
placeholder: !L && !R ? I : void 0,
|
|
251
|
+
suffix: z ? l(w, {
|
|
252
|
+
icon: a,
|
|
253
|
+
spin: !0
|
|
254
|
+
}) : D ?? b ?? null,
|
|
255
|
+
allowClear: A && !z && {
|
|
256
|
+
clearIcon: l(w, {
|
|
257
|
+
"aria-label": q.General?.clear,
|
|
258
|
+
icon: ee
|
|
259
|
+
}),
|
|
260
|
+
label: q.General?.clear
|
|
261
|
+
},
|
|
262
|
+
className: se,
|
|
263
|
+
prefix: ce,
|
|
264
|
+
"aria-busy": z || void 0,
|
|
265
|
+
separator: l(w, {
|
|
266
|
+
"aria-label": q.DatePicker?.to,
|
|
267
|
+
icon: v
|
|
268
|
+
}),
|
|
269
|
+
prevIcon: l(w, {
|
|
270
|
+
className: "chevron-icon",
|
|
271
|
+
icon: x
|
|
272
|
+
}),
|
|
273
|
+
nextIcon: l(w, {
|
|
274
|
+
className: "chevron-icon",
|
|
275
|
+
icon: S
|
|
276
|
+
}),
|
|
277
|
+
superPrevIcon: l(T, {}),
|
|
278
|
+
superNextIcon: l(E, {})
|
|
279
|
+
})
|
|
280
|
+
})] });
|
|
281
|
+
}), L = P;
|
|
282
|
+
L.displayName = "KitDatePicker", L.RangePicker = I;
|
|
283
|
+
export { L as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KitTooltip as e } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
2
|
-
import { t } from "./Button.
|
|
2
|
+
import { t } from "./Button.Cf2t8x-g.js";
|
|
3
3
|
import { KitDropDown as n } from "../Kit/Navigation/DropDown/index.js";
|
|
4
4
|
import { n as r } from "./useKitLocale.Y5XHnnYS.js";
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { KitDropDown as e } from "../Kit/Navigation/DropDown/index.js";
|
|
2
|
+
import { t } from "./Badge.tu17MdMt.js";
|
|
3
|
+
import { KitTooltip as n } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
4
|
+
import { t as r } from "./Typography.dSdY4EZz.js";
|
|
5
|
+
import { n as i } from "./useKitTheme.P5Q2DIyI.js";
|
|
6
|
+
import { n as a, u as o } from "./functions.m4ADIGGk.js";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as l, forwardRef as u, useEffect as d, useState as f } from "react";
|
|
9
|
+
import p from "classnames";
|
|
10
|
+
import { faCaretDown as m } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import { FontAwesomeIcon as h } from "@fortawesome/react-fontawesome";
|
|
12
|
+
import '../assets/Filter.css';// src/Kit/DataEntry/Filter/styles.module.scss
|
|
13
|
+
var g = { "kit-filter": "_kit-filter_1wabv_1" }, _ = u(({ leftIcon: e, values: u = [], valueColor: d, active: f = !1, readonly: _ = !1, disabled: v = !1, showSingleValue: y = !1, expandable: b = !1, label: x = "", isDropdownOpen: S = !1, ...C }, w) => {
|
|
14
|
+
let { appId: T } = i(), E = p(T, g["kit-filter"], {
|
|
15
|
+
"kit-filter-active": f || S,
|
|
16
|
+
"kit-filter-clickable": b || C.onClick,
|
|
17
|
+
"kit-filter-readonly": _,
|
|
18
|
+
"kit-filter-disabled": v
|
|
19
|
+
}, C.className), D = d && o(d) ? { "--kit-Filter-valueColor": a(d) } : void 0;
|
|
20
|
+
return c("button", {
|
|
21
|
+
...C,
|
|
22
|
+
className: E,
|
|
23
|
+
ref: w,
|
|
24
|
+
tabIndex: _ || v ? -1 : 0,
|
|
25
|
+
children: [
|
|
26
|
+
e && s("span", {
|
|
27
|
+
className: "kit-filter-icon",
|
|
28
|
+
children: e
|
|
29
|
+
}),
|
|
30
|
+
x.length > 0 && s(r.AdvancedText, {
|
|
31
|
+
ellipsis: { tooltip: { placement: "bottom" } },
|
|
32
|
+
className: "kit-filter-label",
|
|
33
|
+
children: x
|
|
34
|
+
}),
|
|
35
|
+
y && u.length === 1 ? s(r.AdvancedText, {
|
|
36
|
+
ellipsis: { tooltip: { placement: "bottom" } },
|
|
37
|
+
className: "kit-filter-value",
|
|
38
|
+
style: D,
|
|
39
|
+
children: u[0]
|
|
40
|
+
}) : u.length > 0 && s(n, {
|
|
41
|
+
title: u.map((e, t) => c(l, { children: [t > 0 && ", ", e] }, t)),
|
|
42
|
+
placement: "bottom",
|
|
43
|
+
children: s(t, {
|
|
44
|
+
count: u.length,
|
|
45
|
+
color: "primary"
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
48
|
+
b && s(h, {
|
|
49
|
+
icon: m,
|
|
50
|
+
className: "kit-filter-expand-button"
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
_.displayName = "FilterButton";
|
|
56
|
+
// src/Kit/DataEntry/Filter/index.tsx
|
|
57
|
+
var v = u(({ leftIcon: t, values: n = [], dropDownProps: r, active: i = !1, readonly: a = !1, disabled: o = !1, showSingleValue: c = !1, expandable: l = !1, label: u = "", ...p }, m) => {
|
|
58
|
+
let h = r && !o && !a, [g, v] = f(!1), y = h ? r.open ?? g : !1;
|
|
59
|
+
d(() => {
|
|
60
|
+
h || v(!1);
|
|
61
|
+
}, [h]);
|
|
62
|
+
let b = (e, t) => {
|
|
63
|
+
var n;
|
|
64
|
+
v(e || t.source === "menu"), (n = r?.onOpenChange) == null || n.call(r, e, t);
|
|
65
|
+
};
|
|
66
|
+
d(() => {
|
|
67
|
+
let e = () => v(!1);
|
|
68
|
+
return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
|
|
69
|
+
}, []);
|
|
70
|
+
let x = s(_, {
|
|
71
|
+
...p,
|
|
72
|
+
ref: m,
|
|
73
|
+
leftIcon: t,
|
|
74
|
+
values: n,
|
|
75
|
+
active: i,
|
|
76
|
+
readonly: a,
|
|
77
|
+
disabled: o,
|
|
78
|
+
showSingleValue: c,
|
|
79
|
+
expandable: l,
|
|
80
|
+
label: u,
|
|
81
|
+
isDropdownOpen: y
|
|
82
|
+
});
|
|
83
|
+
return h ? s(e, {
|
|
84
|
+
...r,
|
|
85
|
+
onOpenChange: b,
|
|
86
|
+
trigger: ["click"],
|
|
87
|
+
placement: "bottom",
|
|
88
|
+
children: x
|
|
89
|
+
}) : x;
|
|
90
|
+
});
|
|
91
|
+
export { v as t };
|
|
@@ -2,7 +2,7 @@ import { n as e } from "./useKitTheme.P5Q2DIyI.js";
|
|
|
2
2
|
import { r as t } from "./functions.m4ADIGGk.js";
|
|
3
3
|
import { KitDropDown as n } from "../Kit/Navigation/DropDown/index.js";
|
|
4
4
|
import { t as r } from "./IdCard.DcdzxJ6s.js";
|
|
5
|
-
import { t as i } from "./Tag.
|
|
5
|
+
import { t as i } from "./Tag.By8jS_2F.js";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import { forwardRef as s, useEffect as c, useId as l, useImperativeHandle as u, useRef as d, useState as f } from "react";
|
|
8
8
|
import p from "classnames";
|