@uniformdev/design-system 19.186.4-alpha.4 → 19.187.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/dist/esm/index.js +1368 -1205
- package/dist/index.d.mts +25 -12
- package/dist/index.d.ts +25 -12
- package/dist/index.js +1488 -1329
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -28,6 +28,7 @@ import { LinkParamValue, RichTextParamConfiguration } from '@uniformdev/canvas';
|
|
|
28
28
|
export { RichTextBuiltInElement, RichTextBuiltInFormat } from '@uniformdev/canvas';
|
|
29
29
|
import { Spread, SerializedElementNode, ElementNode, NodeKey, EditorConfig, DOMConversionMap, RangeSelection, SerializedEditorState, LexicalEditor } from 'lexical';
|
|
30
30
|
import * as _uniformdev_richtext from '@uniformdev/richtext';
|
|
31
|
+
import { RichTextBuiltInElement } from '@uniformdev/richtext';
|
|
31
32
|
export { richTextBuiltInElements, richTextBuiltInFormats } from '@uniformdev/richtext';
|
|
32
33
|
export { Id as ToastId, toast } from 'react-toastify';
|
|
33
34
|
|
|
@@ -20210,17 +20211,22 @@ type AnimationFileProps = LottieComponentProps & {
|
|
|
20210
20211
|
*/
|
|
20211
20212
|
declare const AnimationFile: ({ label, loop, autoplay, width, height, ...props }: AnimationFileProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20212
20213
|
|
|
20213
|
-
type AvatarSizeProp = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
20214
|
+
type AvatarSizeProp = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
20214
20215
|
type AvatarProps = {
|
|
20215
20216
|
src?: string;
|
|
20216
20217
|
label?: string;
|
|
20217
20218
|
size?: AvatarSizeProp;
|
|
20218
|
-
|
|
20219
|
+
/**
|
|
20220
|
+
* The HTML element to render the component as.
|
|
20221
|
+
* @default 'div'
|
|
20222
|
+
*/
|
|
20223
|
+
as?: 'div' | 'button';
|
|
20224
|
+
} & React.HTMLAttributes<HTMLDivElement | HTMLButtonElement>;
|
|
20219
20225
|
/**
|
|
20220
20226
|
* @description A component to render rounded avatars of a user or an app.
|
|
20221
20227
|
* @example <Avatar>AB</Avatar>
|
|
20222
20228
|
*/
|
|
20223
|
-
declare const Avatar: ({ src, label, children, size, ...props }: AvatarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20229
|
+
declare const Avatar: ({ src, label, children, size, as, ...props }: AvatarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20224
20230
|
|
|
20225
20231
|
type AvatarGroupProps = {
|
|
20226
20232
|
/**
|
|
@@ -22564,13 +22570,15 @@ type ScrollableListItemProps = React$1.ButtonHTMLAttributes<HTMLButtonElement> &
|
|
|
22564
22570
|
*/
|
|
22565
22571
|
declare const ScrollableListItem: ({ buttonText, icon, active, disableShadow, ...props }: ScrollableListItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22566
22572
|
|
|
22573
|
+
type LoadingIndicatorProps = {
|
|
22574
|
+
color?: 'gray' | 'accent-alt';
|
|
22575
|
+
size?: 'lg' | 'sm';
|
|
22576
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'color'>;
|
|
22567
22577
|
/**
|
|
22568
22578
|
* Loading Indicator
|
|
22569
22579
|
* @example <LoadingIndicator />
|
|
22570
22580
|
*/
|
|
22571
|
-
declare const LoadingIndicator: ({ size, ...props }:
|
|
22572
|
-
size?: "lg" | "sm";
|
|
22573
|
-
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22581
|
+
declare const LoadingIndicator: ({ size, color, ...props }: LoadingIndicatorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22574
22582
|
|
|
22575
22583
|
interface LoadingOverlayProps {
|
|
22576
22584
|
/** sets whether to display the loading overlay components */
|
|
@@ -22695,7 +22703,7 @@ type MenuGroupProps = {
|
|
|
22695
22703
|
};
|
|
22696
22704
|
declare const MenuGroup: ({ title, children }: MenuGroupProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22697
22705
|
|
|
22698
|
-
type MenuItemTextThemeProps = 'base' | 'red';
|
|
22706
|
+
type MenuItemTextThemeProps = 'base' | 'red' | 'accent-alt';
|
|
22699
22707
|
type MenuItemProps = MenuItemProps$1 & {
|
|
22700
22708
|
/**
|
|
22701
22709
|
* Sets child elements within the component.
|
|
@@ -23303,15 +23311,17 @@ type RichTextToolbarProps = {
|
|
|
23303
23311
|
rows: number;
|
|
23304
23312
|
columns: number;
|
|
23305
23313
|
} | null>;
|
|
23314
|
+
onInsertAsset?: () => void;
|
|
23306
23315
|
};
|
|
23316
|
+
|
|
23307
23317
|
type UseRichTextToolbarStateProps = {
|
|
23308
23318
|
config?: RichTextParamConfiguration;
|
|
23309
23319
|
};
|
|
23310
23320
|
declare const useRichTextToolbarState: ({ config }: UseRichTextToolbarStateProps) => {
|
|
23311
23321
|
activeFormats: _uniformdev_richtext.RichTextBuiltInFormat[];
|
|
23312
23322
|
setActiveFormats: React$1.Dispatch<React$1.SetStateAction<_uniformdev_richtext.RichTextBuiltInFormat[]>>;
|
|
23313
|
-
activeElement: "paragraph" |
|
|
23314
|
-
setActiveElement: React$1.Dispatch<React$1.SetStateAction<"paragraph" |
|
|
23323
|
+
activeElement: "paragraph" | RichTextBuiltInElement;
|
|
23324
|
+
setActiveElement: React$1.Dispatch<React$1.SetStateAction<"paragraph" | RichTextBuiltInElement>>;
|
|
23315
23325
|
visibleFormatsWithIcon: {
|
|
23316
23326
|
label: string;
|
|
23317
23327
|
type: _uniformdev_richtext.RichTextBuiltInFormat;
|
|
@@ -23322,7 +23332,7 @@ declare const useRichTextToolbarState: ({ config }: UseRichTextToolbarStateProps
|
|
|
23322
23332
|
}[];
|
|
23323
23333
|
visibleTextualElements: {
|
|
23324
23334
|
label: string;
|
|
23325
|
-
type:
|
|
23335
|
+
type: RichTextBuiltInElement;
|
|
23326
23336
|
}[];
|
|
23327
23337
|
isLink: boolean;
|
|
23328
23338
|
setIsLink: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
@@ -23331,6 +23341,7 @@ declare const useRichTextToolbarState: ({ config }: UseRichTextToolbarStateProps
|
|
|
23331
23341
|
quoteElementVisible: boolean;
|
|
23332
23342
|
codeElementVisible: boolean;
|
|
23333
23343
|
tableElementVisible: boolean;
|
|
23344
|
+
assetElementVisible: boolean;
|
|
23334
23345
|
visibleElementsWithIcons: Set<string>;
|
|
23335
23346
|
visibleInsertElementsWithIcons: Set<string>;
|
|
23336
23347
|
};
|
|
@@ -23359,6 +23370,8 @@ type RichTextProps = {
|
|
|
23359
23370
|
rows: number;
|
|
23360
23371
|
columns: number;
|
|
23361
23372
|
} | null>;
|
|
23373
|
+
/** Assets */
|
|
23374
|
+
onInsertAsset?: () => void;
|
|
23362
23375
|
};
|
|
23363
23376
|
type RichTextParamValue = SerializedEditorState | undefined | null;
|
|
23364
23377
|
type ParameterRichTextInnerProps = RichTextProps & {
|
|
@@ -23367,8 +23380,8 @@ type ParameterRichTextInnerProps = RichTextProps & {
|
|
|
23367
23380
|
editorFooter?: React.ReactNode;
|
|
23368
23381
|
};
|
|
23369
23382
|
type ParameterRichTextProps = CommonParameterInputProps & ParameterRichTextInnerProps;
|
|
23370
|
-
declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, customNodes, children, variables, customControls, onInsertTable, minimalInteractivity, }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23371
|
-
declare const ParameterRichTextInner: ({ value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, children, customNodes, variables, customControls, onInsertTable, minimalInteractivity, }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23383
|
+
declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, customNodes, children, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23384
|
+
declare const ParameterRichTextInner: ({ value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, children, customNodes, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23372
23385
|
|
|
23373
23386
|
type ParameterSelectProps = CommonParameterInputProps & CommonParameterSelectProps & React.InputHTMLAttributes<HTMLSelectElement>;
|
|
23374
23387
|
/** @example <ParameterSelect label="my label" id="my-id" options={[{ label: 'option label', value: 0}]} */
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { LinkParamValue, RichTextParamConfiguration } from '@uniformdev/canvas';
|
|
|
28
28
|
export { RichTextBuiltInElement, RichTextBuiltInFormat } from '@uniformdev/canvas';
|
|
29
29
|
import { Spread, SerializedElementNode, ElementNode, NodeKey, EditorConfig, DOMConversionMap, RangeSelection, SerializedEditorState, LexicalEditor } from 'lexical';
|
|
30
30
|
import * as _uniformdev_richtext from '@uniformdev/richtext';
|
|
31
|
+
import { RichTextBuiltInElement } from '@uniformdev/richtext';
|
|
31
32
|
export { richTextBuiltInElements, richTextBuiltInFormats } from '@uniformdev/richtext';
|
|
32
33
|
export { Id as ToastId, toast } from 'react-toastify';
|
|
33
34
|
|
|
@@ -20210,17 +20211,22 @@ type AnimationFileProps = LottieComponentProps & {
|
|
|
20210
20211
|
*/
|
|
20211
20212
|
declare const AnimationFile: ({ label, loop, autoplay, width, height, ...props }: AnimationFileProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20212
20213
|
|
|
20213
|
-
type AvatarSizeProp = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
20214
|
+
type AvatarSizeProp = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
20214
20215
|
type AvatarProps = {
|
|
20215
20216
|
src?: string;
|
|
20216
20217
|
label?: string;
|
|
20217
20218
|
size?: AvatarSizeProp;
|
|
20218
|
-
|
|
20219
|
+
/**
|
|
20220
|
+
* The HTML element to render the component as.
|
|
20221
|
+
* @default 'div'
|
|
20222
|
+
*/
|
|
20223
|
+
as?: 'div' | 'button';
|
|
20224
|
+
} & React.HTMLAttributes<HTMLDivElement | HTMLButtonElement>;
|
|
20219
20225
|
/**
|
|
20220
20226
|
* @description A component to render rounded avatars of a user or an app.
|
|
20221
20227
|
* @example <Avatar>AB</Avatar>
|
|
20222
20228
|
*/
|
|
20223
|
-
declare const Avatar: ({ src, label, children, size, ...props }: AvatarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20229
|
+
declare const Avatar: ({ src, label, children, size, as, ...props }: AvatarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
20224
20230
|
|
|
20225
20231
|
type AvatarGroupProps = {
|
|
20226
20232
|
/**
|
|
@@ -22564,13 +22570,15 @@ type ScrollableListItemProps = React$1.ButtonHTMLAttributes<HTMLButtonElement> &
|
|
|
22564
22570
|
*/
|
|
22565
22571
|
declare const ScrollableListItem: ({ buttonText, icon, active, disableShadow, ...props }: ScrollableListItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22566
22572
|
|
|
22573
|
+
type LoadingIndicatorProps = {
|
|
22574
|
+
color?: 'gray' | 'accent-alt';
|
|
22575
|
+
size?: 'lg' | 'sm';
|
|
22576
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'color'>;
|
|
22567
22577
|
/**
|
|
22568
22578
|
* Loading Indicator
|
|
22569
22579
|
* @example <LoadingIndicator />
|
|
22570
22580
|
*/
|
|
22571
|
-
declare const LoadingIndicator: ({ size, ...props }:
|
|
22572
|
-
size?: "lg" | "sm";
|
|
22573
|
-
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22581
|
+
declare const LoadingIndicator: ({ size, color, ...props }: LoadingIndicatorProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22574
22582
|
|
|
22575
22583
|
interface LoadingOverlayProps {
|
|
22576
22584
|
/** sets whether to display the loading overlay components */
|
|
@@ -22695,7 +22703,7 @@ type MenuGroupProps = {
|
|
|
22695
22703
|
};
|
|
22696
22704
|
declare const MenuGroup: ({ title, children }: MenuGroupProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
22697
22705
|
|
|
22698
|
-
type MenuItemTextThemeProps = 'base' | 'red';
|
|
22706
|
+
type MenuItemTextThemeProps = 'base' | 'red' | 'accent-alt';
|
|
22699
22707
|
type MenuItemProps = MenuItemProps$1 & {
|
|
22700
22708
|
/**
|
|
22701
22709
|
* Sets child elements within the component.
|
|
@@ -23303,15 +23311,17 @@ type RichTextToolbarProps = {
|
|
|
23303
23311
|
rows: number;
|
|
23304
23312
|
columns: number;
|
|
23305
23313
|
} | null>;
|
|
23314
|
+
onInsertAsset?: () => void;
|
|
23306
23315
|
};
|
|
23316
|
+
|
|
23307
23317
|
type UseRichTextToolbarStateProps = {
|
|
23308
23318
|
config?: RichTextParamConfiguration;
|
|
23309
23319
|
};
|
|
23310
23320
|
declare const useRichTextToolbarState: ({ config }: UseRichTextToolbarStateProps) => {
|
|
23311
23321
|
activeFormats: _uniformdev_richtext.RichTextBuiltInFormat[];
|
|
23312
23322
|
setActiveFormats: React$1.Dispatch<React$1.SetStateAction<_uniformdev_richtext.RichTextBuiltInFormat[]>>;
|
|
23313
|
-
activeElement: "paragraph" |
|
|
23314
|
-
setActiveElement: React$1.Dispatch<React$1.SetStateAction<"paragraph" |
|
|
23323
|
+
activeElement: "paragraph" | RichTextBuiltInElement;
|
|
23324
|
+
setActiveElement: React$1.Dispatch<React$1.SetStateAction<"paragraph" | RichTextBuiltInElement>>;
|
|
23315
23325
|
visibleFormatsWithIcon: {
|
|
23316
23326
|
label: string;
|
|
23317
23327
|
type: _uniformdev_richtext.RichTextBuiltInFormat;
|
|
@@ -23322,7 +23332,7 @@ declare const useRichTextToolbarState: ({ config }: UseRichTextToolbarStateProps
|
|
|
23322
23332
|
}[];
|
|
23323
23333
|
visibleTextualElements: {
|
|
23324
23334
|
label: string;
|
|
23325
|
-
type:
|
|
23335
|
+
type: RichTextBuiltInElement;
|
|
23326
23336
|
}[];
|
|
23327
23337
|
isLink: boolean;
|
|
23328
23338
|
setIsLink: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
@@ -23331,6 +23341,7 @@ declare const useRichTextToolbarState: ({ config }: UseRichTextToolbarStateProps
|
|
|
23331
23341
|
quoteElementVisible: boolean;
|
|
23332
23342
|
codeElementVisible: boolean;
|
|
23333
23343
|
tableElementVisible: boolean;
|
|
23344
|
+
assetElementVisible: boolean;
|
|
23334
23345
|
visibleElementsWithIcons: Set<string>;
|
|
23335
23346
|
visibleInsertElementsWithIcons: Set<string>;
|
|
23336
23347
|
};
|
|
@@ -23359,6 +23370,8 @@ type RichTextProps = {
|
|
|
23359
23370
|
rows: number;
|
|
23360
23371
|
columns: number;
|
|
23361
23372
|
} | null>;
|
|
23373
|
+
/** Assets */
|
|
23374
|
+
onInsertAsset?: () => void;
|
|
23362
23375
|
};
|
|
23363
23376
|
type RichTextParamValue = SerializedEditorState | undefined | null;
|
|
23364
23377
|
type ParameterRichTextInnerProps = RichTextProps & {
|
|
@@ -23367,8 +23380,8 @@ type ParameterRichTextInnerProps = RichTextProps & {
|
|
|
23367
23380
|
editorFooter?: React.ReactNode;
|
|
23368
23381
|
};
|
|
23369
23382
|
type ParameterRichTextProps = CommonParameterInputProps & ParameterRichTextInnerProps;
|
|
23370
|
-
declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, customNodes, children, variables, customControls, onInsertTable, minimalInteractivity, }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23371
|
-
declare const ParameterRichTextInner: ({ value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, children, customNodes, variables, customControls, onInsertTable, minimalInteractivity, }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23383
|
+
declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, customNodes, children, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23384
|
+
declare const ParameterRichTextInner: ({ value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, children, customNodes, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
23372
23385
|
|
|
23373
23386
|
type ParameterSelectProps = CommonParameterInputProps & CommonParameterSelectProps & React.InputHTMLAttributes<HTMLSelectElement>;
|
|
23374
23387
|
/** @example <ParameterSelect label="my label" id="my-id" options={[{ label: 'option label', value: 0}]} */
|