Skip to content

Commit

Permalink
added autoprefixer
Browse files Browse the repository at this point in the history
  • Loading branch information
awran5 committed May 23, 2021
1 parent 79e94b3 commit d72212e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 42 deletions.
5 changes: 5 additions & 0 deletions .changeset/lazy-horses-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-floating-whatsapp': patch
---

added autoprefixer
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"name": "react-floating-whatsapp",
<<<<<<< HEAD
"version": "1.1.1",
=======
"version": "1.1.0",
>>>>>>> 63142a78e2ec60c5a3a3d2ce90a7eb96f9b3e71e
"private": false,
"description": "Simple React component for adding a floating WhatsApp button to your project.",
"author": "awran5 <awran5@yahoo.com>",
Expand Down Expand Up @@ -36,6 +32,7 @@
"@types/react-dom": "^17.0.5",
"@typescript-eslint/eslint-plugin": "^4.24.0",
"@typescript-eslint/parser": "^4.24.0",
"autoprefixer": "^10.2.5",
"cross-env": "^7.0.2",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
Expand All @@ -46,7 +43,7 @@
"react-dom": "^17.0.2",
"react-scripts": "^4.0.3",
"rimraf": "^3.0.2",
"rollup": "^2.48.0",
"rollup": "^2.49.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.0",
Expand All @@ -71,6 +68,7 @@
],
"tags": [
"react",
"whatsapp",
"floating-whatsapp-button",
"whatsapp-button",
"react-component",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import postcss from 'rollup-plugin-postcss'
import autoprefixer from 'autoprefixer'
import copy from 'rollup-plugin-copy'
import { terser } from 'rollup-plugin-terser'
import packageJson from './package.json'
Expand All @@ -15,7 +16,8 @@ export default {
commonjs(),
typescript(),
postcss({
extract: true
extract: true,
plugins: [autoprefixer()]
}),
copy({
targets: [{ src: 'src/images/**/*', dest: 'dist/images' }]
Expand Down
31 changes: 1 addition & 30 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
background-color: #25d366;
border-radius: 50%;
user-select: none;
-webkit-box-shadow: rgb(0 0 0 / 15%) 0px 4px 12px 0px;
box-shadow: rgb(0 0 0 / 15%) 0px 4px 12px 0px;
}

Expand All @@ -27,57 +26,34 @@
border-color: inherit;
width: 60px;
height: 60px;
-webkit-border-radius: 50%;
border-radius: 50%;
position: absolute;
opacity: 0;
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
-webkit-animation-duration: 1.2s;
animation-duration: 1.2s;
-webkit-animation-name: _pulse;
animation-name: _pulse;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-delay: 1s;
animation-delay: 1s;
}

.floatingWhatsapp .whatsappButton svg {
fill: #fff;
padding: 0.5rem;
}

@-webkit-keyframes _pulse {
@keyframes _pulse {
0% {
background: rgb(76 175 79 / 50%);
-webkit-transform: scale(0);
transform: scale(0);
opacity: 1;
}

100% {
background: rgba(76 175 79 / 50%);
-webkit-transform: scale(1.5);
transform: scale(1.5);
opacity: 0;
}
}

@keyframes _pulse {
0% {
-webkit-box-shadow: 0 0 0 0 #25d366;
box-shadow: 0 0 0 0 #25d366;
opacity: 1;
}

100% {
-webkit-box-shadow: 0 0 0 15px #25d366;
box-shadow: 0 0 0 15px #25d366;
opacity: 0;
}
}

.floatingWhatsapp .whatsappChatBox {
display: flex;
flex-direction: column;
Expand All @@ -92,7 +68,6 @@
height: 0;
opacity: 0;
transition: height 0.2s ease-out;
-webkit-box-shadow: 0 4px 12px 0 rgb(0 0 0 / 15%);
box-shadow: 0 4px 12px 0 rgb(0 0 0 / 15%);
}

Expand Down Expand Up @@ -226,13 +201,11 @@
margin-top: 4px;
max-width: calc(100% - 120px);
z-index: 2;
-webkit-box-shadow: rgb(0 0 0 / 13%) 0px 1px 0.5px;
box-shadow: rgb(0 0 0 / 13%) 0px 1px 0.5px;
}

.floatingWhatsapp.dark .chatBody .message {
background-color: #262d31;
-webkit-box-shadow: rgb(0 0 0 / 70%) 0px 1px 0.5px;
box-shadow: rgb(0 0 0 / 70%) 0px 1px 0.5px;
}

Expand Down Expand Up @@ -311,7 +284,6 @@
.floatingWhatsapp .chatFooter form .input:focus {
border-color: #075e54;
outline: 0;
-webkit-box-shadow: 0 0 0 1px rgb(7 94 84 / 50%);
box-shadow: 0 0 0 1px rgb(7 94 84 / 50%);
}

Expand All @@ -327,7 +299,6 @@
.floatingWhatsapp.dark .chatFooter form .input:focus {
border-color: #0da896;
outline: 0;
-webkit-box-shadow: 0 0 0 1px rgb(13 168 150 / 50%);
box-shadow: 0 0 0 1px rgb(13 168 150 / 50%);
}

Expand Down
29 changes: 23 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2769,6 +2769,18 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==

autoprefixer@^10.2.5:
version "10.2.5"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.2.5.tgz#096a0337dbc96c0873526d7fef5de4428d05382d"
integrity sha512-7H4AJZXvSsn62SqZyJCP+1AWwOuoYpUfK6ot9vm0e87XD6mT8lDywc9D9OTJPMULyGcvmIxzTAMeG2Cc+YX+fA==
dependencies:
browserslist "^4.16.3"
caniuse-lite "^1.0.30001196"
colorette "^1.2.2"
fraction.js "^4.0.13"
normalize-range "^0.1.2"
postcss-value-parser "^4.1.0"

autoprefixer@^9.6.1:
version "9.8.6"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f"
Expand Down Expand Up @@ -3244,7 +3256,7 @@ browserslist@4.14.2:
escalade "^3.0.2"
node-releases "^1.1.61"

browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.6.2, browserslist@^4.6.4:
browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.3, browserslist@^4.16.6, browserslist@^4.6.2, browserslist@^4.6.4:
version "4.16.6"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2"
integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==
Expand Down Expand Up @@ -3439,7 +3451,7 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219:
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001196, caniuse-lite@^1.0.30001219:
version "1.0.30001228"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa"
integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==
Expand Down Expand Up @@ -5511,6 +5523,11 @@ forwarded@~0.1.2:
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=

fraction.js@^4.0.13:
version "4.1.0"
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.0.tgz#229ec1cedc8c3c7e5d2d20688ba64f0a43af5830"
integrity sha512-o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w==

fragment-cache@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
Expand Down Expand Up @@ -10352,10 +10369,10 @@ rollup@^1.31.1:
"@types/node" "*"
acorn "^7.1.0"

rollup@^2.48.0:
version "2.48.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.48.0.tgz#fceb01ed771f991f29f7bd2ff7838146e55acb74"
integrity sha512-wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A==
rollup@^2.49.0:
version "2.49.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.49.0.tgz#f0e5bb2b770ddf1be8cc30d4cce3457574c8c871"
integrity sha512-UnrCjMXICx9q0jF8L7OYs7LPk95dW0U5UYp/VANnWqfuhyr66FWi/YVlI34Oy8Tp4ZGLcaUDt4APJm80b9oPWQ==
optionalDependencies:
fsevents "~2.3.1"

Expand Down

0 comments on commit d72212e

Please sign in to comment.