Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@
.prettierrc
.gitattributes
.gitignore
.browserslistrc
.sonarlint
.eslintrc
.eslintignore
.esdoc.json
.prettierignore
.travis.yml
rollup.config.js
stylelint.config.js
sonar-project.properties
lib
.storybook
.vscode
package.json
reports
readme
config
generators
flow-typed
out
docs
coverage
node_modules
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ install:
deploy:
provider: pages
skip_cleanup: true
github-token: $GITHUB_TOKEN
local_dir: ".out"
on:
branch: develop
env:
matrix:
secure: s7LtkMICM25z4C+A5FG9SXUPyU2Gs4MuSnGIuvqk67OZyBOxtUUtpgHQdpAd1ImRaMTy2gmi1bX5c+45e7jzy6gXqZ7FaOdUTMjAQs4dZyuV3QMHv/uJNXaBG8530+vT8rtQnZjFGbsxAgjkHk1PIJXStmKLE/Yl3v8w8AxFyowwaHYyjdaSnJOZYYPvO7nYbVHZVqPfX/sJquyk3YWmnUFaorS0KDt1qPHECwxSz1H7yfMuTZgvmrWTtt62+etLgeCsTACPv2/NXkB/KBfFMNhBq60r7TUp2cCAWLim5H91MY+j4Hr3Wn+cNQJOIBMOPniZsyzBVFqw5jBh+WqVE1no/KKv7xqEVEKv8c/ryjvQ6A94KMgb9WyJSpYEjUrKWU9TYucE7tbILtk9/nXqvav2bqONVBy0f4PBSZFuSiXohs3DIsL2JP4RKui8epBR5czLz4aUJV2k0W6qDJqzG6ma6U9+Zq3kAxkZ6fvk+j1c1sZTy1RxpOkdM/N9DWOLLtkIHJJKpIcNc347msU2YVjHbdMCaVNvUe2/cI/kIDBlo9EVpeyeEO8Xf2ZtI0ZjQwC5BDsWqdkB9qLj34dwfBtXvGVB8UrWQex5Upl0886hb3ssjiwLO4Xbdm0kr/c9/565NoQHdk8avDsO9ochE4TIAVnBubz68ysUVzMg16o=
secure: $GITHUB_TOKEN
notifications:
email:
- vkumar59@sapient.com
Expand Down
44 changes: 18 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Atomic React Pattern Lib

A react pattern library with collocation for generic react components equipped with recommended development ecosystem. Its collection of reusable react components built to serve all type of react based projects to achieve better user experience consistency and reusability.
A react pattern library with collocation of generic components and equipped with ideal react development ecosystem.

## Why a Component Library?

> **_A component library helps you achieve consistent branding as it becomes the single source of truth for every component not only in the application but for all projects in the organization._**

> **_Instead of duplicating the component code across features in your project, implement the component from a central source, like a component library._**

## Installation and Uses

This package intends to be an ideal development ecosystem for react component libraries, with some generic OOTB components to offer, it enables any team to customize them for their needs and publish their own private or public component library. Detailed guidelines to work with this ecosystem are available [here](readme/index.md).

For direct as-is uses, use below:

```sh
yarn add @sapient-xt/atomic-react-pattern-lib

**or**

npm install @sapient-xt/atomic-react-pattern-lib
```

Its collection of reusable react components built to serve all type of react based projects to achieve better user experience consistency and reusability.

## Ecosystem of this component library 🎉

- **Development Environment:** Storybook integrated for developing and showcasing components.
Expand All @@ -19,35 +35,11 @@ A react pattern library with collocation for generic react components equipped w
- **Unit testing framework:** with Jest and Enzyme.
- Babel 7 to transpiling javascript and releasing them as ESModules.
- **Theme and Styling:** with Styled Components.
- Uses Rollup based build process to export 3 type of bundles (esm, cjs, umd) with tree shaking enabled settings.

## Dependencies

1. formik
2. yup
3. flexboxgrid
4. react-modal

## Installation

Dependencies should be installed using the yarn
command line tools.

```sh
yarn install
yarn run flow:install
```

flow:install will search the [`libdef`](https://github.com/flow-typed/flow-typed/blob/master/README.md) repo and download all the libdefs that are relevant for our project and install them for us.

## Topics to refer

- [Development Tools](readme/DevelopmentTools.md)
- [Static Code Linters and Code Formatter](readme/StaticCodeLinters.md)
- [Atomic Design](http://bradfrost.com/blog/post/atomic-web-design/)
- [Folder Structure](readme/FolderStructure.md)
- [Component Scaffolding](readme/Component.md)
- [Flow Type](readme/FlowType.md)
- [Husky](readme/Husky.md)
- [ES Docs](readme/ESDocs.md)
- [Storybook](readme/Storybook.md)
- [Running The Tests](readme/Test.md)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Image Component with styles should render correctly and match snapshots 1`] = `
<Image
alt="ABC"
className="Image-vpwc5b-0 hPJpFO"
className="Image-sc-1snwhli-0 jNYVIx"
inheritedStyles=""
placeholderSrc="http://xyz.com"
sizes=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`<Breadcrumb /> should render correctly 1`] = `
<Breadcrumb
className="Breadcrumb-sc-190arc4-0 kItiBi"
className="Breadcrumb-pim2hj-0 cHhKkL"
linkList={
Array [
Object {
Expand Down
14 changes: 5 additions & 9 deletions lib/components/molecules/Form/tests/Form.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Form Component', () => {
username: '',
typeOfUser: '',
},
debug: true,
debug: false,
action: '/',
validationSchema: {
username: {
Expand Down Expand Up @@ -70,8 +70,7 @@ describe('Form Component', () => {
</Button>
</Form>
);
const Wrapper = mount(InputForm);
expect(Wrapper.find('input')).toHaveLength(1);
const Wrapper = shallow(InputForm);
expect(Wrapper).toMatchSnapshot();
});

Expand All @@ -91,8 +90,7 @@ describe('Form Component', () => {
</Button>
</Form>
);
const Wrapper = mount(SelectForm);
expect(Wrapper.find('select')).toHaveLength(1);
const Wrapper = shallow(SelectForm);
expect(Wrapper).toMatchSnapshot();
});

Expand All @@ -112,8 +110,7 @@ describe('Form Component', () => {
</Button>
</Form>
);
const Wrapper = mount(InputForm);
expect(Wrapper.find('input')).toHaveLength(1);
const Wrapper = shallow(InputForm);
expect(Wrapper).toMatchSnapshot();
});

Expand All @@ -136,8 +133,7 @@ describe('Form Component', () => {
</Button>
</Form>
);
const Wrapper = mount(InputForm);
expect(Wrapper.find('input')).toHaveLength(1);
const Wrapper = shallow(InputForm);
expect(Wrapper).toMatchSnapshot();
});

Expand Down
Loading