Skip to content

Release/0.1.0 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 75 commits into from
Feb 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c2369f8
Added setup files
EranNL Oct 24, 2020
02dbc95
Added test site
EranNL Oct 24, 2020
bb116d4
Merge pull request #1 from machielsdev/feature/setup-react
Oct 24, 2020
84c27e0
Added base style setup
EranNL Oct 24, 2020
c88e695
Merge pull request #2 from machielsdev/feature/setup-style
Oct 24, 2020
705d06b
Added page (and base) style and root imports
EranNL Oct 24, 2020
0b884d1
Merge pull request #4 from machielsdev/feature/page
EranNL Oct 24, 2020
7769999
Added basic buttons
EranNL Oct 26, 2020
3b30804
Uncommented font faces
EranNL Oct 26, 2020
504ab3c
Merge pull request #6 from machielsdev/feature/buttons
EranNL Oct 26, 2020
20b65a6
Added page and panel tests
EranNL Oct 26, 2020
f38435f
Fixed index was isolated module
EranNL Oct 27, 2020
f52c02b
Merge pull request #8 from machielsdev/feature/export-modules
EranNL Oct 27, 2020
3c4ded9
Merge branch 'develop' of https://github.com/machielsdev/ui into feat…
EranNL Oct 27, 2020
70eafb5
Merge pull request #7 from machielsdev/feature/page-tests
EranNL Oct 27, 2020
ac322f1
Added codecov script
EranNL Oct 27, 2020
e035f69
Merge pull request #9 from machielsdev/fix/codecov
EranNL Oct 27, 2020
f473fab
Fixed exports
EranNL Oct 27, 2020
a8cb315
Merge pull request #10 from machielsdev/fix/default-imports
EranNL Oct 27, 2020
584d7b1
Fixed incorrect dev server entry
EranNL Oct 29, 2020
c43998e
WIP inputs
EranNL Oct 29, 2020
bca35c4
Merge pull request #11 from machielsdev/fix/dev-server-entry
EranNL Oct 29, 2020
3e9e058
Merge branch 'develop' of https://github.com/machielsdev/ui into feat…
EranNL Oct 29, 2020
6ca8e7c
WIP inputs
EranNL Oct 30, 2020
3fca551
Added (in))valid colors
EranNL Oct 30, 2020
bda45ae
WIP
EranNL Nov 2, 2020
b5a0a49
WIP
EranNL Nov 2, 2020
1b2b263
Added base cards
EranNL Nov 2, 2020
b9a2c77
Added exports
EranNL Nov 2, 2020
3450852
Added card variants
EranNL Nov 2, 2020
8326ab4
Removed www test files
EranNL Nov 2, 2020
0465254
Merge pull request #13 from machielsdev/feature/cards
EranNL Nov 2, 2020
6d505f5
Merge branch 'develop' of https://github.com/machielsdev/ui into feat…
EranNL Nov 2, 2020
68e5bad
WIP
EranNL Nov 2, 2020
290d860
Added grid system
EranNL Nov 2, 2020
80a303c
Added container
EranNL Nov 2, 2020
9536de2
Merge pull request #14 from machielsdev/feature/grid
EranNL Nov 3, 2020
8decdfb
Merge branch 'develop' of https://github.com/machielsdev/ui into feat…
EranNL Nov 3, 2020
bda39be
Changed some icon names, changed button padding to work better with i…
EranNL Nov 3, 2020
23ed09a
Added class for button text, fixed icon button position
EranNL Nov 3, 2020
3dc7deb
Added icon showcase to test www
EranNL Nov 3, 2020
9d7897a
Removed standard font size in favor of browser font size
EranNL Nov 3, 2020
d5598a7
Added icon size prop
EranNL Nov 3, 2020
1f519a9
Merge pull request #15 from coderan-io/feature/icons
EranNL Nov 3, 2020
ba1679e
Removed cui prefix
EranNL Nov 3, 2020
83361b6
Merge branch 'develop' of github.com:coderan-io/ui into feature/inputs
EranNL Nov 3, 2020
14bc509
Merge pull request #16 from coderan-io/fix/names
EranNL Nov 3, 2020
d571122
Fixed incorrect rendering
EranNL Nov 3, 2020
8c2af2a
WIP
EranNL Nov 3, 2020
158b792
Removed cui prefix
EranNL Nov 3, 2020
36f4315
Added default and outside controllable value
EranNL Nov 4, 2020
e4c3de5
Added rest properties to underlying fields, changed form label class …
EranNL Nov 4, 2020
b7108d2
Added tests
EranNL Nov 4, 2020
fced49f
Merge branch 'develop' of github.com:coderan-io/ui into feature/inputs
EranNL Nov 4, 2020
a306539
Added form message
EranNL Nov 5, 2020
6dda1d5
WIP
EranNL Nov 7, 2020
f170583
Removed console logs
EranNL Nov 7, 2020
b84ef51
Changed input and button padding
EranNL Nov 8, 2020
bed9ee5
Added input tests
EranNL Nov 8, 2020
e14627d
Removed console log
EranNL Nov 8, 2020
2e7383c
Added field context tests
EranNL Nov 8, 2020
d2bd7a8
Merge pull request #17 from coderan-io/feature/inputs
EranNL Nov 8, 2020
78875b7
WIP
EranNL Nov 10, 2020
96b13f5
Added colors in a logic way
EranNL Nov 24, 2020
14717b4
Changed button text to corresponding color
EranNL Nov 25, 2020
02e3c54
Made all buttons block buttons
EranNL Nov 25, 2020
6ba7913
Merge pull request #18 from coderan-io/feature/more-colors
EranNL Nov 25, 2020
0a94e6f
Merge branch 'develop' of github.com:coderan-io/ui into feautre/tags
EranNL Nov 25, 2020
f4ecbb6
Added more tag colors
EranNL Nov 25, 2020
a8317f8
Merge pull request #19 from coderan-io/feautre/tags
EranNL Nov 25, 2020
f558c90
added ci action
EranNL Dec 27, 2020
96877a9
Feature/tooltips (#23)
EranNL Dec 27, 2020
bd0b217
Feature/modals (#24)
EranNL Dec 29, 2020
6befef4
0.1.0
EranNL Feb 6, 2021
465e08f
Added files for release
EranNL Feb 6, 2021
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
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint/eslint-plugin"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": "./tsconfig.json"
},
"env": {
"node": true,
"es6": true
},
"ignorePatterns": ["dist", "setupTests.ts", "babel.config.js"],
"rules": {
"comma-dangle": "off",
"class-methods-use-this": "off",
"import/prefer-default-export": "off",
"import/no-dynamic-require": "off",
"global-require": "off",
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"@typescript-eslint/indent": ["error", 4],
"@typescript-eslint/ban-ts-comment": "off"
}
}
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions

name: CI

on: [push, pull_request]
jobs:
test-coverage:
name: Test on Node.js Latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js latest
uses: actions/setup-node@v2.1.3
with:
node-version: "15"
- name: Install dependencies
run: npm install
- name: Generate coverage report
run: npm run test-coverage
- name: Upload coverage report
uses: codecov/codecov-action@v1.0.15
with:
token: ${{ secrets.CODECOV }}
test-node-12:
name: Test on Node.js v12
runs-on: ubuntu-latest
steps:
- name: Checkout codd
uses: actions/checkout@v2
- name: Use Node.js v12
uses: actions/setup-node@v2.1.3
with:
node-version: "12"
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/dist

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDE
/.idea
6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

68 changes: 0 additions & 68 deletions .idea/workspace.xml

This file was deleted.

11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js

node_js:
- "12"

script:
- npm install codecov -g
- npm run build
after_success:
- bash <(curl -s https://codecov.io/bash)
- codecov -f coverage/*.json
Empty file added __tests__/.gitkeep
Empty file.
83 changes: 83 additions & 0 deletions __tests__/Button.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import { shallow } from 'enzyme';
import React from 'react';
import { Button } from '@/components/Button';
import { Variant } from '@/components';

describe('Button test', () => {
it('should render button', () => {
const container = shallow(
<Button
variant={Variant.PRIMARY}
>
Hello world
</Button>
);

expect(container.find('button').length).toBe(1);
});

it('should render button as link', () => {
const container = shallow(
<Button
as="a"
variant={Variant.PRIMARY}
>
Hello world
</Button>
);

expect(container.find('a').length).toBe(1);
});

it('should render block button', () => {
const container = shallow(
<Button
variant={Variant.PRIMARY}
block
>
Hello world
</Button>
);

expect(container.find('button').hasClass('btn-block')).toBeTruthy();
});

it('should render small button', () => {
const container = shallow(
<Button
variant={Variant.PRIMARY}
small
>
Hello world
</Button>
);

expect(container.find('button').hasClass('btn-small')).toBeTruthy();
});

it('should render button with icon left', () => {
const container = shallow(
<Button
variant={Variant.PRIMARY}
iconLeft={<i>icon</i>}
>
Hello world
</Button>
);

expect(container.find('button').find('i').text()).toContain('icon');
});

it('should render button with icon left', () => {
const container = shallow(
<Button
variant={Variant.PRIMARY}
iconRight={<i>icon</i>}
>
Hello world
</Button>
);

expect(container.find('button').find('i').text()).toContain('icon');
});
});
68 changes: 68 additions & 0 deletions __tests__/Card.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { render } from 'enzyme';
import React from 'react';
import Card from '@/components/Card/Card';
import CardContent from '@/components/Card/Content';
import CardHeader from '@/components/Card/Header';
import { Variant } from '@/components';

describe('Card test', () => {
it('should render card', () => {
const container = render(
<div>
<Card />
</div>
);

expect(container.find('.card').length).toBe(1);
});

it('should render card header', () => {
const container = render(
<div>
<Card>
<Card.Header title="Foo" />
<CardHeader title="Foo" />
Hello world
</Card>
</div>
);

expect(container.find('.card .card-header').length).toBe(2);
});

it('should render card header with actions', () => {
const container = render(
<div>
<Card>
<Card.Header title="Foo" actions={[<div key="1" className="foo"/>, null]} />
Hello world
</Card>
</div>
);

expect(container.find('.card .card-header .card-header-action').length).toBe(1);
});

it('should render card content', () => {
const container = render(
<div>
<Card>
<Card.Content>Content</Card.Content>
<CardContent>Content</CardContent>
</Card>
</div>
);

expect(container.find('.card .card-content').text()).toBe('ContentContent');
});

it('should render variant card ', () => {
const container = render(
<div>
<Card variant={Variant.PRIMARY} />
</div>
);

expect(container.find('.card.card-primary').length).toBe(1);
});
});
25 changes: 25 additions & 0 deletions __tests__/Container.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { render } from 'enzyme';
import React from 'react';
import Container from '@/components/Container/Container';

describe('Container test', () => {
it('should render container', () => {
const container = render(
<div>
<Container/>
</div>
);

expect(container.find('.container').length).toBe(1);
});

it('should render fluid container', () => {
const container = render(
<div>
<Container fluid/>
</div>
);

expect(container.find('.container-fluid').length).toBe(1);
});
});
Loading