@okam/next-component 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.d.ts +1 -0
- package/index.esm.js +3796 -0
- package/package.json +5 -2
- package/src/components/Img/index.d.ts +3 -0
- package/src/components/Img/interface.d.ts +6 -0
- package/src/index.d.ts +1 -0
- package/src/lib/hello-server.d.ts +1 -0
- package/src/lib/next-component.d.ts +4 -0
- package/src/server.d.ts +1 -0
- package/.eslintrc.js +0 -21
- package/.storybook/main.ts +0 -33
- package/.storybook/preview.ts +0 -0
- package/CHANGELOG.md +0 -16
- package/images/image.png +0 -0
- package/project.json +0 -75
- package/src/components/Img/index.tsx +0 -30
- package/src/components/Img/interface.ts +0 -9
- package/src/index.ts +0 -3
- package/src/lib/hello-server.tsx +0 -4
- package/src/lib/next-component.tsx +0 -16
- package/src/server.ts +0 -2
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -29
- package/tsconfig.storybook.json +0 -31
- /package/{src/lib/next-component.module.css → index.esm.css} +0 -0
package/package.json
CHANGED
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/next-component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HelloServer(): Promise<import("react/jsx-runtime").JSX.Element>;
|
package/src/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/hello-server';
|
package/.eslintrc.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const { getDefaultIgnorePatterns } = require("../../../linter/helpers");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
extends: ['plugin:@nx/react', '../../../.eslintrc.js', '../../../linter/bases/typescript', '../../../linter/bases/regexp', '../../../linter/bases/jest', '../../../linter/bases/rtl', '../../../linter/bases/storybook', '../../../linter/bases/react', '../../../linter/bases/prettier', 'plugin:storybook/recommended'],
|
|
5
|
-
ignorePatterns: ['!**/*', ...getDefaultIgnorePatterns()],
|
|
6
|
-
overrides: [
|
|
7
|
-
{
|
|
8
|
-
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
9
|
-
// We set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
|
|
10
|
-
parserOptions: {
|
|
11
|
-
project: `${__dirname}/tsconfig.*?.json`,
|
|
12
|
-
},
|
|
13
|
-
rules: {
|
|
14
|
-
"@nx/dependency-checks": "error"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
rules: {
|
|
19
|
-
'react/react-in-jsx-scope': 'off',
|
|
20
|
-
},
|
|
21
|
-
}
|
package/.storybook/main.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
-
import type { StorybookConfig } from '@storybook/nextjs'
|
|
3
|
-
|
|
4
|
-
const config: StorybookConfig = {
|
|
5
|
-
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
6
|
-
addons: [
|
|
7
|
-
'@storybook/addon-a11y',
|
|
8
|
-
'@storybook/addon-links',
|
|
9
|
-
'@storybook/addon-essentials',
|
|
10
|
-
'@storybook/addon-interactions',
|
|
11
|
-
{
|
|
12
|
-
name: '@storybook/addon-styling',
|
|
13
|
-
options: {
|
|
14
|
-
// Check out https://github.com/storybookjs/addon-styling/blob/main/docs/api.md
|
|
15
|
-
// For more details on this addon's options.
|
|
16
|
-
postCss: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
framework: {
|
|
21
|
-
name: '@storybook/nextjs',
|
|
22
|
-
options: {},
|
|
23
|
-
},
|
|
24
|
-
docs: {
|
|
25
|
-
autodocs: 'tag',
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default config
|
|
30
|
-
|
|
31
|
-
// To customize your Vite configuration you can use the viteFinal field.
|
|
32
|
-
// Check https://storybook.js.org/docs/react/builders/vite#configuration
|
|
33
|
-
// and https://nx.dev/packages/storybook/documents/custom-builder-configs
|
package/.storybook/preview.ts
DELETED
|
File without changes
|
package/CHANGELOG.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
## 0.1.0 (2024-06-28)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### 🚀 Features
|
|
5
|
-
|
|
6
|
-
- add new libs ([#71](https://github.com/OKAMca/stack/pull/71))
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### 🩹 Fixes
|
|
10
|
-
|
|
11
|
-
- publishing for new libs ([#125](https://github.com/OKAMca/stack/pull/125))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### ❤️ Thank You
|
|
15
|
-
|
|
16
|
-
- Marie-Maxime Tanguay @marie-maxime
|
package/images/image.png
DELETED
|
Binary file
|
package/project.json
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "next-component",
|
|
3
|
-
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "libs/stack/next-component/src",
|
|
5
|
-
"projectType": "library",
|
|
6
|
-
"tags": [],
|
|
7
|
-
"targets": {
|
|
8
|
-
"lint": {
|
|
9
|
-
"executor": "@nx/eslint:lint"
|
|
10
|
-
},
|
|
11
|
-
"build": {
|
|
12
|
-
"executor": "@nx/rollup:rollup",
|
|
13
|
-
"outputs": ["{options.outputPath}"],
|
|
14
|
-
"options": {
|
|
15
|
-
"outputPath": "dist/libs/stack/next-component",
|
|
16
|
-
"tsConfig": "libs/stack/next-component/tsconfig.lib.json",
|
|
17
|
-
"project": "libs/stack/next-component/package.json",
|
|
18
|
-
"entryFile": "libs/stack/next-component/src/index.ts",
|
|
19
|
-
"external": "all",
|
|
20
|
-
"rollupConfig": "@nx/react/plugins/bundle-rollup",
|
|
21
|
-
"compiler": "swc",
|
|
22
|
-
"assets": [
|
|
23
|
-
{
|
|
24
|
-
"glob": "libs/stack/next-component/README.md",
|
|
25
|
-
"input": ".",
|
|
26
|
-
"output": "."
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"storybook": {
|
|
32
|
-
"executor": "@nx/storybook:storybook",
|
|
33
|
-
"options": {
|
|
34
|
-
"port": 4400,
|
|
35
|
-
"configDir": "libs/stack/next-component/.storybook"
|
|
36
|
-
},
|
|
37
|
-
"configurations": {
|
|
38
|
-
"ci": {
|
|
39
|
-
"quiet": true
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"build-storybook": {
|
|
44
|
-
"executor": "@nx/storybook:build",
|
|
45
|
-
"outputs": ["{options.outputDir}"],
|
|
46
|
-
"options": {
|
|
47
|
-
"outputDir": "dist/storybook/next-component",
|
|
48
|
-
"configDir": "libs/stack/next-component/.storybook"
|
|
49
|
-
},
|
|
50
|
-
"configurations": {
|
|
51
|
-
"ci": {
|
|
52
|
-
"quiet": true
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"test-storybook": {
|
|
57
|
-
"executor": "nx:run-commands",
|
|
58
|
-
"options": {
|
|
59
|
-
"command": "test-storybook -c libs/stack/next-component/.storybook --url=http://localhost:4400"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"static-storybook": {
|
|
63
|
-
"executor": "@nx/web:file-server",
|
|
64
|
-
"options": {
|
|
65
|
-
"buildTarget": "next-component:build-storybook",
|
|
66
|
-
"staticFilePath": "dist/storybook/next-component"
|
|
67
|
-
},
|
|
68
|
-
"configurations": {
|
|
69
|
-
"ci": {
|
|
70
|
-
"buildTarget": "next-component:build-storybook:ci"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useThemeContext } from '@okam/stack-ui'
|
|
2
|
-
import Image from 'next/image'
|
|
3
|
-
import type TImgProps from './interface'
|
|
4
|
-
|
|
5
|
-
const Img = (props: TImgProps) => {
|
|
6
|
-
const { src, width, height, themeName = 'img', tokens, customTheme, ...rest } = props
|
|
7
|
-
const theme = useThemeContext(themeName, tokens, customTheme)
|
|
8
|
-
|
|
9
|
-
if (typeof src === 'object') {
|
|
10
|
-
const { blurWidth, blurHeight, width: srcWidth, height: srcHeight, ...withoutBlurDimensions } = src
|
|
11
|
-
const blur = {
|
|
12
|
-
blurwidth: blurWidth,
|
|
13
|
-
blurheight: blurHeight,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Image
|
|
18
|
-
className={theme}
|
|
19
|
-
{...withoutBlurDimensions}
|
|
20
|
-
{...rest}
|
|
21
|
-
{...blur}
|
|
22
|
-
width={srcWidth ?? width}
|
|
23
|
-
height={srcHeight ?? height}
|
|
24
|
-
/>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
return <Image width={width} height={height} className={theme} src={src} {...rest} />
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default Img
|
package/src/index.ts
DELETED
package/src/lib/hello-server.tsx
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import styles from './next-component.module.css'
|
|
4
|
-
|
|
5
|
-
/* eslint-disable-next-line */
|
|
6
|
-
export interface NextComponentProps {}
|
|
7
|
-
|
|
8
|
-
export function NextComponent(props: NextComponentProps) {
|
|
9
|
-
return (
|
|
10
|
-
<div className={styles.container}>
|
|
11
|
-
<h1>Hello Client Component!</h1>
|
|
12
|
-
</div>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default NextComponent
|
package/src/server.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"jsx": "react-jsx",
|
|
4
|
-
"allowJs": false,
|
|
5
|
-
"esModuleInterop": false,
|
|
6
|
-
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"strict": true
|
|
8
|
-
},
|
|
9
|
-
"files": [],
|
|
10
|
-
"include": [],
|
|
11
|
-
"references": [
|
|
12
|
-
{
|
|
13
|
-
"path": "./tsconfig.lib.json"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"path": "./tsconfig.storybook.json"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"extends": "../../../tsconfig.base.json"
|
|
20
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../../dist/out-tsc",
|
|
5
|
-
"types": [
|
|
6
|
-
"node",
|
|
7
|
-
"@nx/react/typings/cssmodule.d.ts",
|
|
8
|
-
"@nx/react/typings/image.d.ts",
|
|
9
|
-
"next",
|
|
10
|
-
"@nx/next/typings/image.d.ts"
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
"exclude": [
|
|
14
|
-
"jest.config.ts",
|
|
15
|
-
"src/**/*.spec.ts",
|
|
16
|
-
"src/**/*.test.ts",
|
|
17
|
-
"src/**/*.spec.tsx",
|
|
18
|
-
"src/**/*.test.tsx",
|
|
19
|
-
"src/**/*.spec.js",
|
|
20
|
-
"src/**/*.test.js",
|
|
21
|
-
"src/**/*.spec.jsx",
|
|
22
|
-
"src/**/*.test.jsx",
|
|
23
|
-
"**/*.stories.ts",
|
|
24
|
-
"**/*.stories.js",
|
|
25
|
-
"**/*.stories.jsx",
|
|
26
|
-
"**/*.stories.tsx"
|
|
27
|
-
],
|
|
28
|
-
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
|
29
|
-
}
|
package/tsconfig.storybook.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"emitDecoratorMetadata": true,
|
|
5
|
-
"outDir": ""
|
|
6
|
-
},
|
|
7
|
-
"files": [
|
|
8
|
-
"../../../node_modules/@nx/react/typings/styled-jsx.d.ts",
|
|
9
|
-
"../../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
10
|
-
"../../../node_modules/@nx/react/typings/image.d.ts"
|
|
11
|
-
],
|
|
12
|
-
"exclude": [
|
|
13
|
-
"src/**/*.spec.ts",
|
|
14
|
-
"src/**/*.test.ts",
|
|
15
|
-
"src/**/*.spec.js",
|
|
16
|
-
"src/**/*.test.js",
|
|
17
|
-
"src/**/*.spec.tsx",
|
|
18
|
-
"src/**/*.test.tsx",
|
|
19
|
-
"src/**/*.spec.jsx",
|
|
20
|
-
"src/**/*.test.js"
|
|
21
|
-
],
|
|
22
|
-
"include": [
|
|
23
|
-
"src/**/*.stories.ts",
|
|
24
|
-
"src/**/*.stories.js",
|
|
25
|
-
"src/**/*.stories.jsx",
|
|
26
|
-
"src/**/*.stories.tsx",
|
|
27
|
-
"src/**/*.stories.mdx",
|
|
28
|
-
".storybook/*.js",
|
|
29
|
-
".storybook/*.ts"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
File without changes
|