@pnx-mixtape/ids-shape 0.0.2 → 0.0.4
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 +5 -1
- package/index.ts +73 -49
- package/package.json +2 -2
package/enums.ts
CHANGED
|
@@ -14,6 +14,8 @@ export enum IconColourModifier {
|
|
|
14
14
|
ERROR = "error",
|
|
15
15
|
WARNING = "warning",
|
|
16
16
|
SUCCESS = "success",
|
|
17
|
+
BRAND = "brand",
|
|
18
|
+
ACCENT = "accent"
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export enum IconRotateModifier {
|
|
@@ -33,6 +35,8 @@ export enum ButtonTypes {
|
|
|
33
35
|
INPUT = "input",
|
|
34
36
|
BUTTON = "button",
|
|
35
37
|
LINK = "link",
|
|
38
|
+
SUBMIT = "submit",
|
|
39
|
+
RESET = "reset",
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
export enum ButtonModifiers {
|
|
@@ -40,7 +44,7 @@ export enum ButtonModifiers {
|
|
|
40
44
|
LIGHT = "light",
|
|
41
45
|
WHITE = "white",
|
|
42
46
|
DESTRUCTIVE = "destructive",
|
|
43
|
-
|
|
47
|
+
FULL_WIDTH = "full-width",
|
|
44
48
|
OUTLINE = "outline",
|
|
45
49
|
}
|
|
46
50
|
|
package/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
* Base.
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
type Icon = {
|
|
27
|
+
export type Icon = {
|
|
28
28
|
icon: string
|
|
29
29
|
text?: string
|
|
30
30
|
align?: AlignmentTypes
|
|
@@ -34,7 +34,7 @@ type Icon = {
|
|
|
34
34
|
customClasses?: string[]
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
type Link = {
|
|
37
|
+
export type Link = {
|
|
38
38
|
title: string
|
|
39
39
|
href: string
|
|
40
40
|
more?: boolean
|
|
@@ -45,7 +45,7 @@ type Link = {
|
|
|
45
45
|
customClasses?: string[]
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
type Button = {
|
|
48
|
+
export type Button = {
|
|
49
49
|
title: string
|
|
50
50
|
as: ButtonTypes
|
|
51
51
|
modifiers?: ButtonModifiers[]
|
|
@@ -55,7 +55,7 @@ type Button = {
|
|
|
55
55
|
customClasses?: string[]
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
type Heading = {
|
|
58
|
+
export type Heading = {
|
|
59
59
|
title: string
|
|
60
60
|
as: HeadingTypes
|
|
61
61
|
modifiers?: HeadingTypes[]
|
|
@@ -65,30 +65,30 @@ type Heading = {
|
|
|
65
65
|
customClasses?: string[]
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
type DefinitionListItem = {
|
|
68
|
+
export type DefinitionListItem = {
|
|
69
69
|
title: string
|
|
70
70
|
content: string | WysiwygText
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
type DefinitionList = {
|
|
73
|
+
export type DefinitionList = {
|
|
74
74
|
items: DefinitionListItem[]
|
|
75
75
|
title?: Heading
|
|
76
76
|
customClasses?: string[]
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
type Video = {
|
|
79
|
+
export type Video = {
|
|
80
80
|
src: string
|
|
81
81
|
title: string
|
|
82
82
|
duration?: string
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
type ImageSource = {
|
|
85
|
+
export type ImageSource = {
|
|
86
86
|
srcset: string
|
|
87
87
|
media: string
|
|
88
88
|
type: string
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
type Image = {
|
|
91
|
+
export type Image = {
|
|
92
92
|
src: string
|
|
93
93
|
alt: string
|
|
94
94
|
height?: string
|
|
@@ -97,15 +97,16 @@ type Image = {
|
|
|
97
97
|
loading?: LoadingTypes
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
type Media = {
|
|
100
|
+
export type Media = {
|
|
101
101
|
item: Image | Video
|
|
102
|
+
type?: "image" | "video"
|
|
102
103
|
caption?: string
|
|
103
104
|
attribution?: string
|
|
104
105
|
align?: MediaAlignmentTypes
|
|
105
106
|
customClasses?: string[]
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
type FormControl = {
|
|
109
|
+
export type FormControl = {
|
|
109
110
|
id: string
|
|
110
111
|
name: string
|
|
111
112
|
label: string
|
|
@@ -113,13 +114,13 @@ type FormControl = {
|
|
|
113
114
|
checked?: boolean
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
type WysiwygText = HTMLElement[] // just an example.
|
|
117
|
+
export type WysiwygText = HTMLElement[] // just an example.
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
120
|
* Extendable.
|
|
120
121
|
*/
|
|
121
122
|
|
|
122
|
-
type WayfindingBlock = {
|
|
123
|
+
export type WayfindingBlock = {
|
|
123
124
|
title?: Heading
|
|
124
125
|
content?: string | WysiwygText
|
|
125
126
|
link?: Link | Button
|
|
@@ -130,7 +131,7 @@ type WayfindingBlock = {
|
|
|
130
131
|
* Layout.
|
|
131
132
|
*/
|
|
132
133
|
|
|
133
|
-
type GridItem = {
|
|
134
|
+
export type GridItem = {
|
|
134
135
|
item: HTMLElement
|
|
135
136
|
container?: boolean
|
|
136
137
|
modifiers?: GridItemModifiers[]
|
|
@@ -138,14 +139,14 @@ type GridItem = {
|
|
|
138
139
|
customClasses?: string[]
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
type Grid = {
|
|
142
|
+
export type Grid = {
|
|
142
143
|
items: GridItem[]
|
|
143
144
|
modifiers?: GridModifiers[]
|
|
144
145
|
as?: SectionTypes
|
|
145
146
|
customClasses?: string[]
|
|
146
147
|
}
|
|
147
148
|
|
|
148
|
-
type Section = WayfindingBlock & {
|
|
149
|
+
export type Section = WayfindingBlock & {
|
|
149
150
|
background?: string
|
|
150
151
|
container?: boolean
|
|
151
152
|
as?: SectionTypes
|
|
@@ -156,41 +157,41 @@ type Section = WayfindingBlock & {
|
|
|
156
157
|
* Navigation.
|
|
157
158
|
*/
|
|
158
159
|
|
|
159
|
-
type Breadcrumbs = {
|
|
160
|
+
export type Breadcrumbs = {
|
|
160
161
|
items: Link[] | string
|
|
161
162
|
modifier?: string
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
type InPageNavigation = {
|
|
165
|
+
export type InPageNavigation = {
|
|
165
166
|
title?: Heading
|
|
166
167
|
levels?: HeadingTypes[]
|
|
167
168
|
}
|
|
168
169
|
|
|
169
|
-
type PaginationItem = {
|
|
170
|
+
export type PaginationItem = {
|
|
170
171
|
link?: Link
|
|
171
172
|
ellipsis?: boolean
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
type Pagination = {
|
|
175
|
+
export type Pagination = {
|
|
175
176
|
previous?: Link
|
|
176
177
|
next?: Link
|
|
177
178
|
pages?: PaginationItem[]
|
|
178
179
|
customClasses?: string[]
|
|
179
180
|
}
|
|
180
181
|
|
|
181
|
-
type MenuTree = {
|
|
182
|
+
export type MenuTree = {
|
|
182
183
|
link: Link
|
|
183
184
|
items: MenuTree[]
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
type Navigation = {
|
|
187
|
+
export type Navigation = {
|
|
187
188
|
id: string
|
|
188
189
|
items: MenuTree[]
|
|
189
190
|
title?: string
|
|
190
191
|
customClasses?: string[]
|
|
191
192
|
}
|
|
192
193
|
|
|
193
|
-
type SideNavigation = Navigation & {
|
|
194
|
+
export type SideNavigation = Navigation & {
|
|
194
195
|
parent: Link
|
|
195
196
|
customClasses?: string[]
|
|
196
197
|
}
|
|
@@ -199,32 +200,32 @@ type SideNavigation = Navigation & {
|
|
|
199
200
|
* Components.
|
|
200
201
|
*/
|
|
201
202
|
|
|
202
|
-
type LinkList = {
|
|
203
|
+
export type LinkList = {
|
|
203
204
|
items: Link[]
|
|
204
205
|
customClasses?: string[]
|
|
205
206
|
}
|
|
206
207
|
|
|
207
|
-
type AccordionItem = {
|
|
208
|
+
export type AccordionItem = {
|
|
208
209
|
title: string
|
|
209
210
|
content: string | WysiwygText
|
|
210
211
|
open?: boolean
|
|
211
212
|
id?: string
|
|
212
213
|
}
|
|
213
214
|
|
|
214
|
-
type Accordion = {
|
|
215
|
+
export type Accordion = {
|
|
215
216
|
items: AccordionItem[]
|
|
216
217
|
title?: Heading
|
|
217
218
|
toggleAll?: boolean
|
|
218
219
|
customClasses?: string[]
|
|
219
220
|
}
|
|
220
221
|
|
|
221
|
-
type Callout = {
|
|
222
|
+
export type Callout = {
|
|
222
223
|
title: Heading
|
|
223
224
|
content: string
|
|
224
225
|
customClasses?: string[]
|
|
225
226
|
}
|
|
226
227
|
|
|
227
|
-
type Card = WayfindingBlock & {
|
|
228
|
+
export type Card = WayfindingBlock & {
|
|
228
229
|
image?: Image
|
|
229
230
|
icon?: Icon
|
|
230
231
|
tags?: string[]
|
|
@@ -233,27 +234,27 @@ type Card = WayfindingBlock & {
|
|
|
233
234
|
modifier?: CardModifier
|
|
234
235
|
}
|
|
235
236
|
|
|
236
|
-
type CardGrid = WayfindingBlock & {
|
|
237
|
+
export type CardGrid = WayfindingBlock & {
|
|
237
238
|
items: Card[]
|
|
238
239
|
container?: boolean
|
|
239
240
|
modifiers?: GridModifiers[]
|
|
240
241
|
as?: SectionTypes
|
|
241
242
|
}
|
|
242
243
|
|
|
243
|
-
type CardCarousel = WayfindingBlock & {
|
|
244
|
+
export type CardCarousel = WayfindingBlock & {
|
|
244
245
|
items: Card[]
|
|
245
246
|
loop: boolean
|
|
246
247
|
pagination: boolean
|
|
247
248
|
counter: boolean
|
|
248
249
|
}
|
|
249
250
|
|
|
250
|
-
type ContentBlock = WayfindingBlock & {
|
|
251
|
+
export type ContentBlock = WayfindingBlock & {
|
|
251
252
|
image?: Image
|
|
252
253
|
icon?: Icon
|
|
253
254
|
linkList?: LinkList
|
|
254
255
|
}
|
|
255
256
|
|
|
256
|
-
type ContactDetails = {
|
|
257
|
+
export type ContactDetails = {
|
|
257
258
|
title?: Heading
|
|
258
259
|
name?: string
|
|
259
260
|
phone?: string
|
|
@@ -263,13 +264,13 @@ type ContactDetails = {
|
|
|
263
264
|
customClasses?: string[]
|
|
264
265
|
}
|
|
265
266
|
|
|
266
|
-
type Dialog = WayfindingBlock & {
|
|
267
|
+
export type Dialog = WayfindingBlock & {
|
|
267
268
|
open: boolean
|
|
268
269
|
id: string
|
|
269
270
|
modal: boolean
|
|
270
271
|
}
|
|
271
272
|
|
|
272
|
-
type GlobalAlert = {
|
|
273
|
+
export type GlobalAlert = {
|
|
273
274
|
id: string
|
|
274
275
|
type: GlobalAlertTypes
|
|
275
276
|
dismissible: boolean
|
|
@@ -279,7 +280,7 @@ type GlobalAlert = {
|
|
|
279
280
|
customClasses?: string[]
|
|
280
281
|
}
|
|
281
282
|
|
|
282
|
-
type HeroBanner = WayfindingBlock & {
|
|
283
|
+
export type HeroBanner = WayfindingBlock & {
|
|
283
284
|
subtitle?: string
|
|
284
285
|
image?: Image
|
|
285
286
|
linkList?: LinkList
|
|
@@ -287,7 +288,7 @@ type HeroBanner = WayfindingBlock & {
|
|
|
287
288
|
modifier: HeroBannerModifier
|
|
288
289
|
}
|
|
289
290
|
|
|
290
|
-
type InPageAlert = {
|
|
291
|
+
export type InPageAlert = {
|
|
291
292
|
type: InPageAlertTypes
|
|
292
293
|
title: Heading
|
|
293
294
|
content: string | WysiwygText
|
|
@@ -295,7 +296,7 @@ type InPageAlert = {
|
|
|
295
296
|
customClasses?: string[]
|
|
296
297
|
}
|
|
297
298
|
|
|
298
|
-
type ListItem = WayfindingBlock & {
|
|
299
|
+
export type ListItem = WayfindingBlock & {
|
|
299
300
|
tags?: string[]
|
|
300
301
|
label?: string
|
|
301
302
|
info?: string
|
|
@@ -303,11 +304,11 @@ type ListItem = WayfindingBlock & {
|
|
|
303
304
|
image?: Image
|
|
304
305
|
}
|
|
305
306
|
|
|
306
|
-
type Popover = WayfindingBlock & {
|
|
307
|
+
export type Popover = WayfindingBlock & {
|
|
307
308
|
id: string
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
type ResultsBar = {
|
|
311
|
+
export type ResultsBar = {
|
|
311
312
|
number?: number
|
|
312
313
|
pageCount?: number
|
|
313
314
|
total?: number
|
|
@@ -316,12 +317,12 @@ type ResultsBar = {
|
|
|
316
317
|
customClasses?: string[]
|
|
317
318
|
}
|
|
318
319
|
|
|
319
|
-
type StepItem = {
|
|
320
|
+
export type StepItem = {
|
|
320
321
|
content: WysiwygText[]
|
|
321
322
|
status: boolean
|
|
322
323
|
}
|
|
323
324
|
|
|
324
|
-
type Steps = {
|
|
325
|
+
export type Steps = {
|
|
325
326
|
items: StepItem[],
|
|
326
327
|
modifier?: StepsModifier
|
|
327
328
|
fill?: boolean
|
|
@@ -330,12 +331,12 @@ type Steps = {
|
|
|
330
331
|
customClasses?: string[]
|
|
331
332
|
}
|
|
332
333
|
|
|
333
|
-
type Logo = {
|
|
334
|
+
export type Logo = {
|
|
334
335
|
link: Link
|
|
335
336
|
image: Image
|
|
336
337
|
}
|
|
337
338
|
|
|
338
|
-
type SupportList = {
|
|
339
|
+
export type SupportList = {
|
|
339
340
|
logos: Logo[]
|
|
340
341
|
title?: Heading
|
|
341
342
|
links?: Link[]
|
|
@@ -343,32 +344,32 @@ type SupportList = {
|
|
|
343
344
|
customClasses?: string[]
|
|
344
345
|
}
|
|
345
346
|
|
|
346
|
-
type TabItem = {
|
|
347
|
+
export type TabItem = {
|
|
347
348
|
id: string
|
|
348
349
|
title: string
|
|
349
350
|
content: string | WysiwygText
|
|
350
351
|
active?: boolean
|
|
351
352
|
}
|
|
352
353
|
|
|
353
|
-
type Tabs = {
|
|
354
|
+
export type Tabs = {
|
|
354
355
|
items: TabItem[]
|
|
355
356
|
modifier?: string
|
|
356
357
|
customClasses?: string[]
|
|
357
358
|
}
|
|
358
359
|
|
|
359
|
-
type Tags = {
|
|
360
|
+
export type Tags = {
|
|
360
361
|
items: Link[] | string[] | FormControl[]
|
|
361
362
|
type: TagTypes
|
|
362
363
|
customClasses?: string[]
|
|
363
364
|
}
|
|
364
365
|
|
|
365
|
-
type SocialLinks = {
|
|
366
|
+
export type SocialLinks = {
|
|
366
367
|
title?: Heading
|
|
367
368
|
items: Link[]
|
|
368
369
|
customClasses?: string[]
|
|
369
370
|
}
|
|
370
371
|
|
|
371
|
-
type SocialShare = {
|
|
372
|
+
export type SocialShare = {
|
|
372
373
|
facebook?: boolean
|
|
373
374
|
linkedin?: boolean
|
|
374
375
|
twitter?: boolean
|
|
@@ -376,10 +377,33 @@ type SocialShare = {
|
|
|
376
377
|
customClasses?: string[]
|
|
377
378
|
}
|
|
378
379
|
|
|
379
|
-
type UtilityList = {
|
|
380
|
+
export type UtilityList = {
|
|
380
381
|
copy?: boolean
|
|
381
382
|
print?: boolean
|
|
382
383
|
pdf?: boolean
|
|
383
384
|
share?: SocialShare
|
|
384
385
|
customClasses?: string[]
|
|
385
386
|
}
|
|
387
|
+
|
|
388
|
+
export {
|
|
389
|
+
AlignmentTypes,
|
|
390
|
+
AsTypes,
|
|
391
|
+
ButtonModifiers,
|
|
392
|
+
ButtonTypes,
|
|
393
|
+
CardModifier,
|
|
394
|
+
GlobalAlertTypes,
|
|
395
|
+
GridItemModifiers,
|
|
396
|
+
GridModifiers,
|
|
397
|
+
HeadingTypes,
|
|
398
|
+
HeroBannerModifier,
|
|
399
|
+
IconColourModifier,
|
|
400
|
+
IconRotateModifier,
|
|
401
|
+
IconSizeModifier,
|
|
402
|
+
InPageAlertTypes,
|
|
403
|
+
LoadingTypes,
|
|
404
|
+
MediaAlignmentTypes,
|
|
405
|
+
SectionModifiers,
|
|
406
|
+
SectionTypes,
|
|
407
|
+
StepsModifier,
|
|
408
|
+
TagTypes,
|
|
409
|
+
}
|
package/package.json
CHANGED