Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into 3pg/feature/button-card-component

� Conflicts:
�	framework/components/AButtonCard/AButtonCard.scss
  • Loading branch information
andreearusu committed Oct 29, 2021
2 parents b53b1d4 + d4a1ace commit 7ad15fd
Show file tree
Hide file tree
Showing 441 changed files with 46,177 additions and 31,080 deletions.
Empty file removed .buildme
Empty file.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:cypress/recommended"
"plugin:cypress/recommended",
"prettier"
],
"parserOptions": {
"sourceType": "module"
Expand All @@ -16,6 +17,7 @@
"module": true,
"require": true,
"Buffer": true,
"process": true,
"__dirname": true
},
"plugins": ["react-hooks"],
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on: push

jobs:
test:
name: CI

runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
if: ${{ github.actor != 'dependabot[bot]' }}
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: NPM Install
run: npm ci --ignore-scripts --prefer-offline
- name: Run Cypress Postinstall Script
run: npm run cypress:install
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Build Source Tarball
run: bash scripts/build-tar.sh
if: ${{ github.actor != 'dependabot[bot]' }}
- name: Send Tarball to ZeroNorth
run: bash scripts/build.sh
if: ${{ github.actor != 'dependabot[bot]' }}
env:
TRAVIS_BRANCH: ${{ github.ref }}
TRAVIS_PULL_REQUEST: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}
TRAVIS_BUILD_NUMBER: ${{ github.run_number }}
TRAVIS_COMMIT: ${{ github.sha }}
TRAVIS_TAG: ${{ env.GITHUB_TAG }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
CYBRIC_API_KEY: ${{ secrets.CYBRIC_API_KEY }}
- name: Upload Coverage
run: npm run upload-coverage
34 changes: 34 additions & 0 deletions .github/workflows/update-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Update Snapshots

on: workflow_dispatch

jobs:
test:
name: Update Snapshots

runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout Source
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14
- name: NPM Install
run: npm ci --ignore-scripts --prefer-offline
- name: Run Cypress Postinstall Script
run: npm run cypress:install
- name: Build
run: npm run build
- name: Update Snapshots
run: npm run updateSnapshots
- name: Commit New Snapshots
uses: stefanzweifel/git-auto-commit-action@v4.11.0
with:
commit_message: "test: update snapshots"
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
/.vercel/
/.nyc_output/
/coverage/
/cypress/snapshots/actual/
/cypress/snapshots/diff/
/lib/
/node_modules/
/public/

/A*.js
/babel-preset.js
/babel-preset-local.js
/helpers*.js
/hooks*.js
/style-inject*.js
/index*.js
/useA*.js
/_rollupPluginBabelHelpers*
6 changes: 0 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ build/
coverage/
cypress/
docs/
fonts/
lib-demo/
public/

.buildme
.editorconfig
.eslintrc.json
.gitignore
Expand All @@ -21,9 +18,6 @@ babel.config.js
babel-preset-local.js
gatsby-config.js
gatsby-node.js
rollup.config.js
webpack.lib-demo.config.js

**/__image_snapshots__/
*.spec.js
*.mdx
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .vercelignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
.nyc_output/
coverage/
cypress/
fonts/
lib-demo/
public/

.buildme
.travis.yml
codecov.yml
cypress.json
README.md
webpack.lib-demo.config.js
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
# Atomic components for React
# Atomic-React

## Background
## Introduction

The Cisco Security Business Group (SBG) has adopted [Atomic/Hammurabi](http://ux-document-lnx/~designer/sbg-ux/1.7.0/components/atoms/getting-started.html) as a design standard. The majority of the SBG front-ends are written using the React library and are configured based on their use case. For a variety of reasons, the existing UI toolkit is unable to support the various use cases necessary for adoption. In addition, a React-specific library offers greater usability and maintainablility over a styles-only solution.
Atomic-React is a React library that implements UI components according to the [Atomic design specification](http://ux-document-lnx/~designer/sbg-ux/components/atoms/getting-started.html) (requires VPN). Developers can enjoy the following features:

## Project Goal
- Flexible, tree-shakable components
- Full [documentation](https://atomic-react.security.cisco.com/)
- [Auto-import](https://atomic-react.security.cisco.com/#integrating)
- Baked-in accessibility
- Responsive helpers
- CSS helpers
- Form validation
- Extensibility

The aim is to provide an Atomic Design component library for React developers that enables them to import only the components that are necessary for their application/library. The library should be fully documented and reduce barriers to adoption as much as possible. In addition, the library should fully support the available design standards.
## Questions

## The Plan For Now
Consult [the documentation](https://atomic-react.security.cisco.com). For additional help and support, please reach out to Anton Frattaroli on Webex Teams, or file an issue in this repository.

Using the Atomic UI Toolkit (v1.8.0) as a base, and leveraging the work done in [threatgrid/atomic-ui-components], create a base set of components while addressing common developer issues such as CSS specificity and library size (in KB). Get documentation set up, published. Get a package into artifactory. Aim for [WAI-ARIA](https://www.w3.org/WAI/standards-guidelines/aria/) compliance.
## Contributing

## Future Discussion Points
### Design Development

- Public docs and package.
- Mobile friendliness.
- Refactor to align better with conceptual framework.
See the [Atomic contribution page](http://ux-document-lnx/~designer/sbg-ux/components/atoms/contribution.html).

### Component Development

Feel free to reach out to Anton Frattaroli via Webex Teams to discuss contributions.
12 changes: 1 addition & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const env = process.env.BABEL_ENV;

let config = {
presets: ["babel-preset-gatsby"],
plugins: ["@babel/plugin-proposal-class-properties"]
plugins: []
};

if (nodeEnv !== "production") {
Expand All @@ -15,19 +15,9 @@ if (nodeEnv !== "production") {
]);
}

if (["cra"].includes(env)) {
config = {
presets: ["@babel/preset-react", "@babel/preset-env"]
};
}

if (["lib"].includes(env)) {
config = {
presets: ["@babel/preset-react", ["@babel/preset-env", {modules: false}]],
plugins: [
"@babel/plugin-proposal-class-properties",
"./build/babel-transform-paths.js"
],
ignore: [/\.spec\.js$/]
};
}
Expand Down
34 changes: 0 additions & 34 deletions build/.travis-push.sh

This file was deleted.

50 changes: 0 additions & 50 deletions build/babel-transform-paths.js

This file was deleted.

4 changes: 2 additions & 2 deletions build/generate-babel-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ files.forEach((x) => {
if (data.includes("export {default} from")) {
declarations.push({
default: path[3],
path: `@cisco-ats/atomic-react/lib/components/${path[3]}`
path: `@cisco-sbg-ui/atomic-react/lib/components/${path[3]}`
});
localDeclarations.push({
default: path[3],
Expand All @@ -34,7 +34,7 @@ files.forEach((x) => {
declarations.push({
default: path[3] + "Exports",
members: getComponents(data),
path: `@cisco-ats/atomic-react/lib/components/${path[3]}`
path: `@cisco-sbg-ui/atomic-react/lib/components/${path[3]}`
});
localDeclarations.push({
default: path[3] + "Exports",
Expand Down
2 changes: 2 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"runMode": 2,
"openMode": 0
},
"screenshotsFolder": "./cypress/snapshots/actual",
"testFiles": "**/*.spec.js",
"trashAssetsBeforeRuns": true,
"video": false,
"viewportHeight": 720,
"viewportWidth": 1480
Expand Down
Loading

0 comments on commit 7ad15fd

Please sign in to comment.