@ck-ui/component-library 1.0.0 → 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-BXwGxK7I.css +1 -0
- package/dist/assets/index-BZgvXFWW.css +1 -0
- package/dist/assets/index-BbJZjGLb.css +1 -0
- package/dist/assets/index-UphWJR2V.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/assets/styles-DLJzdWsF.css +1 -0
- package/dist/assets/{styles-Bqfs9eXV.css → styles-DngCqCGW.css} +1 -1
- package/dist/assets/styles-O-5pBCak.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/CardBox/index.js +18 -18
- 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 +7 -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 -150
- 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/RadioButton/index.js +34 -34
- package/dist/components/RadioGroup/_types/radioGroup.types.d.ts +1 -0
- package/dist/components/RadioGroup/_types/radioGroup.types.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +19 -17
- 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/ColumnConfig.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.js +22 -19
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.js +304 -301
- 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.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.js +43 -42
- package/dist/components/Table/_helpers/TableRows.js +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +215 -210
- 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/components/Typography/index.js +30 -30
- 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.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +15 -13
- 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-CYkg2g5d.js +0 -89
- package/dist/IconSlot-CFKmSU2_.js +0 -33
- package/dist/assets/DropdownFooter-DjdPf69A.css +0 -1
- package/dist/assets/IconSlot-CLpdZgmb.css +0 -1
- package/dist/assets/ReactToastify-tlSLHgLC.css +0 -1
- package/dist/assets/index-B81zpOpq.css +0 -1
- package/dist/assets/index-BmQOtMhS.css +0 -1
- package/dist/assets/index-CaWXKQ7j.css +0 -1
- package/dist/assets/index-CiQd_iRw.css +0 -1
- package/dist/assets/index-DNhNBxL9.css +0 -1
- package/dist/assets/index-YHUWVH17.css +0 -1
- package/dist/assets/styles-BTZL03H2.css +0 -1
- package/dist/assets/styles-CYxKrBqL.css +0 -1
- package/dist/assets/styles-D8sahtFb.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-Dojg5FTS.js +0 -41
|
@@ -4,7 +4,7 @@ function G(i) {
|
|
|
4
4
|
function g(i, r, c) {
|
|
5
5
|
const n = i.getBoundingClientRect(), o = G(c), e = Math.min(
|
|
6
6
|
r * 32 + 16,
|
|
7
|
-
o.height -
|
|
7
|
+
o.height - 8 * 2
|
|
8
8
|
);
|
|
9
9
|
let t = n.bottom + 4;
|
|
10
10
|
return t + e > o.bottom - 8 && (t = n.top - e - 4), t < o.top + 8 && (t = o.top + 8), n.left + 238 > o.right - 8 ? { top: t, right: window.innerWidth - n.right } : { top: t, left: n.left };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function N(t, i) {
|
|
2
|
-
const E = window.innerWidth, o = window.innerHeight, G = Math.min(i * 32 + 16, o -
|
|
2
|
+
const E = window.innerWidth, o = window.innerHeight, G = Math.min(i * 32 + 16, o - 8 * 2);
|
|
3
3
|
let n = t.top;
|
|
4
4
|
return n + G > o - 8 && (n = o - G - 8), n < 8 && (n = 8), t.right + 12 + 238 > E - 8 ? { top: n, right: E - t.left + 12 } : { top: n, left: t.right + 12 };
|
|
5
5
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as
|
|
2
|
-
import { DeviationTag as
|
|
3
|
-
import '../../../../assets/index-
|
|
4
|
-
card:
|
|
5
|
-
icon:
|
|
6
|
-
title:
|
|
7
|
-
"action-link": "_action-
|
|
8
|
-
value:
|
|
9
|
-
"date-range": "_date-
|
|
10
|
-
"forecast-card": "_forecast-
|
|
1
|
+
import { jsxs as a, Fragment as g, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { DeviationTag as h } from "../../../DeviationTag/index.js";
|
|
3
|
+
import '../../../../assets/index-0R9p-l95.css';const u = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2177_11954)'%3e%3cpath%20d='M6.5001%205.5L10.6001%201.4'%20stroke='%233060C1'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%203.41504V1.00005H8.585'%20stroke='%233060C1'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.5%201H4.5C2%201%201%202%201%204.5V7.5C1%2010%202%2011%204.5%2011H7.5C10%2011%2011%2010%2011%207.5V6.5'%20stroke='%233060C1'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2177_11954'%3e%3crect%20width='12'%20height='12'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", m = "_card_4gun4_1", v = "_icon_4gun4_19", f = "_title_4gun4_22", p = "_value_4gun4_36", N = "_forecast_4gun4_48", e = {
|
|
4
|
+
card: m,
|
|
5
|
+
icon: v,
|
|
6
|
+
title: f,
|
|
7
|
+
"action-link": "_action-link_4gun4_29",
|
|
8
|
+
value: p,
|
|
9
|
+
"date-range": "_date-range_4gun4_43",
|
|
10
|
+
"forecast-card": "_forecast-card_4gun4_48",
|
|
11
11
|
forecast: N,
|
|
12
|
-
"regular-card": "_regular-
|
|
13
|
-
"secondary-section": "_secondary-
|
|
12
|
+
"regular-card": "_regular-card_4gun4_54",
|
|
13
|
+
"secondary-section": "_secondary-section_4gun4_58"
|
|
14
14
|
};
|
|
15
15
|
function x({
|
|
16
|
-
icon:
|
|
17
|
-
title:
|
|
16
|
+
icon: s,
|
|
17
|
+
title: t,
|
|
18
18
|
value: i,
|
|
19
19
|
dateRange: o,
|
|
20
20
|
deviationChip: c,
|
|
21
|
-
forecastValue:
|
|
22
|
-
className:
|
|
23
|
-
actionLink:
|
|
21
|
+
forecastValue: l,
|
|
22
|
+
className: _,
|
|
23
|
+
actionLink: n,
|
|
24
24
|
secondarySection: d
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */ a(
|
|
26
|
+
return /* @__PURE__ */ a(g, { children: [
|
|
27
27
|
/* @__PURE__ */ a(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
|
-
className: `${e.card} ${
|
|
30
|
+
className: `${e.card} ${l ? e.forecast : ""} ${_}`,
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ a("div", { className: e["regular-card"], children: [
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
(s || t) && /* @__PURE__ */ a("div", { className: e.header, children: [
|
|
34
|
+
s && /* @__PURE__ */ r("div", { className: e.icon, children: s }),
|
|
35
|
+
t && /* @__PURE__ */ r("div", { className: e.title, children: t })
|
|
36
36
|
] }),
|
|
37
37
|
i && /* @__PURE__ */ r("div", { className: e.value, children: i }),
|
|
38
38
|
o && /* @__PURE__ */ r("div", { className: e["date-range"], children: o }),
|
|
39
39
|
c && /* @__PURE__ */ r(
|
|
40
|
-
|
|
40
|
+
h,
|
|
41
41
|
{
|
|
42
42
|
price: c.price ?? "",
|
|
43
43
|
percentage: c.percentage ?? "",
|
|
@@ -46,18 +46,18 @@ function x({
|
|
|
46
46
|
}
|
|
47
47
|
)
|
|
48
48
|
] }),
|
|
49
|
-
|
|
49
|
+
l && /* @__PURE__ */ a("div", { className: e["forecast-card"], children: [
|
|
50
50
|
/* @__PURE__ */ r("div", { className: e.title, children: "Forecast" }),
|
|
51
|
-
/* @__PURE__ */ r("div", { className: e.value, children:
|
|
51
|
+
/* @__PURE__ */ r("div", { className: e.value, children: l })
|
|
52
52
|
] }),
|
|
53
|
-
|
|
53
|
+
n?.href && /* @__PURE__ */ r(
|
|
54
54
|
"a",
|
|
55
55
|
{
|
|
56
|
-
href:
|
|
57
|
-
target:
|
|
56
|
+
href: n?.href,
|
|
57
|
+
target: n?.target ?? "_blank",
|
|
58
58
|
rel: "noreferrer",
|
|
59
|
-
className: `${e["action-link"]} ${
|
|
60
|
-
children: /* @__PURE__ */ r("img", { src:
|
|
59
|
+
className: `${e["action-link"]} ${n?.className}`,
|
|
60
|
+
children: /* @__PURE__ */ r("img", { src: u, alt: "Redirection Link" })
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
]
|
|
@@ -16,7 +16,9 @@ export interface SimpleMultiSelectProps {
|
|
|
16
16
|
onClear?: () => void;
|
|
17
17
|
classNames?: ClassNames;
|
|
18
18
|
showExcludeBtn?: boolean;
|
|
19
|
+
/** Max number of chips to show inline before collapsing into +N. Defaults to 1. */
|
|
20
|
+
maxChips?: 1 | 2 | 3;
|
|
19
21
|
width?: string | number;
|
|
20
22
|
}
|
|
21
|
-
export declare function SimpleMultiSelect({ label, helperText, required, placeholder, searchPlaceholder, selectAllLabel, options, defaultSelected, onApply, exclude, setExclude, onSelect, onClear, classNames, showExcludeBtn, width, }: SimpleMultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function SimpleMultiSelect({ label, helperText, required, placeholder, searchPlaceholder, selectAllLabel, options, defaultSelected, onApply, exclude, setExclude, onSelect, onClear, classNames, showExcludeBtn, width, maxChips, }: SimpleMultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
//# sourceMappingURL=SimpleMultiSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleMultiSelect.d.ts","sourceRoot":"","sources":["../../../lib/components/MultiSelect/SimpleMultiSelect.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAgB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"SimpleMultiSelect.d.ts","sourceRoot":"","sources":["../../../lib/components/MultiSelect/SimpleMultiSelect.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAgB,MAAM,eAAe,CAAC;AAOjF,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACtC,OAAO,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,QAAQ,EACN,WAAgC,EAClC,iBAA4B,EAC5B,cAA6B,EAC7B,OAAO,EACP,eAAoB,EACpB,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAe,EACf,cAAc,EACd,KAAU,EACV,QAAY,GACb,EAAE,sBAAsB,2CAyQxB"}
|
|
@@ -1,214 +1,228 @@
|
|
|
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 {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { jsxs as i, jsx as r, Fragment as ae } from "react/jsx-runtime";
|
|
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-yIHBMSTk.js";
|
|
4
|
+
import { Search as ue } from "../Search/index.js";
|
|
5
|
+
import { S as me } from "../../info-icon-ooYw3va_.js";
|
|
6
|
+
import { CKCheckbox as he } from "../CKCheckbox/index.js";
|
|
7
|
+
import ge from "./_helpers/TriggerButton.js";
|
|
8
|
+
import fe from "./_helpers/OptionRow.js";
|
|
9
|
+
import pe from "./_helpers/SearchResult.js";
|
|
10
|
+
import ve from "./_helpers/DropdownFooter.js";
|
|
11
|
+
import { getInitialSelected as W } from "./_utils/getInitialSelected.js";
|
|
12
|
+
import { filterOptions as Ce } from "./_utils/filterOptions.js";
|
|
13
|
+
import { useDropdownDirection as we } from "./_utils/useDropdownDirection.js";
|
|
14
|
+
import { mergeClasses as m } from "../../utils/mergeClasses.js";
|
|
15
|
+
function je({
|
|
16
|
+
label: T,
|
|
17
|
+
helperText: b,
|
|
18
|
+
required: q,
|
|
19
|
+
placeholder: x = "Choose parameter",
|
|
20
|
+
searchPlaceholder: B = "Search",
|
|
21
|
+
selectAllLabel: j = "Select all",
|
|
21
22
|
options: s,
|
|
22
|
-
defaultSelected:
|
|
23
|
-
onApply:
|
|
24
|
-
exclude:
|
|
25
|
-
setExclude:
|
|
26
|
-
onSelect:
|
|
27
|
-
onClear:
|
|
28
|
-
classNames:
|
|
29
|
-
showExcludeBtn:
|
|
30
|
-
width:
|
|
23
|
+
defaultSelected: F = [],
|
|
24
|
+
onApply: k,
|
|
25
|
+
exclude: C,
|
|
26
|
+
setExclude: K,
|
|
27
|
+
onSelect: I,
|
|
28
|
+
onClear: J,
|
|
29
|
+
classNames: h = {},
|
|
30
|
+
showExcludeBtn: P,
|
|
31
|
+
width: $ = "",
|
|
32
|
+
maxChips: N = 1
|
|
31
33
|
}) {
|
|
32
|
-
const { labelWrapperClass:
|
|
33
|
-
() =>
|
|
34
|
-
), [
|
|
35
|
-
() =>
|
|
36
|
-
), [
|
|
37
|
-
|
|
34
|
+
const { labelWrapperClass: G, helperClass: H } = h, [y, O] = v(!1), [R, D] = v(""), [n, L] = v(
|
|
35
|
+
() => W(F)
|
|
36
|
+
), [o, g] = v(
|
|
37
|
+
() => W(F)
|
|
38
|
+
), [U, f] = v(!1), [V, c] = v(!1), M = ce(null), { vertical: z, horizontal: X } = we(M, y);
|
|
39
|
+
de(() => {
|
|
38
40
|
const e = (l) => {
|
|
39
|
-
|
|
41
|
+
M.current && !M.current.contains(l.target) && (g(n), f(n?.length === s?.length), O(!1), c(!1), D(""));
|
|
40
42
|
};
|
|
41
43
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
42
44
|
}, [n, s.length]);
|
|
43
|
-
const
|
|
44
|
-
() =>
|
|
45
|
-
[s,
|
|
46
|
-
),
|
|
47
|
-
(e, l,
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
return f(
|
|
45
|
+
const A = ie(
|
|
46
|
+
() => Ce(s, R),
|
|
47
|
+
[s, R]
|
|
48
|
+
), Q = u(
|
|
49
|
+
(e, l, p, ne) => {
|
|
50
|
+
p || c(!1);
|
|
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
54
|
};
|
|
53
|
-
|
|
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?.();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
g(oe), I?.();
|
|
54
61
|
},
|
|
55
|
-
[s
|
|
56
|
-
),
|
|
57
|
-
|
|
62
|
+
[s, I, k, C, n, N]
|
|
63
|
+
), Y = u(() => {
|
|
64
|
+
c(!1), f((e) => {
|
|
58
65
|
const l = !e;
|
|
59
66
|
return g(
|
|
60
|
-
l ? s?.map((
|
|
67
|
+
l ? s?.map((p) => ({ value: p?.value, label: p?.label })) : []
|
|
61
68
|
), l;
|
|
62
69
|
});
|
|
63
|
-
}, [s]),
|
|
64
|
-
g([]), f(!1),
|
|
65
|
-
}, [
|
|
66
|
-
const e = s?.filter((l) =>
|
|
67
|
-
|
|
68
|
-
}, [s,
|
|
69
|
-
g(n), f(n?.length === s?.length),
|
|
70
|
-
}, [n, s.length]),
|
|
71
|
-
|
|
72
|
-
}, []),
|
|
73
|
-
e.stopPropagation(),
|
|
74
|
-
}, []),
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
70
|
+
}, [s]), Z = u(() => {
|
|
71
|
+
g([]), f(!1), J?.();
|
|
72
|
+
}, [J]), _ = u(() => {
|
|
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("");
|
|
77
|
+
}, [n, s.length]), le = u(() => {
|
|
78
|
+
O((e) => !e), c(!1);
|
|
79
|
+
}, []), te = u((e) => {
|
|
80
|
+
e.stopPropagation(), c((l) => !l);
|
|
81
|
+
}, []), se = JSON.stringify(o) === JSON.stringify(n), re = y ? o : n;
|
|
82
|
+
return /* @__PURE__ */ i("div", { className: t["ckds-wrapper"], style: { width: $ }, children: [
|
|
83
|
+
T && /* @__PURE__ */ i(
|
|
77
84
|
"span",
|
|
78
85
|
{
|
|
79
|
-
className:
|
|
86
|
+
className: m(
|
|
80
87
|
"ckds-body-xs-med",
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
t["label-wrapper"],
|
|
89
|
+
G ?? ""
|
|
83
90
|
),
|
|
84
91
|
children: [
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
T,
|
|
93
|
+
q && /* @__PURE__ */ r("span", { className: t.required, children: " *" })
|
|
87
94
|
]
|
|
88
95
|
}
|
|
89
96
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
97
|
+
/* @__PURE__ */ i("div", { className: t["trigger-wrapper"], ref: M, children: [
|
|
98
|
+
/* @__PURE__ */ r(
|
|
99
|
+
ge,
|
|
93
100
|
{
|
|
94
|
-
open:
|
|
95
|
-
selected:
|
|
96
|
-
placeholder:
|
|
97
|
-
showMenu:
|
|
101
|
+
open: y,
|
|
102
|
+
selected: re,
|
|
103
|
+
placeholder: x,
|
|
104
|
+
showMenu: V,
|
|
98
105
|
isAllSelected: !1,
|
|
99
|
-
selectAllLabel:
|
|
100
|
-
onToggleOpen:
|
|
101
|
-
onToggleMenu:
|
|
102
|
-
onRemove:
|
|
103
|
-
classNames:
|
|
104
|
-
maxChips:
|
|
106
|
+
selectAllLabel: j,
|
|
107
|
+
onToggleOpen: le,
|
|
108
|
+
onToggleMenu: te,
|
|
109
|
+
onRemove: Q,
|
|
110
|
+
classNames: h,
|
|
111
|
+
maxChips: N
|
|
105
112
|
}
|
|
106
113
|
),
|
|
107
|
-
|
|
114
|
+
b && /* @__PURE__ */ r(
|
|
108
115
|
"div",
|
|
109
116
|
{
|
|
110
|
-
className:
|
|
117
|
+
className: m(
|
|
111
118
|
"ckds-body-xs-reg",
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
t["helper-text"],
|
|
120
|
+
H ?? ""
|
|
114
121
|
),
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ i(ae, { children: [
|
|
123
|
+
/* @__PURE__ */ r(me, { width: "12", height: "12" }),
|
|
117
124
|
" ",
|
|
118
|
-
|
|
125
|
+
b
|
|
119
126
|
] })
|
|
120
127
|
}
|
|
121
128
|
),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
y && /* @__PURE__ */ i("div", { className: m(
|
|
130
|
+
t.dropdown,
|
|
131
|
+
t[`dropdown-align-${X}`],
|
|
132
|
+
z === "up" ? t["dropdown-up"] : "",
|
|
133
|
+
b && z === "down" ? t["dropdown-helper"] : "",
|
|
134
|
+
b && z === "up" ? t["dropdown-helper-up"] : ""
|
|
135
|
+
), children: [
|
|
136
|
+
/* @__PURE__ */ r(
|
|
137
|
+
ue,
|
|
125
138
|
{
|
|
126
139
|
size: "medium",
|
|
127
|
-
value:
|
|
128
|
-
placeholder:
|
|
129
|
-
onChange:
|
|
130
|
-
onClear: () =>
|
|
140
|
+
value: R,
|
|
141
|
+
placeholder: B,
|
|
142
|
+
onChange: D,
|
|
143
|
+
onClear: () => D(""),
|
|
131
144
|
wrapperClassName: "",
|
|
132
145
|
inputClassName: ""
|
|
133
146
|
}
|
|
134
147
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
148
|
+
/* @__PURE__ */ r(
|
|
149
|
+
pe,
|
|
137
150
|
{
|
|
138
|
-
totalResults:
|
|
139
|
-
exclude:
|
|
140
|
-
setExclude:
|
|
141
|
-
isToggleDisable:
|
|
142
|
-
showExcludeBtn:
|
|
143
|
-
hideExclude: !1
|
|
151
|
+
totalResults: A?.length,
|
|
152
|
+
exclude: C,
|
|
153
|
+
setExclude: K,
|
|
154
|
+
isToggleDisable: o?.length === 0,
|
|
155
|
+
showExcludeBtn: P,
|
|
156
|
+
hideExclude: !1,
|
|
157
|
+
selectedCount: o?.length
|
|
144
158
|
}
|
|
145
159
|
),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ r("div", { className: t.divider }),
|
|
161
|
+
/* @__PURE__ */ i(
|
|
148
162
|
"div",
|
|
149
163
|
{
|
|
150
|
-
className:
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
className: m(
|
|
165
|
+
t["ckds-options-list"],
|
|
166
|
+
h?.optionsListWrapperClass ?? ""
|
|
153
167
|
),
|
|
154
168
|
children: [
|
|
155
|
-
|
|
169
|
+
R.length === 0 && /* @__PURE__ */ i(
|
|
156
170
|
"div",
|
|
157
171
|
{
|
|
158
|
-
className:
|
|
159
|
-
|
|
160
|
-
|
|
172
|
+
className: m(
|
|
173
|
+
t["option-row"],
|
|
174
|
+
h?.optionRowClass ?? ""
|
|
161
175
|
),
|
|
162
|
-
onClick:
|
|
176
|
+
onClick: Y,
|
|
163
177
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ r(he, { checked: U, size: "md" }),
|
|
179
|
+
/* @__PURE__ */ r(
|
|
166
180
|
"span",
|
|
167
181
|
{
|
|
168
|
-
className:
|
|
182
|
+
className: m(
|
|
169
183
|
"ckds-body-sm-reg",
|
|
170
|
-
|
|
184
|
+
t["option-label"]
|
|
171
185
|
),
|
|
172
|
-
children:
|
|
186
|
+
children: j
|
|
173
187
|
}
|
|
174
188
|
)
|
|
175
189
|
]
|
|
176
190
|
}
|
|
177
191
|
),
|
|
178
|
-
|
|
192
|
+
A?.length === 0 ? /* @__PURE__ */ r(
|
|
179
193
|
"span",
|
|
180
194
|
{
|
|
181
|
-
className:
|
|
195
|
+
className: m(
|
|
182
196
|
"ckds-body-sm-reg",
|
|
183
|
-
|
|
197
|
+
t["no-results"]
|
|
184
198
|
),
|
|
185
199
|
children: "No results found"
|
|
186
200
|
}
|
|
187
|
-
) :
|
|
188
|
-
|
|
201
|
+
) : A?.map((e) => /* @__PURE__ */ r(
|
|
202
|
+
fe,
|
|
189
203
|
{
|
|
190
204
|
value: e?.value,
|
|
191
205
|
label: e?.label,
|
|
192
|
-
checked:
|
|
206
|
+
checked: o?.some(
|
|
193
207
|
(l) => l?.value === e?.value
|
|
194
208
|
),
|
|
195
|
-
onToggle:
|
|
196
|
-
classNames:
|
|
209
|
+
onToggle: Q,
|
|
210
|
+
classNames: h
|
|
197
211
|
},
|
|
198
212
|
e?.value
|
|
199
213
|
))
|
|
200
214
|
]
|
|
201
215
|
}
|
|
202
216
|
),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
|
|
217
|
+
/* @__PURE__ */ r(
|
|
218
|
+
ve,
|
|
205
219
|
{
|
|
206
|
-
onClear:
|
|
207
|
-
onCancel:
|
|
208
|
-
onApply:
|
|
209
|
-
classNames:
|
|
210
|
-
isClearDisabled:
|
|
211
|
-
isApplyDisabled:
|
|
220
|
+
onClear: Z,
|
|
221
|
+
onCancel: ee,
|
|
222
|
+
onApply: _,
|
|
223
|
+
classNames: h,
|
|
224
|
+
isClearDisabled: o?.length === 0,
|
|
225
|
+
isApplyDisabled: se,
|
|
212
226
|
hideClear: !1
|
|
213
227
|
}
|
|
214
228
|
)
|
|
@@ -217,5 +231,5 @@ function Me({
|
|
|
217
231
|
] });
|
|
218
232
|
}
|
|
219
233
|
export {
|
|
220
|
-
|
|
234
|
+
je as SimpleMultiSelect
|
|
221
235
|
};
|
|
@@ -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-
|
|
2
|
+
import { s as l } from "../../../styles.module-yIHBMSTk.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-
|
|
3
|
+
import { s as m } from "../../../styles.module-yIHBMSTk.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,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { s } from "../../../styles.module-
|
|
2
|
+
import { s } from "../../../styles.module-yIHBMSTk.js";
|
|
3
3
|
import o from "./OverflowMenuItem.js";
|
|
4
4
|
const a = ({ selected: m, maxChips: t = 2 }) => /* @__PURE__ */ r("div", { className: s["menu-list"], children: m?.map((e, l) => l < t ? null : /* @__PURE__ */ r(o, { item: e }, e?.value)) });
|
|
5
5
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { s as i } from "../../../styles.module-
|
|
2
|
+
import { s as i } from "../../../styles.module-yIHBMSTk.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,4 +1,4 @@
|
|
|
1
1
|
import { ResultProps } from '../_types/type';
|
|
2
|
-
declare const SearchResult: ({ totalResults, exclude, setExclude, isToggleDisable, showExcludeBtn, hideExclude, }: ResultProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const SearchResult: ({ totalResults, exclude, setExclude, isToggleDisable, showExcludeBtn, hideExclude, selectedCount, }: ResultProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SearchResult;
|
|
4
4
|
//# sourceMappingURL=SearchResult.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResult.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/SearchResult.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,QAAA,MAAM,YAAY,GAAI,
|
|
1
|
+
{"version":3,"file":"SearchResult.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/SearchResult.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,QAAA,MAAM,YAAY,GAAI,qGAQnB,WAAW,4CA6Bb,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,33 +1,43 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import { s as e } from "../../../styles.module-
|
|
3
|
-
import { Toggle as
|
|
4
|
-
import { mergeClasses as
|
|
5
|
-
const
|
|
6
|
-
totalResults:
|
|
7
|
-
exclude:
|
|
8
|
-
setExclude:
|
|
1
|
+
import { jsxs as s, Fragment as t, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { s as e } from "../../../styles.module-yIHBMSTk.js";
|
|
3
|
+
import { Toggle as o } from "../../Toggle/index.js";
|
|
4
|
+
import { mergeClasses as r } from "../../../utils/mergeClasses.js";
|
|
5
|
+
const f = ({
|
|
6
|
+
totalResults: c,
|
|
7
|
+
exclude: d,
|
|
8
|
+
setExclude: i,
|
|
9
9
|
isToggleDisable: m,
|
|
10
|
-
showExcludeBtn:
|
|
11
|
-
hideExclude:
|
|
10
|
+
showExcludeBtn: p,
|
|
11
|
+
hideExclude: n,
|
|
12
|
+
selectedCount: l
|
|
12
13
|
}) => /* @__PURE__ */ s("div", { className: e["result-wrapper"], children: [
|
|
13
|
-
/* @__PURE__ */ s("
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/* @__PURE__ */ s("div", { className: e["result-left"], children: [
|
|
15
|
+
/* @__PURE__ */ s("span", { className: r("ckds-cap-reg", e["result-count"]), children: [
|
|
16
|
+
c,
|
|
17
|
+
" ",
|
|
18
|
+
c === 1 ? "Result" : "Results"
|
|
19
|
+
] }),
|
|
20
|
+
l !== void 0 && l > 0 && /* @__PURE__ */ s(t, { children: [
|
|
21
|
+
/* @__PURE__ */ a("span", { className: e["result-pipe"] }),
|
|
22
|
+
/* @__PURE__ */ s("span", { className: r("ckds-cap-reg", e["result-selected"]), children: [
|
|
23
|
+
l,
|
|
24
|
+
" Selected"
|
|
25
|
+
] })
|
|
26
|
+
] })
|
|
17
27
|
] }),
|
|
18
|
-
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
28
|
+
p && !n && /* @__PURE__ */ s("div", { className: e["exclude-row"], children: [
|
|
29
|
+
/* @__PURE__ */ a("span", { className: r("ckds-cap-reg", e["exclude-label"]), children: "Exclude" }),
|
|
30
|
+
/* @__PURE__ */ a(
|
|
31
|
+
o,
|
|
22
32
|
{
|
|
23
33
|
size: "small",
|
|
24
|
-
checked:
|
|
25
|
-
onChange:
|
|
34
|
+
checked: d,
|
|
35
|
+
onChange: i,
|
|
26
36
|
disabled: m
|
|
27
37
|
}
|
|
28
38
|
)
|
|
29
39
|
] })
|
|
30
40
|
] });
|
|
31
41
|
export {
|
|
32
|
-
|
|
42
|
+
f as default
|
|
33
43
|
};
|
|
@@ -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-
|
|
4
|
+
import { s } from "../../../styles.module-yIHBMSTk.js";
|
|
5
5
|
import { Tooltip as R } from "../../Tooltip/index.js";
|
|
6
6
|
const j = v.memo(function({
|
|
7
7
|
label: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerButton.d.ts","sourceRoot":"","sources":["../../../../lib/components/MultiSelect/_helpers/TriggerButton.tsx"],"names":[],"mappings":"
|
|
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"}
|