shinkansen-cogs 1.8.20 → 1.9.0

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 (143) hide show
  1. package/eslint.config.mjs +16 -3
  2. package/index.d.mts +116 -104
  3. package/package.json +38 -7
  4. package/src/cogs/checkbox/description/index.cjs +5 -2
  5. package/src/cogs/checkbox/description/index.jsx +1 -1
  6. package/src/cogs/checkbox/error-message/index.cjs +5 -2
  7. package/src/cogs/checkbox/error-message/index.jsx +1 -1
  8. package/src/cogs/checkbox/field/index.cjs +5 -2
  9. package/src/cogs/checkbox/field/index.jsx +1 -1
  10. package/src/cogs/checkbox/index.cjs +5 -2
  11. package/src/cogs/checkbox/index.d.mts +1 -1
  12. package/src/cogs/checkbox/index.jsx +13 -10
  13. package/src/cogs/checkbox/title/index.cjs +5 -2
  14. package/src/cogs/checkbox/title/index.jsx +2 -2
  15. package/src/cogs/email/description/index.cjs +5 -2
  16. package/src/cogs/email/description/index.jsx +1 -1
  17. package/src/cogs/email/error-message/index.cjs +5 -2
  18. package/src/cogs/email/error-message/index.jsx +1 -1
  19. package/src/cogs/email/field/index.cjs +5 -2
  20. package/src/cogs/email/field/index.jsx +1 -1
  21. package/src/cogs/email/index.cjs +5 -2
  22. package/src/cogs/email/index.d.mts +1 -1
  23. package/src/cogs/email/index.jsx +12 -8
  24. package/src/cogs/email/title/index.cjs +5 -2
  25. package/src/cogs/email/title/index.jsx +2 -2
  26. package/src/cogs/index.cjs +7 -5
  27. package/src/cogs/index.d.cts +0 -1
  28. package/src/cogs/index.d.mts +4 -23
  29. package/src/cogs/index.jsx +22 -169
  30. package/src/cogs/number/description/index.cjs +5 -2
  31. package/src/cogs/number/description/index.jsx +1 -1
  32. package/src/cogs/number/error-message/index.cjs +5 -2
  33. package/src/cogs/number/error-message/index.jsx +1 -1
  34. package/src/cogs/number/field/index.cjs +5 -2
  35. package/src/cogs/number/field/index.jsx +1 -1
  36. package/src/cogs/number/index.cjs +5 -2
  37. package/src/cogs/number/index.d.mts +1 -1
  38. package/src/cogs/number/index.jsx +12 -8
  39. package/src/cogs/number/title/index.cjs +5 -2
  40. package/src/cogs/number/title/index.jsx +2 -2
  41. package/src/cogs/password/description/index.cjs +5 -2
  42. package/src/cogs/password/description/index.jsx +1 -1
  43. package/src/cogs/password/error-message/index.cjs +5 -2
  44. package/src/cogs/password/error-message/index.jsx +1 -1
  45. package/src/cogs/password/field/index.cjs +5 -2
  46. package/src/cogs/password/field/index.jsx +1 -1
  47. package/src/cogs/password/index.cjs +5 -2
  48. package/src/cogs/password/index.d.mts +1 -1
  49. package/src/cogs/password/index.jsx +12 -8
  50. package/src/cogs/password/title/index.cjs +5 -2
  51. package/src/cogs/password/title/index.jsx +2 -2
  52. package/src/cogs/radio/description/index.cjs +5 -2
  53. package/src/cogs/radio/description/index.jsx +1 -1
  54. package/src/cogs/radio/error-message/index.cjs +5 -2
  55. package/src/cogs/radio/error-message/index.jsx +1 -1
  56. package/src/cogs/radio/field/index.cjs +5 -2
  57. package/src/cogs/radio/field/index.jsx +1 -1
  58. package/src/cogs/radio/index.cjs +5 -2
  59. package/src/cogs/radio/index.d.mts +1 -1
  60. package/src/cogs/radio/index.jsx +13 -10
  61. package/src/cogs/radio/title/index.cjs +5 -2
  62. package/src/cogs/radio/title/index.jsx +2 -2
  63. package/src/cogs/select/description/index.cjs +5 -2
  64. package/src/cogs/select/description/index.jsx +1 -1
  65. package/src/cogs/select/error-message/index.cjs +5 -2
  66. package/src/cogs/select/error-message/index.jsx +1 -1
  67. package/src/cogs/select/field/index.cjs +5 -2
  68. package/src/cogs/select/field/index.jsx +9 -5
  69. package/src/cogs/select/index.cjs +5 -2
  70. package/src/cogs/select/index.d.mts +1 -1
  71. package/src/cogs/select/index.jsx +12 -8
  72. package/src/cogs/select/title/index.cjs +5 -2
  73. package/src/cogs/select/title/index.jsx +2 -2
  74. package/src/cogs/text/description/index.cjs +5 -2
  75. package/src/cogs/text/description/index.jsx +1 -1
  76. package/src/cogs/text/error-message/index.cjs +5 -2
  77. package/src/cogs/text/error-message/index.jsx +1 -1
  78. package/src/cogs/text/field/index.cjs +5 -2
  79. package/src/cogs/text/field/index.jsx +1 -1
  80. package/src/cogs/text/index.cjs +5 -2
  81. package/src/cogs/text/index.d.mts +1 -1
  82. package/src/cogs/text/index.jsx +12 -8
  83. package/src/cogs/text/title/index.cjs +5 -2
  84. package/src/cogs/text/title/index.jsx +2 -2
  85. package/src/cogs/textarea/description/index.cjs +5 -2
  86. package/src/cogs/textarea/description/index.jsx +1 -1
  87. package/src/cogs/textarea/error-message/index.cjs +5 -2
  88. package/src/cogs/textarea/error-message/index.jsx +1 -1
  89. package/src/cogs/textarea/field/index.cjs +5 -2
  90. package/src/cogs/textarea/field/index.jsx +1 -1
  91. package/src/cogs/textarea/index.cjs +5 -2
  92. package/src/cogs/textarea/index.d.mts +1 -1
  93. package/src/cogs/textarea/index.jsx +12 -8
  94. package/src/cogs/textarea/title/index.cjs +5 -2
  95. package/src/cogs/textarea/title/index.jsx +2 -2
  96. package/src/common/index.d.mts +1 -7
  97. package/src/common/index.mjs +1 -5
  98. package/src/components/common/disabled/index.cjs +5 -2
  99. package/src/components/common/readonly/index.cjs +5 -2
  100. package/src/components/common/required/index.cjs +5 -2
  101. package/src/components/common/text-content/index.cjs +5 -2
  102. package/src/components/common/text-content/index.jsx +1 -1
  103. package/src/components/description/index.cjs +5 -2
  104. package/src/components/description/index.d.mts +1 -1
  105. package/src/components/description/index.jsx +2 -44
  106. package/src/components/error-message/index.cjs +5 -2
  107. package/src/components/error-message/index.d.mts +2 -21
  108. package/src/components/error-message/index.jsx +2 -118
  109. package/src/components/field/index.cjs +9 -3
  110. package/src/components/field/index.d.cts +0 -1
  111. package/src/components/field/index.d.mts +3 -11
  112. package/src/components/field/index.jsx +18 -75
  113. package/src/components/index.cjs +25 -5
  114. package/src/components/index.d.cts +4 -4
  115. package/src/components/index.d.mts +4 -4
  116. package/src/components/index.mjs +4 -4
  117. package/src/components/title/index.cjs +2 -2
  118. package/src/components/title/index.d.mts +2 -23
  119. package/src/components/title/index.jsx +2 -118
  120. package/src/super/cogs/index.cjs +20 -0
  121. package/src/super/cogs/index.d.cts +2 -0
  122. package/src/super/cogs/index.d.mts +28 -0
  123. package/src/super/cogs/index.jsx +179 -0
  124. package/src/super/components/description/index.cjs +20 -0
  125. package/src/super/components/description/index.d.cts +2 -0
  126. package/src/super/components/description/index.d.mts +18 -0
  127. package/src/super/components/description/index.jsx +47 -0
  128. package/src/super/components/error-message/index.cjs +20 -0
  129. package/src/super/components/error-message/index.d.cts +2 -0
  130. package/src/super/components/error-message/index.d.mts +28 -0
  131. package/src/super/components/error-message/index.jsx +121 -0
  132. package/src/super/components/field/index.cjs +20 -0
  133. package/src/super/components/field/index.d.cts +2 -0
  134. package/src/super/components/field/index.d.mts +18 -0
  135. package/src/super/components/field/index.jsx +74 -0
  136. package/src/super/components/index.cjs +32 -0
  137. package/src/super/components/index.d.cts +4 -0
  138. package/src/super/components/index.d.mts +4 -0
  139. package/src/super/components/index.mjs +10 -0
  140. package/src/super/components/title/index.cjs +20 -0
  141. package/src/super/components/title/index.d.cts +2 -0
  142. package/src/super/components/title/index.d.mts +30 -0
  143. package/src/super/components/title/index.jsx +121 -0
package/eslint.config.mjs CHANGED
@@ -79,7 +79,8 @@ export default [
79
79
  ],
80
80
  ignores: [
81
81
  'src',
82
- 'stories'
82
+ 'stories',
83
+ 'test'
83
84
  ],
84
85
  languageOptions: {
85
86
  globals: {
@@ -98,6 +99,16 @@ export default [
98
99
  }
99
100
  }
100
101
  }),
102
+ standard({
103
+ files: [
104
+ 'test/**/*.{mjs,cjs,mts,cts}'
105
+ ],
106
+ languageOptions: {
107
+ globals: {
108
+ ...globals.mocha
109
+ }
110
+ }
111
+ }),
101
112
  /**
102
113
  * Standard config for all `jsx` files
103
114
  */
@@ -166,7 +177,8 @@ export default [
166
177
  '**/*.{mts,cts}'
167
178
  ],
168
179
  ignores: [
169
- 'src'
180
+ 'src',
181
+ 'test'
170
182
  ],
171
183
  languageOptions: {
172
184
  parser: typescriptParser,
@@ -182,7 +194,8 @@ export default [
182
194
  }),
183
195
  typescript({
184
196
  files: [
185
- 'src/**/*.{mts,cts}'
197
+ 'src/**/*.{mts,cts}',
198
+ 'test/**/*.{mts,cts}'
186
199
  ],
187
200
  languageOptions: {
188
201
  parser: typescriptParser,
package/index.d.mts CHANGED
@@ -2,13 +2,7 @@ import type React from 'react'
2
2
 
3
3
  declare global {
4
4
  namespace CogsTypes {
5
- export type OnChangeType = (
6
- name: string,
7
- value?: string | string[],
8
- checked?: boolean
9
- ) => void
10
-
11
- export type OnClickType = (
5
+ export type OnEventType = (
12
6
  name: string,
13
7
  value?: string | string[],
14
8
  checked?: boolean
@@ -25,6 +19,69 @@ declare global {
25
19
  href: string
26
20
  }
27
21
 
22
+ export namespace Super {
23
+ export namespace Cogs {
24
+ export interface CogProps {
25
+ id?: string
26
+ name: string
27
+ title?: string
28
+ description?: string
29
+ errorMessage?: ErrorDefinitionType
30
+ required?: boolean
31
+ disabled?: boolean
32
+ readOnly?: boolean
33
+ tabIndex?: number
34
+ accessKey?: string
35
+ placeholder?: string
36
+ onChange?: OnEventType
37
+ fieldRef?: React.RefObject<any> // eslint-disable-line @typescript-eslint/no-explicit-any -- Simplicity
38
+ }
39
+ }
40
+
41
+ export namespace Components {
42
+ export namespace Description {
43
+ export interface DescriptionProps {
44
+ description?: string
45
+ }
46
+ }
47
+
48
+ export namespace ErrorMessage {
49
+ export interface ErrorMessageProps {
50
+ errorMessage?: ErrorDefinitionType
51
+ }
52
+
53
+ export interface ErrorMessageState {
54
+ errorMessage?: ErrorDefinitionType
55
+ }
56
+ }
57
+
58
+ export namespace Field {
59
+ export interface FieldProps extends React.PropsWithChildren {
60
+ id?: string
61
+ name: string
62
+ required?: boolean
63
+ disabled?: boolean
64
+ readOnly?: boolean
65
+ tabIndex?: number
66
+ accessKey?: string
67
+ placeholder?: string
68
+ onChange?: OnEventType
69
+ fieldRef?: React.RefObject<any> // eslint-disable-line @typescript-eslint/no-explicit-any -- Simplicity
70
+ }
71
+ }
72
+
73
+ export namespace Title {
74
+ export interface TitleProps extends React.PropsWithChildren {
75
+ id: string
76
+ title?: string
77
+ required?: boolean
78
+ disabled?: boolean
79
+ readOnly?: boolean
80
+ }
81
+ }
82
+ }
83
+ }
84
+
28
85
  export namespace Components {
29
86
  export namespace Common {
30
87
  export namespace TextContent {
@@ -35,45 +92,26 @@ declare global {
35
92
  }
36
93
 
37
94
  export namespace Description {
38
- export interface DescriptionProps {
39
- description?: string
40
- }
95
+ export type DescriptionProps = Super.Components.Description.DescriptionProps
41
96
  }
42
97
 
43
98
  export namespace ErrorMessage {
44
- export interface ErrorMessageProps {
45
- errorMessage?: ErrorDefinitionType
46
- }
99
+ export type ErrorMessageProps = Super.Components.ErrorMessage.ErrorMessageProps
47
100
 
48
- export interface ErrorMessageState {
49
- errorMessage?: ErrorDefinitionType
50
- }
101
+ export type ErrorMessageState = Super.Components.ErrorMessage.ErrorMessageState
51
102
  }
52
103
 
53
104
  export namespace Field {
54
- export interface FieldProps extends React.PropsWithChildren {
55
- id?: string
56
- name: string
57
- required?: boolean
58
- disabled?: boolean
59
- readOnly?: boolean
60
- tabIndex?: number
61
- accessKey?: string
62
- placeholder?: string
63
- onChange?: OnChangeType
64
- fieldRef?: React.RefObject<any> // eslint-disable-line @typescript-eslint/no-explicit-any -- Simplicity
65
- }
66
-
67
- export interface ValueProps extends FieldProps {
105
+ export interface ValueProps extends Super.Components.Field.FieldProps {
68
106
  value?: string
69
107
  defaultValue?: string
70
108
  }
71
109
 
72
- export interface CheckProps extends FieldProps {
110
+ export interface CheckProps extends Super.Components.Field.FieldProps {
73
111
  value?: string
74
112
  checked?: boolean
75
113
  defaultChecked?: boolean
76
- onClick: OnClickType
114
+ onClick: OnEventType
77
115
  }
78
116
 
79
117
  export namespace Checkbox {
@@ -112,116 +150,90 @@ declare global {
112
150
  }
113
151
 
114
152
  export namespace Title {
115
- export interface TitleProps extends React.PropsWithChildren {
116
- id: string
117
- title?: string
118
- required?: boolean
119
- disabled?: boolean
120
- readOnly?: boolean
121
- }
122
-
123
153
  export namespace Checkbox {
124
- export type CheckboxProps = TitleProps
154
+ export type CheckboxProps = Super.Components.Title.TitleProps
125
155
  }
126
156
 
127
157
  export namespace Email {
128
- export type EmailProps = TitleProps
158
+ export type EmailProps = Super.Components.Title.TitleProps
129
159
  }
130
160
 
131
161
  export namespace Number {
132
- export type NumberProps = TitleProps
162
+ export type NumberProps = Super.Components.Title.TitleProps
133
163
  }
134
164
 
135
165
  export namespace Password {
136
- export type PasswordProps = TitleProps
166
+ export type PasswordProps = Super.Components.Title.TitleProps
137
167
  }
138
168
 
139
169
  export namespace Radio {
140
- export type RadioProps = TitleProps
170
+ export type RadioProps = Super.Components.Title.TitleProps
141
171
  }
142
172
 
143
173
  export namespace Select {
144
- export type SelectProps = TitleProps
174
+ export type SelectProps = Super.Components.Title.TitleProps
145
175
  }
146
176
 
147
177
  export namespace Text {
148
- export type TextProps = TitleProps
178
+ export type TextProps = Super.Components.Title.TitleProps
149
179
  }
150
180
 
151
181
  export namespace Textarea {
152
- export type TextareaProps = TitleProps
182
+ export type TextareaProps = Super.Components.Title.TitleProps
153
183
  }
154
184
  }
155
185
  }
156
186
 
157
187
  export namespace Cogs {
158
- export namespace Cog {
159
- export interface CogProps {
160
- id?: string
161
- name: string
162
- title?: string
163
- description?: string
164
- errorMessage?: ErrorDefinitionType
165
- required?: boolean
166
- disabled?: boolean
167
- readOnly?: boolean
168
- tabIndex?: number
169
- accessKey?: string
170
- placeholder?: string
171
- onChange?: OnChangeType
172
- fieldRef?: React.RefObject<any> // eslint-disable-line @typescript-eslint/no-explicit-any -- Simplicity
173
- }
174
-
175
- export interface ValueProps extends CogProps {
176
- value?: string
177
- defaultValue?: string
178
- }
188
+ export interface ValueProps extends Super.Cogs.CogProps {
189
+ value?: string
190
+ defaultValue?: string
191
+ }
179
192
 
180
- export interface CheckProps extends CogProps {
181
- value?: string
182
- checked?: boolean
183
- defaultChecked?: boolean
184
- onClick: OnClickType
185
- }
193
+ export interface CheckProps extends Super.Cogs.CogProps {
194
+ value?: string
195
+ checked?: boolean
196
+ defaultChecked?: boolean
197
+ onClick: OnEventType
198
+ }
186
199
 
187
- export namespace Checkbox {
188
- export type CheckboxProps = CheckProps
189
- }
200
+ export namespace Checkbox {
201
+ export type CheckboxProps = CheckProps
202
+ }
190
203
 
191
- export namespace Email {
192
- export type EmailProps = ValueProps
193
- }
204
+ export namespace Email {
205
+ export type EmailProps = ValueProps
206
+ }
194
207
 
195
- export namespace Number {
196
- export interface NumberProps extends Omit<Omit<ValueProps, 'value'>, 'defaultValue'> {
197
- value?: string | number
198
- defaultValue?: string | number
199
- }
208
+ export namespace Number {
209
+ export interface NumberProps extends Omit<Omit<ValueProps, 'value'>, 'defaultValue'> {
210
+ value?: string | number
211
+ defaultValue?: string | number
200
212
  }
213
+ }
201
214
 
202
- export namespace Password {
203
- export type PasswordProps = ValueProps
204
- }
215
+ export namespace Password {
216
+ export type PasswordProps = ValueProps
217
+ }
205
218
 
206
- export namespace Radio {
207
- export type RadioProps = CheckProps
208
- }
219
+ export namespace Radio {
220
+ export type RadioProps = CheckProps
221
+ }
209
222
 
210
- export namespace Select {
211
- export interface SelectProps extends Omit<Omit<ValueProps, 'value'>, 'defaultValue'>, React.PropsWithChildren {
212
- multiple?: boolean
213
- value?: string | string[]
214
- defaultValue?: string | string[]
215
- }
223
+ export namespace Select {
224
+ export interface SelectProps extends Omit<Omit<ValueProps, 'value'>, 'defaultValue'>, React.PropsWithChildren {
225
+ multiple?: boolean
226
+ value?: string | string[]
227
+ defaultValue?: string | string[]
216
228
  }
229
+ }
217
230
 
218
- export namespace Text {
219
- export type TextProps = ValueProps
220
- }
231
+ export namespace Text {
232
+ export type TextProps = ValueProps
233
+ }
221
234
 
222
- export namespace Textarea {
223
- export type TextareaProps = ValueProps
224
- }
235
+ export namespace Textarea {
236
+ export type TextareaProps = ValueProps
225
237
  }
226
238
  }
227
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-cogs",
3
- "version": "1.8.20",
3
+ "version": "1.9.0",
4
4
  "description": "Shinkansen Cogs",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -39,7 +39,9 @@
39
39
  "prestorybook": "npm run build && npm run transform",
40
40
  "pretest": "npm run nvm",
41
41
  "storybook": "storybook dev -p 6006",
42
- "test": "cross-env NODE_ENV=test jest",
42
+ "test": "npm run test:mocha && npm run test:jest",
43
+ "test:jest": "cross-env NODE_ENV=test jest",
44
+ "test:mocha": "cross-env NODE_ENV=test mocha test --recursive",
43
45
  "transform": "cross-env DEBUG=shinkansen-cogs* ./transform.sh"
44
46
  },
45
47
  "dependencies": {
@@ -54,21 +56,24 @@
54
56
  "@babel/preset-react": "^7.26.3",
55
57
  "@babel/register": "^7.25.9",
56
58
  "@modernpoacher/design-system": "1.1.31",
57
- "@sequencemedia/eslint-config-standard": "^0.2.39",
58
- "@sequencemedia/eslint-config-typescript": "^0.1.56",
59
+ "@sequencemedia/eslint-config-standard": "^0.2.41",
60
+ "@sequencemedia/eslint-config-typescript": "^0.1.57",
59
61
  "@storybook/addon-actions": "7.6.20",
60
62
  "@storybook/addon-essentials": "7.6.20",
61
63
  "@storybook/addon-links": "7.6.20",
62
64
  "@storybook/react": "7.6.20",
63
65
  "@storybook/react-webpack5": "7.6.20",
64
66
  "@types/babel__register": "^7.17.3",
67
+ "@types/chai": "^5.0.1",
65
68
  "@types/debug": "^4.1.12",
66
69
  "@types/jest": "^29.5.14",
70
+ "@types/mocha": "^10.0.10",
67
71
  "@types/react": "18.3.13",
68
72
  "@types/react-test-renderer": "^19.0.0",
69
73
  "@typescript-eslint/eslint-plugin": "^8.26.0",
70
74
  "@typescript-eslint/parser": "^8.26.0",
71
75
  "autoprefixer": "^10.4.20",
76
+ "chai": "^5.2.0",
72
77
  "clean-webpack-plugin": "^4.0.0",
73
78
  "core-js": "^3.41.0",
74
79
  "cross-env": "^7.0.3",
@@ -79,6 +84,7 @@
79
84
  "husky": "^9.1.7",
80
85
  "jest": "^29.7.0",
81
86
  "mini-css-extract-plugin": "^2.9.2",
87
+ "mocha": "^11.1.0",
82
88
  "perfectionist": "^2.4.0",
83
89
  "postcss": "^8.5.3",
84
90
  "postcss-discard-comments": "^7.0.3",
@@ -105,12 +111,22 @@
105
111
  },
106
112
  "#cogs/cogs": "./src/cogs/index.cjs",
107
113
  "#cogs/cogs/*": "./src/cogs/*/index.cjs",
108
- "#cogs/common": "./src/common/index.mjs",
109
114
  "#cogs/components": {
110
115
  "require": "./src/components/index.cjs",
111
116
  "import": "./src/components/index.mjs"
112
117
  },
113
118
  "#cogs/components/*": "./src/components/*/index.cjs",
119
+ "#cogs/super": {
120
+ "require": "./src/super/index.cjs",
121
+ "import": "./src/super/index.mjs"
122
+ },
123
+ "#cogs/super/cogs": "./src/super/cogs/index.cjs",
124
+ "#cogs/super/cogs/*": "./src/super/cogs/*/index.cjs",
125
+ "#cogs/super/components": {
126
+ "require": "./src/super/components/index.cjs",
127
+ "import": "./src/super/components/index.mjs"
128
+ },
129
+ "#cogs/super/components/*": "./src/super/components/*/index.cjs",
114
130
  "#cogs/transformers": "./src/transformers/index.mjs",
115
131
  "#cogs/transformers/*": "./src/transformers/*/index.mjs",
116
132
  "#stories/cogs/*": "./stories/cogs/*/index.stories.jsx",
@@ -125,8 +141,23 @@
125
141
  },
126
142
  "./cogs": "./src/cogs/index.cjs",
127
143
  "./cogs/*": "./src/cogs/*/index.cjs",
128
- "./common": "./src/common/index.mjs",
129
- "./components": "./src/components/*/index.cjs",
144
+ "./components": {
145
+ "require": "./src/components/index.cjs",
146
+ "import": "./src/components/index.mjs"
147
+ },
148
+ "./components/*": "./src/components/*/index.cjs",
149
+ "./super": {
150
+ "require": "./src/super/index.cjs",
151
+ "import": "./src/super/index.mjs"
152
+ },
153
+ "./super/cogs": "./src/super/cogs/index.cjs",
154
+ "./super/cogs/*": "./src/super/cogs/*/index.cjs",
155
+ "./super/components": {
156
+ "require": "./src/super/components/index.cjs",
157
+ "import": "./src/super/components/index.mjs"
158
+ },
159
+ "./super/components/*": "./src/super/components/*/index.cjs",
160
+ "./transformers": "./src/transformers/index.mjs",
130
161
  "./transformers/*": "./src/transformers/*/index.mjs"
131
162
  }
132
163
  }
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/checkbox/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
  /**
2
- * CheckboxDescription component
2
+ * CheckboxDescription component
3
3
  */
4
4
  import classnames from 'classnames'
5
5
  import Description from '#cogs/components/description'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/checkbox/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
  /**
2
- * CheckboxErrorMessage component
2
+ * CheckboxErrorMessage component
3
3
  */
4
4
  import classnames from 'classnames'
5
5
  import ErrorMessage from '#cogs/components/error-message'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/checkbox/field')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Field // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Field
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  /**
7
- * CheckboxField component
7
+ * CheckboxField component
8
8
  */
9
9
  import React from 'react'
10
10
  import PropTypes from 'prop-types'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/checkbox')
11
11
  log('`shinkansen` is awake')
12
12
 
13
13
  const {
14
- default: component // @ts-ignore
14
+ default: Checkbox // @ts-expect-error
15
15
  } = require('./index.jsx')
16
16
 
17
- module.exports = component
17
+ /**
18
+ * Exports only default
19
+ */
20
+ module.exports = Checkbox
@@ -3,7 +3,7 @@ declare module '#cogs/cogs/checkbox' {
3
3
  CheckCog
4
4
  } from '#cogs/cogs'
5
5
 
6
- export type CheckboxProps = CogsTypes.Cogs.Cog.Checkbox.CheckboxProps
6
+ export type CheckboxProps = CogsTypes.Cogs.Checkbox.CheckboxProps
7
7
 
8
8
  export default class CheckboxCog<P extends CheckboxProps> extends CheckCog<P> {
9
9
  handleChange (
@@ -1,10 +1,11 @@
1
1
  /**
2
- * @typedef {CogsTypes.Cogs.Cog.CheckProps} CheckProps
3
- * @typedef {CogsTypes.Cogs.Cog.Checkbox.CheckboxProps} CheckboxProps
2
+ * @typedef {CogsTypes.OnEventType} OnEventType
3
+ * @typedef {CogsTypes.Cogs.CheckProps} CheckProps
4
+ * @typedef {CogsTypes.Cogs.Checkbox.CheckboxProps} CheckboxProps
4
5
  */
5
6
 
6
7
  /**
7
- * CheckboxCog component
8
+ * CheckboxCog component
8
9
  */
9
10
  import React from 'react'
10
11
  import PropTypes from 'prop-types'
@@ -14,16 +15,18 @@ import {
14
15
  CheckCog
15
16
  } from '#cogs/cogs'
16
17
 
17
- import {
18
- DEFAULT_HANDLE_CHANGE,
19
- DEFAULT_HANDLE_CLICK
20
- } from '#cogs/common'
21
-
22
18
  import Title from '#cogs/cogs/checkbox/title'
23
19
  import Description from '#cogs/cogs/checkbox/description'
24
20
  import ErrorMessage from '#cogs/cogs/checkbox/error-message'
25
21
  import Field from '#cogs/cogs/checkbox/field'
26
22
 
23
+ /**
24
+ * @type {OnEventType}
25
+ */
26
+ function DEFAULT_HANDLE_EVENT () {
27
+ //
28
+ }
29
+
27
30
  /**
28
31
  * @extends {CheckCog<CheckProps & CheckboxProps>}
29
32
  */
@@ -55,7 +58,7 @@ export default class CheckboxCog extends CheckCog {
55
58
  */
56
59
  handleChange = (name, value, checked) => {
57
60
  const {
58
- onChange = DEFAULT_HANDLE_CHANGE
61
+ onChange = DEFAULT_HANDLE_EVENT
59
62
  } = this.props
60
63
 
61
64
  onChange(name, value, checked)
@@ -68,7 +71,7 @@ export default class CheckboxCog extends CheckCog {
68
71
  */
69
72
  handleClick = (name, value, checked) => {
70
73
  const {
71
- onClick = DEFAULT_HANDLE_CLICK
74
+ onClick = DEFAULT_HANDLE_EVENT
72
75
  } = this.props
73
76
 
74
77
  onClick(name, value, checked)
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/checkbox/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,10 +1,10 @@
1
1
  /**
2
- * @typedef {CogsTypes.Components.Title.TitleProps} TitleProps
2
+ * @typedef {CogsTypes.Super.Components.Title.TitleProps} TitleProps
3
3
  * @typedef {CogsTypes.Components.Title.Checkbox.CheckboxProps} CheckboxProps
4
4
  */
5
5
 
6
6
  /**
7
- * CheckboxTitle component
7
+ * CheckboxTitle component
8
8
  */
9
9
  import classnames from 'classnames'
10
10
  import Title from '#cogs/components/title'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/email/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
  /**
2
- * EmailDescription component
2
+ * EmailDescription component
3
3
  */
4
4
  import classnames from 'classnames'
5
5
  import Description from '#cogs/components/description'
@@ -11,7 +11,10 @@ const log = debug('shinkansen-cogs/cogs/email/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
  /**
2
- * EmailErrorMessage component
2
+ * EmailErrorMessage component
3
3
  */
4
4
  import classnames from 'classnames'
5
5
  import ErrorMessage from '#cogs/components/error-message'