@hortiview/shared-components 0.0.6829 → 0.0.6849
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/assets/HashTabView.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +19 -11
- package/dist/components/AlertBanner/AlertBanner.test.js +17 -23
- package/dist/components/BaseView/BaseView.js +15 -15
- package/dist/components/BaseView/BaseView.test.js +19 -25
- package/dist/components/BasicHeading/BasicHeading.js +37 -31
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.test.js +7 -7
- package/dist/components/ContextMenu/ContextMenu.test.js +6 -6
- package/dist/components/DeleteModal/DeleteModal.test.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.test.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +5 -5
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +8 -8
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +1 -1
- package/dist/components/FormComponents/FormText/FormText.test.js +1 -1
- package/dist/components/GenericTable/GenericTable.test.js +1 -1
- package/dist/components/HashTabView/HashTabView.js +33 -33
- package/dist/components/HashTabView/HashTabView.test.js +1 -1
- package/dist/components/HeaderFilter/HeaderFilter.test.js +1 -1
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/InfoGroup/InfoGroup.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.test.js +1 -1
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +7 -7
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +2 -2
- package/dist/components/Scrollbar/scrollbar.test.js +8 -8
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/VerticalDivider/VerticalDivider.test.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +16 -11
- package/dist/hooks/useBreakpoint.js +2 -3
- package/dist/hooks/useBreakpoints.test.d.ts +1 -0
- package/dist/hooks/useBreakpoints.test.js +11 -0
- package/dist/{index-DfbRag7b.js → index-DP2ENnrX.js} +1 -1
- package/dist/main.js +7 -7
- package/dist/{react.esm-BBemCHUU.js → react.esm-DoZanrUz.js} +1223 -1190
- package/dist/useBreakpoint-2MH8ICuE.js +28 -0
- package/package.json +1 -1
- package/dist/useBreakpoint-DROHPVxO.js +0 -35
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState as d, useEffect as c } from "react";
|
|
2
|
+
const t = (i) => {
|
|
3
|
+
const [a, s] = d(!1);
|
|
4
|
+
return c(
|
|
5
|
+
() => {
|
|
6
|
+
const e = window.matchMedia(i);
|
|
7
|
+
s(e.matches);
|
|
8
|
+
const n = (o) => s(o.matches);
|
|
9
|
+
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
10
|
+
},
|
|
11
|
+
[]
|
|
12
|
+
// Empty array ensures effect is only run on mount and unmount
|
|
13
|
+
), a;
|
|
14
|
+
}, r = () => {
|
|
15
|
+
const i = t("(max-width: 599px)"), a = t("(min-width: 600px) and (max-width: 719px)"), s = t("(min-width: 720px) and (max-width: 839px)"), e = t("(min-width: 840px) and (max-width: 1023px)"), n = t("(min-width: 1024px) and (max-width: 1439px)"), o = t("(min-width: 1440px)");
|
|
16
|
+
return {
|
|
17
|
+
isMobile: i,
|
|
18
|
+
isTablet: a || s,
|
|
19
|
+
isDesktop: e || n || o
|
|
20
|
+
};
|
|
21
|
+
}, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
22
|
+
__proto__: null,
|
|
23
|
+
useBreakpoints: r
|
|
24
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
25
|
+
export {
|
|
26
|
+
m as a,
|
|
27
|
+
r as u
|
|
28
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hortiview/shared-components",
|
|
3
3
|
"description": "This is a shared component library. It should used in the HortiView platform and its modules.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6849",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://dev.azure.com/sdundc/HV%20Platform/_git/HortiView-Frontend-Shared",
|
|
7
7
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useState as r, useEffect as c } from "react";
|
|
2
|
-
function t(e) {
|
|
3
|
-
const [s, a] = r(!1);
|
|
4
|
-
return c(
|
|
5
|
-
() => {
|
|
6
|
-
const i = window.matchMedia(e);
|
|
7
|
-
a(i.matches);
|
|
8
|
-
const n = (o) => a(o.matches);
|
|
9
|
-
return i.addEventListener("change", n), () => i.removeEventListener("change", n);
|
|
10
|
-
},
|
|
11
|
-
[s]
|
|
12
|
-
// Empty array ensures effect is only run on mount and unmount
|
|
13
|
-
), s;
|
|
14
|
-
}
|
|
15
|
-
function d() {
|
|
16
|
-
const e = {
|
|
17
|
-
isXs: t("(max-width: 640px)"),
|
|
18
|
-
isSm: t("(min-width: 641px) and (max-width: 768px)"),
|
|
19
|
-
isMd: t("(min-width: 769px) and (max-width: 839px)"),
|
|
20
|
-
isLg: t("(min-width: 840px)"),
|
|
21
|
-
isXlg: t("(min-width: 1280px)"),
|
|
22
|
-
active: ""
|
|
23
|
-
};
|
|
24
|
-
return e.isXs && (e.active = "xs"), e.isSm && (e.active = "sm"), e.isMd && (e.active = "md"), e.isLg && (e.active = "lg"), e;
|
|
25
|
-
}
|
|
26
|
-
const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
27
|
-
__proto__: null,
|
|
28
|
-
useBreakpoints: d,
|
|
29
|
-
useMediaQuery: t
|
|
30
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
31
|
-
export {
|
|
32
|
-
d as a,
|
|
33
|
-
t as b,
|
|
34
|
-
u
|
|
35
|
-
};
|