Skip to content

Commit

Permalink
fix: update sweetalert2
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Jan 2, 2025
1 parent ee654f1 commit 5568019
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 32 deletions.
3 changes: 2 additions & 1 deletion bootstrap-4/bootstrap-4.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use 'sass:math';

@import 'sweetalert2/src/variables';
$swal2-white: #fff !default;
$swal2-black: #000 !default;

// Function
@function str-replace($string, $search, $replace: '') {
Expand Down
4 changes: 2 additions & 2 deletions borderless/borderless.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import 'sweetalert2/src/variables';

$borderless-theme-color: rgba(54, 70, 93, .99);
$borderless-outline-color: lighten($borderless-theme-color, 30%);

$swal2-white: #fff !default;

// BOX MODEL
$swal2-box-shadow: none;

Expand Down
5 changes: 2 additions & 3 deletions bulma/bulma.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import "sweetalert2/src/variables.scss";

// override SASS variables here
$swal2-white: #fff !default;
$swal2-black: #000 !default;

//
// -- BULMA COPY VARIABLES
Expand Down
2 changes: 1 addition & 1 deletion dark/dark.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'sweetalert2/src/variables';
$swal2-outline-color: rgba(100, 150, 200, 0.5) !default;

$swal2-dark-theme-black: #19191a;
$swal2-dark-theme-white: #e1e1e1;
Expand Down
1 change: 0 additions & 1 deletion default/default.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@import 'sweetalert2/src/variables';
@import 'sweetalert2/src/sweetalert2';
3 changes: 0 additions & 3 deletions material-ui/material-ui.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@use 'sass:math';

@import 'sweetalert2/src/variables';

// Theme variables
$material-ui-blue: #2196f3;
$material-ui-disabled: #808080;
Expand Down Expand Up @@ -46,7 +44,6 @@ $swal2-actions-padding: 0 1em;
// CLOSE BUTTON
$swal2-close-button-border-radius: 50%;
$swal2-close-button-hover-background: rgb(242, 242, 242);
$swal2-close-button-hover-color: $swal2-close-button-color;

// CHECKBOX
$checkbox-size-px: 18;
Expand Down
2 changes: 1 addition & 1 deletion minimal/minimal.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'sweetalert2/src/variables';
$swal2-black: #000 !default;

// BOX MODEL
$swal2-border-radius: 0;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@sweetalert2/stylelint-config": "^3.0.0",
"replace-in-file": "^8.0.0",
"sass": "~1.79.0",
"sass": "^1.83.0",
"stylelint": "^16.0.0",
"sweetalert2": "^11.5.2",
"vite": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tools/build.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env zx
import { $, echo, fs } from 'zx'

import packageJson from '../package.json' assert { type: 'json' }
import packageJson from '../package.json' with { type: 'json' }
const version = process.env.VERSION || packageJson.version

const banner = `/*
Expand Down
5 changes: 2 additions & 3 deletions tools/create-new-theme.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ await replaceInFile({
// Create ${themeName}.scss
fs.writeFileSync(
path.join(themeName, `${themeName}.scss`),
`@import 'sweetalert2/src/variables';\n\n` +
`// override SASS variables here\n\n` +
`@import 'sweetalert2/src/sweetalert2';\n`
`// override SCSS variables here\n\n` +
`@uimportse 'sweetalert2/src/sweetalert2';\n`
)

echo`OK!`
38 changes: 36 additions & 2 deletions wordpress-admin/wordpress-admin.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'sweetalert2/src/variables';
@import './animations';
$swal2-white: #fff !default;
$swal2-outline-color: rgba(100, 150, 200, 0.5) !default;

$wordpress-blue: rgb(0, 124, 186);
$wordpress-red: #ca4a1f;
Expand Down Expand Up @@ -171,3 +171,37 @@ $swal2-timer-progress-bar-background: $wordpress-blue;
.swal2-toast .swal2-icon.swal2-success {
transform: scale(0.7) translateY(-5px);
}

@keyframes fadeInUpBig {
from {
transform: translate3d(0, 100%, 0);
opacity: 0;
}

to {
transform: translate3d(0, 0, 0);
opacity: 1;
}
}

@keyframes fadeInUpTiny {
from {
transform: translate3d(0, 5px, 0);
opacity: 0.7;
}

to {
transform: translate3d(0, 0, 0);
opacity: 1;
}
}

@keyframes fadeOut {
from {
opacity: 1;
}

to {
opacity: 0;
}
}
27 changes: 14 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,10 @@ ignore@^6.0.2:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-6.0.2.tgz#77cccb72a55796af1b6d2f9eb14fa326d24f4283"
integrity sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==

immutable@^4.0.0:
version "4.3.7"
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.7.tgz#c70145fc90d89fb02021e65c84eb0226e4e5a381"
integrity sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==
immutable@^5.0.2:
version "5.0.3"
resolved "https://registry.yarnpkg.com/immutable/-/immutable-5.0.3.tgz#aa037e2313ea7b5d400cd9298fa14e404c933db1"
integrity sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==

import-fresh@^3.3.0:
version "3.3.0"
Expand Down Expand Up @@ -1183,15 +1183,16 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"

sass@~1.79.0:
version "1.79.6"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.79.6.tgz#35a53c3dbaf66a25f132979f47346521e4ef77cb"
integrity sha512-PVVjeeiUGx6Nj4PtEE/ecwu8ltwfPKzHxbbVmmLj4l1FYHhOyfA0scuVF8sVaa+b+VY4z7BVKjKq0cPUQdUU3g==
sass@^1.83.0:
version "1.83.0"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.83.0.tgz#e36842c0b88a94ed336fd16249b878a0541d536f"
integrity sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==
dependencies:
"@parcel/watcher" "^2.4.1"
chokidar "^4.0.0"
immutable "^4.0.0"
immutable "^5.0.2"
source-map-js ">=0.6.2 <2.0.0"
optionalDependencies:
"@parcel/watcher" "^2.4.1"

shebang-command@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -1384,9 +1385,9 @@ svg-tags@^1.0.0:
integrity sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==

sweetalert2@^11.5.2:
version "11.15.5"
resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.15.5.tgz#608fa28491b2b874923200732f553c4f69dd4e0f"
integrity sha512-bVfmz1M1EZdbSagMSjfrLMzsWD0RKkHBRn73xZBCLzk8lXAJ6gfh63SmRGOzKfUynvg33cjxk5dTnFZozqsEvg==
version "11.15.6"
resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.15.6.tgz#5380ce7a74c9684793a8d3e86b94f4ebb51df348"
integrity sha512-OyJQsMlIZPfKHXXPkChQMqoaskPOgF8OnxjShHmyOP8T7KQjrjwXu3qD2pwExrUkVhXFVhoxZovOXG0G+7TCag==

table@^6.9.0:
version "6.9.0"
Expand Down

0 comments on commit 5568019

Please sign in to comment.