shinkansen-sprockets 1.2.21 → 1.3.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.
Files changed (87) hide show
  1. package/babel.config.cjs +2 -1
  2. package/eslint.config.mjs +16 -3
  3. package/index.d.mts +84 -59
  4. package/package.json +35 -10
  5. package/src/components/common/text-content/index.cjs +5 -2
  6. package/src/components/common/text-content/index.jsx +1 -1
  7. package/src/components/common/visually-hidden-text/index.cjs +5 -2
  8. package/src/components/common/visually-hidden-text/index.jsx +1 -1
  9. package/src/components/description/index.cjs +5 -2
  10. package/src/components/description/index.d.mts +2 -11
  11. package/src/components/description/index.jsx +2 -44
  12. package/src/components/error-message/index.cjs +5 -2
  13. package/src/components/error-message/index.d.mts +2 -20
  14. package/src/components/error-message/index.jsx +2 -118
  15. package/src/components/group/index.cjs +5 -2
  16. package/src/components/group/index.d.mts +2 -12
  17. package/src/components/group/index.jsx +2 -49
  18. package/src/components/index.cjs +1 -1
  19. package/src/components/index.d.cts +4 -4
  20. package/src/components/index.d.mts +4 -4
  21. package/src/components/index.mjs +4 -4
  22. package/src/components/title/index.cjs +5 -2
  23. package/src/components/title/index.d.mts +2 -17
  24. package/src/components/title/index.jsx +2 -70
  25. package/src/sprockets/check-answers/group/change-answer.jsx +4 -4
  26. package/src/sprockets/check-answers/group/index.cjs +5 -2
  27. package/src/sprockets/check-answers/group/index.d.mts +3 -3
  28. package/src/sprockets/check-answers/group/index.jsx +9 -9
  29. package/src/sprockets/check-answers/index.cjs +5 -2
  30. package/src/sprockets/check-answers/index.d.mts +1 -1
  31. package/src/sprockets/check-answers/index.jsx +3 -3
  32. package/src/sprockets/check-answers/title/index.cjs +5 -2
  33. package/src/sprockets/check-answers/title/index.d.mts +2 -2
  34. package/src/sprockets/check-answers/title/index.jsx +5 -4
  35. package/src/sprockets/error-summary/group/index.cjs +5 -2
  36. package/src/sprockets/error-summary/group/index.d.mts +3 -3
  37. package/src/sprockets/error-summary/group/index.jsx +9 -9
  38. package/src/sprockets/error-summary/index.cjs +5 -2
  39. package/src/sprockets/error-summary/index.d.mts +1 -1
  40. package/src/sprockets/error-summary/index.jsx +3 -3
  41. package/src/sprockets/error-summary/title/index.cjs +5 -2
  42. package/src/sprockets/error-summary/title/index.d.mts +2 -2
  43. package/src/sprockets/error-summary/title/index.jsx +5 -4
  44. package/src/sprockets/fieldset/description/index.cjs +5 -2
  45. package/src/sprockets/fieldset/description/index.d.mts +1 -1
  46. package/src/sprockets/fieldset/description/index.jsx +2 -2
  47. package/src/sprockets/fieldset/error-message/index.cjs +5 -2
  48. package/src/sprockets/fieldset/error-message/index.d.mts +1 -1
  49. package/src/sprockets/fieldset/error-message/index.jsx +2 -2
  50. package/src/sprockets/fieldset/group/index.cjs +5 -2
  51. package/src/sprockets/fieldset/group/index.d.mts +3 -3
  52. package/src/sprockets/fieldset/group/index.jsx +6 -6
  53. package/src/sprockets/fieldset/index.cjs +5 -2
  54. package/src/sprockets/fieldset/index.d.mts +1 -1
  55. package/src/sprockets/fieldset/index.jsx +3 -3
  56. package/src/sprockets/fieldset/title/index.cjs +5 -2
  57. package/src/sprockets/fieldset/title/index.d.mts +2 -2
  58. package/src/sprockets/fieldset/title/index.jsx +5 -4
  59. package/src/sprockets/index.cjs +5 -2
  60. package/src/sprockets/index.d.mts +2 -15
  61. package/src/sprockets/index.jsx +2 -76
  62. package/src/super/components/description/index.cjs +20 -0
  63. package/src/super/components/description/index.d.cts +2 -0
  64. package/src/super/components/description/index.d.mts +18 -0
  65. package/src/super/components/description/index.jsx +47 -0
  66. package/src/super/components/error-message/index.cjs +20 -0
  67. package/src/super/components/error-message/index.d.cts +2 -0
  68. package/src/super/components/error-message/index.d.mts +27 -0
  69. package/src/super/components/error-message/index.jsx +121 -0
  70. package/src/super/components/group/index.cjs +20 -0
  71. package/src/super/components/group/index.d.cts +2 -0
  72. package/src/super/components/group/index.d.mts +19 -0
  73. package/src/super/components/group/index.jsx +52 -0
  74. package/src/super/components/index.cjs +16 -0
  75. package/src/super/components/index.d.cts +4 -0
  76. package/src/super/components/index.d.mts +4 -0
  77. package/src/super/components/index.mjs +10 -0
  78. package/src/super/components/title/index.cjs +20 -0
  79. package/src/super/components/title/index.d.cts +2 -0
  80. package/src/super/components/title/index.d.mts +24 -0
  81. package/src/super/components/title/index.jsx +73 -0
  82. package/src/super/sprockets/index.cjs +20 -0
  83. package/src/super/sprockets/index.d.cts +2 -0
  84. package/src/super/sprockets/index.d.mts +22 -0
  85. package/src/super/sprockets/index.jsx +79 -0
  86. package/src/common/index.d.mts +0 -1
  87. package/src/common/index.mjs +0 -1
@@ -1,16 +1,6 @@
1
1
  declare module '#sprockets/components/group' {
2
- import React from 'react'
3
-
4
- export type GroupProps = SprocketsTypes.Components.Group.GroupProps
5
- export type GroupState = SprocketsTypes.Components.Group.GroupState
6
-
7
- export default class Group<P extends GroupProps, S extends GroupState> extends React.Component<P, S> {
8
- static propTypes: object
9
-
10
- getClassName (): string
11
-
12
- shouldComponentUpdate (props: GroupProps, state: GroupState): boolean
13
- }
2
+ export { default } from '#sprockets/super/components/group'
3
+ export * from '#sprockets/super/components/group'
14
4
  }
15
5
 
16
6
  declare module 'shinkansen-sprockets/components/group' {
@@ -1,52 +1,5 @@
1
1
  /**
2
- * @typedef {SprocketsTypes.Components.Group.GroupProps} GroupProps
2
+ * Group component
3
3
  */
4
4
 
5
- /**
6
- * Group component
7
- */
8
- import React, { Component } from 'react'
9
- import PropTypes from 'prop-types'
10
-
11
- export default class Group extends Component {
12
- getClassName () {
13
- return 'group'
14
- }
15
-
16
- /**
17
- * @param {GroupProps} props
18
- * @returns {boolean}
19
- */
20
- shouldComponentUpdate (props) {
21
- return (
22
- (props.children !== this.props.children)
23
- )
24
- }
25
-
26
- render () {
27
- const {
28
- groupRef,
29
- children
30
- } = this.props
31
-
32
- return (
33
- <fieldset
34
- className={this.getClassName()}
35
- ref={groupRef}>
36
- {children}
37
- </fieldset>
38
- )
39
- }
40
- }
41
-
42
- Group.propTypes = {
43
- children: PropTypes.oneOfType([
44
- PropTypes.node,
45
- PropTypes.arrayOf(
46
- PropTypes.node
47
- )
48
- ]),
49
- groupRef: PropTypes.shape({
50
- current: PropTypes.shape({}).isRequired
51
- })
52
- }
5
+ export { default } from '#sprockets/super/components/group'
@@ -6,7 +6,7 @@ require('@babel/register')({
6
6
 
7
7
  const debug = require('debug')
8
8
 
9
- const log = debug('shinkansen-pinion/components')
9
+ const log = debug('shinkansen-sprockets/components')
10
10
 
11
11
  log('`shinkansen` is awake')
12
12
 
@@ -1,4 +1,4 @@
1
- export * as Description from '#sprockets/components/description'
2
- export * as ErrorMessage from '#sprockets/components/error-message'
3
- export * as Group from '#sprockets/components/group'
4
- export * as Title from '#sprockets/components/title'
1
+ export { default as Description } from '#sprockets/components/description'
2
+ export { default as ErrorMessage } from '#sprockets/components/error-message'
3
+ export { default as Group } from '#sprockets/components/group'
4
+ export { default as Title } from '#sprockets/components/title'
@@ -1,4 +1,4 @@
1
- export * as Description from '#sprockets/components/description'
2
- export * as ErrorMessage from '#sprockets/components/error-message'
3
- export * as Group from '#sprockets/components/group'
4
- export * as Title from '#sprockets/components/title'
1
+ export { default as Description } from '#sprockets/components/description'
2
+ export { default as ErrorMessage } from '#sprockets/components/error-message'
3
+ export { default as Group } from '#sprockets/components/group'
4
+ export { default as Title } from '#sprockets/components/title'
@@ -4,7 +4,7 @@ const log = debug('shinkansen-sprockets/components')
4
4
 
5
5
  log('`shinkansen` is awake')
6
6
 
7
- export * as Description from './description/index.cjs'
8
- export * as ErrorMessage from './error-message/index.cjs'
9
- export * as Group from './group/index.cjs'
10
- export * as Title from './title/index.cjs'
7
+ export { default as Description } from './description/index.cjs'
8
+ export { default as ErrorMessage } from './error-message/index.cjs'
9
+ export { default as Group } from './group/index.cjs'
10
+ export { default as Title } from './title/index.cjs'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/components/title')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Title // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Title
@@ -1,21 +1,6 @@
1
1
  declare module '#sprockets/components/title' {
2
- import React from 'react'
3
-
4
- export type TitleProps = SprocketsTypes.Components.Title.TitleProps
5
-
6
- export default class Title<P extends TitleProps> extends React.Component<P> {
7
- static propTypes: object
8
-
9
- hasTextContent (): boolean
10
-
11
- getTextContent (): string
12
-
13
- getClassName (): string
14
-
15
- shouldComponentUpdate (props: TitleProps): boolean
16
-
17
- renderTextContent (): React.JSX.Element | null
18
- }
2
+ export { default } from '#sprockets/super/components/title'
3
+ export * from '#sprockets/super/components/title'
19
4
  }
20
5
 
21
6
  declare module 'shinkansen-sprockets/components/title' {
@@ -1,73 +1,5 @@
1
1
  /**
2
- * @typedef {SprocketsTypes.Components.Title.TitleProps} TitleProps
2
+ * Title component
3
3
  */
4
4
 
5
- /**
6
- * Title component
7
- */
8
- import React, { Component } from 'react'
9
- import PropTypes from 'prop-types'
10
-
11
- import TextContent from '#sprockets/components/common/text-content'
12
-
13
- export default class Title extends Component {
14
- hasTextContent () {
15
- const {
16
- title
17
- } = this.props
18
-
19
- return !!title
20
- }
21
-
22
- getTextContent () {
23
- const {
24
- title
25
- } = this.props
26
-
27
- return title
28
- }
29
-
30
- getClassName () {
31
- return 'title'
32
- }
33
-
34
- /**
35
- * @param {TitleProps} props
36
- * @returns {boolean}
37
- */
38
- shouldComponentUpdate (props) {
39
- return (
40
- (props.title !== this.props.title)
41
- )
42
- }
43
-
44
- renderTextContent () {
45
- if (this.hasTextContent()) {
46
- const textContent = this.getTextContent()
47
-
48
- return (
49
- <TextContent
50
- textContent={textContent}
51
- />
52
- )
53
- }
54
-
55
- return null
56
- }
57
-
58
- render () {
59
- if (this.hasTextContent()) {
60
- return (
61
- <legend className={this.getClassName()}>
62
- {this.renderTextContent()}
63
- </legend>
64
- )
65
- }
66
-
67
- return null
68
- }
69
- }
70
-
71
- Title.propTypes = {
72
- title: PropTypes.string
73
- }
5
+ export { default } from '#sprockets/super/components/title'
@@ -13,8 +13,8 @@ import VisuallyHiddenText from '#sprockets/components/common/visually-hidden-tex
13
13
  const log = debug('shinkansen-sprockets/sprockets/check-answers/group/change-answer')
14
14
 
15
15
  /**
16
- * @param {{ textContent?: string, visuallyHiddenText: string }} props
17
- * @returns {React.JSX.Element | null}
16
+ * @param {{ textContent?: string, visuallyHiddenText: string }} props
17
+ * @returns {React.JSX.Element | null}
18
18
  */
19
19
  function TextContentWithVisuallyHiddenText ({ textContent, visuallyHiddenText }) {
20
20
  return (
@@ -32,8 +32,8 @@ TextContentWithVisuallyHiddenText.propTypes = {
32
32
  }
33
33
 
34
34
  /**
35
- * @param {{ textContent?: string, visuallyHiddenText?: string }} props
36
- * @returns {React.JSX.Element | null}
35
+ * @param {{ textContent?: string, visuallyHiddenText?: string }} props
36
+ * @returns {React.JSX.Element | null}
37
37
  */
38
38
  function LinkText ({ textContent, visuallyHiddenText }) {
39
39
  if (textContent) {
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/check-answers/group')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Group // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Group
@@ -1,8 +1,8 @@
1
1
  declare module '#sprockets/sprockets/check-answers/group' {
2
- import Group from '#sprockets/components/group'
2
+ import Group from '#sprockets/super/components/group'
3
3
 
4
- export type CheckAnswersProps = SprocketsTypes.Components.Group.CheckAnswers.CheckAnswersProps
5
- export type CheckAnswersState = SprocketsTypes.Components.Group.CheckAnswers.CheckAnswersState
4
+ export type CheckAnswersProps = SprocketsTypes.Sprockets.CheckAnswers.Group.CheckAnswersProps
5
+ export type CheckAnswersState = SprocketsTypes.Sprockets.CheckAnswers.Group.CheckAnswersState
6
6
 
7
7
  export default class CheckAnswersGroup<P extends CheckAnswersProps, S extends CheckAnswersState> extends Group<P, S> {}
8
8
  }
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @typedef {SprocketsTypes.AnswerDefinitionType} AnswerDefinitionType
3
- * @typedef {SprocketsTypes.Components.Group.GroupProps} GroupProps
4
- * @typedef {SprocketsTypes.Components.Group.GroupState} GroupState
5
- * @typedef {SprocketsTypes.Components.Group.CheckAnswers.CheckAnswersProps} CheckAnswersProps
6
- * @typedef {SprocketsTypes.Components.Group.CheckAnswers.CheckAnswersState} CheckAnswersState
3
+ * @typedef {SprocketsTypes.Super.Components.Group.GroupProps} GroupProps
4
+ * @typedef {SprocketsTypes.Super.Components.Group.GroupState} GroupState
5
+ * @typedef {SprocketsTypes.Sprockets.CheckAnswers.Group.CheckAnswersProps} CheckAnswersProps
6
+ * @typedef {SprocketsTypes.Sprockets.CheckAnswers.Group.CheckAnswersState} CheckAnswersState
7
7
  */
8
8
 
9
9
  /**
10
- * CheckAnswersGroup component
10
+ * CheckAnswersGroup component
11
11
  */
12
12
  import React from 'react'
13
13
  import PropTypes from 'prop-types'
@@ -16,7 +16,7 @@ import classnames from 'classnames'
16
16
 
17
17
  import debug from 'debug'
18
18
 
19
- import Group from '#sprockets/components/group'
19
+ import Group from '#sprockets/super/components/group'
20
20
 
21
21
  import {
22
22
  getKey
@@ -34,9 +34,9 @@ const DEFAULT_CHECK_ANSWERS = []
34
34
  const log = debug('shinkansen-sprockets/components/group/check-answers')
35
35
 
36
36
  /**
37
- * @param {AnswerDefinitionType} answer
38
- * @param {number} index
39
- * @returns {React.JSX.Element}
37
+ * @param {AnswerDefinitionType} answer
38
+ * @param {number} index
39
+ * @returns {React.JSX.Element}
40
40
  */
41
41
  function render ({ params: { answer, changeAnswer: { href, text, ...changeAnswer } } }, index) {
42
42
  log('render')
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/check-answers')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: CheckAnswers // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = CheckAnswers
@@ -1,7 +1,7 @@
1
1
  declare module '#sprockets/sprockets/check-answers' {
2
2
  import Sprocket from '#sprockets/sprockets'
3
3
 
4
- export type CheckAnswersProps = SprocketsTypes.Sprockets.Sprocket.CheckAnswers.CheckAnswersProps
4
+ export type CheckAnswersProps = SprocketsTypes.Sprockets.CheckAnswers.CheckAnswersProps
5
5
 
6
6
  export default class CheckAnswersSprocket<P extends CheckAnswersProps> extends Sprocket<P> {}
7
7
  }
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @typedef {SprocketsTypes.AnswerDefinitionType} AnswerDefinitionType
3
- * @typedef {SprocketsTypes.Sprockets.Sprocket.SprocketProps} SprocketProps
4
- * @typedef {SprocketsTypes.Sprockets.Sprocket.CheckAnswers.CheckAnswersProps} CheckAnswersProps
3
+ * @typedef {SprocketsTypes.Sprockets.SprocketProps} SprocketProps
4
+ * @typedef {SprocketsTypes.Sprockets.CheckAnswers.CheckAnswersProps} CheckAnswersProps
5
5
  */
6
6
 
7
7
  /**
8
- * CheckAnswersSprocket component
8
+ * CheckAnswersSprocket component
9
9
  */
10
10
  import React from 'react'
11
11
  import PropTypes from 'prop-types'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/check-answers/title')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Title // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Title
@@ -1,7 +1,7 @@
1
1
  declare module '#sprockets/sprockets/check-answers/title' {
2
- import Title from '#sprockets/components/title'
2
+ import Title from '#sprockets/super/components/title'
3
3
 
4
- export type CheckAnswersProps = SprocketsTypes.Components.Title.CheckAnswers.CheckAnswersProps
4
+ export type CheckAnswersProps = SprocketsTypes.Sprockets.CheckAnswers.Title.CheckAnswersProps
5
5
 
6
6
  export default class CheckAnswersTitle<P extends CheckAnswersProps> extends Title<P> {}
7
7
  }
@@ -1,14 +1,15 @@
1
1
  /**
2
- * @typedef {SprocketsTypes.Components.Title.TitleProps} TitleProps
3
- * @typedef {SprocketsTypes.Components.Title.CheckAnswers.CheckAnswersProps} CheckAnswersProps
2
+ * @typedef {SprocketsTypes.Super.Components.Title.TitleProps} TitleProps
3
+ * @typedef {SprocketsTypes.Sprockets.CheckAnswers.Title.CheckAnswersProps} CheckAnswersProps
4
4
  */
5
5
 
6
6
  /**
7
- * CheckAnswersTitle component
7
+ * CheckAnswersTitle component
8
8
  */
9
9
  import React from 'react'
10
10
  import classnames from 'classnames'
11
- import Title from '#sprockets/components/title'
11
+
12
+ import Title from '#sprockets/super/components/title'
12
13
 
13
14
  /**
14
15
  * @extends {Title<TitleProps & CheckAnswersProps>}
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/error-summary/group')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Group // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Group
@@ -1,8 +1,8 @@
1
1
  declare module '#sprockets/sprockets/error-summary/group' {
2
- import Group from '#sprockets/components/group'
2
+ import Group from '#sprockets/super/components/group'
3
3
 
4
- export type ErrorSummaryProps = SprocketsTypes.Components.Group.ErrorSummary.ErrorSummaryProps
5
- export type ErrorSummaryState = SprocketsTypes.Components.Group.ErrorSummary.ErrorSummaryState
4
+ export type ErrorSummaryProps = SprocketsTypes.Sprockets.ErrorSummary.Group.ErrorSummaryProps
5
+ export type ErrorSummaryState = SprocketsTypes.Sprockets.ErrorSummary.Group.ErrorSummaryState
6
6
 
7
7
  export default class ErrorSummaryGroup<P extends ErrorSummaryProps, S extends ErrorSummaryState> extends Group<P, S> {}
8
8
  }
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @typedef {SprocketsTypes.ErrorDefinitionType} ErrorDefinitionType
3
- * @typedef {SprocketsTypes.Components.Group.GroupProps} GroupProps
4
- * @typedef {SprocketsTypes.Components.Group.GroupState} GroupState
5
- * @typedef {SprocketsTypes.Components.Group.ErrorSummary.ErrorSummaryProps} ErrorSummaryProps
6
- * @typedef {SprocketsTypes.Components.Group.ErrorSummary.ErrorSummaryState} ErrorSummaryState
3
+ * @typedef {SprocketsTypes.Super.Components.Group.GroupProps} GroupProps
4
+ * @typedef {SprocketsTypes.Super.Components.Group.GroupState} GroupState
5
+ * @typedef {SprocketsTypes.Sprockets.ErrorSummary.Group.ErrorSummaryProps} ErrorSummaryProps
6
+ * @typedef {SprocketsTypes.Sprockets.ErrorSummary.Group.ErrorSummaryState} ErrorSummaryState
7
7
  */
8
8
 
9
9
  /**
10
- * ErrorSummaryGroup component
10
+ * ErrorSummaryGroup component
11
11
  */
12
12
  import React from 'react'
13
13
  import PropTypes from 'prop-types'
@@ -17,7 +17,7 @@ import classnames from 'classnames'
17
17
 
18
18
  import debug from 'debug'
19
19
 
20
- import Group from '#sprockets/components/group'
20
+ import Group from '#sprockets/super/components/group'
21
21
 
22
22
  import transform from '#sprockets/transformers/error-summary'
23
23
  import {
@@ -34,9 +34,9 @@ const DEFAULT_ERROR_SUMMARY = []
34
34
  const log = debug('shinkansen-sprockets/sprockets/error-summary/group')
35
35
 
36
36
  /**
37
- * @param {ErrorDefinitionType} error
38
- * @param {number} index
39
- * @returns {React.JSX.Element}
37
+ * @param {ErrorDefinitionType} error
38
+ * @param {number} index
39
+ * @returns {React.JSX.Element}
40
40
  */
41
41
  function render (error, index) {
42
42
  log('render')
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/error-summary')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: ErrorSummary // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = ErrorSummary
@@ -1,7 +1,7 @@
1
1
  declare module '#sprockets/sprockets/error-summary' {
2
2
  import Sprocket from '#sprockets/sprockets'
3
3
 
4
- export type ErrorSummaryProps = SprocketsTypes.Sprockets.Sprocket.ErrorSummary.ErrorSummaryProps
4
+ export type ErrorSummaryProps = SprocketsTypes.Sprockets.ErrorSummary.ErrorSummaryProps
5
5
 
6
6
  export default class ErrorSummarySprocket<P extends ErrorSummaryProps> extends Sprocket<P> {}
7
7
  }
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @typedef {SprocketsTypes.ErrorDefinitionType} ErrorDefinitionType
3
- * @typedef {SprocketsTypes.Sprockets.Sprocket.SprocketProps} SprocketProps
4
- * @typedef {SprocketsTypes.Sprockets.Sprocket.ErrorSummary.ErrorSummaryProps} ErrorSummaryProps
3
+ * @typedef {SprocketsTypes.Sprockets.SprocketProps} SprocketProps
4
+ * @typedef {SprocketsTypes.Sprockets.ErrorSummary.ErrorSummaryProps} ErrorSummaryProps
5
5
  */
6
6
 
7
7
  /**
8
- * ErrorSummarySprocket component
8
+ * ErrorSummarySprocket component
9
9
  */
10
10
  import React from 'react'
11
11
  import PropTypes from 'prop-types'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/error-summary/title')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Title // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Title
@@ -1,7 +1,7 @@
1
1
  declare module '#sprockets/sprockets/error-summary/title' {
2
- import Title from '#sprockets/components/title'
2
+ import Title from '#sprockets/super/components/title'
3
3
 
4
- export type ErrorSummaryProps = SprocketsTypes.Components.Title.ErrorSummary.ErrorSummaryProps
4
+ export type ErrorSummaryProps = SprocketsTypes.Sprockets.ErrorSummary.Title.ErrorSummaryProps
5
5
 
6
6
  export default class ErrorSummaryTitle<P extends ErrorSummaryProps> extends Title<P> {}
7
7
  }
@@ -1,14 +1,15 @@
1
1
  /**
2
- * @typedef {SprocketsTypes.Components.Title.TitleProps} TitleProps
3
- * @typedef {SprocketsTypes.Components.Title.ErrorSummary.ErrorSummaryProps} ErrorSummaryProps
2
+ * @typedef {SprocketsTypes.Super.Components.Title.TitleProps} TitleProps
3
+ * @typedef {SprocketsTypes.Sprockets.ErrorSummary.Title.ErrorSummaryProps} ErrorSummaryProps
4
4
  */
5
5
 
6
6
  /**
7
- * ErrorSummaryTitle component
7
+ * ErrorSummaryTitle component
8
8
  */
9
9
  import React from 'react'
10
10
  import classnames from 'classnames'
11
- import Title from '#sprockets/components/title'
11
+
12
+ import Title from '#sprockets/super/components/title'
12
13
 
13
14
  /**
14
15
  * @extends {Title<TitleProps & ErrorSummaryProps>}
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/fieldset/description')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Description // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Description
@@ -1,5 +1,5 @@
1
1
  declare module '#sprockets/sprockets/fieldset/description' {
2
- import Description from '#sprockets/components/description'
2
+ import Description from '#sprockets/super/components/description'
3
3
 
4
4
  export default class FieldsetDescription extends Description {}
5
5
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
- * FieldsetDescription component
2
+ * FieldsetDescription component
3
3
  */
4
4
  import classnames from 'classnames'
5
- import Description from '#sprockets/components/description'
5
+ import Description from '#sprockets/super/components/description'
6
6
 
7
7
  export default class FieldsetDescription extends Description {
8
8
  getClassName () {
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/fieldset/error-message')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: ErrorMessage // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = ErrorMessage
@@ -1,5 +1,5 @@
1
1
  declare module '#sprockets/sprockets/fieldset/error-message' {
2
- import ErrorMessage from '#sprockets/components/error-message'
2
+ import ErrorMessage from '#sprockets/super/components/error-message'
3
3
 
4
4
  export default class FieldsetErrorMessage extends ErrorMessage {}
5
5
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
- * FieldsetErrorMessage component
2
+ * FieldsetErrorMessage component
3
3
  */
4
4
  import classnames from 'classnames'
5
- import ErrorMessage from '#sprockets/components/error-message'
5
+ import ErrorMessage from '#sprockets/super/components/error-message'
6
6
 
7
7
  export default class FieldsetErrorMessage extends ErrorMessage {
8
8
  getClassName () {
@@ -11,7 +11,10 @@ const log = debug('shinkansen-sprockets/sprockets/fieldset/group')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Group // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Group