Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
86329df
fix: eject from create react app; prep for linting (#107)
bcullman Dec 18, 2018
6b35aaf
fix: cleanup package (#116)
bcullman Dec 19, 2018
e31570f
fix: init linting (#106)
bcullman Dec 20, 2018
3181e54
fix: Add Polyfill for IE11 support (#117)
jeffredodd Dec 21, 2018
fbb4b08
fix: init coverage (#119)
bcullman Dec 21, 2018
b2a4ac7
fix: move lint extend react-app to eslintrc. comment out due to faili…
bcullman Dec 21, 2018
e1c4a2d
adds additional class that adds space between the components, remove …
InnaAtanasova Dec 21, 2018
da673c2
Issue#121: refactor search input (#122)
InnaAtanasova Dec 21, 2018
fa2b331
Issue#90: adds shellbar component implementation, popover refactoring…
InnaAtanasova Dec 21, 2018
44df1ce
Update README.md
InnaAtanasova Dec 27, 2018
331abdd
Adds a button that shows/hides the example code snippets (#127)
InnaAtanasova Jan 2, 2019
cd40ddf
Update webpack dev server (#131)
chrismanciero Jan 2, 2019
87167f0
Feature/issue#93 spreading props (#129)
InnaAtanasova Jan 2, 2019
60bc87d
Update unit tests (#132)
chrismanciero Jan 2, 2019
cf49f0c
Update README.md
InnaAtanasova Jan 2, 2019
f08efc5
Update README.md
InnaAtanasova Jan 2, 2019
2f33b38
Update README.md
InnaAtanasova Jan 2, 2019
eeae6ee
Update README.md
InnaAtanasova Jan 2, 2019
fd52b0c
Update README.md
InnaAtanasova Jan 2, 2019
5c9411a
Update README.md
InnaAtanasova Jan 2, 2019
1681fd8
Update README.md
InnaAtanasova Jan 2, 2019
c9403a2
Adds icons and notification count in the dropdown menu when items col…
InnaAtanasova Jan 3, 2019
48eb44c
#130 fix the library build (#133)
droshev Jan 3, 2019
c149a59
Implement a "copy" button in the playground code snippets (#135)
CodesOfRa Jan 3, 2019
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
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea/
*.css
*.opts
*.scss
*.snap
*.svg
node_modules/**
146 changes: 146 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
env:
browser: true
node: true
es6: true
jest: true

globals:
$: true

parser: 'babel-eslint'

#extends: 'react-app'

plugins:
- ie11
- jsx-a11y
- loosely-restrict-imports
- react

rules:
#brace-style: 2
camelcase: 2
comma-dangle: [2, 'never']
comma-spacing: 2
comma-style: [2, 'last']
#compat/compat: 2
default-case: 2
dot-notation: 2
eol-last: 2
#eqeqeq: 2
guard-for-in: 2
handle-callback-err: 2
ie11/no-collection-args: 2
ie11/no-for-in-const: 2
ie11/no-weak-collections: 2
#indent: [2, 4, {"SwitchCase": 1}]
jsx-a11y/accessible-emoji: 2
jsx-a11y/alt-text: 2
#jsx-a11y/anchor-has-content: 2
#jsx-a11y/anchor-is-valid: 2
jsx-a11y/aria-activedescendant-has-tabindex: 2
jsx-a11y/aria-props: 2
jsx-a11y/aria-proptypes: 2
#jsx-a11y/aria-role: 2
jsx-a11y/aria-unsupported-elements: 2
#jsx-a11y/click-events-have-key-events: 2
jsx-a11y/heading-has-content: 2
jsx-a11y/html-has-lang: 2
jsx-a11y/iframe-has-title: 2
jsx-a11y/img-redundant-alt: 2
#jsx-a11y/interactive-supports-focus: 2
jsx-a11y/label-has-for: [2, {'allowChildren': true, 'required': {'every': [ 'id' ]}}]
jsx-a11y/media-has-caption: 2
jsx-a11y/mouse-events-have-key-events: 2
jsx-a11y/no-access-key: 2
jsx-a11y/no-autofocus: 2
jsx-a11y/no-distracting-elements: 2
jsx-a11y/no-interactive-element-to-noninteractive-role: 2
#jsx-a11y/no-noninteractive-element-interactions: 2
#jsx-a11y/no-noninteractive-element-to-interactive-role: [2, { ul: ['tablist', 'menu']}]
jsx-a11y/no-noninteractive-tabindex: 2
#jsx-a11y/no-onchange: 2
jsx-a11y/no-redundant-roles: 2
#jsx-a11y/no-static-element-interactions: 2
jsx-a11y/role-has-required-aria-props: 2
#jsx-a11y/role-supports-aria-props: 2
jsx-a11y/scope: 2
jsx-a11y/tabindex-no-positive: 2
jsx-quotes: [ 2, prefer-single ]
key-spacing: 2
keyword-spacing: [2, { 'before': true }]
loosely-restrict-imports/loosely-restrict-imports: [2, '.jsx']
new-cap: 2
no-cond-assign: 2
#no-console: 2
no-constant-condition: 2
no-control-regex: 2
no-debugger: 2
no-dupe-args: 2
no-dupe-keys: 2
no-duplicate-case: 2
no-empty-character-class: 2
#no-empty: 2
no-ex-assign: 2
no-extra-bind: 2
no-extra-boolean-cast: 0
no-extra-parens: 0
no-extra-semi: 2
no-fallthrough: 2
no-floating-decimal: 2
no-func-assign: 2
no-inner-declarations: 2
no-invalid-regexp: 2
no-irregular-whitespace: 2
no-loop-func: 2
no-mixed-spaces-and-tabs: 2
no-multi-spaces: 2
no-negated-in-lhs: 2
#no-nested-ternary: 2
no-obj-calls: 2
no-regex-spaces: 2
#no-shadow: 2
no-spaced-func: 2
#no-sparse-arrays: 2
no-trailing-spaces: 2
no-undef: 2
#no-undefined: 2
no-underscore-dangle: 0
no-unreachable: 2
#no-unused-vars: [2, { ignoreRestSiblings: true }]
quote-props: [2, 'as-needed', { 'keywords': true, 'unnecessary': false }]
quotes: [2, 'single']
#radix: 2
react/display-name: 2
react/jsx-boolean-value: 2
react/jsx-closing-bracket-location: [2, 'after-props']
react/jsx-equals-spacing: [2, 'never']
react/jsx-indent: 2
react/jsx-indent-props: 2
react/jsx-max-props-per-line: [2, { "maximum": 2 }]
react/jsx-no-undef: 2
react/jsx-tag-spacing: [2, { "beforeSelfClosing": "always" }]
#react/jsx-sort-props: 2
react/jsx-uses-react: 2
react/jsx-uses-vars: 2
react/jsx-wrap-multilines: 2
react/no-did-mount-set-state: 2
react/no-did-update-set-state: 2
#react/no-multi-comp: 2
react/no-unknown-property: 2
#react/prop-types: 2
#react/react-in-jsx-scope: 2
react/self-closing-comp: 2
react/sort-prop-types: [2, { 'callbacksLast' : true, 'ignoreCase' : true, 'requiredFirst' : true, } ]
semi-spacing: 2
semi: 2
#sort-imports: [2, { 'ignoreCase': true, 'ignoreMemberSort': false, 'memberSyntaxSortOrder': ['none', 'single', 'multiple', 'all'] }]
space-before-blocks: 2
space-before-function-paren: [2, 'never']
space-infix-ops: 2
spaced-comment: [0, 'always', { exceptions: ['-']}]
strict: [2, 'global']
#use-isnan: 2
#valid-jsdoc: [2, { prefer: { 'return': 'returns'}}]
#valid-typeof: 2
wrap-iife: [2, 'any']
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/node-modules
/scripts
/src
/config
/ci-scripts
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ branches:
only:
- develop
- "/^feature\\/.*$/"
- "/^fix\\/.*$/"
jobs:
include:
- stage: "Fundamental-react build"
- stage: "Fundamental-react: Lint"
script: npm run lint
- stage: "Fundamental-react: Test"
name: "Unit tests"
script: "./ci-scripts/unit-tests.sh"
script: npm run test:coverage
notifications:
email:
on_failure: always
Expand Down
92 changes: 61 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Fundamental-react
React.JS components for [SAP Fiori Fundamentals](https://github.com/SAP/fundamental)

- [Playground](https://sap.github.io/fundamental-react/)
- [npm package fundamental-react](https://www.npmjs.com/package/fundamental-react)
- [![Build Status](https://travis-ci.org/SAP/fundamental-react.svg?branch=develop)](https://travis-ci.org/SAP/fundamental-react)
- [GitHub repo of Angular implementation of SAP Fiori Fundamentals](https://github.com/SAP/fundamental-ngx)
- [GitHub repo of Vue implementation of SAP Fiori Fundamentals](https://github.com/SAP/fundamental-vue)
Fundamental-react is a set of [React.JS](https://reactjs.org/) components implementation of [SAP Fiori Fundamentals library](https://sap.github.io/fundamental/).

**[Component Documentation](https://sap.github.io/fundamental-react/)**

## Current Version

```
0.0.8-beta
```

## Build Status
[![Build Status](https://travis-ci.org/SAP/fundamental-react.svg?branch=develop)](https://travis-ci.org/SAP/fundamental-react)

## Description

Fundamental-react is a set of [React](https://reactjs.org/) components implementation of [SAP Fiori Fundamentals library](https://sap.github.io/fundamental/). SAP Fiori Fundamentals library is a Design System and HTML/CSS Component Library used to build modern Product User Experiences with the SAP look and feel. This will allow you to stay/use React for your application and get SAP look and feel.
Fundamental-react is an open source library and it is open for contribution as long as you follow certain [rules/guidelines](./CONTRIBUTING.md).
Fundamental-react is a set of [React.JS](https://reactjs.org/) components implementation of [SAP Fiori Fundamentals library](https://sap.github.io/fundamental/). SAP Fiori Fundamentals library is a Design System and HTML/CSS Component Library used to build modern Product User Experiences with the SAP look and feel. This will allow you to stay/use React for your application and get SAP look and feel.


## Requirements

Expand All @@ -19,53 +24,73 @@ https://www.npmjs.com/get-npm

Some prior knowledge of React is required for using this library.

## Available Scripts (Associated with Create React App)
# Getting started

## Install

To download and use this library, you first need to install the node package manager - [npm](https://www.npmjs.com/get-npm).

1. Install Fiori Fundamentals:

`npm install --save fiori-fundamentals`

2. Install Fundamental-react:

`npm install --save fundamental-react`

[npm package for fundamental-react](https://www.npmjs.com/package/fundamental-react)

3. Include the Fiori Fundamentals CSS in your React application. In your App.css or App.scss file include the following lines:

```
$fd-icons-path: "~fiori-fundamentals/scss/icons/";
$fd-fonts-path: "~fiori-fundamentals/scss/fonts/";
@import '../node_modules/fiori-fundamentals/scss/all.scss';
```

You can now use the [Component Documentation](https://sap.github.io/fundamental-react/) to browse the components currently available with Fundamental Vue. To use a Fundamental-react component, paste the desired code snippet from the Component Documentation and configure it as necessarry:


...
<Button compact>Compact</Button>

<Icon glyph="cart" size="l" />
...


## Available Scripts

#### `npm start`
`npm start`

Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will automatically reload on changes.<br>
Lint errors are shown in the console.

#### `npm test`
`npm test`

Launches the test runner in the interactive watch mode.

#### `npm test -- --coverage`
`npm test -- --coverage`

Launches the test runner and display code coverage report.

#### `npm test -- --coverage --watch`
`npm test -- --coverage --watch`

Launches the test runner and display code coverage report and interactive watch mode.

#### `npm run build`
`npm run build`

Builds the app for production to the `build` folder.

## Download and Installation

#### 1. Download Fiori Fundamentals:

`npm install --save fiori-fundamentals`

#### 2. Include the Fiori Fundamentals CSS in your React application. In your App.css or App.scss file include the following lines:

```
$fd-icons-path: "~fiori-fundamentals/scss/icons/";
$fd-fonts-path: "~fiori-fundamentals/scss/fonts/";
@import '../node_modules/fiori-fundamentals/scss/all.scss';
```

## Known Issues

Click [here](https://github.com/SAP/fundamental-react/issues) to view the current issues.
There are no known major issues.

## How to obtain support

If you encounter an issue, you can [create a ticket](https://github.com/SAP/fundamental-react/issues)
If you encounter an issue, you can [create a ticket](https://github.com/SAP/fundamental-react/issues/new)

## Contributing

Expand All @@ -75,3 +100,8 @@ If you want to contribute, please check the [CONTRIBUTING.md](./CONTRIBUTING.md)

Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the [LICENSE file](https://github.com/SAP/fundamental-react/blob/master/LICENSE.txt)

## Similar Projects
- [GitHub repo of Angular implementation of SAP Fiori Fundamentals](https://github.com/SAP/fundamental-ngx)
- [GitHub repo of Vue implementation of SAP Fiori Fundamentals](https://github.com/SAP/fundamental-vue)

Loading