@ck-ui/component-library 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DropdownFooter-CYkg2g5d.js +89 -0
- package/dist/{OptionList-BNaH2PnX.js → OptionList-DN1xZbnV.js} +29 -29
- package/dist/assets/DropdownFooter-DjdPf69A.css +1 -0
- package/dist/assets/index-B81zpOpq.css +1 -0
- package/dist/assets/index-BoQKDmZt.css +1 -0
- package/dist/assets/index-Cdmws__2.css +1 -0
- package/dist/assets/index-CtR-jzNi.css +1 -0
- package/dist/assets/index-PKpDB4Cl.css +1 -0
- package/dist/assets/index-i-aBFBOq.css +1 -0
- package/dist/assets/{styles-CbbBUzsN.css → styles-Bqfs9eXV.css} +1 -1
- package/dist/assets/styles-CYxKrBqL.css +1 -0
- package/dist/assets/styles-CZCmGNUn.css +1 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +53 -47
- package/dist/components/CKCheckbox/index.d.ts.map +1 -1
- package/dist/components/CKCheckbox/index.js +22 -21
- package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts +3 -1
- package/dist/components/CostComparatorTable/_helpers/CostCell.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/_helpers/CostCell.js +30 -28
- package/dist/components/CostComparatorTable/_helpers/HeaderCheckbox.js +1 -1
- package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts +7 -0
- package/dist/components/CostComparatorTable/_types/costComparatorTable.types.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/index.d.ts +1 -1
- package/dist/components/CostComparatorTable/index.d.ts.map +1 -1
- package/dist/components/CostComparatorTable/index.js +93 -85
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1685 -1651
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts +10 -0
- package/dist/components/DateRangePicker/_types/dateRangePicker.types.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.d.ts.map +1 -1
- package/dist/components/FusionChart/_config/builders.js +141 -141
- package/dist/components/FusionChart/_config/helpers.js +2 -2
- package/dist/components/FusionChart/_helpers/doughnutHelper.d.ts.map +1 -1
- package/dist/components/FusionChart/_helpers/doughnutHelper.js +56 -43
- package/dist/components/FusionChart/index.d.ts.map +1 -1
- package/dist/components/FusionChart/index.js +356 -340
- package/dist/components/Loader/_types/loader.types.d.ts +10 -0
- package/dist/components/Loader/_types/loader.types.d.ts.map +1 -0
- package/dist/components/Loader/_types/loader.types.js +1 -0
- package/dist/components/Loader/index.d.ts +6 -0
- package/dist/components/Loader/index.d.ts.map +1 -0
- package/dist/components/Loader/index.js +37 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts +27 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.d.ts.map +1 -0
- package/dist/components/MAVDropdown/_types/mavDropdown.types.js +1 -0
- package/dist/components/MAVDropdown/index.d.ts +6 -0
- package/dist/components/MAVDropdown/index.d.ts.map +1 -0
- package/dist/components/MAVDropdown/index.js +162 -0
- package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +33 -33
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts +22 -0
- package/dist/components/MultiSelect/SimpleMultiSelect.d.ts.map +1 -0
- package/dist/components/MultiSelect/SimpleMultiSelect.js +221 -0
- 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.js +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TagContent.js +20 -19
- package/dist/components/MultiSelect/_helpers/TriggerButton.d.ts.map +1 -1
- package/dist/components/MultiSelect/_helpers/TriggerButton.js +39 -34
- package/dist/components/MultiSelect/_types/type.d.ts +3 -0
- package/dist/components/MultiSelect/_types/type.d.ts.map +1 -1
- 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 +133 -131
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts +28 -0
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/_types/profileDropdown.types.js +13 -0
- package/dist/components/ProfileDropdown/constants.d.ts +3 -0
- package/dist/components/ProfileDropdown/constants.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/constants.js +8 -0
- package/dist/components/ProfileDropdown/index.d.ts +6 -0
- package/dist/components/ProfileDropdown/index.d.ts.map +1 -0
- package/dist/components/ProfileDropdown/index.js +154 -0
- package/dist/components/Search/index.js +35 -35
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts +2 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +7 -3
- package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts +2 -2
- package/dist/components/SingleSelectDropdown/_types/singleSelectDropdown.types.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.d.ts +1 -1
- package/dist/components/SingleSelectDropdown/index.d.ts.map +1 -1
- package/dist/components/SingleSelectDropdown/index.js +61 -57
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts +1 -0
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/ColumnConfig.js +39 -40
- package/dist/components/Table/_helpers/ColumnManager/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ColumnManager/index.js +453 -448
- package/dist/components/Table/_helpers/ExpandableRow/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/ExpandableRow/index.js +30 -20
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts +2 -2
- package/dist/components/Table/_helpers/GroupedHeader/index.d.ts.map +1 -1
- package/dist/components/Table/_helpers/GroupedHeader/index.js +79 -87
- package/dist/components/Table/_helpers/TableFilterModal/OptionList.js +1 -1
- package/dist/components/Table/_helpers/TableFilterModal/index.js +14 -14
- package/dist/components/Table/_helpers/TableRows.d.ts +1 -1
- package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
- package/dist/components/Table/_helpers/TableRows.js +288 -283
- package/dist/components/Table/_types/table.types.d.ts +9 -3
- package/dist/components/Table/_types/table.types.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.d.ts +3 -0
- package/dist/components/Table/_utils/table.utils.d.ts.map +1 -1
- package/dist/components/Table/_utils/table.utils.js +73 -23
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +382 -357
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +91 -81
- package/dist/styles.module-BXby6f8d.js +16 -0
- package/dist/styles.module-Dojg5FTS.js +41 -0
- package/package.json +1 -1
- package/dist/DropdownFooter-C20yRiDR.js +0 -84
- package/dist/assets/DropdownFooter-C7Cml53c.css +0 -1
- package/dist/assets/index-BQ0m7FKV.css +0 -1
- package/dist/assets/index-Dudb2XKF.css +0 -1
- package/dist/assets/index-w7AdSPwF.css +0 -1
- package/dist/assets/styles-BA66-SUu.css +0 -1
- package/dist/assets/styles-CflOKRvX.css +0 -1
- package/dist/styles.module-CCyijXTv.js +0 -16
- package/dist/styles.module-CmWIIYpK.js +0 -41
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface LoaderProps {
|
|
2
|
+
/** When true, renders a full-screen fixed backdrop with blur overlay */
|
|
3
|
+
popup?: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* When true, fills the nearest `position: relative` container.
|
|
6
|
+
* Used by the Table component to overlay only the table body area.
|
|
7
|
+
*/
|
|
8
|
+
overlay?: boolean;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=loader.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/Loader/_types/loader.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Loader/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,wBAAgB,MAAM,CAAC,EAAE,KAAa,EAAE,OAAe,EAAE,EAAE,WAAW,2CAsBrE;yBAtBe,MAAM"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { mergeClasses as r } from "../../utils/mergeClasses.js";
|
|
3
|
+
import '../../assets/index-i-aBFBOq.css';const l = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20style='margin:%20auto;%20background:%20none;%20display:%20block;%20shape-rendering:%20auto;'%20width='200px'%20height='200px'%20viewBox='0%200%20100%20100'%20preserveAspectRatio='xMidYMid'%3e%3crect%20x='17.5'%20y='30'%20width='15'%20height='40'%20fill='%2353daff'%3e%3canimate%20attributeName='y'%20repeatCount='indefinite'%20dur='1s'%20calcMode='spline'%20keyTimes='0;0.5;1'%20values='18;30;30'%20keySplines='0%200.5%200.5%201;0%200.5%200.5%201'%20begin='-0.2s'%3e%3c/animate%3e%3canimate%20attributeName='height'%20repeatCount='indefinite'%20dur='1s'%20calcMode='spline'%20keyTimes='0;0.5;1'%20values='64;40;40'%20keySplines='0%200.5%200.5%201;0%200.5%200.5%201'%20begin='-0.2s'%3e%3c/animate%3e%3c/rect%3e%3crect%20x='42.5'%20y='30'%20width='15'%20height='40'%20fill='%23337ab7'%3e%3canimate%20attributeName='y'%20repeatCount='indefinite'%20dur='1s'%20calcMode='spline'%20keyTimes='0;0.5;1'%20values='20.999999999999996;30;30'%20keySplines='0%200.5%200.5%201;0%200.5%200.5%201'%20begin='-0.1s'%3e%3c/animate%3e%3canimate%20attributeName='height'%20repeatCount='indefinite'%20dur='1s'%20calcMode='spline'%20keyTimes='0;0.5;1'%20values='58.00000000000001;40;40'%20keySplines='0%200.5%200.5%201;0%200.5%200.5%201'%20begin='-0.1s'%3e%3c/animate%3e%3c/rect%3e%3crect%20x='67.5'%20y='30'%20width='15'%20height='40'%20fill='%230a3ca2'%3e%3canimate%20attributeName='y'%20repeatCount='indefinite'%20dur='1s'%20calcMode='spline'%20keyTimes='0;0.5;1'%20values='20.999999999999996;30;30'%20keySplines='0%200.5%200.5%201;0%200.5%200.5%201'%3e%3c/animate%3e%3canimate%20attributeName='height'%20repeatCount='indefinite'%20dur='1s'%20calcMode='spline'%20keyTimes='0;0.5;1'%20values='58.00000000000001;40;40'%20keySplines='0%200.5%200.5%201;0%200.5%200.5%201'%3e%3c/animate%3e%3c/rect%3e%3c!--%20[ldio]%20generated%20by%20https://loading.io/%20--%3e%3c/svg%3e", o = "_loader_wrapper_19w2u_1", n = "_loader_19w2u_1", e = {
|
|
4
|
+
loader_wrapper: o,
|
|
5
|
+
"loader-overlay": "_loader-overlay_19w2u_8",
|
|
6
|
+
loader: n,
|
|
7
|
+
"loader-backdrop": "_loader-backdrop_19w2u_27",
|
|
8
|
+
"loader-logo": "_loader-logo_19w2u_47"
|
|
9
|
+
};
|
|
10
|
+
function s({ popup: i = !1, overlay: t = !1 }) {
|
|
11
|
+
return /* @__PURE__ */ a(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: r(
|
|
15
|
+
e.loader_wrapper,
|
|
16
|
+
i ? e["loader-backdrop"] : "",
|
|
17
|
+
t ? e["loader-overlay"] : ""
|
|
18
|
+
),
|
|
19
|
+
"data-testid": "loader-wrapper",
|
|
20
|
+
id: "loader",
|
|
21
|
+
children: /* @__PURE__ */ a("div", { className: e.loader, children: /* @__PURE__ */ a(
|
|
22
|
+
"img",
|
|
23
|
+
{
|
|
24
|
+
className: e["loader-logo"],
|
|
25
|
+
src: l,
|
|
26
|
+
alt: "loader",
|
|
27
|
+
role: "status",
|
|
28
|
+
"aria-label": "Loading"
|
|
29
|
+
}
|
|
30
|
+
) })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
s.displayName = "Loader";
|
|
35
|
+
export {
|
|
36
|
+
s as Loader
|
|
37
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface MAVItem {
|
|
2
|
+
/** Unique identifier for the MAV entry */
|
|
3
|
+
key: string;
|
|
4
|
+
/** Display label, e.g. "OutSystems" */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Sub-label shown below the main label, e.g. account ID */
|
|
7
|
+
subLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MAVDropdownProps {
|
|
10
|
+
/** Top-level label shown in the trigger, e.g. "MAV" */
|
|
11
|
+
triggerLabel?: string;
|
|
12
|
+
/** Currently selected MAV item */
|
|
13
|
+
selectedItem: MAVItem;
|
|
14
|
+
/** Full list of MAV items to show in the dropdown */
|
|
15
|
+
items: MAVItem[];
|
|
16
|
+
/** Called when the user clicks a different MAV item */
|
|
17
|
+
onSelect: (item: MAVItem) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Max height of the item container. Items fill up to this height then wrap
|
|
20
|
+
* into the next column. The panel scrolls horizontally for overflow.
|
|
21
|
+
* @default "200px"
|
|
22
|
+
*/
|
|
23
|
+
listHeight?: string;
|
|
24
|
+
/** Additional class name for the root element */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=mavDropdown.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mavDropdown.types.d.ts","sourceRoot":"","sources":["../../../../lib/components/MAVDropdown/_types/mavDropdown.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,0CAA0C;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,uDAAuD;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MAVDropdownProps } from './_types/mavDropdown.types';
|
|
2
|
+
export declare function MAVDropdown({ triggerLabel, selectedItem, items, onSelect, listHeight, className, }: MAVDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace MAVDropdown {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/MAVDropdown/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAW,MAAM,4BAA4B,CAAC;AA4B5E,wBAAgB,WAAW,CAAC,EAC1B,YAAoB,EACpB,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,UAAoB,EACpB,SAAS,GACV,EAAE,gBAAgB,2CAqIlB;yBA5Ie,WAAW"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useRef as v, useCallback as D } from "react";
|
|
3
|
+
import { Popover as C } from "../Popover/index.js";
|
|
4
|
+
import { Tooltip as M } from "../Tooltip/index.js";
|
|
5
|
+
import { mergeClasses as u } from "../../utils/mergeClasses.js";
|
|
6
|
+
import { S as A } from "../../chevron-down-Cm9R64Fe.js";
|
|
7
|
+
import '../../assets/index-PKpDB4Cl.css';const s = {
|
|
8
|
+
"ckds-mav-dropdown": "_ckds-mav-dropdown_1w4zu_1",
|
|
9
|
+
"ckds-mav-trigger": "_ckds-mav-trigger_1w4zu_7",
|
|
10
|
+
"ckds-mav-trigger--open": "_ckds-mav-trigger--open_1w4zu_19",
|
|
11
|
+
"ckds-mav-trigger-content": "_ckds-mav-trigger-content_1w4zu_27",
|
|
12
|
+
"ckds-mav-trigger-label": "_ckds-mav-trigger-label_1w4zu_34",
|
|
13
|
+
"ckds-mav-trigger-selected": "_ckds-mav-trigger-selected_1w4zu_42",
|
|
14
|
+
"ckds-mav-chevron": "_ckds-mav-chevron_1w4zu_52",
|
|
15
|
+
"ckds-mav-chevron--open": "_ckds-mav-chevron--open_1w4zu_65",
|
|
16
|
+
"ckds-mav-popover": "_ckds-mav-popover_1w4zu_69",
|
|
17
|
+
"ckds-mav-item-list": "_ckds-mav-item-list_1w4zu_77",
|
|
18
|
+
"ckds-mav-item": "_ckds-mav-item_1w4zu_77",
|
|
19
|
+
"ckds-mav-item-label": "_ckds-mav-item-label_1w4zu_110",
|
|
20
|
+
"ckds-mav-item-sublabel": "_ckds-mav-item-sublabel_1w4zu_113",
|
|
21
|
+
"ckds-mav-item--active": "_ckds-mav-item--active_1w4zu_121"
|
|
22
|
+
};
|
|
23
|
+
function z({ text: t, className: n }) {
|
|
24
|
+
const r = v(null), [k, o] = h(!1);
|
|
25
|
+
return /* @__PURE__ */ a(M, { title: k ? t : "", placement: "top", children: /* @__PURE__ */ a(
|
|
26
|
+
"span",
|
|
27
|
+
{
|
|
28
|
+
ref: r,
|
|
29
|
+
className: n,
|
|
30
|
+
onMouseEnter: () => {
|
|
31
|
+
r.current && r.current.scrollWidth > r.current.clientWidth && o(!0);
|
|
32
|
+
},
|
|
33
|
+
onMouseLeave: () => o(!1),
|
|
34
|
+
children: t
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
function R({
|
|
39
|
+
triggerLabel: t = "MAV",
|
|
40
|
+
selectedItem: n,
|
|
41
|
+
items: r,
|
|
42
|
+
onSelect: k,
|
|
43
|
+
listHeight: o = "200px",
|
|
44
|
+
className: f
|
|
45
|
+
}) {
|
|
46
|
+
const [l, c] = h(!1), [N, x] = h(!1), g = v(null), i = v(null), p = v(null), E = D(() => {
|
|
47
|
+
i.current && x(i.current.scrollWidth > i.current.clientWidth);
|
|
48
|
+
}, []), b = () => {
|
|
49
|
+
p.current && clearTimeout(p.current), c(!0);
|
|
50
|
+
}, w = () => {
|
|
51
|
+
p.current = setTimeout(() => c(!1), 120);
|
|
52
|
+
}, T = (e) => {
|
|
53
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c((d) => !d)), e.key === "Escape" && c(!1);
|
|
54
|
+
}, y = (e) => {
|
|
55
|
+
k(e), c(!1);
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ m(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: u(s["ckds-mav-dropdown"], f),
|
|
61
|
+
onMouseEnter: b,
|
|
62
|
+
onMouseLeave: w,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ m(
|
|
65
|
+
"button",
|
|
66
|
+
{
|
|
67
|
+
ref: g,
|
|
68
|
+
type: "button",
|
|
69
|
+
className: u(
|
|
70
|
+
s["ckds-mav-trigger"],
|
|
71
|
+
l && s["ckds-mav-trigger--open"]
|
|
72
|
+
),
|
|
73
|
+
onKeyDown: T,
|
|
74
|
+
"aria-haspopup": "listbox",
|
|
75
|
+
"aria-expanded": l,
|
|
76
|
+
"aria-label": `${t}: ${n.label}, open MAV selector`,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ m("span", { className: s["ckds-mav-trigger-content"], children: [
|
|
79
|
+
/* @__PURE__ */ a("span", { className: s["ckds-mav-trigger-label"], children: t }),
|
|
80
|
+
/* @__PURE__ */ a(M, { title: N ? n.label : "", placement: "bottom", children: /* @__PURE__ */ a(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
ref: i,
|
|
84
|
+
className: s["ckds-mav-trigger-selected"],
|
|
85
|
+
onMouseEnter: E,
|
|
86
|
+
children: n.label
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ a(
|
|
91
|
+
"span",
|
|
92
|
+
{
|
|
93
|
+
className: u(
|
|
94
|
+
s["ckds-mav-chevron"],
|
|
95
|
+
l && s["ckds-mav-chevron--open"]
|
|
96
|
+
),
|
|
97
|
+
"aria-hidden": "true",
|
|
98
|
+
children: /* @__PURE__ */ a(A, {})
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ a(
|
|
105
|
+
C,
|
|
106
|
+
{
|
|
107
|
+
open: l,
|
|
108
|
+
onClose: () => c(!1),
|
|
109
|
+
anchorRef: g,
|
|
110
|
+
align: "left",
|
|
111
|
+
minWidth: "0",
|
|
112
|
+
className: s["ckds-mav-popover"],
|
|
113
|
+
children: /* @__PURE__ */ a(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
onMouseEnter: b,
|
|
117
|
+
onMouseLeave: w,
|
|
118
|
+
children: /* @__PURE__ */ a(
|
|
119
|
+
"ul",
|
|
120
|
+
{
|
|
121
|
+
role: "listbox",
|
|
122
|
+
"aria-label": `${t} options`,
|
|
123
|
+
className: s["ckds-mav-item-list"],
|
|
124
|
+
style: { maxHeight: o },
|
|
125
|
+
children: r.map((e) => {
|
|
126
|
+
const d = e.key === n.key;
|
|
127
|
+
return /* @__PURE__ */ m(
|
|
128
|
+
"li",
|
|
129
|
+
{
|
|
130
|
+
role: "option",
|
|
131
|
+
"aria-selected": d,
|
|
132
|
+
className: u(
|
|
133
|
+
s["ckds-mav-item"],
|
|
134
|
+
d && s["ckds-mav-item--active"]
|
|
135
|
+
),
|
|
136
|
+
onClick: () => y(e),
|
|
137
|
+
onKeyDown: (_) => {
|
|
138
|
+
(_.key === "Enter" || _.key === " ") && (_.preventDefault(), y(e));
|
|
139
|
+
},
|
|
140
|
+
tabIndex: 0,
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ a(z, { text: e.label, className: s["ckds-mav-item-label"] }),
|
|
143
|
+
e.subLabel && /* @__PURE__ */ a(z, { text: e.subLabel, className: s["ckds-mav-item-sublabel"] })
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
e.key
|
|
147
|
+
);
|
|
148
|
+
})
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
R.displayName = "MAVDropdown";
|
|
160
|
+
export {
|
|
161
|
+
R as MAVDropdown
|
|
162
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, Fragment as _, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { DeviationTag as m } from "../../../DeviationTag/index.js";
|
|
3
|
-
import '../../../../assets/index-YHUWVH17.css';const g = "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", v = "_card_12h7m_1",
|
|
3
|
+
import '../../../../assets/index-YHUWVH17.css';const g = "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", v = "_card_12h7m_1", f = "_icon_12h7m_19", p = "_title_12h7m_22", u = "_value_12h7m_36", N = "_forecast_12h7m_48", e = {
|
|
4
4
|
card: v,
|
|
5
|
-
icon:
|
|
6
|
-
title:
|
|
5
|
+
icon: f,
|
|
6
|
+
title: p,
|
|
7
7
|
"action-link": "_action-link_12h7m_29",
|
|
8
8
|
value: u,
|
|
9
9
|
"date-range": "_date-range_12h7m_43",
|
|
@@ -12,51 +12,51 @@ import '../../../../assets/index-YHUWVH17.css';const g = "data:image/svg+xml,%3c
|
|
|
12
12
|
"regular-card": "_regular-card_12h7m_54",
|
|
13
13
|
"secondary-section": "_secondary-section_12h7m_58"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
icon:
|
|
17
|
-
title:
|
|
18
|
-
value:
|
|
19
|
-
dateRange:
|
|
20
|
-
deviationChip:
|
|
21
|
-
forecastValue:
|
|
15
|
+
function x({
|
|
16
|
+
icon: t,
|
|
17
|
+
title: l,
|
|
18
|
+
value: i,
|
|
19
|
+
dateRange: o,
|
|
20
|
+
deviationChip: c,
|
|
21
|
+
forecastValue: n,
|
|
22
22
|
className: h,
|
|
23
|
-
actionLink:
|
|
23
|
+
actionLink: s,
|
|
24
24
|
secondarySection: d
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ a(_, { children: [
|
|
27
|
+
/* @__PURE__ */ a(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
|
-
className: `${e.card} ${
|
|
30
|
+
className: `${e.card} ${n ? e.forecast : ""} ${h}`,
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
/* @__PURE__ */ a("div", { className: e["regular-card"], children: [
|
|
33
|
+
(t || l) && /* @__PURE__ */ a("div", { className: e.header, children: [
|
|
34
|
+
t && /* @__PURE__ */ r("div", { className: e.icon, children: t }),
|
|
35
|
+
l && /* @__PURE__ */ r("div", { className: e.title, children: l })
|
|
36
36
|
] }),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
i && /* @__PURE__ */ r("div", { className: e.value, children: i }),
|
|
38
|
+
o && /* @__PURE__ */ r("div", { className: e["date-range"], children: o }),
|
|
39
|
+
c && /* @__PURE__ */ r(
|
|
40
40
|
m,
|
|
41
41
|
{
|
|
42
|
-
price: "
|
|
43
|
-
percentage:
|
|
44
|
-
arrowDirection:
|
|
45
|
-
arrowColor: "green"
|
|
42
|
+
price: c.price ?? "",
|
|
43
|
+
percentage: c.percentage ?? "",
|
|
44
|
+
arrowDirection: c.arrowDirection,
|
|
45
|
+
arrowColor: c.arrowColor ?? "green"
|
|
46
46
|
}
|
|
47
47
|
)
|
|
48
48
|
] }),
|
|
49
|
-
|
|
49
|
+
n && /* @__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: n })
|
|
52
52
|
] }),
|
|
53
|
-
|
|
53
|
+
s?.href && /* @__PURE__ */ r(
|
|
54
54
|
"a",
|
|
55
55
|
{
|
|
56
|
-
href:
|
|
57
|
-
target:
|
|
56
|
+
href: s?.href,
|
|
57
|
+
target: s?.target ?? "_blank",
|
|
58
58
|
rel: "noreferrer",
|
|
59
|
-
className: `${e["action-link"]} ${
|
|
59
|
+
className: `${e["action-link"]} ${s?.className}`,
|
|
60
60
|
children: /* @__PURE__ */ r("img", { src: g, alt: "Redirection Link" })
|
|
61
61
|
}
|
|
62
62
|
)
|
|
@@ -67,5 +67,5 @@ function C({
|
|
|
67
67
|
] });
|
|
68
68
|
}
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
x as CardWithIconAndForecast
|
|
71
71
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MultiSelectOption, ClassNames } from './_types/type';
|
|
2
|
+
export interface SimpleMultiSelectProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
helperText?: React.ReactNode;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
searchPlaceholder?: string;
|
|
8
|
+
/** Custom label for the "Select all" checkbox. Defaults to "Select all". */
|
|
9
|
+
selectAllLabel?: string;
|
|
10
|
+
options: MultiSelectOption[];
|
|
11
|
+
defaultSelected?: MultiSelectOption[];
|
|
12
|
+
onApply: (selected: MultiSelectOption[], exclude: boolean) => void;
|
|
13
|
+
exclude: boolean;
|
|
14
|
+
setExclude: React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
|
+
onSelect?: () => void;
|
|
16
|
+
onClear?: () => void;
|
|
17
|
+
classNames?: ClassNames;
|
|
18
|
+
showExcludeBtn?: boolean;
|
|
19
|
+
width?: string | number;
|
|
20
|
+
}
|
|
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;
|
|
22
|
+
//# sourceMappingURL=SimpleMultiSelect.d.ts.map
|
|
@@ -0,0 +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;AAKjF,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,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,GACX,EAAE,sBAAsB,2CAiPxB"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { jsxs as c, jsx as t, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as re, useEffect as ne, useMemo as ae, useCallback as i } from "react";
|
|
3
|
+
import { s as r } from "../../styles.module-Dojg5FTS.js";
|
|
4
|
+
import { Search as oe } from "../Search/index.js";
|
|
5
|
+
import { S as ce } from "../../info-icon-ooYw3va_.js";
|
|
6
|
+
import { CKCheckbox as ie } from "../CKCheckbox/index.js";
|
|
7
|
+
import de from "./_helpers/TriggerButton.js";
|
|
8
|
+
import me from "./_helpers/OptionRow.js";
|
|
9
|
+
import he from "./_helpers/SearchResult.js";
|
|
10
|
+
import ue from "./_helpers/DropdownFooter.js";
|
|
11
|
+
import { getInitialSelected as J } from "./_utils/getInitialSelected.js";
|
|
12
|
+
import { filterOptions as ge } from "./_utils/filterOptions.js";
|
|
13
|
+
import { mergeClasses as d } from "../../utils/mergeClasses.js";
|
|
14
|
+
function Me({
|
|
15
|
+
label: x,
|
|
16
|
+
helperText: S,
|
|
17
|
+
required: L,
|
|
18
|
+
placeholder: Q = "Choose parameter",
|
|
19
|
+
searchPlaceholder: W = "Search",
|
|
20
|
+
selectAllLabel: M = "Select all",
|
|
21
|
+
options: s,
|
|
22
|
+
defaultSelected: A = [],
|
|
23
|
+
onApply: T,
|
|
24
|
+
exclude: b,
|
|
25
|
+
setExclude: q,
|
|
26
|
+
onSelect: D,
|
|
27
|
+
onClear: E,
|
|
28
|
+
classNames: m = {},
|
|
29
|
+
showExcludeBtn: B,
|
|
30
|
+
width: K = ""
|
|
31
|
+
}) {
|
|
32
|
+
const { labelWrapperClass: P, helperClass: G } = m, [w, p] = u(!1), [C, v] = u(""), [n, I] = u(
|
|
33
|
+
() => J(A)
|
|
34
|
+
), [a, g] = u(
|
|
35
|
+
() => J(A)
|
|
36
|
+
), [H, f] = u(!1), [U, o] = u(!1), k = re(null);
|
|
37
|
+
ne(() => {
|
|
38
|
+
const e = (l) => {
|
|
39
|
+
k.current && !k.current.contains(l.target) && (g(n), f(n?.length === s?.length), p(!1), o(!1), v(""));
|
|
40
|
+
};
|
|
41
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
42
|
+
}, [n, s.length]);
|
|
43
|
+
const y = ae(
|
|
44
|
+
() => ge(s, C),
|
|
45
|
+
[s, C]
|
|
46
|
+
), j = 2, z = i(
|
|
47
|
+
(e, l, h, se) => {
|
|
48
|
+
h || o(!1);
|
|
49
|
+
const F = (N) => {
|
|
50
|
+
const O = N?.some((R) => R?.value === e) ? N?.filter((R) => R?.value !== e) : [...N, { value: e, label: l }];
|
|
51
|
+
return f(O?.length === s?.length), O?.length <= j && o(!1), O;
|
|
52
|
+
};
|
|
53
|
+
se && I(F), g(F), D?.();
|
|
54
|
+
},
|
|
55
|
+
[s.length, D]
|
|
56
|
+
), V = i(() => {
|
|
57
|
+
o(!1), f((e) => {
|
|
58
|
+
const l = !e;
|
|
59
|
+
return g(
|
|
60
|
+
l ? s?.map((h) => ({ value: h?.value, label: h?.label })) : []
|
|
61
|
+
), l;
|
|
62
|
+
});
|
|
63
|
+
}, [s]), X = i(() => {
|
|
64
|
+
g([]), f(!1), E?.();
|
|
65
|
+
}, [E]), Y = i(() => {
|
|
66
|
+
const e = s?.filter((l) => a?.some((h) => h?.value === l?.value))?.map((l) => ({ ...l, isChecked: !0 }));
|
|
67
|
+
T(e, b), I(a), p(!1);
|
|
68
|
+
}, [s, a, b, T]), Z = i(() => {
|
|
69
|
+
g(n), f(n?.length === s?.length), o(!1), p(!1), v("");
|
|
70
|
+
}, [n, s.length]), _ = i(() => {
|
|
71
|
+
p((e) => !e), o(!1);
|
|
72
|
+
}, []), $ = i((e) => {
|
|
73
|
+
e.stopPropagation(), o((l) => !l);
|
|
74
|
+
}, []), ee = JSON.stringify(a) === JSON.stringify(n), le = w ? a : n;
|
|
75
|
+
return /* @__PURE__ */ c("div", { className: r["ckds-wrapper"], style: { width: K }, children: [
|
|
76
|
+
x && /* @__PURE__ */ c(
|
|
77
|
+
"span",
|
|
78
|
+
{
|
|
79
|
+
className: d(
|
|
80
|
+
"ckds-body-xs-med",
|
|
81
|
+
r["label-wrapper"],
|
|
82
|
+
P ?? ""
|
|
83
|
+
),
|
|
84
|
+
children: [
|
|
85
|
+
x,
|
|
86
|
+
L && /* @__PURE__ */ t("span", { className: r.required, children: " *" })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ c("div", { className: r["trigger-wrapper"], ref: k, children: [
|
|
91
|
+
/* @__PURE__ */ t(
|
|
92
|
+
de,
|
|
93
|
+
{
|
|
94
|
+
open: w,
|
|
95
|
+
selected: le,
|
|
96
|
+
placeholder: Q,
|
|
97
|
+
showMenu: U,
|
|
98
|
+
isAllSelected: !1,
|
|
99
|
+
selectAllLabel: M,
|
|
100
|
+
onToggleOpen: _,
|
|
101
|
+
onToggleMenu: $,
|
|
102
|
+
onRemove: z,
|
|
103
|
+
classNames: m,
|
|
104
|
+
maxChips: j
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
S && /* @__PURE__ */ t(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: d(
|
|
111
|
+
"ckds-body-xs-reg",
|
|
112
|
+
r["helper-text"],
|
|
113
|
+
G ?? ""
|
|
114
|
+
),
|
|
115
|
+
children: /* @__PURE__ */ c(te, { children: [
|
|
116
|
+
/* @__PURE__ */ t(ce, { width: "12", height: "12" }),
|
|
117
|
+
" ",
|
|
118
|
+
S
|
|
119
|
+
] })
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
w && /* @__PURE__ */ c("div", { className: d(r.dropdown, S ? r["dropdown-helper"] : ""), children: [
|
|
123
|
+
/* @__PURE__ */ t(
|
|
124
|
+
oe,
|
|
125
|
+
{
|
|
126
|
+
size: "medium",
|
|
127
|
+
value: C,
|
|
128
|
+
placeholder: W,
|
|
129
|
+
onChange: v,
|
|
130
|
+
onClear: () => v(""),
|
|
131
|
+
wrapperClassName: "",
|
|
132
|
+
inputClassName: ""
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ t(
|
|
136
|
+
he,
|
|
137
|
+
{
|
|
138
|
+
totalResults: y?.length,
|
|
139
|
+
exclude: b,
|
|
140
|
+
setExclude: q,
|
|
141
|
+
isToggleDisable: a?.length === 0,
|
|
142
|
+
showExcludeBtn: B,
|
|
143
|
+
hideExclude: !1
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ t("div", { className: r.divider }),
|
|
147
|
+
/* @__PURE__ */ c(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
className: d(
|
|
151
|
+
r["ckds-options-list"],
|
|
152
|
+
m?.optionsListWrapperClass ?? ""
|
|
153
|
+
),
|
|
154
|
+
children: [
|
|
155
|
+
C.length === 0 && /* @__PURE__ */ c(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
className: d(
|
|
159
|
+
r["option-row"],
|
|
160
|
+
m?.optionRowClass ?? ""
|
|
161
|
+
),
|
|
162
|
+
onClick: V,
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ t(ie, { checked: H, size: "md" }),
|
|
165
|
+
/* @__PURE__ */ t(
|
|
166
|
+
"span",
|
|
167
|
+
{
|
|
168
|
+
className: d(
|
|
169
|
+
"ckds-body-sm-reg",
|
|
170
|
+
r["option-label"]
|
|
171
|
+
),
|
|
172
|
+
children: M
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
y?.length === 0 ? /* @__PURE__ */ t(
|
|
179
|
+
"span",
|
|
180
|
+
{
|
|
181
|
+
className: d(
|
|
182
|
+
"ckds-body-sm-reg",
|
|
183
|
+
r["no-results"]
|
|
184
|
+
),
|
|
185
|
+
children: "No results found"
|
|
186
|
+
}
|
|
187
|
+
) : y?.map((e) => /* @__PURE__ */ t(
|
|
188
|
+
me,
|
|
189
|
+
{
|
|
190
|
+
value: e?.value,
|
|
191
|
+
label: e?.label,
|
|
192
|
+
checked: a?.some(
|
|
193
|
+
(l) => l?.value === e?.value
|
|
194
|
+
),
|
|
195
|
+
onToggle: z,
|
|
196
|
+
classNames: m
|
|
197
|
+
},
|
|
198
|
+
e?.value
|
|
199
|
+
))
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
/* @__PURE__ */ t(
|
|
204
|
+
ue,
|
|
205
|
+
{
|
|
206
|
+
onClear: X,
|
|
207
|
+
onCancel: Z,
|
|
208
|
+
onApply: Y,
|
|
209
|
+
classNames: m,
|
|
210
|
+
isClearDisabled: a?.length === 0,
|
|
211
|
+
isApplyDisabled: ee,
|
|
212
|
+
hideClear: !1
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
] })
|
|
216
|
+
] })
|
|
217
|
+
] });
|
|
218
|
+
}
|
|
219
|
+
export {
|
|
220
|
+
Me as SimpleMultiSelect
|
|
221
|
+
};
|
|
@@ -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-Dojg5FTS.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-Dojg5FTS.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-Dojg5FTS.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 {
|