Compare commits

..

8 Commits

Author SHA1 Message Date
847f7f2649 v0.6.2 2021-03-30 15:34:33 +02:00
c58918268a Fixed missing file part 2
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-03-30 15:34:11 +02:00
3b65de9103 v0.6.1 2021-03-30 15:32:23 +02:00
208d0f8c06 Fixed missing file
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-03-30 15:32:10 +02:00
75ed12efea v0.6.0 2021-03-30 15:31:00 +02:00
2569db42f8 Changed back to prebuilt but this time it will build on install to allow theme.styl
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-03-30 15:30:26 +02:00
6c2b3466ba v0.5.2 2021-03-29 14:55:50 +02:00
31c9e30d3d Fixed Link colors
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-03-29 14:55:29 +02:00
9 changed files with 790 additions and 49 deletions

2
.gitignore vendored
View File

@ -4,6 +4,8 @@ node_modules/
*.js
!src/dzeio/stylusUtils.js
*.d.ts
types/
!rollup.config.js
!src/stylus.d.ts
!.storybook/*.js
style.css

View File

@ -4,7 +4,5 @@ node_modules/
.gitattributes
.gitignore
.npmignore
rollup.config.js
tsconfig.json
yarn.lock
yarn-error.log

View File

@ -1,9 +1,9 @@
{
"name": "@dzeio/components",
"version": "0.5.1",
"version": "0.6.2",
"license": "MIT",
"main": "./src/index.mjs",
"types": "./src/index.d.ts",
"main": "./index.mjs",
"types": "./types/index.d.ts",
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/preset-env": "^7.12.16",
@ -21,10 +21,8 @@
"react-dom": "^17.0.1",
"react-feather": "^2.0.9",
"style-loader": "^2.0.0",
"stylus": "^0.54.8",
"stylus-loader": "^4.3.3",
"ts-loader": "^8.0.17",
"typescript": "^4.1.3",
"webpack": "^4.44.2"
},
"peerDependencies": {
@ -34,8 +32,16 @@
"react-feather": "^2.0.9"
},
"scripts": {
"storybook": "rm -rf src/dzeio/**/*.js && start-storybook -p 6006",
"build": "tsc && mv src/index.js src/index.mjs",
"prepublishOnly": "yarn build"
"dev": "rm -rf src/dzeio/**/*.js && start-storybook -p 6006",
"build": "rollup --config",
"prepublishOnly": "yarn build",
"postinstall": "rollup --config"
},
"dependencies": {
"rollup": "^2.44.0",
"rollup-plugin-styles": "^3.14.1",
"rollup-plugin-typescript2": "^0.30.0",
"stylus": "^0.54.8",
"typescript": "^4.2.3"
}
}

27
rollup.config.js Normal file
View File

@ -0,0 +1,27 @@
import typescript from 'rollup-plugin-typescript2';
import styles from 'rollup-plugin-styles'
import pkg from './package.json';
export default [
{
input: 'src/index.ts',
external: ['ms'],
plugins: [
styles({
modules: true,
url: false,
autoModules: true,
mode: 'extract',
}),
typescript({useTsconfigDeclarationDir: true}), // so Rollup can convert TypeScript to JavaScript
],
output: [
{
file: pkg.main,
format: 'es',
assetFileNames: 'style.css'
}
]
}
];

View File

@ -1,9 +1,9 @@
@import '../config'
.link
color $infoLight
@media (prefers-color-scheme dark)
color $infoDark
@media (prefers-color-scheme dark)
color $infoLight
&:hover
text-decoration underline

View File

@ -12,6 +12,7 @@ interface Props {
/**
* Override external detection system
*/
noStyle?: boolean
external?: boolean
}
@ -23,7 +24,7 @@ export default class Link extends React.Component<Props> {
// external link
return (
<a
className={buildClassName(this.props.className, css.link)}
className={buildClassName(this.props.className, [css.link, !this.props.noStyle])}
href={this.props.href}
rel="noreferrer nofollow"
target="_blank"
@ -35,7 +36,7 @@ export default class Link extends React.Component<Props> {
return (
<NextLink href={this.props.href}>
<a
className={buildClassName(this.props.className, css.link)}
className={buildClassName(this.props.className, [css.link, !this.props.noStyle])}
>{this.props.children}</a>
</NextLink>
)

View File

@ -1,3 +1,9 @@
/**
* Copyright (c) 2021
*
* @summary DZEIO Component Library
*/
import Box from './dzeio/Box'
import Button from './dzeio/Button'
import Checkbox from './dzeio/Checkbox'

View File

@ -11,7 +11,7 @@
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"declarationDir": "src",
"declarationDir": "types",
// "outDir": "./dist", /* Redirect output structure to the directory. */
// "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */

769
yarn.lock

File diff suppressed because it is too large Load Diff