@dust-tt/sparkle 0.2.94-pr → 0.2.94

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.
@@ -56,8 +56,6 @@ import Spinner from "./components/Spinner";
56
56
  export { Spinner };
57
57
  import { Modal } from "./components/Modal";
58
58
  export { Modal };
59
- import { ElementModal } from "./components/ElementModal";
60
- export { ElementModal };
61
59
  import { Dialog } from "./components/Dialog";
62
60
  export { Dialog };
63
61
  import { Input } from "./components/Input";
@@ -5,7 +5,7 @@ export declare enum ModalType {
5
5
  FullScreen = "full-screen",
6
6
  Side = "side"
7
7
  }
8
- export type ModalProps = {
8
+ type ModalProps = {
9
9
  isOpen: boolean;
10
10
  onClose: () => void;
11
11
  action?: ButtonProps;
@@ -19,3 +19,4 @@ export type ModalProps = {
19
19
  variant?: "full-screen" | "side-sm" | "side-md" | "dialogue";
20
20
  };
21
21
  export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, saveLabel, isSaving, savingLabel, title, variant, }: ModalProps): React.JSX.Element;
22
+ export {};
package/dist/cjs/index.js CHANGED
@@ -33613,19 +33613,6 @@ function Modal(_a) {
33613
33613
  React.createElement("div", { className: classNames("s-pb-6 s-pt-16", innerContainerClasses) }, children)))))));
33614
33614
  }
33615
33615
 
33616
- function ElementModal(_a) {
33617
- var openOnElement = _a.openOnElement, onClose = _a.onClose, onSave = _a.onSave, props = __rest(_a, ["openOnElement", "onClose", "onSave"]);
33618
- var _b = __read(React.useState(false), 2), isClosingTransition = _b[0], setIsClosingTransition = _b[1];
33619
- var transitionOnClose = React.useCallback(function () {
33620
- setIsClosingTransition(true);
33621
- setTimeout(function () {
33622
- onClose();
33623
- setIsClosingTransition(false);
33624
- }, 200);
33625
- }, [onClose]);
33626
- return (React.createElement(Modal, __assign({ isOpen: openOnElement !== null && !isClosingTransition, onClose: transitionOnClose, onSave: onSave ? function () { return onSave(transitionOnClose); } : undefined }, props)));
33627
- }
33628
-
33629
33616
  function Dialog(_a) {
33630
33617
  var isOpen = _a.isOpen, children = _a.children, onCancel = _a.onCancel, onValidate = _a.onValidate, _b = _a.cancelLabel, cancelLabel = _b === void 0 ? "Cancel" : _b, _c = _a.validateLabel, validateLabel = _c === void 0 ? "Ok" : _c, _d = _a.validateVariant, validateVariant = _d === void 0 ? "primary" : _d, title = _a.title;
33631
33618
  return (React.createElement(tt, { show: isOpen, as: React.Fragment, appear: true },
@@ -33881,7 +33868,6 @@ exports.DriveLogo = SvgDrive;
33881
33868
  exports.DropdownMenu = DropdownMenu;
33882
33869
  exports.DustIcon = SvgDust$1;
33883
33870
  exports.DustStrokeIcon = SvgDust;
33884
- exports.ElementModal = ElementModal;
33885
33871
  exports.EmotionLaughIcon = SvgEmotionLaugh$1;
33886
33872
  exports.EmotionLaughStrokeIcon = SvgEmotionLaugh;
33887
33873
  exports.EqualizerIcon = SvgEqualizer$1;