@televet/kibble-ui 1.12.7 → 1.12.8

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,2 +1,2 @@
1
- import { ButtonProps } from '../../Forms';
1
+ import { ButtonProps } from '../../../../Forms';
2
2
  export declare const ModalCloseButton: ({ right, left, size, ...rest }: ButtonProps) => JSX.Element;
@@ -2,9 +2,10 @@ import { ModalFooterProps as ChakraModalFooterProps } from '@chakra-ui/react';
2
2
  export interface ModalFooterButtonProps extends ChakraModalFooterProps {
3
3
  submitText?: string;
4
4
  isLoading?: boolean;
5
+ isDisabled?: boolean;
5
6
  isDestructive?: boolean;
6
7
  onSubmit?: () => void;
7
8
  allowCancel?: boolean;
8
9
  onCancel?: () => void;
9
10
  }
10
- export declare const ModalFooterButtons: ({ submitText, isLoading, isDestructive, 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,5 +1,5 @@
1
1
  import { ModalHeaderProps as ChakraModalHeaderProps } from '@chakra-ui/react';
2
- import { HeadingSize } from '../../Typography';
2
+ import { HeadingSize } from '../../../../Typography';
3
3
  export interface ModalHeaderProps extends ChakraModalHeaderProps {
4
4
  size?: HeadingSize;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  export * from './modal.types';
2
2
  export * as BetaModal from './modal.component';
3
- export * from './modalHeader.component';
4
- export * from './modalCloseButton.component';
5
- export * from './modalBody.component';
6
- export * from './modalFooter.component';
7
- export * from './modalFooterButtons.component';
3
+ export * from './components/ModalHeader/modalHeader.component';
4
+ export * from './components/ModalCloseButton/modalCloseButton.component';
5
+ export * from './components/ModalBody/modalBody.component';
6
+ export * from './components/ModalFooter/modalFooter.component';
7
+ export * from './components/ModalFooterButtons/modalFooterButtons.component';
package/build/index.js CHANGED
@@ -6835,7 +6835,7 @@ var ModalFooter = function (_a) {
6835
6835
  };
6836
6836
 
6837
6837
  var ModalFooterButtons = function (_a) {
6838
- var _b = _a.submitText, submitText = _b === void 0 ? 'Submit' : _b, isLoading = _a.isLoading, isDestructive = _a.isDestructive; _a.children; var onSubmit = _a.onSubmit, _c = _a.allowCancel, allowCancel = _c === void 0 ? true : _c, onCancel = _a.onCancel, rest = __rest(_a, ["submitText", "isLoading", "isDestructive", "children", "onSubmit", "allowCancel", "onCancel"]);
6838
+ var _b = _a.submitText, submitText = _b === void 0 ? 'Submit' : _b, isLoading = _a.isLoading, isDisabled = _a.isDisabled, isDestructive = _a.isDestructive; _a.children; var onSubmit = _a.onSubmit, _c = _a.allowCancel, allowCancel = _c === void 0 ? true : _c, onCancel = _a.onCancel, rest = __rest(_a, ["submitText", "isLoading", "isDisabled", "isDestructive", "children", "onSubmit", "allowCancel", "onCancel"]);
6839
6839
  var onClose = react.useModalContext().onClose;
6840
6840
  var handleCancel = function () {
6841
6841
  if (onCancel) {
@@ -6847,7 +6847,7 @@ var ModalFooterButtons = function (_a) {
6847
6847
  React__default["default"].createElement(react.Flex, { w: "100%" },
6848
6848
  allowCancel && (React__default["default"].createElement(Button, { variant: "tertiary", onClick: handleCancel }, "Cancel")),
6849
6849
  React__default["default"].createElement(react.Spacer, null),
6850
- React__default["default"].createElement(Button, { onClick: onSubmit, isLoading: isLoading, variant: isDestructive ? 'primaryDestructive' : 'primary' }, submitText))));
6850
+ React__default["default"].createElement(Button, { onClick: onSubmit, isLoading: isLoading, isDisabled: isDisabled, variant: isDestructive ? 'primaryDestructive' : 'primary' }, submitText))));
6851
6851
  };
6852
6852
 
6853
6853
  // @ts-ignore