@hortiview/shared-components 0.0.11176 → 0.0.11587
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/README.md +58 -8
- package/dist/BigLoadingSpinner-iegTbDcD.js +16 -0
- package/dist/GenericCard-6J558OgP.js +350 -0
- package/dist/ListAreaService-DOwtdRa4.js +109 -0
- package/dist/_MapCache-B75yWNNd.js +376 -0
- package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
- package/dist/_getTag-BCf9b56Z.js +81 -0
- package/dist/animationframe-EMBh6XeO.js +54 -0
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/Select.css +1 -0
- package/dist/component-DsB0poTj.js +571 -0
- package/dist/component-neHBNHRu.js +114 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
- package/dist/components/AlertBanner/AlertBanner.js +15 -15
- package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +27 -28
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
- package/dist/components/BasicHeading/BasicHeading.js +17 -17
- package/dist/components/BasicHeading/BasicHeading.test.js +10 -10
- package/dist/components/BlockView/BlockView.d.ts +1 -0
- package/dist/components/BlockView/BlockView.js +24 -25
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +1765 -15
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
- package/dist/components/ContextMenu/ContextMenu.js +28 -28
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
- package/dist/components/DeleteModal/DeleteModal.js +53 -51
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +12 -11
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.d.ts +1 -0
- package/dist/components/EmptyView/EmptyView.js +258 -19
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.d.ts +1 -0
- package/dist/components/Filter/Filter.js +81 -77
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5975 -6389
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +13 -14
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +2 -2
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
- package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
- package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +28 -28
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -0
- package/dist/components/GenericTable/GenericTable.js +10487 -76
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
- package/dist/components/GenericTable/GenericTableService.js +41 -41
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.d.ts +6 -1
- package/dist/components/HashTabView/HashTabView.js +1805 -72
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +14 -14
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +19 -17
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.d.ts +2 -3
- package/dist/components/Iconify/Iconify.js +44 -45
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
- package/dist/components/InfoGroup/InfoGroup.js +30 -29
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +29 -27
- package/dist/components/ListArea/ListArea.test.js +5 -5
- package/dist/components/ListArea/ListAreaService.d.ts +9 -8
- package/dist/components/ListArea/ListAreaService.js +7 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -38
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Modal/Modal.js +926 -10
- package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
- package/dist/components/ModulePadding/ModulePadding.js +28 -0
- package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
- package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +13 -14
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
- package/dist/components/Scrollbar/Scrollbar.js +5 -6
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +11 -11
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/Select.js +34 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +28 -0
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/floating-ui.dom-CeD8zknG.js +978 -0
- package/dist/get-7ACccM2X.js +114 -0
- package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +1 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-DLWZln-X.js +1763 -0
- package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
- package/dist/index.es-0lQcz8m1.js +444 -0
- package/dist/index.es-25EARqhH.js +2027 -0
- package/dist/index.es-3043KTnb.js +1066 -0
- package/dist/index.es-41ztjcFT.js +724 -0
- package/dist/index.es-6TJ1S8Jr.js +954 -0
- package/dist/index.es-8GOVkuo-.js +374 -0
- package/dist/index.es-B-_jXDuz.js +216 -0
- package/dist/index.es-BWgXLqXn.js +102 -0
- package/dist/index.es-BtjV0oNv.js +360 -0
- package/dist/index.es-BvrQnJ3j.js +509 -0
- package/dist/index.es-CF_xy2ns.js +674 -0
- package/dist/index.es-CL_Heu1n.js +54 -0
- package/dist/index.es-CiqbARoC.js +306 -0
- package/dist/index.es-D-CKRzIB.js +63 -0
- package/dist/index.es-D6N-XWHe.js +56 -0
- package/dist/index.es-DKDgy7Kt.js +45 -0
- package/dist/index.es-DntoATwO.js +159 -0
- package/dist/index.es-UHKFl8Da.js +7075 -0
- package/dist/index.es-d5xhUpJZ.js +3242 -0
- package/dist/index.es-da0cf7oE.js +569 -0
- package/dist/index.es-h2lMdt7G.js +107 -0
- package/dist/index.es-zr101OF5.js +4853 -0
- package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
- package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/isEmpty-B4GG2s-V.js +31 -0
- package/dist/isPlainObject-C273y67K.js +40 -0
- package/dist/isString-BW9UHONv.js +21 -0
- package/dist/keyboard-Bpt0aBqQ.js +107 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +58 -54
- package/dist/orderBy-Bd48bw88.js +316 -0
- package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
- package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
- package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
- package/dist/services/BlockService.d.ts +1 -0
- package/dist/services/NumberService.d.ts +1 -0
- package/dist/services/UtilService.d.ts +1 -0
- package/dist/services/UtilService.js +2 -2
- package/dist/services/services.test.js +1 -1
- package/dist/toString-CrgB_7Pe.js +54 -0
- package/dist/tslib.es6-BDCynO9F.js +162 -0
- package/dist/types/GenericTable.d.ts +2 -2
- package/dist/types/HashTab.d.ts +0 -1
- package/dist/types/ListElement.d.ts +0 -1
- package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
- package/dist/uniqueId-NU3-C36A.js +18 -0
- package/dist/util-DA21pZXj.js +78 -0
- package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
- package/package.json +15 -15
- package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
- package/dist/GenericCard-B8x1DMa8.js +0 -81
- package/dist/ListAreaService-CRX4eEUJ.js +0 -108
- package/dist/_Map-Dtlps7IZ.js +0 -113
- package/dist/_overArg-_0pUmCsX.js +0 -14
- package/dist/get-P-5PYZOE.js +0 -426
- package/dist/isEmpty-BimaZd5G.js +0 -225
- package/dist/isString-BOHPtrlm.js +0 -44
- package/dist/orderBy-BVQIswlJ.js +0 -765
- package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Provides a responsive padding component for modules according to the HV platform UI guidelines, based on the Bayer Element padding component.
|
|
5
|
+
* @param children - The module content to be rendered in the module padding
|
|
6
|
+
*/
|
|
7
|
+
export declare const ModulePadding: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { P as r } from "../../index.es-D-CKRzIB.js";
|
|
3
|
+
import '../../assets/main.css';/* empty css */
|
|
4
|
+
import { u as m } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../../isEmpty-B4GG2s-V.js";
|
|
7
|
+
import "../../react-tooltip.min-DSY6KDqS.js";
|
|
8
|
+
import "../../orderBy-Bd48bw88.js";
|
|
9
|
+
import "../../uniqueId-NU3-C36A.js";
|
|
10
|
+
import "react-hook-form";
|
|
11
|
+
import "../../get-DFv1gXfq.js";
|
|
12
|
+
import "../../isArray-Dub1wGJM.js";
|
|
13
|
+
import "../../isString-BW9UHONv.js";
|
|
14
|
+
const x = ({ children: o }) => {
|
|
15
|
+
const { isDesktop: t } = m();
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
|
+
r,
|
|
18
|
+
{
|
|
19
|
+
id: "module-padding",
|
|
20
|
+
"data-testid": "module-padding",
|
|
21
|
+
variant: t ? "standard" : "dense",
|
|
22
|
+
children: o
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
x as ModulePadding
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { a as o, s as e } from "../../react.esm-DNwojocF.js";
|
|
3
|
+
import { a } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
4
|
+
import { ModulePadding as d } from "./ModulePadding.js";
|
|
5
|
+
import { d as r, t as i, v as n, g as s } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
6
|
+
r("ModulePadding Test", () => {
|
|
7
|
+
i("should render with padding of 16px for desktop", () => {
|
|
8
|
+
n.spyOn(a, "useBreakpoints").mockReturnValue({
|
|
9
|
+
isMobile: !1,
|
|
10
|
+
isTablet: !1,
|
|
11
|
+
isDesktop: !0,
|
|
12
|
+
isDesktopNavbar: !0
|
|
13
|
+
}), o(/* @__PURE__ */ t(d, { children: "Content" })), e.debug(), s(e.getByText("Content")).toBeInTheDocument(), s(e.getByTestId("module-padding")).toHaveClass("lmnt-padding--standard");
|
|
14
|
+
}), i("should render with padding of 8px for mobile", () => {
|
|
15
|
+
n.spyOn(a, "useBreakpoints").mockReturnValue({
|
|
16
|
+
isMobile: !0,
|
|
17
|
+
isTablet: !1,
|
|
18
|
+
isDesktop: !1,
|
|
19
|
+
isDesktopNavbar: !1
|
|
20
|
+
}), o(/* @__PURE__ */ t(d, { children: "Content" })), s(e.getByTestId("module-padding")).toHaveClass("lmnt-padding--dense");
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import { TypoBody as p } from "@element/react-components";
|
|
1
|
+
import { jsxs as a, Fragment as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { b as p } from "../../index.es-CF_xy2ns.js";
|
|
4
3
|
import { useState as h, useMemo as d, cloneElement as f } from "react";
|
|
5
|
-
import {
|
|
4
|
+
import { M as w } from "../../react-tooltip.min-DSY6KDqS.js";
|
|
6
5
|
import { hasChildWithGreaterWidth as W } from "./OverflowTooltipService.js";
|
|
7
|
-
const u = "_truncate_wgwcv_1",
|
|
6
|
+
import '../../assets/OverflowTooltip.css';const u = "_truncate_wgwcv_1", b = {
|
|
8
7
|
truncate: u
|
|
9
|
-
},
|
|
10
|
-
const [
|
|
8
|
+
}, E = ({ id: o, text: l, children: e }) => {
|
|
9
|
+
const [i, n] = h(!1), r = d(
|
|
11
10
|
() => f(e, {
|
|
12
11
|
"data-tooltip-id": o,
|
|
13
12
|
onMouseEnter: ({ currentTarget: t }) => {
|
|
14
13
|
const c = t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight || W(t, t.parentElement?.clientWidth);
|
|
15
|
-
|
|
14
|
+
n(c);
|
|
16
15
|
},
|
|
17
|
-
className: `${
|
|
16
|
+
className: `${b.truncate} ${e.props.className}`
|
|
18
17
|
}),
|
|
19
18
|
[e, o]
|
|
20
19
|
);
|
|
21
|
-
return /* @__PURE__ */ m
|
|
22
|
-
|
|
20
|
+
return /* @__PURE__ */ a(m, { children: [
|
|
21
|
+
r,
|
|
23
22
|
/* @__PURE__ */ s(
|
|
24
23
|
w,
|
|
25
24
|
{
|
|
@@ -27,17 +26,17 @@ const u = "_truncate_wgwcv_1", v = {
|
|
|
27
26
|
noArrow: !0,
|
|
28
27
|
place: "bottom",
|
|
29
28
|
clickable: !0,
|
|
30
|
-
hidden: !
|
|
29
|
+
hidden: !i,
|
|
31
30
|
style: {
|
|
32
31
|
whiteSpace: "normal",
|
|
33
32
|
maxWidth: "90%",
|
|
34
33
|
wordBreak: "break-word"
|
|
35
34
|
},
|
|
36
|
-
children: /* @__PURE__ */ s(p, { level: 2, children:
|
|
35
|
+
children: /* @__PURE__ */ s(p, { level: 2, children: l })
|
|
37
36
|
}
|
|
38
37
|
)
|
|
39
38
|
] });
|
|
40
39
|
};
|
|
41
40
|
export {
|
|
42
|
-
|
|
41
|
+
E as OverflowTooltip
|
|
43
42
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { a as i, s as e, w as s } from "../../react.esm-
|
|
4
|
-
import { u as a } from "../../index-
|
|
2
|
+
import { T as n } from "../../index.es-CF_xy2ns.js";
|
|
3
|
+
import { a as i, s as e, w as s } from "../../react.esm-DNwojocF.js";
|
|
4
|
+
import { u as a } from "../../index-CrcXCSzI.js";
|
|
5
5
|
import { OverflowTooltip as c } from "./OverflowTooltip.js";
|
|
6
|
-
import { d as u, t as p, g as r } from "../../vi.CjhMlMwf-
|
|
6
|
+
import { d as u, t as p, g as r } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
7
7
|
u("OverflowTooltip Test", () => {
|
|
8
8
|
p("should render OverflowTooltip on hover", async () => {
|
|
9
9
|
Object.defineProperty(HTMLElement.prototype, "clientWidth", {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
scrollbarY: l,
|
|
1
|
+
import '../../assets/Scrollbar.css';const r = "_scrollbarY_1m6g8_1", o = "_scrollbarX_1m6g8_5", l = {
|
|
2
|
+
scrollbarY: r,
|
|
4
3
|
scrollbarX: o
|
|
5
|
-
},
|
|
4
|
+
}, c = l.scrollbarY, s = l.scrollbarX;
|
|
6
5
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
s as ScrollbarX,
|
|
7
|
+
c as ScrollbarY
|
|
9
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { a, s as e } from "../../react.esm-
|
|
2
|
+
import { a, s as e } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { ScrollbarY as d, ScrollbarX as l } from "./Scrollbar.js";
|
|
4
|
-
import { d as c, t, g as o } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as c, t, g as o } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
c("Scrollbar", () => {
|
|
6
6
|
t("should render Y correctly", () => {
|
|
7
7
|
a(/* @__PURE__ */ s("div", { "data-testid": "div", className: d }));
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import "../../assets/SearchBar.css";
|
|
2
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { I as c } from "../../index.es-0lQcz8m1.js";
|
|
3
|
+
import { T as i } from "../../index.es-25EARqhH.js";
|
|
4
|
+
import '../../assets/SearchBar.css';const l = "_searchbar_gnvwc_1", u = {
|
|
5
5
|
searchbar: l
|
|
6
6
|
}, b = ({
|
|
7
|
-
className:
|
|
8
|
-
dense:
|
|
7
|
+
className: o = "",
|
|
8
|
+
dense: n = !1,
|
|
9
9
|
searchTerm: a,
|
|
10
10
|
setSearchTerm: t,
|
|
11
|
-
placeholder:
|
|
11
|
+
placeholder: s
|
|
12
12
|
}) => /* @__PURE__ */ r(
|
|
13
13
|
i,
|
|
14
14
|
{
|
|
15
15
|
"data-testid": "search-bar-input",
|
|
16
|
-
className: `${
|
|
17
|
-
dense:
|
|
16
|
+
className: `${o ?? ""} ${u.searchbar}`,
|
|
17
|
+
dense: n,
|
|
18
18
|
variant: "outlined",
|
|
19
|
-
placeholder:
|
|
19
|
+
placeholder: s,
|
|
20
20
|
value: a,
|
|
21
|
-
onChange: (
|
|
21
|
+
onChange: (e) => t(e.target.value),
|
|
22
22
|
fullWidth: !0,
|
|
23
23
|
trailingIcon: /* @__PURE__ */ r(
|
|
24
|
-
|
|
24
|
+
c,
|
|
25
25
|
{
|
|
26
26
|
icon: a ? "close" : "search",
|
|
27
27
|
onClick: () => a ? t("") : void 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { a as r, s as t, f as h, b as l } from "../../react.esm-
|
|
2
|
+
import { a as r, s as t, f as h, b as l } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { SearchBar as s } from "./SearchBar.js";
|
|
4
|
-
import { d as m, t as o, v as n, g as e } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as m, t as o, v as n, g as e } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
m("SearchBar Test", () => {
|
|
6
6
|
o("renders SearchBar component", () => {
|
|
7
7
|
r(
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectProps } from '@element-public/react-select';
|
|
2
|
+
|
|
3
|
+
export type ExtendedSelectProps = SelectProps & {
|
|
4
|
+
'data-testid'?: string;
|
|
5
|
+
/** Custom class name for the portal. Only works if portalContainer is not set. */
|
|
6
|
+
portalClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Provides the normal element select with some presets and the possibility to pass a custom portal class name
|
|
10
|
+
* @param menuMaxHeight Default: 15rem
|
|
11
|
+
* @param portalClassName Custom class name for the portal. Only works if portalContainer is not set.
|
|
12
|
+
* @param props Element Select props
|
|
13
|
+
*/
|
|
14
|
+
export declare const Select: ({ menuMaxHeight, portalClassName, className, hoisted, ...props }: ExtendedSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as m, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { S as d } from "../../index.es-UHKFl8Da.js";
|
|
3
|
+
import { useEffect as a } from "react";
|
|
4
|
+
import '../../assets/Select.css';const i = "_customPortal_8wq49_1", f = "_customSelect_8wq49_7", s = {
|
|
5
|
+
customPortal: i,
|
|
6
|
+
customSelect: f
|
|
7
|
+
}, _ = ({
|
|
8
|
+
menuMaxHeight: n = "15rem",
|
|
9
|
+
portalClassName: e,
|
|
10
|
+
className: r,
|
|
11
|
+
hoisted: o,
|
|
12
|
+
...l
|
|
13
|
+
}) => {
|
|
14
|
+
const t = `custom-portal-${e ?? "default"}`;
|
|
15
|
+
return a(() => {
|
|
16
|
+
if (o && !document.getElementById(t)) {
|
|
17
|
+
const c = document.createElement("div");
|
|
18
|
+
c.id = t, c.className = `${s.customPortal} ${e ?? ""}`, document.body.appendChild(c);
|
|
19
|
+
}
|
|
20
|
+
}, [o, t, e]), /* @__PURE__ */ m(u, { children: /* @__PURE__ */ m(
|
|
21
|
+
d,
|
|
22
|
+
{
|
|
23
|
+
"data-testid": "custom-select",
|
|
24
|
+
menuMaxHeight: n,
|
|
25
|
+
hoisted: o,
|
|
26
|
+
portalContainer: document.getElementById(t) ? `#${t}` : void 0,
|
|
27
|
+
className: `${s.customSelect} ${r ?? ""}`,
|
|
28
|
+
...l
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
_ as Select
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { a, s as c } from "../../react.esm-DNwojocF.js";
|
|
3
|
+
import { Select as n } from "./Select.js";
|
|
4
|
+
import { d as l, t as m, g as e } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
|
+
l("Select", () => {
|
|
6
|
+
const o = [
|
|
7
|
+
{ value: "1", text: "Option 1" },
|
|
8
|
+
{ value: "2", text: "Option 2" },
|
|
9
|
+
{ value: "3", text: "Option 3" }
|
|
10
|
+
];
|
|
11
|
+
m("render select without portal when not hoisted and with default data-testid", () => {
|
|
12
|
+
a(/* @__PURE__ */ s(n, { options: o })), e(c.getByTestId("custom-select")).toBeInTheDocument();
|
|
13
|
+
const t = c.queryByTestId("custom-portal");
|
|
14
|
+
e(t).not.toBeInTheDocument();
|
|
15
|
+
}), m("render select with custom data-testid", () => {
|
|
16
|
+
a(/* @__PURE__ */ s(n, { options: o, "data-testid": "custom-test-id" })), e(c.getByTestId("custom-test-id")).toBeInTheDocument();
|
|
17
|
+
const t = c.queryByTestId("custom-select");
|
|
18
|
+
e(t).not.toBeInTheDocument();
|
|
19
|
+
}), m("render select with default portal class name", () => {
|
|
20
|
+
a(/* @__PURE__ */ s(n, { hoisted: !0, options: o }));
|
|
21
|
+
const t = document.getElementById("custom-portal-default");
|
|
22
|
+
e(t).toBeInTheDocument();
|
|
23
|
+
}), m("render select with custom portal class name", () => {
|
|
24
|
+
a(/* @__PURE__ */ s(n, { hoisted: !0, options: o, portalClassName: "test-custom-portal-class-name" }));
|
|
25
|
+
const t = document.getElementById("custom-portal-test-custom-portal-class-name");
|
|
26
|
+
e(t).toBeInTheDocument();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
const d = "_divider_opvom_1", t = {
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/VerticalDivider.css';const d = "_divider_opvom_1", s = {
|
|
4
3
|
divider: d
|
|
5
|
-
},
|
|
4
|
+
}, o = ({ height: i = "2rem", className: e = "" }) => /* @__PURE__ */ r("div", { className: `${s.divider} ${e}`, style: { height: i } });
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
o as VerticalDivider
|
|
8
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { a as r } from "../../react.esm-
|
|
2
|
+
import { a as r } from "../../react.esm-DNwojocF.js";
|
|
3
3
|
import { VerticalDivider as s } from "./VerticalDivider.js";
|
|
4
|
-
import { d as o, t as l, g as i } from "../../vi.CjhMlMwf-
|
|
4
|
+
import { d as o, t as l, g as i } from "../../vi.CjhMlMwf-BCJNwXvu.js";
|
|
5
5
|
o("VerticalDivider Test", () => {
|
|
6
6
|
l("it should render with basic styling", () => {
|
|
7
7
|
r(/* @__PURE__ */ e(s, {}));
|