@chem-po/react-web 0.0.8 → 0.0.10
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -50
- package/dist/index.d.ts +48 -50
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +22 -37
- package/src/components/auth/SignIn.tsx +1 -1
- package/src/components/box/CollapseHorizontal.tsx +1 -0
- package/src/components/box/ContentBox.tsx +1 -1
- package/src/components/box/ExpandOnMount.tsx +1 -1
- package/src/components/box/Expandable.tsx +6 -6
- package/src/components/box/FullSizeContainer.tsx +3 -3
- package/src/components/box/MobileFrame/index.tsx +1 -1
- package/src/components/button/DeleteButton.tsx +1 -1
- package/src/components/button/Toggle.tsx +1 -1
- package/src/components/button/ViewButton.tsx +1 -1
- package/src/components/feed/FeedContentPane.tsx +1 -1
- package/src/components/feed/MediaFeedBackground.tsx +1 -1
- package/src/components/feed/MediaFeedRefresh.tsx +1 -1
- package/src/components/feed/MediaFeedSwipeUp.tsx +1 -0
- package/src/components/feed/context.tsx +1 -1
- package/src/components/form/Condition.tsx +1 -1
- package/src/components/form/Field.tsx +1 -1
- package/src/components/form/Form.tsx +9 -6
- package/src/components/form/FormFooter.tsx +4 -3
- package/src/components/form/UploadProgress/index.tsx +1 -1
- package/src/components/form/input/Editable.tsx +62 -70
- package/src/components/form/input/InputSlider.tsx +1 -0
- package/src/components/form/input/OptionalTag.tsx +1 -1
- package/src/components/form/input/StandaloneInput.tsx +1 -1
- package/src/components/form/input/boolean/index.tsx +1 -1
- package/src/components/form/input/color/index.tsx +1 -1
- package/src/components/form/input/date/index.tsx +1 -1
- package/src/components/form/input/datetime/index.tsx +1 -1
- package/src/components/form/input/file.tsx +4 -4
- package/src/components/form/input/input.tsx +10 -6
- package/src/components/form/input/multipleSelect/index.tsx +3 -3
- package/src/components/form/input/number/index.tsx +1 -1
- package/src/components/form/input/select/index.tsx +10 -4
- package/src/components/form/input/socialMedia/index.tsx +8 -1
- package/src/components/form/input/text/index.tsx +1 -1
- package/src/components/form/input/text/textarea.tsx +1 -1
- package/src/components/form/input/time/index.tsx +1 -1
- package/src/components/form/view/file.tsx +1 -1
- package/src/components/form/view/index.tsx +1 -1
- package/src/components/form/view/multipleSelect.tsx +3 -3
- package/src/components/form/view/select.tsx +14 -7
- package/src/components/list/Body/InfiniteScrollGridBody.tsx +1 -1
- package/src/components/list/Body/InfiniteScrollListBody.tsx +1 -1
- package/src/components/list/Body/ListBody.tsx +1 -0
- package/src/components/list/Body/PagedGridBody.tsx +1 -1
- package/src/components/list/Body/PagedListBody.tsx +1 -1
- package/src/components/list/DataList.tsx +1 -0
- package/src/components/list/ListContainer.tsx +1 -0
- package/src/components/list/ListContent.tsx +1 -1
- package/src/components/list/ListCreate.tsx +1 -1
- package/src/components/list/ListFilters.tsx +1 -1
- package/src/components/list/ListFooter.tsx +1 -1
- package/src/components/list/ListHeader.tsx +1 -1
- package/src/components/list/ListItem/ListCell.tsx +7 -6
- package/src/components/list/ListItem/ListRow.tsx +7 -1
- package/src/components/list/ListItemView.tsx +1 -1
- package/src/components/list/ListSort.tsx +1 -1
- package/src/components/list/NoItems.tsx +1 -1
- package/src/components/loading/CircularProgress.tsx +1 -0
- package/src/components/loading/Loading.tsx +1 -1
- package/src/components/loading/LoadingImage.tsx +1 -1
- package/src/components/loading/LoadingSwitch.tsx +1 -1
- package/src/components/media/PlayButton.tsx +1 -0
- package/src/components/modal/DefaultModal.tsx +1 -1
- package/src/components/modal/DesktopModal.tsx +1 -0
- package/src/components/modal/MobileModal.tsx +1 -1
- package/src/components/nav/NavBar.tsx +1 -1
- package/src/components/overlay/ImageViewOverlay.tsx +1 -1
- package/src/components/overlay/MobileOverlay.tsx +1 -0
- package/src/components/text/GradientText/index.tsx +1 -0
- package/src/components/text/NumberTicker.tsx +1 -1
- package/src/components/theme/colorMode/DarkModeToggle.tsx +1 -1
- package/src/components/view/ErrorView.tsx +1 -0
- package/src/components/view/RedirectView.tsx +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { PropsWithChildren, FC, ReactNode, JSX, MouseEvent, CSSProperties } from 'react';
|
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
3
|
import { CenterProps, FlexProps, StackProps, BoxProps, IconButtonProps, CircularProgressProps, ImageProps, ButtonProps, ModalProps, ModalContentProps } from '@chakra-ui/react';
|
|
4
|
-
import * as react from 'react';
|
|
5
|
-
import react__default, { PropsWithChildren, FC, ReactNode, JSX, MouseEvent, CSSProperties } from 'react';
|
|
6
4
|
import { View, ListField, IFormElement, DataViewProps, FieldMap, FieldMapFormProps, Field, FieldFormProps, FormProps, EditableProps, ListProviderProps, ThemedAsset } from '@chem-po/react';
|
|
7
5
|
import { AnyObject, WithId, FetchFeedFunction, FileValue, InputRef, ImageViewOptions, SpotifyTrack } from '@chem-po/core';
|
|
8
6
|
|
|
9
7
|
interface SignInProps {
|
|
10
8
|
layout?: 'row' | 'column';
|
|
11
9
|
}
|
|
12
|
-
declare const SignIn: ({ layout }: SignInProps) =>
|
|
13
|
-
declare const AbsoluteLogin: (props: SignInProps) =>
|
|
10
|
+
declare const SignIn: ({ layout }: SignInProps) => React.JSX.Element;
|
|
11
|
+
declare const AbsoluteLogin: (props: SignInProps) => React.JSX.Element;
|
|
14
12
|
|
|
15
13
|
declare const CollapseHorizontal: ({ width, children, active, duration, ...props }: CenterProps & {
|
|
16
14
|
width: number;
|
|
17
15
|
active: boolean;
|
|
18
16
|
duration?: number;
|
|
19
|
-
}) =>
|
|
17
|
+
}) => React.JSX.Element;
|
|
20
18
|
|
|
21
|
-
declare const ContentBox:
|
|
19
|
+
declare const ContentBox: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
20
|
|
|
23
|
-
declare const Expandable: ({ header, children, initExpanded, nested, alwaysExpanded, headerProps, iconColor, footer, isOpen: isOpenProp, onClose: onCloseProp, onOpen: onOpenProp, ...stackProps }: PropsWithChildren<StackProps & {
|
|
21
|
+
declare const Expandable: ({ header: Header, children, initExpanded, nested, alwaysExpanded, headerProps, iconColor, footer: Footer, isOpen: isOpenProp, onClose: onCloseProp, onOpen: onOpenProp, ...stackProps }: PropsWithChildren<StackProps & {
|
|
24
22
|
header: string | FC<{
|
|
25
23
|
isOpen: boolean;
|
|
26
24
|
onClose: () => void;
|
|
@@ -37,7 +35,7 @@ declare const Expandable: ({ header, children, initExpanded, nested, alwaysExpan
|
|
|
37
35
|
onClose?: () => void;
|
|
38
36
|
iconColor?: string;
|
|
39
37
|
onOpen?: () => void;
|
|
40
|
-
}>) =>
|
|
38
|
+
}>) => React.JSX.Element;
|
|
41
39
|
|
|
42
40
|
declare const ExpandOnMount: FC<BoxProps & {
|
|
43
41
|
in?: boolean;
|
|
@@ -46,18 +44,18 @@ declare const ExpandOnMount: FC<BoxProps & {
|
|
|
46
44
|
onExited?: () => void;
|
|
47
45
|
}>;
|
|
48
46
|
|
|
49
|
-
declare const FullSizeContainer: ({ children, ...props }: Omit<BoxProps, "children"> & {
|
|
47
|
+
declare const FullSizeContainer: ({ children: Children, ...props }: Omit<BoxProps, "children"> & {
|
|
50
48
|
children: FC<{
|
|
51
49
|
width: number;
|
|
52
50
|
height: number;
|
|
53
51
|
}>;
|
|
54
|
-
}) =>
|
|
55
|
-
declare const FullSizeProvider: ({ children, ...props }: BoxProps) =>
|
|
52
|
+
}) => React.JSX.Element;
|
|
53
|
+
declare const FullSizeProvider: ({ children, ...props }: BoxProps) => React.JSX.Element;
|
|
56
54
|
|
|
57
55
|
declare const MobileFrame: ({ children, navBarChildren, views, }: PropsWithChildren<{
|
|
58
56
|
views: View[];
|
|
59
57
|
navBarChildren?: ReactNode;
|
|
60
|
-
}>) =>
|
|
58
|
+
}>) => React.JSX.Element;
|
|
61
59
|
|
|
62
60
|
declare const DeleteConfirmAlert: ({ confirmActive, onCancel, onConfirm, body, actionName, actionLoading, itemName, }: {
|
|
63
61
|
confirmActive: boolean;
|
|
@@ -67,8 +65,8 @@ declare const DeleteConfirmAlert: ({ confirmActive, onCancel, onConfirm, body, a
|
|
|
67
65
|
actionLoading?: boolean;
|
|
68
66
|
actionName?: string;
|
|
69
67
|
itemName: string;
|
|
70
|
-
}) =>
|
|
71
|
-
declare const DeleteButton:
|
|
68
|
+
}) => React.JSX.Element;
|
|
69
|
+
declare const DeleteButton: React.FC<Partial<IconButtonProps> & {
|
|
72
70
|
onDelete: (() => Promise<any>) | (() => void);
|
|
73
71
|
itemName: string;
|
|
74
72
|
actionName?: string;
|
|
@@ -89,7 +87,7 @@ interface ToggleProps<Option extends string> {
|
|
|
89
87
|
size?: number;
|
|
90
88
|
onChange: (value: Option) => Promise<void> | void;
|
|
91
89
|
}
|
|
92
|
-
declare const Toggle: <Option extends string>({ value, onChange, size, options, }: ToggleProps<Option>) =>
|
|
90
|
+
declare const Toggle: <Option extends string>({ value, onChange, size, options, }: ToggleProps<Option>) => JSX.Element;
|
|
93
91
|
|
|
94
92
|
declare const ViewButton: FC<{
|
|
95
93
|
onClick: (e: MouseEvent) => void;
|
|
@@ -118,7 +116,7 @@ interface MediaFeedProps<T extends AnyObject = AnyObject> {
|
|
|
118
116
|
RenderItem: (item: WithId<T>) => JSX.Element;
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
declare const MediaFeed: <T extends AnyObject = AnyObject>({ fetch, collection: collectionPath, RenderItem, authRequired, getBackgroundUrl, getBackgroundValue, limit, defaultBackground, swipeDisabled, children, }: PropsWithChildren<MediaFeedProps<T>>) =>
|
|
119
|
+
declare const MediaFeed: <T extends AnyObject = AnyObject>({ fetch, collection: collectionPath, RenderItem, authRequired, getBackgroundUrl, getBackgroundValue, limit, defaultBackground, swipeDisabled, children, }: PropsWithChildren<MediaFeedProps<T>>) => React.JSX.Element;
|
|
122
120
|
|
|
123
121
|
declare const ListFieldInput: FC<{
|
|
124
122
|
field: ListField;
|
|
@@ -127,17 +125,17 @@ declare const ListFieldInput: FC<{
|
|
|
127
125
|
declare const FormElement: ({ field, name, }: {
|
|
128
126
|
field: IFormElement;
|
|
129
127
|
name: string;
|
|
130
|
-
}) =>
|
|
128
|
+
}) => React.JSX.Element;
|
|
131
129
|
declare const DataView: ({ field, value, onClose, onDelete, onSubmit, itemName, storagePath, path, }: DataViewProps & {
|
|
132
130
|
path?: string;
|
|
133
|
-
}) =>
|
|
134
|
-
declare const FieldMapForm: <F extends FieldMap>({ onSubmit: submit, onBack, field, value, buttonText, renderFooter, storagePath, }: FieldMapFormProps<F>) =>
|
|
135
|
-
declare const FieldForm: <F extends Field | ListField>({ onSubmit, field, value, ...props }: FieldFormProps<F>) =>
|
|
136
|
-
declare const Form: <F extends IFormElement>({ field, ...props }: FormProps<F>) =>
|
|
131
|
+
}) => React.JSX.Element;
|
|
132
|
+
declare const FieldMapForm: <F extends FieldMap>({ onSubmit: submit, onBack, field, value, buttonText, renderFooter, storagePath, }: FieldMapFormProps<F>) => React.JSX.Element;
|
|
133
|
+
declare const FieldForm: <F extends Field | ListField>({ onSubmit, field, value, ...props }: FieldFormProps<F>) => React.JSX.Element;
|
|
134
|
+
declare const Form: <F extends IFormElement>({ field, onSubmit, ...props }: FormProps<F>) => React.JSX.Element;
|
|
137
135
|
|
|
138
|
-
declare const Editable: <T extends Field>({ value: initValue, field, onSubmit, storagePath, style, onEditClose, onEditOpen, }: EditableProps<CSSProperties, T>) =>
|
|
136
|
+
declare const Editable: <T extends Field>({ value: initValue, field, onSubmit, storagePath, style, onEditClose, onEditOpen, }: EditableProps<CSSProperties, T>) => React.JSX.Element;
|
|
139
137
|
|
|
140
|
-
declare const StandaloneInput:
|
|
138
|
+
declare const StandaloneInput: React.ForwardRefExoticComponent<{
|
|
141
139
|
onChange: (v?: any) => void;
|
|
142
140
|
value?: any;
|
|
143
141
|
field: Field;
|
|
@@ -146,7 +144,7 @@ declare const StandaloneInput: react.ForwardRefExoticComponent<{
|
|
|
146
144
|
theme?: "basic" | "detailed";
|
|
147
145
|
inEditable?: boolean;
|
|
148
146
|
style?: CSSProperties;
|
|
149
|
-
} &
|
|
147
|
+
} & React.RefAttributes<InputRef>>;
|
|
150
148
|
|
|
151
149
|
declare const FileView: ({ value, hasUpload, noLabel, loading, imageOptions, }: {
|
|
152
150
|
value?: FileValue | null;
|
|
@@ -154,14 +152,14 @@ declare const FileView: ({ value, hasUpload, noLabel, loading, imageOptions, }:
|
|
|
154
152
|
noLabel?: boolean;
|
|
155
153
|
loading?: boolean;
|
|
156
154
|
imageOptions?: ImageViewOptions;
|
|
157
|
-
}) =>
|
|
155
|
+
}) => React.JSX.Element;
|
|
158
156
|
|
|
159
157
|
declare const FieldView: ({ field, value, noLabel, style, }: {
|
|
160
158
|
field: Field;
|
|
161
159
|
value: any;
|
|
162
160
|
noLabel?: boolean;
|
|
163
161
|
style?: CSSProperties;
|
|
164
|
-
}) =>
|
|
162
|
+
}) => React.JSX.Element;
|
|
165
163
|
|
|
166
164
|
interface DataListHeaderProps {
|
|
167
165
|
onResize: (size: {
|
|
@@ -188,13 +186,13 @@ type ListViewProps<T extends AnyObject> = ListProviderProps<T> & {
|
|
|
188
186
|
};
|
|
189
187
|
type ListContentProps<T extends AnyObject> = Omit<ListViewProps<T>, 'list' | 'basePath' | 'flexProps'>;
|
|
190
188
|
|
|
191
|
-
declare const DataList: <T extends AnyObject>({ list, basePath, flexProps, infiniteScroll, ...rest }: ListViewProps<T>) =>
|
|
189
|
+
declare const DataList: <T extends AnyObject>({ list, basePath, flexProps, infiniteScroll, ...rest }: ListViewProps<T>) => React.JSX.Element;
|
|
192
190
|
|
|
193
|
-
declare const ListContainer: (props: FlexProps) =>
|
|
191
|
+
declare const ListContainer: (props: FlexProps) => React.JSX.Element;
|
|
194
192
|
|
|
195
|
-
declare const ListContent: <T extends AnyObject>({ modals, noFooter, headerProps, footerProps, }: ListContentProps<T>) =>
|
|
193
|
+
declare const ListContent: <T extends AnyObject>({ modals, noFooter, headerProps, footerProps, }: ListContentProps<T>) => React.JSX.Element;
|
|
196
194
|
|
|
197
|
-
declare const CircularProgress: (props: CircularProgressProps) =>
|
|
195
|
+
declare const CircularProgress: (props: CircularProgressProps) => React.JSX.Element;
|
|
198
196
|
|
|
199
197
|
declare const LottieLoadingLogo: ({ size, isLoading, speed, inFeed, asset, }: {
|
|
200
198
|
size?: number | string;
|
|
@@ -203,22 +201,22 @@ declare const LottieLoadingLogo: ({ size, isLoading, speed, inFeed, asset, }: {
|
|
|
203
201
|
asset: ThemedAsset;
|
|
204
202
|
inFeed?: boolean;
|
|
205
203
|
speed?: number;
|
|
206
|
-
}) =>
|
|
204
|
+
}) => React.JSX.Element;
|
|
207
205
|
declare const LoadingLogo: ({ isLoading, size, inFeed, }: {
|
|
208
206
|
isLoading: boolean;
|
|
209
207
|
size?: number | string;
|
|
210
208
|
inFeed?: boolean;
|
|
211
|
-
}) =>
|
|
209
|
+
}) => React.JSX.Element;
|
|
212
210
|
declare const Loading: ({ text, inBox, stackProps, }: {
|
|
213
211
|
text?: string;
|
|
214
212
|
inBox?: boolean;
|
|
215
213
|
stackProps?: StackProps;
|
|
216
|
-
}) =>
|
|
214
|
+
}) => React.JSX.Element;
|
|
217
215
|
declare const LoadingOverlay: ({ isLoading, text, inFeed, ...props }: {
|
|
218
216
|
isLoading: boolean;
|
|
219
217
|
text?: string;
|
|
220
218
|
inFeed?: boolean;
|
|
221
|
-
} & CenterProps) =>
|
|
219
|
+
} & CenterProps) => React.JSX.Element;
|
|
222
220
|
|
|
223
221
|
interface LoadingImageProps {
|
|
224
222
|
src?: string | null;
|
|
@@ -229,13 +227,13 @@ interface LoadingImageProps {
|
|
|
229
227
|
buttonFullView?: boolean;
|
|
230
228
|
imageProps?: Omit<ImageProps, 'onLoad'>;
|
|
231
229
|
}
|
|
232
|
-
declare const LoadingImage: ({ src, loadingOverride, alt, onLoad, width, height, noFullView, buttonFullView, imageProps, ...boxProps }: LoadingImageProps & Omit<BoxProps, "onLoad">) =>
|
|
230
|
+
declare const LoadingImage: ({ src, loadingOverride, alt, onLoad, width, height, noFullView, buttonFullView, imageProps, ...boxProps }: LoadingImageProps & Omit<BoxProps, "onLoad">) => React.JSX.Element;
|
|
233
231
|
|
|
234
232
|
declare const LoadingSwitch: ({ value, label, onChange, }: {
|
|
235
233
|
value: boolean;
|
|
236
234
|
label: string;
|
|
237
235
|
onChange: (updated: boolean) => Promise<void>;
|
|
238
|
-
}) =>
|
|
236
|
+
}) => React.JSX.Element;
|
|
239
237
|
|
|
240
238
|
declare const PlayButton: ({ media, size, opacity, buttonProps, }: {
|
|
241
239
|
media: WithId<SpotifyTrack> | null;
|
|
@@ -243,47 +241,47 @@ declare const PlayButton: ({ media, size, opacity, buttonProps, }: {
|
|
|
243
241
|
opacity?: number;
|
|
244
242
|
withThumbnail?: boolean;
|
|
245
243
|
buttonProps?: ButtonProps;
|
|
246
|
-
}) =>
|
|
244
|
+
}) => React.JSX.Element;
|
|
247
245
|
|
|
248
246
|
type DefaultModalProps = PropsWithChildren<Omit<ModalProps, 'render'>> & {
|
|
249
247
|
contentProps?: ModalContentProps;
|
|
250
248
|
onContentMounted?: (mounted: boolean) => void;
|
|
251
249
|
};
|
|
252
250
|
|
|
253
|
-
declare const DefaultModal: (props: DefaultModalProps) =>
|
|
251
|
+
declare const DefaultModal: (props: DefaultModalProps) => React.JSX.Element;
|
|
254
252
|
|
|
255
|
-
declare const DesktopModal: ({ children, isOpen, contentProps, ...props }: DefaultModalProps) =>
|
|
253
|
+
declare const DesktopModal: ({ children, isOpen, contentProps, ...props }: DefaultModalProps) => React.JSX.Element;
|
|
256
254
|
|
|
257
255
|
declare const MobileOverlayBackground: ({ onClick }: {
|
|
258
256
|
onClick?: () => void;
|
|
259
|
-
}) =>
|
|
260
|
-
declare const MobileModal: ({ isOpen, onClose, children, contentProps, onContentMounted, closeOnOverlayClick, }: DefaultModalProps) =>
|
|
257
|
+
}) => React.JSX.Element;
|
|
258
|
+
declare const MobileModal: ({ isOpen, onClose, children, contentProps, onContentMounted, closeOnOverlayClick, }: DefaultModalProps) => React.JSX.Element | null;
|
|
261
259
|
|
|
262
260
|
declare const NAV_BAR_HEIGHT = 50;
|
|
263
261
|
declare const NavBar: ({ selectedView, children, }: PropsWithChildren<{
|
|
264
262
|
selectedView?: View | null;
|
|
265
|
-
}>) =>
|
|
263
|
+
}>) => React.JSX.Element;
|
|
266
264
|
|
|
267
265
|
declare const ImageViewOverlay: ({ src, onClose }: {
|
|
268
266
|
src: string;
|
|
269
267
|
onClose: () => void;
|
|
270
|
-
}) =>
|
|
268
|
+
}) => React.JSX.Element;
|
|
271
269
|
|
|
272
|
-
declare const MobileOverlay: (props: FlexProps) =>
|
|
270
|
+
declare const MobileOverlay: (props: FlexProps) => React.JSX.Element;
|
|
273
271
|
|
|
274
272
|
declare const NumberTicker: ({ value, duration }: {
|
|
275
273
|
value: number;
|
|
276
274
|
duration?: number;
|
|
277
|
-
}) =>
|
|
275
|
+
}) => React.JSX.Element;
|
|
278
276
|
|
|
279
|
-
declare const DarkModeToggle: () =>
|
|
280
|
-
declare const AbsoluteDarkModeToggle: (props: FlexProps) =>
|
|
277
|
+
declare const DarkModeToggle: () => React.JSX.Element;
|
|
278
|
+
declare const AbsoluteDarkModeToggle: (props: FlexProps) => React.JSX.Element;
|
|
281
279
|
|
|
282
280
|
declare const ErrorView: ({ message }: {
|
|
283
281
|
message?: string;
|
|
284
|
-
}) =>
|
|
282
|
+
}) => React.JSX.Element;
|
|
285
283
|
|
|
286
|
-
declare const RedirectView:
|
|
284
|
+
declare const RedirectView: React.FC<{
|
|
287
285
|
loading?: boolean;
|
|
288
286
|
}>;
|
|
289
287
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { PropsWithChildren, FC, ReactNode, JSX, MouseEvent, CSSProperties } from 'react';
|
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
3
|
import { CenterProps, FlexProps, StackProps, BoxProps, IconButtonProps, CircularProgressProps, ImageProps, ButtonProps, ModalProps, ModalContentProps } from '@chakra-ui/react';
|
|
4
|
-
import * as react from 'react';
|
|
5
|
-
import react__default, { PropsWithChildren, FC, ReactNode, JSX, MouseEvent, CSSProperties } from 'react';
|
|
6
4
|
import { View, ListField, IFormElement, DataViewProps, FieldMap, FieldMapFormProps, Field, FieldFormProps, FormProps, EditableProps, ListProviderProps, ThemedAsset } from '@chem-po/react';
|
|
7
5
|
import { AnyObject, WithId, FetchFeedFunction, FileValue, InputRef, ImageViewOptions, SpotifyTrack } from '@chem-po/core';
|
|
8
6
|
|
|
9
7
|
interface SignInProps {
|
|
10
8
|
layout?: 'row' | 'column';
|
|
11
9
|
}
|
|
12
|
-
declare const SignIn: ({ layout }: SignInProps) =>
|
|
13
|
-
declare const AbsoluteLogin: (props: SignInProps) =>
|
|
10
|
+
declare const SignIn: ({ layout }: SignInProps) => React.JSX.Element;
|
|
11
|
+
declare const AbsoluteLogin: (props: SignInProps) => React.JSX.Element;
|
|
14
12
|
|
|
15
13
|
declare const CollapseHorizontal: ({ width, children, active, duration, ...props }: CenterProps & {
|
|
16
14
|
width: number;
|
|
17
15
|
active: boolean;
|
|
18
16
|
duration?: number;
|
|
19
|
-
}) =>
|
|
17
|
+
}) => React.JSX.Element;
|
|
20
18
|
|
|
21
|
-
declare const ContentBox:
|
|
19
|
+
declare const ContentBox: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
20
|
|
|
23
|
-
declare const Expandable: ({ header, children, initExpanded, nested, alwaysExpanded, headerProps, iconColor, footer, isOpen: isOpenProp, onClose: onCloseProp, onOpen: onOpenProp, ...stackProps }: PropsWithChildren<StackProps & {
|
|
21
|
+
declare const Expandable: ({ header: Header, children, initExpanded, nested, alwaysExpanded, headerProps, iconColor, footer: Footer, isOpen: isOpenProp, onClose: onCloseProp, onOpen: onOpenProp, ...stackProps }: PropsWithChildren<StackProps & {
|
|
24
22
|
header: string | FC<{
|
|
25
23
|
isOpen: boolean;
|
|
26
24
|
onClose: () => void;
|
|
@@ -37,7 +35,7 @@ declare const Expandable: ({ header, children, initExpanded, nested, alwaysExpan
|
|
|
37
35
|
onClose?: () => void;
|
|
38
36
|
iconColor?: string;
|
|
39
37
|
onOpen?: () => void;
|
|
40
|
-
}>) =>
|
|
38
|
+
}>) => React.JSX.Element;
|
|
41
39
|
|
|
42
40
|
declare const ExpandOnMount: FC<BoxProps & {
|
|
43
41
|
in?: boolean;
|
|
@@ -46,18 +44,18 @@ declare const ExpandOnMount: FC<BoxProps & {
|
|
|
46
44
|
onExited?: () => void;
|
|
47
45
|
}>;
|
|
48
46
|
|
|
49
|
-
declare const FullSizeContainer: ({ children, ...props }: Omit<BoxProps, "children"> & {
|
|
47
|
+
declare const FullSizeContainer: ({ children: Children, ...props }: Omit<BoxProps, "children"> & {
|
|
50
48
|
children: FC<{
|
|
51
49
|
width: number;
|
|
52
50
|
height: number;
|
|
53
51
|
}>;
|
|
54
|
-
}) =>
|
|
55
|
-
declare const FullSizeProvider: ({ children, ...props }: BoxProps) =>
|
|
52
|
+
}) => React.JSX.Element;
|
|
53
|
+
declare const FullSizeProvider: ({ children, ...props }: BoxProps) => React.JSX.Element;
|
|
56
54
|
|
|
57
55
|
declare const MobileFrame: ({ children, navBarChildren, views, }: PropsWithChildren<{
|
|
58
56
|
views: View[];
|
|
59
57
|
navBarChildren?: ReactNode;
|
|
60
|
-
}>) =>
|
|
58
|
+
}>) => React.JSX.Element;
|
|
61
59
|
|
|
62
60
|
declare const DeleteConfirmAlert: ({ confirmActive, onCancel, onConfirm, body, actionName, actionLoading, itemName, }: {
|
|
63
61
|
confirmActive: boolean;
|
|
@@ -67,8 +65,8 @@ declare const DeleteConfirmAlert: ({ confirmActive, onCancel, onConfirm, body, a
|
|
|
67
65
|
actionLoading?: boolean;
|
|
68
66
|
actionName?: string;
|
|
69
67
|
itemName: string;
|
|
70
|
-
}) =>
|
|
71
|
-
declare const DeleteButton:
|
|
68
|
+
}) => React.JSX.Element;
|
|
69
|
+
declare const DeleteButton: React.FC<Partial<IconButtonProps> & {
|
|
72
70
|
onDelete: (() => Promise<any>) | (() => void);
|
|
73
71
|
itemName: string;
|
|
74
72
|
actionName?: string;
|
|
@@ -89,7 +87,7 @@ interface ToggleProps<Option extends string> {
|
|
|
89
87
|
size?: number;
|
|
90
88
|
onChange: (value: Option) => Promise<void> | void;
|
|
91
89
|
}
|
|
92
|
-
declare const Toggle: <Option extends string>({ value, onChange, size, options, }: ToggleProps<Option>) =>
|
|
90
|
+
declare const Toggle: <Option extends string>({ value, onChange, size, options, }: ToggleProps<Option>) => JSX.Element;
|
|
93
91
|
|
|
94
92
|
declare const ViewButton: FC<{
|
|
95
93
|
onClick: (e: MouseEvent) => void;
|
|
@@ -118,7 +116,7 @@ interface MediaFeedProps<T extends AnyObject = AnyObject> {
|
|
|
118
116
|
RenderItem: (item: WithId<T>) => JSX.Element;
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
declare const MediaFeed: <T extends AnyObject = AnyObject>({ fetch, collection: collectionPath, RenderItem, authRequired, getBackgroundUrl, getBackgroundValue, limit, defaultBackground, swipeDisabled, children, }: PropsWithChildren<MediaFeedProps<T>>) =>
|
|
119
|
+
declare const MediaFeed: <T extends AnyObject = AnyObject>({ fetch, collection: collectionPath, RenderItem, authRequired, getBackgroundUrl, getBackgroundValue, limit, defaultBackground, swipeDisabled, children, }: PropsWithChildren<MediaFeedProps<T>>) => React.JSX.Element;
|
|
122
120
|
|
|
123
121
|
declare const ListFieldInput: FC<{
|
|
124
122
|
field: ListField;
|
|
@@ -127,17 +125,17 @@ declare const ListFieldInput: FC<{
|
|
|
127
125
|
declare const FormElement: ({ field, name, }: {
|
|
128
126
|
field: IFormElement;
|
|
129
127
|
name: string;
|
|
130
|
-
}) =>
|
|
128
|
+
}) => React.JSX.Element;
|
|
131
129
|
declare const DataView: ({ field, value, onClose, onDelete, onSubmit, itemName, storagePath, path, }: DataViewProps & {
|
|
132
130
|
path?: string;
|
|
133
|
-
}) =>
|
|
134
|
-
declare const FieldMapForm: <F extends FieldMap>({ onSubmit: submit, onBack, field, value, buttonText, renderFooter, storagePath, }: FieldMapFormProps<F>) =>
|
|
135
|
-
declare const FieldForm: <F extends Field | ListField>({ onSubmit, field, value, ...props }: FieldFormProps<F>) =>
|
|
136
|
-
declare const Form: <F extends IFormElement>({ field, ...props }: FormProps<F>) =>
|
|
131
|
+
}) => React.JSX.Element;
|
|
132
|
+
declare const FieldMapForm: <F extends FieldMap>({ onSubmit: submit, onBack, field, value, buttonText, renderFooter, storagePath, }: FieldMapFormProps<F>) => React.JSX.Element;
|
|
133
|
+
declare const FieldForm: <F extends Field | ListField>({ onSubmit, field, value, ...props }: FieldFormProps<F>) => React.JSX.Element;
|
|
134
|
+
declare const Form: <F extends IFormElement>({ field, onSubmit, ...props }: FormProps<F>) => React.JSX.Element;
|
|
137
135
|
|
|
138
|
-
declare const Editable: <T extends Field>({ value: initValue, field, onSubmit, storagePath, style, onEditClose, onEditOpen, }: EditableProps<CSSProperties, T>) =>
|
|
136
|
+
declare const Editable: <T extends Field>({ value: initValue, field, onSubmit, storagePath, style, onEditClose, onEditOpen, }: EditableProps<CSSProperties, T>) => React.JSX.Element;
|
|
139
137
|
|
|
140
|
-
declare const StandaloneInput:
|
|
138
|
+
declare const StandaloneInput: React.ForwardRefExoticComponent<{
|
|
141
139
|
onChange: (v?: any) => void;
|
|
142
140
|
value?: any;
|
|
143
141
|
field: Field;
|
|
@@ -146,7 +144,7 @@ declare const StandaloneInput: react.ForwardRefExoticComponent<{
|
|
|
146
144
|
theme?: "basic" | "detailed";
|
|
147
145
|
inEditable?: boolean;
|
|
148
146
|
style?: CSSProperties;
|
|
149
|
-
} &
|
|
147
|
+
} & React.RefAttributes<InputRef>>;
|
|
150
148
|
|
|
151
149
|
declare const FileView: ({ value, hasUpload, noLabel, loading, imageOptions, }: {
|
|
152
150
|
value?: FileValue | null;
|
|
@@ -154,14 +152,14 @@ declare const FileView: ({ value, hasUpload, noLabel, loading, imageOptions, }:
|
|
|
154
152
|
noLabel?: boolean;
|
|
155
153
|
loading?: boolean;
|
|
156
154
|
imageOptions?: ImageViewOptions;
|
|
157
|
-
}) =>
|
|
155
|
+
}) => React.JSX.Element;
|
|
158
156
|
|
|
159
157
|
declare const FieldView: ({ field, value, noLabel, style, }: {
|
|
160
158
|
field: Field;
|
|
161
159
|
value: any;
|
|
162
160
|
noLabel?: boolean;
|
|
163
161
|
style?: CSSProperties;
|
|
164
|
-
}) =>
|
|
162
|
+
}) => React.JSX.Element;
|
|
165
163
|
|
|
166
164
|
interface DataListHeaderProps {
|
|
167
165
|
onResize: (size: {
|
|
@@ -188,13 +186,13 @@ type ListViewProps<T extends AnyObject> = ListProviderProps<T> & {
|
|
|
188
186
|
};
|
|
189
187
|
type ListContentProps<T extends AnyObject> = Omit<ListViewProps<T>, 'list' | 'basePath' | 'flexProps'>;
|
|
190
188
|
|
|
191
|
-
declare const DataList: <T extends AnyObject>({ list, basePath, flexProps, infiniteScroll, ...rest }: ListViewProps<T>) =>
|
|
189
|
+
declare const DataList: <T extends AnyObject>({ list, basePath, flexProps, infiniteScroll, ...rest }: ListViewProps<T>) => React.JSX.Element;
|
|
192
190
|
|
|
193
|
-
declare const ListContainer: (props: FlexProps) =>
|
|
191
|
+
declare const ListContainer: (props: FlexProps) => React.JSX.Element;
|
|
194
192
|
|
|
195
|
-
declare const ListContent: <T extends AnyObject>({ modals, noFooter, headerProps, footerProps, }: ListContentProps<T>) =>
|
|
193
|
+
declare const ListContent: <T extends AnyObject>({ modals, noFooter, headerProps, footerProps, }: ListContentProps<T>) => React.JSX.Element;
|
|
196
194
|
|
|
197
|
-
declare const CircularProgress: (props: CircularProgressProps) =>
|
|
195
|
+
declare const CircularProgress: (props: CircularProgressProps) => React.JSX.Element;
|
|
198
196
|
|
|
199
197
|
declare const LottieLoadingLogo: ({ size, isLoading, speed, inFeed, asset, }: {
|
|
200
198
|
size?: number | string;
|
|
@@ -203,22 +201,22 @@ declare const LottieLoadingLogo: ({ size, isLoading, speed, inFeed, asset, }: {
|
|
|
203
201
|
asset: ThemedAsset;
|
|
204
202
|
inFeed?: boolean;
|
|
205
203
|
speed?: number;
|
|
206
|
-
}) =>
|
|
204
|
+
}) => React.JSX.Element;
|
|
207
205
|
declare const LoadingLogo: ({ isLoading, size, inFeed, }: {
|
|
208
206
|
isLoading: boolean;
|
|
209
207
|
size?: number | string;
|
|
210
208
|
inFeed?: boolean;
|
|
211
|
-
}) =>
|
|
209
|
+
}) => React.JSX.Element;
|
|
212
210
|
declare const Loading: ({ text, inBox, stackProps, }: {
|
|
213
211
|
text?: string;
|
|
214
212
|
inBox?: boolean;
|
|
215
213
|
stackProps?: StackProps;
|
|
216
|
-
}) =>
|
|
214
|
+
}) => React.JSX.Element;
|
|
217
215
|
declare const LoadingOverlay: ({ isLoading, text, inFeed, ...props }: {
|
|
218
216
|
isLoading: boolean;
|
|
219
217
|
text?: string;
|
|
220
218
|
inFeed?: boolean;
|
|
221
|
-
} & CenterProps) =>
|
|
219
|
+
} & CenterProps) => React.JSX.Element;
|
|
222
220
|
|
|
223
221
|
interface LoadingImageProps {
|
|
224
222
|
src?: string | null;
|
|
@@ -229,13 +227,13 @@ interface LoadingImageProps {
|
|
|
229
227
|
buttonFullView?: boolean;
|
|
230
228
|
imageProps?: Omit<ImageProps, 'onLoad'>;
|
|
231
229
|
}
|
|
232
|
-
declare const LoadingImage: ({ src, loadingOverride, alt, onLoad, width, height, noFullView, buttonFullView, imageProps, ...boxProps }: LoadingImageProps & Omit<BoxProps, "onLoad">) =>
|
|
230
|
+
declare const LoadingImage: ({ src, loadingOverride, alt, onLoad, width, height, noFullView, buttonFullView, imageProps, ...boxProps }: LoadingImageProps & Omit<BoxProps, "onLoad">) => React.JSX.Element;
|
|
233
231
|
|
|
234
232
|
declare const LoadingSwitch: ({ value, label, onChange, }: {
|
|
235
233
|
value: boolean;
|
|
236
234
|
label: string;
|
|
237
235
|
onChange: (updated: boolean) => Promise<void>;
|
|
238
|
-
}) =>
|
|
236
|
+
}) => React.JSX.Element;
|
|
239
237
|
|
|
240
238
|
declare const PlayButton: ({ media, size, opacity, buttonProps, }: {
|
|
241
239
|
media: WithId<SpotifyTrack> | null;
|
|
@@ -243,47 +241,47 @@ declare const PlayButton: ({ media, size, opacity, buttonProps, }: {
|
|
|
243
241
|
opacity?: number;
|
|
244
242
|
withThumbnail?: boolean;
|
|
245
243
|
buttonProps?: ButtonProps;
|
|
246
|
-
}) =>
|
|
244
|
+
}) => React.JSX.Element;
|
|
247
245
|
|
|
248
246
|
type DefaultModalProps = PropsWithChildren<Omit<ModalProps, 'render'>> & {
|
|
249
247
|
contentProps?: ModalContentProps;
|
|
250
248
|
onContentMounted?: (mounted: boolean) => void;
|
|
251
249
|
};
|
|
252
250
|
|
|
253
|
-
declare const DefaultModal: (props: DefaultModalProps) =>
|
|
251
|
+
declare const DefaultModal: (props: DefaultModalProps) => React.JSX.Element;
|
|
254
252
|
|
|
255
|
-
declare const DesktopModal: ({ children, isOpen, contentProps, ...props }: DefaultModalProps) =>
|
|
253
|
+
declare const DesktopModal: ({ children, isOpen, contentProps, ...props }: DefaultModalProps) => React.JSX.Element;
|
|
256
254
|
|
|
257
255
|
declare const MobileOverlayBackground: ({ onClick }: {
|
|
258
256
|
onClick?: () => void;
|
|
259
|
-
}) =>
|
|
260
|
-
declare const MobileModal: ({ isOpen, onClose, children, contentProps, onContentMounted, closeOnOverlayClick, }: DefaultModalProps) =>
|
|
257
|
+
}) => React.JSX.Element;
|
|
258
|
+
declare const MobileModal: ({ isOpen, onClose, children, contentProps, onContentMounted, closeOnOverlayClick, }: DefaultModalProps) => React.JSX.Element | null;
|
|
261
259
|
|
|
262
260
|
declare const NAV_BAR_HEIGHT = 50;
|
|
263
261
|
declare const NavBar: ({ selectedView, children, }: PropsWithChildren<{
|
|
264
262
|
selectedView?: View | null;
|
|
265
|
-
}>) =>
|
|
263
|
+
}>) => React.JSX.Element;
|
|
266
264
|
|
|
267
265
|
declare const ImageViewOverlay: ({ src, onClose }: {
|
|
268
266
|
src: string;
|
|
269
267
|
onClose: () => void;
|
|
270
|
-
}) =>
|
|
268
|
+
}) => React.JSX.Element;
|
|
271
269
|
|
|
272
|
-
declare const MobileOverlay: (props: FlexProps) =>
|
|
270
|
+
declare const MobileOverlay: (props: FlexProps) => React.JSX.Element;
|
|
273
271
|
|
|
274
272
|
declare const NumberTicker: ({ value, duration }: {
|
|
275
273
|
value: number;
|
|
276
274
|
duration?: number;
|
|
277
|
-
}) =>
|
|
275
|
+
}) => React.JSX.Element;
|
|
278
276
|
|
|
279
|
-
declare const DarkModeToggle: () =>
|
|
280
|
-
declare const AbsoluteDarkModeToggle: (props: FlexProps) =>
|
|
277
|
+
declare const DarkModeToggle: () => React.JSX.Element;
|
|
278
|
+
declare const AbsoluteDarkModeToggle: (props: FlexProps) => React.JSX.Element;
|
|
281
279
|
|
|
282
280
|
declare const ErrorView: ({ message }: {
|
|
283
281
|
message?: string;
|
|
284
|
-
}) =>
|
|
282
|
+
}) => React.JSX.Element;
|
|
285
283
|
|
|
286
|
-
declare const RedirectView:
|
|
284
|
+
declare const RedirectView: React.FC<{
|
|
287
285
|
loading?: boolean;
|
|
288
286
|
}>;
|
|
289
287
|
|