@kalel1500/kalion-js 0.9.1-beta.0 → 0.9.1-beta.1

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.
@@ -304,7 +304,7 @@ function getDefaultExportFromCjs(x) {
304
304
  }
305
305
  var sweetalert2$1 = { exports: {} };
306
306
  /*!
307
- * sweetalert2 v11.17.2
307
+ * sweetalert2 v11.19.1
308
308
  * Released under the MIT License.
309
309
  */
310
310
  var sweetalert2 = sweetalert2$1.exports;
@@ -357,7 +357,7 @@ function requireSweetalert2() {
357
357
  });
358
358
  };
359
359
  const swalPrefix = "swal2-";
360
- const classNames = ["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "no-transition", "toast", "toast-shown", "show", "hide", "close", "title", "html-container", "actions", "confirm", "deny", "cancel", "default-outline", "footer", "icon", "icon-content", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "input-label", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loader", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl", "timer-progress-bar", "timer-progress-bar-container", "scrollbar-measure", "icon-success", "icon-warning", "icon-info", "icon-question", "icon-error", "draggable", "dragging"];
360
+ const classNames = ["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "no-transition", "toast", "toast-shown", "show", "hide", "close", "title", "html-container", "actions", "confirm", "deny", "cancel", "footer", "icon", "icon-content", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "input-label", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loader", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl", "timer-progress-bar", "timer-progress-bar-container", "scrollbar-measure", "icon-success", "icon-warning", "icon-info", "icon-question", "icon-error", "draggable", "dragging"];
361
361
  const swalClasses = classNames.reduce(
362
362
  (acc, className) => {
363
363
  acc[className] = swalPrefix + className;
@@ -873,17 +873,22 @@ function requireSweetalert2() {
873
873
  }
874
874
  addClass([confirmButton, denyButton, cancelButton], swalClasses.styled);
875
875
  if (params.confirmButtonColor) {
876
- confirmButton.style.backgroundColor = params.confirmButtonColor;
877
- addClass(confirmButton, swalClasses["default-outline"]);
876
+ confirmButton.style.setProperty("--swal2-confirm-button-background-color", params.confirmButtonColor);
878
877
  }
879
878
  if (params.denyButtonColor) {
880
- denyButton.style.backgroundColor = params.denyButtonColor;
881
- addClass(denyButton, swalClasses["default-outline"]);
879
+ denyButton.style.setProperty("--swal2-deny-button-background-color", params.denyButtonColor);
882
880
  }
883
881
  if (params.cancelButtonColor) {
884
- cancelButton.style.backgroundColor = params.cancelButtonColor;
885
- addClass(cancelButton, swalClasses["default-outline"]);
882
+ cancelButton.style.setProperty("--swal2-cancel-button-background-color", params.cancelButtonColor);
886
883
  }
884
+ applyOutlineColor(confirmButton);
885
+ applyOutlineColor(denyButton);
886
+ applyOutlineColor(cancelButton);
887
+ }
888
+ function applyOutlineColor(button) {
889
+ const buttonStyle = window.getComputedStyle(button);
890
+ const outlineColor = buttonStyle.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/, "rgba($1, $2, $3, 0.5)");
891
+ button.style.setProperty("--swal2-action-button-outline", buttonStyle.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/, ` ${outlineColor}`));
887
892
  }
888
893
  function renderButton(button, buttonType, params) {
889
894
  const buttonName = (
@@ -1519,6 +1524,9 @@ function requireSweetalert2() {
1519
1524
  const focusableElements = getFocusableElements();
1520
1525
  if (focusableElements.length) {
1521
1526
  index = index + increment;
1527
+ if (index === -2) {
1528
+ index = focusableElements.length - 1;
1529
+ }
1522
1530
  if (index === focusableElements.length) {
1523
1531
  index = 0;
1524
1532
  } else if (index === -1) {
@@ -2377,8 +2385,8 @@ function requireSweetalert2() {
2377
2385
  if (params.backdrop === false && params.allowOutsideClick) {
2378
2386
  warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
2379
2387
  }
2380
- if (params.theme && !["light", "dark", "auto", "borderless"].includes(params.theme)) {
2381
- warn(`Invalid theme "${params.theme}". Expected "light", "dark", "auto", or "borderless"`);
2388
+ if (params.theme && !["light", "dark", "auto", "borderless", "embed-iframe"].includes(params.theme)) {
2389
+ warn(`Invalid theme "${params.theme}". Expected "light", "dark", "auto", "borderless", or "embed-iframe"`);
2382
2390
  }
2383
2391
  for (const param in params) {
2384
2392
  checkIfParamIsValid(param);
@@ -3368,7 +3376,7 @@ function requireSweetalert2() {
3368
3376
  };
3369
3377
  });
3370
3378
  SweetAlert.DismissReason = DismissReason;
3371
- SweetAlert.version = "11.17.2";
3379
+ SweetAlert.version = "11.19.1";
3372
3380
  const Swal2 = SweetAlert;
3373
3381
  Swal2.default = Swal2;
3374
3382
  return Swal2;