shinkansen-cogs 1.6.100 → 1.6.102
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 +13 -12
- package/src/index.d.cts +40 -59
- package/tsconfig.json +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-cogs",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.102",
|
|
4
4
|
"description": "Shinkansen Cogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "./src/index.cjs",
|
|
14
14
|
"type": "module",
|
|
15
|
+
"types": "./src/index.d.cts",
|
|
15
16
|
"author": {
|
|
16
17
|
"name": "Jonathan Perry for Modern Poacher Limited",
|
|
17
18
|
"email": "modernpoacher@modernpoacher.com",
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
},
|
|
20
21
|
"license": "MIT",
|
|
21
22
|
"engines": {
|
|
22
|
-
"node": ">=18.
|
|
23
|
+
"node": ">=18.12.0"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
@@ -60,21 +61,21 @@
|
|
|
60
61
|
"@babel/register": "^7.22.15",
|
|
61
62
|
"@modernpoacher/design-system": "1.0.72",
|
|
62
63
|
"@modernpoacher/hooks": "^1.0.434",
|
|
63
|
-
"@sequencemedia/gulp": "^1.1.
|
|
64
|
-
"@sequencemedia/gulp-clean-css": "^1.0.
|
|
65
|
-
"@sequencemedia/gulp-css-purge": "^1.1.
|
|
66
|
-
"@sequencemedia/gulp-debug": "^1.0.
|
|
67
|
-
"@sequencemedia/gulp-postcss": "^1.0.
|
|
68
|
-
"@sequencemedia/gulp-sass": "^1.0.
|
|
69
|
-
"@sequencemedia/gulp-sourcemaps": "^1.0.
|
|
64
|
+
"@sequencemedia/gulp": "^1.1.73",
|
|
65
|
+
"@sequencemedia/gulp-clean-css": "^1.0.34",
|
|
66
|
+
"@sequencemedia/gulp-css-purge": "^1.1.27",
|
|
67
|
+
"@sequencemedia/gulp-debug": "^1.0.38",
|
|
68
|
+
"@sequencemedia/gulp-postcss": "^1.0.37",
|
|
69
|
+
"@sequencemedia/gulp-sass": "^1.0.33",
|
|
70
|
+
"@sequencemedia/gulp-sourcemaps": "^1.0.34",
|
|
70
71
|
"@storybook/addon-actions": "^7.4.0",
|
|
71
72
|
"@storybook/addon-essentials": "^7.4.0",
|
|
72
73
|
"@storybook/addon-links": "^7.4.0",
|
|
73
74
|
"@storybook/react": "^7.4.0",
|
|
74
75
|
"@storybook/react-webpack5": "^7.4.0",
|
|
75
76
|
"@types/react": "^18.2.21",
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "
|
|
77
|
-
"@typescript-eslint/parser": "
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
78
|
+
"@typescript-eslint/parser": "^6.6.0",
|
|
78
79
|
"autoprefixer": "^10.4.15",
|
|
79
80
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
80
81
|
"core-js": "^3.32.2",
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
"del": "^7.1.0",
|
|
84
85
|
"eslint": "^8.49.0",
|
|
85
86
|
"eslint-config-standard": "^17.1.0",
|
|
86
|
-
"eslint-config-standard-with-typescript": "
|
|
87
|
+
"eslint-config-standard-with-typescript": "^39.0.0",
|
|
87
88
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
88
89
|
"eslint-plugin-react": "^7.33.2",
|
|
89
90
|
"glob-all": "^3.3.1",
|
package/src/index.d.cts
CHANGED
|
@@ -1,35 +1,16 @@
|
|
|
1
1
|
declare namespace CogsTypes {
|
|
2
2
|
export type OnChangeType = () => void
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
value: string | string[]
|
|
8
|
-
}
|
|
9
|
-
changeAnswer: {
|
|
10
|
-
text: string
|
|
11
|
-
href: string
|
|
12
|
-
visuallyHiddenText?: string
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type ErrorDefinitionType = {
|
|
17
|
-
type: string,
|
|
18
|
-
uri: string,
|
|
4
|
+
export interface ErrorDefinitionType {
|
|
5
|
+
type: string
|
|
6
|
+
uri: string
|
|
19
7
|
params: {
|
|
20
8
|
expectedType: string
|
|
21
9
|
}
|
|
22
10
|
}
|
|
23
11
|
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
export type FieldChangeType = {
|
|
27
|
-
text: string,
|
|
28
|
-
href: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type FieldErrorType = {
|
|
32
|
-
text: string,
|
|
12
|
+
export interface FieldErrorType {
|
|
13
|
+
text: string
|
|
33
14
|
href: string
|
|
34
15
|
}
|
|
35
16
|
}
|
|
@@ -37,16 +18,16 @@ declare namespace CogsTypes {
|
|
|
37
18
|
declare module 'shinkansen-cogs/cogs' {
|
|
38
19
|
import React from 'react'
|
|
39
20
|
|
|
40
|
-
export
|
|
41
|
-
id: string
|
|
42
|
-
name: string
|
|
43
|
-
title: string
|
|
44
|
-
description: string
|
|
45
|
-
errorMessage: CogsTypes.ErrorDefinitionType
|
|
46
|
-
required: boolean
|
|
47
|
-
disabled: boolean
|
|
48
|
-
readOnly: boolean
|
|
49
|
-
placeholder: string
|
|
21
|
+
export interface CogProps {
|
|
22
|
+
id: string
|
|
23
|
+
name: string
|
|
24
|
+
title: string
|
|
25
|
+
description: string
|
|
26
|
+
errorMessage: CogsTypes.ErrorDefinitionType
|
|
27
|
+
required: boolean
|
|
28
|
+
disabled: boolean
|
|
29
|
+
readOnly: boolean
|
|
30
|
+
placeholder: string
|
|
50
31
|
onChange: CogsTypes.OnChangeType
|
|
51
32
|
}
|
|
52
33
|
|
|
@@ -102,37 +83,37 @@ declare module 'shinkansen-cogs/cogs/textarea' {
|
|
|
102
83
|
}
|
|
103
84
|
|
|
104
85
|
declare module 'shinkansen-cogs/components/common/disabled' {
|
|
105
|
-
import React from 'react'
|
|
86
|
+
import type React from 'react'
|
|
106
87
|
|
|
107
|
-
export default function Disabled(): React.JSX.Element
|
|
88
|
+
export default function Disabled (): React.JSX.Element
|
|
108
89
|
}
|
|
109
90
|
|
|
110
91
|
declare module 'shinkansen-cogs/components/common/readonly' {
|
|
111
|
-
import React from 'react'
|
|
92
|
+
import type React from 'react'
|
|
112
93
|
|
|
113
|
-
export default function ReadOnly(): React.JSX.Element
|
|
94
|
+
export default function ReadOnly (): React.JSX.Element
|
|
114
95
|
}
|
|
115
96
|
|
|
116
97
|
declare module 'shinkansen-cogs/components/common/required' {
|
|
117
|
-
import React from 'react'
|
|
98
|
+
import type React from 'react'
|
|
118
99
|
|
|
119
|
-
export default function Required(): React.JSX.Element
|
|
100
|
+
export default function Required (): React.JSX.Element
|
|
120
101
|
}
|
|
121
102
|
|
|
122
103
|
declare module 'shinkansen-cogs/components/common/text-content' {
|
|
123
|
-
import React from 'react'
|
|
104
|
+
import type React from 'react'
|
|
124
105
|
|
|
125
|
-
export
|
|
106
|
+
export interface TextContentProps {
|
|
126
107
|
textContent: string
|
|
127
108
|
}
|
|
128
109
|
|
|
129
|
-
export default function TextContent(props: TextContentProps): React.JSX.Element
|
|
110
|
+
export default function TextContent (props: TextContentProps): React.JSX.Element
|
|
130
111
|
}
|
|
131
112
|
|
|
132
113
|
declare module 'shinkansen-cogs/components/description' {
|
|
133
114
|
import React from 'react'
|
|
134
115
|
|
|
135
|
-
export
|
|
116
|
+
export interface DescriptionProps {
|
|
136
117
|
description: string
|
|
137
118
|
}
|
|
138
119
|
|
|
@@ -246,15 +227,15 @@ declare module 'shinkansen-cogs/cogs/textarea/error-message' {
|
|
|
246
227
|
declare module 'shinkansen-cogs/components/field' {
|
|
247
228
|
import React from 'react'
|
|
248
229
|
|
|
249
|
-
export
|
|
250
|
-
id: string
|
|
251
|
-
name: string
|
|
252
|
-
required: boolean
|
|
253
|
-
disabled: boolean
|
|
254
|
-
readOnly: boolean
|
|
255
|
-
tabIndex: number
|
|
256
|
-
accessKey: string
|
|
257
|
-
placeholder: string
|
|
230
|
+
export interface FieldProps {
|
|
231
|
+
id: string
|
|
232
|
+
name: string
|
|
233
|
+
required: boolean
|
|
234
|
+
disabled: boolean
|
|
235
|
+
readOnly: boolean
|
|
236
|
+
tabIndex: number
|
|
237
|
+
accessKey: string
|
|
238
|
+
placeholder: string
|
|
258
239
|
onChange: CogsTypes.OnChangeType
|
|
259
240
|
}
|
|
260
241
|
|
|
@@ -312,12 +293,12 @@ declare module 'shinkansen-cogs/cogs/textarea/field' {
|
|
|
312
293
|
declare module 'shinkansen-cogs/components/title' {
|
|
313
294
|
import React from 'react'
|
|
314
295
|
|
|
315
|
-
export
|
|
316
|
-
id: string
|
|
317
|
-
title: string
|
|
318
|
-
required: boolean
|
|
319
|
-
disabled: boolean
|
|
320
|
-
readOnly: boolean
|
|
296
|
+
export interface TitleProps {
|
|
297
|
+
id: string
|
|
298
|
+
title: string
|
|
299
|
+
required: boolean
|
|
300
|
+
disabled: boolean
|
|
301
|
+
readOnly: boolean
|
|
321
302
|
children: React.JSX.Element | React.JSX.Element[]
|
|
322
303
|
}
|
|
323
304
|
|