@useloops/design-system 1.4.36 → 1.4.40

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,12 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import { 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, CheckboxProps as CheckboxProps$1, FormControlLabelProps as FormControlLabelProps$1, Theme, Breakpoint, ButtonGroupProps, LinkProps as LinkProps$1, MenuItemProps, SelectProps as SelectProps$1, PaperProps, SwitchProps as SwitchProps$1, TextFieldProps as TextFieldProps$1, TypographyProps as TypographyProps$1, PaletteMode, Direction } 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, MenuItemProps, SelectProps as SelectProps$1, PaperProps, SwitchProps as SwitchProps$1, TextFieldProps as TextFieldProps$1, TypographyProps as TypographyProps$1, PaletteMode, Direction } from '@mui/material';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { UniqueIdentifier } from '@dnd-kit/core';
7
7
  import { Theme as Theme$1 } from '@mui/material/styles';
8
- import * as _emotion_styled from '@emotion/styled';
9
8
  import * as _mui_system from '@mui/system';
9
+ import { SxProps as SxProps$1, Theme as Theme$2 } from '@mui/system';
10
+ import * as _emotion_styled from '@emotion/styled';
10
11
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
11
12
  import { SubmitHandler } from 'react-hook-form';
12
13
 
@@ -198,6 +199,11 @@ type GenericSizeMap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
198
199
 
199
200
  type ButtonSizing = Exclude<GenericSizeMap, 'none'>;
200
201
 
202
+ interface ButtonBaseProps extends ButtonProps$1 {
203
+ loading?: boolean;
204
+ sizing: any;
205
+ }
206
+
201
207
  interface ButtonProps {
202
208
  loading?: boolean;
203
209
  variation?: 'primary' | 'secondary' | 'outlined' | 'subtle';
@@ -209,8 +215,8 @@ interface ButtonProps {
209
215
  href?: string;
210
216
  endIcon?: ReactElement;
211
217
  startIcon?: ReactElement;
212
- children: ReactElement | string;
213
- onClick?: () => void;
218
+ children: ButtonBaseProps['children'];
219
+ onClick?: ButtonBaseProps['onClick'];
214
220
  type?: 'button' | 'submit' | 'reset';
215
221
  }
216
222
  declare const Button: FunctionComponent<ButtonProps>;
@@ -261,7 +267,7 @@ declare const CheckboxGroup: FunctionComponent<CheckboxGroupProps>;
261
267
 
262
268
  interface ColorBackgroundContainerProps {
263
269
  sx?: SxProps;
264
- children: ReactElement;
270
+ children: ContainerProps['children'];
265
271
  texture?: 'none' | 'noise1';
266
272
  gradient?: 'tone1' | 'tone2' | 'tone3' | 'tone4';
267
273
  }
@@ -344,15 +350,22 @@ type IconButtonSizing = 'lg' | 'md';
344
350
  type IconButtonShapeMap = 'default' | 'round';
345
351
  type IconButtonVariation = 'default' | 'toggle' | 'outlined' | 'raised';
346
352
 
353
+ interface StyledIconButtonProps extends IconButtonProps$1 {
354
+ variation?: IconButtonVariation;
355
+ shape?: IconButtonShapeMap;
356
+ sizing?: IconButtonSizing;
357
+ loading?: boolean;
358
+ }
359
+
347
360
  interface IconButtonProps {
348
361
  variation?: IconButtonVariation;
349
362
  shape?: IconButtonShapeMap;
350
363
  sizing?: IconButtonSizing;
351
364
  icon: ReactElement;
352
365
  loading?: boolean;
353
- edge?: 'start' | 'end';
354
- children?: ReactNode | string;
355
- onClick?: () => void;
366
+ edge?: 'start' | 'end' | false;
367
+ children?: StyledIconButtonProps['children'];
368
+ onClick?: StyledIconButtonProps['onClick'];
356
369
  disabled?: boolean;
357
370
  ref?: React.Ref<HTMLButtonElement>;
358
371
  id?: string;
@@ -410,7 +423,22 @@ interface LikertProps {
410
423
  }
411
424
  declare const Likert: FunctionComponent<LikertProps>;
412
425
 
413
- interface LinkProps extends LinkProps$1 {
426
+ interface StyledLinkProps extends LinkProps$1 {
427
+ disabled?: boolean | undefined;
428
+ }
429
+
430
+ interface LinkProps {
431
+ children: React.ReactNode;
432
+ href?: string;
433
+ target?: string;
434
+ onClick?: StyledLinkProps['onClick'];
435
+ disabled?: boolean;
436
+ sx?: SxProps$1<Theme$2>;
437
+ underline?: "none" | "hover" | "always" | undefined;
438
+ noWrap?: boolean;
439
+ component?: any;
440
+ rel?: any;
441
+ title?: string;
414
442
  }
415
443
  declare const Link: FunctionComponent<LinkProps>;
416
444