@iamproperty/components 3.6.0 → 3.7.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/assets/css/components/accordion.css.map +1 -1
- package/assets/css/components/admin-panel.css +1 -1
- package/assets/css/components/admin-panel.css.map +1 -1
- package/assets/css/components/card.css +1 -1
- package/assets/css/components/card.css.map +1 -1
- package/assets/css/components/dialog.css +1 -1
- package/assets/css/components/dialog.css.map +1 -1
- package/assets/css/components/forms.css.map +1 -1
- package/assets/css/components/lists.css +1 -1
- package/assets/css/components/lists.css.map +1 -1
- package/assets/css/components/table.css +1 -1
- package/assets/css/components/table.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/bundle.js +2 -0
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/card/card.component.js +2 -2
- package/assets/js/components/card/card.component.min.js +4 -4
- package/assets/js/components/card/card.component.min.js.map +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/table/table.component.js +19 -9
- package/assets/js/components/table/table.component.min.js +13 -13
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +2 -2
- package/assets/js/components/tabs/tabs.component.min.js.map +1 -1
- package/assets/js/dynamic.js +3 -1
- package/assets/js/dynamic.min.js +2 -2
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/flat-components.js +2 -0
- package/assets/js/modules/applied-filters.js +1 -1
- package/assets/js/modules/dialogs.js +184 -0
- package/assets/js/modules/helpers.js +1 -89
- package/assets/js/modules/table.js +113 -37
- package/assets/js/modules/tabs.js +0 -2
- package/assets/js/scripts.bundle.js +26 -26
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/js/tests/table.spec.js +34 -13
- package/assets/sass/_functions/variables.scss +3 -28
- package/assets/sass/components/admin-panel.scss +0 -10
- package/assets/sass/components/card.scss +32 -25
- package/assets/sass/components/dialog.scss +332 -28
- package/assets/sass/components/lists.scss +16 -33
- package/assets/sass/components/table.scss +125 -92
- package/assets/sass/foundations/buttons.scss +9 -13
- package/assets/sass/foundations/icons.scss +14 -69
- package/assets/sass/foundations/reboot.scss +19 -7
- package/assets/sass/foundations/root.scss +9 -0
- package/assets/sass/helpers/max-height.scss +15 -0
- package/assets/ts/bundle.ts +2 -0
- package/assets/ts/components/card/README.md +2 -1
- package/assets/ts/components/card/card.component.ts +2 -2
- package/assets/ts/components/table/table.component.ts +24 -10
- package/assets/ts/dynamic.ts +3 -1
- package/assets/ts/flat-components.ts +2 -0
- package/assets/ts/html.d.ts +7 -1
- package/assets/ts/modules/applied-filters.ts +1 -1
- package/assets/ts/modules/dialogs.ts +248 -0
- package/assets/ts/modules/helpers.ts +1 -123
- package/assets/ts/modules/table.ts +153 -47
- package/assets/ts/modules/tabs.ts +0 -4
- package/assets/ts/tests/table.spec.ts +21 -6
- package/dist/components.es.js +1114 -1101
- package/dist/components.umd.js +23 -19
- package/package.json +2 -3
- package/src/components/Card/Card.vue +2 -2
- package/src/components/Card/README.md +1 -1
- package/src/components/Nav/Nav.vue +1 -3
- package/src/index.js +0 -1
- package/assets/svg/icons.svg +0 -599
- package/src/foundations/Icon/Icon.spec.js +0 -24
- package/src/foundations/Icon/Icon.vue +0 -24
- package/src/foundations/Icon/README.md +0 -11
|
@@ -29,6 +29,16 @@ td,th {
|
|
|
29
29
|
&:first-child {
|
|
30
30
|
padding-left: rem(2);
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
p {
|
|
34
|
+
display: -webkit-box;
|
|
35
|
+
-webkit-line-clamp: 4;
|
|
36
|
+
-webkit-box-orient: vertical;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
font-size: inherit;
|
|
39
|
+
padding: 0;
|
|
40
|
+
min-width: rem(300);
|
|
41
|
+
}
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
th {
|
|
@@ -37,7 +47,11 @@ th {
|
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
thead {
|
|
50
|
+
tr {
|
|
40
51
|
|
|
52
|
+
border-bottom: var(--border-width) solid currentColor;
|
|
53
|
+
@include var(border-color,--colour-primary);
|
|
54
|
+
}
|
|
41
55
|
th {
|
|
42
56
|
font-weight: bold;
|
|
43
57
|
vertical-align: bottom;
|
|
@@ -56,6 +70,8 @@ thead {
|
|
|
56
70
|
|
|
57
71
|
tbody tr {
|
|
58
72
|
|
|
73
|
+
border-bottom: var(--border-width) solid currentColor;
|
|
74
|
+
@include var(border-color,--colour-border);
|
|
59
75
|
|
|
60
76
|
&:is(:hover,:focus-within,.hover) {
|
|
61
77
|
|
|
@@ -69,21 +85,24 @@ tbody tr {
|
|
|
69
85
|
}
|
|
70
86
|
}
|
|
71
87
|
|
|
72
|
-
|
|
88
|
+
/*
|
|
89
|
+
:is(td, th) {
|
|
73
90
|
|
|
74
91
|
border-top: var(--border-width) solid currentColor;
|
|
75
92
|
@include var(border-color,--colour-border);
|
|
76
93
|
}
|
|
77
94
|
|
|
78
|
-
|
|
95
|
+
|
|
96
|
+
&:first-child :is(td, th){
|
|
79
97
|
border-top: var(--border-width) solid currentColor;
|
|
80
98
|
@include var(border-color,--colour-primary);
|
|
81
99
|
}
|
|
82
100
|
|
|
83
|
-
&:last-child td{
|
|
101
|
+
&:last-child :is(td, th){
|
|
84
102
|
border-bottom: var(--border-width) solid currentColor;
|
|
85
103
|
@include var(border-color,--colour-border);
|
|
86
104
|
}
|
|
105
|
+
*/
|
|
87
106
|
}
|
|
88
107
|
|
|
89
108
|
.border-0 > table,
|
|
@@ -105,6 +124,10 @@ table.border-0 {
|
|
|
105
124
|
border-radius: rem(8);
|
|
106
125
|
margin-bottom: rem(32);
|
|
107
126
|
|
|
127
|
+
&:before {
|
|
128
|
+
display: none!important;
|
|
129
|
+
}
|
|
130
|
+
|
|
108
131
|
table {
|
|
109
132
|
margin-bottom: 0;
|
|
110
133
|
}
|
|
@@ -158,6 +181,7 @@ table.border-0 {
|
|
|
158
181
|
margin-inline: 1.5rem;
|
|
159
182
|
margin-bottom: 1.5rem;
|
|
160
183
|
width: calc(100% - 3rem);
|
|
184
|
+
display: block;
|
|
161
185
|
|
|
162
186
|
thead {
|
|
163
187
|
display: none;
|
|
@@ -191,18 +215,6 @@ table.border-0 {
|
|
|
191
215
|
background: transparent;
|
|
192
216
|
}
|
|
193
217
|
}
|
|
194
|
-
|
|
195
|
-
&:last-child td:not(:last-child) {
|
|
196
|
-
border-bottom:none;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
&:first-child td:first-child {
|
|
200
|
-
border-top: none;
|
|
201
|
-
border-color: var(--colour-border);
|
|
202
|
-
}
|
|
203
|
-
&:first-child td {
|
|
204
|
-
border-color: var(--colour-border);
|
|
205
|
-
}
|
|
206
218
|
}
|
|
207
219
|
|
|
208
220
|
td,
|
|
@@ -292,8 +304,27 @@ table.border-0 {
|
|
|
292
304
|
}
|
|
293
305
|
}
|
|
294
306
|
|
|
307
|
+
.table--cta {
|
|
308
|
+
border-bottom: 0;
|
|
309
|
+
|
|
310
|
+
&:after {
|
|
311
|
+
content: none;
|
|
312
|
+
display: none !important;;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
295
315
|
.table--cta:not(.table--fullwidth) tr td:last-child {
|
|
296
316
|
display: block!important;
|
|
317
|
+
position: static;
|
|
318
|
+
width: 100%;
|
|
319
|
+
min-width: 100%;
|
|
320
|
+
margin-left: 0;
|
|
321
|
+
padding-left: 0;
|
|
322
|
+
text-align: left;
|
|
323
|
+
min-height: 0;
|
|
324
|
+
|
|
325
|
+
&:after {
|
|
326
|
+
display: none;
|
|
327
|
+
}
|
|
297
328
|
}
|
|
298
329
|
|
|
299
330
|
}
|
|
@@ -312,17 +343,7 @@ table.border-0 {
|
|
|
312
343
|
position: relative;
|
|
313
344
|
margin-right: calc(var(--cta-width) - 1.5rem);
|
|
314
345
|
|
|
315
|
-
|
|
316
|
-
content: "";
|
|
317
|
-
display: block;
|
|
318
|
-
position: absolute;
|
|
319
|
-
bottom: 0;
|
|
320
|
-
left: 0;
|
|
321
|
-
width: calc(100% + calc(var(--cta-width) - 1.5rem));
|
|
322
|
-
border-bottom: 2px solid currentColor;
|
|
323
|
-
@include var(border-color,--colour-border);
|
|
324
|
-
z-index: 99;
|
|
325
|
-
}
|
|
346
|
+
|
|
326
347
|
}
|
|
327
348
|
|
|
328
349
|
.table--cta .table__wrapper {
|
|
@@ -339,32 +360,40 @@ table.border-0 {
|
|
|
339
360
|
top: auto;
|
|
340
361
|
z-index: 3;
|
|
341
362
|
background: transparent;
|
|
342
|
-
width: var(--cta-width);
|
|
363
|
+
width: calc(var(--cta-width) + 1.5rem);
|
|
343
364
|
padding-left: rem(40);
|
|
344
365
|
margin-left: rem(-40);
|
|
345
|
-
min-width: fit-content;
|
|
346
366
|
min-height: var(--row-height);
|
|
347
367
|
text-align: right;
|
|
348
368
|
background: linear-gradient(90deg, transparent 0%, var(--colour-canvas-2) 1.25rem);
|
|
349
369
|
|
|
370
|
+
//border-bottom: var(--border-width) solid var(--colour-border);
|
|
371
|
+
|
|
372
|
+
&:after {
|
|
373
|
+
bottom: 0;
|
|
374
|
+
left: 0;
|
|
375
|
+
content: "";
|
|
376
|
+
position: absolute;
|
|
377
|
+
width: 100%;
|
|
378
|
+
height: 2px;
|
|
379
|
+
background-color: var(--colour-border);
|
|
380
|
+
}
|
|
381
|
+
|
|
350
382
|
a {
|
|
351
383
|
white-space: nowrap;
|
|
352
384
|
}
|
|
353
385
|
}
|
|
354
386
|
|
|
355
|
-
tr
|
|
356
|
-
|
|
357
|
-
background: linear-gradient(90deg, transparent 0%, var(--hover-background) 1.25rem);
|
|
387
|
+
tr > th:last-child {
|
|
388
|
+
--colour-border: var(--colour-primary);
|
|
358
389
|
}
|
|
359
390
|
|
|
360
|
-
tbody tr > *:last-child {
|
|
361
|
-
|
|
391
|
+
tbody tr:hover > *:last-child {
|
|
392
|
+
background: linear-gradient(90deg, transparent 0%, var(--hover-background) 1.25rem);
|
|
362
393
|
}
|
|
363
|
-
tbody tr {
|
|
364
394
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
395
|
+
thead tr > *:last-child {
|
|
396
|
+
margin-top: 1px;
|
|
368
397
|
}
|
|
369
398
|
}
|
|
370
399
|
}
|
|
@@ -376,17 +405,10 @@ table.border-0 {
|
|
|
376
405
|
position: relative;
|
|
377
406
|
|
|
378
407
|
&::before {
|
|
379
|
-
content: "";
|
|
380
408
|
top: calc(100% - 1.2rem);
|
|
381
409
|
bottom: 2px;
|
|
382
|
-
left: 0;
|
|
383
|
-
right: 0;
|
|
384
410
|
height: 1.2rem;
|
|
385
|
-
position: sticky;
|
|
386
|
-
display: block;
|
|
387
|
-
background: linear-gradient(180deg, transparent 0%, var(--colour-canvas-2) 100%);
|
|
388
411
|
border-bottom: 2px solid var(--colour-border);
|
|
389
|
-
z-index: 2;
|
|
390
412
|
margin-bottom: -1.2rem;
|
|
391
413
|
}
|
|
392
414
|
}
|
|
@@ -441,23 +463,34 @@ iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) {
|
|
|
441
463
|
display: none!important;
|
|
442
464
|
}
|
|
443
465
|
|
|
444
|
-
table:not(.table--filtered) tbody tr:nth-child(15) ~ tr {
|
|
466
|
+
table:not(.table--filtered):not(.table--ajax) tbody tr:nth-child(15) ~ tr {
|
|
445
467
|
display: none;
|
|
446
468
|
}
|
|
447
469
|
|
|
448
|
-
// Statuses
|
|
449
470
|
|
|
471
|
+
// Loading via ajax
|
|
472
|
+
.table--loading {
|
|
473
|
+
opacity: 0.8;
|
|
474
|
+
pointer-events: none;
|
|
475
|
+
|
|
476
|
+
&.table--cta thead th:last-child {
|
|
477
|
+
opacity: 0;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// Statuses
|
|
450
482
|
table {
|
|
451
483
|
|
|
452
|
-
:is([data-content="
|
|
453
|
-
[data-content="
|
|
454
|
-
[data-content="
|
|
455
|
-
[data-content="
|
|
456
|
-
[data-content="
|
|
457
|
-
[data-content="
|
|
458
|
-
[data-content="
|
|
459
|
-
[data-content="
|
|
460
|
-
|
|
484
|
+
:is([data-content="low"],
|
|
485
|
+
[data-content="medium"],
|
|
486
|
+
[data-content="high"],
|
|
487
|
+
[data-content="unknown"],
|
|
488
|
+
[data-content="incomplete"],
|
|
489
|
+
[data-content="requires approval"],
|
|
490
|
+
[data-content="verified"],
|
|
491
|
+
[data-content="not started"],
|
|
492
|
+
[data-content="completed"],
|
|
493
|
+
.alert-status:not([data-content="0"])
|
|
461
494
|
) {
|
|
462
495
|
|
|
463
496
|
position: relative;
|
|
@@ -469,70 +502,70 @@ table {
|
|
|
469
502
|
|
|
470
503
|
&:after {
|
|
471
504
|
|
|
505
|
+
font-family: "Font Awesome 6 Pro";
|
|
472
506
|
position: absolute;
|
|
473
507
|
top: 1rem;
|
|
474
508
|
left: 0;
|
|
475
|
-
|
|
476
|
-
|
|
509
|
+
font-size: rem(16);
|
|
510
|
+
line-height: 1;
|
|
477
511
|
height: rem(16);
|
|
478
512
|
width: rem(16);
|
|
479
513
|
display: inline-block;
|
|
480
|
-
mask-size: 100%;
|
|
481
|
-
mask-repeat: no-repeat;
|
|
482
|
-
mask-position: 50% 50%;
|
|
483
|
-
-webkit-mask-size: 100%;
|
|
484
|
-
-webkit-mask-repeat: no-repeat;
|
|
485
|
-
-webkit-mask-position: 50% 50%;
|
|
486
514
|
}
|
|
487
515
|
}
|
|
488
516
|
|
|
489
|
-
[data-content="
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
-webkit-mask-image: var(--icon-high);
|
|
517
|
+
[data-content="high"]:after {
|
|
518
|
+
content: "\f325";
|
|
519
|
+
font-weight: normal;
|
|
520
|
+
color: var(--colour-danger);
|
|
494
521
|
}
|
|
495
522
|
|
|
496
|
-
[data-content="
|
|
523
|
+
[data-content="medium"]:after {
|
|
497
524
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
525
|
+
content: "\f7a4";
|
|
526
|
+
font-weight: normal;
|
|
527
|
+
color: var(--colour-warning);
|
|
501
528
|
}
|
|
502
529
|
|
|
503
|
-
[data-content="
|
|
530
|
+
[data-content="low"]:after {
|
|
504
531
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
532
|
+
content: "\e404";
|
|
533
|
+
font-weight: normal;
|
|
534
|
+
color: var(--colour-complete);
|
|
508
535
|
}
|
|
509
536
|
|
|
510
|
-
|
|
537
|
+
[data-content="unknown"]:after {
|
|
511
538
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
539
|
+
content: "\e404";
|
|
540
|
+
font-weight: normal;
|
|
541
|
+
color: var(--colour-muted);
|
|
515
542
|
}
|
|
516
543
|
|
|
517
|
-
[data-content="
|
|
544
|
+
:is([data-content="not started"],[data-content="incomplete"]):after {
|
|
518
545
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
546
|
+
content: "\f024";
|
|
547
|
+
font-weight: light;
|
|
548
|
+
color: var(--colour-danger);
|
|
522
549
|
}
|
|
523
550
|
|
|
524
|
-
|
|
551
|
+
[data-content="requires approval"]:after {
|
|
525
552
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
553
|
+
content: "\f024";
|
|
554
|
+
font-weight: light;
|
|
555
|
+
color: var(--colour-warning);
|
|
529
556
|
}
|
|
530
557
|
|
|
558
|
+
:is([data-content="verified"],[data-content="completed"]):after {
|
|
559
|
+
|
|
560
|
+
content: "\f00c";
|
|
561
|
+
font-weight: normal;
|
|
562
|
+
color: var(--colour-complete);
|
|
563
|
+
}
|
|
531
564
|
|
|
532
|
-
.alert-status:not(:empty):after {
|
|
565
|
+
.alert-status:not([data-content="0"]):not(:empty):after {
|
|
533
566
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
567
|
+
content: "\f06a";
|
|
568
|
+
font-weight: light;
|
|
569
|
+
color: var(--colour-danger);
|
|
537
570
|
}
|
|
538
571
|
}
|
|
@@ -37,7 +37,11 @@
|
|
|
37
37
|
padding: calc(rem(12) - 2px) calc(rem(40) - 2px);
|
|
38
38
|
border-radius: rem(24);
|
|
39
39
|
margin-bottom: var(--btn-margin);
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
&:not(:last-child){
|
|
42
|
+
|
|
43
|
+
margin-right: var(--btn-margin);
|
|
44
|
+
}
|
|
41
45
|
transition: background .5s, color .5s;
|
|
42
46
|
height: auto;
|
|
43
47
|
max-width: fit-content;
|
|
@@ -301,24 +305,16 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
301
305
|
// #region button that opens up a filter dialog
|
|
302
306
|
.btn-filter {
|
|
303
307
|
&:after {
|
|
304
|
-
content: "";
|
|
305
|
-
|
|
308
|
+
content: "\f1de";
|
|
306
309
|
display: inline-block;
|
|
307
310
|
margin-left: 1em;
|
|
308
311
|
margin-bottom: -0.15em;
|
|
309
312
|
height: 1em;
|
|
310
313
|
width: 1em;
|
|
311
314
|
z-index: var(--index-focus);
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
mask-repeat: no-repeat;
|
|
316
|
-
mask-position: 50% 50%;
|
|
317
|
-
-webkit-mask-image: var(--icon-filter);
|
|
318
|
-
-webkit-mask-size: 100%;
|
|
319
|
-
-webkit-mask-repeat: no-repeat;
|
|
320
|
-
-webkit-mask-position: 50% 50%;
|
|
321
|
-
|
|
315
|
+
color: currentColor;
|
|
316
|
+
font-weight: 300;
|
|
317
|
+
font-family: "Font Awesome 6 Pro";
|
|
322
318
|
}
|
|
323
319
|
}
|
|
324
320
|
// #endregion
|
|
@@ -1,81 +1,26 @@
|
|
|
1
1
|
@use "../_func" as *;
|
|
2
2
|
|
|
3
|
-
.icon {
|
|
4
|
-
fill: currentColor;
|
|
5
|
-
stroke: currentColor;
|
|
6
|
-
stroke-width: 0;
|
|
7
|
-
@include var(color,--colour-primary);
|
|
8
|
-
width: rem(64);
|
|
9
|
-
height: rem(64);
|
|
10
|
-
display: inline-block;
|
|
11
3
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
height: 1.5em;
|
|
16
|
-
vertical-align: text-top;
|
|
17
|
-
margin-top: -0.15em;
|
|
18
|
-
margin-inline: 0.25em;
|
|
19
|
-
color: inherit;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&[class*="text-"]{
|
|
23
|
-
fill: currentColor;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
& + .icon {
|
|
27
|
-
margin-inline-start: 1rem;
|
|
28
|
-
}
|
|
4
|
+
.icon--xs {
|
|
5
|
+
font-size: rem(16);
|
|
6
|
+
}
|
|
29
7
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
height: 1.5em;
|
|
33
|
-
vertical-align: text-top;
|
|
34
|
-
margin-top: -0.15em;
|
|
35
|
-
margin-inline: 0.25em;
|
|
36
|
-
}
|
|
8
|
+
.icon--sm {
|
|
9
|
+
font-size: rem(18);
|
|
37
10
|
}
|
|
38
11
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
width: 1em;
|
|
42
|
-
height: 1em;
|
|
43
|
-
vertical-align: text-top;
|
|
44
|
-
margin-top: 0.15em;
|
|
45
|
-
margin-inline: 0.25em;
|
|
46
|
-
}
|
|
12
|
+
.icon--compact {
|
|
13
|
+
font-size: rem(20);
|
|
47
14
|
}
|
|
48
15
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
height: rem(64);
|
|
53
|
-
padding: 0.5rem;
|
|
54
|
-
-moz-osx-font-smoothing: grayscale;
|
|
55
|
-
-webkit-font-smoothing: antialiased;
|
|
56
|
-
display: inline-block;
|
|
57
|
-
font-style: normal;
|
|
58
|
-
font-variant: normal;
|
|
59
|
-
text-rendering: auto;
|
|
60
|
-
line-height: 1;
|
|
61
|
-
font-family: "Font Awesome 6 Pro";
|
|
62
|
-
font-weight: 300;
|
|
63
|
-
width: auto;
|
|
16
|
+
.icon--md {
|
|
17
|
+
font-size: rem(28);
|
|
18
|
+
}
|
|
64
19
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
font-size: 1em;
|
|
68
|
-
height: 1em;
|
|
69
|
-
padding: 0;
|
|
70
|
-
vertical-align: text-top;
|
|
71
|
-
margin-top: 0.15em;
|
|
72
|
-
margin-inline: 0.25em;
|
|
73
|
-
}
|
|
20
|
+
.icon--lg {
|
|
21
|
+
font-size: rem(40);
|
|
74
22
|
}
|
|
75
23
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
font-size: 1em;
|
|
79
|
-
color: inherit;
|
|
80
|
-
}
|
|
24
|
+
[class*="fa-"]:not(.fa-regular,.fa-light, .fa-solid ) {
|
|
25
|
+
font-weight: 400;
|
|
81
26
|
}
|
|
@@ -54,21 +54,25 @@ body {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// #region scrollbars
|
|
57
|
-
div::-webkit-scrollbar {
|
|
57
|
+
:is(div,form,fieldset)::-webkit-scrollbar {
|
|
58
58
|
width: 10px;
|
|
59
|
-
height:
|
|
59
|
+
height: 10px;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
div::-webkit-scrollbar-track {
|
|
62
|
+
:is(div,form,fieldset)::-webkit-scrollbar-track {
|
|
63
63
|
background-color: #f1f1f1;
|
|
64
|
-
border-
|
|
64
|
+
border-top: 4px solid var(--colour-canvas-2);
|
|
65
|
+
border-left: 4px solid var(--colour-canvas-2);
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
div::-webkit-scrollbar-thumb {
|
|
68
|
+
:is(div,form,fieldset)::-webkit-scrollbar-thumb {
|
|
68
69
|
background-color: #c1c1c1;
|
|
69
70
|
width: 6px;
|
|
70
|
-
border-
|
|
71
|
+
border-top: 4px solid var(--colour-canvas-2);
|
|
72
|
+
border-left: 4px solid var(--colour-canvas-2);
|
|
71
73
|
}
|
|
74
|
+
|
|
75
|
+
|
|
72
76
|
//#endregion
|
|
73
77
|
|
|
74
78
|
body > footer,
|
|
@@ -133,4 +137,12 @@ details summary > * {
|
|
|
133
137
|
|
|
134
138
|
details {
|
|
135
139
|
width: 100%;
|
|
136
|
-
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// #region Undefined web components
|
|
143
|
+
iam-card:not(:defined) {
|
|
144
|
+
box-shadow: var(--card-border-radius);
|
|
145
|
+
border-radius: var(--card-border-radius);
|
|
146
|
+
padding: var(--card-top-padding) var(--card-right-padding) var(--card-bottom-padding) var(--card-left-padding);
|
|
147
|
+
}
|
|
148
|
+
// #endregion
|
|
@@ -27,6 +27,15 @@
|
|
|
27
27
|
// Extra vars needed
|
|
28
28
|
--content-max-width: #{$content-max-width};
|
|
29
29
|
--colour-brand: var(--colour-primary);
|
|
30
|
+
|
|
31
|
+
// Cards variables
|
|
32
|
+
--card-top-padding: 2rem;
|
|
33
|
+
--card-right-padding: #{rem(16+16+24)};
|
|
34
|
+
--card-bottom-padding: 2rem;
|
|
35
|
+
--card-left-padding: 1rem;
|
|
36
|
+
--card-border-radius: #{rem(8)};
|
|
37
|
+
--card-box-shadow: 2px 6px 12px rgba(0,0,0,0.2);
|
|
38
|
+
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
// Dark mode; functional colours get updated
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
:is(.mh-sm,.mh-md,.mh-lg){
|
|
2
2
|
overflow: auto;
|
|
3
|
+
overscroll-behavior: contain;
|
|
4
|
+
|
|
5
|
+
&::before {
|
|
6
|
+
content: "";
|
|
7
|
+
top: calc(100% - 1.5rem);
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
height: 1.5rem;
|
|
12
|
+
position: sticky;
|
|
13
|
+
display: block;
|
|
14
|
+
background: linear-gradient(180deg, transparent 0%, var(--colour-canvas-2) 100%);
|
|
15
|
+
z-index: 2;
|
|
16
|
+
margin-bottom: -1.5rem;
|
|
17
|
+
}
|
|
3
18
|
}
|
package/assets/ts/bundle.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Modules
|
|
3
3
|
import * as helpers from '../js/modules/helpers'
|
|
4
|
+
import extendDialogs from '../js/modules/dialogs'
|
|
4
5
|
import createDataLayer from '../js/modules/data-layer'
|
|
5
6
|
import nav from '../js/modules/nav'
|
|
6
7
|
//import accordion from './modules/accordion'
|
|
@@ -24,6 +25,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
|
24
25
|
// Global stuff
|
|
25
26
|
helpers.addBodyClasses(document.body);
|
|
26
27
|
helpers.addGlobalEvents(document.body);
|
|
28
|
+
extendDialogs(document.body);
|
|
27
29
|
//helpers.checkElements(document.body);
|
|
28
30
|
|
|
29
31
|
if (!window.customElements.get(`iam-header`))
|
|
@@ -18,5 +18,6 @@ The card component needs to be wrapped with a link or a button, this is required
|
|
|
18
18
|
**Class modifiers**
|
|
19
19
|
|
|
20
20
|
- Adding a class of **.card--filter** will implement the filter card design.
|
|
21
|
+
- Adding a class of **.colour-danger** will add a left hand border with the danger colour (See status card). This works with all of the theme
|
|
21
22
|
- Adding a class of **.border-o** will remove the box-shadow of the card and make some minor sizing adjustments.
|
|
22
|
-
- Adding a class like **.colour-warning** will update the colour of the left berder for the
|
|
23
|
+
- Adding a class like **.colour-warning** will update the colour of the left berder for the card. The theme colours will be avialable to use.
|
|
@@ -8,7 +8,7 @@ class iamCard extends HTMLElement {
|
|
|
8
8
|
const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';
|
|
9
9
|
const loadCSS = `@import "${assetLocation}/css/components/card.css";`;
|
|
10
10
|
|
|
11
|
-
if(this.querySelector('
|
|
11
|
+
if(this.querySelector('[class*="fa-"]'))
|
|
12
12
|
this.classList.add('card--has-icon');
|
|
13
13
|
|
|
14
14
|
let classList = this.classList.toString();
|
|
@@ -103,7 +103,7 @@ class iamCard extends HTMLElement {
|
|
|
103
103
|
case "class": {
|
|
104
104
|
let classList = this.classList.toString();
|
|
105
105
|
|
|
106
|
-
if(this.querySelector('
|
|
106
|
+
if(this.querySelector('[class*="fa-"]'))
|
|
107
107
|
classList += ' card--has-icon';
|
|
108
108
|
|
|
109
109
|
this.shadowRoot.querySelector('.card').setAttribute('class',`card ${classList}`);
|
|
@@ -52,6 +52,9 @@ class iamTable extends HTMLElement {
|
|
|
52
52
|
if(!this.hasAttribute('data-show'))
|
|
53
53
|
this.setAttribute('data-show', 15);
|
|
54
54
|
|
|
55
|
+
if(!this.hasAttribute('data-increment'))
|
|
56
|
+
this.setAttribute('data-increment', 15);
|
|
57
|
+
|
|
55
58
|
this.setAttribute('data-pages', Math.ceil(this.getAttribute('data-total') / this.getAttribute('data-show')));
|
|
56
59
|
}
|
|
57
60
|
|
|
@@ -66,18 +69,25 @@ class iamTable extends HTMLElement {
|
|
|
66
69
|
if(this.hasAttribute('data-filterby')){
|
|
67
70
|
|
|
68
71
|
this.form = document.querySelector(`#${this.getAttribute('data-filterby')}`);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
|
|
75
|
+
this.table.parentNode.insertBefore(this.form, this.table.nextSibling);
|
|
76
|
+
}
|
|
69
77
|
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
// Set ajax class
|
|
79
|
+
if(this.form.hasAttribute('data-ajax'))
|
|
80
|
+
this.table.classList.add('table--ajax');
|
|
72
81
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
if(!this.form.querySelector('[data-show]')){
|
|
77
|
-
this.form.innerHTML += `<input name="show" type="hidden" value="${this.getAttribute('data-show')}" data-show="true" />`
|
|
78
|
-
}
|
|
79
|
-
}
|
|
82
|
+
// Create a data list if a search input is present
|
|
83
|
+
tableModule.createSearchDataList(this.table, this.form);
|
|
80
84
|
|
|
85
|
+
if(!this.form.querySelector('[data-page]')){
|
|
86
|
+
this.form.innerHTML += `<input name="page" type="hidden" value="${this.getAttribute('data-page')}" data-pagination="true" />`
|
|
87
|
+
}
|
|
88
|
+
if(!this.form.querySelector('[data-show]')){
|
|
89
|
+
this.form.innerHTML += `<input name="show" type="hidden" value="${this.getAttribute('data-show')}" data-show="true" />`
|
|
90
|
+
}
|
|
81
91
|
|
|
82
92
|
// Event listeners
|
|
83
93
|
tableModule.addTableEventListeners(this.table);
|
|
@@ -97,8 +107,12 @@ class iamTable extends HTMLElement {
|
|
|
97
107
|
|
|
98
108
|
this.shadowRoot.querySelector('.table__wrapper').addEventListener("scroll", (event) => {
|
|
99
109
|
|
|
100
|
-
if(this.table.querySelector('dialog[open]'))
|
|
110
|
+
if(this.table.querySelector('dialog[open]')){
|
|
111
|
+
|
|
101
112
|
this.table.querySelector('dialog[open]').close();
|
|
113
|
+
this.table.querySelector('.dialog__wrapper > button.active').classList.remove('active');
|
|
114
|
+
}
|
|
115
|
+
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
118
|
|