@pnx-mixtape/ids-shape 0.0.10 → 0.0.12

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 +10 -0
  2. package/index.ts +96 -35
  3. package/package.json +1 -1
package/enums.ts CHANGED
@@ -158,3 +158,13 @@ export enum ListItemModifiers {
158
158
  BLOCK = "block",
159
159
  REVERSE = "reverse"
160
160
  }
161
+
162
+ export enum MastheadModifier {
163
+ DARK = "dark",
164
+ LIGHT = "light",
165
+ }
166
+
167
+ export enum FooterModifier {
168
+ DARK = "dark",
169
+ LIGHT = "light",
170
+ }
package/index.ts CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  ButtonModifiers,
5
5
  ButtonTypes,
6
6
  CardModifier,
7
+ FooterModifier,
7
8
  GlobalAlertTypes,
8
9
  GridModifiers,
9
10
  HeadingTypes,
@@ -11,11 +12,14 @@ import {
11
12
  IconColourModifier,
12
13
  IconRotateModifier,
13
14
  IconSizeModifier,
14
- InPageAlertTypes, ListItemModifiers,
15
+ InPageAlertTypes,
16
+ ListItemModifiers,
15
17
  LoadingTypes,
18
+ MastheadModifier,
16
19
  MediaAlignmentTypes,
17
20
  SectionModifiers,
18
- SectionTypes, StepsModifier,
21
+ SectionTypes,
22
+ StepsModifier,
19
23
  TagTypes
20
24
  } from "./enums"
21
25
 
@@ -101,6 +105,30 @@ export type Media = {
101
105
  align?: MediaAlignmentTypes
102
106
  }
103
107
 
108
+ export type InlineSvg = {
109
+ className?: string
110
+ height?: string
111
+ width?: string
112
+ viewBox?: string
113
+ content?: string
114
+ title?: string
115
+ }
116
+
117
+ export type LinkedImage = {
118
+ image: Image | InlineSvg
119
+ href: string
120
+ }
121
+
122
+ export type FormItem = {
123
+ id: string
124
+ label: string
125
+ fields?: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | (HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement)[]
126
+ status?: "default" | "valid" | "invalid"
127
+ description?: string
128
+ error?: string
129
+ as?: "div" | "fieldset"
130
+ }
131
+
104
132
  export type FormControl = {
105
133
  id: string
106
134
  name: string
@@ -109,6 +137,12 @@ export type FormControl = {
109
137
  checked?: boolean
110
138
  }
111
139
 
140
+ export type Form = {
141
+ action: string
142
+ items: FormItem | FormItem[]
143
+ actions?: Button | Button[]
144
+ }
145
+
112
146
  export type WysiwygText = HTMLElement[] // just an example.
113
147
 
114
148
  /**
@@ -121,30 +155,6 @@ export type WayfindingBlock = {
121
155
  link?: Link | Button
122
156
  }
123
157
 
124
- /**
125
- * Layout.
126
- */
127
-
128
- export type GridItem = {
129
- item: string | HTMLElement
130
- container?: boolean
131
- modifiers?: GridModifiers[]
132
- as?: AsTypes
133
- }
134
-
135
- export type Grid = {
136
- items: GridItem[]
137
- modifiers?: GridModifiers[]
138
- as?: SectionTypes
139
- }
140
-
141
- export type Section = WayfindingBlock & {
142
- background?: string
143
- container?: boolean
144
- as?: SectionTypes
145
- modifiers?: SectionModifiers[]
146
- }
147
-
148
158
  /**
149
159
  * Navigation.
150
160
  */
@@ -156,6 +166,7 @@ export type Breadcrumbs = {
156
166
  export type InPageNavigation = {
157
167
  title?: Heading
158
168
  levels?: HeadingTypes[]
169
+ items?: Link[]
159
170
  }
160
171
 
161
172
  export type PaginationItem = {
@@ -184,6 +195,54 @@ export type SideNavigation = Navigation & {
184
195
  parent: Link
185
196
  }
186
197
 
198
+ /**
199
+ * Layout.
200
+ */
201
+
202
+ export type GridItem = {
203
+ item: string | HTMLElement
204
+ container?: boolean
205
+ modifiers?: GridModifiers[]
206
+ as?: AsTypes
207
+ }
208
+
209
+ export type Grid = {
210
+ items: GridItem[]
211
+ modifiers?: GridModifiers[]
212
+ as?: SectionTypes
213
+ }
214
+
215
+ export type Section = WayfindingBlock & {
216
+ background?: string
217
+ container?: boolean
218
+ as?: SectionTypes
219
+ modifiers?: SectionModifiers[]
220
+ }
221
+
222
+ export type Masthead = {
223
+ content?: string
224
+ links?: Link[]
225
+ skipLinks?: Link[]
226
+ background?: MastheadModifier[]
227
+ }
228
+
229
+ export type Header = {
230
+ logo: LinkedImage | LinkedImage[]
231
+ title?: string
232
+ description?: string
233
+ search?: Form
234
+ navigation?: Navigation
235
+ controls?: Button[]
236
+ }
237
+
238
+ export type Footer = {
239
+ navigation?: Navigation
240
+ aoc?: string
241
+ links?: Link[]
242
+ socials?: SocialLinks
243
+ background?: FooterModifier[]
244
+ }
245
+
187
246
  /**
188
247
  * Components.
189
248
  */
@@ -281,7 +340,7 @@ export type InPageAlert = {
281
340
  export type ListItem = {
282
341
  link: Link
283
342
  content: string | WysiwygText
284
- tags?: string[]
343
+ tags?: Tags
285
344
  label?: string
286
345
  info?: string
287
346
  infoBefore?: boolean
@@ -313,13 +372,8 @@ export type Steps = {
313
372
  counters?: boolean
314
373
  }
315
374
 
316
- export type Logo = {
317
- link: Link
318
- image: Image
319
- }
320
-
321
375
  export type SupportList = {
322
- logos: Logo[]
376
+ logos: LinkedImage[]
323
377
  title?: Heading
324
378
  links?: Link[]
325
379
  showBrand?: boolean
@@ -327,13 +381,18 @@ export type SupportList = {
327
381
 
328
382
  export type TabItem = {
329
383
  id: string
330
- title: string
331
384
  content: string | WysiwygText
385
+ }
386
+
387
+ export type TabListItem = {
388
+ id: string
389
+ title: string
332
390
  active?: boolean
333
391
  }
334
392
 
335
393
  export type Tabs = {
336
394
  items: TabItem[]
395
+ listItems?: TabListItem[]
337
396
  id?: string
338
397
  title?: Heading
339
398
  }
@@ -345,7 +404,7 @@ export type Tags = {
345
404
 
346
405
  export type SocialLinks = {
347
406
  title?: Heading
348
- items: Link[]
407
+ items: Link[] | LinkedImage[]
349
408
  }
350
409
 
351
410
  export type SocialShare = {
@@ -383,4 +442,6 @@ export {
383
442
  StepsModifier,
384
443
  TagTypes,
385
444
  ListItemModifiers,
445
+ MastheadModifier,
446
+ FooterModifier,
386
447
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnx-mixtape/ids-shape",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "shape details for ids project",
5
5
  "main": "./index.ts",
6
6
  "type": "module",