@vallift/ngl 22.0.24 → 22.0.25

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.
@@ -967,19 +967,20 @@ class OverlayService {
967
967
  return dialogRef;
968
968
  }
969
969
  openModal(component, options) {
970
- const { disableClose = false, maxHeightClass, data, panelClass } = options ?? {};
970
+ const { disableClose = false, maxHeightClass, data, fitContent = false, panelClass } = options ?? {};
971
971
  const positionStrategy = this.overlay
972
972
  .position()
973
973
  .global()
974
974
  .centerHorizontally()
975
975
  .centerVertically();
976
+ const widthClasses = fitContent
977
+ ? ['w-fit', 'max-w-[calc(100%-2rem)]']
978
+ : ['sm:w-4/5', 'md:w-3/5', 'lg:w-2/5'];
976
979
  const defaultPanelClass = [
977
980
  ...this.basePanelClass,
978
981
  maxHeightClass ?? this.modalMaxHeightClass,
979
982
  'rounded-3xl',
980
- 'sm:w-4/5',
981
- 'md:w-3/5',
982
- 'lg:w-2/5',
983
+ ...widthClasses,
983
984
  ];
984
985
  let dialogRef = this.dialog.open(component, {
985
986
  positionStrategy: positionStrategy,