From e2e5d3ae6a7baf2d0a2f7b8b1328add501ca256d Mon Sep 17 00:00:00 2001 From: Marcelo Madeira Date: Mon, 13 Jan 2020 10:53:21 -0300 Subject: [PATCH 1/3] Create nodejs.yml --- .github/workflows/nodejs.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..6318898 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,26 @@ +name: Node CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build, and test + run: | + npm ci + npm run build --if-present + npm test + env: + CI: true From 2c343a640a547376aa32b9112a11398379a2b3dd Mon Sep 17 00:00:00 2001 From: Marcelo Madeira Date: Mon, 13 Jan 2020 11:22:23 -0300 Subject: [PATCH 2/3] Adding important autocomplete property to FormInput component. --- components/constants.js | 47 ++++++++++++++++++++++++++++++ components/form-input/FormInput.js | 9 ++++-- package.json | 2 +- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/components/constants.js b/components/constants.js index b5949f7..ac58eeb 100644 --- a/components/constants.js +++ b/components/constants.js @@ -100,4 +100,51 @@ export const INPUT_TYPES = [ "file" ]; +export const AUTOCOMPLETE_TYPES = [ + "on", + "off", + "name", + "email", + "username", + "new-password", + "current-password", + "one-time-code", + "organization-title", + "organization", + "street-address", + "address-line1", + "address-line2", + "address-line3", + "address-level1", + "address-level2", + "address-level3", + "address-level4", + "country", + "country-name", + "postal-code", + "cc-name", + "cc-given-name", + "cc-additional-name", + "cc-family-name", + "cc-number", + "cc-exp", + "cc-exp-month", + "cc-exp-year", + "cc-csc", + "cc-type", + "transaction-currency", + "transaction-amount", + "language", + "bday", + "bday-day", + "bday-month", + "bday-year", + "sex", + "tel", + "tel-extension", + "impp", + "url", + "photo" +]; + export const INPUT_GROUP_ADDON_TYPES = ["prepend", "append"]; diff --git a/components/form-input/FormInput.js b/components/form-input/FormInput.js index f6163f2..a873291 100644 --- a/components/form-input/FormInput.js +++ b/components/form-input/FormInput.js @@ -2,7 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import classNames from "classnames"; -import { INPUT_TYPES } from "../constants"; +import { INPUT_TYPES, AUTOCOMPLETE_TYPES } from "../constants"; /** * The form input allows you to create various text style inputs such as `text`, `password`, `email`, `number`, `url`, `search` and more. @@ -35,6 +35,7 @@ class FormInput extends React.Component { const { className, plaintext, + autoComplete, size, invalid, valid, @@ -51,7 +52,7 @@ class FormInput extends React.Component { invalid && "is-invalid" ); - return ; + return ; } } @@ -76,6 +77,10 @@ FormInput.propTypes = { * Whether it is plaintext, or not. */ plaintext: PropTypes.bool, + /** + * Whether it is plaintext, or not. + */ + autoComplete: PropTypes.oneOf(AUTOCOMPLETE_TYPES), /** * The input's size. */ diff --git a/package.json b/package.json index 189f2bc..2e53471 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shards-react", - "version": "1.0.3", + "version": "1.0.4", "description": "A free, beautiful and modern React UI kit powered by Bootstrap 4 and the Shards UI kit.", "main": "dist/shards-react.common.js", "jsnext:main": "dist/shards-react.es.js", From 6f945e70d7556a11227d2010d57e2f1ee9d8c39e Mon Sep 17 00:00:00 2001 From: Marcelo Madeira Date: Mon, 13 Jan 2020 11:39:22 -0300 Subject: [PATCH 3/3] Adjusting to pull request --- .github/workflows/nodejs.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 6318898..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Node CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [8.x, 10.x, 12.x] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm ci - npm run build --if-present - npm test - env: - CI: true