@cagatayfdn/flora-components 0.0.113 → 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 u } from "react";
2
+ import { useEffect as w } from "react";
3
3
  import { c as s } from "../../index-BHf7G3IG.js";
4
- import { Icons as w } from "../../assets/icons/icons.js";
5
- import N from "../Icon/index.js";
6
- import '../../Modal.css';const b = "_overlay_yit4w_1", f = "_modal_yit4w_10", g = "_content_yit4w_25", C = "_header_yit4w_35", k = "_close_yit4w_55", E = "_body_yit4w_62", S = "_desc_yit4w_66", F = "_modal__light_yit4w_70", o = {
7
- overlay: b,
8
- modal: f,
9
- content: g,
10
- header: C,
11
- close: k,
12
- body: E,
13
- desc: S,
14
- modal__light: F
15
- }, H = (i) => {
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: h,
26
- descriptionClass: v
27
- } = i, x = () => {
26
+ headerClass: v,
27
+ descriptionClass: x
28
+ } = i, p = () => {
28
29
  document.body.style.width = "calc(100% - 15px)", document.body.className = "overflow-hidden";
29
- }, p = () => {
30
+ }, j = () => {
30
31
  document.body.className = "", document.body.removeAttribute("style");
31
32
  }, n = () => {
32
33
  _();
33
34
  };
34
- return u(() => {
35
- const r = (j) => {
36
- j.key === "Escape" && n();
35
+ return w(() => {
36
+ const r = (u) => {
37
+ u.key === "Escape" && n();
37
38
  };
38
- return document.addEventListener("keydown", r), c && x(), () => {
39
- p(), document.removeEventListener("keydown", r);
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, h), children: [
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(N, { name: w.Close }) })
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, v), children: d }),
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
- H as default
73
+ K as default
73
74
  };
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;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cagatayfdn/flora-components",
3
- "version": "0.0.113",
3
+ "version": "0.0.114",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",