Browse Source

Dependencies upgraded ex.Tailwind (cuz v2 forms), yup array require fixed

master
ChiefRed 3 years ago
parent
commit
310b8f3dd6
10 changed files with 4343 additions and 4207 deletions
  1. +1
    -0
      .gitignore
  2. +2
    -2
      features/config.js
  3. +1
    -1
      features/hooks.js
  4. +1
    -1
      features/support/actions.js
  5. +1
    -1
      features/world.js
  6. +12
    -11
      package.json
  7. +10
    -50
      src/assets/styles/.index.css
  8. +7
    -5
      src/components/forms/FormFeedback.jsx
  9. +4
    -2
      src/utils/newId.js
  10. +4304
    -4134
      yarn.lock

+ 1
- 0
.gitignore View File

yarn-error.log* yarn-error.log*
react-formik-tailwind-labwork.code-workspace react-formik-tailwind-labwork.code-workspace
src/assets/styles/.index.css src/assets/styles/.index.css
.eslintcache

features/support/config.js → features/config.js View File

module.exports = { module.exports = {
port: 8989, port: 8989,


//headless: false,
headless: false,
slowMo: 0, slowMo: 0,


close: true,
//close: true,
}; };

+ 1
- 1
features/hooks.js View File

/*eslint no-console: ["error", { allow: ["log"] }] */ /*eslint no-console: ["error", { allow: ["log"] }] */
// Dependencies // Dependencies
const { After, Before, AfterAll } = require('@cucumber/cucumber'); const { After, Before, AfterAll } = require('@cucumber/cucumber');
const config = require('./support/config');
const config = require('./config');
const scope = require('./support/scope'); const scope = require('./support/scope');


// Here is where you might clean up database tables to have a clean slate before the tests run // Here is where you might clean up database tables to have a clean slate before the tests run

+ 1
- 1
features/support/actions.js View File

const config = require('./config');
const config = require('../config');
const assert = require('assert'); const assert = require('assert');
const scope = require('./scope'); const scope = require('./scope');
const pages = require('./pages'); const pages = require('./pages');

+ 1
- 1
features/world.js View File

const config = require('./support/config');
const config = require('./config');
const { setWorldConstructor } = require('@cucumber/cucumber'); const { setWorldConstructor } = require('@cucumber/cucumber');
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
const scope = require('./support/scope'); const scope = require('./support/scope');

+ 12
- 11
package.json View File

"@tailwindcss/custom-forms": "^0.2.1", "@tailwindcss/custom-forms": "^0.2.1",
"formik": "^2.1.7", "formik": "^2.1.7",
"formik-persist": "^1.1.0", "formik-persist": "^1.1.0",
"framer-motion": "^2.7.7",
"framer-motion": "^3.2.1",
"http-shutdown": "^1.2.2", "http-shutdown": "^1.2.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-google-recaptcha": "^2.1.0", "react-google-recaptcha": "^2.1.0",
"react-json-view": "^1.19.1",
"react-json-view": "^1.20.4",
"react-remove-scroll": "^2.4.0", "react-remove-scroll": "^2.4.0",
"tailwindcss": "^1.8.10",
"tailwindcss": "^1.0",
"tailwindcss-filters": "^3.0.0", "tailwindcss-filters": "^3.0.0",
"yup": "^0.29.3"
"yup": "^0.32.8"
}, },
"scripts": { "scripts": {
"start": "yarn build:css && react-scripts start", "start": "yarn build:css && react-scripts start",
}, },
"devDependencies": { "devDependencies": {
"@cucumber/cucumber": "^7.0.0", "@cucumber/cucumber": "^7.0.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"autoprefixer": "9.8.6",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.2",
"autoprefixer": "10.2.3",
"postcss": "8.2.4",
"postcss-cli": "^8.0.0", "postcss-cli": "^8.0.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"puppeteer": "^5.5.0", "puppeteer": "^5.5.0",
"react-scripts": "3.4.3"
"react-scripts": "4.0.1"
} }
} }

+ 10
- 50
src/assets/styles/.index.css View File

color: #a0aec0; color: #a0aec0;
} }


input::-ms-input-placeholder, textarea::-ms-input-placeholder {
color: #a0aec0;
}

input::placeholder, input::placeholder,
textarea::placeholder { textarea::placeholder {
color: #a0aec0; color: #a0aec0;
opacity: 1; opacity: 1;
} }


.form-input::-ms-input-placeholder {
color: #a0aec0;
opacity: 1;
}

.form-input::placeholder { .form-input::placeholder {
color: #a0aec0; color: #a0aec0;
opacity: 1; opacity: 1;
} }


.outline-none { .outline-none {
outline: 0;
outline: 2px solid transparent;
outline-offset: 2px;
} }


.focus\:outline-none:focus { .focus\:outline-none:focus {
outline: 0;
outline: 2px solid transparent;
outline-offset: 2px;
} }


.overflow-y-auto { .overflow-y-auto {
transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
} }


@-webkit-keyframes spin {
to {
transform: rotate(360deg);
}
}

@keyframes spin { @keyframes spin {
to { to {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }


@-webkit-keyframes ping {
75%, 100% {
transform: scale(2);
opacity: 0;
}
}

@keyframes ping { @keyframes ping {
75%, 100% { 75%, 100% {
transform: scale(2); transform: scale(2);
} }
} }


@-webkit-keyframes pulse {
50% {
opacity: .5;
}
}

@keyframes pulse { @keyframes pulse {
50% { 50% {
opacity: .5; opacity: .5;
} }
} }


@-webkit-keyframes bounce {
0%, 100% {
transform: translateY(-25%);
-webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);
animation-timing-function: cubic-bezier(0.8,0,1,1);
}

50% {
transform: none;
-webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);
animation-timing-function: cubic-bezier(0,0,0.2,1);
}
}

@keyframes bounce { @keyframes bounce {
0%, 100% { 0%, 100% {
transform: translateY(-25%); transform: translateY(-25%);
-webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);
animation-timing-function: cubic-bezier(0.8,0,1,1);
animation-timing-function: cubic-bezier(0.8,0,1,1);
} }


50% { 50% {
transform: none; transform: none;
-webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);
animation-timing-function: cubic-bezier(0,0,0.2,1);
animation-timing-function: cubic-bezier(0,0,0.2,1);
} }
} }


--bg-opacity: 1; --bg-opacity: 1;
background-color: #6c6fc6; background-color: #6c6fc6;
background-color: rgba(108, 111, 198, var(--bg-opacity)); background-color: rgba(108, 111, 198, var(--bg-opacity));
outline: 0;
outline: 2px solid transparent;
outline-offset: 2px;
} }


.btn-primary:active { .btn-primary:active {
--bg-opacity: 1; --bg-opacity: 1;
background-color: #6c6fc6; background-color: #6c6fc6;
background-color: rgba(108, 111, 198, var(--bg-opacity)); background-color: rgba(108, 111, 198, var(--bg-opacity));
outline: 0;
outline: 2px solid transparent;
outline-offset: 2px;
} }


.btn-secondary:active { .btn-secondary:active {

+ 7
- 5
src/components/forms/FormFeedback.jsx View File

email: Yup.string() email: Yup.string()
.required('Required') .required('Required')
.email('Must be a valid email address'), .email('Must be a valid email address'),
section: Yup.mixed()
section: Yup.string()
.required('Required') .required('Required')
.oneOf(['users', 'partners'], 'Invalid section'), .oneOf(['users', 'partners'], 'Invalid section'),
support_type: Yup.array(Yup.string()).ensure().when('section', { support_type: Yup.array(Yup.string()).ensure().when('section', {
is: 'users', is: 'users',
then: Yup.array().required('Required').test('is-valid-support-type', 'Invalid support type', val => {
const sb = val.filter(n => !support_types_values.includes(n))
return 0 === sb.length
}),
then: Yup.array(Yup.string()).min(1, 'Required')
.test('is-valid-support-type', 'Invalid support type', val => {
const sb = val.filter(n => !support_types_values.includes(n))
return 0 === sb.length
}
),
}), }),
message: Yup.string() message: Yup.string()
.required('Required') .required('Required')

+ 4
- 2
src/utils/newId.js View File

let lastId = 0; let lastId = 0;


export default function(prefix='id') {
const newId = function(prefix='id') {
lastId++; lastId++;
return `${prefix}${lastId}`; return `${prefix}${lastId}`;
}
}

export default newId

+ 4304
- 4134
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save