@pnx-mixtape/ids-shape 0.0.13 → 0.0.15

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 (3) hide show
  1. package/enums.ts +25 -0
  2. package/index.ts +56 -10
  3. package/package.json +1 -1
package/enums.ts CHANGED
@@ -9,6 +9,31 @@ export enum FormStatusTypes {
9
9
  INVALID = "invalid"
10
10
  }
11
11
 
12
+ export enum InputTypeTypes {
13
+ BUTTON = "button",
14
+ CHECKBOX = "checkbox",
15
+ COLOR = "color",
16
+ DATE = "date",
17
+ DATETIMELOCAL = "datetime-local",
18
+ EMAIL = "email",
19
+ FILE = "file",
20
+ HIDDEN = "hidden",
21
+ IMAGE = "image",
22
+ MONTH = "month",
23
+ NUMBER = "number",
24
+ PASSWORD = "password",
25
+ RADIO = "radio",
26
+ RANGE = "range",
27
+ RESET = "reset",
28
+ SEARCH = "search",
29
+ SUBMIT = "submit",
30
+ TEL = "tel",
31
+ TEXT = "text",
32
+ TIME = "time",
33
+ URL = "url",
34
+ WEEK = "week"
35
+ }
36
+
12
37
  export enum MediaAlignmentTypes {
13
38
  LEFT = "left",
14
39
  RIGHT = "right",
package/index.ts CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  IconRotateModifier,
15
15
  IconSizeModifier,
16
16
  InPageAlertTypes,
17
+ InputTypeTypes,
17
18
  ListItemModifiers,
18
19
  LoadingTypes,
19
20
  MastheadModifier,
@@ -46,6 +47,7 @@ export type Link = {
46
47
  download?: boolean
47
48
  iconStart?: Icon
48
49
  iconEnd?: Icon
50
+ iconOnly?: boolean
49
51
  }
50
52
 
51
53
  export type Button = {
@@ -56,6 +58,7 @@ export type Button = {
56
58
  disabled?: boolean
57
59
  iconStart?: Icon
58
60
  iconEnd?: Icon
61
+ iconOnly?: boolean
59
62
  }
60
63
 
61
64
  export type Heading = {
@@ -126,14 +129,51 @@ export type WysiwygText = HTMLElement[] // just an example.
126
129
  * Forms
127
130
  */
128
131
 
129
- export type FormControl = {
132
+ export type InputBase = {
130
133
  id: string
131
134
  name: string
135
+ required?: boolean
136
+ }
137
+
138
+ export type FormControl = InputBase & {
132
139
  label: string
133
140
  value: string
134
141
  checked?: boolean
142
+ status?: FormStatusTypes
143
+ hasDescription?: boolean
135
144
  }
136
145
 
146
+ export type FormOption = {
147
+ label: string
148
+ value: string
149
+ selected?: boolean
150
+ }
151
+
152
+ export type FormSelect = InputBase & {
153
+ options: FormOption[]
154
+ status?: FormStatusTypes
155
+ hasDescription?: boolean
156
+ label?: string,
157
+ }
158
+
159
+ export type FormText = InputBase & {
160
+ type: InputTypeTypes
161
+ value?: string
162
+ status?: FormStatusTypes
163
+ hasDescription?: boolean
164
+ label?: string,
165
+ placeholder?: string;
166
+ }
167
+
168
+ export type FormTextArea = InputBase & {
169
+ value?: string
170
+ status?: FormStatusTypes
171
+ hasDescription?: boolean
172
+ label?: string,
173
+ }
174
+
175
+ export type FormInput = FormText | FormTextArea | FormSelect | FormControl
176
+
137
177
  export type FormDescription = {
138
178
  id: string
139
179
  description: string
@@ -146,16 +186,10 @@ export type FormStatus = {
146
186
  }
147
187
 
148
188
  export type FormLabel = {
149
- id: string
189
+ id?: string
150
190
  title: string
151
191
  inline?: boolean
152
- }
153
-
154
- export type FormInput = {
155
- id: string
156
- input: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
157
- status?: FormStatusTypes
158
- label?: string,
192
+ as?: "label" | "legend"
159
193
  }
160
194
 
161
195
  export type FormItem = {
@@ -173,6 +207,14 @@ export type Form = {
173
207
  action: string
174
208
  items: FormItem | FormItem[]
175
209
  actions?: Button | Button[]
210
+ title?: string
211
+ id?: string
212
+ }
213
+
214
+ export type SearchForm = {
215
+ action: string
216
+ input: FormInput
217
+ button: Button
176
218
  }
177
219
 
178
220
 
@@ -261,7 +303,7 @@ export type Header = {
261
303
  logo: LinkedImage | LinkedImage[]
262
304
  title?: string
263
305
  description?: string
264
- search?: Form
306
+ search?: SearchForm
265
307
  navigation?: Navigation
266
308
  controls?: Button[]
267
309
  }
@@ -272,6 +314,8 @@ export type Footer = {
272
314
  links?: Link[]
273
315
  socials?: SocialLinks
274
316
  background?: FooterModifier
317
+ copyright?: string
318
+ logo?: LinkedImage | LinkedImage[]
275
319
  }
276
320
 
277
321
  /**
@@ -413,6 +457,7 @@ export type SupportList = {
413
457
  export type TabItem = {
414
458
  id: string
415
459
  content: string | WysiwygText
460
+ title?: string
416
461
  }
417
462
 
418
463
  export type TabListItem = {
@@ -467,6 +512,7 @@ export {
467
512
  IconRotateModifier,
468
513
  IconSizeModifier,
469
514
  InPageAlertTypes,
515
+ InputTypeTypes,
470
516
  LoadingTypes,
471
517
  MediaAlignmentTypes,
472
518
  SectionModifiers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnx-mixtape/ids-shape",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "shape details for ids project",
5
5
  "main": "./index.ts",
6
6
  "type": "module",