-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
6,269 additions
and
52,289 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 +1,7 @@ | ||
{ | ||
"name": "@frojdagency/jewl-cli", | ||
"description": "CLI tool for Jewl. Import your components with ease", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Mikael Engström <[email protected]>", | ||
"homepage": "https://github.com/Frojd/Frojd-Jewl/", | ||
"bugs": { | ||
|
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 |
---|---|---|
|
@@ -15,3 +15,4 @@ setupTests.js | |
jest.config.js | ||
public | ||
storybook-static | ||
*.md |
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 |
---|---|---|
|
@@ -315,5 +315,4 @@ const Buttons = ({}) => { | |
|
||
Buttons.propTypes = {}; | ||
|
||
|
||
export default Buttons; |
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 |
---|---|---|
|
@@ -119,5 +119,4 @@ const Typography = ({}) => { | |
|
||
Typography.propTypes = {}; | ||
|
||
|
||
export default Typography; |
3 changes: 3 additions & 0 deletions
3
component-library/app/components/__Component__/__Component__.data.js
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,3 @@ | ||
const data = {}; | ||
|
||
export default data; |
11 changes: 11 additions & 0 deletions
11
component-library/app/components/__Component__/__Component__.js
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,11 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import s from './__Component__.module.scss'; | ||
|
||
const __Component__ = () => { | ||
return <div className={s.Root}>__Component__</div>; | ||
}; | ||
|
||
__Component__.propTypes = {}; | ||
|
||
export default __Component__; |
3 changes: 3 additions & 0 deletions
3
component-library/app/components/__Component__/__Component__.md
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,3 @@ | ||
__Component__ | ||
|
||
[__Component__ source code on Github](https://github.com/Frojd/Frojd-Jewl/tree/develop/component-library/app/components/__Component__) |
4 changes: 4 additions & 0 deletions
4
component-library/app/components/__Component__/__Component__.module.scss
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,4 @@ | ||
@import '../../styles/includes'; | ||
|
||
.Root { | ||
} |
17 changes: 17 additions & 0 deletions
17
component-library/app/components/__Component__/__Component__.stories.js
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,17 @@ | ||
import React from 'react'; | ||
import Component from './__Component__'; | ||
import data from './__Component__.data'; | ||
import readme from './__Component__.md'; | ||
|
||
const Story = { | ||
component: Component, | ||
parameters: { | ||
docs: { description: { component: readme } }, | ||
}, | ||
}; | ||
export default Story; | ||
|
||
const Template = (args) => <Component {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { ...data }; |
26 changes: 26 additions & 0 deletions
26
component-library/app/components/__Component__/__Component__.test.js
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,26 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import React from 'react'; | ||
import 'i18n'; | ||
import { render, screen } from '@testing-library/react'; | ||
import renderer from 'react-test-renderer'; | ||
/* eslint-enable no-unused-vars */ | ||
|
||
import TestComponent, { componentName as testName } from './'; | ||
import data from './__Component__.data'; | ||
|
||
describe(`<${testName} />`, () => { | ||
it(`Renders an empty ${testName}`, () => { | ||
render(<TestComponent />); | ||
}); | ||
|
||
it(`Renders ${testName} with data`, () => { | ||
render(<TestComponent {...data} />); | ||
}); | ||
|
||
// it(`Renders ${testName} snapshot with data`, () => { | ||
// const componentJson = renderer | ||
// .create(<TestComponent {...data} />) | ||
// .toJSON(); | ||
// expect(componentJson).toMatchSnapshot(); | ||
// }); | ||
}); |
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,4 @@ | ||
import Component from './__Component__'; | ||
export default Component; | ||
|
||
export const componentName = '__Component__'; |
10 changes: 10 additions & 0 deletions
10
component-library/app/components/__Component__/package.json
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,10 @@ | ||
{ | ||
"name": "__Component__", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"react": "*", | ||
"prop-types": "*" | ||
}, | ||
"jewlDependencies": [ | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
component-library/app/containers/__Container__/__Container__.data.js
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,7 @@ | ||
import base from '../../layouts/Base/Base.data'; | ||
|
||
const data = { | ||
...base, | ||
}; | ||
|
||
export default data; |
12 changes: 12 additions & 0 deletions
12
component-library/app/containers/__Container__/__Container__.js
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,12 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Base from '../../layouts/Base'; | ||
import s from './__Container__.module.scss'; | ||
|
||
const __Container__ = () => { | ||
return <div className={s.Root}>__Container__</div>; | ||
}; | ||
|
||
__Container__.propTypes = {}; | ||
|
||
export default Base(__Container__); |
3 changes: 3 additions & 0 deletions
3
component-library/app/containers/__Container__/__Container__.md
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,3 @@ | ||
__Container__ | ||
|
||
[__Container__ source code on Github](https://github.com/Frojd/Frojd-Jewl/tree/develop/component-library/app/containers/__Container__) |
4 changes: 4 additions & 0 deletions
4
component-library/app/containers/__Container__/__Container__.module.scss
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,4 @@ | ||
@import '../../styles/includes'; | ||
|
||
.Root { | ||
} |
17 changes: 17 additions & 0 deletions
17
component-library/app/containers/__Container__/__Container__.stories.js
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,17 @@ | ||
import React from 'react'; | ||
import Container from './__Container__'; | ||
import data from './__Container__.data'; | ||
import readme from './__Container__.md'; | ||
|
||
const Story = { | ||
component: Container, | ||
parameters: { | ||
docs: { description: { component: readme } }, | ||
}, | ||
}; | ||
export default Story; | ||
|
||
const Template = (args) => <Container {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { ...data }; |
26 changes: 26 additions & 0 deletions
26
component-library/app/containers/__Container__/__Container__.test.js
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,26 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import React from 'react'; | ||
import 'i18n'; | ||
import { render, screen } from '@testing-library/react'; | ||
import renderer from 'react-test-renderer'; | ||
/* eslint-enable no-unused-vars */ | ||
|
||
import TestComponent, { componentName as testName } from './'; | ||
import data from './__Container__.data'; | ||
|
||
describe(`<${testName} />`, () => { | ||
it(`Renders an empty ${testName}`, () => { | ||
render(<TestComponent />); | ||
}); | ||
|
||
it(`Renders ${testName} with data`, () => { | ||
render(<TestComponent {...data} />); | ||
}); | ||
|
||
// it(`Renders ${testName} snapshot with data`, () => { | ||
// const componentJson = renderer | ||
// .create(<TestComponent {...data} />) | ||
// .toJSON(); | ||
// expect(componentJson).toMatchSnapshot(); | ||
// }); | ||
}); |
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,4 @@ | ||
import Container from './__Container__'; | ||
export default Container; | ||
|
||
export const componentName = '__Container__'; |
11 changes: 11 additions & 0 deletions
11
component-library/app/containers/__Container__/package.json
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,11 @@ | ||
{ | ||
"name": "__Container__", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"react": "*", | ||
"prop-types": "*" | ||
}, | ||
"jewlDependencies": [ | ||
"layouts/Base" | ||
] | ||
} |
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,19 @@ | ||
import React from 'react'; | ||
import Layout from './Base'; | ||
import data from './Base.data'; | ||
import readme from './Base.md'; | ||
|
||
const Story = { | ||
component: Layout, | ||
parameters: { | ||
docs: { description: { component: readme } }, | ||
}, | ||
}; | ||
export default Story; | ||
|
||
const Container = () => <div>--Layout Container--</div>; | ||
|
||
const Template = (args) => <Container {...args} />; | ||
|
||
export const Default = Layout(Template).bind({}); | ||
Default.args = { ...data }; |
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,26 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import React from 'react'; | ||
import '../../i18n'; | ||
import { render, screen } from '@testing-library/react'; | ||
import renderer from 'react-test-renderer'; | ||
/* eslint-enable no-unused-vars */ | ||
|
||
import TestComponent, { componentName as testName } from './'; | ||
import data from './Base.data'; | ||
|
||
describe(`<${testName} />`, () => { | ||
it(`Renders an empty ${testName}`, () => { | ||
render(<TestComponent />); | ||
}); | ||
|
||
it(`Renders ${testName} with data`, () => { | ||
render(<TestComponent {...data} />); | ||
}); | ||
|
||
// it(`Renders ${testName} snapshot with data`, () => { | ||
// const componentJson = renderer | ||
// .create(<TestComponent {...data} />) | ||
// .toJSON(); | ||
// expect(componentJson).toMatchSnapshot(); | ||
// }); | ||
}); |
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,4 @@ | ||
import Base from './Base'; | ||
export default Base; | ||
|
||
export const componentName = 'Base'; |
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,3 @@ | ||
const data = {}; | ||
|
||
export default data; |
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 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classNames from 'classnames'; | ||
import s from './__Layout__.module.scss'; | ||
|
||
const __Layout__ = (Container) => { | ||
const { displayName } = Container; | ||
|
||
const Wrapper = ({ containerName = '', ...restProps }) => { | ||
const name = containerName ? containerName : displayName; | ||
const classes = classNames(s.Root, [s[`Root--${name}`]]); | ||
return ( | ||
<div className={classes}> | ||
<div className={s.Document} role="document"> | ||
<main className={s.Main} id="mainContent"> | ||
<Container {...restProps} /> | ||
</main> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
Wrapper.propTypes = { | ||
containerName: PropTypes.string, | ||
}; | ||
|
||
return Wrapper; | ||
}; | ||
|
||
__Layout__.propTypes = { | ||
displayName: PropTypes.string, | ||
}; | ||
|
||
export default __Layout__; |
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,3 @@ | ||
__Layout__ | ||
|
||
[__Layout__ source code on Github](https://github.com/Frojd/Frojd-Jewl/tree/develop/component-library/app/layouts/__Layout__) |
11 changes: 11 additions & 0 deletions
11
component-library/app/layouts/__Layout__/__Layout__.module.scss
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,11 @@ | ||
@import '../../styles/includes'; | ||
|
||
.Root { | ||
} | ||
|
||
.Document { | ||
} | ||
|
||
.Main { | ||
display: block; /* For IE11 compatibility */ | ||
} |
Oops, something went wrong.