@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.
Files changed (97) hide show
  1. package/dist/DropdownFooter-CsDll1Tj.js +96 -0
  2. package/dist/{Grow-D08Iq1uH.js → Grow-wzNsNKt2.js} +41 -41
  3. package/dist/IconSlot-DvUwY6Do.js +33 -0
  4. package/dist/{OptionList-DN1xZbnV.js → OptionList-BM4AleXV.js} +361 -290
  5. package/dist/{Select-Cw96VEHD.js → Select-CiuwMSD7.js} +2366 -2427
  6. package/dist/assets/DropdownFooter-JrU15UnN.css +1 -0
  7. package/dist/assets/IconSlot-BWv5PQN_.css +1 -0
  8. package/dist/assets/ReactToastify-GNLSjkBZ.css +1 -0
  9. package/dist/assets/{ToastContent-PGkBxPUW.css → ToastContent-DpF5zCks.css} +1 -1
  10. package/dist/assets/index-0R9p-l95.css +1 -0
  11. package/dist/assets/index-B3yBTtVQ.css +1 -0
  12. package/dist/assets/index-BbJZjGLb.css +1 -0
  13. package/dist/assets/{main-Dv8QUU_o.css → main-3OqLSdPm.css} +1 -1
  14. package/dist/assets/{styles-Chhklrps.css → styles-C5uYY4fL.css} +1 -1
  15. package/dist/assets/styles-CEyiQgVQ.css +1 -0
  16. package/dist/components/CKButton/_helper/ComboLayout.js +1 -1
  17. package/dist/components/CKButton/_helper/IconSlot.js +1 -1
  18. package/dist/components/CKButton/_helper/StandardLayout.js +1 -1
  19. package/dist/components/CKButton/index.js +1 -1
  20. package/dist/components/DateRangePicker/DateRangePicker.js +703 -680
  21. package/dist/components/EmptyState/index.js +7 -7
  22. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  23. package/dist/components/FusionChart/_config/builders.js +207 -192
  24. package/dist/components/FusionChart/_config/helpers.d.ts +3 -0
  25. package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
  26. package/dist/components/FusionChart/_config/helpers.js +61 -45
  27. package/dist/components/FusionChart/_types/fusionChart.types.d.ts +2 -0
  28. package/dist/components/FusionChart/_types/fusionChart.types.d.ts.map +1 -1
  29. package/dist/components/FusionChart/_utils/chartHelpers.js +1 -1
  30. package/dist/components/FusionChart/index.d.ts.map +1 -1
  31. package/dist/components/FusionChart/index.js +163 -130
  32. package/dist/components/MenuOptions/_utils/computeMenuPosition.js +1 -1
  33. package/dist/components/MenuOptions/_utils/computeSubmenuPosition.js +1 -1
  34. package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +30 -30
  35. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +3 -1
  36. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
  37. package/dist/components/MultiSelect/SimpleMultiSelect.js +150 -136
  38. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  39. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  40. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
  41. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  42. package/dist/components/MultiSelect/_helpers/SearchResult.d.ts +1 -1
  43. package/dist/components/MultiSelect/_helpers/SearchResult.d.ts.map +1 -1
  44. package/dist/components/MultiSelect/_helpers/SearchResult.js +31 -21
  45. package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
  46. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
  47. package/dist/components/MultiSelect/_helpers/TriggerButton.js +95 -74
  48. package/dist/components/MultiSelect/_types/type.d.ts +6 -2
  49. package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
  50. package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts +18 -0
  51. package/dist/components/MultiSelect/_utils/useDropdownDirection.d.ts.map +1 -0
  52. package/dist/components/MultiSelect/_utils/useDropdownDirection.js +23 -0
  53. package/dist/components/MultiSelect/index.d.ts +1 -1
  54. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  55. package/dist/components/MultiSelect/index.js +162 -151
  56. package/dist/components/PopupAndDialogBox/components/DialogContent.js +1 -1
  57. package/dist/components/PopupAndDialogBox/components/DialogFooter.js +1 -1
  58. package/dist/components/PopupAndDialogBox/components/DialogHeader.js +1 -1
  59. package/dist/components/PopupAndDialogBox/index.js +1 -1
  60. package/dist/components/Search/index.d.ts.map +1 -1
  61. package/dist/components/Search/index.js +63 -61
  62. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +3 -3
  63. package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
  64. package/dist/components/SingleSelectDropdown/index.js +83 -78
  65. package/dist/components/Table/_helpers/ColumnManager/index.js +3 -3
  66. package/dist/components/Table/_helpers/GroupedHeader/index.js +1 -1
  67. package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
  68. package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.js +133 -142
  69. package/dist/components/Table/_helpers/TableFilterModal/index.js +1 -1
  70. package/dist/components/Table/_helpers/TableRows.js +1 -1
  71. package/dist/components/Table/index.js +2 -2
  72. package/dist/components/TextField/index.js +331 -328
  73. package/dist/components/Toast/_helper/ToastContent.js +25 -25
  74. package/dist/components/Toast/_helper/ToastProvider.js +9 -9
  75. package/dist/components/Toast/_hooks/useToast.js +1 -1
  76. package/dist/components/Tooltip/index.js +772 -697
  77. package/dist/createSimplePaletteValueFilter-BqxST_wX.js +24 -0
  78. package/dist/index-BR6M9zUI.js +382 -0
  79. package/dist/{index-f7TB87Mf.js → index-Bcvmezbu.js} +23 -3
  80. package/dist/main.js +1 -1
  81. package/dist/styles.module-yIHBMSTk.js +53 -0
  82. package/dist/styles.module-yNDMDNO-.js +14 -0
  83. package/dist/{useSlot-ylt7_lTY.js → useSlot-BiMlGawc.js} +656 -623
  84. package/package.json +3 -3
  85. package/dist/DropdownFooter-Dm6aLDx8.js +0 -89
  86. package/dist/IconSlot-CPQsGPB-.js +0 -33
  87. package/dist/assets/DropdownFooter-DjdPf69A.css +0 -1
  88. package/dist/assets/IconSlot-D8WWEHKb.css +0 -1
  89. package/dist/assets/ReactToastify-tlSLHgLC.css +0 -1
  90. package/dist/assets/index-B81zpOpq.css +0 -1
  91. package/dist/assets/index-DNhNBxL9.css +0 -1
  92. package/dist/assets/index-YHUWVH17.css +0 -1
  93. package/dist/assets/styles-Bj-7zn37.css +0 -1
  94. package/dist/contains-kLLEGdNH.js +0 -41
  95. package/dist/index-C8cPPHJD.js +0 -1196
  96. package/dist/styles.module-BZaUJMlf.js +0 -14
  97. package/dist/styles.module-DakCndIP.js +0 -42
@@ -1,213 +1,224 @@
1
- import { jsxs as h, jsx as o, Fragment as me } from "react/jsx-runtime";
2
- import { useState as m, useRef as ge, useEffect as K, useMemo as S, useCallback as g } from "react";
3
- import { s as a } from "../../styles.module-DakCndIP.js";
4
- import { Search as ie } from "../Search/index.js";
5
- import { S as pe } from "../../info-icon-ooYw3va_.js";
6
- import { CKCheckbox as fe } from "../CKCheckbox/index.js";
7
- import ue from "./_helpers/TriggerButton.js";
8
- import Ce from "./_helpers/OptionRow.js";
9
- import ve from "./_helpers/SearchResult.js";
10
- import we from "./_helpers/DropdownFooter.js";
11
- import { getInitialSelected as P } from "./_utils/getInitialSelected.js";
12
- import { filterOptions as be } from "./_utils/filterOptions.js";
13
- import { computeApplyDisabled as ye } from "./_utils/computeApplyDisabled.js";
14
- import { mergeClasses as i } from "../../utils/mergeClasses.js";
15
- function ze({
16
- label: D,
17
- helperText: k,
18
- required: G,
19
- placeholder: H = "Choose parameter",
20
- searchPlaceholder: J = "Search",
21
- selectAllLabel: T = "Select all",
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: x = [],
24
- onApply: B,
25
- exclude: c,
26
- setExclude: U,
27
- onSelect: j,
28
- onClear: z,
29
- classNames: p = {},
30
- showExcludeBtn: V,
31
- requireSelection: r = !1,
32
- width: X = "",
33
- disabled: A = !1
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: Y, helperClass: Z } = p, [N, v] = m(!1), [w, b] = m(""), [s, F] = m(
36
- () => P(x)
37
- ), [n, C] = m(
38
- () => P(x)
39
- ), [L, _] = m(c), [q, f] = m(!1), [ee, d] = m(!1), E = ge(null);
40
- K(() => {
41
- f(s?.length === l?.length);
42
- }, []), K(() => {
43
- const e = (t) => {
44
- E.current && !E.current.contains(t.target) && (C(s), f(s?.length === l?.length), v(!1), d(!1), b(""));
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
- }, [s, l.length]);
48
- const R = S(
49
- () => be(l, w),
50
- [l, w]
51
- ), I = 2, Q = g(
52
- (e, t, u, he) => {
53
- u || d(!1);
54
- const $ = (y) => {
55
- const M = y?.some((O) => O?.value === e) ? y?.filter((O) => O?.value !== e) : [...y, { value: e, label: t }];
56
- return f(M?.length === l?.length), M?.length <= I && d(!1), M;
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 (he) {
59
- if (r && s?.length === 1 && s[0]?.value === e)
60
+ if (ue) {
61
+ if (a && n?.length === 1 && n[0]?.value === e)
60
62
  return;
61
- F($);
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
- C($), j?.();
67
+ v(pe), S?.();
64
68
  },
65
- [I, l.length, j, r, s]
66
- ), le = g(() => {
67
- d(!1), f((e) => {
68
- const t = !e;
69
- return C(
70
- t ? l?.map((u) => ({ value: u?.value, label: u?.label })) : []
71
- ), t;
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]), te = g(() => {
74
- C([]), f(!1), z?.();
75
- }, [z]), se = g(() => {
76
- const e = l?.filter((t) => n?.some((u) => u?.value === t?.value))?.map((t) => ({ ...t, isChecked: !0 }));
77
- B(e, c), F(n), _(c), v(!1);
78
- }, [l, n, c, B]), ne = g(() => {
79
- C(s), f(s?.length === l?.length), d(!1), v(!1), b("");
80
- }, [s, l.length]), ae = g(() => {
81
- A || (v((e) => !e), d(!1));
82
- }, [A]), re = g((e) => {
83
- e.stopPropagation(), d((t) => !t);
84
- }, []), oe = S(
85
- () => c !== L && n?.length > 0 ? !1 : ye(n, s, r),
86
- [n, s, r, c, L]
87
- ), W = N ? n : s, ce = r && W?.length === l?.length && l?.length > 0, de = S(() => !r && n.length > 0 && n.length < l.length, [n, l.length, r]);
88
- return /* @__PURE__ */ h("div", { className: `${a["ckds-wrapper"]} ${A ? a["ckds-wrapper-disabled"] : ""}`, style: { width: X }, children: [
89
- D && !r && /* @__PURE__ */ h(
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: i(
96
+ className: f(
93
97
  "ckds-body-xs-med",
94
- a["label-wrapper"],
95
- Y ?? ""
98
+ t["label-wrapper"],
99
+ ee ?? ""
96
100
  ),
97
101
  children: [
98
- D,
99
- G && /* @__PURE__ */ o("span", { className: a.required, children: " *" })
102
+ $,
103
+ U && /* @__PURE__ */ o("span", { className: t.required, children: " *" })
100
104
  ]
101
105
  }
102
106
  ),
103
- /* @__PURE__ */ h("div", { className: a["trigger-wrapper"], ref: E, children: [
107
+ /* @__PURE__ */ i("div", { className: t["trigger-wrapper"], ref: I, children: [
104
108
  /* @__PURE__ */ o(
105
- ue,
109
+ ke,
106
110
  {
107
- open: N,
108
- selected: W,
109
- placeholder: H,
110
- showMenu: ee,
111
- isAllSelected: ce,
112
- selectAllLabel: T,
113
- requireSelection: r,
114
- onToggleOpen: ae,
115
- onToggleMenu: re,
116
- onRemove: Q,
117
- classNames: p,
118
- maxChips: I
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
- k && !r && /* @__PURE__ */ o(
125
+ y && !a && /* @__PURE__ */ o(
122
126
  "div",
123
127
  {
124
- className: i(
128
+ className: f(
125
129
  "ckds-body-xs-reg",
126
- a["helper-text"],
127
- Z ?? ""
130
+ t["helper-text"],
131
+ le ?? ""
128
132
  ),
129
- children: /* @__PURE__ */ h(me, { children: [
130
- /* @__PURE__ */ o(pe, { width: "12", height: "12" }),
133
+ children: /* @__PURE__ */ i(fe, { children: [
134
+ /* @__PURE__ */ o(we, { width: "12", height: "12" }),
131
135
  " ",
132
- k
136
+ y
133
137
  ] })
134
138
  }
135
139
  ),
136
- N && /* @__PURE__ */ h("div", { className: i(a.dropdown, k ? a["dropdown-helper"] : ""), children: [
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
- ie,
148
+ ve,
139
149
  {
140
150
  size: "medium",
141
- value: w,
142
- placeholder: J,
143
- onChange: b,
144
- onClear: () => b(""),
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
- ve,
160
+ Ne,
151
161
  {
152
- totalResults: R?.length,
153
- exclude: c,
154
- setExclude: U,
155
- isToggleDisable: n?.length === 0,
156
- showExcludeBtn: V,
157
- hideExclude: r
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: a.divider }),
161
- /* @__PURE__ */ h(
171
+ /* @__PURE__ */ o("div", { className: t.divider }),
172
+ /* @__PURE__ */ i(
162
173
  "div",
163
174
  {
164
- className: i(
165
- a["ckds-options-list"],
166
- p?.optionsListWrapperClass ?? ""
175
+ className: f(
176
+ t["ckds-options-list"],
177
+ C?.optionsListWrapperClass ?? ""
167
178
  ),
168
179
  children: [
169
- w.length === 0 && /* @__PURE__ */ h(
180
+ E.length === 0 && /* @__PURE__ */ i(
170
181
  "div",
171
182
  {
172
- className: i(
173
- a["option-row"],
174
- p?.optionRowClass ?? ""
183
+ className: f(
184
+ t["option-row"],
185
+ C?.optionRowClass ?? ""
175
186
  ),
176
- onClick: le,
187
+ onClick: re,
177
188
  children: [
178
- /* @__PURE__ */ o(fe, { checked: q, size: "md", indeterminate: de }),
189
+ /* @__PURE__ */ o(be, { checked: te, size: "md", indeterminate: ie }),
179
190
  /* @__PURE__ */ o(
180
191
  "span",
181
192
  {
182
- className: i(
193
+ className: f(
183
194
  "ckds-body-sm-reg",
184
- a["option-label"]
195
+ t["option-label"]
185
196
  ),
186
- children: T
197
+ children: j
187
198
  }
188
199
  )
189
200
  ]
190
201
  }
191
202
  ),
192
- R?.length === 0 ? /* @__PURE__ */ o(
203
+ B?.length === 0 ? /* @__PURE__ */ o(
193
204
  "span",
194
205
  {
195
- className: i(
206
+ className: f(
196
207
  "ckds-body-sm-reg",
197
- a["no-results"]
208
+ t["no-results"]
198
209
  ),
199
210
  children: "No results found"
200
211
  }
201
- ) : R?.map((e) => /* @__PURE__ */ o(
202
- Ce,
212
+ ) : B?.map((e) => /* @__PURE__ */ o(
213
+ ye,
203
214
  {
204
215
  value: e?.value,
205
216
  label: e?.label,
206
- checked: n?.some(
207
- (t) => t?.value === e?.value
217
+ checked: r?.some(
218
+ (s) => s?.value === e?.value
208
219
  ),
209
- onToggle: Q,
210
- classNames: p
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
- we,
229
+ Ae,
219
230
  {
220
- onClear: te,
221
- onCancel: ne,
222
- onApply: se,
223
- classNames: p,
224
- isClearDisabled: n?.length === 0,
225
- isApplyDisabled: oe,
226
- hideClear: r
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
- ze as MultiSelect
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-BZaUJMlf.js";
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-BZaUJMlf.js";
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-BZaUJMlf.js";
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-BZaUJMlf.js";
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,2CA4Gb"}
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 t } from "react/jsx-runtime";
2
- import { useState as w, useRef as g, useEffect as m, useMemo as L } from "react";
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 B } from "../../constants.js";
6
- import { mergeClasses as S } from "../../utils/mergeClasses.js";
7
- import '../../assets/index-BoQKDmZt.css';const a = {
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 J({
18
- value: o = "",
19
- placeholder: y = "Search",
20
- onChange: u,
21
- onClear: b,
22
- onSearch: k,
23
- disabled: p = !1,
24
- showClearBtn: C = !0,
25
- wrapperClassName: D = "",
26
- inputClassName: v = "",
27
- autoFocus: h = !1,
28
- maxLength: x,
29
- id: T,
30
- name: I,
31
- size: s = "medium",
32
- debounceMs: f = 0
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 [M, _] = w(!1), [c, i] = w(o), l = g(null), r = g(null);
35
- m(() => {
36
- i(o);
37
- }, [o]), m(() => {
38
- h && l.current?.focus();
39
- }, [h]);
40
- const n = L(() => s === A ? "10" : s === B ? "14" : "18", [s]), N = (e) => {
41
- f > 0 ? (r.current && clearTimeout(r.current), r.current = setTimeout(() => u?.(e), f)) : u?.(e);
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
- m(() => () => {
45
+ l(() => () => {
44
46
  r.current && clearTimeout(r.current);
45
47
  }, []);
46
- const E = (e) => {
47
- const d = e.target.value;
48
- i(d), N(d);
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), i(""), u?.(""), b?.(), l.current?.focus();
51
- }, F = (e) => {
52
- e.stopPropagation(), e.key === "Enter" && k?.(c);
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: S(
58
- a["ckds-search-wrapper"],
59
- a[`search-wrapper-${s}`],
60
- p ? a["search-wrapper--disabled"] : "",
61
- D
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
- !M && !c && /* @__PURE__ */ t("span", { className: a["search-icon"], children: /* @__PURE__ */ t(R, { width: n, height: n }) }),
65
- /* @__PURE__ */ t(
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: l,
69
- id: T,
70
- name: I,
70
+ ref: o,
71
+ id: M,
72
+ name: N,
71
73
  type: "text",
72
- className: S(
74
+ className: D(
73
75
  "ckds-body-sm-reg",
74
- a["search-input"],
75
- v
76
+ t["search-input"],
77
+ T
76
78
  ),
77
- value: c,
78
- placeholder: y,
79
- disabled: p,
80
- maxLength: x,
81
- onChange: E,
82
- onKeyDown: F,
83
- onFocus: () => _(!0),
84
- onBlur: () => _(!1)
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
- C && c && !p && /* @__PURE__ */ t(
89
+ v && s && !a && /* @__PURE__ */ c(
88
90
  "button",
89
91
  {
90
92
  type: "button",
91
- className: a["search-clear"],
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__ */ t(V, { width: n, height: n })
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
- J as Search
106
+ O as Search
105
107
  };
@@ -1,12 +1,12 @@
1
1
  import "react/jsx-runtime";
2
- import { D as v } from "../../../DropdownFooter-Dm6aLDx8.js";
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-C8cPPHJD.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-tlSLHgLC.css';/* empty css */
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;AAO7E,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,2CAoKnB"}
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"}