@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,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Hook that receives an instance of `File`, `Blob` or `MediaSource` and
|
|
3
|
+
* creates an URL representing it, providing a state object containing the file
|
|
4
|
+
* with a set function to change the file object. It releases URL when component
|
|
5
|
+
* unmount or parameter changes.
|
|
6
|
+
* @param initialObject - `null` or an instance of `File`, `Blob` or `MediaSource`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useObjectURL(object: null | File | Blob | MediaSource): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './usePromiseCreator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './usePromiseState';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type PromiseStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
2
|
+
export type PromiseState = {
|
|
3
|
+
status: PromiseStatus;
|
|
4
|
+
result: any;
|
|
5
|
+
error: any;
|
|
6
|
+
};
|
|
7
|
+
export declare function isSettled(status: PromiseStatus): boolean;
|
|
8
|
+
export type SetPromise = (promiseInput: null | Promise<any>) => void;
|
|
9
|
+
type Reset = () => void;
|
|
10
|
+
export declare function usePromiseState(input?: Promise<any> | null): [PromiseState, SetPromise, Promise<any> | null, Reset];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PromptUIProps } from './types';
|
|
2
|
+
export declare const PROMPT_UI_PROPS: string[];
|
|
3
|
+
export declare const pickPromptUIProps: <InputProps extends {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
} = {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>(inputProps: InputProps) => [PromptUIProps, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputSchema, ValueDiff } from '../Input';
|
|
3
|
+
export type PromptInputProps<InputType> = {
|
|
4
|
+
value: InputType | undefined;
|
|
5
|
+
onSetValue: (value: InputType) => void;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type PromptUIInputProp<InputType> = string | InputSchema | ((promptProps: PromptInputProps<InputType>) => React.ReactNode);
|
|
9
|
+
export type PromptUIProps<InputType = any> = {
|
|
10
|
+
active: boolean;
|
|
11
|
+
defaultValue?: InputType;
|
|
12
|
+
initialValue?: InputType;
|
|
13
|
+
input: PromptUIInputProp<InputType>;
|
|
14
|
+
onSubmit: (data: InputType | undefined, diff: ValueDiff) => void | Promise<void>;
|
|
15
|
+
onConfirmDiscardUnsubmittedChanges?: boolean | (() => boolean | Promise<boolean>);
|
|
16
|
+
confirmDiscardUnsubmittedChangesMessage?: string;
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PromptUIProps } from './types';
|
|
3
|
+
export declare function usePromptUI<InputType>({ active, defaultValue, initialValue, onConfirmDiscardUnsubmittedChanges, confirmDiscardUnsubmittedChangesMessage, onSubmit, onCancel, }: PromptUIProps<InputType>): {
|
|
4
|
+
value: InputType | undefined;
|
|
5
|
+
setValue: import("react").Dispatch<import("react").SetStateAction<InputType | undefined>>;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
hasUnsubmittedChanges: boolean;
|
|
8
|
+
inputProps: {
|
|
9
|
+
value: InputType | undefined;
|
|
10
|
+
onSetValue: import("react").Dispatch<import("react").SetStateAction<InputType | undefined>>;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
invalid: boolean;
|
|
13
|
+
errorMessage: any;
|
|
14
|
+
};
|
|
15
|
+
restore: () => void;
|
|
16
|
+
submit: (...args: any[]) => any;
|
|
17
|
+
cancel: () => Promise<void>;
|
|
18
|
+
cancelProps: {
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
onClick: () => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
restoreProps: {
|
|
23
|
+
onClick: () => void;
|
|
24
|
+
style: {
|
|
25
|
+
display: string;
|
|
26
|
+
} | {
|
|
27
|
+
display?: undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
submitProps: {
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
};
|
|
33
|
+
submitState: import("..").PromiseState;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useResolvable';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PromiseStatus } from '../usePromiseState';
|
|
2
|
+
type Args = any[];
|
|
3
|
+
/**
|
|
4
|
+
* Auxiliary function that mimics useResolvable hook behavior.
|
|
5
|
+
* @param input - Function or value to resolve.
|
|
6
|
+
* @param args - Arguments to pass to the function, if `input` is a function.
|
|
7
|
+
* @returns The resolved value.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveInput(input: any, ...args: Args): any;
|
|
10
|
+
export interface UseResolvableOptions {
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
args?: Args;
|
|
13
|
+
}
|
|
14
|
+
type ResolvableFn<ResolvedValueType = any> = ((...args: any[]) => Promise<ResolvedValueType>) | ((...args: any[]) => ResolvedValueType);
|
|
15
|
+
export type UseResolvableInput<ResolvedValueType = any> = ResolvedValueType | ResolvableFn<ResolvedValueType>;
|
|
16
|
+
/**
|
|
17
|
+
* Custom hook to handle resolving inputs, which can be either functions returning values or direct values.
|
|
18
|
+
* @param input - Function or directly resolvable value.
|
|
19
|
+
* @param options - Configuration options, including whether the hook is enabled and arguments for the resolvable function.
|
|
20
|
+
* @returns Tuple containing the resolved value, any error encountered, and the resolve function itself.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useResolvable<ResolvedValueType = any>(input: UseResolvableInput<ResolvedValueType>, { enabled, args, }?: UseResolvableOptions): [PromiseStatus, ResolvedValueType | null | Error, () => void];
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function arrayReplaceAt<T = any>(arr: T[], index: number, item: T): T[];
|
|
2
|
+
export declare function arrayAppend<T = any>(arr: T[], item: T): T[];
|
|
3
|
+
export declare function arrayMove<T = any>(arr: T[], from: number, to: number): T[];
|
|
4
|
+
export declare function arrayRemoveAt<T = any>(arr: T[], index: number): T[];
|
|
5
|
+
export declare function arrayAddAt<T = any>(arr: T[], index: number, item: T): T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function domProps(props: object): object;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getClosestBackgroundColor(element: HTMLElement | null): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function areInputValuesEqual<InputType>(initialValue: InputType | undefined, value: InputType | undefined): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ValueResolver<ValueType, ResolverArgsTypes extends any[]> = (...args: ResolverArgsTypes) => ValueType;
|
|
3
|
+
export type MaybeValueType<ValueType, ResolverArgsTypes extends any[]> = ValueType | ValueResolver<ValueType, ResolverArgsTypes>;
|
|
4
|
+
export declare function maybeValue<ValueType = any, ResolverArgsTypes extends any[] = any[]>(value: MaybeValueType<ValueType, ResolverArgsTypes>, ...args: ResolverArgsTypes): ValueType;
|
|
5
|
+
export declare const maybeReactNode: (value: MaybeValueType<React.ReactNode, any[]>, ...args: any[]) => React.ReactNode;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type AnyProps = {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
4
|
+
declare function defaultTransform<T>(input: T): T;
|
|
5
|
+
export declare function propPicker<OwnProps extends AnyProps = AnyProps, OtherProps = AnyProps>(ownPropList: string[], transform?: typeof defaultTransform<OwnProps>): <InputProps extends AnyProps = AnyProps>(inputProps: InputProps) => [OwnProps, OtherProps];
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function withDefaults<ComponentProps extends {}>(Component: React.FC<ComponentProps>, defaults: Partial<ComponentProps>): React.FC<Partial<ComponentProps>>;
|
|
3
|
+
export declare function withStaticProps<ComponentProps extends {}>(Component: React.FC<ComponentProps>, staticProps: Partial<ComponentProps>): React.FC<Partial<ComponentProps>>;
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orioro/react-ui-core",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"packageManager": "yarn@4.0.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.mjs",
|
|
10
|
+
"./*": "./dist/*"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "rollup --config ./rollup.config.mjs",
|
|
21
|
+
"build:watch": "rollup --config ./rollup.config.mjs --watch",
|
|
22
|
+
"storybook": "storybook dev -p 6006",
|
|
23
|
+
"dev": "yarn storybook",
|
|
24
|
+
"build-storybook": "storybook build",
|
|
25
|
+
"prepublish": "yarn build"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@orioro/dev": "0.0.0",
|
|
29
|
+
"rollup": "^4.13.0",
|
|
30
|
+
"rollup-plugin-import-css": "^3.5.0",
|
|
31
|
+
"storybook": "^8.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@blocknote/core": "^0.12.1",
|
|
35
|
+
"@blocknote/react": "^0.12.2",
|
|
36
|
+
"@emotion/is-prop-valid": "^1.2.2",
|
|
37
|
+
"@mdi/js": "^7.4.47",
|
|
38
|
+
"@mdi/react": "^1.6.1",
|
|
39
|
+
"@mui/base": "^5.0.0-beta.40",
|
|
40
|
+
"@orioro/react-select": "2.0.0",
|
|
41
|
+
"@orioro/resolve": "0.1.0",
|
|
42
|
+
"@orioro/util": "0.7.0",
|
|
43
|
+
"@radix-ui/react-collapsible": "^1.1.0",
|
|
44
|
+
"@radix-ui/react-dialog": "^1.0.5",
|
|
45
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
46
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
47
|
+
"@radix-ui/themes": "^3.0.1",
|
|
48
|
+
"@tanstack/react-virtual": "^3.8.3",
|
|
49
|
+
"@types/bytes": "^3.1.4",
|
|
50
|
+
"@types/lodash-es": "^4.17.12",
|
|
51
|
+
"@types/react-beautiful-dnd": "^13.1.8",
|
|
52
|
+
"@uppy/aws-s3": "^3.6.2",
|
|
53
|
+
"@uppy/core": "^3.10.0",
|
|
54
|
+
"bytes": "^3.1.2",
|
|
55
|
+
"d3-dsv": "^3.0.1",
|
|
56
|
+
"d3-fetch": "^3.0.1",
|
|
57
|
+
"date-fns": "^3.6.0",
|
|
58
|
+
"emoji-picker-react": "^4.9.2",
|
|
59
|
+
"fast-deep-equal": "^3.1.3",
|
|
60
|
+
"fast-json-patch": "^3.1.1",
|
|
61
|
+
"framer-motion": "^11.0.20",
|
|
62
|
+
"is-plain-object": "^5.0.0",
|
|
63
|
+
"lodash-es": "^4.17.21",
|
|
64
|
+
"mime": "^4.0.1",
|
|
65
|
+
"react": "^18.2.0",
|
|
66
|
+
"react-beautiful-dnd": "^13.1.1",
|
|
67
|
+
"react-dropzone": "^14.2.3",
|
|
68
|
+
"react-embed": "^3.7.0",
|
|
69
|
+
"react-error-boundary": "^4.0.13",
|
|
70
|
+
"react-hook-form": "^7.51.0",
|
|
71
|
+
"react-imask": "^7.6.0",
|
|
72
|
+
"react-markdown": "^9.0.1",
|
|
73
|
+
"react-merge-refs": "^2.1.1",
|
|
74
|
+
"react-player": "^2.16.0",
|
|
75
|
+
"react-use": "^17.5.0",
|
|
76
|
+
"react-use-measure": "^2.1.1",
|
|
77
|
+
"rehype-external-links": "^3.0.0",
|
|
78
|
+
"remark-gfm": "^4.0.0",
|
|
79
|
+
"scroll-into-view-if-needed": "^3.1.0",
|
|
80
|
+
"stable-hash": "^0.0.4",
|
|
81
|
+
"styled-components": "^6.1.8",
|
|
82
|
+
"type-fest": "^4.12.0"
|
|
83
|
+
}
|
|
84
|
+
}
|