@useloops/design-system 1.4.168 → 1.4.170
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 +2 -2
- package/dist/index.d.ts +241 -200
- package/dist/index.js +2 -2
- package/package.json +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import { Icons } from 'BrandCore/Icon';
|
|
2
|
-
export { default as Icon, Icons, iconSizeMap, icons } from 'BrandCore/Icon';
|
|
3
1
|
import * as _mui_material from '@mui/material';
|
|
4
|
-
import { SxProps, Theme, AvatarGroupProps as AvatarGroupProps$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ContainerProps, MenuProps, MenuItemProps as MenuItemProps$1, FormControlLabelProps as FormControlLabelProps$1, Breakpoint, TooltipProps as TooltipProps$1, IconButtonProps as IconButtonProps$1, ButtonGroupProps, TextFieldProps as TextFieldProps$1, LinkProps as LinkProps$1, PopperProps as PopperProps$1, ClickAwayListenerProps, FadeProps, SelectProps as SelectProps$1, SelectChangeEvent,
|
|
5
|
-
import react, { FunctionComponent,
|
|
6
|
-
import {
|
|
7
|
-
import { GenericSizeMap as GenericSizeMap$1 } from 'BrandCore/primitiveVariables';
|
|
8
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
-
import * as _emotion_styled from '@emotion/styled';
|
|
10
|
-
import * as _mui_system from '@mui/system';
|
|
2
|
+
import { SxProps, Theme, PaperProps, AvatarGroupProps as AvatarGroupProps$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ContainerProps, MenuProps, MenuItemProps as MenuItemProps$1, FormControlLabelProps as FormControlLabelProps$1, Breakpoint, TooltipProps as TooltipProps$1, IconButtonProps as IconButtonProps$1, ButtonGroupProps, TextFieldProps as TextFieldProps$1, LinkProps as LinkProps$1, PopperProps as PopperProps$1, ClickAwayListenerProps, FadeProps, SelectProps as SelectProps$1, SelectChangeEvent, SwitchProps as SwitchProps$1, TypographyProps as TypographyProps$1, PaletteMode, Direction } from '@mui/material';
|
|
3
|
+
import react, { FunctionComponent, PropsWithChildren, FC, ReactNode, ReactElement, ChangeEvent } from 'react';
|
|
4
|
+
import { SubmitHandler } from 'react-hook-form';
|
|
11
5
|
import { Theme as Theme$1 } from '@mui/material/styles';
|
|
12
|
-
import { NavigationSizing as NavigationSizing$1 } from 'Platform/Navigation';
|
|
13
6
|
import { NumericFormatProps } from 'react-number-format';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
7
|
+
import * as _emotion_styled from '@emotion/styled';
|
|
8
|
+
import * as _mui_system from '@mui/system';
|
|
9
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
10
|
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
11
|
+
import { LazyLoadImageProps } from 'react-lazy-load-image-component';
|
|
12
|
+
import { PopupState } from 'material-ui-popup-state/hooks';
|
|
19
13
|
|
|
20
14
|
interface ColorRange$1 {
|
|
21
15
|
0: string;
|
|
@@ -499,6 +493,17 @@ declare const fonts: {
|
|
|
499
493
|
};
|
|
500
494
|
};
|
|
501
495
|
|
|
496
|
+
declare const iconSizeMap: Record<string, number>;
|
|
497
|
+
interface IconProps {
|
|
498
|
+
color?: string;
|
|
499
|
+
name: IconName;
|
|
500
|
+
size?: number;
|
|
501
|
+
sx?: SxProps;
|
|
502
|
+
}
|
|
503
|
+
declare const Icon: FunctionComponent<IconProps>;
|
|
504
|
+
|
|
505
|
+
type IconName = 'brand-wordmark' | 'brand-logomark' | 'menu' | 'menu-open' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'arrow-left' | 'arrow-right' | 'search' | 'close' | 'more-horizontal' | 'more-vertical' | 'home' | 'home-filled' | 'settings' | 'controls' | 'help' | 'filter-list' | 'open-in-new' | 'nav-toggle' | 'nav-collapse' | 'nav-expand' | 'play-circle' | 'play-video' | 'email' | 'document' | 'folder' | 'attach-file' | 'photo-add' | 'upload' | 'upload-cloud' | 'time' | 'time-filled' | 'zoom-in' | 'zoom-out' | 'add' | 'remove' | 'test' | 'dashboard' | 'list-view' | 'grid-view' | 'grid-view-filled' | 'eye' | 'eye-off' | 'notification' | 'pound' | 'euro' | 'dollar' | 'send' | 'comment' | 'chat' | 'error' | 'warning' | 'lightbulb' | 'check-circle' | 'thumb-up' | 'info' | 'info-filled' | 'cancel' | 'compress' | 'expand' | 'unfold' | 'drag-handle' | 'focus' | 'lock' | 'copy' | 'edit' | 'delete' | 'check' | 'star' | 'star-half' | 'star-filled' | 'ai' | 'work' | 'gift' | 'social-medium-single-colour' | 'social-linkedin-single-colour' | 'social-youtube-single-colour' | 'social-linkedin-full-colour' | 'social-google-full-colour' | 'badge-tick' | 'badge-tick-in-circle' | 'badge-cross' | 'badge-cross-in-circle' | 'badge-hyphen' | 'badge-hyphen-in-circle' | 'badge-question' | 'badge-question-in-circle';
|
|
506
|
+
|
|
502
507
|
interface CustomTheme {
|
|
503
508
|
palette: {
|
|
504
509
|
black: string;
|
|
@@ -637,12 +642,43 @@ interface CustomTheme {
|
|
|
637
642
|
};
|
|
638
643
|
}
|
|
639
644
|
|
|
640
|
-
|
|
645
|
+
type SurfaceVariation = 'default' | 'sunken' | 'raised' | 'overlay';
|
|
646
|
+
type BorderRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
647
|
+
|
|
648
|
+
interface SurfaceProps extends PropsWithChildren {
|
|
649
|
+
variation?: SurfaceVariation;
|
|
650
|
+
borderradius?: BorderRadius;
|
|
651
|
+
sx?: SxProps<Theme>;
|
|
652
|
+
ref?: PaperProps['ref'];
|
|
653
|
+
component?: PaperProps['component'];
|
|
654
|
+
}
|
|
655
|
+
declare const Surface: FC<SurfaceProps>;
|
|
656
|
+
|
|
657
|
+
interface AuthContainerSurfaceProps extends SurfaceProps {
|
|
641
658
|
headContent?: ReactNode;
|
|
642
659
|
sx?: SxProps<Theme>;
|
|
660
|
+
children: ReactNode;
|
|
643
661
|
}
|
|
644
662
|
declare const AuthContainerSurface: FunctionComponent<AuthContainerSurfaceProps>;
|
|
645
663
|
|
|
664
|
+
interface BreadcrumbLink {
|
|
665
|
+
label: string;
|
|
666
|
+
href?: string;
|
|
667
|
+
}
|
|
668
|
+
interface BreadcrumbProps {
|
|
669
|
+
links?: BreadcrumbLink[];
|
|
670
|
+
}
|
|
671
|
+
declare const Breadcrumb: FunctionComponent<BreadcrumbProps>;
|
|
672
|
+
|
|
673
|
+
interface HeaderProps {
|
|
674
|
+
backHref?: string;
|
|
675
|
+
breadcrumbLinks?: BreadcrumbLink[];
|
|
676
|
+
buttons?: ReactNode;
|
|
677
|
+
controlBar?: ReactNode;
|
|
678
|
+
title?: string;
|
|
679
|
+
}
|
|
680
|
+
declare const Header: FunctionComponent<HeaderProps>;
|
|
681
|
+
|
|
646
682
|
type NavigationSizing = 'sm' | 'lg';
|
|
647
683
|
interface NavigationProps {
|
|
648
684
|
isMobile?: boolean;
|
|
@@ -661,7 +697,7 @@ interface MenuItemProps {
|
|
|
661
697
|
danger?: boolean;
|
|
662
698
|
fullWidth?: boolean;
|
|
663
699
|
href?: string;
|
|
664
|
-
icon?:
|
|
700
|
+
icon?: IconName;
|
|
665
701
|
label: string;
|
|
666
702
|
onClick?: () => void;
|
|
667
703
|
selected?: boolean;
|
|
@@ -722,6 +758,47 @@ interface ProjectItemProps extends ProjectItemDataProps, ProjectItemViewType {
|
|
|
722
758
|
|
|
723
759
|
declare const ProjectItem: FunctionComponent<ProjectItemProps>;
|
|
724
760
|
|
|
761
|
+
interface SectionHeaderProps {
|
|
762
|
+
buttons?: ReactNode;
|
|
763
|
+
subtitle?: string;
|
|
764
|
+
title?: string;
|
|
765
|
+
}
|
|
766
|
+
declare const SectionHeader: FunctionComponent<SectionHeaderProps>;
|
|
767
|
+
|
|
768
|
+
declare const emailValidation: {
|
|
769
|
+
pattern: {
|
|
770
|
+
value: RegExp;
|
|
771
|
+
message: string;
|
|
772
|
+
};
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
declare const chooseArticle: (word: string) => string;
|
|
776
|
+
declare const defaultInputValidation: (inputName?: string, isRequired?: boolean, maxLength?: number) => {
|
|
777
|
+
required?: string | undefined;
|
|
778
|
+
maxLength: {
|
|
779
|
+
value: number;
|
|
780
|
+
message: string;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
declare const DEFAULT_MAX_INPUT_LENGTH: number;
|
|
784
|
+
|
|
785
|
+
declare const passwordValidation: (min?: number) => {
|
|
786
|
+
minLength: {
|
|
787
|
+
value: number;
|
|
788
|
+
message: string;
|
|
789
|
+
};
|
|
790
|
+
equal: {
|
|
791
|
+
value: string;
|
|
792
|
+
message: string;
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
interface BackgroundOptions {
|
|
797
|
+
texture?: 'none' | 'noise1';
|
|
798
|
+
gradient?: 'tone1' | 'tone2' | 'tone3' | 'tone4';
|
|
799
|
+
}
|
|
800
|
+
declare const backgroundCreator: (theme: Theme, options: BackgroundOptions) => string;
|
|
801
|
+
|
|
725
802
|
interface AuthFormHeaderProps {
|
|
726
803
|
logo?: ReactElement | false | undefined;
|
|
727
804
|
headerText?: string;
|
|
@@ -745,7 +822,7 @@ interface AvatarGroupProps extends AvatarGroupProps$1 {
|
|
|
745
822
|
}
|
|
746
823
|
declare const AvatarGroup: FunctionComponent<AvatarGroupProps>;
|
|
747
824
|
|
|
748
|
-
type ButtonSizing = Exclude<GenericSizeMap
|
|
825
|
+
type ButtonSizing = Exclude<GenericSizeMap, 'none'>;
|
|
749
826
|
|
|
750
827
|
interface ButtonBaseProps extends ButtonProps$1 {
|
|
751
828
|
loading?: boolean;
|
|
@@ -886,6 +963,98 @@ interface FormControlLabelProps {
|
|
|
886
963
|
}
|
|
887
964
|
declare const FormControlLabel: FunctionComponent<FormControlLabelProps>;
|
|
888
965
|
|
|
966
|
+
/**
|
|
967
|
+
* Form Generator Core Types
|
|
968
|
+
*/
|
|
969
|
+
interface FormGeneratorHandler {
|
|
970
|
+
set: () => void;
|
|
971
|
+
reset: () => void;
|
|
972
|
+
submit: () => void;
|
|
973
|
+
values: () => void;
|
|
974
|
+
valid: () => void;
|
|
975
|
+
errors: () => void;
|
|
976
|
+
triggerFormValidation: () => Promise<unknown>;
|
|
977
|
+
}
|
|
978
|
+
type FormGeneratorProps = FunctionComponent<{
|
|
979
|
+
ref?: any;
|
|
980
|
+
formConfig: FormGeneratorConfig;
|
|
981
|
+
onFormSubmit?: SubmitHandler<any>;
|
|
982
|
+
onFormChange?: (formData: any) => void;
|
|
983
|
+
submitButton?: ReactElement;
|
|
984
|
+
secondaryButton?: ReactElement;
|
|
985
|
+
}>;
|
|
986
|
+
interface FormGeneratorConfig {
|
|
987
|
+
fields: FieldTypes[];
|
|
988
|
+
autoComplete?: 'off';
|
|
989
|
+
mode?: 'onSubmit' | 'onBlur' | 'onChange';
|
|
990
|
+
formId?: string;
|
|
991
|
+
reValidateMode?: 'onSubmit' | 'onBlur' | 'onChange';
|
|
992
|
+
styleOverrides?: {
|
|
993
|
+
sxForm?: SxProps<Theme>;
|
|
994
|
+
sxButtons?: SxProps<Theme>;
|
|
995
|
+
sxStack?: SxProps<Theme>;
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Field Types
|
|
1000
|
+
*/
|
|
1001
|
+
type FieldTypes = CheckboxType | CheckboxGroupType | SwitchType | TextareaType | SelectType | TextFieldType | SliderType | DifferentialType | RichTextFieldType | LikertType | RadioGroupType | DragAndDropRankingType | NumberFieldType | StarRatingType | HTMLType | CustomFieldType;
|
|
1002
|
+
type TextFieldType = CreateFieldType<'textfield', TextFieldProps, string>;
|
|
1003
|
+
type NumberFieldType = CreateFieldType<'numberfield', NumberFieldProps, number>;
|
|
1004
|
+
type TextareaType = CreateFieldType<'textarea', TextareaProps, string>;
|
|
1005
|
+
type SelectType = CreateFieldType<'select', SelectProps, SelectProps['value']>;
|
|
1006
|
+
type CheckboxType = CreateFieldType<'checkbox', CheckboxProps, NonNullable<CheckboxProps['value']>>;
|
|
1007
|
+
type CheckboxGroupType = CreateFieldType<'checkboxGroup', CheckboxGroupProps, string[]>;
|
|
1008
|
+
type SwitchType = CreateFieldType<'switch', SwitchProps, NonNullable<SwitchProps['checked']>>;
|
|
1009
|
+
type SliderType = CreateFieldType<'slider', SliderProps, NonNullable<SliderProps['value']>>;
|
|
1010
|
+
type DifferentialType = CreateFieldType<'differential', DifferentialProps, NonNullable<DifferentialProps['value']>>;
|
|
1011
|
+
type LikertType = CreateFieldType<'likert', LikertProps, LikertProps['value']>;
|
|
1012
|
+
type RadioGroupType = CreateFieldType<'radioGroup', RadioGroupProps, RadioGroupProps['value']>;
|
|
1013
|
+
type DragAndDropRankingType = CreateFieldType<'ranking', RankProps, NonNullable<RankProps['value']>>;
|
|
1014
|
+
type RichTextFieldType = CreateFieldType<'richTextfield', RichTextFieldProps, RichTextFieldProps['value']>;
|
|
1015
|
+
type StarRatingType = CreateFieldType<'starRating', StarRatingProps, NonNullable<StarRatingProps['value']>>;
|
|
1016
|
+
type HTMLType = {
|
|
1017
|
+
fieldType: 'html';
|
|
1018
|
+
content: HtmlProps['children'];
|
|
1019
|
+
defaultValue?: never;
|
|
1020
|
+
} & BaseField;
|
|
1021
|
+
type CustomFieldType = {
|
|
1022
|
+
fieldType: 'customfield';
|
|
1023
|
+
defaultValue?: CustomFieldProps['value'];
|
|
1024
|
+
} & BaseField & CustomFieldProps;
|
|
1025
|
+
/**
|
|
1026
|
+
* Field Type Utilities
|
|
1027
|
+
*/
|
|
1028
|
+
interface BaseField {
|
|
1029
|
+
name: string;
|
|
1030
|
+
ref?: any;
|
|
1031
|
+
multiline?: boolean;
|
|
1032
|
+
content?: ReactElement;
|
|
1033
|
+
label?: string;
|
|
1034
|
+
labelProps?: InputLabelProps;
|
|
1035
|
+
helperText?: string;
|
|
1036
|
+
hidden?: boolean;
|
|
1037
|
+
type?: string;
|
|
1038
|
+
helpTextProps?: InputLabelHelpProps;
|
|
1039
|
+
validation?: any;
|
|
1040
|
+
valueTransformer?: (valueToTransform: string) => string;
|
|
1041
|
+
disabled?: boolean;
|
|
1042
|
+
strengthIndicator?: boolean;
|
|
1043
|
+
styleOverrides?: {
|
|
1044
|
+
sxInputWrapper?: SxProps<Theme>;
|
|
1045
|
+
sxInputBase?: SxProps<Theme>;
|
|
1046
|
+
sxInputStack?: SxProps<Theme>;
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
type CreateFieldType<TFieldType extends string, TProps, TDefaultValue extends any = void> = {
|
|
1050
|
+
fieldType: TFieldType;
|
|
1051
|
+
} & BaseField & Omit<TProps, 'value' | 'defaultValue' | 'onChange' | 'name'> & (TDefaultValue extends void ? unknown : {
|
|
1052
|
+
defaultValue?: TDefaultValue;
|
|
1053
|
+
});
|
|
1054
|
+
type FieldType = FieldTypes['fieldType'];
|
|
1055
|
+
|
|
1056
|
+
declare const FormGenerator: FormGeneratorProps;
|
|
1057
|
+
|
|
889
1058
|
interface GridOverlayProps {
|
|
890
1059
|
breakpoint?: Breakpoint;
|
|
891
1060
|
}
|
|
@@ -945,6 +1114,10 @@ interface IconButtonGroupProps extends PropsWithChildren {
|
|
|
945
1114
|
}
|
|
946
1115
|
declare const IconButtonGroup: FunctionComponent<IconButtonGroupProps>;
|
|
947
1116
|
|
|
1117
|
+
interface ImageProps extends LazyLoadImageProps {
|
|
1118
|
+
}
|
|
1119
|
+
declare const Image: FunctionComponent<ImageProps>;
|
|
1120
|
+
|
|
948
1121
|
type InputFieldBaseProps = TextFieldProps$1;
|
|
949
1122
|
declare const InputFieldBase: _emotion_styled.StyledComponent<{
|
|
950
1123
|
variant?: _mui_material.TextFieldVariants | undefined;
|
|
@@ -1013,6 +1186,10 @@ declare const Loader: FunctionComponent<LoaderProps>;
|
|
|
1013
1186
|
|
|
1014
1187
|
declare const Logo: FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
1015
1188
|
|
|
1189
|
+
interface LoopsAiButtonProps {
|
|
1190
|
+
}
|
|
1191
|
+
declare const LoopsAiButton: FunctionComponent<LoopsAiButtonProps>;
|
|
1192
|
+
|
|
1016
1193
|
declare const Markdown: (props: any) => react_jsx_runtime.JSX.Element;
|
|
1017
1194
|
|
|
1018
1195
|
type MenuButtonSizing = 'sm' | 'md' | 'lg';
|
|
@@ -1021,9 +1198,9 @@ interface MenuButtonProps {
|
|
|
1021
1198
|
danger?: boolean;
|
|
1022
1199
|
fullWidth?: boolean;
|
|
1023
1200
|
href?: string;
|
|
1024
|
-
icon?:
|
|
1201
|
+
icon?: IconName;
|
|
1025
1202
|
label: string;
|
|
1026
|
-
navigationSizing: NavigationSizing
|
|
1203
|
+
navigationSizing: NavigationSizing;
|
|
1027
1204
|
onClick?: () => void;
|
|
1028
1205
|
sizing?: MenuButtonSizing;
|
|
1029
1206
|
}
|
|
@@ -1033,11 +1210,11 @@ interface NudgeProps extends PropsWithChildren {
|
|
|
1033
1210
|
description: string;
|
|
1034
1211
|
notification?: boolean;
|
|
1035
1212
|
title: string;
|
|
1036
|
-
navigationSizing: NavigationSizing
|
|
1213
|
+
navigationSizing: NavigationSizing;
|
|
1037
1214
|
}
|
|
1038
1215
|
declare const Nudge: FunctionComponent<NudgeProps>;
|
|
1039
1216
|
|
|
1040
|
-
type NumberFieldProps = InputFieldBaseProps
|
|
1217
|
+
type NumberFieldProps = InputFieldBaseProps & {
|
|
1041
1218
|
hideActionButtons?: boolean;
|
|
1042
1219
|
max?: number;
|
|
1043
1220
|
min?: number;
|
|
@@ -1064,9 +1241,11 @@ declare const Pill: FunctionComponent<PillProps>;
|
|
|
1064
1241
|
type BindOn = 'trigger' | 'contextMenu' | 'toggle' | 'hover' | 'focus' | 'doubleClick';
|
|
1065
1242
|
interface PopperProps {
|
|
1066
1243
|
popperProps?: Partial<PopperProps$1>;
|
|
1067
|
-
clickAwayListenerProps?: Partial<ClickAwayListenerProps
|
|
1244
|
+
clickAwayListenerProps?: Partial<Omit<ClickAwayListenerProps, 'onClickAway'> & {
|
|
1245
|
+
onClickAway?: (event: MouseEvent | TouchEvent, state: PopupState) => void;
|
|
1246
|
+
}>;
|
|
1068
1247
|
transitionFadeProps?: Pick<FadeProps, 'easing' | 'timeout' | 'appear' | 'enter' | 'exit'>;
|
|
1069
|
-
surfaceProps?: SurfaceProps
|
|
1248
|
+
surfaceProps?: SurfaceProps;
|
|
1070
1249
|
bindOn?: BindOn[];
|
|
1071
1250
|
trigger: (state: PopupState) => ReactNode;
|
|
1072
1251
|
children: ReactElement;
|
|
@@ -1079,7 +1258,7 @@ declare const Portal: FunctionComponent<PortalProps>;
|
|
|
1079
1258
|
|
|
1080
1259
|
declare const PoweredByWatermarkLogo: () => react_jsx_runtime.JSX.Element;
|
|
1081
1260
|
|
|
1082
|
-
type ProgressSizing = Exclude<GenericSizeMap
|
|
1261
|
+
type ProgressSizing = Exclude<GenericSizeMap, 'none'>;
|
|
1083
1262
|
interface ProgressProps {
|
|
1084
1263
|
sizing?: ProgressSizing;
|
|
1085
1264
|
}
|
|
@@ -1120,6 +1299,41 @@ interface RadioGroupProps {
|
|
|
1120
1299
|
}
|
|
1121
1300
|
declare const RadioGroup: FunctionComponent<RadioGroupProps>;
|
|
1122
1301
|
|
|
1302
|
+
type SelectOption = {
|
|
1303
|
+
label: string;
|
|
1304
|
+
value: string;
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
type SelectOnChange = (event: SelectChangeEvent<any>, child: React.ReactNode) => void;
|
|
1308
|
+
type AutocompleteOnChange = (value: string | string[]) => void;
|
|
1309
|
+
type SelectProps = {
|
|
1310
|
+
selections: SelectOption[];
|
|
1311
|
+
autoComplete?: boolean;
|
|
1312
|
+
autoFocus?: boolean;
|
|
1313
|
+
disabled?: boolean;
|
|
1314
|
+
disablePortal?: boolean;
|
|
1315
|
+
error?: boolean;
|
|
1316
|
+
fullWidth?: boolean;
|
|
1317
|
+
id?: string;
|
|
1318
|
+
inputRef?: SelectProps$1['inputRef'];
|
|
1319
|
+
internalChange?: () => void;
|
|
1320
|
+
MenuProps?: SelectProps$1['MenuProps'];
|
|
1321
|
+
multi?: boolean;
|
|
1322
|
+
name: string;
|
|
1323
|
+
onBlur?: SelectProps$1['onBlur'];
|
|
1324
|
+
onChange?: SelectOnChange | AutocompleteOnChange;
|
|
1325
|
+
placeholder?: string | undefined;
|
|
1326
|
+
readOnly?: boolean;
|
|
1327
|
+
ref?: SelectProps$1['ref'];
|
|
1328
|
+
required?: boolean;
|
|
1329
|
+
selectOptionProps?: MenuItemProps$1;
|
|
1330
|
+
sizing?: 'xs' | 'md' | 'lg';
|
|
1331
|
+
sx?: SelectProps$1['sx'];
|
|
1332
|
+
value?: SelectProps$1['value'];
|
|
1333
|
+
renderListItem?: (value: string, label: string) => ReactElement;
|
|
1334
|
+
};
|
|
1335
|
+
declare const Select: FunctionComponent<SelectProps>;
|
|
1336
|
+
|
|
1123
1337
|
interface Option {
|
|
1124
1338
|
label: string;
|
|
1125
1339
|
value: string;
|
|
@@ -1173,41 +1387,6 @@ type RichTextFieldProps = Omit<InputFieldBaseProps, 'value' | 'onChange'> & {
|
|
|
1173
1387
|
};
|
|
1174
1388
|
declare const RichTextField: FunctionComponent<RichTextFieldProps>;
|
|
1175
1389
|
|
|
1176
|
-
type SelectOption = {
|
|
1177
|
-
label: string;
|
|
1178
|
-
value: string;
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
|
-
type SelectOnChange = (event: SelectChangeEvent<any>, child: React.ReactNode) => void;
|
|
1182
|
-
type AutocompleteOnChange = (value: string | string[]) => void;
|
|
1183
|
-
type SelectProps = {
|
|
1184
|
-
selections: SelectOption[];
|
|
1185
|
-
autoComplete?: boolean;
|
|
1186
|
-
autoFocus?: boolean;
|
|
1187
|
-
disabled?: boolean;
|
|
1188
|
-
disablePortal?: boolean;
|
|
1189
|
-
error?: boolean;
|
|
1190
|
-
fullWidth?: boolean;
|
|
1191
|
-
id?: string;
|
|
1192
|
-
inputRef?: SelectProps$1['inputRef'];
|
|
1193
|
-
internalChange?: () => void;
|
|
1194
|
-
MenuProps?: SelectProps$1['MenuProps'];
|
|
1195
|
-
multi?: boolean;
|
|
1196
|
-
name: string;
|
|
1197
|
-
onBlur?: SelectProps$1['onBlur'];
|
|
1198
|
-
onChange?: SelectOnChange | AutocompleteOnChange;
|
|
1199
|
-
placeholder?: string | undefined;
|
|
1200
|
-
readOnly?: boolean;
|
|
1201
|
-
ref?: SelectProps$1['ref'];
|
|
1202
|
-
required?: boolean;
|
|
1203
|
-
selectOptionProps?: MenuItemProps$1;
|
|
1204
|
-
sizing?: 'xs' | 'md' | 'lg';
|
|
1205
|
-
sx?: SelectProps$1['sx'];
|
|
1206
|
-
value?: SelectProps$1['value'];
|
|
1207
|
-
renderListItem?: (value: string, label: string) => ReactElement;
|
|
1208
|
-
};
|
|
1209
|
-
declare const Select: FunctionComponent<SelectProps>;
|
|
1210
|
-
|
|
1211
1390
|
interface SliderProps {
|
|
1212
1391
|
labelLeft: string;
|
|
1213
1392
|
labelRight: string;
|
|
@@ -1236,18 +1415,6 @@ interface StarRatingProps {
|
|
|
1236
1415
|
}
|
|
1237
1416
|
declare const StarRating: FunctionComponent<StarRatingProps>;
|
|
1238
1417
|
|
|
1239
|
-
type SurfaceVariation = 'default' | 'sunken' | 'raised' | 'overlay';
|
|
1240
|
-
type BorderRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1241
|
-
|
|
1242
|
-
interface SurfaceProps extends PropsWithChildren {
|
|
1243
|
-
variation?: SurfaceVariation;
|
|
1244
|
-
borderradius?: BorderRadius;
|
|
1245
|
-
sx?: SxProps<Theme>;
|
|
1246
|
-
ref?: PaperProps['ref'];
|
|
1247
|
-
component?: PaperProps['component'];
|
|
1248
|
-
}
|
|
1249
|
-
declare const Surface: FC<SurfaceProps>;
|
|
1250
|
-
|
|
1251
1418
|
interface StyledSwitchProps extends SwitchProps$1 {
|
|
1252
1419
|
sizing?: 'sm' | 'lg';
|
|
1253
1420
|
}
|
|
@@ -1263,7 +1430,7 @@ interface SwitchProps extends StyledSwitchProps {
|
|
|
1263
1430
|
}
|
|
1264
1431
|
declare const Switch: FunctionComponent<SwitchProps>;
|
|
1265
1432
|
|
|
1266
|
-
type TextareaProps = InputFieldBaseProps
|
|
1433
|
+
type TextareaProps = InputFieldBaseProps & {
|
|
1267
1434
|
startAdornment?: ReactElement;
|
|
1268
1435
|
endAdornment?: ReactElement;
|
|
1269
1436
|
internalChange?: () => void;
|
|
@@ -1286,7 +1453,7 @@ interface TextBarDividerProps {
|
|
|
1286
1453
|
}
|
|
1287
1454
|
declare const TextBarDivider: FunctionComponent<TextBarDividerProps>;
|
|
1288
1455
|
|
|
1289
|
-
type TextFieldProps = InputFieldBaseProps
|
|
1456
|
+
type TextFieldProps = InputFieldBaseProps & {
|
|
1290
1457
|
startAdornment?: ReactElement;
|
|
1291
1458
|
endAdornment?: ReactElement;
|
|
1292
1459
|
internalChange?: () => void;
|
|
@@ -1319,132 +1486,6 @@ interface MenuItem {
|
|
|
1319
1486
|
}
|
|
1320
1487
|
declare const UserMenu: FunctionComponent<UserMenuProps>;
|
|
1321
1488
|
|
|
1322
|
-
interface BackgroundOptions {
|
|
1323
|
-
texture?: 'none' | 'noise1';
|
|
1324
|
-
gradient?: 'tone1' | 'tone2' | 'tone3' | 'tone4';
|
|
1325
|
-
}
|
|
1326
|
-
declare const backgroundCreator: (theme: Theme, options: BackgroundOptions) => string;
|
|
1327
|
-
|
|
1328
|
-
/**
|
|
1329
|
-
* Form Generator Core Types
|
|
1330
|
-
*/
|
|
1331
|
-
interface FormGeneratorHandler {
|
|
1332
|
-
set: () => void;
|
|
1333
|
-
reset: () => void;
|
|
1334
|
-
submit: () => void;
|
|
1335
|
-
values: () => void;
|
|
1336
|
-
valid: () => void;
|
|
1337
|
-
errors: () => void;
|
|
1338
|
-
triggerFormValidation: () => Promise<unknown>;
|
|
1339
|
-
}
|
|
1340
|
-
type FormGeneratorProps = FunctionComponent<{
|
|
1341
|
-
ref?: any;
|
|
1342
|
-
formConfig: FormGeneratorConfig;
|
|
1343
|
-
onFormSubmit?: SubmitHandler<any>;
|
|
1344
|
-
onFormChange?: (formData: any) => void;
|
|
1345
|
-
submitButton?: ReactElement;
|
|
1346
|
-
secondaryButton?: ReactElement;
|
|
1347
|
-
}>;
|
|
1348
|
-
interface FormGeneratorConfig {
|
|
1349
|
-
fields: FieldTypes[];
|
|
1350
|
-
autoComplete?: 'off';
|
|
1351
|
-
mode?: 'onSubmit' | 'onBlur' | 'onChange';
|
|
1352
|
-
formId?: string;
|
|
1353
|
-
reValidateMode?: 'onSubmit' | 'onBlur' | 'onChange';
|
|
1354
|
-
styleOverrides?: {
|
|
1355
|
-
sxForm?: SxProps<Theme>;
|
|
1356
|
-
sxButtons?: SxProps<Theme>;
|
|
1357
|
-
sxStack?: SxProps<Theme>;
|
|
1358
|
-
};
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Field Types
|
|
1362
|
-
*/
|
|
1363
|
-
type FieldTypes = CheckboxType | CheckboxGroupType | SwitchType | TextareaType | SelectType | TextFieldType | SliderType | DifferentialType | RichTextFieldType | LikertType | RadioGroupType | DragAndDropRankingType | NumberFieldType | StarRatingType | HTMLType | CustomFieldType;
|
|
1364
|
-
type TextFieldType = CreateFieldType<'textfield', TextFieldProps$2, string>;
|
|
1365
|
-
type NumberFieldType = CreateFieldType<'numberfield', NumberFieldProps$1, number>;
|
|
1366
|
-
type TextareaType = CreateFieldType<'textarea', TextareaProps$1, string>;
|
|
1367
|
-
type SelectType = CreateFieldType<'select', SelectProps$2, SelectProps$2['value']>;
|
|
1368
|
-
type CheckboxType = CreateFieldType<'checkbox', CheckboxProps$2, NonNullable<CheckboxProps$2['value']>>;
|
|
1369
|
-
type CheckboxGroupType = CreateFieldType<'checkboxGroup', CheckboxGroupProps$1, string[]>;
|
|
1370
|
-
type SwitchType = CreateFieldType<'switch', SwitchProps$2, NonNullable<SwitchProps$2['checked']>>;
|
|
1371
|
-
type SliderType = CreateFieldType<'slider', SliderProps$1, NonNullable<SliderProps$1['value']>>;
|
|
1372
|
-
type DifferentialType = CreateFieldType<'differential', DifferentialProps$1, NonNullable<DifferentialProps$1['value']>>;
|
|
1373
|
-
type LikertType = CreateFieldType<'likert', LikertProps$1, LikertProps$1['value']>;
|
|
1374
|
-
type RadioGroupType = CreateFieldType<'radioGroup', RadioGroupProps$1, RadioGroupProps$1['value']>;
|
|
1375
|
-
type DragAndDropRankingType = CreateFieldType<'ranking', RankProps$1, NonNullable<RankProps$1['value']>>;
|
|
1376
|
-
type RichTextFieldType = CreateFieldType<'richTextfield', RichTextFieldProps$1, RichTextFieldProps$1['value']>;
|
|
1377
|
-
type StarRatingType = CreateFieldType<'starRating', StarRatingProps$1, NonNullable<StarRatingProps$1['value']>>;
|
|
1378
|
-
type HTMLType = {
|
|
1379
|
-
fieldType: 'html';
|
|
1380
|
-
content: HtmlProps$1['children'];
|
|
1381
|
-
defaultValue?: never;
|
|
1382
|
-
} & BaseField;
|
|
1383
|
-
type CustomFieldType = {
|
|
1384
|
-
fieldType: 'customfield';
|
|
1385
|
-
defaultValue?: CustomFieldProps$1['value'];
|
|
1386
|
-
} & BaseField & CustomFieldProps$1;
|
|
1387
|
-
/**
|
|
1388
|
-
* Field Type Utilities
|
|
1389
|
-
*/
|
|
1390
|
-
interface BaseField {
|
|
1391
|
-
name: string;
|
|
1392
|
-
ref?: any;
|
|
1393
|
-
multiline?: boolean;
|
|
1394
|
-
content?: ReactElement;
|
|
1395
|
-
label?: string;
|
|
1396
|
-
labelProps?: InputLabelProps$1;
|
|
1397
|
-
helperText?: string;
|
|
1398
|
-
hidden?: boolean;
|
|
1399
|
-
type?: string;
|
|
1400
|
-
helpTextProps?: InputLabelHelpProps$1;
|
|
1401
|
-
validation?: any;
|
|
1402
|
-
valueTransformer?: (valueToTransform: string) => string;
|
|
1403
|
-
disabled?: boolean;
|
|
1404
|
-
strengthIndicator?: boolean;
|
|
1405
|
-
styleOverrides?: {
|
|
1406
|
-
sxInputWrapper?: SxProps<Theme>;
|
|
1407
|
-
sxInputBase?: SxProps<Theme>;
|
|
1408
|
-
sxInputStack?: SxProps<Theme>;
|
|
1409
|
-
};
|
|
1410
|
-
}
|
|
1411
|
-
type CreateFieldType<TFieldType extends string, TProps, TDefaultValue extends any = void> = {
|
|
1412
|
-
fieldType: TFieldType;
|
|
1413
|
-
} & BaseField & Omit<TProps, 'value' | 'defaultValue' | 'onChange' | 'name'> & (TDefaultValue extends void ? unknown : {
|
|
1414
|
-
defaultValue?: TDefaultValue;
|
|
1415
|
-
});
|
|
1416
|
-
type FieldType = FieldTypes['fieldType'];
|
|
1417
|
-
|
|
1418
|
-
declare const FormGenerator: FormGeneratorProps;
|
|
1419
|
-
|
|
1420
|
-
declare const emailValidation: {
|
|
1421
|
-
pattern: {
|
|
1422
|
-
value: RegExp;
|
|
1423
|
-
message: string;
|
|
1424
|
-
};
|
|
1425
|
-
};
|
|
1426
|
-
|
|
1427
|
-
declare const chooseArticle: (word: string) => string;
|
|
1428
|
-
declare const defaultInputValidation: (inputName?: string, isRequired?: boolean, maxLength?: number) => {
|
|
1429
|
-
required?: string | undefined;
|
|
1430
|
-
maxLength: {
|
|
1431
|
-
value: number;
|
|
1432
|
-
message: string;
|
|
1433
|
-
};
|
|
1434
|
-
};
|
|
1435
|
-
declare const DEFAULT_MAX_INPUT_LENGTH: number;
|
|
1436
|
-
|
|
1437
|
-
declare const passwordValidation: (min?: number) => {
|
|
1438
|
-
minLength: {
|
|
1439
|
-
value: number;
|
|
1440
|
-
message: string;
|
|
1441
|
-
};
|
|
1442
|
-
equal: {
|
|
1443
|
-
value: string;
|
|
1444
|
-
message: string;
|
|
1445
|
-
};
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
1489
|
type ScreenSize = 'sm' | 'lg';
|
|
1449
1490
|
|
|
1450
1491
|
interface Props extends PropsWithChildren {
|
|
@@ -1659,4 +1700,4 @@ declare module '@mui/system' {
|
|
|
1659
1700
|
}
|
|
1660
1701
|
}
|
|
1661
1702
|
|
|
1662
|
-
export { AuthContainerSurface, AuthFormHeader, type AuthFormHeaderProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps,
|
|
1703
|
+
export { AuthContainerSurface, AuthFormHeader, type AuthFormHeaderProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ColorBackgroundContainer, type ColorBackgroundContainerProps, type ColorRange$1 as ColorRange, type ColorRangeAlpha$1 as ColorRangeAlpha, CustomField, type CustomFieldProps, DEFAULT_MAX_INPUT_LENGTH, Differential, type DifferentialProps, DropdownMenu, type FieldType, type FieldTypes, FontWeight, FormControlLabel, FormGenerator, type FormGeneratorConfig, type FormGeneratorHandler, type GenericSizeMap, GridOverlay, type GridOverlayProps, Header, type HeaderProps, Html, type HtmlProps, Icon, IconButton, IconButtonGroup, type IconButtonProps, type IconName, Image, type ImageProps, InputFieldBase, type InputFieldBaseProps, InputLabel, InputLabelHelp, type InputLabelHelpProps, type InputLabelProps, Likert, type LikertProps, Link, type LinkProps, Loader, type LoaderProps, Logo, LoopsAiButton, type LoopsAiButtonProps, Markdown, MenuButton, type MenuButtonProps, Navigation, type NavigationProps, type NavigationSizing, Nudge, type NudgeProps, NumberField, type NumberFieldProps, Pill, type PillProps, Popper, type PopperProps, Portal, type PortalProps, PoweredByWatermarkLogo, Progress, type ProgressProps, ProjectItem, type ProjectItemProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rank, type RankProps, RichTextField, type RichTextFieldProps, SectionHeader, type SectionHeaderProps, Select, type SelectProps, type SemanticColor, Slider, type SliderProps, SortableList, type SortableListProps, StarRating, type StarRatingProps, Surface, type SurfaceProps, Switch, type SwitchProps, TextBarDivider, type TextBarDividerProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeProvider, Toast, type ToastProps, Tooltip, type TooltipProps, Typography, type TypographyProps, UserMenu, type UserMenuProps, backgroundCreator, base, blue, blueRamp, boxShadow, breakpoints, chooseArticle, darkNeutral, darkNeutralAlpha, defaultInputValidation, easing, elevation, elevationFilter, emailValidation, fonts, generateRamp, green, greenRamp, iconSizeMap, margin, neutral, neutralAlpha, neutralRamp, padding, passwordValidation, peach, peachRamp, purple, purpleRamp, radius, red, redRamp, semantic, space, useDropdownMenu, yellow, yellowRamp };
|