@modernpoacher/cogs 0.0.7 → 0.0.8
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 +6 -5
- package/src/index.d.cts +40 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/cogs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Cogs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Cogs",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"main": "./src/index.cjs",
|
|
10
10
|
"type": "module",
|
|
11
|
+
"types": "./src/index.d.cts",
|
|
11
12
|
"author": {
|
|
12
13
|
"name": "Jonathan Perry for Modern Poacher Limited",
|
|
13
14
|
"email": "modernpoacher@modernpoacher.com",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"@babel/preset-env": "^7.22.15",
|
|
54
55
|
"@babel/preset-react": "^7.22.15",
|
|
55
56
|
"@babel/register": "^7.22.15",
|
|
56
|
-
"@modernpoacher/design-system": "1.0.
|
|
57
|
+
"@modernpoacher/design-system": "1.0.72",
|
|
57
58
|
"@modernpoacher/hooks": "^1.0.433",
|
|
58
59
|
"@sequencemedia/gulp": "^1.1.70",
|
|
59
60
|
"@sequencemedia/gulp-clean-css": "^1.0.32",
|
|
@@ -68,8 +69,8 @@
|
|
|
68
69
|
"@storybook/react": "^7.4.0",
|
|
69
70
|
"@storybook/react-webpack5": "^7.4.0",
|
|
70
71
|
"@types/react": "^18.2.21",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "
|
|
72
|
-
"@typescript-eslint/parser": "
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
73
|
+
"@typescript-eslint/parser": "^6.6.0",
|
|
73
74
|
"autoprefixer": "^10.4.15",
|
|
74
75
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
75
76
|
"core-js": "^3.32.2",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"del": "^7.1.0",
|
|
79
80
|
"eslint": "^8.49.0",
|
|
80
81
|
"eslint-config-standard": "^17.1.0",
|
|
81
|
-
"eslint-config-standard-with-typescript": "
|
|
82
|
+
"eslint-config-standard-with-typescript": "^39.0.0",
|
|
82
83
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
83
84
|
"eslint-plugin-react": "^7.33.2",
|
|
84
85
|
"glob-all": "^3.3.1",
|
package/src/index.d.cts
CHANGED
|
@@ -1,53 +1,29 @@
|
|
|
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
|
-
|
|
24
|
-
export type ComponentsType = {}
|
|
25
|
-
|
|
26
|
-
export type FieldChangeType = {
|
|
27
|
-
text: string,
|
|
28
|
-
href: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type FieldErrorType = {
|
|
32
|
-
text: string,
|
|
33
|
-
href: string
|
|
34
|
-
}
|
|
35
11
|
}
|
|
36
12
|
|
|
37
13
|
declare module '@modernpoacher/cogs/cogs' {
|
|
38
14
|
import React from 'react'
|
|
39
15
|
|
|
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
|
|
50
|
-
onChange: CogsTypes.OnChangeType
|
|
16
|
+
export interface CogProps {
|
|
17
|
+
id: string
|
|
18
|
+
name: string
|
|
19
|
+
title: string
|
|
20
|
+
description: string
|
|
21
|
+
errorMessage: CogsTypes.ErrorDefinitionType
|
|
22
|
+
required: boolean
|
|
23
|
+
disabled: boolean
|
|
24
|
+
readOnly: boolean
|
|
25
|
+
placeholder: string
|
|
26
|
+
onChange: CogsTypes.OnChangeType
|
|
51
27
|
fieldRef: object
|
|
52
28
|
}
|
|
53
29
|
|
|
@@ -103,37 +79,37 @@ declare module '@modernpoacher/cogs/cogs/textarea' {
|
|
|
103
79
|
}
|
|
104
80
|
|
|
105
81
|
declare module '@modernpoacher/cogs/components/common/disabled' {
|
|
106
|
-
import React from 'react'
|
|
82
|
+
import type React from 'react'
|
|
107
83
|
|
|
108
|
-
export default function Disabled(): React.JSX.Element
|
|
84
|
+
export default function Disabled (): React.JSX.Element
|
|
109
85
|
}
|
|
110
86
|
|
|
111
87
|
declare module '@modernpoacher/cogs/components/common/readonly' {
|
|
112
|
-
import React from 'react'
|
|
88
|
+
import type React from 'react'
|
|
113
89
|
|
|
114
|
-
export default function ReadOnly(): React.JSX.Element
|
|
90
|
+
export default function ReadOnly (): React.JSX.Element
|
|
115
91
|
}
|
|
116
92
|
|
|
117
93
|
declare module '@modernpoacher/cogs/components/common/required' {
|
|
118
|
-
import React from 'react'
|
|
94
|
+
import type React from 'react'
|
|
119
95
|
|
|
120
|
-
export default function Required(): React.JSX.Element
|
|
96
|
+
export default function Required (): React.JSX.Element
|
|
121
97
|
}
|
|
122
98
|
|
|
123
99
|
declare module '@modernpoacher/cogs/components/common/text-content' {
|
|
124
|
-
import React from 'react'
|
|
100
|
+
import type React from 'react'
|
|
125
101
|
|
|
126
|
-
export
|
|
102
|
+
export interface TextContentProps {
|
|
127
103
|
textContent: string
|
|
128
104
|
}
|
|
129
105
|
|
|
130
|
-
export default function TextContent(props: TextContentProps): React.JSX.Element
|
|
106
|
+
export default function TextContent (props: TextContentProps): React.JSX.Element
|
|
131
107
|
}
|
|
132
108
|
|
|
133
109
|
declare module '@modernpoacher/cogs/components/description' {
|
|
134
110
|
import React from 'react'
|
|
135
111
|
|
|
136
|
-
export
|
|
112
|
+
export interface DescriptionProps {
|
|
137
113
|
description: string
|
|
138
114
|
}
|
|
139
115
|
|
|
@@ -247,16 +223,16 @@ declare module '@modernpoacher/cogs/cogs/textarea/error-message' {
|
|
|
247
223
|
declare module '@modernpoacher/cogs/components/field' {
|
|
248
224
|
import React from 'react'
|
|
249
225
|
|
|
250
|
-
export
|
|
251
|
-
id: string
|
|
252
|
-
name: string
|
|
253
|
-
required: boolean
|
|
254
|
-
disabled: boolean
|
|
255
|
-
readOnly: boolean
|
|
256
|
-
tabIndex: number
|
|
257
|
-
accessKey: string
|
|
258
|
-
placeholder: string
|
|
259
|
-
onChange: CogsTypes.OnChangeType
|
|
226
|
+
export interface FieldProps {
|
|
227
|
+
id: string
|
|
228
|
+
name: string
|
|
229
|
+
required: boolean
|
|
230
|
+
disabled: boolean
|
|
231
|
+
readOnly: boolean
|
|
232
|
+
tabIndex: number
|
|
233
|
+
accessKey: string
|
|
234
|
+
placeholder: string
|
|
235
|
+
onChange: CogsTypes.OnChangeType
|
|
260
236
|
fieldRef: object
|
|
261
237
|
}
|
|
262
238
|
|
|
@@ -314,12 +290,12 @@ declare module '@modernpoacher/cogs/cogs/textarea/field' {
|
|
|
314
290
|
declare module '@modernpoacher/cogs/components/title' {
|
|
315
291
|
import React from 'react'
|
|
316
292
|
|
|
317
|
-
export
|
|
318
|
-
id: string
|
|
319
|
-
title: string
|
|
320
|
-
required: boolean
|
|
321
|
-
disabled: boolean
|
|
322
|
-
readOnly: boolean
|
|
293
|
+
export interface TitleProps {
|
|
294
|
+
id: string
|
|
295
|
+
title: string
|
|
296
|
+
required: boolean
|
|
297
|
+
disabled: boolean
|
|
298
|
+
readOnly: boolean
|
|
323
299
|
children: React.JSX.Element | React.JSX.Element[]
|
|
324
300
|
}
|
|
325
301
|
|