shinkansen-cogs 2.1.13 → 2.1.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-cogs",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "Shinkansen Cogs",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -61,8 +61,8 @@
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.45",
65
- "@sequencemedia/eslint-config-typescript": "^0.1.66",
64
+ "@sequencemedia/eslint-config-standard": "^0.2.46",
65
+ "@sequencemedia/eslint-config-typescript": "^0.1.67",
66
66
  "@storybook/addon-actions": "^8.6.9",
67
67
  "@storybook/addon-essentials": "^8.6.9",
68
68
  "@storybook/addon-links": "^8.6.9",
@@ -70,6 +70,7 @@
70
70
  "@storybook/manager-api": "^8.6.9",
71
71
  "@storybook/react": "^8.6.9",
72
72
  "@storybook/react-webpack5": "^8.6.9",
73
+ "@storybook/test": "^8.6.9",
73
74
  "@storybook/theming": "^8.6.9",
74
75
  "@testing-library/jest-dom": "^6.6.3",
75
76
  "@testing-library/react": "^16.2.0",
@@ -89,7 +90,7 @@
89
90
  "cross-env": "^7.0.3",
90
91
  "eslint": "^9.23.0",
91
92
  "eslint-plugin-react": "^7.37.4",
92
- "eslint-plugin-storybook": "^0.11.6",
93
+ "eslint-plugin-storybook": "^0.12.0",
93
94
  "globals": "^16.0.0",
94
95
  "husky": "^9.1.7",
95
96
  "jest": "^29.7.0",
@@ -106,8 +107,8 @@
106
107
  "prettier": "^3.5.3",
107
108
  "prop-types": "^15.8.1",
108
109
  "react": "^19.0.0",
109
- "react-component-instance": "^0.0.14",
110
- "react-component-snapshot": "^0.0.13",
110
+ "react-component-instance": "^0.0.15",
111
+ "react-component-snapshot": "^0.0.14",
111
112
  "react-dom": "^19.0.0",
112
113
  "remove-files-webpack-plugin": "^1.5.0",
113
114
  "sass": "^1.86.0",
@@ -1 +1,5 @@
1
- export * from '#cogs/cogs'
1
+ export {
2
+ ValueCog,
3
+ CheckCog,
4
+ toInputValue
5
+ } from '#cogs/cogs'
@@ -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 * from '#cogs/cogs'
20
+ export {
21
+ ValueCog,
22
+ CheckCog,
23
+ toInputValue
24
+ } from '#cogs/cogs'
19
25
  }
@@ -6,7 +6,8 @@
6
6
  */
7
7
 
8
8
  /**
9
- * Cog component
9
+ * ValueCog component
10
+ * CheckCog component
10
11
  */
11
12
  import React from 'react'
12
13
  import PropTypes from 'prop-types'
@@ -24,8 +24,8 @@ function DEFAULT_HANDLE_EVENT () {
24
24
  }
25
25
 
26
26
  /**
27
- * @param {HTMLOptionElement[]} selectedOptions
28
- * @returns {string[]}
27
+ * @param {HTMLOptionElement[]} selectedOptions
28
+ * @returns {string[]}
29
29
  */
30
30
  function fromSelectedOptions (selectedOptions) {
31
31
  return (
@@ -20,8 +20,8 @@ function DEFAULT_HANDLE_EVENT () {
20
20
  }
21
21
 
22
22
  /**
23
- * @param {unknown} value
24
- * @returns {string}
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
@@ -17,4 +17,4 @@ const {
17
17
  /**
18
18
  * Exports only default
19
19
  */
20
- module.exports = Cog // = require('./index.jsx')
20
+ module.exports = Cog
@@ -17,4 +17,4 @@ const {
17
17
  /**
18
18
  * Exports only default
19
19
  */
20
- module.exports = Field // require('./index.jsx') // component
20
+ module.exports = Field
@@ -61,8 +61,8 @@ export default class Title extends Component {
61
61
  }
62
62
 
63
63
  /**
64
- * @param {string} textContent
65
- * @returns {React.JSX.Element}
64
+ * @param {string} textContent
65
+ * @returns {React.JSX.Element}
66
66
  */
67
67
  renderTextContent (textContent) {
68
68
  return (