@useloops/design-system 1.4.117 → 1.4.119

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,5 +1,4 @@
1
- import * as react from 'react';
2
- import react__default, { ReactElement, FunctionComponent, ChangeEvent, PropsWithChildren, ReactNode, Dispatch, SetStateAction } from 'react';
1
+ import react, { ReactElement, FunctionComponent, ChangeEvent, PropsWithChildren, ReactNode, FC, Dispatch, SetStateAction } from 'react';
3
2
  import * as _mui_material from '@mui/material';
4
3
  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, SelectProps as SelectProps$1, SelectChangeEvent, TextFieldProps as TextFieldProps$1, PaperProps, SwitchProps as SwitchProps$1, TypographyProps as TypographyProps$1, PaletteMode, Direction } from '@mui/material';
5
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -10,8 +9,8 @@ import { NumericFormatProps } from 'react-number-format';
10
9
  import { InputFieldBaseProps as InputFieldBaseProps$1 } from 'WebCore/InputFieldBase';
11
10
  import { UniqueIdentifier } from '@dnd-kit/core';
12
11
  import * as _emotion_styled from '@emotion/styled';
13
- import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
14
12
  import { SubmitHandler } from 'react-hook-form';
13
+ import { CustomFieldProps as CustomFieldProps$1 } from 'WebCore/CustomField';
15
14
 
16
15
  interface ColorRange {
17
16
  0: string;
@@ -278,6 +277,19 @@ interface ColorBackgroundContainerProps {
278
277
  }
279
278
  declare const ColorBackgroundContainer: FunctionComponent<ColorBackgroundContainerProps>;
280
279
 
280
+ type CustomFieldProps = {
281
+ inputField: react.FC<{
282
+ onChange: (data: unknown) => void;
283
+ }>;
284
+ onChange?: (data: unknown) => void;
285
+ defaultValue?: unknown;
286
+ value?: unknown;
287
+ placeholder?: string;
288
+ transformValue?: (value?: unknown) => void;
289
+ internalChange?: () => void;
290
+ };
291
+ declare const CustomField: FunctionComponent<CustomFieldProps>;
292
+
281
293
  interface DifferentialProps {
282
294
  labelLeft: string;
283
295
  labelRight: string;
@@ -306,7 +318,7 @@ declare const DropdownMenu: FunctionComponent<DropdownMenuProps>;
306
318
 
307
319
  declare const useDropdownMenu: () => {
308
320
  open: boolean;
309
- handleClick: (event: react__default.MouseEvent<HTMLButtonElement>) => void;
321
+ handleClick: (event: react.MouseEvent<HTMLButtonElement>) => void;
310
322
  handleClose: () => void;
311
323
  anchorEl: HTMLElement | null;
312
324
  };
@@ -633,13 +645,16 @@ interface StarRatingProps {
633
645
  }
634
646
  declare const StarRating: FunctionComponent<StarRatingProps>;
635
647
 
636
- interface SurfaceProps extends PaperProps {
637
- variation: 'default' | 'sunken' | 'raised' | 'overlay';
638
- borderradius?: GenericSizeMap;
648
+ type SurfaceVariation = 'default' | 'sunken' | 'raised' | 'overlay';
649
+ type BorderRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
650
+
651
+ interface SurfaceProps extends PropsWithChildren {
652
+ variation?: SurfaceVariation;
653
+ borderradius?: BorderRadius;
654
+ sx?: SxProps<Theme>;
655
+ ref?: PaperProps['ref'];
639
656
  }
640
- declare const Surface: _emotion_styled.StyledComponent<_mui_material.PaperOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
641
- ref?: ((instance: HTMLDivElement | null) => void | react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof react.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | react.RefObject<HTMLDivElement> | null | undefined;
642
- }, "sx" | "className" | "style" | "classes" | "children" | "elevation" | "square" | "variant"> & _mui_system.MUIStyledCommonProps<Theme> & SurfaceProps, {}, {}>;
657
+ declare const Surface: FC<SurfaceProps>;
643
658
 
644
659
  interface SwitchProps extends SwitchProps$1 {
645
660
  }
@@ -779,9 +794,13 @@ type HTMLType = {
779
794
  content: HtmlProps['children'];
780
795
  defaultValue?: never;
781
796
  } & BaseField;
782
- type DynamicFieldType = 'textfield' | 'numberfield' | 'textarea' | 'select' | 'checkbox' | 'checkboxGroup' | 'slider' | 'differential' | 'likert' | 'starRating' | 'radioGroup' | 'ranking' | 'richTextfield';
797
+ type CustomFieldType = {
798
+ fieldType: 'customfield';
799
+ defaultValue?: CustomFieldProps$1['value'];
800
+ } & BaseField & CustomFieldProps$1;
801
+ type DynamicFieldType = 'textfield' | 'numberfield' | 'textarea' | 'select' | 'checkbox' | 'checkboxGroup' | 'slider' | 'differential' | 'likert' | 'starRating' | 'radioGroup' | 'ranking' | 'richTextfield' | 'customfield';
783
802
  type FieldType = DynamicFieldType | 'html';
784
- type FieldTypes = CheckboxType | CheckboxGroupType | TextareaType | SelectType | TextFieldType | SliderType | DifferentialType | RichTextFieldType | LikertType | RadioGroupType | DragAndDropRankingType | NumberFieldType | StarRatingType | HTMLType;
803
+ type FieldTypes = CheckboxType | CheckboxGroupType | TextareaType | SelectType | TextFieldType | SliderType | DifferentialType | RichTextFieldType | LikertType | RadioGroupType | DragAndDropRankingType | NumberFieldType | StarRatingType | HTMLType | CustomFieldType;
785
804
  interface BaseField {
786
805
  name: string;
787
806
  ref?: any;
@@ -836,6 +855,7 @@ declare const passwordValidation: (min?: number) => {
836
855
 
837
856
  interface AuthContainerSurfaceProps extends SurfaceProps {
838
857
  headContent?: ReactNode;
858
+ sx?: SxProps<Theme>;
839
859
  }
840
860
  declare const AuthContainerSurface: FunctionComponent<AuthContainerSurfaceProps>;
841
861
 
@@ -1241,4 +1261,4 @@ declare module '@mui/system' {
1241
1261
  }
1242
1262
  }
1243
1263
 
1244
- 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, Html, type HtmlProps, 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 };
1264
+ 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, CustomField, type CustomFieldProps, DEFAULT_MAX_INPUT_LENGTH, Differential, type DifferentialProps, DropdownMenu, type FieldType, type FieldTypes, FormControlLabel, FormGenerator, type FormGeneratorConfig, type FormGeneratorHandler, GridOverlay, type GridOverlayProps, Html, type HtmlProps, 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 };