@ck-ui/component-library 1.0.1 → 1.0.2
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/dist/DropdownFooter-CsDll1Tj.js +96 -0
- package/dist/{Grow-D08Iq1uH.js → Grow-wzNsNKt2.js} +41 -41
- package/dist/IconSlot-DvUwY6Do.js +33 -0
- package/dist/{OptionList-DN1xZbnV.js → OptionList-BM4AleXV.js} +361 -290
- package/dist/{Select-Cw96VEHD.js → Select-CiuwMSD7.js} +2366 -2427
- package/dist/assets/DropdownFooter-JrU15UnN.css +1 -0
- package/dist/assets/IconSlot-BWv5PQN_.css +1 -0
- package/dist/assets/ReactToastify-GNLSjkBZ.css +1 -0
- package/dist/assets/{ToastContent-PGkBxPUW.css → ToastContent-DpF5zCks.css} +1 -1
- package/dist/assets/index-0R9p-l95.css +1 -0
- package/dist/assets/index-B3yBTtVQ.css +1 -0
- package/dist/assets/index-BbJZjGLb.css +1 -0
- package/dist/assets/{main-Dv8QUU_o.css → main-3OqLSdPm.css} +1 -1
- package/dist/assets/{styles-Chhklrps.css → styles-C5uYY4fL.css} +1 -1
- package/dist/assets/styles-CEyiQgVQ.css +1 -0
- package/dist/components/CKButton/_helper/ComboLayout.js +1 -1
- package/dist/components/CKButton/_helper/IconSlot.js +1 -1
- package/dist/components/CKButton/_helper/StandardLayout.js +1 -1
- package/dist/components/CKButton/index.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +703 -680
- package/dist/components/EmptyState/index.js +7 -7
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +207 -192
- package/dist/components/FusionChart/_config/helpers.d.ts +3 -0
- package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/helpers.js +61 -45
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts +2 -0
- package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
- package/dist/components/FusionChart/_utils/chartHelpers.js +1 -1
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +163 -130
- package/dist/components/MenuOptions/_utils/computeMenuPosition.js +1 -1
- package/dist/components/MenuOptions/_utils/computeSubmenuPosition.js +1 -1
- package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +30 -30
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +3 -1
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/SimpleMultiSelect.js +150 -136
- package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
- package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
- package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.d.ts +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/SearchResult.js +31 -21
- package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +95 -74
- package/dist/components/MultiSelect/_types/type.d.ts +6 -2
- package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
- package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts +18 -0
- package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts.map +1 -0
- package/dist/components/MultiSelect/_utils/useDropdownDirection.js +23 -0
- package/dist/components/MultiSelect/index.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.js +162 -151
- package/dist/components/PopupAndDialogBox/components/DialogContent.js +1 -1
- package/dist/components/PopupAndDialogBox/components/DialogFooter.js +1 -1
- package/dist/components/PopupAndDialogBox/components/DialogHeader.js +1 -1
- package/dist/components/PopupAndDialogBox/index.js +1 -1
- package/dist/components/Search/index.d.ts.map +1 -1
- package/dist/components/Search/index.js +63 -61
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +3 -3
- package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.js +83 -78
- package/dist/components/Table/_helpers/ColumnManager/index.js +3 -3
- package/dist/components/Table/_helpers/GroupedHeader/index.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.js +133 -142
- package/dist/components/Table/_helpers/TableFilterModal/index.js +1 -1
- package/dist/components/Table/_helpers/TableRows.js +1 -1
- package/dist/components/Table/index.js +2 -2
- package/dist/components/TextField/index.js +331 -328
- package/dist/components/Toast/_helper/ToastContent.js +25 -25
- package/dist/components/Toast/_helper/ToastProvider.js +9 -9
- package/dist/components/Toast/_hooks/useToast.js +1 -1
- package/dist/components/Tooltip/index.js +772 -697
- package/dist/createSimplePaletteValueFilter-BqxST_wX.js +24 -0
- package/dist/index-BR6M9zUI.js +382 -0
- package/dist/{index-f7TB87Mf.js → index-Bcvmezbu.js} +23 -3
- package/dist/main.js +1 -1
- package/dist/styles.module-yIHBMSTk.js +53 -0
- package/dist/styles.module-yNDMDNO-.js +14 -0
- package/dist/{useSlot-ylt7_lTY.js → useSlot-BiMlGawc.js} +656 -623
- package/package.json +3 -3
- package/dist/DropdownFooter-Dm6aLDx8.js +0 -89
- package/dist/IconSlot-CPQsGPB-.js +0 -33
- package/dist/assets/DropdownFooter-DjdPf69A.css +0 -1
- package/dist/assets/IconSlot-D8WWEHKb.css +0 -1
- package/dist/assets/ReactToastify-tlSLHgLC.css +0 -1
- package/dist/assets/index-B81zpOpq.css +0 -1
- package/dist/assets/index-DNhNBxL9.css +0 -1
- package/dist/assets/index-YHUWVH17.css +0 -1
- package/dist/assets/styles-Bj-7zn37.css +0 -1
- package/dist/contains-kLLEGdNH.js +0 -41
- package/dist/index-C8cPPHJD.js +0 -1196
- package/dist/styles.module-BZaUJMlf.js +0 -14
- package/dist/styles.module-DakCndIP.js +0 -42
|
@@ -1,213 +1,224 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { s as
|
|
4
|
-
import { Search as
|
|
5
|
-
import { S as
|
|
6
|
-
import { CKCheckbox as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { getInitialSelected as
|
|
12
|
-
import { filterOptions as
|
|
13
|
-
import { computeApplyDisabled as
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsxs as i, jsx as o, Fragment as fe } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as Ce, useEffect as H, useMemo as T, useCallback as p } from "react";
|
|
3
|
+
import { s as t } from "../../styles.module-yIHBMSTk.js";
|
|
4
|
+
import { Search as ve } from "../Search/index.js";
|
|
5
|
+
import { S as we } from "../../info-icon-ooYw3va_.js";
|
|
6
|
+
import { CKCheckbox as be } from "../CKCheckbox/index.js";
|
|
7
|
+
import ke from "./_helpers/TriggerButton.js";
|
|
8
|
+
import ye from "./_helpers/OptionRow.js";
|
|
9
|
+
import Ne from "./_helpers/SearchResult.js";
|
|
10
|
+
import Ae from "./_helpers/DropdownFooter.js";
|
|
11
|
+
import { getInitialSelected as J } from "./_utils/getInitialSelected.js";
|
|
12
|
+
import { filterOptions as De } from "./_utils/filterOptions.js";
|
|
13
|
+
import { computeApplyDisabled as Ee } from "./_utils/computeApplyDisabled.js";
|
|
14
|
+
import { useDropdownDirection as Re } from "./_utils/useDropdownDirection.js";
|
|
15
|
+
import { mergeClasses as f } from "../../utils/mergeClasses.js";
|
|
16
|
+
function Pe({
|
|
17
|
+
label: $,
|
|
18
|
+
helperText: y,
|
|
19
|
+
required: U,
|
|
20
|
+
placeholder: V = "Choose parameter",
|
|
21
|
+
searchPlaceholder: X = "Search",
|
|
22
|
+
selectAllLabel: j = "Select all",
|
|
22
23
|
options: l,
|
|
23
|
-
defaultSelected:
|
|
24
|
-
onApply:
|
|
25
|
-
exclude:
|
|
26
|
-
setExclude:
|
|
27
|
-
onSelect:
|
|
28
|
-
onClear:
|
|
29
|
-
classNames:
|
|
30
|
-
showExcludeBtn:
|
|
31
|
-
requireSelection:
|
|
32
|
-
width:
|
|
33
|
-
disabled:
|
|
24
|
+
defaultSelected: F = [],
|
|
25
|
+
onApply: N,
|
|
26
|
+
exclude: d,
|
|
27
|
+
setExclude: Y,
|
|
28
|
+
onSelect: S,
|
|
29
|
+
onClear: L,
|
|
30
|
+
classNames: C = {},
|
|
31
|
+
showExcludeBtn: Z,
|
|
32
|
+
requireSelection: a = !1,
|
|
33
|
+
width: _ = "",
|
|
34
|
+
disabled: x = !1,
|
|
35
|
+
maxChips: q = 1
|
|
34
36
|
}) {
|
|
35
|
-
const { labelWrapperClass:
|
|
36
|
-
() =>
|
|
37
|
-
), [
|
|
38
|
-
() =>
|
|
39
|
-
), [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, []),
|
|
43
|
-
const e = (
|
|
44
|
-
|
|
37
|
+
const { labelWrapperClass: ee, helperClass: le } = C, [A, D] = u(!1), [E, R] = u(""), [n, Q] = u(
|
|
38
|
+
() => J(F)
|
|
39
|
+
), [r, v] = u(
|
|
40
|
+
() => J(F)
|
|
41
|
+
), [W, K] = u(d), [te, g] = u(!1), [se, h] = u(!1), I = Ce(null), { vertical: z, horizontal: ne } = Re(I, A);
|
|
42
|
+
H(() => {
|
|
43
|
+
g(n?.length === l?.length);
|
|
44
|
+
}, []), H(() => {
|
|
45
|
+
const e = (s) => {
|
|
46
|
+
I.current && !I.current.contains(s.target) && (v(n), g(n?.length === l?.length), D(!1), h(!1), R(""));
|
|
45
47
|
};
|
|
46
48
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
47
|
-
}, [
|
|
48
|
-
const
|
|
49
|
-
() =>
|
|
50
|
-
[l,
|
|
51
|
-
),
|
|
52
|
-
(e,
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
return
|
|
49
|
+
}, [n, l.length]);
|
|
50
|
+
const B = T(
|
|
51
|
+
() => De(l, E),
|
|
52
|
+
[l, E]
|
|
53
|
+
), M = a ? 1 : q, P = p(
|
|
54
|
+
(e, s, w, ue) => {
|
|
55
|
+
w || h(!1);
|
|
56
|
+
const pe = (O) => {
|
|
57
|
+
const c = O?.some((b) => b?.value === e) ? O?.filter((b) => b?.value !== e) : [...O, { value: e, label: s }];
|
|
58
|
+
return g(c?.length === l?.length), c?.length <= M && h(!1), c;
|
|
57
59
|
};
|
|
58
|
-
if (
|
|
59
|
-
if (
|
|
60
|
+
if (ue) {
|
|
61
|
+
if (a && n?.length === 1 && n[0]?.value === e)
|
|
60
62
|
return;
|
|
61
|
-
|
|
63
|
+
const c = ((m) => m?.some((k) => k?.value === e) ? m?.filter((k) => k?.value !== e) : [...m, { value: e, label: s }])(n), b = l?.filter((m) => c?.some((k) => k?.value === m?.value))?.map((m) => ({ ...m, isChecked: !0 }));
|
|
64
|
+
g(c?.length === l?.length), c?.length <= M && h(!1), Q(c), v(c), N(b, d), K(d), S?.();
|
|
65
|
+
return;
|
|
62
66
|
}
|
|
63
|
-
|
|
67
|
+
v(pe), S?.();
|
|
64
68
|
},
|
|
65
|
-
[
|
|
66
|
-
),
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
),
|
|
69
|
+
[M, l, S, a, n, N, d]
|
|
70
|
+
), re = p(() => {
|
|
71
|
+
h(!1), g((e) => {
|
|
72
|
+
const s = !e;
|
|
73
|
+
return v(
|
|
74
|
+
s ? l?.map((w) => ({ value: w?.value, label: w?.label })) : []
|
|
75
|
+
), s;
|
|
72
76
|
});
|
|
73
|
-
}, [l]),
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
const e = l?.filter((
|
|
77
|
-
|
|
78
|
-
}, [l,
|
|
79
|
-
|
|
80
|
-
}, [
|
|
81
|
-
|
|
82
|
-
}, [
|
|
83
|
-
e.stopPropagation(),
|
|
84
|
-
}, []),
|
|
85
|
-
() =>
|
|
86
|
-
[
|
|
87
|
-
),
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
|
|
77
|
+
}, [l]), ae = p(() => {
|
|
78
|
+
v([]), g(!1), L?.();
|
|
79
|
+
}, [L]), oe = p(() => {
|
|
80
|
+
const e = l?.filter((s) => r?.some((w) => w?.value === s?.value))?.map((s) => ({ ...s, isChecked: !0 }));
|
|
81
|
+
N(e, d), Q(r), K(d), D(!1);
|
|
82
|
+
}, [l, r, d, N]), de = p(() => {
|
|
83
|
+
v(n), g(n?.length === l?.length), h(!1), D(!1), R("");
|
|
84
|
+
}, [n, l.length]), ce = p(() => {
|
|
85
|
+
x || (D((e) => !e), h(!1));
|
|
86
|
+
}, [x]), he = p((e) => {
|
|
87
|
+
e.stopPropagation(), h((s) => !s);
|
|
88
|
+
}, []), me = T(
|
|
89
|
+
() => d !== W && r?.length > 0 ? !1 : Ee(r, n, a),
|
|
90
|
+
[r, n, a, d, W]
|
|
91
|
+
), G = A ? r : n, ge = a && G?.length === l?.length && l?.length > 0, ie = T(() => !a && r.length > 0 && r.length < l.length, [r, l.length, a]);
|
|
92
|
+
return /* @__PURE__ */ i("div", { className: `${t["ckds-wrapper"]} ${x ? t["ckds-wrapper-disabled"] : ""}`, style: { width: _ }, children: [
|
|
93
|
+
$ && !a && /* @__PURE__ */ i(
|
|
90
94
|
"span",
|
|
91
95
|
{
|
|
92
|
-
className:
|
|
96
|
+
className: f(
|
|
93
97
|
"ckds-body-xs-med",
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
t["label-wrapper"],
|
|
99
|
+
ee ?? ""
|
|
96
100
|
),
|
|
97
101
|
children: [
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
$,
|
|
103
|
+
U && /* @__PURE__ */ o("span", { className: t.required, children: " *" })
|
|
100
104
|
]
|
|
101
105
|
}
|
|
102
106
|
),
|
|
103
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ i("div", { className: t["trigger-wrapper"], ref: I, children: [
|
|
104
108
|
/* @__PURE__ */ o(
|
|
105
|
-
|
|
109
|
+
ke,
|
|
106
110
|
{
|
|
107
|
-
open:
|
|
108
|
-
selected:
|
|
109
|
-
placeholder:
|
|
110
|
-
showMenu:
|
|
111
|
-
isAllSelected:
|
|
112
|
-
selectAllLabel:
|
|
113
|
-
requireSelection:
|
|
114
|
-
onToggleOpen:
|
|
115
|
-
onToggleMenu:
|
|
116
|
-
onRemove:
|
|
117
|
-
classNames:
|
|
118
|
-
maxChips:
|
|
111
|
+
open: A,
|
|
112
|
+
selected: G,
|
|
113
|
+
placeholder: V,
|
|
114
|
+
showMenu: se,
|
|
115
|
+
isAllSelected: ge,
|
|
116
|
+
selectAllLabel: j,
|
|
117
|
+
requireSelection: a,
|
|
118
|
+
onToggleOpen: ce,
|
|
119
|
+
onToggleMenu: he,
|
|
120
|
+
onRemove: P,
|
|
121
|
+
classNames: C,
|
|
122
|
+
maxChips: M
|
|
119
123
|
}
|
|
120
124
|
),
|
|
121
|
-
|
|
125
|
+
y && !a && /* @__PURE__ */ o(
|
|
122
126
|
"div",
|
|
123
127
|
{
|
|
124
|
-
className:
|
|
128
|
+
className: f(
|
|
125
129
|
"ckds-body-xs-reg",
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
t["helper-text"],
|
|
131
|
+
le ?? ""
|
|
128
132
|
),
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */ o(
|
|
133
|
+
children: /* @__PURE__ */ i(fe, { children: [
|
|
134
|
+
/* @__PURE__ */ o(we, { width: "12", height: "12" }),
|
|
131
135
|
" ",
|
|
132
|
-
|
|
136
|
+
y
|
|
133
137
|
] })
|
|
134
138
|
}
|
|
135
139
|
),
|
|
136
|
-
|
|
140
|
+
A && /* @__PURE__ */ i("div", { className: f(
|
|
141
|
+
t.dropdown,
|
|
142
|
+
t[`dropdown-align-${ne}`],
|
|
143
|
+
z === "up" ? t["dropdown-up"] : "",
|
|
144
|
+
y && z === "down" ? t["dropdown-helper"] : "",
|
|
145
|
+
y && z === "up" ? t["dropdown-helper-up"] : ""
|
|
146
|
+
), children: [
|
|
137
147
|
/* @__PURE__ */ o(
|
|
138
|
-
|
|
148
|
+
ve,
|
|
139
149
|
{
|
|
140
150
|
size: "medium",
|
|
141
|
-
value:
|
|
142
|
-
placeholder:
|
|
143
|
-
onChange:
|
|
144
|
-
onClear: () =>
|
|
151
|
+
value: E,
|
|
152
|
+
placeholder: X,
|
|
153
|
+
onChange: R,
|
|
154
|
+
onClear: () => R(""),
|
|
145
155
|
wrapperClassName: "",
|
|
146
156
|
inputClassName: ""
|
|
147
157
|
}
|
|
148
158
|
),
|
|
149
159
|
/* @__PURE__ */ o(
|
|
150
|
-
|
|
160
|
+
Ne,
|
|
151
161
|
{
|
|
152
|
-
totalResults:
|
|
153
|
-
exclude:
|
|
154
|
-
setExclude:
|
|
155
|
-
isToggleDisable:
|
|
156
|
-
showExcludeBtn:
|
|
157
|
-
hideExclude:
|
|
162
|
+
totalResults: B?.length,
|
|
163
|
+
exclude: d,
|
|
164
|
+
setExclude: Y,
|
|
165
|
+
isToggleDisable: r?.length === 0,
|
|
166
|
+
showExcludeBtn: Z,
|
|
167
|
+
hideExclude: a,
|
|
168
|
+
selectedCount: r?.length
|
|
158
169
|
}
|
|
159
170
|
),
|
|
160
|
-
/* @__PURE__ */ o("div", { className:
|
|
161
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ o("div", { className: t.divider }),
|
|
172
|
+
/* @__PURE__ */ i(
|
|
162
173
|
"div",
|
|
163
174
|
{
|
|
164
|
-
className:
|
|
165
|
-
|
|
166
|
-
|
|
175
|
+
className: f(
|
|
176
|
+
t["ckds-options-list"],
|
|
177
|
+
C?.optionsListWrapperClass ?? ""
|
|
167
178
|
),
|
|
168
179
|
children: [
|
|
169
|
-
|
|
180
|
+
E.length === 0 && /* @__PURE__ */ i(
|
|
170
181
|
"div",
|
|
171
182
|
{
|
|
172
|
-
className:
|
|
173
|
-
|
|
174
|
-
|
|
183
|
+
className: f(
|
|
184
|
+
t["option-row"],
|
|
185
|
+
C?.optionRowClass ?? ""
|
|
175
186
|
),
|
|
176
|
-
onClick:
|
|
187
|
+
onClick: re,
|
|
177
188
|
children: [
|
|
178
|
-
/* @__PURE__ */ o(
|
|
189
|
+
/* @__PURE__ */ o(be, { checked: te, size: "md", indeterminate: ie }),
|
|
179
190
|
/* @__PURE__ */ o(
|
|
180
191
|
"span",
|
|
181
192
|
{
|
|
182
|
-
className:
|
|
193
|
+
className: f(
|
|
183
194
|
"ckds-body-sm-reg",
|
|
184
|
-
|
|
195
|
+
t["option-label"]
|
|
185
196
|
),
|
|
186
|
-
children:
|
|
197
|
+
children: j
|
|
187
198
|
}
|
|
188
199
|
)
|
|
189
200
|
]
|
|
190
201
|
}
|
|
191
202
|
),
|
|
192
|
-
|
|
203
|
+
B?.length === 0 ? /* @__PURE__ */ o(
|
|
193
204
|
"span",
|
|
194
205
|
{
|
|
195
|
-
className:
|
|
206
|
+
className: f(
|
|
196
207
|
"ckds-body-sm-reg",
|
|
197
|
-
|
|
208
|
+
t["no-results"]
|
|
198
209
|
),
|
|
199
210
|
children: "No results found"
|
|
200
211
|
}
|
|
201
|
-
) :
|
|
202
|
-
|
|
212
|
+
) : B?.map((e) => /* @__PURE__ */ o(
|
|
213
|
+
ye,
|
|
203
214
|
{
|
|
204
215
|
value: e?.value,
|
|
205
216
|
label: e?.label,
|
|
206
|
-
checked:
|
|
207
|
-
(
|
|
217
|
+
checked: r?.some(
|
|
218
|
+
(s) => s?.value === e?.value
|
|
208
219
|
),
|
|
209
|
-
onToggle:
|
|
210
|
-
classNames:
|
|
220
|
+
onToggle: P,
|
|
221
|
+
classNames: C
|
|
211
222
|
},
|
|
212
223
|
e?.value
|
|
213
224
|
))
|
|
@@ -215,15 +226,15 @@ function ze({
|
|
|
215
226
|
}
|
|
216
227
|
),
|
|
217
228
|
/* @__PURE__ */ o(
|
|
218
|
-
|
|
229
|
+
Ae,
|
|
219
230
|
{
|
|
220
|
-
onClear:
|
|
221
|
-
onCancel:
|
|
222
|
-
onApply:
|
|
223
|
-
classNames:
|
|
224
|
-
isClearDisabled:
|
|
225
|
-
isApplyDisabled:
|
|
226
|
-
hideClear:
|
|
231
|
+
onClear: ae,
|
|
232
|
+
onCancel: de,
|
|
233
|
+
onApply: oe,
|
|
234
|
+
classNames: C,
|
|
235
|
+
isClearDisabled: r?.length === 0,
|
|
236
|
+
isApplyDisabled: me,
|
|
237
|
+
hideClear: a
|
|
227
238
|
}
|
|
228
239
|
)
|
|
229
240
|
] })
|
|
@@ -231,5 +242,5 @@ function ze({
|
|
|
231
242
|
] });
|
|
232
243
|
}
|
|
233
244
|
export {
|
|
234
|
-
|
|
245
|
+
Pe as MultiSelect
|
|
235
246
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { s } from "../../../styles.module-
|
|
3
|
+
import { s } from "../../../styles.module-yNDMDNO-.js";
|
|
4
4
|
const m = ({
|
|
5
5
|
children: o
|
|
6
6
|
}) => /* @__PURE__ */ t("div", { className: s["ckds-dialog-content"], children: o });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as n, Fragment as C } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { s as a } from "../../../styles.module-
|
|
3
|
+
import { s as a } from "../../../styles.module-yNDMDNO-.js";
|
|
4
4
|
import { BUTTON_LAYOUT as i, noop as f, BUTTON_LABEL as k } from "../constant/popupAndDialog.js";
|
|
5
5
|
import { CKButton as r } from "../../CKButton/index.js";
|
|
6
6
|
const T = ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
|
-
import { s } from "../../../styles.module-
|
|
3
|
+
import { s } from "../../../styles.module-yNDMDNO-.js";
|
|
4
4
|
const i = (e) => /* @__PURE__ */ t.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M15 5L5.00068 14.9993M14.9993 15L5 5.00071", stroke: "#2B2B2B", strokeLinecap: "round", strokeLinejoin: "round" })), m = ({
|
|
5
5
|
title: e,
|
|
6
6
|
children: r,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as l } from "react";
|
|
3
|
-
import { s as t } from "../../styles.module-
|
|
3
|
+
import { s as t } from "../../styles.module-yNDMDNO-.js";
|
|
4
4
|
import { TYPE as u } from "./constant/popupAndDialog.js";
|
|
5
5
|
const E = ({
|
|
6
6
|
open: a,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Search/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzD,wBAAgB,MAAM,CAAC,EACrB,KAAU,EACV,WAAsB,EACtB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,YAAmB,EACnB,gBAAqB,EACrB,cAAmB,EACnB,SAAiB,EACjB,SAAS,EACT,EAAE,EACF,IAAI,EACJ,IAAe,EACf,UAAc,GACf,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Search/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzD,wBAAgB,MAAM,CAAC,EACrB,KAAU,EACV,WAAsB,EACtB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,YAAmB,EACnB,gBAAqB,EACrB,cAAmB,EACnB,SAAiB,EACjB,SAAS,EACT,EAAE,EACF,IAAI,EACJ,IAAe,EACf,UAAc,GACf,EAAE,WAAW,2CAuHb"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as K, jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as K, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as f, useEffect as l, useMemo as L } from "react";
|
|
3
3
|
import { S as R } from "../../search-B_cup-NN.js";
|
|
4
4
|
import { S as V } from "../../cancel-BAgTEOGD.js";
|
|
5
|
-
import { SMALL as A, MEDIUM as
|
|
6
|
-
import { mergeClasses as
|
|
7
|
-
import '../../assets/index-BoQKDmZt.css';const
|
|
5
|
+
import { SMALL as A, MEDIUM as P } from "../../constants.js";
|
|
6
|
+
import { mergeClasses as D } from "../../utils/mergeClasses.js";
|
|
7
|
+
import '../../assets/index-BoQKDmZt.css';const t = {
|
|
8
8
|
"ckds-search-wrapper": "_ckds-search-wrapper_mt85e_1",
|
|
9
9
|
"search-wrapper-small": "_search-wrapper-small_mt85e_35",
|
|
10
10
|
"search-wrapper-medium": "_search-wrapper-medium_mt85e_38",
|
|
@@ -14,86 +14,88 @@ import '../../assets/index-BoQKDmZt.css';const a = {
|
|
|
14
14
|
"search-input": "_search-input_mt85e_66",
|
|
15
15
|
"search-clear": "_search-clear_mt85e_85"
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
value:
|
|
19
|
-
placeholder:
|
|
20
|
-
onChange:
|
|
21
|
-
onClear:
|
|
22
|
-
onSearch:
|
|
23
|
-
disabled:
|
|
24
|
-
showClearBtn:
|
|
25
|
-
wrapperClassName:
|
|
26
|
-
inputClassName:
|
|
27
|
-
autoFocus:
|
|
28
|
-
maxLength:
|
|
29
|
-
id:
|
|
30
|
-
name:
|
|
31
|
-
size:
|
|
32
|
-
debounceMs:
|
|
17
|
+
function O({
|
|
18
|
+
value: p = "",
|
|
19
|
+
placeholder: k = "Search",
|
|
20
|
+
onChange: i,
|
|
21
|
+
onClear: C,
|
|
22
|
+
onSearch: b,
|
|
23
|
+
disabled: a = !1,
|
|
24
|
+
showClearBtn: v = !0,
|
|
25
|
+
wrapperClassName: x = "",
|
|
26
|
+
inputClassName: T = "",
|
|
27
|
+
autoFocus: _ = !1,
|
|
28
|
+
maxLength: I,
|
|
29
|
+
id: M,
|
|
30
|
+
name: N,
|
|
31
|
+
size: n = "medium",
|
|
32
|
+
debounceMs: d = 0
|
|
33
33
|
}) {
|
|
34
|
-
const [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
const [w, g] = y(!1), [s, m] = y(p), o = f(null), r = f(null), h = f(!1);
|
|
35
|
+
l(() => {
|
|
36
|
+
m(p);
|
|
37
|
+
}, [p]), l(() => {
|
|
38
|
+
_ && o.current?.focus();
|
|
39
|
+
}, [_]), l(() => {
|
|
40
|
+
a ? h.current = w : h.current && s && (o.current?.focus(), h.current = !1);
|
|
41
|
+
}, [a]);
|
|
42
|
+
const u = L(() => n === A ? "10" : n === P ? "14" : "18", [n]), E = (e) => {
|
|
43
|
+
d > 0 ? (r.current && clearTimeout(r.current), r.current = setTimeout(() => i?.(e), d)) : i?.(e);
|
|
42
44
|
};
|
|
43
|
-
|
|
45
|
+
l(() => () => {
|
|
44
46
|
r.current && clearTimeout(r.current);
|
|
45
47
|
}, []);
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
48
|
+
const F = (e) => {
|
|
49
|
+
const S = e.target.value;
|
|
50
|
+
m(S), E(S);
|
|
49
51
|
}, j = (e) => {
|
|
50
|
-
e.preventDefault(), r.current && clearTimeout(r.current),
|
|
51
|
-
},
|
|
52
|
-
e.stopPropagation(), e.key === "Enter" &&
|
|
52
|
+
e.preventDefault(), r.current && clearTimeout(r.current), m(""), i?.(""), C?.(), o.current?.focus();
|
|
53
|
+
}, B = (e) => {
|
|
54
|
+
e.stopPropagation(), e.key === "Enter" && b?.(s);
|
|
53
55
|
};
|
|
54
56
|
return /* @__PURE__ */ K(
|
|
55
57
|
"div",
|
|
56
58
|
{
|
|
57
|
-
className:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
className: D(
|
|
60
|
+
t["ckds-search-wrapper"],
|
|
61
|
+
t[`search-wrapper-${n}`],
|
|
62
|
+
a ? t["search-wrapper--disabled"] : "",
|
|
63
|
+
x
|
|
62
64
|
),
|
|
63
65
|
children: [
|
|
64
|
-
!
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
!w && !s && /* @__PURE__ */ c("span", { className: t["search-icon"], children: /* @__PURE__ */ c(R, { width: u, height: u }) }),
|
|
67
|
+
/* @__PURE__ */ c(
|
|
66
68
|
"input",
|
|
67
69
|
{
|
|
68
|
-
ref:
|
|
69
|
-
id:
|
|
70
|
-
name:
|
|
70
|
+
ref: o,
|
|
71
|
+
id: M,
|
|
72
|
+
name: N,
|
|
71
73
|
type: "text",
|
|
72
|
-
className:
|
|
74
|
+
className: D(
|
|
73
75
|
"ckds-body-sm-reg",
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
t["search-input"],
|
|
77
|
+
T
|
|
76
78
|
),
|
|
77
|
-
value:
|
|
78
|
-
placeholder:
|
|
79
|
-
disabled:
|
|
80
|
-
maxLength:
|
|
81
|
-
onChange:
|
|
82
|
-
onKeyDown:
|
|
83
|
-
onFocus: () =>
|
|
84
|
-
onBlur: () =>
|
|
79
|
+
value: s,
|
|
80
|
+
placeholder: k,
|
|
81
|
+
disabled: a,
|
|
82
|
+
maxLength: I,
|
|
83
|
+
onChange: F,
|
|
84
|
+
onKeyDown: B,
|
|
85
|
+
onFocus: () => g(!0),
|
|
86
|
+
onBlur: () => g(!1)
|
|
85
87
|
}
|
|
86
88
|
),
|
|
87
|
-
|
|
89
|
+
v && s && !a && /* @__PURE__ */ c(
|
|
88
90
|
"button",
|
|
89
91
|
{
|
|
90
92
|
type: "button",
|
|
91
|
-
className:
|
|
93
|
+
className: t["search-clear"],
|
|
92
94
|
onMouseDown: (e) => e.preventDefault(),
|
|
93
95
|
onClick: j,
|
|
94
96
|
"aria-label": "Clear search",
|
|
95
97
|
tabIndex: 0,
|
|
96
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ c(V, { width: u, height: u })
|
|
97
99
|
}
|
|
98
100
|
)
|
|
99
101
|
]
|
|
@@ -101,5 +103,5 @@ function J({
|
|
|
101
103
|
);
|
|
102
104
|
}
|
|
103
105
|
export {
|
|
104
|
-
|
|
106
|
+
O as Search
|
|
105
107
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { D as v } from "../../../DropdownFooter-
|
|
2
|
+
import { D as v } from "../../../DropdownFooter-CsDll1Tj.js";
|
|
3
3
|
import "../../Avatar/index.js";
|
|
4
4
|
import "../../CKButton/index.js";
|
|
5
5
|
import "../../IconButton/index.js";
|
|
6
6
|
import "../../Stepper/index.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import "../../../index-
|
|
9
|
-
import '../../../assets/theme-gJHYUL9y.css';import '../../../assets/styles-DngCqCGW.css';import '../../../assets/styles-DLJzdWsF.css';import '../../../assets/styles-O-5pBCak.css';import '../../../assets/ReactToastify-
|
|
8
|
+
import "../../../index-BR6M9zUI.js";
|
|
9
|
+
import '../../../assets/theme-gJHYUL9y.css';import '../../../assets/styles-DngCqCGW.css';import '../../../assets/styles-DLJzdWsF.css';import '../../../assets/styles-O-5pBCak.css';import '../../../assets/ReactToastify-GNLSjkBZ.css';/* empty css */
|
|
10
10
|
import "../../GroupedMultiSelect/_helpers/TagContent.js";
|
|
11
11
|
import "../../GroupedMultiSelect/_helpers/OptionRow.js";
|
|
12
12
|
import "../../GroupedSingleSelect/_helpers/OptionRow.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/SingleSelectDropdown/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/SingleSelectDropdown/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAS7E,wBAAgB,oBAAoB,CAAC,EACnC,OAAO,EACP,KAAY,EACZ,QAAQ,EACR,KAAK,EACL,WAAsB,EACtB,UAAU,EACV,QAAgB,EAChB,UAAiB,EACjB,eAAsB,EACtB,SAAc,EACd,SAAiB,EACjB,KAAU,GACX,EAAE,iBAAiB,2CAyKnB"}
|