@cagatayfdn/flora-components 0.0.85 → 0.0.87
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.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { j as p } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { createContext as i, useState as u, useContext as x } from "react";
|
|
3
|
+
const r = i({ isOpen: !1 }), D = ({ children: t }) => {
|
|
4
|
+
const [s, e] = u(!1), o = () => e(!0), n = () => e(!1), a = () => e((c) => !c);
|
|
5
|
+
return /* @__PURE__ */ p.jsx(r.Provider, { value: { isOpen: s, openDrawer: o, closeDrawer: n, toggleDrawer: a }, children: t });
|
|
6
|
+
}, f = () => x(r);
|
|
7
|
+
export {
|
|
8
|
+
D as DrawerProvider,
|
|
9
|
+
f as useDrawer
|
|
10
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as o } from "../../index-BHf7G3IG.js";
|
|
3
|
+
import { useDrawer as i } from "./Provider.js";
|
|
4
|
+
import n from "../Icon/index.js";
|
|
5
|
+
import '../../index.css';const c = "_drawer_1bno3_1", l = "_header_1bno3_10", m = "_body_1bno3_32", r = {
|
|
6
|
+
drawer: c,
|
|
7
|
+
header: l,
|
|
8
|
+
body: m
|
|
9
|
+
};
|
|
10
|
+
function j({ children: s, title: a }) {
|
|
11
|
+
const { isOpen: t, closeDrawer: d } = i();
|
|
12
|
+
return t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
13
|
+
/* @__PURE__ */ e.jsx(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
"data-testid": "drawer-overlay",
|
|
17
|
+
onClick: d,
|
|
18
|
+
style: {
|
|
19
|
+
position: "fixed",
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: "100%",
|
|
24
|
+
background: "rgba(0, 0, 0, 0.5)",
|
|
25
|
+
zIndex: 999
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ e.jsxs("div", { "data-testid": "drawer", className: o(r.drawer), children: [
|
|
30
|
+
/* @__PURE__ */ e.jsxs("div", { "data-testid": "drawer-header", className: r.header, children: [
|
|
31
|
+
/* @__PURE__ */ e.jsx("div", { children: a }),
|
|
32
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(n, { onClick: d, name: "close" }) })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ e.jsx("div", { "data-testid": "drawer-body", className: r.body, children: s })
|
|
35
|
+
] })
|
|
36
|
+
] }) : null;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
j as default
|
|
40
|
+
};
|
|
@@ -6,7 +6,7 @@ import h from "../Tooltip/Tooltip.js";
|
|
|
6
6
|
import { Icons as j } from "../../assets/icons/icons.js";
|
|
7
7
|
import { c as v } from "../../index-BHf7G3IG.js";
|
|
8
8
|
import { u } from "../../useTranslation-CnCPcxVj.js";
|
|
9
|
-
import '../../
|
|
9
|
+
import '../../index2.css';const f = "_wrapper_14erv_1", N = "_content_14erv_11", G = "_iconWrapper_14erv_19", w = "_titleGroup_14erv_30", C = "_title_14erv_30", W = "_textGroup_14erv_46", I = "_footer_14erv_51", e = {
|
|
10
10
|
wrapper: f,
|
|
11
11
|
content: N,
|
|
12
12
|
iconWrapper: G,
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._drawer_1bno3_1{position:fixed;background-color:#333b57;top:0;right:0;height:100%;width:540px;z-index:1000}._drawer_1bno3_1 ._header_1bno3_10{padding:20px 28px;position:relative;display:flex;justify-content:space-between;font-size:20px;font-weight:500;border-bottom:1px solid #293245}._drawer_1bno3_1 ._header_1bno3_10:after{content:"";position:absolute;left:-1px;top:23px;width:4px;height:16px;background-color:#d2282e}._drawer_1bno3_1 ._header_1bno3_10 i{font-size:12px;cursor:pointer}._drawer_1bno3_1 ._body_1bno3_32{padding:20px 36px}
|
package/dist/index2.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_14erv_1{width:100%;height:180px;display:flex;overflow:hidden;min-height:100px;max-height:180px;flex-direction:row;border-radius:10px}._wrapper_14erv_1 ._content_14erv_11{width:100%;background:#fff;padding:20px;display:flex;flex-direction:column;justify-content:space-between}._wrapper_14erv_1 ._iconWrapper_14erv_19{width:25%;min-width:25%;max-width:25%;background:#788195;color:#fff!important;font-size:32px;display:flex;align-items:center;justify-content:center}._wrapper_14erv_1 ._titleGroup_14erv_30{display:flex;justify-content:space-between}._wrapper_14erv_1 ._title_14erv_30{color:#062a4a;font-size:20px;overflow:hidden;max-height:35px;max-width:170px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;line-height:1;margin-bottom:5px}._wrapper_14erv_1 ._textGroup_14erv_46{color:#000;display:flex;flex-direction:column}._wrapper_14erv_1 ._footer_14erv_51{display:flex;flex-direction:column}._wrapper_14erv_1 ._footer_14erv_51>span{text-decoration:underline;font-weight:500}._wrapper_14erv_1 ._footer_14erv_51>span:hover{text-decoration:none}
|