diff --git a/.babelrc b/.babelrc deleted file mode 100644 index b68280bc8e..0000000000 --- a/.babelrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": [ - "es2015", - "react" - ], - "plugins": [ - 'transform-object-rest-spread' - ] -} diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index d691ddf0cc..0000000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.js] -indent_style = space -indent_size = 4 - -[package.json] -indent_style = space -indent_size = 2 diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 5b580efd29..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "env": { - "es6": true, - "browser": true, - "node": true - }, - "extends": "eslint-config-ffe", - "parserOptions": { - sourceType: "module", - "ecmaFeatures": { - "jsx": true - } - }, - "plugins": [ - "react", - "jsx-a11y" - ], - - "globals": { - "describe": true, - "it": true - }, - "rules": { - "react/prefer-es6-class": 0, - "curly": 0, - "no-script-url": 0, - "react/require-render-return": 0 - } -} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 391f0a4e4b..0000000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -* text=auto -*.js text eol=lf diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d9fee5c29f..0000000000 --- a/.gitignore +++ /dev/null @@ -1,39 +0,0 @@ -/lib -# Created by https://www.gitignore.io/api/node - -### Node ### -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -node_modules - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history - -example.html \ No newline at end of file diff --git a/.npmignore b/.npmignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 32fd3a789f..0000000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -git-tag-version=false diff --git a/README.md b/README.md deleted file mode 100644 index e77e5bc101..0000000000 --- a/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# ffe-accordion-react - -## Install - -``` -$ npm install --save ffe-accordion-react -``` - -## Usage - -```javascript -import { Accordion, AccordionItem } from 'ffe-accordion-react'; - - - - -``` - -## Test - -# Local - -For å teste endringer lokalt kan man kjøre i dette prosjektes mappe: - -``` -sudo npm link -``` - -Og i prosjektet som skal bruke endringene gjort lokalt kan man kjøre: - -``` -npm link ffe-accordion-react -``` diff --git a/build.sh b/build.sh deleted file mode 100755 index 1932fb0a16..0000000000 --- a/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -npm install -npm test -npm run lint diff --git a/docs/create.js b/docs/create.js deleted file mode 100644 index 8eb9a9087a..0000000000 --- a/docs/create.js +++ /dev/null @@ -1 +0,0 @@ -console.log('This package doesnt have any documentation yet.'); \ No newline at end of file diff --git a/docs/docs.js b/docs/docs.js deleted file mode 100644 index 978a99bfb6..0000000000 --- a/docs/docs.js +++ /dev/null @@ -1,74 +0,0 @@ - \ No newline at end of file diff --git a/flow.sh b/flow.sh deleted file mode 100755 index 8085187d6a..0000000000 --- a/flow.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# Makes functions inherit trap ERR -set -E - - -trap 'executionFailed ${LINENO}' ERR - -function main() { - ./build.sh - - if should_publish; then - npm run has-published -s || npm publish - bob ci job build --jobname ffe-design-system_build_deploy - fi -} - -function should_publish() { - [[ $GIT_BRANCH =~ ^(origin/)?master$ ]] -} - -# Fail the build if someone tries to send it parameters since script doesn't handle params at the moment. -if [ $# -ne 0 ] ; then - echo "Failed the build. flow.sh does not support input parameters. Input parameters were '$@'" - exit 1; -fi - -function executionFailed() { - # Called when some command fail execution - local self=$(basename "$0") - local parent_lineno="$1" - local message="$2" - local resultCode="${3:-1}" - if [[ -n "$message" ]]; then - echo "${self}: Error on or near line ${parent_lineno}: ${message}; exiting with status ${resultCode}" - else - echo "${self}: Error on or near line ${parent_lineno}; exiting with status ${resultCode}" - fi - exit "${resultCode}" -} - -main diff --git a/package.json b/package.json deleted file mode 100644 index dfbd55a087..0000000000 --- a/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "ffe-accordion-react", - "version": "1.0.0", - "main": "lib/index.js", - "scripts": { - "build": "babel -d lib/. --ignore=*.test.js src/. && npm run example", - "watch": "onchange 'src/**.js' -- npm run build", - "lint": "eslint src/.", - "test:nsp": "nsp check", - "test:spec": "mocha --require babel-register src/**/*.test.js", - "test": "npm run test:spec && npm run test:nsp", - "tdd": "mocha --require babel-register src/**/*.test.js -w", - "example": "babel-node docs/create.js > example.html", - "prepublish": "npm run build", - "has-published": "npm show . versions -s | grep -q ${npm_package_version}" - }, - "peerDependencies": { - "react": "^15.0.0", - "ffe-core": "*" - }, - "devDependencies": { - "babel-cli": "^6.4.5", - "babel-core": "^6.5.2", - "babel-plugin-transform-object-rest-spread": "^6.5.0", - "babel-preset-es2015": "^6.3.13", - "babel-preset-react": "^6.5.0", - "babel-register": "^6.4.3", - "chai": "^3.5.0", - "enzyme": "^2.0.0", - "eslint": "^2.9.0", - "eslint-config-ffe": "^2.0.0", - "eslint-plugin-jsx-a11y": "1.2.2", - "mocha": "^2.4.5", - "nsp": "^2.2.0", - "onchange": "2.4.0", - "react-addons-test-utils": "^15.0.0", - "react-dom": "^15.0.0" - }, - "publishConfig": { - "registry": "***REMOVED***" - }, - "files": [ - "lib", - "*.js" - ], - "eslintConfig": { - "extends": "eslint-config-ffe" - }, - "repository": "", - "author": "SpareBank1", - "license": "", - "babel": { - "presets": [ - "react", - "es2015" - ] - }, - "dependencies": { - "classnames": "2.2.5", - "ffe-expandable-react": "0.0.0", - "ffe-icons-react": "0.4.1" - } -} diff --git a/src/accordio.test.js b/src/accordio.test.js deleted file mode 100644 index 4811e6ff7d..0000000000 --- a/src/accordio.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { assert } from 'chai'; - -describe('A New Component', () => { - - it('should do stuff correctly', () => { - assert.equal(true, true); - }); -}); diff --git a/src/accordion-item.js b/src/accordion-item.js deleted file mode 100644 index b7b0743774..0000000000 --- a/src/accordion-item.js +++ /dev/null @@ -1,68 +0,0 @@ -import FFEExpandable from 'ffe-expandable-react'; -import React, { PropTypes } from 'react'; -import Chevron from 'ffe-icons-react/chevron-ikon'; -import classNames from 'classnames'; - -const isIgnoredNode = (node, ignoredNodes) => ignoredNodes.some(name => name === node.nodeName); - -export default React.createClass({ - propTypes: { - isOpen: PropTypes.bool, - ignoredNodeNames: PropTypes.array, - children: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.element, - PropTypes.array - ]).isRequired, - expandedContent: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.element, - PropTypes.array - ]).isRequired - }, - - getInitialState() { - return { isOpen: this.props.isOpen || false }; - }, - - toggle() { - this.setState({ isOpen: !this.state.isOpen }); - }, - - onClick(e) { - const ignoredNodes = this.props.ignoredNodeNames || []; - if (!isIgnoredNode(e.target, ignoredNodes)) this.toggle(); - }, - - render(props) { - const { isOpen } = this.state; - - const iconClasses = classNames('expandable-list-row-icon', { - 'expandable-list-row-icon--open': isOpen - }); - - const rowClasses = classNames('expandable-list-row', { - 'expandable-list-row--open': isOpen - }); - - return
  • - - -
    - { this.props.children } -
    -
    - - { this.props.expandedContent } - } - /> -
  • ; - } -}); \ No newline at end of file diff --git a/src/accordion.js b/src/accordion.js deleted file mode 100644 index a4659520c1..0000000000 --- a/src/accordion.js +++ /dev/null @@ -1,12 +0,0 @@ -import React, { PropTypes } from 'react'; - -export default function ExpandableList(props) { - return ; -} - - -ExpandableList.propTypes = { - children: PropTypes.array.isRequired -}; \ No newline at end of file diff --git a/src/index.js b/src/index.js deleted file mode 100644 index fd9bed78f3..0000000000 --- a/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Accordion from './accordion'; -import AccordionItem from './accordion-item'; - -export { - Accordion, - AccordionItem -} \ No newline at end of file