diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 7477182..0000000 --- a/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["react", "es2015", "stage-0"], - "plugins": "transform-runtime" -} diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 259cf3d..0000000 --- a/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# http://editorconfig.org - -root = true - -[*] - -# Change these settings to your own preference -indent_style = space -indent_size = 2 - -# We recommend you to keep these unchanged -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index f9a7f8d..0000000 --- a/.eslintrc +++ /dev/null @@ -1,293 +0,0 @@ -{ - "parser": "babel-eslint", - "plugins": [ - "react", - "babel" - ], - "env": { - "browser": true, - "node": true, - "mocha": true, - "es6": true - }, - "ecmaFeatures": { - "jsx": true, - "modules": true, - "globalReturn": false - }, - "globals": { - "__DEVELOPMENT__": true, - "__DEVTOOLS__": true - }, - "rules": { - "comma-dangle": 2, - "no-cond-assign": 2, - "no-console": 1, - "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-boolean-cast": 2, - "no-extra-parens": 0, - "no-extra-semi": 2, - "no-func-assign": 2, - "no-inner-declarations": 2, - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-negated-in-lhs": 2, - "no-obj-calls": 2, - "no-regex-spaces": 2, - "no-sparse-arrays": 2, - "no-unreachable": 2, - "use-isnan": 2, - "valid-jsdoc": 2, - "valid-typeof": 2, - "no-unexpected-multiline": 2, - - "accessor-pairs": 2, - "block-scoped-var": 2, - "complexity": [1, 20], - "consistent-return": 2, - "curly": 2, - "default-case": 2, - "dot-notation": 2, - "dot-location": [2, "property"], - "eqeqeq": 2, - "guard-for-in": 2, - "no-alert": 2, - "no-caller": 2, - "no-case-declarations": 2, - "no-div-regex": 2, - "no-else-return": 2, - "no-empty-label": 2, - "no-empty-pattern": 2, - "no-eq-null": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-implicit-coercion": 2, - "no-implied-eval": 2, - "no-invalid-this": 0, - "no-iterator": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-loop-func": 2, - "no-magic-numbers": 0, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-native-reassign": 2, - "no-new-func": 2, - "no-new-wrappers": 2, - "no-new": 2, - "no-octal-escape": 2, - "no-octal": 2, - "no-param-reassign": 2, - "no-process-env": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-return-assign": 2, - "no-script-url": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-throw-literal": 2, - "no-unused-expressions": 2, - "no-useless-call": 2, - "no-useless-concat": 2, - "no-void": 2, - "no-warning-comments": [1, {"terms": ["todo", "fixme", "xxx"], "location": "start"}], - "no-with": 2, - "radix": 2, - "vars-on-top": 2, - "wrap-iife": 2, - "yoda": 2, - - "strict": 0, - - "init-declarations": 2, - "no-catch-shadow": 2, - "no-delete-var": 2, - "no-label-var": 2, - "no-shadow-restricted-names": 2, - "no-shadow": 2, - "no-undef-init": 2, - "no-undef": 2, - "no-undefined": 2, - "no-unused-vars": 2, - "no-use-before-define": 2, - - "callback-return": 2, - "global-require": 0, - "handle-callback-err": [2, "^(err|error)$"], - "no-mixed-requires": 2, - "no-new-require": 2, - "no-path-concat": 2, - "no-process-exit": 2, - "no-restricted-modules": 2, - "no-sync": 2, - - "array-bracket-spacing": 1, - "block-spacing": 1, - "brace-style": 1, - "camelcase": 1, - "comma-spacing": [1, {"before": false, "after": true}], - "comma-style": [1, "last"], - "computed-property-spacing": [1, "never"], - "consistent-this": [1, "that"], - "eol-last": 1, - "func-names": 0, - "func-style": 0, - "id-length": 1, - "id-match": 1, - "indent": [1, 2, {"SwitchCase": 1, "VariableDeclarator": 1}], - "jsx-quotes": [1, "prefer-single"], - "key-spacing": [1, {"beforeColon": false, "afterColon": true}], - "lines-around-comment": [1, {"beforeBlockComment": true, "beforeLineComment": true }], - "linebreak-style": [1, "unix"], - "max-nested-callbacks": [1, 4], - "new-cap": 0, - "new-parens": 1, - "newline-after-var": 1, - "no-array-constructor": 1, - "no-continue": 1, - "no-inline-comments": 1, - "no-lonely-if": 1, - "no-mixed-spaces-and-tabs": 1, - "no-multiple-empty-lines": [1, {"max": 2}], - "no-nested-ternary": 1, - "no-negated-condition": 1, - "no-new-object": 1, - "no-restricted-syntax": 1, - "no-spaced-func": 1, - "no-ternary": 0, - "no-trailing-spaces": 1, - "no-underscore-dangle": 0, - "no-unneeded-ternary": 1, - "object-curly-spacing": 0, - "one-var": [1, "never"], - "operator-assignment": [1, "always"], - "operator-linebreak": [1, "before", { - "overrides": { - "=": "after", - "+=": "after", - "-=": "after", - "*=": "after", - "/=": "after" - } - }], - "padded-blocks": [1, "never"], - "quote-props": [1, "as-needed"], - "quotes": [1, "single"], - "require-jsdoc": 0, - "semi-spacing": [1, {"before": false, "after": true}], - "semi": [1, "always"], - "sort-vars": 0, - "space-after-keywords": [1, "always"], - "space-before-keywords": [0, "always"], - "space-before-blocks": [1, "always"], - "space-before-function-paren": [1, {"anonymous": "always", "named": "never"}], - "space-in-parens": [1, "never"], - "space-infix-ops": 1, - "space-return-throw-case": 1, - "space-unary-ops": [1, {"words": true, "nonwords": false}], - "spaced-comment": 1, - "wrap-regex": 1, - - "arrow-body-style": 1, - "arrow-parens": 0, - "arrow-spacing": 1, - "constructor-super": 2, - "generator-star-spacing": 0, - "no-arrow-condition": 2, - "no-class-assign": 2, - "no-const-assign": 2, - "no-dupe-class-members": 2, - "no-this-before-super": 2, - "no-var": 2, - "object-shorthand": 0, - "prefer-arrow-callback": 1, - "prefer-const": 1, - "prefer-spread": 1, - "prefer-reflect": 1, - "prefer-template": 1, - "require-yield": 2, - - "max-depth": [1, 5], - "max-len": [1, 100, 2], - "max-params": [1, 8], - "max-statements": [1, 50], - "no-bitwise": 1, - "no-plusplus": 1, - - "react/display-name": 0, - "react/forbid-prop-types": 1, - "react/jsx-boolean-value": 1, - "react/jsx-closing-bracket-location": 1, - "react/jsx-curly-spacing": 1, - "react/jsx-equals-spacing": 1, - "react/jsx-handler-names": 1, - "react/jsx-indent-props": [1, 2], - "react/jsx-indent": [1, 2], - "react/jsx-key": 0, - "react/jsx-max-props-per-line": 0, - "react/jsx-no-bind": 1, - "react/jsx-no-duplicate-props": 1, - "react/jsx-no-literals": 0, - "react/jsx-no-undef": 1, - "react/jsx-pascal-case": 1, - "react/jsx-sort-prop-types": 1, - "react/jsx-sort-props": 1, - "react/jsx-uses-react": 1, - "react/jsx-uses-vars": 1, - "react/no-danger": 1, - "react/no-deprecated": 1, - "react/no-did-mount-set-state": 1, - "react/no-did-update-set-state": 1, - "react/no-direct-mutation-state": 1, - "react/no-is-mounted": 1, - "react/no-multi-comp": 0, - "react/no-set-state": 0, - "react/no-string-refs": 1, - "react/no-unknown-property": 1, - "react/prop-types": 1, - "react/react-in-jsx-scope": 1, - "react/require-extension": 1, - "react/self-closing-comp": 1, - "react/sort-comp": 1, - "react/wrap-multilines": 1, - "react/prefer-es6-class": 1, - - "babel/generator-star-spacing": 1, - "babel/new-cap": [1, { - "capIsNewExceptions": [ - "List", - "Map", - "OrderedMap", - "Set", - "OrderedSet", - "Stack", - "Range", - "Repeat", - "Record", - "Seq", - "KeyedSeq", - "IndexedSeq", - "SetSeq", - "Iterable", - "KeyedIterable", - "IndexedIterable", - "SetIterable" - ] - }], - "babel/object-curly-spacing": 1, - "babel/object-shorthand": 1, - "babel/arrow-parens": 1, - "babel/no-await-in-loop": 1 - } -} diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 3c96373..0000000 --- a/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -.*rc -.*config -.*.yml -demo -src -server.js -webpack.*.js diff --git a/.sass-lint.yml b/.sass-lint.yml deleted file mode 100644 index 20a7028..0000000 --- a/.sass-lint.yml +++ /dev/null @@ -1,85 +0,0 @@ -options: - formatter: stylish -files: - include: 'src/**/*.s+(a|c)ss' -rules: - # Extends - extends-before-mixins: 1 - extends-before-declarations: 1 - placeholder-in-extend: 1 - - # Mixins - mixins-before-declarations: 1 - - # Line Spacing - one-declaration-per-line: 1 - empty-line-between-blocks: 1 - single-line-per-selector: 1 - - # Disallows - no-color-keywords: 1 - no-color-literals: 1 - no-css-comments: 1 - no-debug: 1 - no-duplicate-properties: 1 - no-empty-rulesets: 1 - no-extends: 0 - no-ids: 1 - no-important: 1 - no-invalid-hex: 1 - no-mergeable-selectors: 1 - no-misspelled-properties: 1 - no-qualifying-elements: 1 - no-trailing-zero: 1 - no-transition-all: 1 - no-url-protocols: 1 - no-vendor-prefixes: 1 - no-warn: 1 - property-units: 1 - - # Nesting - force-attribute-nesting: 1 - force-element-nesting: 1 - force-pseudo-nesting: 1 - - # Name Formats - class-name-format: 1 - function-name-format: 1 - id-name-format: 1 - mixin-name-format: 1 - placeholder-name-format: 1 - variable-name-format: 1 - - # Style Guide - bem-depth: 1 - border-zero: 1 - brace-style: 1 - clean-import-paths: 1 - empty-args: 1 - hex-length: 1 - hex-notation: 1 - indentation: 1 - leading-zero: 1 - nesting-depth: - - 1 - - max-depth: 5 - property-sort-order: 1 - quotes: 1 - shorthand-values: 1 - url-quotes: 1 - variable-for-property: 1 - zero-unit: 1 - - # Inner Spacing - space-after-comma: 1 - space-before-colon: 1 - space-after-colon: 1 - space-before-brace: 1 - space-before-bang: 1 - space-after-bang: 1 - space-between-parens: 1 - space-around-operator: 1 - - # Final Items - trailing-semicolon: 1 - final-newline: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 4d4c583..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,43 +0,0 @@ - -# [0.3.0](https://github.com/aruberto/react-foundation-components/compare/0.3.0...v0.3.0) (2016-02-01) - - -#### Miscellaneous - -* Add badge, flex video, label, progress bar, thumbnail and tooltip media components. - - - -## [0.2.1](https://github.com/aruberto/react-foundation-components/compare/0.2.1...v0.2.1) (2016-01-29) - - -#### Miscellaneous - -* Published wrong version to npm. - - - -# [0.2.0](https://github.com/aruberto/react-foundation-components/compare/0.2.0...v0.2.0) (2016-01-29) - - -#### Miscellaneous - -* Add button, button group, close button and switch control components. - - - -## [0.1.2](https://github.com/aruberto/react-foundation-components/compare/0.1.2...v0.1.2) (2016-01-28) - - -#### Miscellaneous - -* Add release npm scripts. - - - -# [0.1.0](https://github.com/aruberto/react-foundation-components/compare/v0.1.0...v0.1.0) (2016-01-28) - - -#### Miscellaneous - -* Add grid, visibility, float and typography components. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9fa05a7..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Antonio Ruberto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 9164bcb..0000000 --- a/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# react-foundation-components - -Foundation Sites components built with the power of React and CSS Modules! - -## Why? - -I like [React](https://facebook.github.io/react). I like [CSS Modules](https://github.com/css-modules/css-modules). I like [Foundation Sites](http://foundation.zurb.com/sites.html). This is an experiment to see if it's possible to combine all these libraries in a modular way! - -## Installation - -``` -npm install --save react-foundation-components -``` - -Please see demo folder for an example webpack setup and example use of each component. Proper documentation to come later ... - -Recommend importing on a per component basis instead of importing the main entry point of package. Importing main entry point will cause final bundle to include all CSS and JS whereas importing on a per component basis will cause your final bundle to only include the CSS and JS you actually need (this may change when tree shaking is introduced in webpack 2)! - -Favor - -``` -import Button from 'react-foundation-components/lib/button'; -import {ShowForScreenSize, HideForScreenSize} from 'react-foundation-components/lib/visibility'; -``` - -over - -``` -import {Button, ShowForScreenSize, HideForScreenSize} from 'react-foundation-components'; -``` - -## Do I have to use CSS Modules? - -No, you can use disable modules flag on css-loader and use Global CSS classes. When modules flag is disabled, the Foundation class names will be used in generated CSS style sheet files and used by components! However there is one caveat to using global CSS classes. The grid and flex-grid systems use same class names (row and column). Therefore you must make sure to NEVER IMPORT BOTH GRID SYSTEMS (which means you must import per component and never import main package entry since importing react-foundation-components will cause both Grid systems to appear in final CSS bundle)! - -## Thanks - -A lot of the components are inspired by [React Bootstrap](https://github.com/react-bootstrap/react-bootstrap) and this project even makes heavy use their utility libraries like [react-overlays](https://github.com/react-bootstrap/react-overlays), [dom-helpers](https://github.com/react-bootstrap/dom-helpers), [react-prop-types](https://github.com/react-bootstrap/react-prop-types) and [uncontrollable](https://github.com/jquense/uncontrollable). So big thanks to all these project's contributers for all their amazing work! diff --git a/demo/containers/accordion/index.js b/demo/containers/accordion/index.js deleted file mode 100644 index 2aac312..0000000 --- a/demo/containers/accordion/index.js +++ /dev/null @@ -1,192 +0,0 @@ -import React, {Component} from 'react'; - -import {Accordion, AccordionItem} from '../../../src'; - -export default class AccordionPage extends Component { - constructor(props) { - super(props); - - this.state = { - activeKey: '1', - activeKeys: ['1', '3'] - }; - } - - handleSingleSelect = (nextActiveKey) => { - const {activeKey: prevActiveKey} = this.state; - const activeKey = nextActiveKey === prevActiveKey ? null : nextActiveKey; - - this.setState({activeKey}); - }; - - handleMultiSelect = (nextActiveKey) => { - const {activeKeys: prevActiveKeys} = this.state; - const activeKeys = - prevActiveKeys.includes(nextActiveKey) - ? prevActiveKeys.filter((item) => item !== nextActiveKey) - : prevActiveKeys.concat([nextActiveKey]); - - this.setState({activeKeys}); - }; - - render() { - const {activeKey, activeKeys} = this.state; - - return ( -
It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -It has an easy to override visual style, and is appropriately subdued.
- It's dangerous to go alone, take this. -- I'm going to improvise. Listen, there's something you should know about me... about - inception. An idea is like a virus, resilient, highly contagious. The smallest seed - of an idea can grow. It can grow to define or destroy you. -
-- So, once we've made the plant, how do we go out? Hope you have something more elegant - in mind than shooting me in the head? A kick. Whats a kick? This, Ariadne, would be a - kick. -
-- What is the most resilient parasite? Bacteria? A virus? An intestinal worm? An idea. - Resilient... highly contagious. Once an idea has taken hold of the brain it's almost - impossible to eradicate. An idea that is fully formed - fully understood - that - sticks; right in there somewhere. -
-
- - Shrink the browser width to see me stack. I do tricks for dog treats, but I'm not a - dog. -
-| Table Header | -Table Header | -Table Header | -Table Header | -
|---|---|---|---|
| Content Goes Here | -This is longer content Donec id elit non mi porta gravida at eget metus. | -Content Goes Here | -Content Goes Here | -
| Content Goes Here | -- This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus. - | -Content Goes Here | -Content Goes Here | -
| Content Goes Here | -- This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus. - | -Content Goes Here | -Content Goes Here | -
| Table Header | -Table Header | -Table Header | -Table Header | -
|---|---|---|---|
| Content Goes Here | -This is longer content Donec id elit non mi porta gravida at eget metus. | -Content Goes Here | -Content Goes Here | -
| Content Goes Here | -- This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus. - | -Content Goes Here | -Content Goes Here | -
| Content Goes Here | -- This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus. - | -Content Goes Here | -Content Goes Here | -
| Cookies | -Taste | -Calories | -Overall | -
|---|---|---|---|
| Chocolate Chip | -Tastey | -120cal | -7.5/10 | -
| Snickerdoodle | -Delicious | -95cal | -8/10 | -
| Oatmeal Raisin | -Superb | -10cal | -11/10 | -
| This is the description! | -One | -Two | -Three | -Four | -Five | -Six | -Seven | -Eight | -Nine | -Ten | -Eleven | -Twelve | -
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - These are all the words that people use to describe Foundation 6! - | -Cool | -Swag | -Chill | -Killer | -Rad | -Baller | -OMG | -Sweet | -Awesome | -Beast | -Dope | -Tubular | -
| These are some words that people use to describe other web frameworks. | -Whatevs | -Ugh. | -LOL | -K | -Aight | -Eh. | -Grrr... | -Meh. | -TTYL | -Bleh. | -Really? | -Why? | -
| Here are some great super heros. | -Batman | -Superman | -Spiderman | -Wonder Woman | -Hulk | -Nicolas Cage | -Antman | -Aquaman | -Captain America | -Wolverine | -Thor | -Iron Man | -
| Here's a footer, just in case | -- | - | - | - | - | - | - | - | - | - | - | - |
- - Re: re: re: you won't believe what's in this email! -
- -- Re: re: re: you won't believe what's in this email! -
- - - -
- This is a bottom tooltip demo and
-
- This is a paragraph. Paragraphs are preset with a font size, line height and spacing to - match the overall vertical rhythm. To show what a paragraph looks like this needs a little - more content so, did you know that there are storms occurring on Jupiter that are larger - than the Earth? Pretty cool. Wrap strong around type to make it bold!. - You can also use em to italicize your words. -
-- Links are very standard, and the color is preset to the Foundation primary color. - - Learn more about Foundation's global colors. - -
-- Those people who think they know everything are a great annoyance to those of us who do. - Isaac Asimov --
- In my dream last night, I saw J. R. R. Tolkien and - George R. R. Martin hanging out on - Sunset Blvd. -
- Remember to escape angle brackets when printing HTML:<div>
- Press Cmd+Q (or Ctrl+Q on Windows) to play Half-Life 3.
-
- -1&&e%1==0&&e=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return 0===e.button}function o(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function u(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function i(e,t){var n=t.query,r=t.hash,l=t.state;return n||r||l?{pathname:e,query:n,hash:r,state:l}:e}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t