@pnx-mixtape/ids-shape 0.0.12 → 0.0.13
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/enums.ts +6 -0
- package/index.ts +44 -12
- package/package.json +1 -1
package/enums.ts
CHANGED
package/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ButtonTypes,
|
|
6
6
|
CardModifier,
|
|
7
7
|
FooterModifier,
|
|
8
|
+
FormStatusTypes,
|
|
8
9
|
GlobalAlertTypes,
|
|
9
10
|
GridModifiers,
|
|
10
11
|
HeadingTypes,
|
|
@@ -119,15 +120,11 @@ export type LinkedImage = {
|
|
|
119
120
|
href: string
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
export type
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
description?: string
|
|
128
|
-
error?: string
|
|
129
|
-
as?: "div" | "fieldset"
|
|
130
|
-
}
|
|
123
|
+
export type WysiwygText = HTMLElement[] // just an example.
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Forms
|
|
127
|
+
*/
|
|
131
128
|
|
|
132
129
|
export type FormControl = {
|
|
133
130
|
id: string
|
|
@@ -137,13 +134,47 @@ export type FormControl = {
|
|
|
137
134
|
checked?: boolean
|
|
138
135
|
}
|
|
139
136
|
|
|
137
|
+
export type FormDescription = {
|
|
138
|
+
id: string
|
|
139
|
+
description: string
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export type FormStatus = {
|
|
143
|
+
id: string
|
|
144
|
+
type: FormStatusTypes
|
|
145
|
+
message?: string
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type FormLabel = {
|
|
149
|
+
id: string
|
|
150
|
+
title: string
|
|
151
|
+
inline?: boolean
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type FormInput = {
|
|
155
|
+
id: string
|
|
156
|
+
input: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
|
|
157
|
+
status?: FormStatusTypes
|
|
158
|
+
label?: string,
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type FormItem = {
|
|
162
|
+
id: string
|
|
163
|
+
label?: FormLabel
|
|
164
|
+
fields?: FormInput | FormInput[]
|
|
165
|
+
status?: FormStatus
|
|
166
|
+
descriptionStart?: FormDescription
|
|
167
|
+
descriptionEnd?: FormDescription
|
|
168
|
+
as?: "div" | "fieldset"
|
|
169
|
+
inline?: boolean
|
|
170
|
+
}
|
|
171
|
+
|
|
140
172
|
export type Form = {
|
|
141
173
|
action: string
|
|
142
174
|
items: FormItem | FormItem[]
|
|
143
175
|
actions?: Button | Button[]
|
|
144
176
|
}
|
|
145
177
|
|
|
146
|
-
export type WysiwygText = HTMLElement[] // just an example.
|
|
147
178
|
|
|
148
179
|
/**
|
|
149
180
|
* Extendable.
|
|
@@ -223,7 +254,7 @@ export type Masthead = {
|
|
|
223
254
|
content?: string
|
|
224
255
|
links?: Link[]
|
|
225
256
|
skipLinks?: Link[]
|
|
226
|
-
background?: MastheadModifier
|
|
257
|
+
background?: MastheadModifier
|
|
227
258
|
}
|
|
228
259
|
|
|
229
260
|
export type Header = {
|
|
@@ -240,7 +271,7 @@ export type Footer = {
|
|
|
240
271
|
aoc?: string
|
|
241
272
|
links?: Link[]
|
|
242
273
|
socials?: SocialLinks
|
|
243
|
-
background?: FooterModifier
|
|
274
|
+
background?: FooterModifier
|
|
244
275
|
}
|
|
245
276
|
|
|
246
277
|
/**
|
|
@@ -429,6 +460,7 @@ export {
|
|
|
429
460
|
CardModifier,
|
|
430
461
|
GlobalAlertTypes,
|
|
431
462
|
GridModifiers,
|
|
463
|
+
FormStatusTypes,
|
|
432
464
|
HeadingTypes,
|
|
433
465
|
HeroBannerModifier,
|
|
434
466
|
IconColourModifier,
|