@televet/kibble-ui 1.17.6-beta.43w39py.9 → 1.17.6

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.
@@ -1,24 +1,22 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  import { AlertProps as CAlertProps } from '@chakra-ui/react';
3
3
  import { IconProps } from 'components/MediaAndIcons';
4
4
  import { AlertVariant } from './alert.types';
5
5
  import { ButtonProps } from 'components/Forms/Button';
6
6
  import { TextProps } from 'components/Typography/Text';
7
7
  import { Status } from '../feedback.types';
8
- import { HeadingProps } from '../../Typography';
9
8
  export interface AlertProps extends CAlertProps {
10
- children?: ReactNode;
11
9
  status?: AlertVariant | Status;
12
10
  showIcon?: boolean;
13
11
  iconProps?: IconProps;
14
12
  showButton?: boolean;
15
13
  buttonProps?: ButtonProps;
16
14
  buttonTitle?: string;
17
- alertTitle?: string;
18
- titleProps?: HeadingProps;
15
+ alertTitle: string;
16
+ titleProps?: TextProps;
19
17
  description?: string;
20
18
  descriptionProps?: TextProps;
21
19
  showCloseButton?: boolean;
22
20
  onClose?: React.MouseEventHandler<HTMLButtonElement>;
23
21
  }
24
- export declare const Alert: ({ children, status, showIcon, iconProps, showButton, buttonProps, buttonTitle, alertTitle, titleProps, description, descriptionProps, showCloseButton, onClose, ...rest }: AlertProps) => JSX.Element;
22
+ export declare const Alert: ({ status, showIcon, iconProps, showButton, buttonProps, buttonTitle, alertTitle, titleProps, description, descriptionProps, showCloseButton, onClose, ...rest }: AlertProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { AlertButtonAlignment } from '../../alert.types';
2
+ import { ButtonProps } from 'components/Forms/Button';
3
+ export interface AlertButtonProps extends ButtonProps {
4
+ alignment: AlertButtonAlignment;
5
+ pairedWithCloseButton?: boolean;
6
+ }
7
+ export declare const AlertButton: ({ alignment, variant, size, pairedWithCloseButton, ...rest }: AlertButtonProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { AlertVariant } from '../../alert.types';
2
+ import { IconProps } from 'components/MediaAndIcons/Icon';
3
+ import { Status } from '../../../feedback.types';
4
+ export interface AlertIconProps extends IconProps {
5
+ status: AlertVariant | Status;
6
+ }
7
+ export declare const AlertIcon: ({ status, ...rest }: AlertIconProps) => JSX.Element;
@@ -1,4 +1,6 @@
1
1
  export { Alert as CAlert } from '@chakra-ui/react';
2
+ export * from './components/AlertButton/alertButton.component';
3
+ export * from './components/AlertIcon/alertIcon.component';
2
4
  export * from './alert.component';
3
5
  export * from './alert.types';
4
6
  export * from './alert.config';
@@ -1,5 +1,3 @@
1
1
  export * from './Alert';
2
2
  export * from './Toast';
3
3
  export * from './Spinner';
4
- export * from './feedback.types';
5
- export * from './feedback.model';
@@ -1,8 +1,8 @@
1
1
  import { AdaptiveColorMap } from '../../../theme/tokens';
2
2
  export interface ButtonVariantConfigType extends AdaptiveColorMap<ButtonColorOptionsType> {
3
- variant: 'solid' | 'outline' | 'ghost' | 'link';
3
+ variant: 'solid' | 'outline' | 'ghost';
4
4
  }
5
- export declare type ButtonVariantType = 'primary' | 'primaryDestructive' | 'secondary' | 'secondaryDestructive' | 'secondarySubtle' | 'secondarySubtleDestructive' | 'tertiary' | 'tertiaryDestructive' | 'ghost' | 'ghostNeutral' | 'ghostDestructive' | 'link';
5
+ export declare type ButtonVariantType = 'primary' | 'primaryDestructive' | 'secondary' | 'secondaryDestructive' | 'secondarySubtle' | 'secondarySubtleDestructive' | 'tertiary' | 'tertiaryDestructive' | 'ghost' | 'ghostNeutral' | 'ghostDestructive';
6
6
  export declare type ButtonColorOptionsType = 'content' | 'default' | 'hover' | 'active' | 'border';
7
7
  export declare type ButtonSizeType = 'xs' | 'sm' | 'md' | 'lg';
8
8
  export declare type ButtonStyleType = Record<ButtonVariantType, ButtonVariantConfigType>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Dict } from 'shared/types';
3
- import { FormControlSize, HelperTextAlignment } from './formControl.types';
3
+ import { HelperTextAlignment } from './formControl.types';
4
4
  export interface WithFormControlProps {
5
5
  errorText?: string;
6
6
  helperText?: string;
@@ -9,10 +9,9 @@ export interface WithFormControlProps {
9
9
  isInvalid?: boolean;
10
10
  isReadOnly?: boolean;
11
11
  isRequired?: boolean;
12
- label?: string;
12
+ label?: React.ReactNode;
13
13
  labelStyle?: Dict;
14
14
  formControlStyle?: Dict;
15
15
  helperTextAlignment?: HelperTextAlignment;
16
- size?: FormControlSize;
17
16
  }
18
17
  export declare function withFormControl<P extends WithFormControlProps>(Component: React.ComponentType<P>): React.FC<P>;
@@ -3,10 +3,8 @@ import { SelectProps as CSelectProps } from '@chakra-ui/react';
3
3
  import { WithFormControlProps } from '../FormControl/formControl.component';
4
4
  import { SelectOptionProps } from 'components/Forms/Select/select.types';
5
5
  import { SelectListProps } from './components/SelectList/selectList.component';
6
- import { FormControlSize } from '../FormControl/formControl.types';
7
6
  export interface SelectBaseProps extends WithFormControlProps, CSelectProps {
8
7
  options: SelectOptionProps[];
9
- size?: FormControlSize;
10
8
  }
11
9
  export interface BrowserDefaultSelectProps extends SelectBaseProps {
12
10
  defaultLeftElement?: never;
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
2
  import { SwitchProps as CSwitchProps } from '@chakra-ui/react';
3
3
  import { WithFormControlProps } from '../FormControl/formControl.component';
4
- import { FormControlSize } from '../FormControl/formControl.types';
5
4
  export interface SwitchProps extends WithFormControlProps, CSwitchProps {
6
5
  isFieldInline?: boolean;
7
6
  isIndeterminate?: boolean;
8
- size?: FormControlSize;
9
7
  }
10
8
  declare const WrappedSwitch: React.FC<SwitchProps>;
11
9
  export { WrappedSwitch as Switch };
@@ -1,10 +1,8 @@
1
1
  import React, { ForwardedRef } from 'react';
2
2
  import { TextareaProps as CTextareaProps } from '@chakra-ui/react';
3
3
  import { WithFormControlProps } from '../FormControl/formControl.component';
4
- import { FormControlSize } from '../FormControl/formControl.types';
5
4
  export interface TextareaProps extends WithFormControlProps, CTextareaProps {
6
5
  textareaRef?: ForwardedRef<HTMLTextAreaElement>;
7
- size?: FormControlSize;
8
6
  }
9
7
  declare const WrappedTextArea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
10
8
  export { WrappedTextArea as Textarea };
@@ -1,13 +1,11 @@
1
1
  import { ModalFooterProps as ChakraModalFooterProps } from '@chakra-ui/react';
2
2
  export interface ModalFooterButtonProps extends ChakraModalFooterProps {
3
- mixpanelName?: string;
4
3
  submitText?: string;
5
4
  isLoading?: boolean;
6
- loadingText?: string;
7
5
  isDisabled?: boolean;
8
6
  isDestructive?: boolean;
9
7
  onSubmit?: () => void;
10
8
  allowCancel?: boolean;
11
9
  onCancel?: () => void;
12
10
  }
13
- export declare const ModalFooterButtons: ({ submitText, isLoading, loadingText, isDisabled, isDestructive, mixpanelName, children, onSubmit, allowCancel, onCancel, ...rest }: ModalFooterButtonProps) => JSX.Element;
11
+ export declare const ModalFooterButtons: ({ submitText, isLoading, isDisabled, isDestructive, children, onSubmit, allowCancel, onCancel, ...rest }: ModalFooterButtonProps) => JSX.Element;
@@ -1,6 +1,5 @@
1
1
  export * from './modal.types';
2
2
  export * as BetaModal from './modal.component';
3
- export * from './modal.component';
4
3
  export * from './components/ModalHeader/modalHeader.component';
5
4
  export * from './components/ModalCloseButton/modalCloseButton.component';
6
5
  export * from './components/ModalBody/modalBody.component';
@@ -1,4 +1,2 @@
1
1
  export * from './useTheme';
2
2
  export * from './useDisclosure';
3
- export * from './useAdaptiveColor';
4
- export * from './useAdaptiveColorMap';