@cagatayfdn/flora-components 0.0.77 → 0.0.79
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/hooks/index.js +4 -2
- package/dist/hooks/useMediaQuery.js +21 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +57 -55
- package/package.json +1 -2
package/dist/hooks/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { AuthProvider as
|
|
1
|
+
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
|
+
import { default as l } from "./useMediaQuery.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
o as AuthProvider,
|
|
6
7
|
u as useAuth,
|
|
7
8
|
t as useDisclosure,
|
|
9
|
+
l as useMediaQuery,
|
|
8
10
|
f as useNiceModal
|
|
9
11
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState as h, useEffect as m } from "react";
|
|
2
|
+
const f = ({ query: s, onMatch: n, onUnmatch: c }) => {
|
|
3
|
+
const i = window.matchMedia(s), [r, d] = h(i.matches), t = (e) => {
|
|
4
|
+
e ? n && n() : c && c(), d(e);
|
|
5
|
+
};
|
|
6
|
+
return m(() => {
|
|
7
|
+
const e = window.matchMedia(s);
|
|
8
|
+
return t(e.matches), e.addEventListener && e.addEventListener(
|
|
9
|
+
"change",
|
|
10
|
+
(a) => t(a.matches)
|
|
11
|
+
), () => {
|
|
12
|
+
e.removeEventListener && e.removeEventListener(
|
|
13
|
+
"change",
|
|
14
|
+
(a) => t(a.matches)
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
}, []), r;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
f as default
|
|
21
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -782,6 +782,12 @@ export declare type LoadingProps = {
|
|
|
782
782
|
layer?: boolean;
|
|
783
783
|
};
|
|
784
784
|
|
|
785
|
+
declare type MediaQueryProps = {
|
|
786
|
+
query: string;
|
|
787
|
+
onMatch?: () => void;
|
|
788
|
+
onUnmatch?: () => void;
|
|
789
|
+
};
|
|
790
|
+
|
|
785
791
|
export declare const MenuItem: ({ icon, title, to, visibleTooltip, }: MenuItemProps) => JSX.Element;
|
|
786
792
|
|
|
787
793
|
export declare type MenuItemProps = {
|
|
@@ -1330,6 +1336,8 @@ export declare function useDisclosure(isOpenInit?: boolean): {
|
|
|
1330
1336
|
onToggle: () => void;
|
|
1331
1337
|
};
|
|
1332
1338
|
|
|
1339
|
+
export declare const useMediaQuery: ({ query, onMatch, onUnmatch }: MediaQueryProps) => boolean;
|
|
1340
|
+
|
|
1333
1341
|
declare type UseNiceModal = [() => void, () => void, string];
|
|
1334
1342
|
|
|
1335
1343
|
export declare function useNiceModal(modalId?: string): UseNiceModal;
|
package/dist/index.d.ts
CHANGED
|
@@ -782,6 +782,12 @@ export declare type LoadingProps = {
|
|
|
782
782
|
layer?: boolean;
|
|
783
783
|
};
|
|
784
784
|
|
|
785
|
+
declare type MediaQueryProps = {
|
|
786
|
+
query: string;
|
|
787
|
+
onMatch?: () => void;
|
|
788
|
+
onUnmatch?: () => void;
|
|
789
|
+
};
|
|
790
|
+
|
|
785
791
|
export declare const MenuItem: ({ icon, title, to, visibleTooltip, }: MenuItemProps) => JSX.Element;
|
|
786
792
|
|
|
787
793
|
export declare type MenuItemProps = {
|
|
@@ -1330,6 +1336,8 @@ export declare function useDisclosure(isOpenInit?: boolean): {
|
|
|
1330
1336
|
onToggle: () => void;
|
|
1331
1337
|
};
|
|
1332
1338
|
|
|
1339
|
+
export declare const useMediaQuery: ({ query, onMatch, onUnmatch }: MediaQueryProps) => boolean;
|
|
1340
|
+
|
|
1333
1341
|
declare type UseNiceModal = [() => void, () => void, string];
|
|
1334
1342
|
|
|
1335
1343
|
export declare function useNiceModal(modalId?: string): UseNiceModal;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AppAndServicesStatusApperenceType as r, AppearanceAlertCard as a, AppearanceButton as t, AppearanceDirection as f, AppearanceSpinner as p, AppearanceTag as l, DividerAppearance as d, FormFieldAppearance as
|
|
1
|
+
import { AppAndServicesStatusApperenceType as r, AppearanceAlertCard as a, AppearanceButton as t, AppearanceDirection as f, AppearanceSpinner as p, AppearanceTag as l, DividerAppearance as d, FormFieldAppearance as u, ModalAppearanceType as m, NotificationAppearanceType as s, ThemeAppearance as x } from "./enums/appearance.js";
|
|
2
2
|
import { ApplicationTypeSlug as i } from "./enums/applicationTypeSlug.js";
|
|
3
3
|
import { isActiveColor as A } from "./enums/isActiveColor.js";
|
|
4
4
|
import { Size as E } from "./enums/size.js";
|
|
5
|
-
import { AppTypeEnum as C, CopyTextStatusEnum as
|
|
5
|
+
import { AppTypeEnum as C, CopyTextStatusEnum as M, PodStatusEnum as R, ReportStatus as I, StatusEnum as D, StatusType as S } from "./enums/status.js";
|
|
6
6
|
import { default as N } from "./components/Button/Button.js";
|
|
7
7
|
import { N as F } from "./index-H7XbDVmH.js";
|
|
8
8
|
import { PermFallBack as y, getAuth as P } from "./components/AuthUserCan/index.js";
|
|
@@ -12,22 +12,22 @@ import { default as H } from "./components/AlertCard/AlertCard.js";
|
|
|
12
12
|
import { default as V } from "./components/AuthUserCan/Permission.js";
|
|
13
13
|
import { default as j } from "./components/Autocomplete/Autocomplete.js";
|
|
14
14
|
import { default as K } from "./components/Card/Card.js";
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
15
|
+
import { default as Y } from "./components/Charts/index.js";
|
|
16
|
+
import { default as G } from "./components/Checkbox/Checkbox.js";
|
|
17
17
|
import { default as X } from "./components/Config/Config.js";
|
|
18
18
|
import { default as $ } from "./components/Confirm/Confirm.js";
|
|
19
19
|
import { default as oe } from "./components/ContentHeader/ContentHeader.js";
|
|
20
20
|
import { default as ae } from "./components/ContentLoader/ContentLoader.js";
|
|
21
21
|
import { default as fe } from "./components/Countdown/Countdown.js";
|
|
22
22
|
import { default as le } from "./components/Datepicker/Datepicker.js";
|
|
23
|
-
import { default as
|
|
23
|
+
import { default as ue } from "./components/Divider/Divider.js";
|
|
24
24
|
import { default as se } from "./components/Dropdown/DropdownList.js";
|
|
25
25
|
import { default as ne } from "./components/FileUpload/FileUpload.js";
|
|
26
26
|
import { default as Te } from "./components/FileUpload/ImagePreview.js";
|
|
27
27
|
import { default as ce } from "./components/FileUpload/LengthCard.js";
|
|
28
28
|
import { default as _e } from "./components/FileUpload/PreviewModal.js";
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
29
|
+
import { default as Me } from "./components/Grid/Column.js";
|
|
30
|
+
import { default as Ie } from "./components/Grid/Row.js";
|
|
31
31
|
import { default as Se } from "./components/Heading/Heading.js";
|
|
32
32
|
import { default as Ne } from "./components/Icon/index.js";
|
|
33
33
|
import { default as Fe } from "./components/InfiniteScroll/InfiniteScroll.js";
|
|
@@ -39,21 +39,21 @@ import { default as He } from "./components/Input/Input.js";
|
|
|
39
39
|
import { default as Ve } from "./components/Label/Label.js";
|
|
40
40
|
import { default as je } from "./components/Loading/Loading.js";
|
|
41
41
|
import { default as Ke } from "./components/Modal/Modal.js";
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
42
|
+
import { default as Ye } from "./components/NavigatorCard/index.js";
|
|
43
|
+
import { default as Ge } from "./components/NoResult/NoResult.js";
|
|
44
44
|
import { Notification as Xe } from "./components/Notification/Notification.js";
|
|
45
45
|
import { default as $e } from "./components/PageWrapper/PageWrap.js";
|
|
46
46
|
import { default as oo } from "./components/Pager/Pager.js";
|
|
47
47
|
import { default as ao } from "./components/Panel/Panel.js";
|
|
48
48
|
import { default as fo } from "./components/PermaLink/PermaLink.js";
|
|
49
|
-
import { default as lo, RadioList as
|
|
49
|
+
import { default as lo, RadioList as uo } from "./components/Radio/Radio.js";
|
|
50
50
|
import { default as so } from "./components/ResultError/ResultError.js";
|
|
51
51
|
import { default as no } from "./components/ScrollContainer/ScrollContainer.js";
|
|
52
52
|
import { default as To } from "./components/Select/NoData.js";
|
|
53
53
|
import { S as co } from "./Select-DcLZCXNo.js";
|
|
54
54
|
import { default as _o } from "./components/Sidebar/index.js";
|
|
55
|
-
import { M as
|
|
56
|
-
import { default as
|
|
55
|
+
import { M as Mo } from "./MenuItem-DAf7NU3h.js";
|
|
56
|
+
import { default as Io } from "./components/StatusTypography/StatusTypography.js";
|
|
57
57
|
import { default as So } from "./components/Stepper/Stepper.js";
|
|
58
58
|
import { default as No } from "./components/Switch/Switch.js";
|
|
59
59
|
import { default as Fo } from "./components/Tab/Tab.js";
|
|
@@ -64,12 +64,13 @@ import { default as ko } from "./components/Tooltip/Tooltip.js";
|
|
|
64
64
|
import { default as Ho } from "./components/TypographyText/TypographyText.js";
|
|
65
65
|
import { default as Vo } from "./components/ValidationError/ValidationError.js";
|
|
66
66
|
import { AuthProvider as jo, useAuth as zo } from "./hooks/useAauth.js";
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
67
|
+
import { default as Qo } from "./hooks/useDisclosure.js";
|
|
68
|
+
import { default as qo } from "./hooks/useNiceModal.js";
|
|
69
|
+
import { default as Jo } from "./hooks/useMediaQuery.js";
|
|
70
|
+
import { default as Zo, t as $o } from "./locales/i18n.js";
|
|
71
|
+
import { CLIENT_DATE_AND_TIME_FORMAT as or, CLIENT_DATE_AND_TIME_SHORT_FORMAT as rr, CLIENT_DATE_COMPARE_FORMAT as ar, CLIENT_DATE_FILTER_FORMAT as tr, CLIENT_DATE_SHORT_FORMAT as fr, CLIENT_TIME_FORMAT as pr, CLIENT_TIME_FORMAT_PICKER as lr, DateFormats as dr, MIN_DATE_TODAY as ur, MIN_DATE_TOMORROW as mr, SERVER_DATE_AND_TIME_FORMAT as sr, SERVER_DATE_FORMAT as xr, default as nr, friendlyDate as ir } from "./utils/date.js";
|
|
72
|
+
import { changeLanguage as Ar, getCurrentLanguage as cr, getDatepickerLocale as Er } from "./utils/language.js";
|
|
73
|
+
import { default as Cr } from "./prodivers.js";
|
|
73
74
|
export {
|
|
74
75
|
v as Accordion,
|
|
75
76
|
b as AccordionItem,
|
|
@@ -86,33 +87,33 @@ export {
|
|
|
86
87
|
jo as AuthProvider,
|
|
87
88
|
j as Autocomplete,
|
|
88
89
|
N as Button,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
or as CLIENT_DATE_AND_TIME_FORMAT,
|
|
91
|
+
rr as CLIENT_DATE_AND_TIME_SHORT_FORMAT,
|
|
92
|
+
ar as CLIENT_DATE_COMPARE_FORMAT,
|
|
93
|
+
tr as CLIENT_DATE_FILTER_FORMAT,
|
|
94
|
+
fr as CLIENT_DATE_SHORT_FORMAT,
|
|
95
|
+
pr as CLIENT_TIME_FORMAT,
|
|
96
|
+
lr as CLIENT_TIME_FORMAT_PICKER,
|
|
96
97
|
K as Card,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
Y as Chart,
|
|
99
|
+
G as Checkbox,
|
|
100
|
+
Me as Column,
|
|
100
101
|
X as Config,
|
|
101
102
|
$ as Confirm,
|
|
102
103
|
oe as ContentHeader,
|
|
103
104
|
ae as ContentLoader,
|
|
104
|
-
|
|
105
|
+
M as CopyTextStatusEnum,
|
|
105
106
|
fe as Countdown,
|
|
106
|
-
|
|
107
|
+
dr as DateFormats,
|
|
107
108
|
le as Datepicker,
|
|
108
|
-
|
|
109
|
+
ue as Divider,
|
|
109
110
|
d as DividerAppearance,
|
|
110
111
|
se as DropdownList,
|
|
111
112
|
ne as FileUpload,
|
|
112
113
|
Te as FileUploadImagePreview,
|
|
113
114
|
ce as FileUploadLengthCard,
|
|
114
115
|
_e as FileUploadPreviewModal,
|
|
115
|
-
|
|
116
|
+
u as FormFieldAppearance,
|
|
116
117
|
Se as Heading,
|
|
117
118
|
Ne as Icon,
|
|
118
119
|
Fe as InfiniteScroll,
|
|
@@ -122,15 +123,15 @@ export {
|
|
|
122
123
|
He as Input,
|
|
123
124
|
Ve as Label,
|
|
124
125
|
je as Loading,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
ur as MIN_DATE_TODAY,
|
|
127
|
+
mr as MIN_DATE_TOMORROW,
|
|
128
|
+
Mo as MenuItem,
|
|
128
129
|
Ke as Modal,
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
m as ModalAppearanceType,
|
|
131
|
+
Ye as NavigatorCard,
|
|
131
132
|
F as NiceModal,
|
|
132
133
|
To as NoData,
|
|
133
|
-
|
|
134
|
+
Ge as NoResult,
|
|
134
135
|
Xe as Notification,
|
|
135
136
|
s as NotificationAppearanceType,
|
|
136
137
|
$e as PageWrapper,
|
|
@@ -139,22 +140,22 @@ export {
|
|
|
139
140
|
y as PermFallBack,
|
|
140
141
|
fo as PermaLink,
|
|
141
142
|
V as Permission,
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
R as PodStatusEnum,
|
|
144
|
+
Cr as Provider,
|
|
144
145
|
lo as Radio,
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
uo as RadioList,
|
|
147
|
+
I as ReportStatus,
|
|
147
148
|
so as ResultError,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
Ie as Row,
|
|
150
|
+
sr as SERVER_DATE_AND_TIME_FORMAT,
|
|
151
|
+
xr as SERVER_DATE_FORMAT,
|
|
151
152
|
no as ScrollContainer,
|
|
152
153
|
co as Select,
|
|
153
154
|
_o as Sidebar,
|
|
154
155
|
E as Size,
|
|
155
156
|
D as StatusEnum,
|
|
156
157
|
S as StatusType,
|
|
157
|
-
|
|
158
|
+
Io as StatusTypography,
|
|
158
159
|
So as Stepper,
|
|
159
160
|
No as Switch,
|
|
160
161
|
Fo as Tab,
|
|
@@ -165,17 +166,18 @@ export {
|
|
|
165
166
|
ko as Tooltip,
|
|
166
167
|
Ho as TypographyText,
|
|
167
168
|
Vo as ValidationError,
|
|
168
|
-
|
|
169
|
+
Ar as changeLanguage,
|
|
169
170
|
he as createConnectedService,
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
nr as dayjs,
|
|
172
|
+
ir as friendlyDate,
|
|
172
173
|
P as getAuth,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
cr as getCurrentLanguage,
|
|
175
|
+
Er as getDatepickerLocale,
|
|
176
|
+
Zo as i18n,
|
|
176
177
|
A as isActiveColor,
|
|
177
|
-
|
|
178
|
+
$o as t,
|
|
178
179
|
zo as useAuth,
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
Qo as useDisclosure,
|
|
181
|
+
Jo as useMediaQuery,
|
|
182
|
+
qo as useNiceModal
|
|
181
183
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cagatayfdn/flora-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"react-router-dom": "6.22.0",
|
|
56
56
|
"react-toastify": "8.1.0",
|
|
57
57
|
"react-tooltip": "4.2.21",
|
|
58
|
-
"react-use": "15.3.4",
|
|
59
58
|
"vite-plugin-dts": "^3.7.3",
|
|
60
59
|
"yup": "0.32.11"
|
|
61
60
|
},
|