Skip to content

Commit

Permalink
fix: use div for form validation
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Dec 6, 2023
1 parent 4a66ade commit 36a215d
Show file tree
Hide file tree
Showing 452 changed files with 3,001 additions and 7,701 deletions.
19 changes: 8 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
version: 2

aliases:
- &working_directory
~/repo
- &working_directory ~/repo

- &restore_cache
keys:
- npm-dependencies-v4-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- npm-dependencies-v4-
- npm-dependencies-v4-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- npm-dependencies-v4-

- &npm_install
name: Install Packages
Expand Down Expand Up @@ -68,7 +67,6 @@ jobs:
paths:
- dist


check-gatsby-ssr:
<<: *defaults

Expand All @@ -87,8 +85,8 @@ jobs:
- run:
name: Bind global package folder to local user
command: |
mkdir ~/.npm-packages
npm config set prefix ~/.npm-packages
mkdir ~/.npm-packages
npm config set prefix ~/.npm-packages
- run:
name: Link the toolkit
command: yarn link
Expand Down Expand Up @@ -120,7 +118,6 @@ jobs:
yarn storybook:build
yarn storybook:deploy
npm-publish:
<<: *defaults

Expand Down Expand Up @@ -151,8 +148,8 @@ workflows:
filters:
branches:
ignore:
- gh-pages
- next
- gh-pages
- next
tags:
only: /.*/

Expand Down
26 changes: 11 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
module.exports = {
"extends": [
"react-app",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
"overrides": [
{
"files": ['*.mdx'],
"extends": 'plugin:mdx/recommended',
"settings": {
"mdx/code-blocks": false,
extends: ['react-app', 'prettier/@typescript-eslint', 'plugin:prettier/recommended'],
overrides: [
{
files: ['*.mdx'],
extends: 'plugin:mdx/recommended',
settings: {
'mdx/code-blocks': false
}
}
],
"settings": {
"react": {
"version": "detect"
settings: {
react: {
version: 'detect'
}
}
}
};
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
title: '[BUG]'
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,9 +24,10 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Other Required Information (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
title: '[FEATURE]'
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
8 changes: 5 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
Fixes #

#### PR Checklist

<!-- To Mark a Checklist box, put "x" inside the square brackets. For Example - [ ] becomes [x] -->

- [ ] My branch is up-to-date with the Upstream `master` branch.
- [ ] The unit tests pass locally with my changes (if applicable).
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable).
- [ ] I have added necessary documentation (if appropriate).

#### Short description of what this resolves:
<!-- Please add a short description of what this PR resolves to be clear for the community. -->

<!-- Please add a short description of what this PR resolves to be clear for the community. -->

#### Changes proposed in this Pull Request:
<!-- You can use a few bullet points to describe some implementation changes proposed. For Example - feat: adding navbar component -->
-

## <!-- You can use a few bullet points to describe some implementation changes proposed. For Example - feat: adding navbar component -->
2 changes: 1 addition & 1 deletion .github/workflows/check-tree-shakeability.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Check tree-shakeability
on: [ pull_request ]
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
fetch-depth: 0
- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v2
with:
Expand All @@ -21,12 +21,12 @@ jobs:

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Publish to Chromatic
uses: chromaui/action@v1

with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true
skip: 'dependabot/**'
skip: 'dependabot/**'
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Lint, Test & Coverage
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
coverage:
runs-on: ubuntu-latest
concurrency: ci-test-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- uses: actions/checkout@v2
- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test:ci
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Test
run: yarn test:ci

- name: Upload coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"trailingComma": "none"
"trailingComma": "none",
"printWidth": 120
}
31 changes: 15 additions & 16 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const CircularDependencyPlugin = require('circular-dependency-plugin')
const CircularDependencyPlugin = require('circular-dependency-plugin');

module.exports = {
core: {
builder: 'webpack5',
builder: 'webpack5'
},
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx|mdx)'],
addons: [
Expand All @@ -19,32 +19,31 @@ module.exports = {
reactDocgenTypescriptOptions: {
compilerOptions: {
allowSyntheticDefaultImports: false,
esModuleInterop: false,
},
esModuleInterop: false
}
}
},
webpackFinal: async (config, { configType }) => {
const assetRule = config.module.rules.find(({ test }) => test && test.test(".svg"));
const assetRule = config.module.rules.find(({ test }) => test && test.test('.svg'));
// exclude svg from the default storybook file-loader
assetRule.exclude = /\.svg$/;

// add svgr loader to handle svgs
config.module.rules.push({
test: /\.svg$/,
use: ['url-loader'],
use: ['url-loader']
});

config.plugins.push(new CircularDependencyPlugin({
// exclude detection of files based on a RegExp
exclude: /node_modules/,
// add errors to webpack instead of warnings
failOnError: true,
}));
config.plugins.push(
new CircularDependencyPlugin({
// exclude detection of files based on a RegExp
exclude: /node_modules/,
// add errors to webpack instead of warnings
failOnError: true
})
);

return config;
},
staticDirs: [
'../static',
{ from: '../assets', to: '/' },
],
staticDirs: ['../static', { from: '../assets', to: '/' }]
};
54 changes: 27 additions & 27 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@
<link rel="canonical" href="https://italia.github.io/design-react-kit/" />

<!-- Favicons -->
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png">
<link rel="icon" href="/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/favicons/manifest.webmanifest">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#0066CC">
<link rel="icon" href="/favicons/favicon.ico">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#0066CC">
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png" />
<link rel="icon" href="/favicons/favicon-32x32.png" sizes="32x32" type="image/png" />
<link rel="icon" href="/favicons/favicon-16x16.png" sizes="16x16" type="image/png" />
<link rel="manifest" href="/favicons/manifest.webmanifest" />
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#0066CC" />
<link rel="icon" href="/favicons/favicon.ico" />
<meta name="msapplication-config" content="/favicons/browserconfig.xml" />
<meta name="theme-color" content="#0066CC" />

<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@teamdigitaleIT">
<meta name="twitter:creator" content="Team per la Trasformazione Digitale">
<meta name="twitter:title" content="React Kit">
<meta name="twitter:description" content="Il kit React per la Pubblica Amministrazione">
<meta name="twitter:image" content="/favicons/android-chrome-192x192.png">
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@teamdigitaleIT" />
<meta name="twitter:creator" content="Team per la Trasformazione Digitale" />
<meta name="twitter:title" content="React Kit" />
<meta name="twitter:description" content="Il kit React per la Pubblica Amministrazione" />
<meta name="twitter:image" content="/favicons/android-chrome-192x192.png" />
<!-- Facebook -->
<meta property="og:url" content="https://italia.github.io/bootstrap-italia/docs/come-iniziare/introduzione/">
<meta property="og:title" content="React Kit">
<meta property="og:description" content="Il kit React per la Pubblica Amministrazione">
<meta property="og:type" content="website">
<meta property="og:image" content="/favicons/social-card.png">
<meta property="og:image:secure_url" content="/favicons/social-card.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:url" content="https://italia.github.io/bootstrap-italia/docs/come-iniziare/introduzione/" />
<meta property="og:title" content="React Kit" />
<meta property="og:description" content="Il kit React per la Pubblica Amministrazione" />
<meta property="og:type" content="website" />
<meta property="og:image" content="/favicons/social-card.png" />
<meta property="og:image:secure_url" content="/favicons/social-card.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<style>
.sidebar-item[id$='story-hidden'] {
display: none !important
}
</style>
.sidebar-item[id$='story-hidden'] {
display: none !important;
}
</style>
4 changes: 2 additions & 2 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { addons } from '@storybook/addons';
import {theme} from './theme';
import { theme } from './theme';

addons.setConfig({
theme
})
});
Loading

0 comments on commit 36a215d

Please sign in to comment.