@iamproperty/components 3.5.0 → 3.7.0
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/applied-filters.css +1 -1
- package/assets/css/components/applied-filters.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/charts.css +1 -1
- package/assets/css/components/charts.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 +1 -1
- package/assets/css/components/forms.css.map +1 -1
- package/assets/css/components/header.css +1 -1
- package/assets/css/components/header.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/nav.css +1 -1
- package/assets/css/components/nav.css.map +1 -1
- package/assets/css/components/pagination.css +1 -1
- package/assets/css/components/pagination.css.map +1 -1
- package/assets/css/components/property-searchbar.css +1 -1
- package/assets/css/components/property-searchbar.css.map +1 -1
- package/assets/css/components/table.css +1 -1
- package/assets/css/components/table.css.map +1 -1
- package/assets/css/components/tabs.css +1 -1
- package/assets/css/components/tabs.css.map +1 -1
- package/assets/css/components/tooltips.css +1 -1
- package/assets/css/components/tooltips.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 +5 -5
- package/assets/js/components/card/card.component.min.js.map +1 -1
- package/assets/js/components/filterlist/filterlist.component.js +13 -9
- package/assets/js/components/filterlist/filterlist.component.min.js +14 -5
- package/assets/js/components/filterlist/filterlist.component.min.js.map +1 -1
- package/assets/js/components/header/header.component.min.js +5 -5
- package/assets/js/components/table/table.component.js +23 -9
- package/assets/js/components/table/table.component.min.js +21 -11
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.js +6 -2
- package/assets/js/components/tabs/tabs.component.min.js +7 -5
- 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 +6 -2
- package/assets/js/modules/dialogs.js +173 -0
- package/assets/js/modules/helpers.js +1 -84
- package/assets/js/modules/table.js +35 -21
- package/assets/js/modules/tabs.js +2 -2
- package/assets/js/scripts.bundle.js +53 -31
- 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 +16 -2
- package/assets/sass/_corefiles.scss +3 -0
- package/assets/sass/_functions/functions.scss +2 -3
- package/assets/sass/_functions/mixins.scss +2 -18
- package/assets/sass/_functions/utilities.scss +35 -3
- package/assets/sass/_functions/variables.scss +70 -82
- package/assets/sass/_tests/colours.spec.scss +8 -8
- package/assets/sass/_tests/func.spec.scss +1 -1
- package/assets/sass/components/admin-panel.scss +95 -37
- package/assets/sass/components/applied-filters.scss +4 -0
- package/assets/sass/components/card.scss +39 -28
- package/assets/sass/components/charts.scss +2 -2
- package/assets/sass/components/dialog.scss +342 -30
- package/assets/sass/components/forms.scss +2 -2
- package/assets/sass/components/lists.scss +16 -33
- package/assets/sass/components/pagination.scss +4 -0
- package/assets/sass/components/table.scss +160 -39
- package/assets/sass/components/tabs.scss +54 -98
- package/assets/sass/components/tooltips.scss +1 -1
- package/assets/sass/foundations/buttons.scss +69 -58
- package/assets/sass/foundations/icons.scss +14 -69
- package/assets/sass/foundations/reboot.scss +17 -8
- package/assets/sass/foundations/root.scss +51 -48
- package/assets/sass/foundations/type.scss +4 -0
- package/assets/sass/helpers/max-height.scss +18 -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/filterlist/filterlist.component.ts +13 -11
- package/assets/ts/components/table/table.component.ts +24 -10
- package/assets/ts/components/tabs/tabs.component.ts +7 -2
- 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 +9 -3
- package/assets/ts/modules/dialogs.ts +237 -0
- package/assets/ts/modules/helpers.ts +1 -115
- package/assets/ts/modules/table.ts +47 -26
- package/assets/ts/modules/tabs.ts +3 -2
- package/assets/ts/tests/table.spec.ts +16 -4
- package/dist/components.es.js +1027 -1017
- package/dist/components.umd.js +50 -24
- package/dist/style.css +1 -1
- 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
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
// #region button primary
|
|
4
4
|
.btn {
|
|
5
5
|
|
|
6
|
+
--btn-margin: #{rem(16)};
|
|
7
|
+
|
|
8
|
+
@include media-breakpoint-up(sm) {
|
|
9
|
+
|
|
10
|
+
--btn-margin: #{rem(24)};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
&:not(.btn-secondary)[class*="colour-"]{
|
|
7
15
|
--colour-btn-bg: var(--colour);
|
|
8
16
|
--colour-btn-border: var(--colour);
|
|
@@ -28,8 +36,12 @@
|
|
|
28
36
|
line-height: rem(24);
|
|
29
37
|
padding: calc(rem(12) - 2px) calc(rem(40) - 2px);
|
|
30
38
|
border-radius: rem(24);
|
|
31
|
-
margin-bottom:
|
|
32
|
-
|
|
39
|
+
margin-bottom: var(--btn-margin);
|
|
40
|
+
|
|
41
|
+
&:not(:last-child){
|
|
42
|
+
|
|
43
|
+
margin-right: var(--btn-margin);
|
|
44
|
+
}
|
|
33
45
|
transition: background .5s, color .5s;
|
|
34
46
|
height: auto;
|
|
35
47
|
max-width: fit-content;
|
|
@@ -146,11 +158,13 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
146
158
|
|
|
147
159
|
text-align: center;
|
|
148
160
|
width: calc(rem(48) - 4px);
|
|
161
|
+
min-width: calc(rem(48) - 4px);
|
|
162
|
+
max-width: calc(rem(48) - 4px);
|
|
149
163
|
height: calc(rem(48) - 4px)!important;
|
|
150
164
|
text-indent: -300px;
|
|
151
165
|
overflow: hidden;
|
|
152
|
-
|
|
153
166
|
position: relative;
|
|
167
|
+
font-size: rem(20);
|
|
154
168
|
|
|
155
169
|
&:before {
|
|
156
170
|
position: absolute;
|
|
@@ -175,7 +189,7 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
175
189
|
|
|
176
190
|
&.btn-secondary:is(:hover, :focus, .hover, :active, .active, :focus-within):not([disabled]) {
|
|
177
191
|
background-color: var(--colour);
|
|
178
|
-
color: var(--colour-primary);
|
|
192
|
+
color: var(--colour-primary-theme);
|
|
179
193
|
|
|
180
194
|
&:is(.colour-primary,.colour-dark,.colour-danger,.colour-black) {
|
|
181
195
|
color: var(--colour-inverted);
|
|
@@ -189,6 +203,7 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
189
203
|
|
|
190
204
|
--colour-btn-bg-hover: var(--colour);
|
|
191
205
|
--colour-btn-border-hover: var(--colour);
|
|
206
|
+
--colour-btn-hover: var(--colour-primary-theme);
|
|
192
207
|
position: relative;
|
|
193
208
|
padding-left: rem(56);
|
|
194
209
|
padding-right: rem(56);
|
|
@@ -198,7 +213,7 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
198
213
|
|
|
199
214
|
padding-left: rem(40);
|
|
200
215
|
padding-right: rem(40);
|
|
201
|
-
|
|
216
|
+
|
|
202
217
|
&:before {
|
|
203
218
|
content: "\f00c";
|
|
204
219
|
font-family: "Font Awesome 6 Pro";
|
|
@@ -290,77 +305,73 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
290
305
|
// #region button that opens up a filter dialog
|
|
291
306
|
.btn-filter {
|
|
292
307
|
&:after {
|
|
293
|
-
content: "";
|
|
294
|
-
|
|
308
|
+
content: "\f1de";
|
|
295
309
|
display: inline-block;
|
|
296
310
|
margin-left: 1em;
|
|
297
311
|
margin-bottom: -0.15em;
|
|
298
312
|
height: 1em;
|
|
299
313
|
width: 1em;
|
|
300
314
|
z-index: var(--index-focus);
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
mask-repeat: no-repeat;
|
|
305
|
-
mask-position: 50% 50%;
|
|
306
|
-
-webkit-mask-image: var(--icon-filter);
|
|
307
|
-
-webkit-mask-size: 100%;
|
|
308
|
-
-webkit-mask-repeat: no-repeat;
|
|
309
|
-
-webkit-mask-position: 50% 50%;
|
|
310
|
-
|
|
315
|
+
color: currentColor;
|
|
316
|
+
font-weight: 300;
|
|
317
|
+
font-family: "Font Awesome 6 Pro";
|
|
311
318
|
}
|
|
312
319
|
}
|
|
313
320
|
// #endregion
|
|
314
321
|
|
|
315
322
|
|
|
316
|
-
// #region
|
|
323
|
+
// #region Tertiary Button
|
|
317
324
|
|
|
318
|
-
.btn {
|
|
325
|
+
.btn.btn-tertiary {
|
|
319
326
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
position: relative;
|
|
331
|
-
|
|
332
|
-
&:not(.text-decoration-none):after {
|
|
333
|
-
position: absolute;
|
|
334
|
-
content: "";
|
|
335
|
-
top: 100%;
|
|
336
|
-
left: 50%;
|
|
337
|
-
height: 2px;
|
|
338
|
-
width: 100%;
|
|
339
|
-
transform: translate(-50%,0);
|
|
340
|
-
background: var(--colour-underline);
|
|
341
|
-
transition: width 0.5s;
|
|
342
|
-
}
|
|
327
|
+
background-color: transparent;
|
|
328
|
+
border: none;
|
|
329
|
+
color: var(--colour-link);
|
|
330
|
+
margin: 0 var(--btn-margin) var(--btn-margin) 0;
|
|
331
|
+
padding: 0;
|
|
332
|
+
font-size: rem(18);
|
|
333
|
+
font-weight: normal;
|
|
334
|
+
line-height: rem(24);
|
|
335
|
+
min-height: rem(24);
|
|
336
|
+
position: relative;
|
|
343
337
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
338
|
+
&:after {
|
|
339
|
+
position: absolute;
|
|
340
|
+
content: "";
|
|
341
|
+
top: 100%;
|
|
342
|
+
left: 50%;
|
|
343
|
+
height: 2px;
|
|
344
|
+
width: 100%;
|
|
345
|
+
transform: translate(-50%,0);
|
|
346
|
+
background: var(--colour-underline);
|
|
347
|
+
transition: width 0.5s;
|
|
348
|
+
}
|
|
352
349
|
|
|
353
|
-
&:is(:hover, :focus, .hover, :focus-within):not([disabled], :active, .active) {
|
|
354
350
|
|
|
355
|
-
|
|
356
|
-
width: 60%;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
&:is(:active, .active):not([disabled]) {
|
|
351
|
+
&.text-decoration-none:after {
|
|
360
352
|
|
|
361
|
-
|
|
353
|
+
width: 0%;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
[class*=fa-] {
|
|
357
|
+
margin-left: 0;
|
|
358
|
+
margin-right: 0.5rem;
|
|
359
|
+
}
|
|
360
|
+
[class*=fa-]:not(:first-child) {
|
|
361
|
+
margin-left: 0.5rem;
|
|
362
|
+
margin-right: 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
&:is(:hover, :focus, .hover, :focus-within):not([disabled], :active, .active) {
|
|
366
|
+
|
|
367
|
+
&:after {
|
|
368
|
+
width: 60%!important;
|
|
362
369
|
}
|
|
363
370
|
}
|
|
371
|
+
&:is(:active, .active):not([disabled]) {
|
|
364
372
|
|
|
365
|
-
|
|
373
|
+
color: var(--colour-active);
|
|
374
|
+
}
|
|
366
375
|
|
|
376
|
+
}
|
|
377
|
+
// #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,19 +54,20 @@ body {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// #region scrollbars
|
|
57
|
-
div::-webkit-scrollbar {
|
|
58
|
-
width:
|
|
59
|
-
height:
|
|
57
|
+
:is(div,form,fieldset)::-webkit-scrollbar {
|
|
58
|
+
width: 10px;
|
|
59
|
+
height: 6px;
|
|
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-left: 4px solid var(--bg-colour,var(--colour-canvas));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
div::-webkit-scrollbar-thumb {
|
|
67
|
+
:is(div,form,fieldset)::-webkit-scrollbar-thumb {
|
|
68
68
|
background-color: #c1c1c1;
|
|
69
|
-
|
|
69
|
+
width: 6px;
|
|
70
|
+
border-left: 4px solid var(--bg-colour,var(--colour-canvas));
|
|
70
71
|
}
|
|
71
72
|
//#endregion
|
|
72
73
|
|
|
@@ -132,4 +133,12 @@ details summary > * {
|
|
|
132
133
|
|
|
133
134
|
details {
|
|
134
135
|
width: 100%;
|
|
135
|
-
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// #region Undefined web components
|
|
139
|
+
iam-card:not(:defined) {
|
|
140
|
+
box-shadow: var(--card-border-radius);
|
|
141
|
+
border-radius: var(--card-border-radius);
|
|
142
|
+
padding: var(--card-top-padding) var(--card-right-padding) var(--card-bottom-padding) var(--card-left-padding);
|
|
143
|
+
}
|
|
144
|
+
// #endregion
|
|
@@ -26,88 +26,91 @@
|
|
|
26
26
|
|
|
27
27
|
// Extra vars needed
|
|
28
28
|
--content-max-width: #{$content-max-width};
|
|
29
|
-
|
|
30
29
|
--colour-brand: var(--colour-primary);
|
|
31
|
-
|
|
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
|
+
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
// Dark mode; functional colours get updated
|
|
35
42
|
@media screen and (prefers-color-scheme: dark) {
|
|
36
43
|
:root {
|
|
44
|
+
|
|
45
|
+
@each $color, $value in $dark-mode-colors {
|
|
46
|
+
--colour-#{$color}: #{$value};
|
|
47
|
+
}
|
|
37
48
|
@include invert-colours();
|
|
38
49
|
}
|
|
39
|
-
|
|
40
|
-
body .text-primary {
|
|
41
|
-
color: #{$colour-inverted}!important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
50
|
}
|
|
46
51
|
|
|
47
|
-
@media screen {
|
|
52
|
+
@media screen and (prefers-color-scheme: light) {
|
|
48
53
|
|
|
49
54
|
// Reset the colours of lighter backgrounds to make sure they aren't over written by dark mode. Some other tweaks to colours are applied
|
|
50
|
-
[class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.bg-canvas):not(.invert-colours) {
|
|
55
|
+
[class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.bg-white):not(.bg-canvas):not(.bg-canvas-2):not(.invert-colours) {
|
|
51
56
|
|
|
57
|
+
@each $color, $value in $theme-colors {
|
|
58
|
+
--colour-#{$color}: #{$value};
|
|
59
|
+
}
|
|
52
60
|
@include reset-colours();
|
|
53
|
-
|
|
54
61
|
--colour-body: var(--colour-primary);
|
|
55
|
-
--colour-heading: var(--colour-primary);
|
|
56
62
|
color: var(--colour-body);
|
|
57
|
-
--colour-underline: var(--colour-primary);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// Slight colour adjustments on the light background to match brand guidelines
|
|
63
|
-
.bg-light[class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.prevent-invert) {
|
|
64
|
-
--colour-canvas: var(--colour-light);
|
|
65
|
-
--colour-heading: var(--colour-dark);
|
|
66
|
-
color: var(--colour-dark);
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
// Override the colours when on a dark background, similiar to dark mode but on a module level
|
|
70
|
-
.bg-
|
|
71
|
-
.bg-dark:not(.prevent-invert),
|
|
72
|
-
.bg-danger:not(.prevent-invert),
|
|
73
|
-
.bg-black:not(.prevent-invert),
|
|
66
|
+
[class*="bg-"]:not(.bg-info):not(.bg-success):not(.bg-light):not(.bg-white):not(.bg-canvas):not(.bg-canvas-2):not(.prevent-invert),
|
|
74
67
|
.invert-colours {
|
|
75
68
|
|
|
76
|
-
|
|
69
|
+
@include invert-colours();
|
|
77
70
|
|
|
78
|
-
@if $compatible != "true" {
|
|
79
|
-
|
|
80
|
-
@include invert-colours();
|
|
81
|
-
}
|
|
82
71
|
color: #{$colour-inverted};
|
|
83
72
|
}
|
|
73
|
+
}
|
|
84
74
|
|
|
75
|
+
@media screen and (prefers-color-scheme: dark) {
|
|
85
76
|
|
|
86
|
-
//
|
|
87
|
-
.bg-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
--colour-underline: #{$colour-inverted};
|
|
77
|
+
// Reset the colours of lighter backgrounds to make sure they aren't over written by dark mode. Some other tweaks to colours are applied
|
|
78
|
+
[class*="bg-"]:not(.bg-canvas):not(.bg-canvas-2) {
|
|
79
|
+
|
|
80
|
+
@include reset-colours();
|
|
81
|
+
--colour-body: #{$primary};
|
|
82
|
+
color: var(--colour-body);
|
|
93
83
|
}
|
|
94
|
-
}
|
|
95
84
|
|
|
85
|
+
@each $color, $value in $theme-colors {
|
|
96
86
|
|
|
87
|
+
.bg-#{$color}[class*="gradient-"] {
|
|
97
88
|
|
|
98
|
-
|
|
89
|
+
background-color: var(--colour-#{$color}-theme) !important;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[class*="bg-"][class*="gradient-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger) {
|
|
99
94
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
@if $compatible != "true" {
|
|
103
|
-
|
|
104
|
-
@include invert-colours();
|
|
95
|
+
@each $color, $value in $theme-colors {
|
|
96
|
+
--colour-#{$color}: #{$value};
|
|
105
97
|
}
|
|
98
|
+
@include reset-colours();
|
|
99
|
+
--colour-body: var(--colour-primary-theme);
|
|
100
|
+
color: var(--colour-body);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[class*="bg-"][class*="gradient-"]:not(.bg-info):not(.bg-success):not(.bg-light):not(.prevent-invert) {
|
|
104
|
+
|
|
105
|
+
@include invert-colours();
|
|
106
|
+
|
|
106
107
|
color: #{$colour-inverted};
|
|
107
|
-
--colour-underline: #{$colour-inverted};
|
|
108
108
|
}
|
|
109
|
+
}
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
|
|
112
|
+
@media (forced-colors: active) {
|
|
113
|
+
:root {
|
|
114
|
+
--contrast-outline-width: 1px;
|
|
112
115
|
}
|
|
113
116
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
:is(.mh-sm,.mh-md,.mh-lg){
|
|
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
|
+
}
|
|
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}`);
|
|
@@ -22,14 +22,23 @@ class iamFilterlist extends HTMLElement {
|
|
|
22
22
|
${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
|
|
23
23
|
|
|
24
24
|
:host {
|
|
25
|
-
margin-bottom:
|
|
25
|
+
margin-bottom: 1rem;
|
|
26
26
|
display:block;
|
|
27
27
|
}
|
|
28
|
+
:host(.mh-sm){
|
|
29
|
+
max-height: none!important;
|
|
30
|
+
}
|
|
31
|
+
:host(.mh-md){
|
|
32
|
+
max-height: none!important;
|
|
33
|
+
}
|
|
34
|
+
:host(.mh-lg){
|
|
35
|
+
max-height: none!important;
|
|
36
|
+
}
|
|
28
37
|
</style>
|
|
29
38
|
<div class="form-control__wrapper">
|
|
30
39
|
<label for="search" class="visually-hidden">Search</label>
|
|
31
40
|
<span class="suffix" role="presentation"><slot name="icon"></slot></span>
|
|
32
|
-
<input name="search" id="search" type="text" class="form-control" autocomplete="off"
|
|
41
|
+
<input name="search" id="search" type="text" class="form-control" autocomplete="off" placeholder="Search" />
|
|
33
42
|
</div>
|
|
34
43
|
<div class="list__wrapper">
|
|
35
44
|
<slot></slot>
|
|
@@ -40,15 +49,8 @@ class iamFilterlist extends HTMLElement {
|
|
|
40
49
|
|
|
41
50
|
connectedCallback() {
|
|
42
51
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"medium": "25rem",
|
|
46
|
-
"large": "37.5rem"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
let maxHeightClass = (this.hasAttribute('data-max-height') && maxHeights[this.getAttribute('data-max-height')] ? 'list__wrapper--'+this.getAttribute('data-max-height') : '');
|
|
50
|
-
|
|
51
|
-
this.shadowRoot.querySelector('.list__wrapper').classList.add(maxHeightClass);
|
|
52
|
+
let classList = this.classList.toString();
|
|
53
|
+
this.shadowRoot.querySelector('.list__wrapper').setAttribute('class',`list__wrapper ${classList}`);
|
|
52
54
|
|
|
53
55
|
if(!this.querySelector('i.fa-search'))
|
|
54
56
|
this.innerHTML += '<i class="fa fa-light fa-search" aria-hidden="true" slot="icon"></i>';
|
|
@@ -20,6 +20,16 @@ class iamTable extends HTMLElement {
|
|
|
20
20
|
template.innerHTML = `
|
|
21
21
|
<style>
|
|
22
22
|
@import "${assetLocation}/css/core.min.css";
|
|
23
|
+
|
|
24
|
+
:host(.mh-sm){
|
|
25
|
+
max-height: none!important;
|
|
26
|
+
}
|
|
27
|
+
:host(.mh-md){
|
|
28
|
+
max-height: none!important;
|
|
29
|
+
}
|
|
30
|
+
:host(.mh-lg){
|
|
31
|
+
max-height: none!important;
|
|
32
|
+
}
|
|
23
33
|
</style>
|
|
24
34
|
${isCTA ? '<div class="table--cta">' : ''}
|
|
25
35
|
<div class="table__wrapper ${classList}">
|
|
@@ -48,7 +58,7 @@ class iamTable extends HTMLElement {
|
|
|
48
58
|
connectedCallback() {
|
|
49
59
|
|
|
50
60
|
this.table = this.querySelector('table');
|
|
51
|
-
this.savedTableBody = this.querySelector('tbody').cloneNode(true);
|
|
61
|
+
this.savedTableBody = this.table.querySelector('tbody').cloneNode(true);
|
|
52
62
|
this.pagination = this.shadowRoot.querySelector('.table__pagination');
|
|
53
63
|
|
|
54
64
|
// Set events on the filter table
|
|
@@ -56,18 +66,21 @@ class iamTable extends HTMLElement {
|
|
|
56
66
|
if(this.hasAttribute('data-filterby')){
|
|
57
67
|
|
|
58
68
|
this.form = document.querySelector(`#${this.getAttribute('data-filterby')}`);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
|
|
72
|
+
this.table.parentNode.insertBefore(this.form, this.table.nextSibling);
|
|
73
|
+
}
|
|
59
74
|
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
// Create a data list if a search input is present
|
|
76
|
+
tableModule.createSearchDataList(this.table, this.form);
|
|
62
77
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
78
|
+
if(!this.form.querySelector('[data-page]')){
|
|
79
|
+
this.form.innerHTML += `<input name="page" type="hidden" value="${this.getAttribute('data-page')}" data-pagination="true" />`
|
|
80
|
+
}
|
|
81
|
+
if(!this.form.querySelector('[data-show]')){
|
|
82
|
+
this.form.innerHTML += `<input name="show" type="hidden" value="${this.getAttribute('data-show')}" data-show="true" />`
|
|
69
83
|
}
|
|
70
|
-
|
|
71
84
|
|
|
72
85
|
// Event listeners
|
|
73
86
|
tableModule.addTableEventListeners(this.table);
|
|
@@ -82,6 +95,7 @@ class iamTable extends HTMLElement {
|
|
|
82
95
|
tableModule.makeTableFunctional(this.table, this.form, this.pagination, this);
|
|
83
96
|
tableModule.filterTable(this.table, this.form,this);
|
|
84
97
|
createPaginationButttons(this,this.pagination);
|
|
98
|
+
tableModule.populateDataQueries(this.table, this.form);
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
this.shadowRoot.querySelector('.table__wrapper').addEventListener("scroll", (event) => {
|
|
@@ -15,12 +15,14 @@ class iamTabs extends HTMLElement {
|
|
|
15
15
|
this.attachShadow({ mode: 'open'});
|
|
16
16
|
|
|
17
17
|
const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';
|
|
18
|
-
const loadCSS = `@import "${assetLocation}/css/components/tabs.css";`;
|
|
19
18
|
const template = document.createElement('template');
|
|
20
19
|
template.innerHTML = `
|
|
21
20
|
<style>
|
|
22
21
|
@import "${assetLocation}/css/core.min.css";
|
|
23
|
-
|
|
22
|
+
|
|
23
|
+
:host(.admin-panel){
|
|
24
|
+
display: contents!important;
|
|
25
|
+
}
|
|
24
26
|
|
|
25
27
|
${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
|
|
26
28
|
</style>
|
|
@@ -33,6 +35,9 @@ class iamTabs extends HTMLElement {
|
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
connectedCallback() {
|
|
38
|
+
|
|
39
|
+
let classList = this.classList.toString().replace('container','');
|
|
40
|
+
this.shadowRoot.querySelector('.tabs').setAttribute('class',`tabs ${classList}`);
|
|
36
41
|
|
|
37
42
|
tabs(this);
|
|
38
43
|
}
|