@useloops/design-system 1.4.74 → 1.4.76

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/index.d.ts CHANGED
@@ -1,15 +1,18 @@
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, MenuItemProps, SelectChangeEvent, PaperProps, SwitchProps as SwitchProps$1, TextFieldProps as TextFieldProps$1, TypographyProps as TypographyProps$1, MenuProps, PaletteMode, Direction } from '@mui/material';
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
+ import { InputFieldBaseProps as InputFieldBaseProps$1 } from 'WebCore/InputFieldBase';
10
11
  import * as _emotion_styled from '@emotion/styled';
11
12
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
13
+ import { NumberFieldProps as NumberFieldProps$1 } from 'WebCore/NumberField/NumberField';
12
14
  import { SubmitHandler } from 'react-hook-form';
15
+ import { RichTextFieldProps as RichTextFieldProps$1 } from 'systems/WebCore/RichTextField';
13
16
 
14
17
  interface ColorRange {
15
18
  0: string;
@@ -287,39 +290,27 @@ interface DifferentialProps {
287
290
  }
288
291
  declare const Differential: FunctionComponent<DifferentialProps>;
289
292
 
290
- interface Props$1 {
291
- id: UniqueIdentifier;
292
- top?: JSX.Element;
293
- bottom?: JSX.Element;
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';
293
+ interface DropdownMenuItemProps {
294
+ icon?: ReactElement;
295
+ label: string;
296
+ onClick: () => void;
297
+ menuItemProps?: MenuItemProps;
307
298
  }
308
- declare function SortableList<T extends BaseItem>({ items, onChange, renderItem, disabled, direction }: SortableListProps<T>): react_jsx_runtime.JSX.Element | undefined;
309
- declare namespace SortableList {
310
- var Item: typeof SortableItem;
311
- var DragHandle: typeof DragHandle;
299
+ interface DropdownMenuProps extends MenuProps {
300
+ open: boolean;
301
+ anchorEl: HTMLElement | null;
302
+ handleClose: () => void;
303
+ handleClick?: (event: React.MouseEvent<HTMLElement>) => void;
304
+ items?: DropdownMenuItemProps[];
312
305
  }
306
+ declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
313
307
 
314
- interface RankProps extends Omit<SortableListProps<any>, 'renderItem'> {
315
- labelTop: string;
316
- labelBottom: string;
317
- fullWidth?: boolean;
318
- options: any[];
319
- internalChange?: () => void;
320
- value?: any[];
321
- }
322
- declare const Rank: FunctionComponent<RankProps>;
308
+ declare const useDropdownMenu: () => {
309
+ open: boolean;
310
+ handleClick: (event: react__default.MouseEvent<HTMLButtonElement>) => void;
311
+ handleClose: () => void;
312
+ anchorEl: HTMLElement | null;
313
+ };
323
314
 
324
315
  interface FormControlLabelProps {
325
316
  control: FormControlLabelProps$1['control'];
@@ -450,6 +441,17 @@ declare const Loader: FunctionComponent<LoaderProps>;
450
441
 
451
442
  declare const Logo: FunctionComponent<React.SVGProps<SVGSVGElement>>;
452
443
 
444
+ type InputFieldBaseProps = TextFieldProps$1;
445
+
446
+ type NumberFieldProps = InputFieldBaseProps & {
447
+ startAdornment?: ReactElement;
448
+ endAdornment?: ReactElement;
449
+ min?: number;
450
+ max?: number;
451
+ internalChange?: () => void;
452
+ };
453
+ declare const NumberField: FunctionComponent<NumberFieldProps>;
454
+
453
455
  interface PillProps {
454
456
  body: string;
455
457
  variation?: 'default' | 'peach' | 'peachDark' | 'purple';
@@ -507,6 +509,48 @@ interface RadioGroupProps {
507
509
  }
508
510
  declare const RadioGroup: FunctionComponent<RadioGroupProps>;
509
511
 
512
+ interface Props$1 {
513
+ id: UniqueIdentifier;
514
+ top?: JSX.Element;
515
+ bottom?: JSX.Element;
516
+ }
517
+ declare function SortableItem({ children, top, bottom, id }: PropsWithChildren<Props$1>): react_jsx_runtime.JSX.Element;
518
+ declare function DragHandle(): react_jsx_runtime.JSX.Element;
519
+
520
+ interface BaseItem {
521
+ id: UniqueIdentifier;
522
+ }
523
+ interface SortableListProps<T extends BaseItem> {
524
+ items: T[];
525
+ onChange(items: T[]): void;
526
+ renderItem(item: T, isOverlay?: boolean, isDragActive?: boolean): ReactNode;
527
+ disabled?: boolean;
528
+ direction?: 'horizontal' | 'vertical';
529
+ }
530
+ declare function SortableList<T extends BaseItem>({ items, onChange, renderItem, disabled, direction }: SortableListProps<T>): react_jsx_runtime.JSX.Element | undefined;
531
+ declare namespace SortableList {
532
+ var Item: typeof SortableItem;
533
+ var DragHandle: typeof DragHandle;
534
+ }
535
+
536
+ interface RankProps extends Omit<SortableListProps<any>, 'renderItem'> {
537
+ labelTop: string;
538
+ labelBottom: string;
539
+ fullWidth?: boolean;
540
+ options: any[];
541
+ internalChange?: () => void;
542
+ value?: any[];
543
+ }
544
+ declare const Rank: FunctionComponent<RankProps>;
545
+
546
+ type RichTextFieldProps = InputFieldBaseProps$1 & {
547
+ internalChange?: () => void;
548
+ minHeight?: number;
549
+ minWidth?: number;
550
+ maxHeight?: number;
551
+ };
552
+ declare const RichTextField: FunctionComponent<RichTextFieldProps>;
553
+
510
554
  type SelectOption = {
511
555
  label: string;
512
556
  value: string;
@@ -583,8 +627,6 @@ interface SwitchProps extends SwitchProps$1 {
583
627
  }
584
628
  declare const Switch: _emotion_styled.StyledComponent<SwitchProps & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
585
629
 
586
- type InputFieldBaseProps = TextFieldProps$1;
587
-
588
630
  type TextareaProps = InputFieldBaseProps & {
589
631
  startAdornment?: ReactElement;
590
632
  endAdornment?: ReactElement;
@@ -630,28 +672,6 @@ interface TooltipProps extends PropsWithChildren {
630
672
  }
631
673
  declare const Tooltip: FunctionComponent<TooltipProps>;
632
674
 
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
675
  interface BackgroundOptions {
656
676
  texture?: 'none' | 'noise1';
657
677
  gradient?: 'tone1' | 'tone2' | 'tone3' | 'tone4';
@@ -688,6 +708,7 @@ interface FormGeneratorConfig {
688
708
  };
689
709
  }
690
710
  type TextFieldType = BaseField & TextFieldProps;
711
+ type NumberFieldType = BaseField & NumberFieldProps$1;
691
712
  type SelectType = BaseField & SelectProps;
692
713
  type CheckboxType = BaseField & CheckboxProps;
693
714
  type CheckboxGroupType = BaseField & CheckboxGroupProps;
@@ -696,9 +717,10 @@ type DifferentialType = BaseField & DifferentialProps;
696
717
  type LikertType = BaseField & LikertProps;
697
718
  type RadioGroupType = BaseField & RadioGroupProps;
698
719
  type DragAndDropRankingType = BaseField & RankProps;
699
- type DynamicFieldType = 'textfield' | 'textarea' | 'select' | 'checkbox' | 'checkboxGroup' | 'slider' | 'differential' | 'likert' | 'starRating' | 'radioGroup' | 'ranking';
720
+ type RichTextFieldType = BaseField & RichTextFieldProps$1;
721
+ type DynamicFieldType = 'textfield' | 'numberfield' | 'textarea' | 'select' | 'checkbox' | 'checkboxGroup' | 'slider' | 'differential' | 'likert' | 'starRating' | 'radioGroup' | 'ranking' | 'richTextfield';
700
722
  type FieldType = DynamicFieldType | 'html';
701
- type FieldTypes = CheckboxType | CheckboxGroupType | SelectType | TextFieldType | SliderType | DifferentialType | LikertType | RadioGroupType | DragAndDropRankingType;
723
+ type FieldTypes = CheckboxType | CheckboxGroupType | SelectType | TextFieldType | SliderType | DifferentialType | RichTextFieldType | LikertType | RadioGroupType | DragAndDropRankingType | NumberFieldType;
702
724
  interface BaseField {
703
725
  name: string;
704
726
  ref?: any;
@@ -1160,4 +1182,4 @@ declare module '@mui/system' {
1160
1182
  }
1161
1183
  }
1162
1184
 
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 };
1185
+ 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, RichTextField, type RichTextFieldProps, 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 };