@cagatayfdn/flora-components 0.0.112 → 0.0.114
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
-
import { useEffect as
|
|
2
|
+
import { useEffect as w } from "react";
|
|
3
3
|
import { c as s } from "../../index-BHf7G3IG.js";
|
|
4
|
-
import { Icons as
|
|
5
|
-
import
|
|
6
|
-
import '../../Modal.css';const
|
|
7
|
-
overlay:
|
|
8
|
-
modal:
|
|
9
|
-
content:
|
|
10
|
-
header:
|
|
11
|
-
close:
|
|
12
|
-
body:
|
|
13
|
-
desc:
|
|
14
|
-
modal__light:
|
|
15
|
-
},
|
|
4
|
+
import { Icons as N } from "../../assets/icons/icons.js";
|
|
5
|
+
import b from "../Icon/index.js";
|
|
6
|
+
import '../../Modal.css';const f = "_overlay_yit4w_1", g = "_modal_yit4w_10", C = "_content_yit4w_25", k = "_header_yit4w_35", E = "_close_yit4w_55", S = "_body_yit4w_62", F = "_desc_yit4w_66", B = "_modal__light_yit4w_70", o = {
|
|
7
|
+
overlay: f,
|
|
8
|
+
modal: g,
|
|
9
|
+
content: C,
|
|
10
|
+
header: k,
|
|
11
|
+
close: E,
|
|
12
|
+
body: S,
|
|
13
|
+
desc: F,
|
|
14
|
+
modal__light: B
|
|
15
|
+
}, K = (i) => {
|
|
16
16
|
const {
|
|
17
17
|
children: m,
|
|
18
18
|
header: a,
|
|
@@ -20,23 +20,24 @@ import '../../Modal.css';const b = "_overlay_yit4w_1", f = "_modal_yit4w_10", g
|
|
|
20
20
|
description: d,
|
|
21
21
|
className: y,
|
|
22
22
|
onClose: _,
|
|
23
|
+
showClose: h = !0,
|
|
23
24
|
visible: c = !0,
|
|
24
25
|
appearance: l,
|
|
25
|
-
headerClass:
|
|
26
|
-
descriptionClass:
|
|
27
|
-
} = i,
|
|
26
|
+
headerClass: v,
|
|
27
|
+
descriptionClass: x
|
|
28
|
+
} = i, p = () => {
|
|
28
29
|
document.body.style.width = "calc(100% - 15px)", document.body.className = "overflow-hidden";
|
|
29
|
-
},
|
|
30
|
+
}, j = () => {
|
|
30
31
|
document.body.className = "", document.body.removeAttribute("style");
|
|
31
32
|
}, n = () => {
|
|
32
33
|
_();
|
|
33
34
|
};
|
|
34
|
-
return
|
|
35
|
-
const r = (
|
|
36
|
-
|
|
35
|
+
return w(() => {
|
|
36
|
+
const r = (u) => {
|
|
37
|
+
u.key === "Escape" && n();
|
|
37
38
|
};
|
|
38
|
-
return document.addEventListener("keydown", r), c &&
|
|
39
|
-
|
|
39
|
+
return document.addEventListener("keydown", r), c && p(), () => {
|
|
40
|
+
j(), document.removeEventListener("keydown", r);
|
|
40
41
|
};
|
|
41
42
|
}, [c]), /* @__PURE__ */ e.jsx(e.Fragment, { children: c && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
42
43
|
/* @__PURE__ */ e.jsx(
|
|
@@ -55,12 +56,12 @@ import '../../Modal.css';const b = "_overlay_yit4w_1", f = "_modal_yit4w_10", g
|
|
|
55
56
|
}),
|
|
56
57
|
"data-testid": "modal-container",
|
|
57
58
|
children: /* @__PURE__ */ e.jsxs("div", { className: s(y, o.content), children: [
|
|
58
|
-
t || a ? /* @__PURE__ */ e.jsxs("div", { className: s(o.header,
|
|
59
|
+
t || a ? /* @__PURE__ */ e.jsxs("div", { className: s(o.header, v), children: [
|
|
59
60
|
t ? /* @__PURE__ */ e.jsx("h2", { children: t }) : a,
|
|
60
|
-
/* @__PURE__ */ e.jsx("span", { className: o.close, onClick: n, children: /* @__PURE__ */ e.jsx(
|
|
61
|
+
h && /* @__PURE__ */ e.jsx("span", { className: o.close, onClick: n, children: /* @__PURE__ */ e.jsx(b, { name: N.Close }) })
|
|
61
62
|
] }) : /* @__PURE__ */ e.jsx(e.Fragment, {}),
|
|
62
63
|
/* @__PURE__ */ e.jsxs("div", { className: o.body, children: [
|
|
63
|
-
d && /* @__PURE__ */ e.jsx("p", { className: s(o.desc,
|
|
64
|
+
d && /* @__PURE__ */ e.jsx("p", { className: s(o.desc, x), children: d }),
|
|
64
65
|
m
|
|
65
66
|
] })
|
|
66
67
|
] })
|
|
@@ -69,5 +70,5 @@ import '../../Modal.css';const b = "_overlay_yit4w_1", f = "_modal_yit4w_10", g
|
|
|
69
70
|
] }) });
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
K as default
|
|
73
74
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../ScrollContainer.css';const
|
|
4
|
-
container:
|
|
5
|
-
},
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as r } from "../../index-BHf7G3IG.js";
|
|
3
|
+
import '../../ScrollContainer.css';const c = "_container_hnayg_1", i = {
|
|
4
|
+
container: c
|
|
5
|
+
}, d = ({
|
|
6
6
|
children: t,
|
|
7
7
|
maxHeight: s,
|
|
8
8
|
height: a,
|
|
9
|
-
className: n
|
|
10
|
-
|
|
9
|
+
className: n,
|
|
10
|
+
onScroll: o
|
|
11
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
11
12
|
"div",
|
|
12
13
|
{
|
|
14
|
+
onScroll: o,
|
|
13
15
|
"data-testid": "scroll-container",
|
|
14
|
-
className:
|
|
16
|
+
className: r(n, i.container),
|
|
15
17
|
style: { maxHeight: s, height: a },
|
|
16
18
|
children: t
|
|
17
19
|
}
|
|
18
20
|
);
|
|
19
21
|
export {
|
|
20
|
-
|
|
22
|
+
d as default
|
|
21
23
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -863,6 +863,7 @@ export declare type ModalProps = {
|
|
|
863
863
|
title?: string;
|
|
864
864
|
header?: ReactNode;
|
|
865
865
|
headerClass?: any;
|
|
866
|
+
showClose?: boolean;
|
|
866
867
|
descriptionClass?: any;
|
|
867
868
|
description?: string;
|
|
868
869
|
className?: string;
|
|
@@ -1078,13 +1079,14 @@ export declare type RowProps = {
|
|
|
1078
1079
|
className?: string;
|
|
1079
1080
|
};
|
|
1080
1081
|
|
|
1081
|
-
export declare const ScrollContainer: ({ children, maxHeight, height, className, }: ScrollContainerProps) => JSX.Element;
|
|
1082
|
+
export declare const ScrollContainer: ({ children, maxHeight, height, className, onScroll }: ScrollContainerProps) => JSX.Element;
|
|
1082
1083
|
|
|
1083
1084
|
export declare type ScrollContainerProps = {
|
|
1084
1085
|
children: ReactNode;
|
|
1085
1086
|
maxHeight?: number;
|
|
1086
1087
|
height?: string | number;
|
|
1087
1088
|
className?: string;
|
|
1089
|
+
onScroll?: (e: React.UIEvent<HTMLDivElement>) => void;
|
|
1088
1090
|
};
|
|
1089
1091
|
|
|
1090
1092
|
export declare const Select: {
|
package/dist/index.d.ts
CHANGED
|
@@ -863,6 +863,7 @@ export declare type ModalProps = {
|
|
|
863
863
|
title?: string;
|
|
864
864
|
header?: ReactNode;
|
|
865
865
|
headerClass?: any;
|
|
866
|
+
showClose?: boolean;
|
|
866
867
|
descriptionClass?: any;
|
|
867
868
|
description?: string;
|
|
868
869
|
className?: string;
|
|
@@ -1078,13 +1079,14 @@ export declare type RowProps = {
|
|
|
1078
1079
|
className?: string;
|
|
1079
1080
|
};
|
|
1080
1081
|
|
|
1081
|
-
export declare const ScrollContainer: ({ children, maxHeight, height, className, }: ScrollContainerProps) => JSX.Element;
|
|
1082
|
+
export declare const ScrollContainer: ({ children, maxHeight, height, className, onScroll }: ScrollContainerProps) => JSX.Element;
|
|
1082
1083
|
|
|
1083
1084
|
export declare type ScrollContainerProps = {
|
|
1084
1085
|
children: ReactNode;
|
|
1085
1086
|
maxHeight?: number;
|
|
1086
1087
|
height?: string | number;
|
|
1087
1088
|
className?: string;
|
|
1089
|
+
onScroll?: (e: React.UIEvent<HTMLDivElement>) => void;
|
|
1088
1090
|
};
|
|
1089
1091
|
|
|
1090
1092
|
export declare const Select: {
|