This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 2
- Loading branch information
Showing
52 changed files
with
4,070 additions
and
1,816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
dist | ||
test/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
dist | ||
node_modules | ||
/test/coverage | ||
.DS_Store | ||
|
||
.docz/** | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
import React from 'react'; | ||
import {createGlobalStyle} from 'styled-components'; | ||
import ThemeSection from '../../src/ThemeSection'; | ||
|
||
import theme from '../../src/theme'; | ||
|
||
import 'focus-visible'; | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
*:focus:not(:focus-visible) { | ||
outline: none; | ||
} | ||
*:focus:not(.focus-visible) { | ||
outline: none; | ||
} | ||
`; | ||
|
||
const Wrapper = ({children}) => ( | ||
<ThemeSection name="page" baseTheme={theme}> | ||
{children} | ||
</ThemeSection> | ||
<> | ||
<GlobalStyle /> | ||
<ThemeSection name="page" baseTheme={theme}> | ||
{children} | ||
</ThemeSection> | ||
</> | ||
); | ||
|
||
export default Wrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
verbose: true, | ||
coverageReporters: ['html'], | ||
coverageDirectory: './test/coverage', | ||
testEnvironment: 'jsdom', | ||
collectCoverageFrom: [ | ||
'**/*.{js}', | ||
'!**/docz/**', | ||
'!**/node_modules/**', | ||
'!**/test/**', | ||
], | ||
coveragePathIgnorePatterns: ['/node_modules/', '/docz/', '/test/'], | ||
modulePathIgnorePatterns: ['/node_modules/', '/docz/'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,104 @@ | ||
{ | ||
"name": "base5-ui", | ||
"version": "1.14.18", | ||
"description": "5app's reusable UI component library", | ||
"main": "index.js", | ||
"scripts": { | ||
"build-icons": "pixo src-icons/svg --out-dir src/icons --template src-icons/template.js", | ||
"compile": "babel src --out-dir dist", | ||
"copypackage": "cp -rf package.json README.md dist", | ||
"predist": "npm run copypackage", | ||
"dist": "cd dist && npm publish", | ||
"docz:dev": "docz dev", | ||
"docz:build": "docz build", | ||
"deploy-docs": "npm run docz:build && gh-pages -d .docz/dist -m 'Update docs [skip ci]'", | ||
"lint": "eslint ./", | ||
"postversion": "pwd && cp -r package.json ../", | ||
"semantic-release": "semantic-release", | ||
"test": "npm run lint" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/5app/base5-ui.git" | ||
}, | ||
"author": "Dionysos Dajka", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/5app/base5-ui/issues" | ||
}, | ||
"homepage": "https://github.com/5app/base5-ui#readme", | ||
"devDependencies": { | ||
"@babel/cli": "^7.4.4", | ||
"@babel/core": "^7.4.5", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.4.4", | ||
"@babel/plugin-transform-react-jsx": "^7.3.0", | ||
"@babel/preset-env": "^7.4.5", | ||
"@semantic-release/changelog": "^3.0.4", | ||
"@semantic-release/git": "^7.0.14", | ||
"babel-eslint": "^10.0.2", | ||
"babel-plugin-styled-components": "^1.10.2", | ||
"docz": "^1.2.0", | ||
"docz-theme-default": "^1.2.0", | ||
"eslint": "^5.5.0", | ||
"eslint-config-5app": "^0.6.4", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.2", | ||
"gh-pages": "^2.0.1", | ||
"pixo": "^1.1.2", | ||
"prettier": "1.18.2", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.8.1", | ||
"react-dom": "^16.8.1", | ||
"semantic-release": "^15.13.12", | ||
"styled-components": "^4.0.1-0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.1", | ||
"styled-components": "^4.3.2" | ||
}, | ||
"dependencies": { | ||
"chroma-js": "^2.0.4", | ||
"classnames": "^2.2.6", | ||
"prop-types": "^15.7.2", | ||
"react-hook-size": "^1.3.0", | ||
"react-popper": "^1.3.3" | ||
}, | ||
"release": { | ||
"branch": "master", | ||
"prepare": [ | ||
"@semantic-release/changelog", | ||
{ | ||
"path": "@semantic-release/npm", | ||
"pkgRoot": "dist" | ||
}, | ||
{ | ||
"path": "@semantic-release/git", | ||
"assets": [ | ||
"package.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"pkgRoot": "dist" | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} | ||
"name": "base5-ui", | ||
"version": "2.0.1", | ||
"description": "5app's reusable UI component library", | ||
"main": "index.js", | ||
"scripts": { | ||
"build-icons": "pixo src-icons/svg --out-dir src/icons --template src-icons/template.js", | ||
"compile": "babel src --out-dir dist", | ||
"copypackage": "cp -rf package.json README.md dist", | ||
"predist": "npm run copypackage", | ||
"dist": "cd dist && npm publish", | ||
"docz:dev": "docz dev", | ||
"docz:build": "docz build", | ||
"deploy-docs": "npm run docz:build && gh-pages -d .docz/dist -m 'Update docs [skip ci]'", | ||
"lint": "eslint ./", | ||
"postversion": "pwd && cp -r package.json ../", | ||
"semantic-release": "semantic-release", | ||
"test": "jest /src && npm run lint", | ||
"test:cover": "jest /src --coverage && npm run lint" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/5app/base5-ui.git" | ||
}, | ||
"author": "Dionysos Dajka", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/5app/base5-ui/issues" | ||
}, | ||
"homepage": "https://github.com/5app/base5-ui#readme", | ||
"devDependencies": { | ||
"@babel/cli": "^7.4.4", | ||
"@babel/core": "^7.4.5", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.4.4", | ||
"@babel/plugin-transform-react-jsx": "^7.3.0", | ||
"@babel/preset-env": "^7.4.5", | ||
"@semantic-release/changelog": "3.0.4", | ||
"@semantic-release/git": "7.0.14", | ||
"@testing-library/react": "8.0.4", | ||
"babel-eslint": "^10.0.2", | ||
"babel-plugin-styled-components": "^1.10.2", | ||
"docz": "^1.2.0", | ||
"docz-theme-default": "^1.2.0", | ||
"eslint": "^5.5.0", | ||
"eslint-config-5app": "^0.6.4", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.2", | ||
"eslint-plugin-react-hooks": "^1.6.1", | ||
"gh-pages": "^2.0.1", | ||
"jest": "23.1.0", | ||
"jest-dom": "3.5.0", | ||
"pixo": "^1.1.2", | ||
"prettier": "^1.18.2", | ||
"prop-types": "15.7.2", | ||
"react": "16.8.6", | ||
"react-dom": "16.8.6", | ||
"semantic-release": "^15.13.12", | ||
"styled-components": "4.3.2" | ||
}, | ||
"peerDependencies": { | ||
"react": "16.8.6", | ||
"styled-components": "4.3.2" | ||
}, | ||
"dependencies": { | ||
"chroma-js": "^2.0.4", | ||
"classnames": "^2.2.6", | ||
"focus-visible": "^4.1.5", | ||
"prop-types": "15.7.2", | ||
"react-hook-size": "1.3.0", | ||
"react-popper": "1.3.3" | ||
}, | ||
"release": { | ||
"branch": "master", | ||
"prepare": [ | ||
"@semantic-release/changelog", | ||
{ | ||
"path": "@semantic-release/npm", | ||
"pkgRoot": "dist" | ||
}, | ||
{ | ||
"path": "@semantic-release/git", | ||
"assets": [ | ||
"package.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"pkgRoot": "dist" | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: Box | ||
menu: Components | ||
--- | ||
|
||
import { Playground, Props } from 'docz' | ||
import Box from './' | ||
|
||
# Box | ||
|
||
`Box` is a generic layout primitive, exposing many useful props for controlling style and layout of the component. | ||
|
||
The following properties can be changed: | ||
|
||
- Position | ||
- Margin and padding | ||
- Border | ||
- Flex behaviour (grow, shrink, basis, flexAlign) | ||
- Text styles (bold, dimmed, textAlign, overflow, caps) | ||
|
||
## Examples | ||
|
||
<Playground> | ||
<Box border="bottom" pb="s"> | ||
Hello | ||
</Box> | ||
<Box bold mt="s" p="s"> | ||
Hello | ||
</Box> | ||
</Playground> | ||
|
||
## Props | ||
|
||
<Props of={Box} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import styled from 'styled-components'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import { | ||
positionProps, | ||
flexProps, | ||
spacingProps, | ||
borderProps, | ||
textProps, | ||
} from '../styleProps'; | ||
|
||
const Box = styled.div` | ||
${positionProps} | ||
${flexProps} | ||
${spacingProps} | ||
${borderProps} | ||
${textProps} | ||
`; | ||
|
||
Box.propTypes = { | ||
position: PropTypes.oneOf(['static', 'relative', 'absolute', 'fixed']), | ||
border: PropTypes.oneOf(['top', 'right', 'bottom', 'left']), | ||
flexAlign: PropTypes.oneOf(['top', 'left', 'center', 'bottom', 'right']), | ||
basis: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
grow: PropTypes.bool, | ||
shrink: PropTypes.bool, | ||
bold: PropTypes.bool, | ||
caps: PropTypes.oneOf(['all', 'first']), | ||
dimmed: PropTypes.bool, | ||
fontSize: PropTypes.string, | ||
lineHeight: PropTypes.number, | ||
overflow: PropTypes.oneOf(['ellipsis', 'wrap']), | ||
textAlign: PropTypes.oneOf(['left', 'center', 'right']), | ||
}; | ||
|
||
export default Box; |
Oops, something went wrong.