@ck-ui/component-library 1.0.6 → 1.0.7

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 (51) hide show
  1. package/dist/DropdownFooter-B1d0HFxd.js +96 -0
  2. package/dist/assets/{DropdownFooter-tfY7sg47.css → DropdownFooter-CRxQRvLY.css} +1 -1
  3. package/dist/assets/{index-BpRKr5z7.css → index-31u7i502.css} +1 -1
  4. package/dist/assets/index-C8gvpfKZ.css +1 -0
  5. package/dist/assets/index-D5sFw3XA.css +1 -0
  6. package/dist/assets/styles-BATmGmYA.css +1 -0
  7. package/dist/assets/styles-DAqMiQ0N.css +1 -0
  8. package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
  9. package/dist/components/FusionChart/_config/builders.js +172 -145
  10. package/dist/components/FusionChart/_config/events.d.ts.map +1 -1
  11. package/dist/components/FusionChart/_config/events.js +44 -30
  12. package/dist/components/FusionChart/_config/helpers.d.ts +10 -0
  13. package/dist/components/FusionChart/_config/helpers.d.ts.map +1 -1
  14. package/dist/components/FusionChart/_config/helpers.js +6 -3
  15. package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
  16. package/dist/components/FusionChart/_helpers/doughnutHelper.js +63 -53
  17. package/dist/components/FusionChart/index.js +34 -34
  18. package/dist/components/IconButton/index.js +20 -20
  19. package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -1
  20. package/dist/components/MultiSelect/SimpleMultiSelect.js +30 -30
  21. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  22. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  23. package/dist/components/MultiSelect/_helpers/OverflowMenu.d.ts.map +1 -1
  24. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +5 -33
  25. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  26. package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
  27. package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
  28. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts +1 -1
  29. package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
  30. package/dist/components/MultiSelect/_helpers/TriggerButton.js +99 -73
  31. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  32. package/dist/components/MultiSelect/index.js +27 -27
  33. package/dist/components/Pagination/index.d.ts.map +1 -1
  34. package/dist/components/Pagination/index.js +101 -92
  35. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +2 -2
  36. package/dist/components/SingleSelectDropdown/index.js +2 -2
  37. package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts +7 -0
  38. package/dist/components/Table/_hooks/useOverlayScrollbar.d.ts.map +1 -0
  39. package/dist/components/Table/_hooks/useOverlayScrollbar.js +90 -0
  40. package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
  41. package/dist/components/Table/_utils/table.utils.js +32 -37
  42. package/dist/components/Table/index.d.ts.map +1 -1
  43. package/dist/components/Table/index.js +290 -273
  44. package/dist/styles.module-BJEFZA32.js +56 -0
  45. package/package.json +1 -1
  46. package/dist/DropdownFooter-B63OOZOS.js +0 -96
  47. package/dist/assets/index-DyCyrZSK.css +0 -1
  48. package/dist/assets/index-nXJu3Pq0.css +0 -1
  49. package/dist/assets/styles-DngCqCGW.css +0 -1
  50. package/dist/assets/styles-infyYXuZ.css +0 -1
  51. package/dist/styles.module-DlIBNC4w.js +0 -55
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as r, Fragment as ae } from "react/jsx-runtime";
2
2
  import { useState as v, useRef as ce, useEffect as de, useMemo as ie, useCallback as u } from "react";
3
- import { s as t } from "../../styles.module-DlIBNC4w.js";
3
+ import { s as t } from "../../styles.module-BJEFZA32.js";
4
4
  import { Search as ue } from "../Search/index.js";
5
5
  import { S as me } from "../../info-icon-ooYw3va_.js";
6
6
  import { CKCheckbox as he } from "../CKCheckbox/index.js";
@@ -14,14 +14,14 @@ import { useDropdownDirection as we } from "./_utils/useDropdownDirection.js";
14
14
  import { mergeClasses as m } from "../../utils/mergeClasses.js";
15
15
  function je({
16
16
  label: T,
17
- helperText: b,
17
+ helperText: k,
18
18
  required: q,
19
19
  placeholder: x = "Choose parameter",
20
20
  searchPlaceholder: B = "Search",
21
21
  selectAllLabel: j = "Select all",
22
22
  options: s,
23
23
  defaultSelected: F = [],
24
- onApply: k,
24
+ onApply: N,
25
25
  exclude: C,
26
26
  setExclude: K,
27
27
  onSelect: I,
@@ -29,37 +29,37 @@ function je({
29
29
  classNames: h = {},
30
30
  showExcludeBtn: P,
31
31
  width: $ = "",
32
- maxChips: N = 1
32
+ maxChips: y = 1
33
33
  }) {
34
- const { labelWrapperClass: G, helperClass: H } = h, [y, O] = v(!1), [R, D] = v(""), [n, L] = v(
34
+ const { labelWrapperClass: G, helperClass: H } = h, [O, R] = v(!1), [D, w] = v(""), [n, L] = v(
35
35
  () => W(F)
36
36
  ), [o, g] = v(
37
37
  () => W(F)
38
- ), [U, f] = v(!1), [V, c] = v(!1), M = ce(null), { vertical: z, horizontal: X } = we(M, y);
38
+ ), [U, f] = v(!1), [V, c] = v(!1), M = ce(null), { vertical: z, horizontal: X } = we(M, O);
39
39
  de(() => {
40
40
  const e = (l) => {
41
- M.current && !M.current.contains(l.target) && (g(n), f(n?.length === s?.length), O(!1), c(!1), D(""));
41
+ M.current && !M.current.contains(l.target) && (g(n), f(n?.length === s?.length), R(!1), c(!1), w(""));
42
42
  };
43
43
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
44
44
  }, [n, s.length]);
45
45
  const A = ie(
46
- () => Ce(s, R),
47
- [s, R]
46
+ () => Ce(s, D),
47
+ [s, D]
48
48
  ), Q = u(
49
49
  (e, l, p, ne) => {
50
50
  p || c(!1);
51
51
  const oe = (E) => {
52
- const a = E?.some((w) => w?.value === e) ? E?.filter((w) => w?.value !== e) : [...E, { value: e, label: l }];
53
- return f(a?.length === s?.length), a?.length <= N && c(!1), a;
52
+ const a = E?.some((S) => S?.value === e) ? E?.filter((S) => S?.value !== e) : [...E, { value: e, label: l }];
53
+ return f(a?.length === s?.length), a?.length <= y && c(!1), a;
54
54
  };
55
55
  if (ne) {
56
- const a = ((d) => d?.some((S) => S?.value === e) ? d?.filter((S) => S?.value !== e) : [...d, { value: e, label: l }])(n), w = s?.filter((d) => a?.some((S) => S?.value === d?.value))?.map((d) => ({ ...d, isChecked: !0 }));
57
- f(a?.length === s?.length), a?.length <= N && c(!1), L(a), g(a), k(w, C), I?.();
56
+ const a = ((d) => d?.some((b) => b?.value === e) ? d?.filter((b) => b?.value !== e) : [...d, { value: e, label: l }])(n), S = s?.filter((d) => a?.some((b) => b?.value === d?.value))?.map((d) => ({ ...d, isChecked: !0 }));
57
+ f(a?.length === s?.length), a?.length <= y && c(!1), L(a), g(a), N(S, C), I?.();
58
58
  return;
59
59
  }
60
60
  g(oe), I?.();
61
61
  },
62
- [s, I, k, C, n, N]
62
+ [s, I, N, C, n, y]
63
63
  ), Y = u(() => {
64
64
  c(!1), f((e) => {
65
65
  const l = !e;
@@ -71,14 +71,14 @@ function je({
71
71
  g([]), f(!1), J?.();
72
72
  }, [J]), _ = u(() => {
73
73
  const e = s?.filter((l) => o?.some((p) => p?.value === l?.value))?.map((l) => ({ ...l, isChecked: !0 }));
74
- k(e, C), L(o), O(!1);
75
- }, [s, o, C, k]), ee = u(() => {
76
- g(n), f(n?.length === s?.length), c(!1), O(!1), D("");
74
+ N(e, C), L(o), R(!1), w("");
75
+ }, [s, o, C, N]), ee = u(() => {
76
+ g(n), f(n?.length === s?.length), c(!1), R(!1), w("");
77
77
  }, [n, s.length]), le = u(() => {
78
- O((e) => !e), c(!1);
78
+ R((e) => !e), c(!1);
79
79
  }, []), te = u((e) => {
80
80
  e.stopPropagation(), c((l) => !l);
81
- }, []), se = JSON.stringify(o) === JSON.stringify(n), re = y ? o : n;
81
+ }, []), se = JSON.stringify(o) === JSON.stringify(n), re = O ? o : n;
82
82
  return /* @__PURE__ */ i("div", { className: t["ckds-wrapper"], style: { width: $ }, children: [
83
83
  T && /* @__PURE__ */ i(
84
84
  "span",
@@ -98,7 +98,7 @@ function je({
98
98
  /* @__PURE__ */ r(
99
99
  ge,
100
100
  {
101
- open: y,
101
+ open: O,
102
102
  selected: re,
103
103
  placeholder: x,
104
104
  showMenu: V,
@@ -108,10 +108,10 @@ function je({
108
108
  onToggleMenu: te,
109
109
  onRemove: Q,
110
110
  classNames: h,
111
- maxChips: N
111
+ maxChips: y
112
112
  }
113
113
  ),
114
- b && /* @__PURE__ */ r(
114
+ k && /* @__PURE__ */ r(
115
115
  "div",
116
116
  {
117
117
  className: m(
@@ -122,25 +122,25 @@ function je({
122
122
  children: /* @__PURE__ */ i(ae, { children: [
123
123
  /* @__PURE__ */ r(me, { width: "12", height: "12" }),
124
124
  " ",
125
- b
125
+ k
126
126
  ] })
127
127
  }
128
128
  ),
129
- y && /* @__PURE__ */ i("div", { className: m(
129
+ O && /* @__PURE__ */ i("div", { className: m(
130
130
  t.dropdown,
131
131
  t[`dropdown-align-${X}`],
132
132
  z === "up" ? t["dropdown-up"] : "",
133
- b && z === "down" ? t["dropdown-helper"] : "",
134
- b && z === "up" ? t["dropdown-helper-up"] : ""
133
+ k && z === "down" ? t["dropdown-helper"] : "",
134
+ k && z === "up" ? t["dropdown-helper-up"] : ""
135
135
  ), children: [
136
136
  /* @__PURE__ */ r(
137
137
  ue,
138
138
  {
139
139
  size: "medium",
140
- value: R,
140
+ value: D,
141
141
  placeholder: B,
142
- onChange: D,
143
- onClear: () => D(""),
142
+ onChange: w,
143
+ onClear: () => w(""),
144
144
  wrapperClassName: "",
145
145
  inputClassName: ""
146
146
  }
@@ -166,7 +166,7 @@ function je({
166
166
  h?.optionsListWrapperClass ?? ""
167
167
  ),
168
168
  children: [
169
- R.length === 0 && /* @__PURE__ */ i(
169
+ D.length === 0 && /* @__PURE__ */ i(
170
170
  "div",
171
171
  {
172
172
  className: m(
@@ -1,5 +1,5 @@
1
1
  import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
- import { s as l } from "../../../styles.module-DlIBNC4w.js";
2
+ import { s as l } from "../../../styles.module-BJEFZA32.js";
3
3
  import { CKButton as r } from "../../CKButton/index.js";
4
4
  import { mergeClasses as e } from "../../../utils/mergeClasses.js";
5
5
  const y = ({
@@ -1,6 +1,6 @@
1
1
  import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
2
  import { memo as a, useCallback as l } from "react";
3
- import { s as m } from "../../../styles.module-DlIBNC4w.js";
3
+ import { s as m } from "../../../styles.module-BJEFZA32.js";
4
4
  import { CKCheckbox as d } from "../../CKCheckbox/index.js";
5
5
  import { mergeClasses as t } from "../../../utils/mergeClasses.js";
6
6
  const u = a(function({
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowMenu.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/OverflowMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,QAAA,MAAM,YAAY,GAAI,wBAA4B,iBAAiB,4CAwDlE,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"OverflowMenu.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/OverflowMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,QAAA,MAAM,YAAY,GAAI,wBAA4B,iBAAiB,4CASlE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,35 +1,7 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { useRef as v, useState as g, useCallback as E, useLayoutEffect as z, useEffect as L } from "react";
3
- import { s as o } from "../../../styles.module-DlIBNC4w.js";
4
- import R from "./OverflowMenuItem.js";
5
- import { mergeClasses as b } from "../../../utils/mergeClasses.js";
6
- const B = ({ selected: u, maxChips: a = 2 }) => {
7
- const r = v(null), [i, m] = g({
8
- vertical: "down",
9
- horizontal: "left"
10
- }), e = E(() => {
11
- const t = r.current;
12
- if (!t) return;
13
- const n = t.getBoundingClientRect(), s = window.innerHeight - n.top, f = n.bottom, d = window.innerWidth - n.left, w = t.scrollHeight, l = t.offsetWidth, h = s < w && f > s ? "up" : "down", p = d < l && n.left > l ? "right" : "left";
14
- m({ vertical: h, horizontal: p });
15
- }, []);
16
- return z(() => {
17
- e();
18
- }, [e]), L(() => (window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
19
- window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
20
- }), [e]), /* @__PURE__ */ c(
21
- "div",
22
- {
23
- ref: r,
24
- className: b(
25
- o["menu-list"],
26
- i.vertical === "up" ? o["menu-list-up"] : "",
27
- i.horizontal === "right" ? o["menu-list-right"] : ""
28
- ),
29
- children: u?.map((t, n) => n < a ? null : /* @__PURE__ */ c(R, { item: t }, t?.value))
30
- }
31
- );
32
- };
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { s } from "../../../styles.module-BJEFZA32.js";
3
+ import n from "./OverflowMenuItem.js";
4
+ const a = ({ selected: t, maxChips: m = 2 }) => /* @__PURE__ */ r("div", { className: s["menu-list"], children: t?.map((e, l) => l < m ? null : /* @__PURE__ */ r(n, { item: e }, e?.value)) });
33
5
  export {
34
- B as default
6
+ a as default
35
7
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { s as i } from "../../../styles.module-DlIBNC4w.js";
2
+ import { s as i } from "../../../styles.module-BJEFZA32.js";
3
3
  import { Tooltip as f } from "../../Tooltip/index.js";
4
4
  import { useRef as a, useState as d, useLayoutEffect as u } from "react";
5
5
  import { mergeClasses as p } from "../../../utils/mergeClasses.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as s, Fragment as t, jsx as a } from "react/jsx-runtime";
2
- import { s as e } from "../../../styles.module-DlIBNC4w.js";
2
+ import { s as e } from "../../../styles.module-BJEFZA32.js";
3
3
  import { Toggle as o } from "../../Toggle/index.js";
4
4
  import { mergeClasses as r } from "../../../utils/mergeClasses.js";
5
5
  const f = ({
@@ -1,7 +1,7 @@
1
1
  import { jsxs as h, jsx as o } from "react/jsx-runtime";
2
2
  import v, { useRef as g, useState as w, useLayoutEffect as C, useCallback as l } from "react";
3
3
  import { S as O } from "../../../cancel-BAgTEOGD.js";
4
- import { s } from "../../../styles.module-DlIBNC4w.js";
4
+ import { s } from "../../../styles.module-BJEFZA32.js";
5
5
  import { Tooltip as R } from "../../Tooltip/index.js";
6
6
  const j = v.memo(function({
7
7
  label: t,
@@ -1,4 +1,4 @@
1
1
  import { TriggerButtonProps } from '../_types/type';
2
- declare const TriggerButton: ({ open, selected, placeholder, showMenu, isAllSelected, selectAllLabel, requireSelection, onToggleOpen, onToggleMenu, onRemove, classNames, maxChips, }: TriggerButtonProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const TriggerButton: ({ open, selected, placeholder, showMenu, isAllSelected, selectAllLabel, requireSelection, onToggleOpen, onRemove, classNames, maxChips, }: TriggerButtonProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default TriggerButton;
4
4
  //# sourceMappingURL=TriggerButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TriggerButton.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/TriggerButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAKzD,QAAA,MAAM,aAAa,GAAI,yJAapB,kBAAkB,4CAuFpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"TriggerButton.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/TriggerButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAOzD,QAAA,MAAM,aAAa,GAAI,2IAYpB,kBAAkB,4CA2IpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,95 +1,121 @@
1
- import { jsxs as m, jsx as t, Fragment as N } from "react/jsx-runtime";
2
- import { useRef as O, useState as T, useEffect as y } from "react";
3
- import { s as r } from "../../../styles.module-DlIBNC4w.js";
4
- import { CKTag as z } from "../../CKTag/index.js";
5
- import { S as R } from "../../../chevron-down-Cm9R64Fe.js";
6
- import W from "./TagContent.js";
7
- import j from "./OverflowMenu.js";
8
- import { mergeClasses as n } from "../../../utils/mergeClasses.js";
9
- import { Tooltip as F } from "../../Tooltip/index.js";
10
- const H = ({
11
- open: d,
12
- selected: o,
13
- placeholder: u,
14
- showMenu: g,
15
- isAllSelected: p,
16
- selectAllLabel: c,
17
- requireSelection: i,
18
- onToggleOpen: v,
19
- onToggleMenu: b,
20
- onRemove: k,
21
- classNames: f,
22
- maxChips: s = 2
1
+ import { jsxs as u, jsx as o, Fragment as N } from "react/jsx-runtime";
2
+ import { useRef as h, useState as g, useEffect as D, useCallback as R, useLayoutEffect as F } from "react";
3
+ import { s as r } from "../../../styles.module-BJEFZA32.js";
4
+ import { CKTag as I } from "../../CKTag/index.js";
5
+ import { S as P } from "../../../chevron-down-Cm9R64Fe.js";
6
+ import U from "./TagContent.js";
7
+ import V from "./OverflowMenu.js";
8
+ import { mergeClasses as s } from "../../../utils/mergeClasses.js";
9
+ import { Tooltip as _ } from "../../Tooltip/index.js";
10
+ const K = 150, q = ({
11
+ open: v,
12
+ selected: n,
13
+ placeholder: k,
14
+ showMenu: y,
15
+ isAllSelected: i,
16
+ selectAllLabel: f,
17
+ requireSelection: p,
18
+ onToggleOpen: B,
19
+ onRemove: L,
20
+ classNames: w,
21
+ maxChips: a = 2
23
22
  }) => {
24
- const h = O(null), [w, C] = T(!1);
25
- return y(() => {
26
- const e = h.current;
23
+ const b = h(null), m = h(null), [z, H] = g(!1), [W, M] = g(!1), [j, O] = g(!1), c = h(null);
24
+ D(() => {
25
+ const e = b.current;
27
26
  if (!e) return;
28
- const l = () => {
29
- C(e.scrollWidth > e.clientWidth);
27
+ const t = () => {
28
+ H(e.scrollWidth > e.clientWidth);
30
29
  };
31
- l();
32
- const a = new ResizeObserver(l);
33
- return a.observe(e), () => a.disconnect();
34
- }, [c, p]), /* @__PURE__ */ m(
30
+ t();
31
+ const l = new ResizeObserver(t);
32
+ return l.observe(e), () => l.disconnect();
33
+ }, [f, i]);
34
+ const T = R((e) => {
35
+ e.stopPropagation(), c.current && (clearTimeout(c.current), c.current = null), M(!0);
36
+ }, []), C = R((e) => {
37
+ e.stopPropagation(), c.current = setTimeout(() => {
38
+ M(!1);
39
+ }, K);
40
+ }, []), d = y || W, E = !i && n?.length > a;
41
+ return F(() => {
42
+ if (!d || !m.current) return;
43
+ const t = m.current.getBoundingClientRect();
44
+ window.innerHeight - t.bottom < 0 ? O(!0) : O(!1);
45
+ }, [d]), /* @__PURE__ */ u(
35
46
  "button",
36
47
  {
37
- className: n(
48
+ className: s(
38
49
  r.trigger,
39
- d ? r["trigger-open"] : "",
40
- f?.dropdownOpenerWrapperClass ?? ""
50
+ v ? r["trigger-open"] : "",
51
+ w?.dropdownOpenerWrapperClass ?? ""
41
52
  ),
42
- onClick: v,
53
+ onClick: B,
43
54
  type: "button",
44
55
  children: [
45
- o?.length > 0 ? /* @__PURE__ */ t("div", { className: r["selected-tags-container"], children: p ? /* @__PURE__ */ t(F, { title: w ? c : "", placement: "bottom", children: /* @__PURE__ */ t(
46
- "span",
47
- {
48
- ref: h,
49
- className: n("ckds-body-sm-reg", r["select-all-label"]),
50
- children: c
51
- }
52
- ) }) : /* @__PURE__ */ m(N, { children: [
53
- o.map((e, l) => {
54
- if (l >= s) return null;
55
- const a = !!(i && o.length === 1);
56
- return /* @__PURE__ */ t(z, { variation: "INFO", size: "small", fill: "soft", children: /* @__PURE__ */ t(
57
- W,
56
+ n?.length > 0 ? /* @__PURE__ */ u(N, { children: [
57
+ /* @__PURE__ */ o("div", { className: r["selected-tags-container"], children: i ? /* @__PURE__ */ o(_, { title: z ? f : "", placement: "bottom", children: /* @__PURE__ */ o(
58
+ "span",
59
+ {
60
+ ref: b,
61
+ className: s("ckds-body-sm-reg", r["select-all-label"]),
62
+ children: f
63
+ }
64
+ ) }) : /* @__PURE__ */ u(N, { children: [
65
+ n.map((e, t) => {
66
+ if (t >= a) return null;
67
+ const l = !!(p && n.length === 1);
68
+ return /* @__PURE__ */ o(I, { variation: "INFO", size: "small", fill: "soft", children: /* @__PURE__ */ o(
69
+ U,
70
+ {
71
+ label: e?.label,
72
+ value: e?.value,
73
+ onRemove: L,
74
+ hideCross: l
75
+ }
76
+ ) }, e.value);
77
+ }),
78
+ E && /* @__PURE__ */ u(
79
+ "span",
58
80
  {
59
- label: e?.label,
60
- value: e?.value,
61
- onRemove: k,
62
- hideCross: a
81
+ className: s("ckds-cap-med", r["overflow-count"]),
82
+ onMouseEnter: T,
83
+ onMouseLeave: C,
84
+ children: [
85
+ "...+",
86
+ n?.length - a
87
+ ]
63
88
  }
64
- ) }, e.value);
65
- }),
66
- o?.length > s && /* @__PURE__ */ m(
67
- "span",
89
+ )
90
+ ] }) }),
91
+ E && d && /* @__PURE__ */ o(
92
+ "div",
68
93
  {
69
- className: n("ckds-cap-med", r["overflow-count"]),
70
- onClick: b,
71
- children: [
72
- "...+",
73
- o?.length - s
74
- ]
94
+ ref: m,
95
+ className: s(
96
+ r["overflow-menu-portal"],
97
+ j ? r["overflow-menu-portal-up"] : ""
98
+ ),
99
+ onMouseEnter: T,
100
+ onMouseLeave: C,
101
+ children: /* @__PURE__ */ o(V, { selected: n, maxChips: a })
75
102
  }
76
- ),
77
- g && /* @__PURE__ */ t(j, { selected: o, maxChips: s })
78
- ] }) }) : /* @__PURE__ */ t(
103
+ )
104
+ ] }) : /* @__PURE__ */ o(
79
105
  "span",
80
106
  {
81
- className: n(
107
+ className: s(
82
108
  "ckds-body-sm-reg",
83
- i ? r["placeholder-required"] : r.placeholder,
84
- f?.placeholderClass ?? ""
109
+ p ? r["placeholder-required"] : r.placeholder,
110
+ w?.placeholderClass ?? ""
85
111
  ),
86
- children: i ? "Select Atleast One" : u
112
+ children: p ? "Select Atleast One" : k
87
113
  }
88
114
  ),
89
- /* @__PURE__ */ t(
90
- R,
115
+ /* @__PURE__ */ o(
116
+ P,
91
117
  {
92
- className: n(r.chevron, d ? r["chevron-up"] : ""),
118
+ className: s(r.chevron, v ? r["chevron-up"] : ""),
93
119
  width: "14",
94
120
  height: "14"
95
121
  }
@@ -99,5 +125,5 @@ const H = ({
99
125
  );
100
126
  };
101
127
  export {
102
- H as default
128
+ q as default
103
129
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/MultiSelect/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAC;AAQpE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEzE,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,UAAU,EACV,QAAQ,EACR,WAAgC,EAChC,iBAA4B,EAC5B,cAA6B,EAC7B,OAAO,EACP,eAAoB,EACpB,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAe,EACf,cAAc,EACd,gBAAwB,EACxB,KAAU,EACV,QAAgB,EAChB,QAAQ,EAAE,YAAgB,GAC3B,EAAE,gBAAgB,2CA6SlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/MultiSelect/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAC;AAQpE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEzE,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,UAAU,EACV,QAAQ,EACR,WAAgC,EAChC,iBAA4B,EAC5B,cAA6B,EAC7B,OAAO,EACP,eAAoB,EACpB,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAe,EACf,cAAc,EACd,gBAAwB,EACxB,KAAU,EACV,QAAgB,EAChB,QAAQ,EAAE,YAAgB,GAC3B,EAAE,gBAAgB,2CA8SlB"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as o, Fragment as fe } from "react/jsx-runtime";
2
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-DlIBNC4w.js";
3
+ import { s as t } from "../../styles.module-BJEFZA32.js";
4
4
  import { Search as ve } from "../Search/index.js";
5
5
  import { S as we } from "../../info-icon-ooYw3va_.js";
6
6
  import { CKCheckbox as be } from "../CKCheckbox/index.js";
@@ -15,14 +15,14 @@ import { useDropdownDirection as Re } from "./_utils/useDropdownDirection.js";
15
15
  import { mergeClasses as f } from "../../utils/mergeClasses.js";
16
16
  function Pe({
17
17
  label: $,
18
- helperText: y,
18
+ helperText: N,
19
19
  required: U,
20
20
  placeholder: V = "Choose parameter",
21
21
  searchPlaceholder: X = "Search",
22
22
  selectAllLabel: j = "Select all",
23
23
  options: l,
24
24
  defaultSelected: F = [],
25
- onApply: N,
25
+ onApply: A,
26
26
  exclude: d,
27
27
  setExclude: Y,
28
28
  onSelect: S,
@@ -34,39 +34,39 @@ function Pe({
34
34
  disabled: x = !1,
35
35
  maxChips: q = 1
36
36
  }) {
37
- const { labelWrapperClass: ee, helperClass: le } = C, [A, D] = u(!1), [E, R] = u(""), [n, Q] = u(
37
+ const { labelWrapperClass: ee, helperClass: le } = C, [D, E] = u(!1), [R, b] = u(""), [n, Q] = u(
38
38
  () => J(F)
39
39
  ), [r, v] = u(
40
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);
41
+ ), [W, K] = u(d), [te, g] = u(!1), [se, h] = u(!1), I = Ce(null), { vertical: z, horizontal: ne } = Re(I, D);
42
42
  H(() => {
43
43
  g(n?.length === l?.length);
44
44
  }, []), H(() => {
45
45
  const e = (s) => {
46
- I.current && !I.current.contains(s.target) && (v(n), g(n?.length === l?.length), D(!1), h(!1), R(""));
46
+ I.current && !I.current.contains(s.target) && (v(n), g(n?.length === l?.length), E(!1), h(!1), b(""));
47
47
  };
48
48
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
49
49
  }, [n, l.length]);
50
50
  const B = T(
51
- () => De(l, E),
52
- [l, E]
51
+ () => De(l, R),
52
+ [l, R]
53
53
  ), M = a ? 1 : q, P = p(
54
54
  (e, s, w, ue) => {
55
55
  w || h(!1);
56
56
  const pe = (O) => {
57
- const c = O?.some((b) => b?.value === e) ? O?.filter((b) => b?.value !== e) : [...O, { value: e, label: s }];
57
+ const c = O?.some((k) => k?.value === e) ? O?.filter((k) => k?.value !== e) : [...O, { value: e, label: s }];
58
58
  return g(c?.length === l?.length), c?.length <= M && h(!1), c;
59
59
  };
60
60
  if (ue) {
61
61
  if (a && n?.length === 1 && n[0]?.value === e)
62
62
  return;
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?.();
63
+ const c = ((m) => m?.some((y) => y?.value === e) ? m?.filter((y) => y?.value !== e) : [...m, { value: e, label: s }])(n), k = l?.filter((m) => c?.some((y) => y?.value === m?.value))?.map((m) => ({ ...m, isChecked: !0 }));
64
+ g(c?.length === l?.length), c?.length <= M && h(!1), Q(c), v(c), A(k, d), K(d), S?.();
65
65
  return;
66
66
  }
67
67
  v(pe), S?.();
68
68
  },
69
- [M, l, S, a, n, N, d]
69
+ [M, l, S, a, n, A, d]
70
70
  ), re = p(() => {
71
71
  h(!1), g((e) => {
72
72
  const s = !e;
@@ -78,17 +78,17 @@ function Pe({
78
78
  v([]), g(!1), L?.();
79
79
  }, [L]), oe = p(() => {
80
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("");
81
+ A(e, d), Q(r), K(d), E(!1), b("");
82
+ }, [l, r, d, A]), de = p(() => {
83
+ v(n), g(n?.length === l?.length), h(!1), E(!1), b("");
84
84
  }, [n, l.length]), ce = p(() => {
85
- x || (D((e) => !e), h(!1));
85
+ x || (E((e) => !e), h(!1));
86
86
  }, [x]), he = p((e) => {
87
87
  e.stopPropagation(), h((s) => !s);
88
88
  }, []), me = T(
89
89
  () => d !== W && r?.length > 0 ? !1 : Ee(r, n, a),
90
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]);
91
+ ), G = D ? 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
92
  return /* @__PURE__ */ i("div", { className: `${t["ckds-wrapper"]} ${x ? t["ckds-wrapper-disabled"] : ""}`, style: { width: _ }, children: [
93
93
  $ && !a && /* @__PURE__ */ i(
94
94
  "span",
@@ -108,7 +108,7 @@ function Pe({
108
108
  /* @__PURE__ */ o(
109
109
  ke,
110
110
  {
111
- open: A,
111
+ open: D,
112
112
  selected: G,
113
113
  placeholder: V,
114
114
  showMenu: se,
@@ -122,7 +122,7 @@ function Pe({
122
122
  maxChips: M
123
123
  }
124
124
  ),
125
- y && !a && /* @__PURE__ */ o(
125
+ N && !a && /* @__PURE__ */ o(
126
126
  "div",
127
127
  {
128
128
  className: f(
@@ -133,25 +133,25 @@ function Pe({
133
133
  children: /* @__PURE__ */ i(fe, { children: [
134
134
  /* @__PURE__ */ o(we, { width: "12", height: "12" }),
135
135
  " ",
136
- y
136
+ N
137
137
  ] })
138
138
  }
139
139
  ),
140
- A && /* @__PURE__ */ i("div", { className: f(
140
+ D && /* @__PURE__ */ i("div", { className: f(
141
141
  t.dropdown,
142
142
  t[`dropdown-align-${ne}`],
143
143
  z === "up" ? t["dropdown-up"] : "",
144
- y && z === "down" ? t["dropdown-helper"] : "",
145
- y && z === "up" ? t["dropdown-helper-up"] : ""
144
+ N && z === "down" ? t["dropdown-helper"] : "",
145
+ N && z === "up" ? t["dropdown-helper-up"] : ""
146
146
  ), children: [
147
147
  /* @__PURE__ */ o(
148
148
  ve,
149
149
  {
150
150
  size: "medium",
151
- value: E,
151
+ value: R,
152
152
  placeholder: X,
153
- onChange: R,
154
- onClear: () => R(""),
153
+ onChange: b,
154
+ onClear: () => b(""),
155
155
  wrapperClassName: "",
156
156
  inputClassName: ""
157
157
  }
@@ -177,7 +177,7 @@ function Pe({
177
177
  C?.optionsListWrapperClass ?? ""
178
178
  ),
179
179
  children: [
180
- E.length === 0 && /* @__PURE__ */ i(
180
+ R.length === 0 && /* @__PURE__ */ i(
181
181
  "div",
182
182
  {
183
183
  className: f(
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Pagination/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMjE,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,oBAA4B,EAC5B,eAA2C,EAC3C,YAAY,EACZ,SAAS,GACV,EAAE,eAAe,kDA4KjB;yBAtLe,UAAU"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Pagination/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQjE,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,oBAA4B,EAC5B,eAA2C,EAC3C,YAAY,EACZ,SAAS,GACV,EAAE,eAAe,kDA4KjB;yBAtLe,UAAU"}