shinkansen-cogs 2.1.14 → 2.1.16
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.d.mts +2 -2
- package/package.json +14 -13
- package/src/js/cogs/index.d.cts +5 -1
- package/src/js/cogs/index.d.mts +7 -1
- package/src/js/cogs/index.jsx +2 -1
- package/src/js/cogs/select/field/index.jsx +2 -2
- package/src/js/components/common/text-content/index.cjs +2 -2
- package/src/js/components/common/text-content/index.jsx +1 -1
- package/src/js/components/description/index.d.mts +2 -11
- package/src/js/components/field/index.jsx +2 -3
- package/src/js/components/index.cjs +4 -4
- package/src/js/super/cogs/index.cjs +1 -1
- package/src/js/super/components/field/index.cjs +1 -1
- package/src/js/super/components/index.cjs +4 -4
- package/src/js/super/components/title/index.d.mts +1 -1
- package/src/js/super/components/title/index.jsx +2 -2
- package/src/sass/_cogs.scss +2 -4
- package/src/sass/cogs/_checkbox.scss +1 -2
- package/src/sass/cogs/_error.scss +2 -4
- package/src/sass/cogs/_radio.scss +1 -2
package/index.d.mts
CHANGED
|
@@ -111,7 +111,7 @@ declare global {
|
|
|
111
111
|
export interface CheckProps extends Super.Components.Field.FieldProps {
|
|
112
112
|
checked?: boolean
|
|
113
113
|
defaultChecked?: boolean
|
|
114
|
-
onClick
|
|
114
|
+
onClick?: OnEventType
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
export namespace Checkbox {
|
|
@@ -192,7 +192,7 @@ declare global {
|
|
|
192
192
|
export interface CheckProps extends Super.Cogs.CogProps {
|
|
193
193
|
checked?: boolean
|
|
194
194
|
defaultChecked?: boolean
|
|
195
|
-
onClick
|
|
195
|
+
onClick?: OnEventType
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
export namespace Checkbox {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-cogs",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.16",
|
|
4
4
|
"description": "Shinkansen Cogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -61,16 +61,17 @@
|
|
|
61
61
|
"@babel/preset-react": "^7.26.3",
|
|
62
62
|
"@babel/register": "^7.25.9",
|
|
63
63
|
"@modernpoacher/design-system": "2.0.2",
|
|
64
|
-
"@sequencemedia/eslint-config-standard": "^0.2.
|
|
65
|
-
"@sequencemedia/eslint-config-typescript": "^0.1.
|
|
66
|
-
"@storybook/addon-actions": "^8.6.
|
|
67
|
-
"@storybook/addon-essentials": "^8.6.
|
|
68
|
-
"@storybook/addon-links": "^8.6.
|
|
64
|
+
"@sequencemedia/eslint-config-standard": "^0.2.47",
|
|
65
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.68",
|
|
66
|
+
"@storybook/addon-actions": "^8.6.10",
|
|
67
|
+
"@storybook/addon-essentials": "^8.6.10",
|
|
68
|
+
"@storybook/addon-links": "^8.6.10",
|
|
69
69
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
70
|
-
"@storybook/manager-api": "^8.6.
|
|
71
|
-
"@storybook/react": "^8.6.
|
|
72
|
-
"@storybook/react-webpack5": "^8.6.
|
|
73
|
-
"@storybook/
|
|
70
|
+
"@storybook/manager-api": "^8.6.10",
|
|
71
|
+
"@storybook/react": "^8.6.10",
|
|
72
|
+
"@storybook/react-webpack5": "^8.6.10",
|
|
73
|
+
"@storybook/test": "^8.6.10",
|
|
74
|
+
"@storybook/theming": "^8.6.10",
|
|
74
75
|
"@testing-library/jest-dom": "^6.6.3",
|
|
75
76
|
"@testing-library/react": "^16.2.0",
|
|
76
77
|
"@types/babel__register": "^7.17.3",
|
|
@@ -107,13 +108,13 @@
|
|
|
107
108
|
"prop-types": "^15.8.1",
|
|
108
109
|
"react": "^19.0.0",
|
|
109
110
|
"react-component-instance": "^0.0.15",
|
|
110
|
-
"react-component-snapshot": "^0.0.
|
|
111
|
+
"react-component-snapshot": "^0.0.15",
|
|
111
112
|
"react-dom": "^19.0.0",
|
|
112
113
|
"remove-files-webpack-plugin": "^1.5.0",
|
|
113
114
|
"sass": "^1.86.0",
|
|
114
115
|
"sass-loader": "^16.0.5",
|
|
115
|
-
"storybook": "^8.6.
|
|
116
|
-
"stylelint": "^16.
|
|
116
|
+
"storybook": "^8.6.10",
|
|
117
|
+
"stylelint": "^16.17.0",
|
|
117
118
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
118
119
|
"stylelint-scss": "^6.11.1",
|
|
119
120
|
"webpack": "^5.98.0",
|
package/src/js/cogs/index.d.cts
CHANGED
package/src/js/cogs/index.d.mts
CHANGED
|
@@ -12,8 +12,14 @@ declare module '#cogs/cogs' {
|
|
|
12
12
|
export class CheckCog<P extends CheckProps> extends Cog<P> {
|
|
13
13
|
shouldComponentUpdate (props: CheckProps): boolean
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
export function toInputValue (value: unknown): string
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
declare module 'shinkansen-cogs/cogs' {
|
|
18
|
-
export
|
|
20
|
+
export {
|
|
21
|
+
ValueCog,
|
|
22
|
+
CheckCog,
|
|
23
|
+
toInputValue
|
|
24
|
+
} from '#cogs/cogs'
|
|
19
25
|
}
|
package/src/js/cogs/index.jsx
CHANGED
|
@@ -24,8 +24,8 @@ function DEFAULT_HANDLE_EVENT () {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* @param {HTMLOptionElement[]} selectedOptions
|
|
28
|
+
* @returns {string[]}
|
|
29
29
|
*/
|
|
30
30
|
function fromSelectedOptions (selectedOptions) {
|
|
31
31
|
return (
|
|
@@ -11,10 +11,10 @@ const log = debug('shinkansen-cogs/components/common/text-content')
|
|
|
11
11
|
log('`shinkansen` is awake')
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
|
-
default:
|
|
14
|
+
default: TextContent
|
|
15
15
|
} = require('./index.jsx')
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Exports only default
|
|
19
19
|
*/
|
|
20
|
-
module.exports =
|
|
20
|
+
module.exports = TextContent
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
declare module '#cogs/components/description' {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type DescriptionProps = CogsTypes.Super.Components.Description.DescriptionProps
|
|
5
|
-
|
|
6
|
-
export default class Description extends React.Component<DescriptionProps> {
|
|
7
|
-
static propTypes: object
|
|
8
|
-
|
|
9
|
-
getClassName (): string
|
|
10
|
-
|
|
11
|
-
shouldComponentUpdate (props: DescriptionProps): boolean
|
|
12
|
-
}
|
|
2
|
+
export { default } from '#cogs/super/components/description'
|
|
3
|
+
export * from '#cogs/super/components/description'
|
|
13
4
|
}
|
|
14
5
|
|
|
15
6
|
declare module 'shinkansen-cogs/components/description' {
|
|
@@ -20,8 +20,8 @@ function DEFAULT_HANDLE_EVENT () {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* @param {unknown} value
|
|
24
|
+
* @returns {string}
|
|
25
25
|
*/
|
|
26
26
|
export function toInputValue (value) {
|
|
27
27
|
return (value === undefined) ? '' : String(value)
|
|
@@ -94,7 +94,6 @@ export class CheckField extends Field {
|
|
|
94
94
|
|
|
95
95
|
CheckField.propTypes = {
|
|
96
96
|
...Field.propTypes,
|
|
97
|
-
value: PropTypes.string,
|
|
98
97
|
checked: PropTypes.bool,
|
|
99
98
|
defaultChecked: PropTypes.bool,
|
|
100
99
|
onClick: PropTypes.func
|
|
@@ -28,11 +28,11 @@ const {
|
|
|
28
28
|
default: Title
|
|
29
29
|
} = require('./title/index.jsx')
|
|
30
30
|
|
|
31
|
-
module.exports.Description = Description
|
|
32
|
-
module.exports.ErrorMessage = ErrorMessage
|
|
31
|
+
module.exports.Description = Description
|
|
32
|
+
module.exports.ErrorMessage = ErrorMessage
|
|
33
33
|
module.exports.Field = {
|
|
34
34
|
ValueField,
|
|
35
35
|
CheckField,
|
|
36
36
|
toInputValue
|
|
37
|
-
}
|
|
38
|
-
module.exports.Title = Title
|
|
37
|
+
}
|
|
38
|
+
module.exports.Title = Title
|
|
@@ -26,7 +26,7 @@ const {
|
|
|
26
26
|
default: Title
|
|
27
27
|
} = require('./title/index.jsx')
|
|
28
28
|
|
|
29
|
-
module.exports.Description = Description
|
|
30
|
-
module.exports.ErrorMessage = ErrorMessage
|
|
31
|
-
module.exports.Field = Field
|
|
32
|
-
module.exports.Title = Title
|
|
29
|
+
module.exports.Description = Description
|
|
30
|
+
module.exports.ErrorMessage = ErrorMessage
|
|
31
|
+
module.exports.Field = Field
|
|
32
|
+
module.exports.Title = Title
|
|
@@ -16,7 +16,7 @@ declare module '#cogs/super/components/title' {
|
|
|
16
16
|
|
|
17
17
|
shouldComponentUpdate (props: TitleProps): boolean
|
|
18
18
|
|
|
19
|
-
renderTextContent (textContent: string)
|
|
19
|
+
renderTextContent (textContent: string): React.JSX.Element
|
|
20
20
|
|
|
21
21
|
renderIsRequired (): React.JSX.Element | null
|
|
22
22
|
|
package/src/sass/_cogs.scss
CHANGED
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
.description {
|
|
40
40
|
@include typography.secondary-text;
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
& {
|
|
42
|
+
& /* stylelint-disable-line no-duplicate-selectors */ {
|
|
44
43
|
display: block;
|
|
45
44
|
padding: 0;
|
|
46
45
|
margin: 0 0 0.25rem 0;
|
|
@@ -50,8 +49,7 @@
|
|
|
50
49
|
.error-message {
|
|
51
50
|
@include typography.error-standard;
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
& {
|
|
52
|
+
& /* stylelint-disable-line no-duplicate-selectors */ {
|
|
55
53
|
display: block;
|
|
56
54
|
padding: 0;
|
|
57
55
|
margin: 0 0 0.25rem 0;
|
|
@@ -19,13 +19,11 @@
|
|
|
19
19
|
&.checkbox {
|
|
20
20
|
padding-left: 4rem;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
input {
|
|
22
|
+
input /* stylelint-disable-line no-descending-specificity */ {
|
|
24
23
|
left: 1.5rem;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
label:before {
|
|
26
|
+
label:before /* stylelint-disable-line no-descending-specificity */ {
|
|
29
27
|
left: 1rem;
|
|
30
28
|
|
|
31
29
|
border: 2px solid palette.$error-standard;
|