@useloops/design-system 1.4.73 → 1.4.75
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 +5 -5
- package/dist/index.d.ts +68 -58
- package/dist/index.js +5 -5
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ReactElement, FunctionComponent, ChangeEvent, PropsWithChildren, ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import * as _mui_material from '@mui/material';
|
|
4
|
-
import { AvatarGroupProps as AvatarGroupProps$1, SxProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ContainerProps, FormControlLabelProps as FormControlLabelProps$1, Theme, Breakpoint, IconButtonProps as IconButtonProps$1, ButtonGroupProps, LinkProps as LinkProps$1, SelectProps as SelectProps$1,
|
|
4
|
+
import { AvatarGroupProps as AvatarGroupProps$1, SxProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ContainerProps, MenuProps, MenuItemProps, FormControlLabelProps as FormControlLabelProps$1, Theme, Breakpoint, IconButtonProps as IconButtonProps$1, ButtonGroupProps, LinkProps as LinkProps$1, TextFieldProps as TextFieldProps$1, SelectProps as SelectProps$1, SelectChangeEvent, PaperProps, SwitchProps as SwitchProps$1, TypographyProps as TypographyProps$1, PaletteMode, Direction } from '@mui/material';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
7
6
|
import { Theme as Theme$1 } from '@mui/material/styles';
|
|
8
7
|
import * as _mui_system from '@mui/system';
|
|
9
8
|
import { SxProps as SxProps$1, Theme as Theme$2 } from '@mui/system';
|
|
9
|
+
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
10
10
|
import * as _emotion_styled from '@emotion/styled';
|
|
11
11
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
12
12
|
import { SubmitHandler } from 'react-hook-form';
|
|
@@ -287,39 +287,27 @@ interface DifferentialProps {
|
|
|
287
287
|
}
|
|
288
288
|
declare const Differential: FunctionComponent<DifferentialProps>;
|
|
289
289
|
|
|
290
|
-
interface
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
declare function SortableItem({ children, top, bottom, id }: PropsWithChildren<Props$1>): react_jsx_runtime.JSX.Element;
|
|
296
|
-
declare function DragHandle(): react_jsx_runtime.JSX.Element;
|
|
297
|
-
|
|
298
|
-
interface BaseItem {
|
|
299
|
-
id: UniqueIdentifier;
|
|
300
|
-
}
|
|
301
|
-
interface SortableListProps<T extends BaseItem> {
|
|
302
|
-
items: T[];
|
|
303
|
-
onChange(items: T[]): void;
|
|
304
|
-
renderItem(item: T, isOverlay?: boolean, isDragActive?: boolean): ReactNode;
|
|
305
|
-
disabled?: boolean;
|
|
306
|
-
direction?: 'horizontal' | 'vertical';
|
|
290
|
+
interface DropdownMenuItemProps {
|
|
291
|
+
icon?: ReactElement;
|
|
292
|
+
label: string;
|
|
293
|
+
onClick: () => void;
|
|
294
|
+
menuItemProps?: MenuItemProps;
|
|
307
295
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
296
|
+
interface DropdownMenuProps extends MenuProps {
|
|
297
|
+
open: boolean;
|
|
298
|
+
anchorEl: HTMLElement | null;
|
|
299
|
+
handleClose: () => void;
|
|
300
|
+
handleClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
301
|
+
items?: DropdownMenuItemProps[];
|
|
312
302
|
}
|
|
303
|
+
declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
|
|
313
304
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
value?: any[];
|
|
321
|
-
}
|
|
322
|
-
declare const Rank: FunctionComponent<RankProps>;
|
|
305
|
+
declare const useDropdownMenu: () => {
|
|
306
|
+
open: boolean;
|
|
307
|
+
handleClick: (event: react__default.MouseEvent<HTMLButtonElement>) => void;
|
|
308
|
+
handleClose: () => void;
|
|
309
|
+
anchorEl: HTMLElement | null;
|
|
310
|
+
};
|
|
323
311
|
|
|
324
312
|
interface FormControlLabelProps {
|
|
325
313
|
control: FormControlLabelProps$1['control'];
|
|
@@ -450,6 +438,17 @@ declare const Loader: FunctionComponent<LoaderProps>;
|
|
|
450
438
|
|
|
451
439
|
declare const Logo: FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
452
440
|
|
|
441
|
+
type InputFieldBaseProps = TextFieldProps$1;
|
|
442
|
+
|
|
443
|
+
type NumberFieldProps = InputFieldBaseProps & {
|
|
444
|
+
startAdornment?: ReactElement;
|
|
445
|
+
endAdornment?: ReactElement;
|
|
446
|
+
min?: number;
|
|
447
|
+
max?: number;
|
|
448
|
+
internalChange?: () => void;
|
|
449
|
+
};
|
|
450
|
+
declare const NumberField: FunctionComponent<NumberFieldProps>;
|
|
451
|
+
|
|
453
452
|
interface PillProps {
|
|
454
453
|
body: string;
|
|
455
454
|
variation?: 'default' | 'peach' | 'peachDark' | 'purple';
|
|
@@ -507,6 +506,40 @@ interface RadioGroupProps {
|
|
|
507
506
|
}
|
|
508
507
|
declare const RadioGroup: FunctionComponent<RadioGroupProps>;
|
|
509
508
|
|
|
509
|
+
interface Props$1 {
|
|
510
|
+
id: UniqueIdentifier;
|
|
511
|
+
top?: JSX.Element;
|
|
512
|
+
bottom?: JSX.Element;
|
|
513
|
+
}
|
|
514
|
+
declare function SortableItem({ children, top, bottom, id }: PropsWithChildren<Props$1>): react_jsx_runtime.JSX.Element;
|
|
515
|
+
declare function DragHandle(): react_jsx_runtime.JSX.Element;
|
|
516
|
+
|
|
517
|
+
interface BaseItem {
|
|
518
|
+
id: UniqueIdentifier;
|
|
519
|
+
}
|
|
520
|
+
interface SortableListProps<T extends BaseItem> {
|
|
521
|
+
items: T[];
|
|
522
|
+
onChange(items: T[]): void;
|
|
523
|
+
renderItem(item: T, isOverlay?: boolean, isDragActive?: boolean): ReactNode;
|
|
524
|
+
disabled?: boolean;
|
|
525
|
+
direction?: 'horizontal' | 'vertical';
|
|
526
|
+
}
|
|
527
|
+
declare function SortableList<T extends BaseItem>({ items, onChange, renderItem, disabled, direction }: SortableListProps<T>): react_jsx_runtime.JSX.Element | undefined;
|
|
528
|
+
declare namespace SortableList {
|
|
529
|
+
var Item: typeof SortableItem;
|
|
530
|
+
var DragHandle: typeof DragHandle;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
interface RankProps extends Omit<SortableListProps<any>, 'renderItem'> {
|
|
534
|
+
labelTop: string;
|
|
535
|
+
labelBottom: string;
|
|
536
|
+
fullWidth?: boolean;
|
|
537
|
+
options: any[];
|
|
538
|
+
internalChange?: () => void;
|
|
539
|
+
value?: any[];
|
|
540
|
+
}
|
|
541
|
+
declare const Rank: FunctionComponent<RankProps>;
|
|
542
|
+
|
|
510
543
|
type SelectOption = {
|
|
511
544
|
label: string;
|
|
512
545
|
value: string;
|
|
@@ -537,6 +570,7 @@ type SelectProps = {
|
|
|
537
570
|
sizing?: 'xs' | 'md' | 'lg';
|
|
538
571
|
sx?: SelectProps$1['sx'];
|
|
539
572
|
value?: SelectProps$1['value'];
|
|
573
|
+
renderListItem?: (label: string) => ReactElement;
|
|
540
574
|
};
|
|
541
575
|
declare const Select: FunctionComponent<SelectProps>;
|
|
542
576
|
|
|
@@ -582,8 +616,6 @@ interface SwitchProps extends SwitchProps$1 {
|
|
|
582
616
|
}
|
|
583
617
|
declare const Switch: _emotion_styled.StyledComponent<SwitchProps & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
|
|
584
618
|
|
|
585
|
-
type InputFieldBaseProps = TextFieldProps$1;
|
|
586
|
-
|
|
587
619
|
type TextareaProps = InputFieldBaseProps & {
|
|
588
620
|
startAdornment?: ReactElement;
|
|
589
621
|
endAdornment?: ReactElement;
|
|
@@ -629,28 +661,6 @@ interface TooltipProps extends PropsWithChildren {
|
|
|
629
661
|
}
|
|
630
662
|
declare const Tooltip: FunctionComponent<TooltipProps>;
|
|
631
663
|
|
|
632
|
-
interface DropdownMenuItemProps {
|
|
633
|
-
icon?: ReactElement;
|
|
634
|
-
label: string;
|
|
635
|
-
onClick: () => void;
|
|
636
|
-
menuItemProps?: MenuItemProps;
|
|
637
|
-
}
|
|
638
|
-
interface DropdownMenuProps extends MenuProps {
|
|
639
|
-
open: boolean;
|
|
640
|
-
anchorEl: HTMLElement | null;
|
|
641
|
-
handleClose: () => void;
|
|
642
|
-
handleClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
643
|
-
items?: DropdownMenuItemProps[];
|
|
644
|
-
}
|
|
645
|
-
declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
|
|
646
|
-
|
|
647
|
-
declare const useDropdownMenu: () => {
|
|
648
|
-
open: boolean;
|
|
649
|
-
handleClick: (event: react__default.MouseEvent<HTMLButtonElement>) => void;
|
|
650
|
-
handleClose: () => void;
|
|
651
|
-
anchorEl: HTMLElement | null;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
664
|
interface BackgroundOptions {
|
|
655
665
|
texture?: 'none' | 'noise1';
|
|
656
666
|
gradient?: 'tone1' | 'tone2' | 'tone3' | 'tone4';
|
|
@@ -695,7 +705,7 @@ type DifferentialType = BaseField & DifferentialProps;
|
|
|
695
705
|
type LikertType = BaseField & LikertProps;
|
|
696
706
|
type RadioGroupType = BaseField & RadioGroupProps;
|
|
697
707
|
type DragAndDropRankingType = BaseField & RankProps;
|
|
698
|
-
type DynamicFieldType = 'textfield' | 'textarea' | 'select' | 'checkbox' | 'checkboxGroup' | 'slider' | 'differential' | 'likert' | 'starRating' | 'radioGroup' | 'ranking';
|
|
708
|
+
type DynamicFieldType = 'textfield' | 'numberfield' | 'textarea' | 'select' | 'checkbox' | 'checkboxGroup' | 'slider' | 'differential' | 'likert' | 'starRating' | 'radioGroup' | 'ranking';
|
|
699
709
|
type FieldType = DynamicFieldType | 'html';
|
|
700
710
|
type FieldTypes = CheckboxType | CheckboxGroupType | SelectType | TextFieldType | SliderType | DifferentialType | LikertType | RadioGroupType | DragAndDropRankingType;
|
|
701
711
|
interface BaseField {
|
|
@@ -1159,4 +1169,4 @@ declare module '@mui/system' {
|
|
|
1159
1169
|
}
|
|
1160
1170
|
}
|
|
1161
1171
|
|
|
1162
|
-
export { AnnualController, type AnnualControllerProps, AuthContainerSurface, type AuthContainerSurfaceProps, AuthFormHeader, type AuthFormHeaderProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, CheckboxGroup as CheckBoxGroup, Checkbox, type CheckboxGroupProps, type CheckboxProps, ColorBackgroundContainer, type ColorBackgroundContainerProps, DEFAULT_MAX_INPUT_LENGTH, Differential, type DifferentialProps, DropdownMenu, type FieldType, type FieldTypes, FormControlLabel, FormGenerator, type FormGeneratorConfig, type FormGeneratorHandler, GridOverlay, type GridOverlayProps, Icon, IconButton, IconButtonGroup, InputLabel, InputLabelHelp, type InputLabelHelpProps, type InputLabelProps, Likert, type LikertProps, Link, type LinkProps, Loader, type LoaderProps, Logo, Pill, type PillProps, PlanFeatureTable, type PlanFeatureTableProps, PlanTierCard, type PlanTierCardProps, PlanTierCardScale, type PlanTierCardScaleProps, Portal, type PortalProps, PoweredByWatermarkLogo, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rank, type RankProps, Select, type SelectProps, Slider, type SliderProps, SortableList, type SortableListProps, StarRating, type StarRatingProps, Surface, type SurfaceProps, Switch, type SwitchProps, Textarea as TextArea, TextBarDivider, type TextBarDividerProps, TextField, type TextFieldProps, type TextareaProps, ThemeProvider, TickGroup, type TickGroupProps, Toast, type ToastProps, Tooltip, type TooltipProps, Typography, type TypographyProps, backgroundCreator, chooseArticle, defaultInputValidation, emailValidation, passwordValidation, useDropdownMenu };
|
|
1172
|
+
export { AnnualController, type AnnualControllerProps, AuthContainerSurface, type AuthContainerSurfaceProps, AuthFormHeader, type AuthFormHeaderProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, CheckboxGroup as CheckBoxGroup, Checkbox, type CheckboxGroupProps, type CheckboxProps, ColorBackgroundContainer, type ColorBackgroundContainerProps, DEFAULT_MAX_INPUT_LENGTH, Differential, type DifferentialProps, DropdownMenu, type FieldType, type FieldTypes, FormControlLabel, FormGenerator, type FormGeneratorConfig, type FormGeneratorHandler, GridOverlay, type GridOverlayProps, Icon, IconButton, IconButtonGroup, InputLabel, InputLabelHelp, type InputLabelHelpProps, type InputLabelProps, Likert, type LikertProps, Link, type LinkProps, Loader, type LoaderProps, Logo, NumberField, type NumberFieldProps, Pill, type PillProps, PlanFeatureTable, type PlanFeatureTableProps, PlanTierCard, type PlanTierCardProps, PlanTierCardScale, type PlanTierCardScaleProps, Portal, type PortalProps, PoweredByWatermarkLogo, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rank, type RankProps, Select, type SelectProps, Slider, type SliderProps, SortableList, type SortableListProps, StarRating, type StarRatingProps, Surface, type SurfaceProps, Switch, type SwitchProps, Textarea as TextArea, TextBarDivider, type TextBarDividerProps, TextField, type TextFieldProps, type TextareaProps, ThemeProvider, TickGroup, type TickGroupProps, Toast, type ToastProps, Tooltip, type TooltipProps, Typography, type TypographyProps, backgroundCreator, chooseArticle, defaultInputValidation, emailValidation, passwordValidation, useDropdownMenu };
|