@useloops/design-system 1.4.74 → 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 +67 -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;
|
|
@@ -583,8 +616,6 @@ interface SwitchProps extends SwitchProps$1 {
|
|
|
583
616
|
}
|
|
584
617
|
declare const Switch: _emotion_styled.StyledComponent<SwitchProps & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
|
|
585
618
|
|
|
586
|
-
type InputFieldBaseProps = TextFieldProps$1;
|
|
587
|
-
|
|
588
619
|
type TextareaProps = InputFieldBaseProps & {
|
|
589
620
|
startAdornment?: ReactElement;
|
|
590
621
|
endAdornment?: ReactElement;
|
|
@@ -630,28 +661,6 @@ interface TooltipProps extends PropsWithChildren {
|
|
|
630
661
|
}
|
|
631
662
|
declare const Tooltip: FunctionComponent<TooltipProps>;
|
|
632
663
|
|
|
633
|
-
interface DropdownMenuItemProps {
|
|
634
|
-
icon?: ReactElement;
|
|
635
|
-
label: string;
|
|
636
|
-
onClick: () => void;
|
|
637
|
-
menuItemProps?: MenuItemProps;
|
|
638
|
-
}
|
|
639
|
-
interface DropdownMenuProps extends MenuProps {
|
|
640
|
-
open: boolean;
|
|
641
|
-
anchorEl: HTMLElement | null;
|
|
642
|
-
handleClose: () => void;
|
|
643
|
-
handleClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
644
|
-
items?: DropdownMenuItemProps[];
|
|
645
|
-
}
|
|
646
|
-
declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
|
|
647
|
-
|
|
648
|
-
declare const useDropdownMenu: () => {
|
|
649
|
-
open: boolean;
|
|
650
|
-
handleClick: (event: react__default.MouseEvent<HTMLButtonElement>) => void;
|
|
651
|
-
handleClose: () => void;
|
|
652
|
-
anchorEl: HTMLElement | null;
|
|
653
|
-
};
|
|
654
|
-
|
|
655
664
|
interface BackgroundOptions {
|
|
656
665
|
texture?: 'none' | 'noise1';
|
|
657
666
|
gradient?: 'tone1' | 'tone2' | 'tone3' | 'tone4';
|
|
@@ -696,7 +705,7 @@ type DifferentialType = BaseField & DifferentialProps;
|
|
|
696
705
|
type LikertType = BaseField & LikertProps;
|
|
697
706
|
type RadioGroupType = BaseField & RadioGroupProps;
|
|
698
707
|
type DragAndDropRankingType = BaseField & RankProps;
|
|
699
|
-
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';
|
|
700
709
|
type FieldType = DynamicFieldType | 'html';
|
|
701
710
|
type FieldTypes = CheckboxType | CheckboxGroupType | SelectType | TextFieldType | SliderType | DifferentialType | LikertType | RadioGroupType | DragAndDropRankingType;
|
|
702
711
|
interface BaseField {
|
|
@@ -1160,4 +1169,4 @@ declare module '@mui/system' {
|
|
|
1160
1169
|
}
|
|
1161
1170
|
}
|
|
1162
1171
|
|
|
1163
|
-
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 };
|