@orioro/react-ui-core 0.0.0
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/README.md +1 -0
- package/dist/AppHeader/AppHeaderContext.d.ts +5 -0
- package/dist/AppHeader/Logo.d.ts +2 -0
- package/dist/AppHeader/Main.d.ts +2 -0
- package/dist/AppHeader/OverlayMenu.d.ts +13 -0
- package/dist/AppHeader/Root.d.ts +9 -0
- package/dist/AppHeader/index.d.ts +9 -0
- package/dist/AspectRatio/index.d.ts +10 -0
- package/dist/Box/Box.d.ts +27 -0
- package/dist/Box/index.d.ts +1 -0
- package/dist/Box/spacing.d.ts +23 -0
- package/dist/Button/Button.d.ts +302 -0
- package/dist/Button/ButtonList.d.ts +13 -0
- package/dist/Button/LinkButton.d.ts +309 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/CSSReset/index.d.ts +2 -0
- package/dist/ClickTarget/ClickTarget.d.ts +2 -0
- package/dist/ClickTarget/index.d.ts +2 -0
- package/dist/ClickTarget/makeClickTarget.d.ts +15 -0
- package/dist/Collapsible/index.d.ts +7 -0
- package/dist/Container/index.d.ts +12 -0
- package/dist/DataList/index.d.ts +12 -0
- package/dist/Debug/LabeledBox.d.ts +4 -0
- package/dist/Debug/RandomIcon.d.ts +2 -0
- package/dist/Debug/index.d.ts +9 -0
- package/dist/Debug/randomText.d.ts +1 -0
- package/dist/Debug/wait.d.ts +1 -0
- package/dist/Dialog/AuthDialog/AccountRecoveryForm.d.ts +9 -0
- package/dist/Dialog/AuthDialog/AuthDialog.d.ts +51 -0
- package/dist/Dialog/AuthDialog/LoginForm.d.ts +11 -0
- package/dist/Dialog/AuthDialog/SignUpForm.d.ts +14 -0
- package/dist/Dialog/AuthDialog/constants.d.ts +36 -0
- package/dist/Dialog/AuthDialog/index.d.ts +3 -0
- package/dist/Dialog/AuthDialog/useAuthDialog.d.ts +4 -0
- package/dist/Dialog/ConfirmDialog/ConfirmDialog.d.ts +10 -0
- package/dist/Dialog/ConfirmDialog/index.d.ts +2 -0
- package/dist/Dialog/ConfirmDialog/types.d.ts +14 -0
- package/dist/Dialog/ConfirmDialog/useConfirmDialog.d.ts +3 -0
- package/dist/Dialog/DialogSystem/DialogSystem.d.ts +11 -0
- package/dist/Dialog/DialogSystem/DialogSystemContext.d.ts +4 -0
- package/dist/Dialog/DialogSystem/_DialogSystemContext.d.ts +3 -0
- package/dist/Dialog/DialogSystem/index.d.ts +2 -0
- package/dist/Dialog/DialogSystem/tmpDialogSystem.d.ts +3 -0
- package/dist/Dialog/DialogSystem/types.d.ts +25 -0
- package/dist/Dialog/InfoDialog/InfoDialog.d.ts +9 -0
- package/dist/Dialog/InfoDialog/index.d.ts +3 -0
- package/dist/Dialog/InfoDialog/types.d.ts +18 -0
- package/dist/Dialog/InfoDialog/useInfoDialog.d.ts +4 -0
- package/dist/Dialog/LoadingDialog/LoadingDialog.d.ts +3 -0
- package/dist/Dialog/LoadingDialog/index.d.ts +3 -0
- package/dist/Dialog/LoadingDialog/types.d.ts +4 -0
- package/dist/Dialog/LoadingDialog/useLoadingDialog.d.ts +5 -0
- package/dist/Dialog/OptionsDialog/OptionsDialog.d.ts +3 -0
- package/dist/Dialog/OptionsDialog/index.d.ts +2 -0
- package/dist/Dialog/OptionsDialog/types.d.ts +24 -0
- package/dist/Dialog/OptionsDialog/useOptionsDialog.d.ts +3 -0
- package/dist/Dialog/PromptDialog/PromptDialog.d.ts +47 -0
- package/dist/Dialog/PromptDialog/index.d.ts +3 -0
- package/dist/Dialog/PromptDialog/isEqual.d.ts +1 -0
- package/dist/Dialog/PromptDialog/types.d.ts +22 -0
- package/dist/Dialog/PromptDialog/usePromptDialog.d.ts +4 -0
- package/dist/Dialog/constants.d.ts +1 -0
- package/dist/Dialog/createDialogSystem/createDialogSystem.d.ts +13 -0
- package/dist/Dialog/createDialogSystem/index.d.ts +2 -0
- package/dist/Dialog/createDialogSystem/proxyRef.d.ts +2 -0
- package/dist/Dialog/createDialogSystem/useDialog.d.ts +18 -0
- package/dist/Dialog/index.d.ts +8 -0
- package/dist/Dialog/useDialog/index.d.ts +6 -0
- package/dist/DotDotDot/index.d.ts +3 -0
- package/dist/Editable/EditableContext.d.ts +3 -0
- package/dist/Editable/EditableField.d.ts +3 -0
- package/dist/Editable/EditableRoot.d.ts +3 -0
- package/dist/Editable/index.d.ts +10 -0
- package/dist/Editable/types.d.ts +26 -0
- package/dist/ErrorDisplay/ErrorDisplay.d.ts +3 -0
- package/dist/ErrorDisplay/ErrorHandlingContext.d.ts +27 -0
- package/dist/ErrorDisplay/index.d.ts +3 -0
- package/dist/ErrorDisplay/types.d.ts +34 -0
- package/dist/EvenSpacedList/EvenSpacedList.d.ts +46 -0
- package/dist/EvenSpacedList/evenSpacedListStyles.d.ts +11 -0
- package/dist/EvenSpacedList/index.d.ts +1 -0
- package/dist/FileDropzone/index.d.ts +18 -0
- package/dist/FileIcon/index.d.ts +8 -0
- package/dist/FilePreview/FileThumb.d.ts +7 -0
- package/dist/FilePreview/index.d.ts +9 -0
- package/dist/Flex/Flex.d.ts +46 -0
- package/dist/Flex/flexBaseStyles.d.ts +13 -0
- package/dist/Flex/flexGapStyles.d.ts +11 -0
- package/dist/Flex/index.d.ts +4 -0
- package/dist/Flex/types.d.ts +8 -0
- package/dist/FlexGrid/FlexGrid.d.ts +21 -0
- package/dist/FlexGrid/index.d.ts +1 -0
- package/dist/HoverElement/Container.d.ts +7 -0
- package/dist/HoverElement/Element.d.ts +3 -0
- package/dist/HoverElement/index.d.ts +10 -0
- package/dist/HoverElement/types.d.ts +7 -0
- package/dist/Image/Image.d.ts +12 -0
- package/dist/Image/ImageWithFallback.d.ts +8 -0
- package/dist/Image/index.d.ts +2 -0
- package/dist/Input/ArrayInput/ArrayInputContext.d.ts +19 -0
- package/dist/Input/ArrayInput/DefaultItemComponent.d.ts +3 -0
- package/dist/Input/ArrayInput/FloatingControls.d.ts +6 -0
- package/dist/Input/ArrayInput/ValueList.d.ts +5 -0
- package/dist/Input/ArrayInput/ValueList_Virtualized_POC.d.ts +5 -0
- package/dist/Input/ArrayInput/index.d.ts +3 -0
- package/dist/Input/ArrayInput/types.d.ts +41 -0
- package/dist/Input/BooleanCheckboxInput/index.d.ts +8 -0
- package/dist/Input/CheckboxSelectInput/index.d.ts +12 -0
- package/dist/Input/DateTimeInput/index.d.ts +12 -0
- package/dist/Input/ErrorDisplay/index.d.ts +2 -0
- package/dist/Input/INPUTS.d.ts +1 -0
- package/dist/Input/Input/Input.d.ts +4 -0
- package/dist/Input/Input/index.d.ts +2 -0
- package/dist/Input/Input/types.d.ts +2 -0
- package/dist/Input/InputGrid/index.d.ts +19 -0
- package/dist/Input/InputLayout/index.d.ts +11 -0
- package/dist/Input/MarkdownInput/index.d.ts +2 -0
- package/dist/Input/MultiFileInput/index.d.ts +16 -0
- package/dist/Input/ObjectInput/index.d.ts +21 -0
- package/dist/Input/RadioSelectInput/index.d.ts +13 -0
- package/dist/Input/RichTextInput/RichTextInput.d.ts +543 -0
- package/dist/Input/RichTextInput/RichTextInput_20240730_backup_NO_MARKDOWN.d.ts +543 -0
- package/dist/Input/RichTextInput/index.d.ts +2 -0
- package/dist/Input/RichTextInput/types.d.ts +13 -0
- package/dist/Input/SingleFileInput/index.d.ts +7 -0
- package/dist/Input/TextInput/index.d.ts +39 -0
- package/dist/Input/TextInput/parseValidator.d.ts +3 -0
- package/dist/Input/TextInput/types.d.ts +16 -0
- package/dist/Input/TextInput/useTextInput.d.ts +32 -0
- package/dist/Input/TextareaInput/index.d.ts +36 -0
- package/dist/Input/index.d.ts +16 -0
- package/dist/Input/types.d.ts +28 -0
- package/dist/Input/useValidation/index.d.ts +1 -0
- package/dist/Input/useValidation/useValidation.d.ts +13 -0
- package/dist/Input/util/index.d.ts +12 -0
- package/dist/Input/util/omitInputProps.d.ts +8 -0
- package/dist/Input/valueUtil/diff.d.ts +9 -0
- package/dist/Input/valueUtil/index.d.ts +2 -0
- package/dist/Input/valueUtil/strValue.d.ts +1 -0
- package/dist/LanguageSelector/index.d.ts +11 -0
- package/dist/LoadingIndicator/LoadingIndicator.d.ts +7 -0
- package/dist/LoadingIndicator/LoadingOverlay.d.ts +6 -0
- package/dist/LoadingIndicator/index.d.ts +2 -0
- package/dist/LocalImagePreview/index.d.ts +6 -0
- package/dist/Markdown/index.d.ts +4 -0
- package/dist/Menu/ButtonBarMenu/MenuItem.d.ts +9 -0
- package/dist/Menu/ButtonBarMenu/index.d.ts +13 -0
- package/dist/Menu/ButtonBarMenu/types.d.ts +8 -0
- package/dist/Menu/DropdownMenu/MenuItem.d.ts +9 -0
- package/dist/Menu/DropdownMenu/index.d.ts +16 -0
- package/dist/Menu/DropdownMenu/types.d.ts +6 -0
- package/dist/Menu/constants.d.ts +1 -0
- package/dist/Menu/index.d.ts +4 -0
- package/dist/Menu/parseMenuItems.d.ts +2 -0
- package/dist/Menu/resolveOptions.d.ts +8 -0
- package/dist/Menu/types.d.ts +31 -0
- package/dist/Output/ArrayOutput/index.d.ts +5 -0
- package/dist/Output/BooleanCheckboxOutput/index.d.ts +4 -0
- package/dist/Output/CheckboxSelectOutput/index.d.ts +2 -0
- package/dist/Output/DateTimeOutput/index.d.ts +7 -0
- package/dist/Output/EmailOutput/index.d.ts +4 -0
- package/dist/Output/FileOutput/index.d.ts +2 -0
- package/dist/Output/LabeledLayout/index.d.ts +10 -0
- package/dist/Output/MarkdownOutput/index.d.ts +4 -0
- package/dist/Output/MultiFileOutput/index.d.ts +2 -0
- package/dist/Output/OUTPUTS.d.ts +1 -0
- package/dist/Output/ObjectOutput/index.d.ts +12 -0
- package/dist/Output/Output/Output.d.ts +3 -0
- package/dist/Output/Output/index.d.ts +1 -0
- package/dist/Output/RichTextOutput/index.d.ts +2 -0
- package/dist/Output/SelectOutput/index.d.ts +2 -0
- package/dist/Output/TextOutput/index.d.ts +4 -0
- package/dist/Output/TextareaOutput/index.d.ts +4 -0
- package/dist/Output/UrlOutput/index.d.ts +4 -0
- package/dist/Output/index.d.ts +14 -0
- package/dist/Output/types.d.ts +6 -0
- package/dist/Output/withPlaceholder/index.d.ts +8 -0
- package/dist/PromptPopover/PromptPopover.d.ts +11 -0
- package/dist/PromptPopover/index.d.ts +1 -0
- package/dist/PromptPopover/types.d.ts +9 -0
- package/dist/Responsive/Responsive.d.ts +5 -0
- package/dist/Responsive/index.d.ts +4 -0
- package/dist/Responsive/responsiveStyles.d.ts +2 -0
- package/dist/Responsive/transformResponsiveValue.d.ts +2 -0
- package/dist/Responsive/types.d.ts +12 -0
- package/dist/RichText/index.d.ts +2 -0
- package/dist/RichTextRenderer/BlockRenderer.d.ts +10 -0
- package/dist/RichTextRenderer/InlineContentRenderer.d.ts +8 -0
- package/dist/RichTextRenderer/RendererContext.d.ts +3 -0
- package/dist/RichTextRenderer/RichTextRenderer.d.ts +3 -0
- package/dist/RichTextRenderer/Unsupported.d.ts +2 -0
- package/dist/RichTextRenderer/groupListItems.d.ts +10 -0
- package/dist/RichTextRenderer/index.d.ts +4 -0
- package/dist/RichTextRenderer/renderers/Block/Heading.d.ts +3 -0
- package/dist/RichTextRenderer/renderers/Block/Image.d.ts +3 -0
- package/dist/RichTextRenderer/renderers/Block/Table.d.ts +3 -0
- package/dist/RichTextRenderer/renderers/InlineContent/Link.d.ts +3 -0
- package/dist/RichTextRenderer/renderers/InlineContent/StyledText.d.ts +3 -0
- package/dist/RichTextRenderer/renderers/index.d.ts +2 -0
- package/dist/RichTextRenderer/types/blocknote.d.ts +74 -0
- package/dist/RichTextRenderer/types/index.d.ts +18 -0
- package/dist/RichTextRenderer/types/lists.d.ts +13 -0
- package/dist/RichTextRenderer/util/index.d.ts +5 -0
- package/dist/RichTextRenderer/util/richTextIsEmpty.d.ts +2 -0
- package/dist/RichTextRenderer/util/richTextToPlainText.d.ts +2 -0
- package/dist/RichTextRenderer/util/richTextTrimEmptyBlocks.d.ts +2 -0
- package/dist/RichTextRenderer/util/simpleBlockRenderer.d.ts +10 -0
- package/dist/RichTextRenderer/util/toDataProps.d.ts +3 -0
- package/dist/SearchForm/index.d.ts +5 -0
- package/dist/ShadowExpandable/index.d.ts +19 -0
- package/dist/ShadowExpandable/util.d.ts +1 -0
- package/dist/Spinner/index.d.ts +9 -0
- package/dist/StylableFileInput/index.d.ts +4 -0
- package/dist/TextEllipsis/index.d.ts +7 -0
- package/dist/Theme/index.d.ts +2 -0
- package/dist/Theme/theme.d.ts +29 -0
- package/dist/Theme/valueResolver.d.ts +13 -0
- package/dist/_switchValue/index.d.ts +1 -0
- package/dist/_switchValue/tmpindex.d.ts +9 -0
- package/dist/_typeOf/index.d.ts +1 -0
- package/dist/_typeOf/tmptypeOf.d.ts +6 -0
- package/dist/assets/index-BG8CATwr.css +94 -0
- package/dist/createDataContext/index.d.ts +36 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.mjs +7951 -0
- package/dist/makeLink/index.d.ts +1 -0
- package/dist/makeLink/locationAwareLink.d.ts +290 -0
- package/dist/makeListOf/index.d.ts +13 -0
- package/dist/makeListOf/types.d.ts +12 -0
- package/dist/mergeable/index.d.ts +9 -0
- package/dist/mergeable/types.d.ts +4 -0
- package/dist/recursiveRendererSystem/arrayRenderer.d.ts +20 -0
- package/dist/recursiveRendererSystem/index.d.ts +5 -0
- package/dist/recursiveRendererSystem/objectRenderer.d.ts +31 -0
- package/dist/recursiveRendererSystem/recursiveRendererSystem.d.ts +7 -0
- package/dist/recursiveRendererSystem/rendererSpecList.d.ts +2 -0
- package/dist/recursiveRendererSystem/stories/Output.d.ts +46 -0
- package/dist/recursiveRendererSystem/types.d.ts +43 -0
- package/dist/replaceable/index.d.ts +13 -0
- package/dist/responsiveCss/index.d.ts +15 -0
- package/dist/responsiveCss/queryDeclarations.d.ts +8 -0
- package/dist/responsiveCss/types.d.ts +4 -0
- package/dist/s3Upload/index.d.ts +3 -0
- package/dist/styleResolver/index.d.ts +16 -0
- package/dist/styles.css +2 -0
- package/dist/switchValue/index.d.ts +9 -0
- package/dist/typeOf/index.d.ts +1 -0
- package/dist/typeOf/typeOf.d.ts +6 -0
- package/dist/useClosestBackgroundColor/getClosestBackgroundColor.d.ts +1 -0
- package/dist/useClosestBackgroundColor/index.d.ts +3 -0
- package/dist/useDefer/index.d.ts +15 -0
- package/dist/useFetch/index.d.ts +10 -0
- package/dist/useFileReadAs/fileReadAs.d.ts +3 -0
- package/dist/useFileReadAs/index.d.ts +3 -0
- package/dist/useListMeasures/index.d.ts +2 -0
- package/dist/useListMeasures/measureList.d.ts +13 -0
- package/dist/useListMeasures/useListMeasures.d.ts +7 -0
- package/dist/useListOverflow/computeListOverflow.d.ts +12 -0
- package/dist/useListOverflow/index.d.ts +1 -0
- package/dist/useListOverflow/useListOverflow.d.ts +9 -0
- package/dist/useLocalState/index.d.ts +1 -0
- package/dist/useMeasureLayer/index.d.ts +7 -0
- package/dist/useMergedContext/index.d.ts +6 -0
- package/dist/useObjectURL/index.d.ts +8 -0
- package/dist/usePromiseCreator/index.d.ts +1 -0
- package/dist/usePromiseCreator/usePromiseCreator.d.ts +4 -0
- package/dist/usePromiseState/index.d.ts +1 -0
- package/dist/usePromiseState/usePromiseState.d.ts +11 -0
- package/dist/usePromptUI/index.d.ts +4 -0
- package/dist/usePromptUI/pickPromptUIProps.d.ts +9 -0
- package/dist/usePromptUI/renderPromptInput.d.ts +3 -0
- package/dist/usePromptUI/types.d.ts +18 -0
- package/dist/usePromptUI/usePromptUI.d.ts +34 -0
- package/dist/useResolvable/index.d.ts +1 -0
- package/dist/useResolvable/useResolvable.d.ts +23 -0
- package/dist/util/array.d.ts +5 -0
- package/dist/util/cssTypes.d.ts +3 -0
- package/dist/util/domProps.d.ts +1 -0
- package/dist/util/getClosestBackgroundColor.d.ts +1 -0
- package/dist/util/index.d.ts +7 -0
- package/dist/util/isInputEqual.d.ts +1 -0
- package/dist/util/maybeValue.d.ts +5 -0
- package/dist/util/parse.d.ts +2 -0
- package/dist/util/propPicker.d.ts +6 -0
- package/dist/util/toCss.d.ts +6 -0
- package/dist/withDefaults/index.d.ts +3 -0
- package/package.json +84 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useConfirmDialog } from '../ConfirmDialog';
|
|
3
|
+
import { ConfirmDialogProps } from '../ConfirmDialog/types';
|
|
4
|
+
import { InfoDialogProps, useInfoDialog } from '../InfoDialog';
|
|
5
|
+
import { LoadingDialogProps, useLoadingDialog } from '../LoadingDialog';
|
|
6
|
+
import { PromptDialogProps, usePromptDialog } from '../PromptDialog';
|
|
7
|
+
import { OptionsDialogProps } from '../OptionsDialog/types';
|
|
8
|
+
import { useOptionsDialog } from '../OptionsDialog';
|
|
9
|
+
export type DialogSystemDialogProps = Partial<{
|
|
10
|
+
info: InfoDialogProps;
|
|
11
|
+
loading: LoadingDialogProps;
|
|
12
|
+
prompt: PromptDialogProps;
|
|
13
|
+
confirm: ConfirmDialogProps;
|
|
14
|
+
options: OptionsDialogProps;
|
|
15
|
+
}>;
|
|
16
|
+
export type DialogSystemProps = DialogSystemDialogProps & {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export type DialogSystemContextValue = {
|
|
20
|
+
info: ReturnType<typeof useInfoDialog>[1];
|
|
21
|
+
loading: ReturnType<typeof useLoadingDialog>[1];
|
|
22
|
+
prompt: ReturnType<typeof usePromptDialog>[1];
|
|
23
|
+
confirm: ReturnType<typeof useConfirmDialog>[1];
|
|
24
|
+
options: ReturnType<typeof useOptionsDialog>[1];
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InfoDialogProps } from './types';
|
|
3
|
+
export declare function InfoDialog({ open, dismissable, onAcknowledge, buttonBar, title, message, acknowledge, errorActionHandlers, maxWidth, style, }: InfoDialogProps): React.JSX.Element;
|
|
4
|
+
export declare namespace InfoDialog {
|
|
5
|
+
var Acknowlege: typeof InfoDialogAcknowledge;
|
|
6
|
+
}
|
|
7
|
+
export declare function InfoDialogAcknowledge({ children }: {
|
|
8
|
+
children: any;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ErrorActionHanlders } from '../../ErrorDisplay';
|
|
2
|
+
import { FlexProps } from '../../Flex';
|
|
3
|
+
import { MergeableComponentInput } from '../../mergeable';
|
|
4
|
+
import { CSSLength } from '../../util';
|
|
5
|
+
export type InfoMessage = MergeableComponentInput | Error;
|
|
6
|
+
export type InfoDialogContentProps = Partial<{
|
|
7
|
+
title: MergeableComponentInput;
|
|
8
|
+
message: InfoMessage;
|
|
9
|
+
buttonBar: FlexProps;
|
|
10
|
+
acknowledge: MergeableComponentInput;
|
|
11
|
+
}>;
|
|
12
|
+
export type InfoDialogProps = InfoDialogContentProps & {
|
|
13
|
+
open?: boolean;
|
|
14
|
+
dismissable?: boolean;
|
|
15
|
+
onAcknowledge: () => void;
|
|
16
|
+
errorActionHandlers?: ErrorActionHanlders;
|
|
17
|
+
maxWidth?: CSSLength;
|
|
18
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InfoDialogProps } from './types';
|
|
3
|
+
export type RequestInfo = (messageOrProps: string | React.ReactNode | Partial<InfoDialogProps>) => Promise<void>;
|
|
4
|
+
export declare function useInfoDialog(baseDialogProps?: Partial<InfoDialogProps>): [InfoDialogProps, RequestInfo];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MergeableComponentInput } from '../../mergeable';
|
|
3
|
+
import { CSSLength } from '../../util';
|
|
4
|
+
export type Option = {
|
|
5
|
+
value: string | symbol | boolean | number;
|
|
6
|
+
label: string | React.ReactElement;
|
|
7
|
+
color?: string;
|
|
8
|
+
variant?: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
export type OptionsDialogContentProps = Partial<{
|
|
12
|
+
title: MergeableComponentInput;
|
|
13
|
+
message: MergeableComponentInput;
|
|
14
|
+
cancel: MergeableComponentInput;
|
|
15
|
+
}>;
|
|
16
|
+
export type OptionsDialogProps = OptionsDialogContentProps & {
|
|
17
|
+
open?: boolean;
|
|
18
|
+
dismissable?: boolean;
|
|
19
|
+
maxWidth?: CSSLength;
|
|
20
|
+
options: Option[];
|
|
21
|
+
renderOption?: (option: Option, onSelect: (value: Option['value']) => void, onCancel: () => void) => React.ReactElement;
|
|
22
|
+
onSelect: (value: Option['value']) => void;
|
|
23
|
+
onCancel: () => void;
|
|
24
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Option, OptionsDialogProps } from './types';
|
|
2
|
+
export type RequestSelect = <InputType = any>(propsOrOptions: Option[] | Partial<OptionsDialogProps>) => Promise<InputType>;
|
|
3
|
+
export declare function useOptionsDialog(baseDialogProps?: Partial<OptionsDialogProps>): [OptionsDialogProps, RequestSelect];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog } from '@radix-ui/themes';
|
|
3
|
+
import { PromptDialogContentProps, PromptDialogProps } from './types';
|
|
4
|
+
declare function PromptDialogContent<InputType = any>({ input, title, form, description, buttonBar, restore, cancel, submit, buttons, maxWidth, }: Omit<PromptDialogContentProps<InputType>, 'active'>): React.JSX.Element;
|
|
5
|
+
export declare function PromptDialog({ open: externalOpen, onSetOpen, ...props }: PromptDialogProps): React.JSX.Element;
|
|
6
|
+
export declare namespace PromptDialog {
|
|
7
|
+
var Root: React.FC<Dialog.RootProps>;
|
|
8
|
+
var Content: typeof PromptDialogContent;
|
|
9
|
+
var Trigger: React.ForwardRefExoticComponent<Dialog.TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
var Context: React.Context<{
|
|
11
|
+
open?: boolean | undefined;
|
|
12
|
+
setOpen?: ((nextOpen: boolean) => any) | undefined;
|
|
13
|
+
promptUI: {
|
|
14
|
+
value: unknown;
|
|
15
|
+
setValue: React.Dispatch<unknown>;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
hasUnsubmittedChanges: boolean;
|
|
18
|
+
inputProps: {
|
|
19
|
+
value: unknown;
|
|
20
|
+
onSetValue: React.Dispatch<unknown>;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
invalid: boolean;
|
|
23
|
+
errorMessage: any;
|
|
24
|
+
};
|
|
25
|
+
restore: () => void;
|
|
26
|
+
submit: (...args: any[]) => any;
|
|
27
|
+
cancel: () => Promise<void>;
|
|
28
|
+
cancelProps: {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
onClick: () => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
restoreProps: {
|
|
33
|
+
onClick: () => void;
|
|
34
|
+
style: {
|
|
35
|
+
display: string;
|
|
36
|
+
} | {
|
|
37
|
+
display?: undefined;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
submitProps: {
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
};
|
|
43
|
+
submitState: import("../..").PromiseState;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEqual<InputType>(initialValue: InputType | undefined, value: InputType | undefined): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { HTMLProps } from 'react';
|
|
2
|
+
import { FlexProps } from '../../Flex';
|
|
3
|
+
import { MergeableComponentInput } from '../../mergeable';
|
|
4
|
+
import { PromptUIProps, usePromptUI } from '../../usePromptUI';
|
|
5
|
+
export type PromptDialogLabelProps = Partial<{
|
|
6
|
+
title: MergeableComponentInput;
|
|
7
|
+
description: [MergeableComponentInput, MergeableComponentInput] | MergeableComponentInput;
|
|
8
|
+
restore: MergeableComponentInput;
|
|
9
|
+
cancel: MergeableComponentInput;
|
|
10
|
+
submit: MergeableComponentInput;
|
|
11
|
+
}>;
|
|
12
|
+
export type PromptDialogUIProps = PromptDialogLabelProps & Partial<{
|
|
13
|
+
form: HTMLProps<HTMLFormElement>;
|
|
14
|
+
buttonBar: FlexProps;
|
|
15
|
+
maxWidth: string;
|
|
16
|
+
buttons: React.ReactNode | ((promptUI: ReturnType<typeof usePromptUI>) => React.ReactNode);
|
|
17
|
+
}>;
|
|
18
|
+
export type PromptDialogContentProps<InputType = any> = PromptUIProps & PromptDialogUIProps;
|
|
19
|
+
export type PromptDialogProps<InputType = any> = PromptUIProps & {
|
|
20
|
+
open?: boolean;
|
|
21
|
+
onSetOpen?: (nextOpen: boolean) => any;
|
|
22
|
+
} & PromptDialogUIProps;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PromptDialogProps } from './types';
|
|
2
|
+
import { InputSchema } from '../../Input';
|
|
3
|
+
export type RequestPrompt = <InputType = any>(propsOrTitle: string | Partial<PromptDialogProps>, maybeInput?: string | InputSchema) => Promise<InputType>;
|
|
4
|
+
export declare function usePromptDialog(baseDialogProps?: Partial<PromptDialogProps>): [PromptDialogProps, RequestPrompt];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CANCELLED: unique symbol;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UseDialogOptions } from './useDialog';
|
|
3
|
+
export type DialogSpecs = {
|
|
4
|
+
[key: string]: ((props: any) => React.ReactElement) | [(props: any) => React.ReactElement, UseDialogOptions?];
|
|
5
|
+
};
|
|
6
|
+
type CreateDialogSystemProps = {
|
|
7
|
+
dialogs: DialogSpecs;
|
|
8
|
+
};
|
|
9
|
+
export declare function createDialogSystem({ dialogs }: CreateDialogSystemProps): (React.Context<{}> | (({ children, ...props }: {
|
|
10
|
+
[key: string]: Record<string, any>;
|
|
11
|
+
children: React.ReactElement;
|
|
12
|
+
}) => React.JSX.Element) | (() => {}))[];
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type UseDialogOptions = {
|
|
2
|
+
props?: (defer: {
|
|
3
|
+
resolve: (result?: any) => void;
|
|
4
|
+
reject: (err: any) => void;
|
|
5
|
+
}, ...args: any[]) => Record<string, any>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Utility hook that sets up promise resolution systems
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDialog<DialogProps, OnExecuteResultType = any>(baseDialogProps?: Partial<DialogProps>, options?: UseDialogOptions): {
|
|
11
|
+
dialogProps: Partial<DialogProps> & {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
open?: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
resolve: (value: OnExecuteResultType) => Promise<void>;
|
|
16
|
+
reject: (error: any) => Promise<void>;
|
|
17
|
+
invoke: (...args: any[]) => Promise<OnExecuteResultType>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './ConfirmDialog';
|
|
2
|
+
export * from './AuthDialog';
|
|
3
|
+
export * from './DialogSystem';
|
|
4
|
+
export * from './InfoDialog';
|
|
5
|
+
export * from './LoadingDialog';
|
|
6
|
+
export * from './PromptDialog';
|
|
7
|
+
export * from './constants';
|
|
8
|
+
export * from './createDialogSystem';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function useDialog<DialogProps, OnExecuteResultType = any>(baseDialogProps?: Partial<DialogProps>): {
|
|
2
|
+
dialogProps: Partial<DialogProps>;
|
|
3
|
+
onResolve: (value: OnExecuteResultType) => Promise<void>;
|
|
4
|
+
onReject: (error: any) => Promise<void>;
|
|
5
|
+
onExecute: (overrides: Partial<DialogProps>) => Promise<OnExecuteResultType>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React, { HTMLProps } from 'react';
|
|
2
|
+
export declare const AnimatedDots: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
3
|
+
export declare function DotDotDot({ children, ...props }: HTMLProps<HTMLSpanElement>): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditableField } from './EditableField';
|
|
3
|
+
import { EditableRoot } from './EditableRoot';
|
|
4
|
+
export * from './EditableField';
|
|
5
|
+
export * from './EditableContext';
|
|
6
|
+
export declare const Editable: {
|
|
7
|
+
Field: typeof EditableField;
|
|
8
|
+
Root: typeof EditableRoot;
|
|
9
|
+
Context: import("react").Context<import("./types").EditableContextProps>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement } from '../HoverElement';
|
|
3
|
+
type OnEdit = (fieldKeys: string[], context: EditableContextProps) => void;
|
|
4
|
+
export type Editable = {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
trigger?: React.ReactNode;
|
|
8
|
+
triggerPlacement?: Placement;
|
|
9
|
+
onEdit: OnEdit;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
editableStyle?: boolean | string;
|
|
12
|
+
fieldKeys: string[];
|
|
13
|
+
};
|
|
14
|
+
export type EditableContextProps = {
|
|
15
|
+
active: boolean;
|
|
16
|
+
setActive: (active: boolean) => void;
|
|
17
|
+
onEdit?: OnEdit;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
export type EditableRootProps = {
|
|
21
|
+
active?: boolean;
|
|
22
|
+
onSetActive?: (active: boolean) => void;
|
|
23
|
+
onEdit?: OnEdit;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ErrorActionHanlders, ErrorDictionary, ErrorHandlingContextValue, ErrorReference, SuggestedAction } from './types';
|
|
3
|
+
export declare const DEFAULT_ACTION_HANDLERS: {
|
|
4
|
+
navigateBack: () => void;
|
|
5
|
+
reload: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const ErrorHandlingContext: import("react").Context<ErrorHandlingContextValue>;
|
|
8
|
+
export declare const ErrorHandlingProvider: import("react").Provider<ErrorHandlingContextValue>;
|
|
9
|
+
export declare function getErrorData(dictionary: ErrorDictionary, error: ErrorReference): {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
name: string;
|
|
12
|
+
message: string;
|
|
13
|
+
httpCode?: number | undefined;
|
|
14
|
+
action?: SuggestedAction | undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare function useLogError(error: ErrorReference): string | void;
|
|
17
|
+
export declare function useErrorHandling(error: ErrorReference, localHandlers?: ErrorActionHanlders): {
|
|
18
|
+
errorLogId: string | void;
|
|
19
|
+
action: {
|
|
20
|
+
handle: () => void;
|
|
21
|
+
id?: string | undefined;
|
|
22
|
+
label?: string | undefined;
|
|
23
|
+
} | null;
|
|
24
|
+
name: string;
|
|
25
|
+
message: string;
|
|
26
|
+
httpCode?: number | undefined;
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Merge } from 'type-fest';
|
|
2
|
+
export type ErrorName = string;
|
|
3
|
+
export type HTTPErrorCode = number;
|
|
4
|
+
export type ErrorReference = Error | ErrorName | HTTPErrorCode;
|
|
5
|
+
export type ErrorActionHanlders = {
|
|
6
|
+
[key: string]: (error: ErrorReference) => void;
|
|
7
|
+
};
|
|
8
|
+
export type ErrorDisplayProps = {
|
|
9
|
+
error: ErrorReference;
|
|
10
|
+
errorActionHandlers?: ErrorActionHanlders;
|
|
11
|
+
};
|
|
12
|
+
export type SuggestedAction = {
|
|
13
|
+
id: 'signIn' | 'navigateBack' | 'retry' | 'reload' | string;
|
|
14
|
+
label: string;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
export type ErrorDataObject<ErrorCustomProps = {}> = Merge<{
|
|
18
|
+
name: ErrorName;
|
|
19
|
+
message: string;
|
|
20
|
+
httpCode?: HTTPErrorCode;
|
|
21
|
+
action?: SuggestedAction;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}, ErrorCustomProps>;
|
|
24
|
+
export type GetErrorData<ErrorCustomProps = {}> = (error: ErrorReference) => ErrorDataObject<ErrorCustomProps>;
|
|
25
|
+
export type ErrorData<ErrorCustomProps = {}> = ErrorDataObject<ErrorCustomProps> | GetErrorData;
|
|
26
|
+
export type ErrorDictionary<ErrorCustomProps = {}> = {
|
|
27
|
+
[key: string | number]: ErrorData<ErrorCustomProps>;
|
|
28
|
+
};
|
|
29
|
+
export type LogError = (error: ErrorReference) => string | void | Promise<string | void>;
|
|
30
|
+
export type ErrorHandlingContextValue = {
|
|
31
|
+
dictionary: ErrorDictionary;
|
|
32
|
+
onLogError?: LogError;
|
|
33
|
+
errorActionHandlers?: ErrorActionHanlders;
|
|
34
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EvenSpacedListStylesProps } from './evenSpacedListStyles';
|
|
3
|
+
import { FlexBaseStyles } from '../Flex';
|
|
4
|
+
import { BoxProps } from '../Box';
|
|
5
|
+
export type EvenSpacedListProps = BoxProps & FlexBaseStyles & EvenSpacedListStylesProps & {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare const EvenSpacedList: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
width?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
15
|
+
height?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
16
|
+
position?: import("..").ResponsiveValueInput<import("..").CSSPosition> | undefined;
|
|
17
|
+
top?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
18
|
+
right?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
19
|
+
bottom?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
20
|
+
left?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
21
|
+
flexShrink?: import("..").ResponsiveValueInput<string> | undefined;
|
|
22
|
+
flexGrow?: import("..").ResponsiveValueInput<string> | undefined;
|
|
23
|
+
inset?: import("..").ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
|
|
24
|
+
}, import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
25
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
26
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
27
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
28
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
|
|
29
|
+
children?: import("react").ReactNode;
|
|
30
|
+
width?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
31
|
+
height?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
32
|
+
position?: import("..").ResponsiveValueInput<import("..").CSSPosition> | undefined;
|
|
33
|
+
top?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
34
|
+
right?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
35
|
+
bottom?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
36
|
+
left?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
37
|
+
flexShrink?: import("..").ResponsiveValueInput<string> | undefined;
|
|
38
|
+
flexGrow?: import("..").ResponsiveValueInput<string> | undefined;
|
|
39
|
+
inset?: import("..").ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
|
|
40
|
+
}>, never>, EvenSpacedListProps>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
41
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
42
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
43
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
44
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, BoxProps>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
45
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
46
|
+
}, import("..").ResponsiveProps>>, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Theme } from '../Theme';
|
|
2
|
+
import { CSSLength } from '../util';
|
|
3
|
+
import { ResponsiveValueInput } from '../Responsive';
|
|
4
|
+
export type Gap = ResponsiveValueInput<CSSLength | [CSSLength, CSSLength]>;
|
|
5
|
+
export type EvenSpacedListStylesProps = {
|
|
6
|
+
gap?: Gap;
|
|
7
|
+
columns: ResponsiveValueInput<number>;
|
|
8
|
+
};
|
|
9
|
+
export declare function evenSpacedListStyles({ columns, gap, theme, }: EvenSpacedListStylesProps & {
|
|
10
|
+
theme: Partial<Theme>;
|
|
11
|
+
}): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EvenSpacedList';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Merge } from 'type-fest';
|
|
3
|
+
import { Accept, DropzoneOptions } from 'react-dropzone';
|
|
4
|
+
import { ResponsiveProps } from '../Responsive';
|
|
5
|
+
type CustomAccept = string | string[] | Accept;
|
|
6
|
+
export type FileDropzoneProps = Merge<Merge<DropzoneOptions, ResponsiveProps>, {
|
|
7
|
+
dropzoneLabel?: (state: DropzoneStateProps) => React.ReactNode;
|
|
8
|
+
accept?: CustomAccept;
|
|
9
|
+
}>;
|
|
10
|
+
type DropzoneStateProps = {
|
|
11
|
+
isFocused: boolean;
|
|
12
|
+
isDragActive: boolean;
|
|
13
|
+
isDragReject: boolean;
|
|
14
|
+
isDragAccept: boolean;
|
|
15
|
+
isFileDialogActive: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function FileDropzone({ dropzoneLabel, accept, style, ...props }: FileDropzoneProps): React.JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlexProps } from '../Flex';
|
|
3
|
+
import { Merge } from 'type-fest';
|
|
4
|
+
type FilePreviewProps = Merge<Partial<FlexProps>, {
|
|
5
|
+
file: File;
|
|
6
|
+
onRemove?: (file: File) => void;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function FilePreview({ file, onRemove, style, ...flexProps }: FilePreviewProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FlexGapStylesProps } from './flexGapStyles';
|
|
3
|
+
import { FlexBaseStyles } from './flexBaseStyles';
|
|
4
|
+
import { BoxProps } from '../Box';
|
|
5
|
+
export declare const FLEX_PROPS: string[];
|
|
6
|
+
export type FlexProps = BoxProps & FlexGapStylesProps & FlexBaseStyles;
|
|
7
|
+
export declare const Flex: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
|
|
12
|
+
children?: import("react").ReactNode;
|
|
13
|
+
width?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
14
|
+
height?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
15
|
+
position?: import("..").ResponsiveValueInput<import("..").CSSPosition> | undefined;
|
|
16
|
+
top?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
17
|
+
right?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
18
|
+
bottom?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
19
|
+
left?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
20
|
+
flexShrink?: import("..").ResponsiveValueInput<string> | undefined;
|
|
21
|
+
flexGrow?: import("..").ResponsiveValueInput<string> | undefined;
|
|
22
|
+
inset?: import("..").ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
|
|
23
|
+
}, import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
24
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
25
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
26
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
27
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, keyof import("..").ResponsiveProps | "top" | "bottom" | "left" | "right" | "width" | "height" | "position" | "flexShrink" | "flexGrow" | "inset" | keyof import("../Box/spacing").SpacingStyles> & import("../Box/spacing").SpacingStyles & import("..").ResponsiveProps & {
|
|
28
|
+
children?: import("react").ReactNode;
|
|
29
|
+
width?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
30
|
+
height?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
31
|
+
position?: import("..").ResponsiveValueInput<import("..").CSSPosition> | undefined;
|
|
32
|
+
top?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
33
|
+
right?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
34
|
+
bottom?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
35
|
+
left?: import("..").ResponsiveValueInput<import("..").CSSLength> | undefined;
|
|
36
|
+
flexShrink?: import("..").ResponsiveValueInput<string> | undefined;
|
|
37
|
+
flexGrow?: import("..").ResponsiveValueInput<string> | undefined;
|
|
38
|
+
inset?: import("..").ResponsiveValueInput<"top" | "bottom" | "left" | "right"> | undefined;
|
|
39
|
+
}>, never>, FlexProps>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
40
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
41
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps, import("styled-components/dist/types").FastOmit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
42
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
43
|
+
}, keyof import("..").ResponsiveProps> & import("..").ResponsiveProps>, never>, BoxProps>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
44
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
45
|
+
}, import("..").ResponsiveProps>>, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
|
|
46
|
+
export * from './flexGapStyles';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ResponsiveValueInput } from '../Responsive';
|
|
2
|
+
import { StyleSpecInput } from '../styleResolver';
|
|
3
|
+
import { FlexAlignItems, FlexJustifyContent, FlexWrap, FlexDisplay } from './types';
|
|
4
|
+
export declare const FLEX_BASE_STYLE_PROPS: StyleSpecInput;
|
|
5
|
+
export type FlexBaseStyles = {
|
|
6
|
+
display?: ResponsiveValueInput<FlexDisplay>;
|
|
7
|
+
alignItems?: ResponsiveValueInput<FlexAlignItems>;
|
|
8
|
+
justifyContent?: ResponsiveValueInput<FlexJustifyContent>;
|
|
9
|
+
flexWrap?: ResponsiveValueInput<FlexWrap>;
|
|
10
|
+
};
|
|
11
|
+
export declare const flexBaseStyles: (props: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}) => any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ResponsiveValueInput } from '../Responsive';
|
|
2
|
+
import { Theme } from '../Theme';
|
|
3
|
+
import { CSSLength } from '../util';
|
|
4
|
+
import { FlexDirection } from './types';
|
|
5
|
+
export type FlexGapStylesProps = {
|
|
6
|
+
direction?: ResponsiveValueInput<FlexDirection>;
|
|
7
|
+
theme?: Partial<Theme>;
|
|
8
|
+
gap?: ResponsiveValueInput<CSSLength>;
|
|
9
|
+
childOnlyGap?: ResponsiveValueInput<CSSLength>;
|
|
10
|
+
};
|
|
11
|
+
export declare function flexGapStyles({ direction, theme, gap, childOnlyGap, }: FlexGapStylesProps): string;
|