@orioro/react-ui-core 0.0.2 → 0.0.5
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/AppHeader/AppHeaderContext.d.ts +11 -2
- package/dist/AppHeader/Root.d.ts +1 -1
- package/dist/AppHeader/index.d.ts +2 -2
- package/dist/Box/Box.d.ts +2 -0
- package/dist/Button/Button.d.ts +2 -2
- package/dist/Button/ButtonCore.d.ts +2 -0
- package/dist/Button/LinkButton.d.ts +2 -2
- package/dist/Debug/index.d.ts +1 -0
- package/dist/Dialog/AuthDialog/AuthDialog.d.ts +2 -1
- package/dist/Dialog/AuthDialog/SignUpForm.d.ts +2 -2
- package/dist/Dialog/AuthDialog/dialogSystemSpec.d.ts +2 -0
- package/dist/Dialog/AuthDialog/index.d.ts +1 -0
- package/dist/Dialog/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/Dialog/ConfirmDialog/dialogSystemSpec.d.ts +2 -0
- package/dist/Dialog/ConfirmDialog/index.d.ts +1 -0
- package/dist/Dialog/ConfirmDialog/types.d.ts +1 -0
- package/dist/Dialog/DialogSystem_legacy/DialogSystem_.d.ts +2 -0
- package/dist/Dialog/DialogSystem_legacy/index.stories_.d.ts +7 -0
- package/dist/Dialog/DialogSystem_legacy/prompt.stories_.d.ts +6 -0
- package/dist/Dialog/DialogSystem_legacy/tmpDialogSystem.d.ts +3 -0
- package/dist/Dialog/DialogSystem_legacy/types.d.ts +25 -0
- package/dist/Dialog/InfoDialog/dialogSystemSpec.d.ts +2 -0
- package/dist/Dialog/InfoDialog/index.d.ts +1 -0
- package/dist/Dialog/LoadingDialog/dialogSystemSpec.d.ts +2 -0
- package/dist/Dialog/LoadingDialog/index.d.ts +1 -0
- package/dist/Dialog/OptionsDialog/dialogSystemSpec.d.ts +2 -0
- package/dist/Dialog/OptionsDialog/index.d.ts +1 -0
- package/dist/Dialog/PromptDialog/dialogSystemSpec.d.ts +2 -0
- package/dist/Dialog/PromptDialog/index.d.ts +1 -0
- package/dist/Dialog/createDialogSystem/createDialogSystem.d.ts +3 -10
- package/dist/Dialog/createDialogSystem/dialogSystemReducer.d.ts +2 -0
- package/dist/Dialog/createDialogSystem/dialogSystemSpecs.d.ts +2 -0
- package/dist/Dialog/createDialogSystem/index.d.ts +2 -1
- package/dist/Dialog/createDialogSystem/tmp_util.d.ts +16 -0
- package/dist/Dialog/createDialogSystem/types.d.ts +48 -0
- package/dist/Dialog/createDialogSystem/useDialog.d.ts +6 -2
- package/dist/Dialog/createDialogSystem/util.d.ts +16 -0
- package/dist/Dialog/createDialogSystem2/createDialogSystem.d.ts +6 -0
- package/dist/Dialog/createDialogSystem2/dialogSystemReducer.d.ts +2 -0
- package/dist/Dialog/createDialogSystem2/index.d.ts +2 -0
- package/dist/Dialog/createDialogSystem2/proxyRef.d.ts +2 -0
- package/dist/Dialog/createDialogSystem2/types.d.ts +48 -0
- package/dist/Dialog/createDialogSystem2/util.d.ts +16 -0
- package/dist/Dialog/createDialogSystem_legacy/createDialogSystem.d.ts +13 -0
- package/dist/Dialog/createDialogSystem_legacy/index.d.ts +1 -0
- package/dist/Dialog/createDialogSystem_legacy/proxyRef.d.ts +2 -0
- package/dist/Dialog/createDialogSystem_legacy/useDialog.d.ts +22 -0
- package/dist/Dialog/specUtil/index.d.ts +5 -0
- package/dist/EvenSpacedList/EvenSpacedList.d.ts +6 -2
- package/dist/FileDropzone/index.d.ts +1 -0
- package/dist/Flex/Flex.d.ts +27 -16
- package/dist/FlexGrid/FlexGrid.d.ts +23 -1
- package/dist/Input/BooleanCheckboxInput/index.d.ts +28 -6
- package/dist/Input/InputGrid/index.d.ts +5 -1
- package/dist/Input/ObjectInput/index.d.ts +44 -8
- package/dist/Input/RangeInput/RangeInput.d.ts +11 -0
- package/dist/Input/RangeInput/index.d.ts +1 -0
- package/dist/Input/RichTextInput/RichTextInput.d.ts +13 -13
- package/dist/Input/RichTextInput/RichTextInput_20240730_backup_NO_MARKDOWN.d.ts +13 -13
- package/dist/Input/SingleFileInput/index.d.ts +65 -6
- package/dist/Input/SingleFileInput/middleware.d.ts +4 -0
- package/dist/Input/SliderInput/SliderInput.d.ts +16 -0
- package/dist/Input/SliderInput/index.d.ts +1 -0
- package/dist/Input/SwitchInput/index.d.ts +6 -0
- package/dist/Input/TextInput/index.d.ts +14 -13
- package/dist/Input/TextInput/parseValidator.d.ts +1 -1
- package/dist/Input/TextInput/types.d.ts +1 -0
- package/dist/Input/TextInput/useTextInput.d.ts +3 -2
- package/dist/Input/TextareaInput/index.d.ts +13 -13
- package/dist/Input/TreeSelectInput/TreeSelectInput.d.ts +42 -0
- package/dist/Input/TreeSelectInput/index.d.ts +1 -0
- package/dist/Input/index.d.ts +5 -0
- package/dist/Input/types.d.ts +1 -1
- package/dist/Input/useValidation/useValidation.d.ts +1 -1
- package/dist/Interaction/constants.d.ts +1 -0
- package/dist/Interaction/index.d.ts +1 -0
- package/dist/LanguageSelector/index.d.ts +3 -2
- package/dist/Markdown/index.d.ts +7 -0
- package/dist/Menu/ButtonBarMenu/ButtonBarMenu.d.ts +13 -0
- package/dist/Menu/ButtonBarMenu/OverflowableButtonBarMenu.d.ts +8 -0
- package/dist/Menu/ButtonBarMenu/index.d.ts +2 -13
- package/dist/RichTextRenderer/types/blocknote.d.ts +1 -1
- package/dist/ShadowExpandable/index.d.ts +2 -1
- package/dist/UIContext/UIContext.d.ts +16 -0
- package/dist/UIContext/index.d.ts +1 -0
- package/dist/cascadingContextProvider/index.d.ts +8 -0
- package/dist/componentMaker/componentMaker.d.ts +4 -0
- package/dist/entriesByIdReducer/entriesByIdReducer.d.ts +26 -0
- package/dist/entriesByIdReducer/index.d.ts +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +4587 -5283
- package/dist/makeLink/locationAwareLink.d.ts +1 -1
- package/dist/mergeable/index.d.ts +1 -0
- package/dist/mergeable/mergeRender.d.ts +3 -0
- package/dist/mergeable/types.d.ts +2 -2
- package/dist/mergeable/util.d.ts +1 -0
- package/dist/useByIdState/index.d.ts +8 -0
- package/dist/usePromptUI/renderPromptInput.d.ts +1 -1
- package/dist/usePromptUI/types.d.ts +1 -2
- package/dist/useRefByKey/index.d.ts +1 -0
- package/dist/util/htmlTagComponent.d.ts +2 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/mergeChildren.d.ts +2 -0
- package/package.json +9 -6
package/dist/Input/types.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export declare function useValidation({ value, error, validator }: UseValidation
|
|
|
9
9
|
validationState: "loading" | "idle" | ErrorLike | DetailedInvalid | "valid";
|
|
10
10
|
setValidationState: (v: "loading" | "idle" | ErrorLike | DetailedInvalid | "valid" | ((currValue: "loading" | "idle" | ErrorLike | DetailedInvalid | "valid") => "loading" | "idle" | ErrorLike | DetailedInvalid | "valid")) => void;
|
|
11
11
|
validationError: ErrorLike | DetailedInvalid | null;
|
|
12
|
-
runValidation: () => Promise<true | DetailedInvalid>;
|
|
12
|
+
runValidation: () => Promise<true | import("@orioro/validate").DetailedInvalid>;
|
|
13
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CANCELLED: unique symbol;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './constants';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { IconButtonProps } from '@radix-ui/themes';
|
|
3
|
+
type LanguageSelectorProps = IconButtonProps & {
|
|
3
4
|
value: string;
|
|
4
5
|
onSetValue: (nextValue: string) => any;
|
|
5
6
|
options: {
|
|
@@ -7,5 +8,5 @@ type LanguageSelectorProps = {
|
|
|
7
8
|
value: string;
|
|
8
9
|
}[];
|
|
9
10
|
};
|
|
10
|
-
export declare function LanguageSelector({ value, onSetValue, options, }: LanguageSelectorProps): React.JSX.Element;
|
|
11
|
+
export declare function LanguageSelector({ value, onSetValue, options, ...iconButtonProps }: LanguageSelectorProps): React.JSX.Element;
|
|
11
12
|
export {};
|
package/dist/Markdown/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Options } from 'react-markdown';
|
|
3
|
+
import remarkGfm from 'remark-gfm';
|
|
4
|
+
import rehypeExternalLinks from 'rehype-external-links';
|
|
5
|
+
export declare const MARKDOWN_DEFAULT_REMARK_PLUGINS: (typeof remarkGfm)[];
|
|
6
|
+
export declare const MARKDOWN_DEFAULT_REHYPE_PLUGINS: (typeof rehypeExternalLinks | {
|
|
7
|
+
target: string;
|
|
8
|
+
rel: string[];
|
|
9
|
+
})[][];
|
|
3
10
|
export declare function MarkdownRaw(props: Options): React.JSX.Element;
|
|
4
11
|
export declare function Markdown({ style, ...props }: Options): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionItem, LinkItem, MenuItemInput } from '../types';
|
|
3
|
+
import { Components } from './types';
|
|
4
|
+
type ActionHandler = (item: ActionItem | LinkItem) => void;
|
|
5
|
+
type ButtonBarProps = {
|
|
6
|
+
options: MenuItemInput[];
|
|
7
|
+
onSelect: ActionHandler | {
|
|
8
|
+
[key: string]: ActionHandler;
|
|
9
|
+
};
|
|
10
|
+
components?: Components;
|
|
11
|
+
};
|
|
12
|
+
export declare function ButtonBarMenu({ options, onSelect, components, ...props }: ButtonBarProps): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Components } from './types';
|
|
4
|
-
type ActionHandler = (item: ActionItem | LinkItem) => void;
|
|
5
|
-
type ButtonBarProps = {
|
|
6
|
-
options: MenuItemInput[];
|
|
7
|
-
onSelect: ActionHandler | {
|
|
8
|
-
[key: string]: ActionHandler;
|
|
9
|
-
};
|
|
10
|
-
components?: Components;
|
|
11
|
-
};
|
|
12
|
-
export declare function ButtonBarMenu({ options, onSelect, components, }: ButtonBarProps): React.JSX.Element;
|
|
13
|
-
export {};
|
|
1
|
+
export * from './ButtonBarMenu';
|
|
2
|
+
export * from './OverflowableButtonBarMenu';
|
|
@@ -15,5 +15,6 @@ export type ShadowExpandableProps = {
|
|
|
15
15
|
color?: string;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
17
|
buttonStyle?: React.CSSProperties;
|
|
18
|
+
collapsedOnPrint?: boolean;
|
|
18
19
|
};
|
|
19
|
-
export declare function ShadowExpandable({ collapsedHeight, open: externalOpen, onSetOpen: onSetExternalOpen, children, renderTrigger, expandLabel, collapseLabel, color, style, buttonStyle, }: ShadowExpandableProps): React.JSX.Element;
|
|
20
|
+
export declare function ShadowExpandable({ collapsedHeight, open: externalOpen, onSetOpen: onSetExternalOpen, children, renderTrigger, expandLabel, collapseLabel, color, style, buttonStyle, collapsedOnPrint, }: ShadowExpandableProps): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Theme } from '../Theme';
|
|
3
|
+
type ComponentNamespace = {
|
|
4
|
+
[key: string]: React.FC | ComponentNamespace;
|
|
5
|
+
};
|
|
6
|
+
export type UIContextType = {
|
|
7
|
+
components: ComponentNamespace;
|
|
8
|
+
theme: Theme;
|
|
9
|
+
};
|
|
10
|
+
export declare const UIContext: React.Context<UIContextType>;
|
|
11
|
+
export declare function UIProvider({ children, components, theme, }: UIContextType & {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
type DefaultComponentInput = React.FC | string | null;
|
|
15
|
+
export declare function useComponents<T extends Record<string, React.FC> = Record<string, React.FC>>(identifiers: Record<string, DefaultComponentInput>, namespace?: string): T;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './UIContext';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CascadingContextProviderProps = {
|
|
3
|
+
value: Record<string, any>;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
root?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function cascadingContextProvider<T extends Record<string, any> = Record<string, any>>(Context: React.Context<T>): ({ value, root, children, }: CascadingContextProviderProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ComponentSpec = (components: Record<string, React.FC>) => React.FC;
|
|
3
|
+
export declare function componentMaker(maker: ComponentSpec, defaultSpecs?: Record<string, ComponentSpec>): (componentSpecs?: Record<string, ComponentSpec>) => React.FC<{}>;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type Entry = {
|
|
2
|
+
id: string;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
type EntriesByIdReducerState = {
|
|
6
|
+
byId: Record<string, Entry>;
|
|
7
|
+
orderedIds: string[];
|
|
8
|
+
};
|
|
9
|
+
type EntriesByIdReducerAction = {
|
|
10
|
+
type: 'ADD_ENTRY';
|
|
11
|
+
payload: Entry;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'UPDATE_ENTRY';
|
|
14
|
+
payload: Entry;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'DELETE_ENTRY';
|
|
17
|
+
payload: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'REORDER_ENTRIES';
|
|
20
|
+
payload: {
|
|
21
|
+
orderedIds: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function entriesByIdReducer(state: EntriesByIdReducerState, action: EntriesByIdReducerAction): EntriesByIdReducerState;
|
|
25
|
+
export declare function entriesByIdInitialState(input?: Entry[] | Record<string, Entry> | null): EntriesByIdReducerState;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './entriesByIdReducer';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export * from './CSSReset';
|
|
|
8
8
|
export * from './createDataContext';
|
|
9
9
|
export * from './DataList';
|
|
10
10
|
export * from './Debug';
|
|
11
|
-
export * from './Dialog';
|
|
12
11
|
export * from './DotDotDot';
|
|
13
12
|
export * from './Editable';
|
|
13
|
+
export * from './entriesByIdReducer';
|
|
14
14
|
export * from './ErrorDisplay';
|
|
15
15
|
export * from './EvenSpacedList';
|
|
16
16
|
export * from './FileDropzone';
|
|
@@ -21,6 +21,7 @@ export * from './FlexGrid';
|
|
|
21
21
|
export * from './HoverElement';
|
|
22
22
|
export * from './Image';
|
|
23
23
|
export * from './Input';
|
|
24
|
+
export * from './Interaction';
|
|
24
25
|
export * from './LocalImagePreview';
|
|
25
26
|
export * from './LoadingIndicator';
|
|
26
27
|
export * from './makeLink';
|
|
@@ -54,7 +55,10 @@ export * from './usePromiseCreator';
|
|
|
54
55
|
export * from './usePromiseState';
|
|
55
56
|
export * from './usePromptUI';
|
|
56
57
|
export * from './useResolvable';
|
|
58
|
+
export * from './useRefByKey';
|
|
57
59
|
export * from './util';
|
|
58
60
|
export * from './withDefaults';
|
|
59
61
|
export * from './TextEllipsis';
|
|
62
|
+
export * from './LanguageSelector';
|
|
63
|
+
export * from './UIContext';
|
|
60
64
|
export { typeOf, switchValue, switchExec } from '@orioro/util';
|