@dust-tt/sparkle 0.2.91-pr → 0.2.91

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/esm/index.js CHANGED
@@ -33533,15 +33533,6 @@ var variantSize = {
33533
33533
  dialogue: "",
33534
33534
  "side-sm": "sm:s-w-[448px]",
33535
33535
  };
33536
- var styleKeys = [
33537
- "containerClasses",
33538
- "panelClasses",
33539
- "innerContainerClasses",
33540
- "transitionEnterFrom",
33541
- "transitionEnterTo",
33542
- "transitionLeaveFrom",
33543
- "transitionLeaveTo",
33544
- ];
33545
33536
  var modalStyles = (_a = {},
33546
33537
  _a[ModalType.Side] = {
33547
33538
  containerClasses: "s-h-full s-ml-auto",
@@ -33571,24 +33562,6 @@ var modalStyles = (_a = {},
33571
33562
  innerContainerClasses: "",
33572
33563
  },
33573
33564
  _a);
33574
- // RESPONSIVE: on mobile, display a side modal as a fullscren modal
33575
- /////////////
33576
- // function that appends "sm:" to every class in the string
33577
- var sm = function (classes) {
33578
- return classes
33579
- .split(" ")
33580
- .map(function (c) { return "sm:".concat(c); })
33581
- .join(" ");
33582
- };
33583
- // function that creates a new class that combines the classes from the full
33584
- // screen if mobile, and side modal if desktop
33585
- var newClass = function (key) {
33586
- return modalStyles[ModalType.FullScreen][key] +
33587
- " " +
33588
- sm(modalStyles[ModalType.Side][key]);
33589
- };
33590
- var sideModalResponsiveStyles = Object.fromEntries(styleKeys.map(function (key) { return [key, newClass(key)]; }));
33591
- modalStyles[ModalType.Side] = sideModalResponsiveStyles;
33592
33565
  var getModalClasses = function (type) { return modalStyles[type] || {}; };
33593
33566
  function Modal(_a) {
33594
33567
  var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, _b = _a.saveLabel, saveLabel = _b === void 0 ? "Save" : _b, isSaving = _a.isSaving, savingLabel = _a.savingLabel, title = _a.title, _c = _a.variant, variant = _c === void 0 ? "side-sm" : _c;