@cagatayfdn/flora-components 0.0.87 → 0.0.89
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/components/Drawer/Provider.js +22 -8
- package/dist/components/Drawer/index.js +16 -16
- package/dist/components/ErrorLogModal/ErrorLogModal.js +3 -2
- package/dist/components/index.js +91 -89
- package/dist/hooks/index.js +2 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +132 -128
- package/dist/prodivers.js +7 -6
- package/dist/utils/date.js +264 -266
- package/package.json +1 -1
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { j as a } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { createContext as c, useReducer as i, useContext as d } from "react";
|
|
3
|
+
const w = {}, D = (e, r) => {
|
|
4
|
+
switch (r.type) {
|
|
5
|
+
case "OPEN_DRAWER":
|
|
6
|
+
return { ...e, [r.id]: !0 };
|
|
7
|
+
case "CLOSE_DRAWER":
|
|
8
|
+
return { ...e, [r.id]: !1 };
|
|
9
|
+
default:
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
}, s = c(void 0), p = ({ children: e }) => {
|
|
13
|
+
const [r, o] = i(D, w), n = (t) => o({ type: "OPEN_DRAWER", id: t }), u = (t) => o({ type: "CLOSE_DRAWER", id: t });
|
|
14
|
+
return /* @__PURE__ */ a.jsx(s.Provider, { value: { state: r, openDrawer: n, closeDrawer: u }, children: e });
|
|
15
|
+
}, x = () => {
|
|
16
|
+
const e = d(s);
|
|
17
|
+
if (!e)
|
|
18
|
+
throw new Error("useDrawer must be used within a DrawerProvider");
|
|
19
|
+
return e;
|
|
20
|
+
};
|
|
7
21
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
22
|
+
p as DrawerProvider,
|
|
23
|
+
x as useDrawer
|
|
10
24
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as n } from "../../index-BHf7G3IG.js";
|
|
3
3
|
import { useDrawer as i } from "./Provider.js";
|
|
4
|
-
import
|
|
5
|
-
import '../../index.css';const
|
|
6
|
-
drawer:
|
|
7
|
-
header:
|
|
8
|
-
body:
|
|
4
|
+
import c from "../Icon/index.js";
|
|
5
|
+
import '../../index.css';const l = "_drawer_1bno3_1", m = "_header_1bno3_10", h = "_body_1bno3_32", s = {
|
|
6
|
+
drawer: l,
|
|
7
|
+
header: m,
|
|
8
|
+
body: h
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
const {
|
|
12
|
-
return
|
|
10
|
+
function p({ id: r, children: d, title: t }) {
|
|
11
|
+
const { state: o, closeDrawer: a } = i();
|
|
12
|
+
return o[r] || !1 ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
13
13
|
/* @__PURE__ */ e.jsx(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
16
|
"data-testid": "drawer-overlay",
|
|
17
|
-
onClick:
|
|
17
|
+
onClick: () => a(r),
|
|
18
18
|
style: {
|
|
19
19
|
position: "fixed",
|
|
20
20
|
top: 0,
|
|
@@ -26,15 +26,15 @@ function j({ children: s, title: a }) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
|
-
/* @__PURE__ */ e.jsxs("div", { "data-testid": "drawer", className:
|
|
30
|
-
/* @__PURE__ */ e.jsxs("div", { "data-testid": "drawer-header", className:
|
|
31
|
-
/* @__PURE__ */ e.jsx("div", { children:
|
|
32
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
29
|
+
/* @__PURE__ */ e.jsxs("div", { "data-testid": "drawer", className: n(s.drawer), children: [
|
|
30
|
+
/* @__PURE__ */ e.jsxs("div", { "data-testid": "drawer-header", className: s.header, children: [
|
|
31
|
+
/* @__PURE__ */ e.jsx("div", { children: t }),
|
|
32
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(c, { onClick: () => a(r), name: "close" }) })
|
|
33
33
|
] }),
|
|
34
|
-
/* @__PURE__ */ e.jsx("div", { "data-testid": "drawer-body", className:
|
|
34
|
+
/* @__PURE__ */ e.jsx("div", { "data-testid": "drawer-body", className: s.body, children: d })
|
|
35
35
|
] })
|
|
36
36
|
] }) : null;
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
p as default
|
|
40
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
|
-
},
|
|
61
|
+
}, Y = c.create(v);
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
Y as default
|
|
63
64
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -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
|
|
11
|
+
import { default as w } from "./Checkbox/Checkbox.js";
|
|
12
12
|
import { default as A } from "./Config/Config.js";
|
|
13
|
-
import { default as
|
|
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 "./
|
|
20
|
-
import { default as q } from "./
|
|
21
|
-
import { default as G } from "./FileUpload/
|
|
22
|
-
import { default as K } from "./FileUpload/
|
|
23
|
-
import { default as Q } from "./FileUpload/
|
|
24
|
-
import { default as Y } from "./
|
|
25
|
-
import { default as _ } from "./Grid/
|
|
26
|
-
import { default as oo } from "./
|
|
27
|
-
import { default as ro } from "./
|
|
28
|
-
import { default as ao } from "./
|
|
29
|
-
import { default as lo } from "./
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { default as go } from "./
|
|
35
|
-
import { default as Io } from "./
|
|
36
|
-
import { default as Lo } from "./
|
|
37
|
-
import { default as ho } from "./
|
|
38
|
-
import { default as
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { default as Mo } from "./
|
|
42
|
-
import { default as ko } from "./
|
|
43
|
-
import { default as Bo } from "./
|
|
44
|
-
import { default as Ho
|
|
45
|
-
import { default as Wo } from "./
|
|
46
|
-
import { default as qo } from "./
|
|
47
|
-
import { default as Go } from "./
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { default as oe } from "./
|
|
53
|
-
import { default as re } from "./
|
|
54
|
-
import { default as ae } from "./
|
|
55
|
-
import { default as le } from "./
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import { default as ue } from "./
|
|
59
|
-
import { default as ne } from "./
|
|
60
|
-
import { default as Ce } from "./
|
|
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
|
-
|
|
71
|
-
|
|
71
|
+
w as Checkbox,
|
|
72
|
+
_ as Column,
|
|
72
73
|
A as Config,
|
|
73
|
-
|
|
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
|
|
80
|
-
q as
|
|
81
|
-
G as
|
|
82
|
-
K as
|
|
83
|
-
Q as
|
|
84
|
-
|
|
85
|
-
ro as
|
|
86
|
-
ao as
|
|
87
|
-
lo as
|
|
88
|
-
|
|
89
|
-
io as
|
|
90
|
-
co as
|
|
91
|
-
go as
|
|
92
|
-
Io as
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
ho as
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
106
|
+
Ho as PermaLink,
|
|
105
107
|
C as Permission,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
};
|
package/dist/hooks/index.js
CHANGED
|
@@ -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.d.mts
CHANGED
|
@@ -438,6 +438,24 @@ export declare type DividerProps = {
|
|
|
438
438
|
margin?: string;
|
|
439
439
|
};
|
|
440
440
|
|
|
441
|
+
export declare function Drawer({ id, children, title }: DrawerProps): JSX_2.Element | null;
|
|
442
|
+
|
|
443
|
+
export declare type DrawerContextType = {
|
|
444
|
+
state: DrawerState;
|
|
445
|
+
openDrawer: (id: string) => void;
|
|
446
|
+
closeDrawer: (id: string) => void;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
export declare type DrawerProps = {
|
|
450
|
+
id: string;
|
|
451
|
+
children: React.ReactNode;
|
|
452
|
+
title: string;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
declare type DrawerState = {
|
|
456
|
+
[id: string]: boolean;
|
|
457
|
+
};
|
|
458
|
+
|
|
441
459
|
export declare type DropdownItemType = {
|
|
442
460
|
text: string;
|
|
443
461
|
to?: string;
|
|
@@ -1358,6 +1376,8 @@ export declare function useDisclosure(isOpenInit?: boolean): {
|
|
|
1358
1376
|
onToggle: () => void;
|
|
1359
1377
|
};
|
|
1360
1378
|
|
|
1379
|
+
export declare const useDrawer: () => DrawerContextType;
|
|
1380
|
+
|
|
1361
1381
|
export declare const useMediaQuery: ({ query, onMatch, onUnmatch }: MediaQueryProps) => boolean;
|
|
1362
1382
|
|
|
1363
1383
|
declare type UseNiceModal = [() => void, () => void, string];
|
package/dist/index.d.ts
CHANGED
|
@@ -438,6 +438,24 @@ export declare type DividerProps = {
|
|
|
438
438
|
margin?: string;
|
|
439
439
|
};
|
|
440
440
|
|
|
441
|
+
export declare function Drawer({ id, children, title }: DrawerProps): JSX_2.Element | null;
|
|
442
|
+
|
|
443
|
+
export declare type DrawerContextType = {
|
|
444
|
+
state: DrawerState;
|
|
445
|
+
openDrawer: (id: string) => void;
|
|
446
|
+
closeDrawer: (id: string) => void;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
export declare type DrawerProps = {
|
|
450
|
+
id: string;
|
|
451
|
+
children: React.ReactNode;
|
|
452
|
+
title: string;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
declare type DrawerState = {
|
|
456
|
+
[id: string]: boolean;
|
|
457
|
+
};
|
|
458
|
+
|
|
441
459
|
export declare type DropdownItemType = {
|
|
442
460
|
text: string;
|
|
443
461
|
to?: string;
|
|
@@ -1358,6 +1376,8 @@ export declare function useDisclosure(isOpenInit?: boolean): {
|
|
|
1358
1376
|
onToggle: () => void;
|
|
1359
1377
|
};
|
|
1360
1378
|
|
|
1379
|
+
export declare const useDrawer: () => DrawerContextType;
|
|
1380
|
+
|
|
1361
1381
|
export declare const useMediaQuery: ({ query, onMatch, onUnmatch }: MediaQueryProps) => boolean;
|
|
1362
1382
|
|
|
1363
1383
|
declare type UseNiceModal = [() => void, () => void, string];
|