...
 
Commits (2)
> 1%
last 3 versions
\ No newline at end of file
{
"modules": false, // avoid additionnal module isolation by postcss
"plugins": {
"autoprefixer": {
"grid": true
}
}
}
\ No newline at end of file
......@@ -7,12 +7,14 @@
"build": "npx parcel build ./src/app.js --public-url ./ --out-dir ./build/"
},
"dependencies": {
"autoprefixer": "^9.6.0",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"fonts": "^0.0.2",
"i18next": "^15.0.7",
"i18next-browser-languagedetector": "^3.0.1",
"i18next-xhr-backend": "^2.0.1",
"postcss-modules": "^1.4.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-i18next": "^10.5.3",
......
......@@ -7,7 +7,7 @@ class Switch extends Component {
render() {
return (
<label>
<label class="cmp-switch" for={this.props.idInput}>
<input
checked={this.props.isChecked}
onChange={this.props.handleChange}
......@@ -16,8 +16,7 @@ class Switch extends Component {
namecommand={this.props.nameCommand}
id={this.props.idInput}
/>
<div><div/>
</div>
<div arial-label={this.props.nameCommand}><span>{this.props.nameCommand}</span></div>
</label>
);
}
......
.switch {
position: absolute;
opacity: 0;
}
.switch + div {
vertical-align: middle;
width: 35px;
height: 20px;
border-radius: 999px;
background-color: #00B0F2;
-webkit-transition-duration: .4s;
transition-duration: .4s;
-webkit-transition-property: background-color, box-shadow;
transition-property: background-color, box-shadow;
cursor: pointer;
}
.switch + div span {
position: absolute;
font-size: 1.6rem;
color: white;
margin-top: 12px;
}
.switch:checked + div {
width: 60px;
background-position: 0 0;
background-color: #3b89ec;
}
.switch + div {
width: 60px;
height: 30px;
}
.switch:checked + div {
background-color: #57BB00;
}
.switch + div > div {
float: left;
width: 30px; height: 28px;
border-radius: inherit;
background: #ffffff;
-webkit-transition-timing-function: cubic-bezier(1,0,0,1);
transition-timing-function: cubic-bezier(1,0,0,1);
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
-webkit-transition-property: transform, background-color;
transition-property: transform, background-color;
pointer-events: none;
margin-top: 1px;
margin-left: 1px;
}
.switch:checked + div > div {
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
background-color: #ffffff;
}
.switch:checked + div > div {
-webkit-transform: translate3d(30px, 0, 0);
transform: translate3d(30px, 0, 0);
label.cmp-switch {
position: relative;
.switch {
// hide native input field
display: none;
& + div {
vertical-align: middle;
width: 60px;
height: 30px;
border-radius: 999px;
background-color: #00B0F2;
transition-duration: .4s;
transition-property: background-color, box-shadow;
cursor: pointer;
span {
font-size: 0; // hide text content
float: left;
display: inline-block;
width: 28px; height: 28px;
border-radius: inherit;
background: #ffffff;
transition-timing-function: cubic-bezier(1,0,0,1);
transition-duration: 0.4s;
transition-property: transform, background-color;
pointer-events: none;
margin-top: 1px;
margin-left: 1px;
}
}
&:checked + div {
background-color: #57BB00;
span {
transform: translate3d(28px, 0, 0);
}
}
}
}
\ No newline at end of file
......@@ -848,6 +848,19 @@ atob@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
autoprefixer@^9.6.0:
version "9.6.0"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.0.tgz#0111c6bde2ad20c6f17995a33fad7cf6854b4c87"
integrity sha512-kuip9YilBqhirhHEGHaBTZKXL//xxGnzvsD0FtBQa6z+A69qZD6s/BAX9VzDF1i9VKDquTJDQaPLSEhOnL6FvQ==
dependencies:
browserslist "^4.6.1"
caniuse-lite "^1.0.30000971"
chalk "^2.4.2"
normalize-range "^0.1.2"
num2fraction "^1.2.2"
postcss "^7.0.16"
postcss-value-parser "^3.3.1"
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
......@@ -922,6 +935,11 @@ bcrypt-pbkdf@^1.0.0:
dependencies:
tweetnacl "^0.14.3"
big.js@^3.1.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==
binary-extensions@^1.0.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
......@@ -1045,6 +1063,15 @@ browserslist@^4.0.0, browserslist@^4.1.0, browserslist@^4.3.4:
electron-to-chromium "^1.3.127"
node-releases "^1.1.17"
browserslist@^4.6.1:
version "4.6.1"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.1.tgz#ee5059b1aec18cbec9d055d6cb5e24ae50343a9b"
integrity sha512-1MC18ooMPRG2UuVFJTHFIAkk6mpByJfxCrnUyvSlu/hyQSFHMrlhM02SzNuCV+quTP4CKmqtOMAIjrifrpBJXQ==
dependencies:
caniuse-lite "^1.0.30000971"
electron-to-chromium "^1.3.137"
node-releases "^1.1.21"
buffer-equal@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b"
......@@ -1134,6 +1161,11 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000963:
version "1.0.30000967"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000967.tgz#a5039577806fccee80a04aaafb2c0890b1ee2f73"
caniuse-lite@^1.0.30000971:
version "1.0.30000974"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000974.tgz#b7afe14ee004e97ce6dc73e3f878290a12928ad8"
integrity sha512-xc3rkNS/Zc3CmpMKuczWEdY2sZgx09BkAxfvkxlAEBTqcMHeL8QnPqhKse+5sRTi3nrw2pJwToD2WvKn1Uhvww==
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
......@@ -1784,6 +1816,11 @@ electron-to-chromium@^1.3.127:
version "1.3.133"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.133.tgz#c47639c19b91feee3e22fad69f5556142007008c"
electron-to-chromium@^1.3.137:
version "1.3.148"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.148.tgz#5796c0d9eb0358d397163413b90bf376c5d8bf08"
integrity sha512-nuCOlXNlGMQmdzihIPGm2K3Yf3H1hke/1rK381i02pH8wNliJU9hVNnOi/xjmxt+mjABd/BzufP5nPHWKshLWA==
elliptic@^6.0.0:
version "6.4.1"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a"
......@@ -1796,6 +1833,11 @@ elliptic@^6.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.0"
emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k=
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
......@@ -2089,6 +2131,13 @@ gaze@^1.0.0:
dependencies:
globule "^1.0.0"
generic-names@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-1.0.3.tgz#2d786a121aee508876796939e8e3bff836c20917"
integrity sha1-LXhqEhruUIh2eWk56OO/+DbCCRc=
dependencies:
loader-utils "^0.2.16"
get-caller-file@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
......@@ -2729,6 +2778,11 @@ json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
json5@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=
json5@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
......@@ -2809,6 +2863,21 @@ load-json-file@^1.0.0:
pinkie-promise "^2.0.0"
strip-bom "^2.0.0"
loader-utils@^0.2.16:
version "0.2.17"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=
dependencies:
big.js "^3.1.3"
emojis-list "^2.0.0"
json5 "^0.5.0"
object-assign "^4.0.1"
lodash.camelcase@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
lodash.clone@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6"
......@@ -3136,6 +3205,13 @@ node-releases@^1.1.17:
dependencies:
semver "^5.3.0"
node-releases@^1.1.21:
version "1.1.23"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.23.tgz#de7409f72de044a2fa59c097f436ba89c39997f0"
integrity sha512-uq1iL79YjfYC0WXoHbC/z28q/9pOl8kSHaXdWmAAc8No+bDwqkZbzIJz55g/MUsPgSGm9LZ7QSUbzTcH5tz47w==
dependencies:
semver "^5.3.0"
node-sass@^4.12.0:
version "4.12.0"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017"
......@@ -3197,6 +3273,11 @@ normalize-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
normalize-range@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=
normalize-url@^3.0.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
......@@ -3227,6 +3308,11 @@ nth-check@^1.0.2:
dependencies:
boolbase "~1.0.0"
num2fraction@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
......@@ -3678,6 +3764,17 @@ postcss-modules-values@1.3.0:
icss-replace-symbols "^1.1.0"
postcss "^6.0.1"
postcss-modules@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-1.4.1.tgz#8aa35bd3461db67e27377a7ce770d77b654a84ef"
integrity sha512-btTrbK+Xc3NBuYF8TPBjCMRSp5h6NoQ1iVZ6WiDQENIze6KIYCSf0+UFQuV3yJ7gRHA+4AAtF8i2jRvUpbBMMg==
dependencies:
css-modules-loader-core "^1.1.0"
generic-names "^1.0.3"
lodash.camelcase "^4.3.0"
postcss "^7.0.1"
string-hash "^1.1.1"
postcss-normalize-charset@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4"
......@@ -3837,6 +3934,15 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.5:
source-map "^0.6.1"
supports-color "^6.1.0"
postcss@^7.0.16:
version "7.0.17"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f"
integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
supports-color "^6.1.0"
posthtml-parser@^0.4.0, posthtml-parser@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.4.1.tgz#95b78fef766fbbe0a6f861b6e95582bc3d1ff933"
......@@ -4589,6 +4695,11 @@ stream-http@^2.7.2:
to-arraybuffer "^1.0.0"
xtend "^4.0.0"
string-hash@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b"
integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=
string-width@^1.0.1, string-width@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
......