@cagatayfdn/flora-components 0.0.86 → 0.0.88

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
+ };
@@ -15,6 +15,7 @@ import "../Checkbox/Checkbox.js";
15
15
  import "../Confirm/Confirm.js";
16
16
  import "../Datepicker/Datepicker.js";
17
17
  import t from "../Divider/Divider.js";
18
+ import "../Drawer/Provider.js";
18
19
  import "../FileUpload/FileUpload.js";
19
20
  import j from "../Modal/Modal.js";
20
21
  import l from "../Grid/Column.js";
@@ -57,7 +58,7 @@ import '../../ErrorLogModal.css';const M = "_realTimeLogModalStyle_2pv2e_1", g =
57
58
  ] }, r == null ? void 0 : r.id)) : /* @__PURE__ */ o.jsx(h, { i18nKey: "text.not_found", values: { dataname: "Log" } }) })
58
59
  }
59
60
  );
60
- }, X = c.create(v);
61
+ }, Y = c.create(v);
61
62
  export {
62
- X as default
63
+ Y as default
63
64
  };
@@ -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 '../../index.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 = {
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,
@@ -8,56 +8,57 @@ import { default as C } from "./AuthUserCan/Permission.js";
8
8
  import { default as T } from "./Autocomplete/Autocomplete.js";
9
9
  import { default as S } from "./Card/Card.js";
10
10
  import { default as P } from "./Charts/index.js";
11
- import { default as b } from "./Checkbox/Checkbox.js";
11
+ import { default as w } from "./Checkbox/Checkbox.js";
12
12
  import { default as A } from "./Config/Config.js";
13
- import { default as v } from "./Confirm/Confirm.js";
13
+ import { default as N } from "./Confirm/Confirm.js";
14
14
  import { default as F } from "./ContentHeader/ContentHeader.js";
15
15
  import { default as R } from "./ContentLoader/ContentLoader.js";
16
16
  import { default as y } from "./Countdown/Countdown.js";
17
17
  import { default as U } from "./Datepicker/Datepicker.js";
18
18
  import { default as E } from "./Divider/Divider.js";
19
- import { default as W } from "./Dropdown/DropdownList.js";
20
- import { default as q } from "./FileUpload/FileUpload.js";
21
- import { default as G } from "./FileUpload/ImagePreview.js";
22
- import { default as K } from "./FileUpload/LengthCard.js";
23
- import { default as Q } from "./FileUpload/PreviewModal.js";
24
- import { default as Y } from "./Grid/Column.js";
25
- import { default as _ } from "./Grid/Row.js";
26
- import { default as oo } from "./Heading/Heading.js";
27
- import { default as ro } from "./Icon/index.js";
28
- import { default as ao } from "./InfiniteScroll/InfiniteScroll.js";
29
- import { default as lo } from "./InfoBoxList/InfoBoxList.js";
30
- import { createConnectedService as mo } from "./InfoBoxList/helper.js";
31
- import { default as so } from "./InfoDate/InfoDate.js";
32
- import { InfoText as io } from "./InfoText/InfoText.js";
33
- import { default as co } from "./Input/Input.js";
34
- import { default as go } from "./Label/Label.js";
35
- import { default as Io } from "./Loading/Loading.js";
36
- import { default as Lo } from "./Modal/Modal.js";
37
- import { default as ho } from "./NavigatorCard/index.js";
38
- import { default as wo } from "./NoResult/NoResult.js";
39
- import { Notification as No } from "./Notification/Notification.js";
40
- import { default as Do } from "./PageWrapper/PageWrap.js";
41
- import { default as Mo } from "./Pager/Pager.js";
42
- import { default as ko } from "./Panel/Panel.js";
43
- import { default as Bo } from "./PermaLink/PermaLink.js";
44
- import { default as Ho, RadioList as Eo } from "./Radio/Radio.js";
45
- import { default as Wo } from "./ResultError/ResultError.js";
46
- import { default as qo } from "./ScrollContainer/ScrollContainer.js";
47
- import { default as Go } from "./Select/NoData.js";
48
- import { S as Ko } from "../Select-DcLZCXNo.js";
49
- import { default as Qo } from "./Sidebar/index.js";
50
- import { M as Yo } from "../MenuItem-DAf7NU3h.js";
51
- import { default as _o } from "./StatusTypography/StatusTypography.js";
52
- import { default as oe } from "./Stepper/Stepper.js";
53
- import { default as re } from "./Switch/Switch.js";
54
- import { default as ae } from "./Tab/Tab.js";
55
- import { default as le } from "./Table/Table.js";
56
- import { T as pe } from "../TableHeader-Cjx9ZwYH.js";
57
- import { default as xe } from "./Textarea/Textarea.js";
58
- import { default as ue } from "./Tooltip/Tooltip.js";
59
- import { default as ne } from "./TypographyText/TypographyText.js";
60
- import { default as Ce } from "./ValidationError/ValidationError.js";
19
+ import { default as W } from "./Drawer/index.js";
20
+ import { default as q } from "./Dropdown/DropdownList.js";
21
+ import { default as G } from "./FileUpload/FileUpload.js";
22
+ import { default as K } from "./FileUpload/ImagePreview.js";
23
+ import { default as Q } from "./FileUpload/LengthCard.js";
24
+ import { default as Y } from "./FileUpload/PreviewModal.js";
25
+ import { default as _ } from "./Grid/Column.js";
26
+ import { default as oo } from "./Grid/Row.js";
27
+ import { default as ro } from "./Heading/Heading.js";
28
+ import { default as ao } from "./Icon/index.js";
29
+ import { default as lo } from "./InfiniteScroll/InfiniteScroll.js";
30
+ import { default as mo } from "./InfoBoxList/InfoBoxList.js";
31
+ import { createConnectedService as so } from "./InfoBoxList/helper.js";
32
+ import { default as io } from "./InfoDate/InfoDate.js";
33
+ import { InfoText as co } from "./InfoText/InfoText.js";
34
+ import { default as go } from "./Input/Input.js";
35
+ import { default as Io } from "./Label/Label.js";
36
+ import { default as Lo } from "./Loading/Loading.js";
37
+ import { default as ho } from "./Modal/Modal.js";
38
+ import { default as bo } from "./NavigatorCard/index.js";
39
+ import { default as Do } from "./NoResult/NoResult.js";
40
+ import { Notification as vo } from "./Notification/Notification.js";
41
+ import { default as Mo } from "./PageWrapper/PageWrap.js";
42
+ import { default as ko } from "./Pager/Pager.js";
43
+ import { default as Bo } from "./Panel/Panel.js";
44
+ import { default as Ho } from "./PermaLink/PermaLink.js";
45
+ import { default as Vo, RadioList as Wo } from "./Radio/Radio.js";
46
+ import { default as qo } from "./ResultError/ResultError.js";
47
+ import { default as Go } from "./ScrollContainer/ScrollContainer.js";
48
+ import { default as Ko } from "./Select/NoData.js";
49
+ import { S as Qo } from "../Select-DcLZCXNo.js";
50
+ import { default as Yo } from "./Sidebar/index.js";
51
+ import { M as _o } from "../MenuItem-DAf7NU3h.js";
52
+ import { default as oe } from "./StatusTypography/StatusTypography.js";
53
+ import { default as re } from "./Stepper/Stepper.js";
54
+ import { default as ae } from "./Switch/Switch.js";
55
+ import { default as le } from "./Tab/Tab.js";
56
+ import { default as pe } from "./Table/Table.js";
57
+ import { T as xe } from "../TableHeader-Cjx9ZwYH.js";
58
+ import { default as ue } from "./Textarea/Textarea.js";
59
+ import { default as ne } from "./Tooltip/Tooltip.js";
60
+ import { default as Ce } from "./TypographyText/TypographyText.js";
61
+ import { default as Te } from "./ValidationError/ValidationError.js";
61
62
  export {
62
63
  m as Accordion,
63
64
  x as AccordionItem,
@@ -67,59 +68,60 @@ export {
67
68
  r as Button,
68
69
  S as Card,
69
70
  P as Chart,
70
- b as Checkbox,
71
- Y as Column,
71
+ w as Checkbox,
72
+ _ as Column,
72
73
  A as Config,
73
- v as Confirm,
74
+ N as Confirm,
74
75
  F as ContentHeader,
75
76
  R as ContentLoader,
76
77
  y as Countdown,
77
78
  U as Datepicker,
78
79
  E as Divider,
79
- W as DropdownList,
80
- q as FileUpload,
81
- G as FileUploadImagePreview,
82
- K as FileUploadLengthCard,
83
- Q as FileUploadPreviewModal,
84
- oo as Heading,
85
- ro as Icon,
86
- ao as InfiniteScroll,
87
- lo as InfoBoxList,
88
- so as InfoDate,
89
- io as InfoText,
90
- co as Input,
91
- go as Label,
92
- Io as Loading,
93
- Yo as MenuItem,
94
- Lo as Modal,
95
- ho as NavigatorCard,
80
+ W as Drawer,
81
+ q as DropdownList,
82
+ G as FileUpload,
83
+ K as FileUploadImagePreview,
84
+ Q as FileUploadLengthCard,
85
+ Y as FileUploadPreviewModal,
86
+ ro as Heading,
87
+ ao as Icon,
88
+ lo as InfiniteScroll,
89
+ mo as InfoBoxList,
90
+ io as InfoDate,
91
+ co as InfoText,
92
+ go as Input,
93
+ Io as Label,
94
+ Lo as Loading,
95
+ _o as MenuItem,
96
+ ho as Modal,
97
+ bo as NavigatorCard,
96
98
  a as NiceModal,
97
- Go as NoData,
98
- wo as NoResult,
99
- No as Notification,
100
- Do as PageWrapper,
101
- Mo as Pager,
102
- ko as Panel,
99
+ Ko as NoData,
100
+ Do as NoResult,
101
+ vo as Notification,
102
+ Mo as PageWrapper,
103
+ ko as Pager,
104
+ Bo as Panel,
103
105
  l as PermFallBack,
104
- Bo as PermaLink,
106
+ Ho as PermaLink,
105
107
  C as Permission,
106
- Ho as Radio,
107
- Eo as RadioList,
108
- Wo as ResultError,
109
- _ as Row,
110
- qo as ScrollContainer,
111
- Ko as Select,
112
- Qo as Sidebar,
113
- _o as StatusTypography,
114
- oe as Stepper,
115
- re as Switch,
116
- ae as Tab,
117
- le as Table,
118
- pe as TableHeader,
119
- xe as Textarea,
120
- ue as Tooltip,
121
- ne as TypographyText,
122
- Ce as ValidationError,
123
- mo as createConnectedService,
108
+ Vo as Radio,
109
+ Wo as RadioList,
110
+ qo as ResultError,
111
+ oo as Row,
112
+ Go as ScrollContainer,
113
+ Qo as Select,
114
+ Yo as Sidebar,
115
+ oe as StatusTypography,
116
+ re as Stepper,
117
+ ae as Switch,
118
+ le as Tab,
119
+ pe as Table,
120
+ xe as TableHeader,
121
+ ue as Textarea,
122
+ ne as Tooltip,
123
+ Ce as TypographyText,
124
+ Te as ValidationError,
125
+ so as createConnectedService,
124
126
  d as getAuth
125
127
  };
@@ -2,10 +2,12 @@ import { AuthProvider as o, useAuth as u } from "./useAauth.js";
2
2
  import { default as t } from "./useDisclosure.js";
3
3
  import { default as f } from "./useNiceModal.js";
4
4
  import { default as l } from "./useMediaQuery.js";
5
+ import { useDrawer as p } from "../components/Drawer/Provider.js";
5
6
  export {
6
7
  o as AuthProvider,
7
8
  u as useAuth,
8
9
  t as useDisclosure,
10
+ p as useDrawer,
9
11
  l as useMediaQuery,
10
12
  f as useNiceModal
11
13
  };
package/dist/index.css CHANGED
@@ -1 +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}
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/index.d.mts CHANGED
@@ -438,6 +438,20 @@ export declare type DividerProps = {
438
438
  margin?: string;
439
439
  };
440
440
 
441
+ export declare function Drawer({ children, title }: DrawerProps): JSX_2.Element | null;
442
+
443
+ export declare type DrawerContextType = {
444
+ isOpen: boolean;
445
+ openDrawer: () => void;
446
+ closeDrawer: () => void;
447
+ toggleDrawer: () => void;
448
+ };
449
+
450
+ export declare type DrawerProps = {
451
+ children: React.ReactNode;
452
+ title: string;
453
+ };
454
+
441
455
  export declare type DropdownItemType = {
442
456
  text: string;
443
457
  to?: string;
@@ -1358,6 +1372,8 @@ export declare function useDisclosure(isOpenInit?: boolean): {
1358
1372
  onToggle: () => void;
1359
1373
  };
1360
1374
 
1375
+ export declare const useDrawer: () => DrawerContextType;
1376
+
1361
1377
  export declare const useMediaQuery: ({ query, onMatch, onUnmatch }: MediaQueryProps) => boolean;
1362
1378
 
1363
1379
  declare type UseNiceModal = [() => void, () => void, string];
package/dist/index.d.ts CHANGED
@@ -438,6 +438,20 @@ export declare type DividerProps = {
438
438
  margin?: string;
439
439
  };
440
440
 
441
+ export declare function Drawer({ children, title }: DrawerProps): JSX_2.Element | null;
442
+
443
+ export declare type DrawerContextType = {
444
+ isOpen: boolean;
445
+ openDrawer: () => void;
446
+ closeDrawer: () => void;
447
+ toggleDrawer: () => void;
448
+ };
449
+
450
+ export declare type DrawerProps = {
451
+ children: React.ReactNode;
452
+ title: string;
453
+ };
454
+
441
455
  export declare type DropdownItemType = {
442
456
  text: string;
443
457
  to?: string;
@@ -1358,6 +1372,8 @@ export declare function useDisclosure(isOpenInit?: boolean): {
1358
1372
  onToggle: () => void;
1359
1373
  };
1360
1374
 
1375
+ export declare const useDrawer: () => DrawerContextType;
1376
+
1361
1377
  export declare const useMediaQuery: ({ query, onMatch, onUnmatch }: MediaQueryProps) => boolean;
1362
1378
 
1363
1379
  declare type UseNiceModal = [() => void, () => void, string];