shinkansen-cogs 1.7.267 → 1.7.269
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/babel.config.cjs +1 -71
- package/jsconfig.json +1 -7
- package/package.json +14 -51
- package/src/cogs/checkbox/description/index.d.mts +6 -2
- package/src/cogs/checkbox/description/index.jsx +1 -1
- package/src/cogs/checkbox/error-message/index.d.mts +6 -2
- package/src/cogs/checkbox/error-message/index.jsx +1 -1
- package/src/cogs/checkbox/field/index.d.mts +6 -2
- package/src/cogs/checkbox/field/index.jsx +1 -1
- package/src/cogs/checkbox/index.d.mts +6 -2
- package/src/cogs/checkbox/index.jsx +3 -3
- package/src/cogs/checkbox/title/index.d.mts +6 -2
- package/src/cogs/checkbox/title/index.jsx +1 -1
- package/src/cogs/email/description/index.d.mts +6 -2
- package/src/cogs/email/description/index.jsx +1 -1
- package/src/cogs/email/error-message/index.d.mts +6 -2
- package/src/cogs/email/error-message/index.jsx +1 -1
- package/src/cogs/email/field/index.d.mts +6 -2
- package/src/cogs/email/field/index.jsx +1 -1
- package/src/cogs/email/index.d.mts +6 -2
- package/src/cogs/email/index.jsx +2 -2
- package/src/cogs/email/title/index.d.mts +6 -2
- package/src/cogs/email/title/index.jsx +1 -1
- package/src/cogs/index.d.mts +6 -1
- package/src/cogs/index.jsx +8 -8
- package/src/cogs/number/description/index.d.mts +6 -2
- package/src/cogs/number/description/index.jsx +1 -1
- package/src/cogs/number/error-message/index.d.mts +6 -2
- package/src/cogs/number/error-message/index.jsx +1 -1
- package/src/cogs/number/field/index.d.mts +6 -2
- package/src/cogs/number/field/index.jsx +1 -1
- package/src/cogs/number/index.d.mts +6 -2
- package/src/cogs/number/index.jsx +2 -2
- package/src/cogs/number/title/index.d.mts +6 -2
- package/src/cogs/number/title/index.jsx +1 -1
- package/src/cogs/password/description/index.d.mts +6 -2
- package/src/cogs/password/description/index.jsx +1 -1
- package/src/cogs/password/error-message/index.d.mts +6 -2
- package/src/cogs/password/error-message/index.jsx +1 -1
- package/src/cogs/password/field/index.d.mts +6 -2
- package/src/cogs/password/field/index.jsx +1 -1
- package/src/cogs/password/index.d.mts +6 -2
- package/src/cogs/password/index.jsx +2 -2
- package/src/cogs/password/title/index.d.mts +6 -2
- package/src/cogs/password/title/index.jsx +1 -1
- package/src/cogs/radio/description/index.d.mts +6 -2
- package/src/cogs/radio/description/index.jsx +1 -1
- package/src/cogs/radio/error-message/index.d.mts +6 -2
- package/src/cogs/radio/error-message/index.jsx +1 -1
- package/src/cogs/radio/field/index.d.mts +6 -2
- package/src/cogs/radio/field/index.jsx +1 -1
- package/src/cogs/radio/index.d.mts +6 -2
- package/src/cogs/radio/index.jsx +3 -3
- package/src/cogs/radio/title/index.d.mts +6 -2
- package/src/cogs/radio/title/index.jsx +1 -1
- package/src/cogs/select/description/index.d.mts +6 -2
- package/src/cogs/select/description/index.jsx +1 -1
- package/src/cogs/select/error-message/index.d.mts +6 -2
- package/src/cogs/select/error-message/index.jsx +1 -1
- package/src/cogs/select/field/index.d.mts +6 -2
- package/src/cogs/select/field/index.jsx +4 -4
- package/src/cogs/select/index.d.mts +6 -2
- package/src/cogs/select/index.jsx +3 -3
- package/src/cogs/select/title/index.d.mts +6 -2
- package/src/cogs/select/title/index.jsx +1 -1
- package/src/cogs/text/description/index.d.mts +6 -2
- package/src/cogs/text/description/index.jsx +1 -1
- package/src/cogs/text/error-message/index.d.mts +6 -2
- package/src/cogs/text/error-message/index.jsx +1 -1
- package/src/cogs/text/field/index.d.mts +6 -2
- package/src/cogs/text/field/index.jsx +1 -1
- package/src/cogs/text/index.d.mts +6 -2
- package/src/cogs/text/index.jsx +2 -2
- package/src/cogs/text/title/index.d.mts +6 -2
- package/src/cogs/text/title/index.jsx +1 -1
- package/src/cogs/textarea/description/index.d.mts +6 -2
- package/src/cogs/textarea/description/index.jsx +1 -1
- package/src/cogs/textarea/error-message/index.d.mts +6 -2
- package/src/cogs/textarea/error-message/index.jsx +1 -1
- package/src/cogs/textarea/field/index.d.mts +6 -2
- package/src/cogs/textarea/field/index.jsx +1 -1
- package/src/cogs/textarea/index.d.mts +6 -2
- package/src/cogs/textarea/index.jsx +2 -2
- package/src/cogs/textarea/title/index.d.mts +6 -2
- package/src/cogs/textarea/title/index.jsx +1 -1
- package/src/common/index.d.mts +9 -0
- package/src/components/common/disabled/index.d.mts +5 -1
- package/src/components/common/readonly/index.d.mts +5 -1
- package/src/components/common/required/index.d.mts +5 -1
- package/src/components/common/text-content/index.d.mts +6 -1
- package/src/components/common/text-content/index.jsx +1 -1
- package/src/components/description/index.d.mts +6 -1
- package/src/components/description/index.jsx +2 -2
- package/src/components/error-message/index.d.mts +6 -1
- package/src/components/error-message/index.jsx +2 -2
- package/src/components/field/index.d.mts +6 -1
- package/src/components/field/index.jsx +2 -2
- package/src/components/title/index.d.mts +6 -1
- package/src/components/title/index.jsx +5 -5
- package/src/index.d.mts +12 -8
- package/src/transformers/error-message/index.d.mts +1 -1
- package/tsconfig.json +31 -3
- package/transform.sh +0 -4
- package/webpack.config.mjs +0 -129
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/common/disabled' {
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
4
|
export default function Disabled (): React.JSX.Element
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
declare module 'shinkansen-cogs/components/common/disabled' {
|
|
8
|
+
export { default } from '#cogs/components/common/disabled'
|
|
9
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/common/readonly' {
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
4
|
export default function ReadOnly (): React.JSX.Element
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
declare module 'shinkansen-cogs/components/common/readonly' {
|
|
8
|
+
export { default } from '#cogs/components/common/readonly'
|
|
9
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/common/required' {
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
4
|
export default function Required (): React.JSX.Element
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
declare module 'shinkansen-cogs/components/common/required' {
|
|
8
|
+
export { default } from '#cogs/components/common/required'
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/common/text-content' {
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
4
|
export interface TextContentProps {
|
|
@@ -7,3 +7,8 @@ declare module 'shinkansen-cogs/components/common/text-content' {
|
|
|
7
7
|
|
|
8
8
|
export default function TextContent (props: TextContentProps): React.JSX.Element | null
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
declare module 'shinkansen-cogs/components/common/text-content' {
|
|
12
|
+
export { default } from '#cogs/components/common/text-content'
|
|
13
|
+
export * from '#cogs/components/common/text-content'
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/description' {
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
export interface DescriptionProps {
|
|
@@ -7,3 +7,8 @@ declare module 'shinkansen-cogs/components/description' {
|
|
|
7
7
|
|
|
8
8
|
export default class Description extends React.Component<DescriptionProps> {}
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
declare module 'shinkansen-cogs/components/description' {
|
|
12
|
+
export { default } from '#cogs/components/description'
|
|
13
|
+
export * from '#cogs/components/description'
|
|
14
|
+
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
import React, { Component } from 'react'
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
|
|
7
|
-
import TextContent from '
|
|
7
|
+
import TextContent from '#cogs/components/common/text-content'
|
|
8
8
|
|
|
9
9
|
export default class Description extends Component {
|
|
10
10
|
getClassName () {
|
|
11
11
|
return 'description'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
shouldComponentUpdate (props) {
|
|
14
|
+
shouldComponentUpdate (props, state) {
|
|
15
15
|
return (
|
|
16
16
|
(props.description !== this.props.description)
|
|
17
17
|
)
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/error-message' {
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
export type ErrorMessageProps = CogsTypes.ErrorDefinitionType
|
|
5
5
|
|
|
6
6
|
export default class ErrorMessage extends React.Component<ErrorMessageProps> {}
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
declare module 'shinkansen-cogs/components/error-message' {
|
|
10
|
+
export { default } from '#cogs/components/error-message'
|
|
11
|
+
export * from '#cogs/components/error-message'
|
|
12
|
+
}
|
|
@@ -5,9 +5,9 @@ import React, { Component } from 'react'
|
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
import equal from 'fast-deep-equal'
|
|
7
7
|
|
|
8
|
-
import transform from '
|
|
8
|
+
import transform from '#cogs/transformers/error-message'
|
|
9
9
|
|
|
10
|
-
import TextContent from '
|
|
10
|
+
import TextContent from '#cogs/components/common/text-content'
|
|
11
11
|
|
|
12
12
|
export default class ErrorMessage extends Component {
|
|
13
13
|
state = {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/field' {
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
export interface FieldProps {
|
|
@@ -16,3 +16,8 @@ declare module 'shinkansen-cogs/components/field' {
|
|
|
16
16
|
|
|
17
17
|
export default class Field extends React.Component<FieldProps> {}
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
declare module 'shinkansen-cogs/components/field' {
|
|
21
|
+
export { default } from '#cogs/components/field'
|
|
22
|
+
export * from '#cogs/components/field'
|
|
23
|
+
}
|
|
@@ -7,14 +7,14 @@ import PropTypes from 'prop-types'
|
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_HANDLE_CHANGE,
|
|
9
9
|
DEFAULT_HANDLE_CLICK
|
|
10
|
-
} from '
|
|
10
|
+
} from '#cogs/common'
|
|
11
11
|
|
|
12
12
|
export default class Field extends Component {
|
|
13
13
|
getClassName () {
|
|
14
14
|
return 'input'
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
shouldComponentUpdate (props) {
|
|
17
|
+
shouldComponentUpdate (props, state) {
|
|
18
18
|
return (
|
|
19
19
|
(props.id !== this.props.id) ||
|
|
20
20
|
(props.required !== this.props.required) ||
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module '
|
|
1
|
+
declare module '#cogs/components/title' {
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
export interface TitleProps {
|
|
@@ -12,3 +12,8 @@ declare module 'shinkansen-cogs/components/title' {
|
|
|
12
12
|
|
|
13
13
|
export default class Title extends React.Component<TitleProps> {}
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
declare module 'shinkansen-cogs/components/title' {
|
|
17
|
+
export { default } from '#cogs/components/title'
|
|
18
|
+
export * from '#cogs/components/title'
|
|
19
|
+
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import React, { Component } from 'react'
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
|
|
7
|
-
import TextContent from '
|
|
8
|
-
import Required from '
|
|
9
|
-
import Disabled from '
|
|
10
|
-
import ReadOnly from '
|
|
7
|
+
import TextContent from '#cogs/components/common/text-content'
|
|
8
|
+
import Required from '#cogs/components/common/required'
|
|
9
|
+
import Disabled from '#cogs/components/common/disabled'
|
|
10
|
+
import ReadOnly from '#cogs/components/common/readonly'
|
|
11
11
|
|
|
12
12
|
export default class Title extends Component {
|
|
13
13
|
isRequired () {
|
|
@@ -38,7 +38,7 @@ export default class Title extends Component {
|
|
|
38
38
|
return 'title'
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
shouldComponentUpdate (props) {
|
|
41
|
+
shouldComponentUpdate (props, state) {
|
|
42
42
|
return (
|
|
43
43
|
(props.id !== this.props.id) ||
|
|
44
44
|
(props.title !== this.props.title) ||
|
package/src/index.d.mts
CHANGED
|
@@ -15,13 +15,17 @@ declare namespace CogsTypes {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
declare module '#cogs' {
|
|
19
|
+
export { default as CheckboxCog } from '#cogs/cogs/checkbox'
|
|
20
|
+
export { default as EmailCog } from '#cogs/cogs/email'
|
|
21
|
+
export { default as NumberCog } from '#cogs/cogs/number'
|
|
22
|
+
export { default as PasswordCog } from '#cogs/cogs/password'
|
|
23
|
+
export { default as RadioCog } from '#cogs/cogs/radio'
|
|
24
|
+
export { default as SelectCog } from '#cogs/cogs/select'
|
|
25
|
+
export { default as TextCog } from '#cogs/cogs/text'
|
|
26
|
+
export { default as TextareaCog } from '#cogs/cogs/textarea'
|
|
27
|
+
}
|
|
28
|
+
|
|
18
29
|
declare module 'shinkansen-cogs' {
|
|
19
|
-
export
|
|
20
|
-
export { default as EmailCog } from 'shinkansen-cogs/cogs/email'
|
|
21
|
-
export { default as NumberCog } from 'shinkansen-cogs/cogs/number'
|
|
22
|
-
export { default as PasswordCog } from 'shinkansen-cogs/cogs/password'
|
|
23
|
-
export { default as RadioCog } from 'shinkansen-cogs/cogs/radio'
|
|
24
|
-
export { default as SelectCog } from 'shinkansen-cogs/cogs/select'
|
|
25
|
-
export { default as TextCog } from 'shinkansen-cogs/cogs/text'
|
|
26
|
-
export { default as TextareaCog } from 'shinkansen-cogs/cogs/textarea'
|
|
30
|
+
export * from '#cogs'
|
|
27
31
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"module": "
|
|
3
|
+
"module": "ESNext",
|
|
4
4
|
"target": "ESNext",
|
|
5
|
-
"
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"checkJs": false,
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
6
8
|
"noEmit": true,
|
|
7
9
|
"strict": true,
|
|
8
10
|
"isolatedModules": true,
|
|
9
|
-
"baseUrl": "."
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"paths": {
|
|
13
|
+
"#cogs/cogs": [
|
|
14
|
+
"src/cogs/index.jsx"
|
|
15
|
+
],
|
|
16
|
+
"#cogs/cogs/*": [
|
|
17
|
+
"src/cogs/*/index.jsx"
|
|
18
|
+
],
|
|
19
|
+
"#cogs/common": [
|
|
20
|
+
"src/common/index.mjs"
|
|
21
|
+
],
|
|
22
|
+
"#cogs/components/*": [
|
|
23
|
+
"src/components/*/index.jsx"
|
|
24
|
+
],
|
|
25
|
+
"#stories/*": [
|
|
26
|
+
"stories/*/index.stories.jsx"
|
|
27
|
+
],
|
|
28
|
+
"#stories/state": [
|
|
29
|
+
"stories/state/index.jsx"
|
|
30
|
+
],
|
|
31
|
+
"#stories/state/*": [
|
|
32
|
+
"stories/state/*/index.jsx"
|
|
33
|
+
]
|
|
10
34
|
}
|
|
35
|
+
},
|
|
36
|
+
"include": [
|
|
37
|
+
"src/**/*"
|
|
38
|
+
]
|
|
11
39
|
}
|
package/transform.sh
DELETED
package/webpack.config.mjs
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
join
|
|
3
|
-
} from 'node:path'
|
|
4
|
-
|
|
5
|
-
import Webpack from 'webpack'
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
CleanWebpackPlugin as CleanPlugin
|
|
9
|
-
} from 'clean-webpack-plugin'
|
|
10
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
|
|
11
|
-
import RemoveFilesPlugin from 'remove-files-webpack-plugin'
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
storybookPath as STORYBOOK_PATH,
|
|
15
|
-
modulePath as MODULE_PATH
|
|
16
|
-
} from '#build/paths'
|
|
17
|
-
|
|
18
|
-
const {
|
|
19
|
-
EnvironmentPlugin,
|
|
20
|
-
SourceMapDevToolPlugin
|
|
21
|
-
} = Webpack
|
|
22
|
-
|
|
23
|
-
export default {
|
|
24
|
-
mode: 'production',
|
|
25
|
-
entry: {
|
|
26
|
-
'preview-head': join(STORYBOOK_PATH, 'sass/preview-head.scss')
|
|
27
|
-
},
|
|
28
|
-
output: {
|
|
29
|
-
path: join(STORYBOOK_PATH, 'css')
|
|
30
|
-
},
|
|
31
|
-
stats: {
|
|
32
|
-
colors: true
|
|
33
|
-
},
|
|
34
|
-
module: {
|
|
35
|
-
rules: [
|
|
36
|
-
{
|
|
37
|
-
test: /\.scss$/i,
|
|
38
|
-
use: [
|
|
39
|
-
MiniCssExtractPlugin.loader,
|
|
40
|
-
{
|
|
41
|
-
loader: 'css-loader',
|
|
42
|
-
options: {
|
|
43
|
-
importLoaders: 1,
|
|
44
|
-
sourceMap: false,
|
|
45
|
-
url: false
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
loader: 'postcss-loader',
|
|
50
|
-
options: {
|
|
51
|
-
sourceMap: false,
|
|
52
|
-
postcssOptions: {
|
|
53
|
-
config: false,
|
|
54
|
-
plugins: [
|
|
55
|
-
'postcss-import',
|
|
56
|
-
'postcss-discard-comments',
|
|
57
|
-
'postcss-discard-empty',
|
|
58
|
-
[
|
|
59
|
-
'postcss-map', {
|
|
60
|
-
maps: [
|
|
61
|
-
join(MODULE_PATH, '@modernpoacher/design-system/src/tokens/palette.json')
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
[
|
|
66
|
-
'autoprefixer', {
|
|
67
|
-
remove: false
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
'perfectionist', {
|
|
72
|
-
trimLeadingZero: false,
|
|
73
|
-
sourcemap: true,
|
|
74
|
-
indentSize: 2,
|
|
75
|
-
format: 'expanded',
|
|
76
|
-
syntax: 'scss'
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
loader: 'sass-loader',
|
|
85
|
-
options: {
|
|
86
|
-
sourceMap: false,
|
|
87
|
-
sassOptions: {
|
|
88
|
-
loadPaths: [
|
|
89
|
-
join(MODULE_PATH, '@modernpoacher/design-system/src/sass')
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
plugins: [
|
|
99
|
-
new CleanPlugin({
|
|
100
|
-
verbose: false,
|
|
101
|
-
cleanOnceBeforeBuildPatterns: [
|
|
102
|
-
join(STORYBOOK_PATH, 'css/*.css'),
|
|
103
|
-
join(STORYBOOK_PATH, 'css/*.css.map')
|
|
104
|
-
]
|
|
105
|
-
}),
|
|
106
|
-
new EnvironmentPlugin({
|
|
107
|
-
NODE_ENV: 'production'
|
|
108
|
-
}),
|
|
109
|
-
new SourceMapDevToolPlugin({
|
|
110
|
-
test: /\.css$/i,
|
|
111
|
-
filename: '[name].css.map'
|
|
112
|
-
}),
|
|
113
|
-
new MiniCssExtractPlugin({
|
|
114
|
-
filename: '[name].css'
|
|
115
|
-
}),
|
|
116
|
-
new RemoveFilesPlugin({
|
|
117
|
-
after: {
|
|
118
|
-
test: [
|
|
119
|
-
{
|
|
120
|
-
folder: join(STORYBOOK_PATH, 'css'),
|
|
121
|
-
method (filePath) {
|
|
122
|
-
return /\.js$/m.test(filePath)
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
}
|