@pnx-mixtape/ids-shape 0.0.1
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/README.md +7 -0
- package/package.json +13 -0
- package/shape/README.md +3 -0
- package/shape/enums.ts +154 -0
- package/shape/index.ts +385 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pnx-mixtape/ids-shape",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "shape details for ids project",
|
|
5
|
+
"main": "shape/index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"devDependencies": {},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
+
},
|
|
11
|
+
"author": "rikki-iki",
|
|
12
|
+
"license": "ISC"
|
|
13
|
+
}
|
package/shape/README.md
ADDED
package/shape/enums.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
export enum AlignmentTypes {
|
|
2
|
+
START = "start",
|
|
3
|
+
END = "end",
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum MediaAlignmentTypes {
|
|
7
|
+
LEFT = "left",
|
|
8
|
+
RIGHT = "right",
|
|
9
|
+
CENTER = "center"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum IconColourModifier {
|
|
13
|
+
INFO = "info",
|
|
14
|
+
ERROR = "error",
|
|
15
|
+
WARNING = "warning",
|
|
16
|
+
SUCCESS = "success",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export enum IconRotateModifier {
|
|
20
|
+
NINETY = "rotate-90",
|
|
21
|
+
ONEEIGHTY = "rotate-180",
|
|
22
|
+
TWOSEVENTY = "rotate-270",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum IconSizeModifier {
|
|
26
|
+
SMALL = "sm",
|
|
27
|
+
MEDIUM = "md",
|
|
28
|
+
LARGE = "lg",
|
|
29
|
+
XLARGE = "xl",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export enum ButtonTypes {
|
|
33
|
+
INPUT = "input",
|
|
34
|
+
BUTTON = "button",
|
|
35
|
+
LINK = "link",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export enum ButtonModifiers {
|
|
39
|
+
DARK = "dark",
|
|
40
|
+
LIGHT = "light",
|
|
41
|
+
WHITE = "white",
|
|
42
|
+
DESTRUCTIVE = "destructive",
|
|
43
|
+
WIDE = "wide",
|
|
44
|
+
OUTLINE = "outline",
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export enum LoadingTypes {
|
|
48
|
+
LAZY = "lazy",
|
|
49
|
+
EAGER = "eager"
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export enum AsTypes {
|
|
53
|
+
DIV = "div",
|
|
54
|
+
LI = "li",
|
|
55
|
+
ARTICLE = "article",
|
|
56
|
+
ASIDE = "aside",
|
|
57
|
+
SECTION = "section",
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export enum SectionTypes {
|
|
61
|
+
DIV = "div",
|
|
62
|
+
SECTION = "section",
|
|
63
|
+
HEADER = "header",
|
|
64
|
+
FOOTER = "footer",
|
|
65
|
+
ASIDE = "aside",
|
|
66
|
+
LIST = "ul",
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export enum SectionModifiers {
|
|
70
|
+
S = "s",
|
|
71
|
+
M = "m",
|
|
72
|
+
L = "l",
|
|
73
|
+
XL = "xl",
|
|
74
|
+
TOP_S = "top-s",
|
|
75
|
+
TOP_M = "top-m",
|
|
76
|
+
TOP_L = "top-l",
|
|
77
|
+
TOP_XL = "top-xl",
|
|
78
|
+
BOTTOM_S = "bottom-s",
|
|
79
|
+
BOTTOM_M = "bottom-m",
|
|
80
|
+
BOTTOM_L = "bottom-l",
|
|
81
|
+
BOTTOM_XL = "bottom-xl",
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export enum HeadingTypes {
|
|
85
|
+
ONE = "h1",
|
|
86
|
+
TWO = "h2",
|
|
87
|
+
THREE = "h3",
|
|
88
|
+
FOUR = "h4",
|
|
89
|
+
FIVE = "h5",
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export enum TextModifiers {
|
|
93
|
+
INTRO = "intro",
|
|
94
|
+
SMALL = "small",
|
|
95
|
+
ONE = "h1",
|
|
96
|
+
TWO = "h2",
|
|
97
|
+
THREE = "h3",
|
|
98
|
+
FOUR = "h4",
|
|
99
|
+
FIVE = "h5",
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export enum GlobalAlertTypes {
|
|
103
|
+
LIGHT = "light",
|
|
104
|
+
CRITICAL = "critical",
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export enum InPageAlertTypes {
|
|
108
|
+
INFO = "info",
|
|
109
|
+
ERROR = "error",
|
|
110
|
+
WARNING = "warning",
|
|
111
|
+
SUCCESS = "success",
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export enum TagTypes {
|
|
115
|
+
TEXT = "text",
|
|
116
|
+
LINK = "link",
|
|
117
|
+
CHECKBOX = "checkbox"
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export enum GridItemModifiers {
|
|
121
|
+
SPAN_2 = "span-2",
|
|
122
|
+
SPAN_3 = "span-3",
|
|
123
|
+
SPAN_4 = "span-4"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export enum GridModifiers {
|
|
127
|
+
XS_2 = "xs-2-cols",
|
|
128
|
+
SM_2 = "sm-2-cols",
|
|
129
|
+
MD_2 = "md-2-cols",
|
|
130
|
+
MD_3 = "md-3-cols",
|
|
131
|
+
LG_3 = "lg-3-cols",
|
|
132
|
+
MD_4 = "md-4-cols",
|
|
133
|
+
LG_4 = "lg-4-cols",
|
|
134
|
+
XL_4 = "xl-4-cols",
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export enum CardModifier {
|
|
138
|
+
DARK = "dark",
|
|
139
|
+
LIGHT = "light",
|
|
140
|
+
SUPPLEMENTARY = "supplementary"
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export enum HeroBannerModifier {
|
|
144
|
+
DARK = "dark",
|
|
145
|
+
LIGHT = "light",
|
|
146
|
+
WHITE = "white",
|
|
147
|
+
GREY = "off-white"
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export enum StepsModifier {
|
|
151
|
+
DARK = "dark",
|
|
152
|
+
LIGHT = "light",
|
|
153
|
+
SUPPLEMENTARY = "supplementary"
|
|
154
|
+
}
|
package/shape/index.ts
ADDED
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AlignmentTypes,
|
|
3
|
+
AsTypes,
|
|
4
|
+
ButtonModifiers,
|
|
5
|
+
ButtonTypes,
|
|
6
|
+
CardModifier,
|
|
7
|
+
GlobalAlertTypes,
|
|
8
|
+
GridItemModifiers,
|
|
9
|
+
GridModifiers,
|
|
10
|
+
HeadingTypes,
|
|
11
|
+
HeroBannerModifier,
|
|
12
|
+
IconColourModifier,
|
|
13
|
+
IconRotateModifier,
|
|
14
|
+
IconSizeModifier,
|
|
15
|
+
InPageAlertTypes,
|
|
16
|
+
LoadingTypes,
|
|
17
|
+
MediaAlignmentTypes,
|
|
18
|
+
SectionModifiers,
|
|
19
|
+
SectionTypes, StepsModifier,
|
|
20
|
+
TagTypes
|
|
21
|
+
} from "./enums"
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Base.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
type Icon = {
|
|
28
|
+
icon: string
|
|
29
|
+
text?: string
|
|
30
|
+
align?: AlignmentTypes
|
|
31
|
+
color?: IconColourModifier
|
|
32
|
+
rotate?: IconRotateModifier
|
|
33
|
+
size?: IconSizeModifier
|
|
34
|
+
customClasses?: string[]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type Link = {
|
|
38
|
+
title: string
|
|
39
|
+
href: string
|
|
40
|
+
more?: boolean
|
|
41
|
+
external?: boolean
|
|
42
|
+
current?: boolean
|
|
43
|
+
download?: boolean
|
|
44
|
+
icon?: Icon
|
|
45
|
+
customClasses?: string[]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type Button = {
|
|
49
|
+
title: string
|
|
50
|
+
as: ButtonTypes
|
|
51
|
+
modifiers?: ButtonModifiers[]
|
|
52
|
+
icon?: Icon
|
|
53
|
+
href?: string
|
|
54
|
+
disabled?: boolean
|
|
55
|
+
customClasses?: string[]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
type Heading = {
|
|
59
|
+
title: string
|
|
60
|
+
as: HeadingTypes
|
|
61
|
+
modifiers?: HeadingTypes[]
|
|
62
|
+
excluded?: boolean
|
|
63
|
+
srOnly?: boolean
|
|
64
|
+
icon?: Icon
|
|
65
|
+
customClasses?: string[]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
type DefinitionListItem = {
|
|
69
|
+
title: string
|
|
70
|
+
content: string | WysiwygText
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type DefinitionList = {
|
|
74
|
+
items: DefinitionListItem[]
|
|
75
|
+
title?: Heading
|
|
76
|
+
customClasses?: string[]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type Video = {
|
|
80
|
+
src: string
|
|
81
|
+
title: string
|
|
82
|
+
duration?: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
type ImageSource = {
|
|
86
|
+
srcset: string
|
|
87
|
+
media: string
|
|
88
|
+
type: string
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type Image = {
|
|
92
|
+
src: string
|
|
93
|
+
alt: string
|
|
94
|
+
height?: string
|
|
95
|
+
width?: string
|
|
96
|
+
sources?: ImageSource[]
|
|
97
|
+
loading?: LoadingTypes
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
type Media = {
|
|
101
|
+
item: Image | Video
|
|
102
|
+
caption?: string
|
|
103
|
+
attribution?: string
|
|
104
|
+
align?: MediaAlignmentTypes
|
|
105
|
+
customClasses?: string[]
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type FormControl = {
|
|
109
|
+
id: string
|
|
110
|
+
name: string
|
|
111
|
+
label: string
|
|
112
|
+
value: string
|
|
113
|
+
checked?: boolean
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
type WysiwygText = HTMLElement[] // just an example.
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Extendable.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
type WayfindingBlock = {
|
|
123
|
+
title?: Heading
|
|
124
|
+
content?: string | WysiwygText
|
|
125
|
+
link?: Link | Button
|
|
126
|
+
customClasses?: string[]
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Layout.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
type GridItem = {
|
|
134
|
+
item: HTMLElement
|
|
135
|
+
container?: boolean
|
|
136
|
+
modifiers?: GridItemModifiers[]
|
|
137
|
+
as?: AsTypes
|
|
138
|
+
customClasses?: string[]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type Grid = {
|
|
142
|
+
items: GridItem[]
|
|
143
|
+
modifiers?: GridModifiers[]
|
|
144
|
+
as?: SectionTypes
|
|
145
|
+
customClasses?: string[]
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
type Section = WayfindingBlock & {
|
|
149
|
+
background?: string
|
|
150
|
+
container?: boolean
|
|
151
|
+
as?: SectionTypes
|
|
152
|
+
modifiers?: SectionModifiers[]
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Navigation.
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
type Breadcrumbs = {
|
|
160
|
+
items: Link[] | string
|
|
161
|
+
modifier?: string
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
type InPageNavigation = {
|
|
165
|
+
title?: Heading
|
|
166
|
+
levels?: HeadingTypes[]
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type PaginationItem = {
|
|
170
|
+
link?: Link
|
|
171
|
+
ellipsis?: boolean
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
type Pagination = {
|
|
175
|
+
previous?: Link
|
|
176
|
+
next?: Link
|
|
177
|
+
pages?: PaginationItem[]
|
|
178
|
+
customClasses?: string[]
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
type MenuTree = {
|
|
182
|
+
link: Link
|
|
183
|
+
items: MenuTree[]
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
type Navigation = {
|
|
187
|
+
id: string
|
|
188
|
+
items: MenuTree[]
|
|
189
|
+
title?: string
|
|
190
|
+
customClasses?: string[]
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
type SideNavigation = Navigation & {
|
|
194
|
+
parent: Link
|
|
195
|
+
customClasses?: string[]
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Components.
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
type LinkList = {
|
|
203
|
+
items: Link[]
|
|
204
|
+
customClasses?: string[]
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
type AccordionItem = {
|
|
208
|
+
title: string
|
|
209
|
+
content: string | WysiwygText
|
|
210
|
+
open?: boolean
|
|
211
|
+
id?: string
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
type Accordion = {
|
|
215
|
+
items: AccordionItem[]
|
|
216
|
+
title?: Heading
|
|
217
|
+
toggleAll?: boolean
|
|
218
|
+
customClasses?: string[]
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
type Callout = {
|
|
222
|
+
title: Heading
|
|
223
|
+
content: string
|
|
224
|
+
customClasses?: string[]
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type Card = WayfindingBlock & {
|
|
228
|
+
image?: Image
|
|
229
|
+
icon?: Icon
|
|
230
|
+
tags?: string[]
|
|
231
|
+
date?: string
|
|
232
|
+
linkList?: LinkList
|
|
233
|
+
modifier?: CardModifier
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
type CardGrid = WayfindingBlock & {
|
|
237
|
+
items: Card[]
|
|
238
|
+
container?: boolean
|
|
239
|
+
modifiers?: GridModifiers[]
|
|
240
|
+
as?: SectionTypes
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
type CardCarousel = WayfindingBlock & {
|
|
244
|
+
items: Card[]
|
|
245
|
+
loop: boolean
|
|
246
|
+
pagination: boolean
|
|
247
|
+
counter: boolean
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
type ContentBlock = WayfindingBlock & {
|
|
251
|
+
image?: Image
|
|
252
|
+
icon?: Icon
|
|
253
|
+
linkList?: LinkList
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
type ContactDetails = {
|
|
257
|
+
title?: Heading
|
|
258
|
+
name?: string
|
|
259
|
+
phone?: string
|
|
260
|
+
email?: string
|
|
261
|
+
website?: string
|
|
262
|
+
address?: WysiwygText
|
|
263
|
+
customClasses?: string[]
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
type Dialog = WayfindingBlock & {
|
|
267
|
+
open: boolean
|
|
268
|
+
id: string
|
|
269
|
+
modal: boolean
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
type GlobalAlert = {
|
|
273
|
+
id: string
|
|
274
|
+
type: GlobalAlertTypes
|
|
275
|
+
dismissible: boolean
|
|
276
|
+
title: Heading
|
|
277
|
+
content: string | WysiwygText
|
|
278
|
+
link?: Link
|
|
279
|
+
customClasses?: string[]
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
type HeroBanner = WayfindingBlock & {
|
|
283
|
+
subtitle?: string
|
|
284
|
+
image?: Image
|
|
285
|
+
linkList?: LinkList
|
|
286
|
+
highlight?: boolean
|
|
287
|
+
modifier: HeroBannerModifier
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type InPageAlert = {
|
|
291
|
+
type: InPageAlertTypes
|
|
292
|
+
title: Heading
|
|
293
|
+
content: string | WysiwygText
|
|
294
|
+
link?: Link
|
|
295
|
+
customClasses?: string[]
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
type ListItem = WayfindingBlock & {
|
|
299
|
+
tags?: string[]
|
|
300
|
+
label?: string
|
|
301
|
+
info?: string
|
|
302
|
+
infoBefore?: boolean
|
|
303
|
+
image?: Image
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
type Popover = WayfindingBlock & {
|
|
307
|
+
id: string
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
type ResultsBar = {
|
|
311
|
+
number?: number
|
|
312
|
+
pageCount?: number
|
|
313
|
+
total?: number
|
|
314
|
+
sort?: string[]
|
|
315
|
+
empty?: boolean
|
|
316
|
+
customClasses?: string[]
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
type StepItem = {
|
|
320
|
+
content: WysiwygText[]
|
|
321
|
+
status: boolean
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
type Steps = {
|
|
325
|
+
items: StepItem[],
|
|
326
|
+
modifier?: StepsModifier
|
|
327
|
+
fill?: boolean
|
|
328
|
+
counters?: boolean
|
|
329
|
+
progress?: boolean
|
|
330
|
+
customClasses?: string[]
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
type Logo = {
|
|
334
|
+
link: Link
|
|
335
|
+
image: Image
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
type SupportList = {
|
|
339
|
+
logos: Logo[]
|
|
340
|
+
title?: Heading
|
|
341
|
+
links?: Link[]
|
|
342
|
+
showBrand?: boolean
|
|
343
|
+
customClasses?: string[]
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
type TabItem = {
|
|
347
|
+
id: string
|
|
348
|
+
title: string
|
|
349
|
+
content: string | WysiwygText
|
|
350
|
+
active?: boolean
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
type Tabs = {
|
|
354
|
+
items: TabItem[]
|
|
355
|
+
modifier?: string
|
|
356
|
+
customClasses?: string[]
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
type Tags = {
|
|
360
|
+
items: Link[] | string[] | FormControl[]
|
|
361
|
+
type: TagTypes
|
|
362
|
+
customClasses?: string[]
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
type SocialLinks = {
|
|
366
|
+
title?: Heading
|
|
367
|
+
items: Link[]
|
|
368
|
+
customClasses?: string[]
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type SocialShare = {
|
|
372
|
+
facebook?: boolean
|
|
373
|
+
linkedin?: boolean
|
|
374
|
+
twitter?: boolean
|
|
375
|
+
email?: boolean
|
|
376
|
+
customClasses?: string[]
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
type UtilityList = {
|
|
380
|
+
copy?: boolean
|
|
381
|
+
print?: boolean
|
|
382
|
+
pdf?: boolean
|
|
383
|
+
share?: SocialShare
|
|
384
|
+
customClasses?: string[]
|
|
385
|
+
}
|