@modernpoacher/gremlins 0.0.2 → 0.0.3
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 +7 -6
- package/src/index.d.cts +34 -67
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/gremlins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Gremlins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Gremlins",
|
|
@@ -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,8 +54,8 @@
|
|
|
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/hooks": "^1.0.
|
|
57
|
+
"@modernpoacher/design-system": "1.0.72",
|
|
58
|
+
"@modernpoacher/hooks": "^1.0.434",
|
|
58
59
|
"@sequencemedia/gulp": "^1.1.70",
|
|
59
60
|
"@sequencemedia/gulp-clean-css": "^1.0.32",
|
|
60
61
|
"@sequencemedia/gulp-css-purge": "^1.1.25",
|
|
@@ -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,49 +1,18 @@
|
|
|
1
1
|
declare namespace FieldGremlinsTypes {
|
|
2
2
|
export type OnChangeType = () => void
|
|
3
|
-
|
|
4
|
-
export type AnswerDefinitionType = {
|
|
5
|
-
answer: {
|
|
6
|
-
value: string | string[]
|
|
7
|
-
}
|
|
8
|
-
changeAnswer: {
|
|
9
|
-
text: string
|
|
10
|
-
href: string
|
|
11
|
-
visuallyHiddenText?: string
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type ErrorDefinitionType = {
|
|
16
|
-
type: string,
|
|
17
|
-
uri: string,
|
|
18
|
-
params: {
|
|
19
|
-
expectedType: string
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type ComponentsType = {}
|
|
24
|
-
|
|
25
|
-
export type FieldChangeType = {
|
|
26
|
-
text: string,
|
|
27
|
-
href: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type FieldErrorType = {
|
|
31
|
-
text: string,
|
|
32
|
-
href: string
|
|
33
|
-
}
|
|
34
3
|
}
|
|
35
4
|
|
|
36
5
|
declare module '@modernpoacher/gremlins/gremlins' {
|
|
37
6
|
import React from 'react'
|
|
38
7
|
|
|
39
|
-
export
|
|
40
|
-
id: string
|
|
41
|
-
name: string
|
|
42
|
-
required: boolean
|
|
43
|
-
disabled: boolean
|
|
44
|
-
readOnly: boolean
|
|
45
|
-
placeholder: string
|
|
46
|
-
onChange: FieldGremlinsTypes.OnChangeType
|
|
8
|
+
export interface FieldGremlinProps {
|
|
9
|
+
id: string
|
|
10
|
+
name: string
|
|
11
|
+
required: boolean
|
|
12
|
+
disabled: boolean
|
|
13
|
+
readOnly: boolean
|
|
14
|
+
placeholder: string
|
|
15
|
+
onChange: FieldGremlinsTypes.OnChangeType
|
|
47
16
|
fieldRef: object
|
|
48
17
|
}
|
|
49
18
|
|
|
@@ -99,46 +68,46 @@ declare module '@modernpoacher/gremlins/gremlins/textarea' {
|
|
|
99
68
|
}
|
|
100
69
|
|
|
101
70
|
declare module '@modernpoacher/gremlins/components/common/disabled' {
|
|
102
|
-
import React from 'react'
|
|
71
|
+
import type React from 'react'
|
|
103
72
|
|
|
104
|
-
export default function Disabled(): React.JSX.Element
|
|
73
|
+
export default function Disabled (): React.JSX.Element
|
|
105
74
|
}
|
|
106
75
|
|
|
107
76
|
declare module '@modernpoacher/gremlins/components/common/readonly' {
|
|
108
|
-
import React from 'react'
|
|
77
|
+
import type React from 'react'
|
|
109
78
|
|
|
110
|
-
export default function ReadOnly(): React.JSX.Element
|
|
79
|
+
export default function ReadOnly (): React.JSX.Element
|
|
111
80
|
}
|
|
112
81
|
|
|
113
82
|
declare module '@modernpoacher/gremlins/components/common/required' {
|
|
114
|
-
import React from 'react'
|
|
83
|
+
import type React from 'react'
|
|
115
84
|
|
|
116
|
-
export default function Required(): React.JSX.Element
|
|
85
|
+
export default function Required (): React.JSX.Element
|
|
117
86
|
}
|
|
118
87
|
|
|
119
88
|
declare module '@modernpoacher/gremlins/components/common/text-content' {
|
|
120
|
-
import React from 'react'
|
|
89
|
+
import type React from 'react'
|
|
121
90
|
|
|
122
|
-
export
|
|
91
|
+
export interface TextContentProps {
|
|
123
92
|
textContent: string
|
|
124
93
|
}
|
|
125
94
|
|
|
126
|
-
export default function TextContent(props: TextContentProps): React.JSX.Element
|
|
95
|
+
export default function TextContent (props: TextContentProps): React.JSX.Element
|
|
127
96
|
}
|
|
128
97
|
|
|
129
98
|
declare module '@modernpoacher/gremlins/components/field' {
|
|
130
99
|
import React from 'react'
|
|
131
100
|
|
|
132
|
-
export
|
|
133
|
-
id: string
|
|
134
|
-
name: string
|
|
135
|
-
required: boolean
|
|
136
|
-
disabled: boolean
|
|
137
|
-
readOnly: boolean
|
|
138
|
-
tabIndex: number
|
|
139
|
-
accessKey: string
|
|
140
|
-
placeholder: string
|
|
141
|
-
onChange: FieldGremlinsTypes.OnChangeType
|
|
101
|
+
export interface FieldProps {
|
|
102
|
+
id: string
|
|
103
|
+
name: string
|
|
104
|
+
required: boolean
|
|
105
|
+
disabled: boolean
|
|
106
|
+
readOnly: boolean
|
|
107
|
+
tabIndex: number
|
|
108
|
+
accessKey: string
|
|
109
|
+
placeholder: string
|
|
110
|
+
onChange: FieldGremlinsTypes.OnChangeType
|
|
142
111
|
fieldRef: object
|
|
143
112
|
}
|
|
144
113
|
|
|
@@ -195,16 +164,14 @@ declare module '@modernpoacher/gremlins/gremlins/textarea/field' {
|
|
|
195
164
|
|
|
196
165
|
declare namespace GroupGremlinsTypes {
|
|
197
166
|
export type OnChangeType = () => void
|
|
198
|
-
|
|
199
|
-
export type ComponentsType = {}
|
|
200
167
|
}
|
|
201
168
|
|
|
202
169
|
declare module '@modernpoacher/gremlins/components/group' {
|
|
203
170
|
import React from 'react'
|
|
204
171
|
|
|
205
|
-
export
|
|
206
|
-
onChange: GroupGremlinsTypes.OnChangeType
|
|
207
|
-
groupRef: object
|
|
172
|
+
export interface GroupProps {
|
|
173
|
+
onChange: GroupGremlinsTypes.OnChangeType
|
|
174
|
+
groupRef: object
|
|
208
175
|
children: React.JSX.Element | React.JSX.Element[]
|
|
209
176
|
}
|
|
210
177
|
|
|
@@ -226,10 +193,10 @@ declare module '@modernpoacher/gremlins/gremlins/fieldset' {
|
|
|
226
193
|
declare module '@modernpoacher/gremlins/gremlins' {
|
|
227
194
|
import React from 'react'
|
|
228
195
|
|
|
229
|
-
export
|
|
230
|
-
title: string
|
|
231
|
-
onChange: GroupGremlinsTypes.OnChangeType
|
|
232
|
-
groupRef: object
|
|
196
|
+
export interface GroupGremlinProps {
|
|
197
|
+
title: string
|
|
198
|
+
onChange: GroupGremlinsTypes.OnChangeType
|
|
199
|
+
groupRef: object
|
|
233
200
|
children: React.JSX.Element | React.JSX.Element[]
|
|
234
201
|
}
|
|
235
202
|
|