@iamproperty/components 6.1.0--beta → 6.1.0--beta3
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/actionbar.css.map +1 -1
- package/assets/css/components/actionbar.global.css.map +1 -1
- package/assets/css/components/card.component.css +1 -1
- package/assets/css/components/card.component.css.map +1 -1
- package/assets/css/components/card.module.css +1 -1
- package/assets/css/components/card.module.css.map +1 -1
- package/assets/css/components/carousel.component.css +1 -0
- package/assets/css/components/carousel.component.css.map +1 -0
- package/assets/css/components/carousel.config.css +1 -0
- package/assets/css/components/carousel.config.css.map +1 -0
- package/assets/css/components/collapsible-side.css.map +1 -1
- package/assets/css/components/fileupload.css.map +1 -1
- package/assets/css/components/filter-card.component.css +1 -1
- package/assets/css/components/filter-card.component.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/marketing.css.map +1 -1
- package/assets/css/components/multi-step.component.css +1 -0
- package/assets/css/components/multi-step.component.css.map +1 -0
- package/assets/css/components/multiselect.preload.css.map +1 -1
- package/assets/css/components/nav.css.map +1 -1
- package/assets/css/components/nav.docs.css.map +1 -1
- package/assets/css/components/nav.global.css.map +1 -1
- package/assets/css/components/nav.old.css.map +1 -1
- package/assets/css/components/nav.preload.css +1 -1
- package/assets/css/components/nav.preload.css.map +1 -1
- package/assets/css/components/notification.css.map +1 -1
- package/assets/css/components/pagination.css.map +1 -1
- package/assets/css/components/property-searchbar.css.map +1 -1
- package/assets/css/components/record-card.component.css +1 -1
- package/assets/css/components/record-card.component.css.map +1 -1
- package/assets/css/components/slider.css.map +1 -1
- package/assets/css/components/snapshot.css.map +1 -1
- package/assets/css/components/stepper.css.map +1 -1
- package/assets/css/components/table.global.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/testimonial.css.map +1 -1
- package/assets/css/components/timeline.css.map +1 -1
- package/assets/css/components/video-card.component.css +1 -1
- package/assets/css/components/video-card.component.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/img/illustrations/not-found.png +0 -0
- package/assets/js/components/accordion/accordion.component.min.js +2 -2
- package/assets/js/components/actionbar/actionbar.component.min.js +6 -6
- package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +2 -2
- package/assets/js/components/applied-filters/applied-filters.component.min.js +2 -2
- package/assets/js/components/barchart/barchart.component.min.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/carousel/carousel.component.js +36 -41
- package/assets/js/components/carousel/carousel.component.min.js +18 -12
- package/assets/js/components/carousel/carousel.component.min.js.map +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +2 -2
- package/assets/js/components/fileupload/fileupload.component.min.js +2 -2
- package/assets/js/components/filter-card/filter-card.component.min.js +5 -5
- package/assets/js/components/filter-card/filter-card.component.min.js.map +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +2 -2
- package/assets/js/components/header/header.component.min.js +3 -3
- package/assets/js/components/inline-edit/inline-edit.component.min.js +2 -2
- package/assets/js/components/marketing/marketing.component.min.js +2 -2
- package/assets/js/components/multi-step/multi-step.component.js +162 -0
- package/assets/js/components/multiselect/multiselect.component.min.js +2 -2
- package/assets/js/components/nav/nav.component.min.js +2 -2
- package/assets/js/components/notification/notification.component.min.js +2 -2
- package/assets/js/components/pagination/pagination.component.min.js +2 -2
- package/assets/js/components/record-card/record-card.component.min.js +6 -6
- package/assets/js/components/record-card/record-card.component.min.js.map +1 -1
- package/assets/js/components/search/search.component.min.js +2 -2
- package/assets/js/components/slider/slider.component.min.js +2 -2
- package/assets/js/components/table/table.component.js +1 -1
- package/assets/js/components/table/table.component.min.js +3 -3
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +3 -3
- package/assets/js/components/video-card/video-card.component.min.js +6 -6
- package/assets/js/components/video-card/video-card.component.min.js.map +1 -1
- package/assets/js/components.bundle.js +3 -3
- package/assets/js/components.bundle.js.map +1 -1
- package/assets/js/components.js +1 -1
- package/assets/js/modules/card.module.js +4 -1
- package/assets/js/modules/carousel.js +110 -8
- package/assets/js/modules/dialogs.js +5 -123
- package/assets/js/scripts.bundle.js +4 -4
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +3 -3
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/_components.scss +3 -19
- package/assets/sass/_corefiles.scss +15 -0
- package/assets/sass/_func.scss +3 -0
- package/assets/sass/_functions/functions.scss +304 -1
- package/assets/sass/_functions/mixins.scss +458 -2
- package/assets/sass/_functions/utilities.scss +647 -2
- package/assets/sass/_functions/variables.scss +1724 -2
- package/assets/sass/_utilities.scss +126 -7
- package/assets/sass/components/card.module.scss +1 -1
- package/assets/sass/components/carousel.component.scss +605 -0
- package/assets/sass/components/carousel.config.scss +84 -0
- package/assets/sass/components/header.scss +1 -0
- package/assets/sass/components/multi-step.component.scss +148 -0
- package/assets/sass/components/nav.preload.scss +5 -0
- package/assets/sass/components/tabs.scss +1 -1
- package/assets/sass/elements/admin-panel.scss +2 -1
- package/assets/sass/elements/buttons.scss +33 -0
- package/assets/sass/elements/container.scss +16 -6
- package/assets/sass/elements/details.scss +2 -0
- package/assets/sass/elements/forms.scss +236 -24
- package/assets/sass/elements/links.scss +27 -4
- package/assets/sass/elements/lists.scss +46 -0
- package/assets/sass/elements/media.scss +11 -1
- package/assets/sass/elements/modal.scss +138 -238
- package/assets/sass/elements/table.element.scss +35 -0
- package/assets/sass/elements/type.scss +38 -2
- package/assets/sass/error.scss +32 -1
- package/assets/sass/foundations/bs_grid.scss +33 -0
- package/assets/sass/foundations/grid.scss +270 -0
- package/assets/sass/foundations/reboot.scss +71 -49
- package/assets/sass/foundations/root.scss +16 -2
- package/assets/ts/components/carousel/carousel.component.ts +51 -44
- package/assets/ts/components/multi-step/multi-step.component.ts +262 -0
- package/assets/ts/components/table/table.component.ts +2 -1
- package/assets/ts/components.ts +1 -1
- package/assets/ts/modules/card.module.ts +4 -1
- package/assets/ts/modules/carousel.ts +161 -7
- package/assets/ts/modules/dialogs.ts +6 -174
- package/dist/components.es.js +177 -193
- package/dist/components.umd.js +73 -67
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/components/Carousel/Carousel.vue +1 -15
- package/src/components/FilterCard/FilterCard.vue +1 -1
- package/src/components/MultiStep/MultiStep.vue +25 -0
- package/src/components/RecordCard/RecordCard.vue +1 -1
- package/src/components/VideoCard/VideoCard.vue +1 -1
- package/assets/css/components/carousel.css +0 -1
- package/assets/css/components/carousel.css.map +0 -1
- package/assets/css/components/carousel.preload.css +0 -1
- package/assets/css/components/carousel.preload.css.map +0 -1
- package/assets/sass/components/carousel.preload.scss +0 -82
- package/assets/sass/components/carousel.scss +0 -258
- package/assets/ts/tests/dialogs.spec.js +0 -50
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use "../_func" as *;
|
|
4
|
+
|
|
5
|
+
// #region Main grid setup
|
|
6
|
+
body {
|
|
7
|
+
--excess-space: calc((100% - var(--max-width, #{$max-width})) / 2);
|
|
8
|
+
--col-size: calc((100% - max(0%,var(--excess-space)) - max(0%,var(--excess-space)) - var(--gutter, #{$gutter}) - var(--gutter, #{$gutter}) - (var(--gap, #{$gap}) * (#{$columns - 1}))) / #{$columns});
|
|
9
|
+
column-gap: var(--gap, #{$gap});
|
|
10
|
+
display: grid;
|
|
11
|
+
margin-inline: 0;
|
|
12
|
+
width: 100%;
|
|
13
|
+
$templateColumns: '';
|
|
14
|
+
@for $i from 1 to $columns {
|
|
15
|
+
$templateColumns: $templateColumns + 'var(--col-size) [col-'+$i+'-end col-'+($i+1)+'-start] '
|
|
16
|
+
}
|
|
17
|
+
grid-template-columns: [full-width-start container-start] calc(var(--gutter, #{$gutter}) - var(--gap, #{$gap}))
|
|
18
|
+
[content-start col-1-start]
|
|
19
|
+
#{$templateColumns}
|
|
20
|
+
var(--col-size) [col-#{$columns}-end content-end] calc(var(--gutter, #{$gutter}) - var(--gap, #{$gap})) [container-end full-width-end];
|
|
21
|
+
|
|
22
|
+
@media screen and (min-width: #{em($max-width-px * $max-scale-up)}) {
|
|
23
|
+
grid-template-columns: [full-width-start] calc(var(--excess-space) - var(--gap, #{$gap}))
|
|
24
|
+
[container-start] calc(var(--gutter, #{$gutter}) - var(--gap, #{$gap}))
|
|
25
|
+
[content-start col-1-start]
|
|
26
|
+
#{$templateColumns}
|
|
27
|
+
var(--col-size) [col-#{$columns}-end content-end] calc(var(--gutter, #{$gutter}) - var(--gap, #{$gap})) [container-end] calc(var(--excess-space) - var(--gap, #{$gap})) [full-width-end];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
grid-template-rows: auto;
|
|
31
|
+
align-content: start;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
|
|
34
|
+
& * {
|
|
35
|
+
grid-column: content;
|
|
36
|
+
|
|
37
|
+
&:where(button):not(:has(.card)){
|
|
38
|
+
|
|
39
|
+
max-width: fit-content;
|
|
40
|
+
place-self: start;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:is(div){
|
|
44
|
+
|
|
45
|
+
min-height: -webkit-fill-available;
|
|
46
|
+
align-content: start;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
div:has(main) {
|
|
52
|
+
display: contents!important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:is(nav, main, footer) {
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-column: full-width!important;
|
|
58
|
+
grid-template-columns: subgrid;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
*:not(.row)>main:not(:has(.container:last-child)):not(:has(iam-collapsible-side:last-child)) {
|
|
62
|
+
padding-bottom: 1rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
main > :is(.full-width, [class*="bg-"]:has(.container), iam-header, iam-collapsible-side, iam-notification) {
|
|
66
|
+
grid-column: full-width;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[class*="bg-"]:not([class*=col-]):has(.container) {
|
|
70
|
+
display: grid;
|
|
71
|
+
grid-column: full-width;
|
|
72
|
+
grid-template-columns: subgrid;
|
|
73
|
+
}
|
|
74
|
+
// #endregion
|
|
75
|
+
|
|
76
|
+
// #region grid mixins
|
|
77
|
+
@mixin grid-utilities($br: ""){
|
|
78
|
+
.#{$br}inline-start {
|
|
79
|
+
justify-self: start;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.#{$br}block-start {
|
|
83
|
+
align-self: start;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.#{$br}inline-center {
|
|
87
|
+
justify-self: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.#{$br}block-center {
|
|
91
|
+
align-self: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$br}inline-end {
|
|
95
|
+
justify-self: end;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.#{$br}block-end {
|
|
99
|
+
align-self: end;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{$br}display-contents {
|
|
103
|
+
display: contents;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{$br}display-none {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.#{$br}display-block {
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.#{$br}display-grid {
|
|
115
|
+
display: grid;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.#{$br}flow-dense { // Apply to a wrapper div of the items
|
|
119
|
+
grid-auto-flow: dense;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@for $i from 0 to $grid-utility-count {
|
|
123
|
+
|
|
124
|
+
.#{$br}order-#{$i+1} {
|
|
125
|
+
order: #{$i+1};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@mixin grid-columns($br: ""){
|
|
131
|
+
|
|
132
|
+
*:not(:where(main)):has(> [class*="#{$br}col-"]){
|
|
133
|
+
display: grid;
|
|
134
|
+
grid-template-columns: subgrid;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.#{$br}col-start-auto {
|
|
138
|
+
--col-start: auto;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@for $i from 0 to $columns {
|
|
142
|
+
|
|
143
|
+
.#{$br}col-start-#{$i+1} {
|
|
144
|
+
--col-start: col-#{$i+1}-start!important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.#{$br}col-end-#{$i+1} {
|
|
148
|
+
--col-end: col-#{$i+1}-end;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.#{$br}col-span-#{$i+1} {
|
|
152
|
+
--col-end: span #{$i+1};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@mixin grid-rows($br: ""){
|
|
158
|
+
|
|
159
|
+
// Assign how many rows an item takes
|
|
160
|
+
@for $i from 0 to $grid-utility-count {
|
|
161
|
+
|
|
162
|
+
.#{$br}row-span-#{$i+1} {
|
|
163
|
+
--row-span: #{$i+1};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Move the item to a set row
|
|
168
|
+
@for $i from 0 to $rows-per-page {
|
|
169
|
+
|
|
170
|
+
.#{$br}row-start-#{$i+1} {
|
|
171
|
+
--row-start: #{$i+1};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// #endregion
|
|
176
|
+
|
|
177
|
+
@if $enable-new-grid == "true" {
|
|
178
|
+
|
|
179
|
+
// #region Grid utility classes
|
|
180
|
+
*:has([class*="order-"]) > *:not([class*="order-"]) {
|
|
181
|
+
order: 99;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@include grid-utilities();
|
|
186
|
+
@each $br, $value in $breakpoints {
|
|
187
|
+
@include breakpoint($br){
|
|
188
|
+
@include grid-utilities(#{$br+'-'});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// #endregion
|
|
192
|
+
|
|
193
|
+
// #region Create the columns
|
|
194
|
+
:is([class*="col-start-"], [class*="col-end-"], [class*="col-span-"]) {
|
|
195
|
+
grid-column: var(--col-start, col-1-start) / var(--col-end, col-#{$columns}-end);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
*:not(:where(html, body)):has(:is([class*="cols-"], [class*="col-start-"], [class*="col-end-"], [class*="col-span-"])){
|
|
199
|
+
|
|
200
|
+
display: grid;
|
|
201
|
+
grid-template-columns: subgrid;
|
|
202
|
+
|
|
203
|
+
[class*="col-"]:not([class*="col-start-auto"]) {
|
|
204
|
+
|
|
205
|
+
--col-start: col-1;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[class*="col-"] [class*="col-"] {
|
|
209
|
+
|
|
210
|
+
--col-start: auto;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
* {
|
|
214
|
+
grid-column: var(--col-start, col-1-start) / var(--col-end, col-#{$columns}-end);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
@include grid-columns();
|
|
220
|
+
@each $br, $value in $breakpoints {
|
|
221
|
+
@include breakpoint($br){
|
|
222
|
+
@include grid-columns(#{$br+'-'});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
// #endregion
|
|
226
|
+
|
|
227
|
+
// #region Create rows
|
|
228
|
+
:where([class*="row-"],[class*="rows-"]) {
|
|
229
|
+
grid-row: var(--row-start, auto) / span var(--row-span, 1);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
@include grid-rows();
|
|
234
|
+
@each $br, $value in $breakpoints {
|
|
235
|
+
@include breakpoint($br){
|
|
236
|
+
@include grid-rows(#{$br+'-'});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// #endregion
|
|
240
|
+
|
|
241
|
+
// #region Create the Columns wrappers
|
|
242
|
+
[class*="cols-"]:not(.row) {
|
|
243
|
+
display: grid;
|
|
244
|
+
grid-template-columns: subgrid;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@for $i from 1 to math.floor(math.div($columns,2)) + 1 {
|
|
248
|
+
|
|
249
|
+
$count: math.div($columns,$i);
|
|
250
|
+
|
|
251
|
+
.cols-#{$i} > * {
|
|
252
|
+
grid-column: auto / span #{math.floor($count)};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@each $br, $value in $breakpoints {
|
|
257
|
+
@include breakpoint($br){
|
|
258
|
+
@for $i from 1 to math.floor(math.div($columns,2)) + 1 {
|
|
259
|
+
|
|
260
|
+
$count: math.div($columns,$i);
|
|
261
|
+
|
|
262
|
+
.#{$br}-cols-#{$i} > * {
|
|
263
|
+
grid-column: auto / span #{math.floor($count)};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// #endregion
|
|
269
|
+
|
|
270
|
+
}
|
|
@@ -1,9 +1,66 @@
|
|
|
1
1
|
@use "sass:math";
|
|
2
2
|
@use "../_func" as *;
|
|
3
3
|
|
|
4
|
-
@import "../../bootstrap/scss/_reboot.scss";
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
// Code
|
|
6
|
+
pre,
|
|
7
|
+
code,
|
|
8
|
+
kbd,
|
|
9
|
+
samp {
|
|
10
|
+
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
pre {
|
|
15
|
+
display: block;
|
|
16
|
+
margin-top: 0; // 1
|
|
17
|
+
margin-bottom: 1rem; // 2
|
|
18
|
+
overflow: auto; // 3
|
|
19
|
+
font-size: rem(14);
|
|
20
|
+
color: $pre-color;
|
|
21
|
+
|
|
22
|
+
// Account for some code outputs that place code tags in pre tags
|
|
23
|
+
code {
|
|
24
|
+
font-size: inherit;
|
|
25
|
+
color: inherit;
|
|
26
|
+
word-break: normal;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
code {
|
|
31
|
+
font-size: rem(14);
|
|
32
|
+
color: #d63384;
|
|
33
|
+
word-wrap: break-word;
|
|
34
|
+
|
|
35
|
+
// Streamline the style when inside anchors to avoid broken underline and more
|
|
36
|
+
a > & {
|
|
37
|
+
color: inherit;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
kbd {
|
|
42
|
+
padding: .1875rem .375rem;
|
|
43
|
+
font-size: rem(14);
|
|
44
|
+
|
|
45
|
+
kbd {
|
|
46
|
+
padding: 0;
|
|
47
|
+
font-size: 1rem;
|
|
48
|
+
font-weight: normal;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
*,
|
|
58
|
+
*::before,
|
|
59
|
+
*::after {
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Reset & Defaults */
|
|
7
64
|
html {
|
|
8
65
|
|
|
9
66
|
-webkit-font-smoothing: antialiased; // Fix for Safari/iOS
|
|
@@ -59,6 +116,7 @@ html {
|
|
|
59
116
|
}
|
|
60
117
|
|
|
61
118
|
body {
|
|
119
|
+
margin: 0; // 1
|
|
62
120
|
color-scheme: light dark;
|
|
63
121
|
@include var(background,--colour-canvas);
|
|
64
122
|
@include var(font-family,--font-body);
|
|
@@ -66,8 +124,11 @@ body {
|
|
|
66
124
|
width: 100%;
|
|
67
125
|
line-height: 1.2;
|
|
68
126
|
min-height: 100%;
|
|
127
|
+
-webkit-text-size-adjust: 100%; // 3
|
|
128
|
+
-webkit-tap-highlight-color: rgba($black, 0); // 4
|
|
69
129
|
}
|
|
70
130
|
|
|
131
|
+
|
|
71
132
|
// #region scrollbars
|
|
72
133
|
:is(div,form,fieldset,textarea)::-webkit-scrollbar {
|
|
73
134
|
width: 10px;
|
|
@@ -128,6 +189,14 @@ hr {
|
|
|
128
189
|
}
|
|
129
190
|
}
|
|
130
191
|
|
|
192
|
+
[hidden] {
|
|
193
|
+
display: none !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
form {
|
|
197
|
+
display: contents;
|
|
198
|
+
}
|
|
199
|
+
|
|
131
200
|
input[type="search" i]::-webkit-search-cancel-button {
|
|
132
201
|
|
|
133
202
|
appearance: none;
|
|
@@ -156,50 +225,3 @@ details summary > * {
|
|
|
156
225
|
details {
|
|
157
226
|
width: 100%;
|
|
158
227
|
}
|
|
159
|
-
|
|
160
|
-
// Main grid setup to avoid having to use continaer divs
|
|
161
|
-
|
|
162
|
-
*:not(.row) > main {
|
|
163
|
-
--full-width-start: 0;
|
|
164
|
-
|
|
165
|
-
@include media-breakpoint-up(md) {
|
|
166
|
-
--full-width-start: calc((100% - var(--container-max-width)) / 2);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
display: grid;
|
|
170
|
-
margin-left: auto;
|
|
171
|
-
margin-right: auto;
|
|
172
|
-
width: 100%;
|
|
173
|
-
|
|
174
|
-
grid-template-columns:
|
|
175
|
-
[full-width-start] var(--full-width-start)
|
|
176
|
-
[container-start] var(--padding-inline)
|
|
177
|
-
[content-start] min(
|
|
178
|
-
100% - (var(--padding-inline) * 2),
|
|
179
|
-
calc(var(--container-max-width) - (var(--padding-inline) * 2))
|
|
180
|
-
)
|
|
181
|
-
[content-end]
|
|
182
|
-
var(--padding-inline) [container-end]
|
|
183
|
-
var(--full-width-start) [full-width-end];
|
|
184
|
-
|
|
185
|
-
&:not(:has(.container:last-child)):not(:has(iam-collapsible-side:last-child)){
|
|
186
|
-
padding-bottom: 1rem;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
main > :not(.full-width, .container, iam-header, iam-collapsible-side, [class*="bg-"]) {
|
|
191
|
-
grid-column: content;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
main > :is(.full-width, .container, iam-header) {
|
|
196
|
-
grid-column: container;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
main > :is(.full-width, [class*="bg-"]:has(.container), iam-collapsible-side) {
|
|
200
|
-
grid-column: full-width;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.row > .col {
|
|
204
|
-
min-height: var(--min-height,0);
|
|
205
|
-
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
@use "../func" as *;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
#{$root} {
|
|
4
4
|
|
|
5
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
6
|
+
scroll-behavior: smooth;
|
|
7
|
+
}
|
|
5
8
|
|
|
6
|
-
#{$root} {
|
|
7
9
|
// Print out the $vars array setup in the variables file so they can be used as CSS vars
|
|
8
10
|
// Custom variable values only support SassScript inside `#{}`.
|
|
9
11
|
@each $var, $value in $vars {
|
|
@@ -25,6 +27,18 @@
|
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
@media screen and (min-width: 36em) {
|
|
31
|
+
@each $var, $value in map-get($vars-responsive,"sm") {
|
|
32
|
+
#{'--'+$var}: #{$value};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
@media screen and (min-width: 62em) {
|
|
36
|
+
@each $var, $value in map-get($vars-responsive,"md") {
|
|
37
|
+
#{'--'+$var}: #{$value};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
28
42
|
// Wider colours
|
|
29
43
|
@each $colour, $value in $wider-colours {
|
|
30
44
|
--wider-colour-#{$colour}: #{$value};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import carousel from "../../modules/carousel";
|
|
2
|
+
import {generateThumbnailList,generatePipsHTML,carousel} from "../../modules/carousel";
|
|
3
|
+
import {trackComponent, trackComponentRegistered} from "../_global";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
window.dataLayer = window.dataLayer || [];
|
|
6
|
-
window.dataLayer.push({
|
|
7
|
-
"event": "customElementRegistered",
|
|
8
|
-
"element": "carousel"
|
|
9
|
-
});
|
|
5
|
+
trackComponentRegistered("iam-carousel");
|
|
10
6
|
|
|
11
7
|
class iamCarousel extends HTMLElement {
|
|
12
8
|
|
|
@@ -15,31 +11,37 @@ class iamCarousel extends HTMLElement {
|
|
|
15
11
|
this.attachShadow({ mode: 'open'});
|
|
16
12
|
|
|
17
13
|
const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';
|
|
18
|
-
|
|
19
|
-
const loadCSS = `@import "${assetLocation}/css/components/carousel.css";`;
|
|
14
|
+
|
|
15
|
+
const loadCSS = `@import "${assetLocation}/css/components/carousel.component.css";`;
|
|
20
16
|
|
|
21
17
|
const template = document.createElement('template');
|
|
22
18
|
template.innerHTML = `
|
|
23
19
|
<style>
|
|
24
|
-
@import "${coreCSS}";
|
|
25
20
|
${loadCSS}
|
|
26
21
|
${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
|
|
27
22
|
</style>
|
|
28
|
-
<div class="carousel"
|
|
23
|
+
<div class="carousel" part="carousel">
|
|
29
24
|
<div class="carousel__wrapper">
|
|
30
25
|
<div class="carousel__inner">
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
<div class="carousel__content" part="content">
|
|
27
|
+
<slot></slot>
|
|
28
|
+
</div>
|
|
33
29
|
</div>
|
|
34
30
|
|
|
31
|
+
</div>
|
|
32
|
+
<div class="carousel__btns" part="btns">
|
|
33
|
+
<button class="btn btn-secondary btn-compact fa-plus-large btn-prev" data-go="0" disabled part="prev">Prev</button>
|
|
34
|
+
<button class="btn btn-secondary btn-compact fa-plus-large btn-next" data-go="2" part="next">Next</button>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
35
37
|
<div class="carousel__controls" part="controls">
|
|
36
38
|
|
|
37
39
|
</div>
|
|
38
40
|
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
+
<div class="carousel__progress" part="progress">
|
|
42
|
+
<input type="range" min="0" max="100" value="1" step="1">
|
|
43
|
+
</div>
|
|
41
44
|
|
|
42
|
-
</div>
|
|
43
45
|
</div>
|
|
44
46
|
`;
|
|
45
47
|
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
|
@@ -47,44 +49,49 @@ class iamCarousel extends HTMLElement {
|
|
|
47
49
|
|
|
48
50
|
connectedCallback() {
|
|
49
51
|
|
|
52
|
+
const carouselComponent = this;
|
|
50
53
|
const carouselElement = this.shadowRoot.querySelector('.carousel');
|
|
51
|
-
const row = this.querySelector('.row');
|
|
52
|
-
const thumbnailImages = JSON.parse(this.dataset.thumbnails);
|
|
53
|
-
|
|
54
|
-
const carouselControls = this.shadowRoot.querySelector('.carousel__controls');
|
|
54
|
+
const row = this.shadowRoot.querySelector('.row');
|
|
55
55
|
|
|
56
|
-
let
|
|
56
|
+
let thumbnailImages = [];
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
const carouselControls = this.shadowRoot.querySelector('.carousel__controls');
|
|
59
59
|
|
|
60
|
-
if(this.classList.contains('hide-btns'))
|
|
61
|
-
carouselElement.classList.add('hide-btns');
|
|
62
60
|
|
|
63
|
-
if(this.classList.contains('hide-controls'))
|
|
64
|
-
carouselElement.classList.add('hide-controls');
|
|
65
61
|
|
|
66
|
-
if
|
|
67
|
-
|
|
62
|
+
if(carouselComponent.querySelector('[data-thumbnail]')){
|
|
63
|
+
thumbnailImages = generateThumbnailList(carouselComponent);
|
|
64
|
+
carouselComponent.classList.add('thumbnails');
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
// populate the pips
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
68
|
+
carouselControls.innerHTML = generatePipsHTML(carouselComponent,thumbnailImages);
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Array.from(carouselComponent.querySelectorAll(':scope > div > img:first-child:last-child, :scope > div > picture:first-child:last-child img')).forEach((image, index) => {
|
|
72
|
+
|
|
73
|
+
image.style.inset = "0 0.5rem 0 0.5rem";
|
|
74
|
+
image.style.position = "absolute";
|
|
75
|
+
image.style.width = "calc(100% - 1rem)";
|
|
76
|
+
image.style.height = "100%";
|
|
77
|
+
image.style['object-fit'] = "cover";
|
|
78
|
+
|
|
79
|
+
image.closest('div').classList.add('image__wrapper');
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
carousel(carouselComponent);
|
|
84
|
+
|
|
85
|
+
trackComponent(carouselComponent,"iam-carousel",['pip-clicked','next-clicked','prev-clicked','slider-changed']);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
attributeChangedCallback(attrName, oldVal, newVal) {
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
86
94
|
|
|
87
|
-
carousel(carouselElement,row);
|
|
88
95
|
}
|
|
89
96
|
}
|
|
90
97
|
|