@iamproperty/components 3.4.6 → 3.4.7
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/applied-filters.css +1 -0
- package/assets/css/components/applied-filters.css.map +1 -0
- 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/container.css +1 -1
- package/assets/css/components/container.css.map +1 -1
- package/assets/css/components/dialog.css +1 -0
- package/assets/css/components/dialog.css.map +1 -0
- package/assets/css/components/forms.css +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/nav.css +1 -1
- package/assets/css/components/nav.css.map +1 -1
- package/assets/css/components/pagination.css +1 -0
- package/assets/css/components/pagination.css.map +1 -0
- package/assets/css/components/table.css +1 -0
- package/assets/css/components/table.css.map +1 -0
- 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 +18 -11
- package/assets/js/components/accordion/accordion.component.js +6 -0
- package/assets/js/components/accordion/accordion.component.min.js +3 -3
- package/assets/js/components/accordion/accordion.component.min.js.map +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.js +26 -0
- package/assets/js/components/card/card.component.js +91 -0
- package/assets/js/components/card/card.component.min.js +21 -0
- package/assets/js/components/card/card.component.min.js.map +1 -0
- package/assets/js/components/filterlist/filterlist.component.js +49 -0
- package/assets/js/components/filterlist/filterlist.component.min.js +23 -0
- package/assets/js/components/filterlist/filterlist.component.min.js.map +1 -0
- package/assets/js/components/header/header.component.js +6 -0
- package/assets/js/components/header/header.component.min.js +2 -2
- package/assets/js/components/header/header.component.min.js.map +1 -1
- package/assets/js/components/pagination/pagination.component.js +34 -0
- package/assets/js/components/table/table.component.js +104 -0
- package/assets/js/components/table/table.component.min.js +24 -0
- package/assets/js/components/table/table.component.min.js.map +1 -0
- package/assets/js/components/tabs/tabs.component.js +6 -0
- package/assets/js/components/tabs/tabs.component.min.js +17 -0
- package/assets/js/components/tabs/tabs.component.min.js.map +1 -0
- package/assets/js/dynamic.js +7 -18
- package/assets/js/dynamic.min.js +2 -53
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/flat-components.js +27 -9
- package/assets/js/modules/applied-filters.js +100 -0
- package/assets/js/modules/data-layer.js +45 -0
- package/assets/js/modules/filterlist.js +32 -0
- package/assets/js/modules/helpers.js +77 -49
- package/assets/js/modules/pagination.js +33 -0
- package/assets/js/modules/table.js +507 -420
- package/assets/js/modules/tabs.js +6 -0
- package/assets/js/modules/youtubevideo.js +53 -61
- package/assets/js/scripts.bundle.js +77 -62
- 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/filterlist.spec.js +22 -0
- package/assets/js/tests/pagination.spec.js +15 -0
- package/assets/js/tests/table.spec.js +147 -0
- package/assets/sass/_components.scss +1 -2
- package/assets/sass/_corefiles.scss +5 -4
- package/assets/sass/_functions/utilities.scss +16 -0
- package/assets/sass/_functions/variables.scss +32 -18
- package/assets/sass/_tests/colours.spec.scss +1 -1
- package/assets/sass/components/applied-filters.scss +65 -0
- package/assets/sass/components/card.scss +177 -233
- package/assets/sass/components/charts.scss +4 -0
- package/assets/sass/components/container.scss +7 -2
- package/assets/sass/components/dialog.scss +202 -0
- package/assets/sass/components/forms.scss +37 -5
- package/assets/sass/components/lists.scss +15 -0
- package/assets/sass/components/nav.scss +5 -1
- package/assets/sass/components/pagination.scss +140 -0
- package/assets/sass/components/table.scss +419 -0
- package/assets/sass/foundations/icons.scss +1 -1
- package/assets/sass/{components → foundations}/links.scss +26 -0
- package/assets/sass/foundations/reboot.scss +19 -13
- package/assets/svg/illustrations/table.svg +165 -0
- package/assets/ts/bundle.ts +23 -12
- package/assets/ts/components/accordion/accordion.component.ts +7 -0
- package/assets/ts/components/applied-filters/README.md +5 -0
- package/assets/ts/components/applied-filters/applied-filters.component.ts +33 -0
- package/assets/ts/components/card/README.md +22 -0
- package/assets/ts/components/card/card.component.ts +117 -0
- package/assets/ts/components/filterlist/README.md +17 -0
- package/assets/ts/components/filterlist/filterlist.component.ts +60 -0
- package/assets/ts/components/header/header.component.ts +8 -0
- package/assets/ts/components/pagination/README.md +11 -0
- package/assets/ts/components/pagination/pagination.component.ts +45 -0
- package/assets/ts/components/table/README.md +23 -0
- package/assets/ts/components/table/table.component.ts +128 -0
- package/assets/ts/components/tabs/tabs.component.ts +7 -0
- package/assets/ts/dynamic.ts +12 -19
- package/assets/ts/flat-components.ts +37 -9
- package/assets/ts/modules/applied-filters.ts +146 -0
- package/assets/ts/modules/data-layer.ts +58 -0
- package/assets/ts/modules/filterlist.ts +46 -0
- package/assets/ts/modules/helpers.ts +90 -60
- package/assets/ts/modules/pagination.ts +44 -0
- package/assets/ts/modules/table.ts +598 -433
- package/assets/ts/modules/tabs.ts +8 -1
- package/assets/ts/modules/youtubevideo.ts +58 -63
- package/assets/ts/tests/filterlist.spec.ts +29 -0
- package/assets/ts/tests/pagination.spec.ts +21 -0
- package/assets/ts/tests/table.spec.ts +191 -0
- package/dist/components.es.js +1264 -1296
- package/dist/components.umd.js +70 -65
- package/dist/style.css +1 -1
- package/package.json +7 -5
- package/src/components/AppliedFilters/AppliedFilters.vue +20 -0
- package/src/components/AppliedFilters/README.md +5 -0
- package/src/components/Card/Card.vue +11 -112
- package/src/components/Card/README.md +16 -18
- package/src/components/Carousel/Carousel.vue +49 -10
- package/src/components/Chart/Chart.vue +46 -4
- package/src/components/Filterlist/Filterlist.vue +20 -0
- package/src/components/Filterlist/README.md +17 -0
- package/src/components/Pagination/Pagination.vue +30 -0
- package/src/components/Pagination/README.md +11 -0
- package/src/components/Table/README.md +29 -44
- package/src/components/Table/Table.spec.js +5 -37
- package/src/components/Table/Table.vue +16 -91
- package/src/foundations/YoutubeVideo/YoutubeVideo.vue +1 -1
- package/src/index.js +3 -2
- package/assets/css/components/cardDeck.css +0 -1
- package/assets/css/components/cardDeck.css.map +0 -1
- package/assets/css/components/links.css +0 -1
- package/assets/css/components/links.css.map +0 -1
- package/assets/css/components/modal.css +0 -1
- package/assets/css/components/modal.css.map +0 -1
- package/assets/css/components/tables.css +0 -1
- package/assets/css/components/tables.css.map +0 -1
- package/assets/js/modules/modal.js +0 -69
- package/assets/sass/components/cardDeck.scss +0 -108
- package/assets/sass/components/modal.scss +0 -136
- package/assets/sass/components/tables.scss +0 -291
- package/assets/ts/modules/modal.ts +0 -91
- package/src/components/CardDeck/CardDeck.spec.js +0 -99
- package/src/components/CardDeck/CardDeck.vue +0 -77
- package/src/components/CardDeck/README.md +0 -25
- package/src/components/Modal/Modal.spec.js +0 -22
- package/src/components/Modal/Modal.vue +0 -43
- package/src/components/Modal/README.md +0 -20
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
@use "../_func" as *;
|
|
3
|
-
|
|
4
|
-
.modal {
|
|
5
|
-
display: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.modal:target {
|
|
9
|
-
display: block;
|
|
10
|
-
position: fixed;
|
|
11
|
-
top: 0;
|
|
12
|
-
left: 0;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
background: rgba(0,0,0,0.25);
|
|
16
|
-
z-index: var(--index-overlay);
|
|
17
|
-
border: none;
|
|
18
|
-
overscroll-behavior: contain;
|
|
19
|
-
|
|
20
|
-
> a:first-child {
|
|
21
|
-
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 0;
|
|
24
|
-
left: 0;
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: 100%;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
cursor: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 512 512'%3e%3cg transform='rotate(45 256 256)'%3e%3crect id='r' x='16' y='216' width='480' height='80' rx='14'/%3e%3cuse href='%23r' transform='rotate(90 256 256)'/%3e%3c/g%3e%3c/svg%3e") 8 8, pointer;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
> button {
|
|
32
|
-
display: none;
|
|
33
|
-
|
|
34
|
-
@include media-breakpoint-up(md) {
|
|
35
|
-
display: block;
|
|
36
|
-
position: absolute;
|
|
37
|
-
z-index: var(--index-focus);
|
|
38
|
-
top: 50%;
|
|
39
|
-
transform: translate(0,-50%);
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
text-indent: 300%;
|
|
42
|
-
width: 2rem;
|
|
43
|
-
height: 2rem;
|
|
44
|
-
|
|
45
|
-
&.btn:not(:hover):not(:focus) {
|
|
46
|
-
background-color: white;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.modal__dock--left {
|
|
50
|
-
right: calc(50% + #{rem(math.div(820,2))} + 1rem);
|
|
51
|
-
|
|
52
|
-
&:after {
|
|
53
|
-
transform: rotate(-180deg);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
&.modal__dock--right {
|
|
57
|
-
left: calc(50% + #{rem(math.div(820,2))} + 1rem);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
&.modal--left button.modal__dock--left {
|
|
64
|
-
display: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&.modal--left button.modal__dock--right {
|
|
68
|
-
left: calc(#{rem(640)} + 2rem);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.modal--right button.modal__dock--right {
|
|
72
|
-
display: none;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&.modal--right button.modal__dock--left {
|
|
76
|
-
right: calc(#{rem(640)} + 2rem);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.modal__outer {
|
|
82
|
-
|
|
83
|
-
position: absolute;
|
|
84
|
-
top: 50%;
|
|
85
|
-
left: 50%;
|
|
86
|
-
width: 90%;
|
|
87
|
-
max-width: rem(820);
|
|
88
|
-
height: fit-content;
|
|
89
|
-
max-height: 90%;
|
|
90
|
-
overflow: visible;
|
|
91
|
-
transform: translate(-50%,-50%);
|
|
92
|
-
|
|
93
|
-
> .btn:first-child {
|
|
94
|
-
position: absolute;
|
|
95
|
-
top: 0;
|
|
96
|
-
right: 0;
|
|
97
|
-
margin-top: -0.75rem;
|
|
98
|
-
margin-right: -0.75rem;
|
|
99
|
-
z-index: var(--index-focus);
|
|
100
|
-
|
|
101
|
-
&:not(:hover):not(:focus):not(:active){
|
|
102
|
-
background: white;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
@include media-breakpoint-up(md) {
|
|
106
|
-
.modal--left & {
|
|
107
|
-
left: 1rem;
|
|
108
|
-
transform: translate(0,-50%);
|
|
109
|
-
max-width: 40rem;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.modal--right & {
|
|
113
|
-
left: auto;
|
|
114
|
-
right: 1rem;
|
|
115
|
-
transform: translate(0,-50%);
|
|
116
|
-
max-width: 40rem;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.modal__inner {
|
|
122
|
-
background: white;
|
|
123
|
-
overscroll-behavior: contain;
|
|
124
|
-
height: fit-content;
|
|
125
|
-
max-height: 90vh;
|
|
126
|
-
overflow: auto;
|
|
127
|
-
|
|
128
|
-
& > *:first-child {
|
|
129
|
-
|
|
130
|
-
padding: 1rem;
|
|
131
|
-
@include media-breakpoint-up(sm) {
|
|
132
|
-
|
|
133
|
-
padding: 2rem;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
@use "../_func.scss" as *;
|
|
2
|
-
|
|
3
|
-
// #region Default table
|
|
4
|
-
table {
|
|
5
|
-
--border-width: 2px;
|
|
6
|
-
--inner-border-width: 1px;
|
|
7
|
-
width: 100%;
|
|
8
|
-
font-size: rem(16);
|
|
9
|
-
border: none;
|
|
10
|
-
margin-bottom: rem(32);
|
|
11
|
-
overflow: auto;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
td,th {
|
|
15
|
-
padding: rem(16) rem(32) rem(16) 0;
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
text-align: left;
|
|
18
|
-
vertical-align: top;
|
|
19
|
-
border: none;
|
|
20
|
-
font-size: rem(16);
|
|
21
|
-
line-height: rem(24);
|
|
22
|
-
color: var(--colour-body);
|
|
23
|
-
|
|
24
|
-
&:first-child {
|
|
25
|
-
padding-left: rem(8);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
th {
|
|
30
|
-
font-weight: bold;
|
|
31
|
-
@include var(color,--colour-heading);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
tr {
|
|
35
|
-
border-bottom: var(--inner-border-width) solid currentColor;
|
|
36
|
-
@include var(border-color,--colour-border);
|
|
37
|
-
|
|
38
|
-
&:last-child {
|
|
39
|
-
border-bottom: var(--border-width) solid currentColor;
|
|
40
|
-
@include var(border-color,--colour-border);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
thead {
|
|
45
|
-
tr:first-child {
|
|
46
|
-
border-top: var(--border-width) solid currentColor;
|
|
47
|
-
@include var(border-color,--colour-border);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
th {
|
|
51
|
-
font-size: rem(16);
|
|
52
|
-
line-height: rem(24);
|
|
53
|
-
padding-bottom: rem(24);
|
|
54
|
-
|
|
55
|
-
@include media-breakpoint-up(sm) {
|
|
56
|
-
|
|
57
|
-
font-size: rem(18);
|
|
58
|
-
white-space: nowrap;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
font-weight: bold;
|
|
62
|
-
vertical-align: bottom;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
tbody:first-child{
|
|
67
|
-
tr:first-child {
|
|
68
|
-
border-top: var(--border-width) solid currentColor;
|
|
69
|
-
@include var(border-color,--colour-border);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.table__wrapper.border-0 table,
|
|
74
|
-
table.border-0 {
|
|
75
|
-
|
|
76
|
-
--border-width: 0px;
|
|
77
|
-
--inner-border-width: 0px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// #endregion
|
|
81
|
-
|
|
82
|
-
// #region Table wrapper - Add via JS if needed, provides a safe space to scroll
|
|
83
|
-
.table__wrapper {
|
|
84
|
-
display: block;
|
|
85
|
-
width: calc(100% + 1rem);
|
|
86
|
-
padding-right: 1rem;
|
|
87
|
-
overflow-x: auto;
|
|
88
|
-
-webkit-overflow-scrolling: touch;
|
|
89
|
-
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
|
|
90
|
-
margin-bottom: rem(32);
|
|
91
|
-
|
|
92
|
-
table {
|
|
93
|
-
margin-bottom: 0;
|
|
94
|
-
display: table;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
// #endregion
|
|
99
|
-
|
|
100
|
-
// #region Tables are only stacked on mobile
|
|
101
|
-
@media screen and (max-width: 36em) {
|
|
102
|
-
.table__wrapper:not(.table-fullwidth):not(.client-table) {
|
|
103
|
-
|
|
104
|
-
overflow: hidden;
|
|
105
|
-
|
|
106
|
-
thead {
|
|
107
|
-
display: none;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
tbody {
|
|
111
|
-
display: block;
|
|
112
|
-
border-top: 2px solid currentColor;
|
|
113
|
-
@include var(border-color,--colour-border);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
tr {
|
|
117
|
-
display: block;
|
|
118
|
-
position: relative;
|
|
119
|
-
padding-top: 1rem;
|
|
120
|
-
padding-bottom: 1rem;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
td,
|
|
124
|
-
th {
|
|
125
|
-
display: block;
|
|
126
|
-
padding-right: 0;
|
|
127
|
-
padding-top: 0;
|
|
128
|
-
padding-left: rem(8);
|
|
129
|
-
|
|
130
|
-
&[data-label]:before {
|
|
131
|
-
content: attr(data-label);
|
|
132
|
-
color: var(--colour-heading);
|
|
133
|
-
padding: 0;
|
|
134
|
-
margin-bottom: 0;
|
|
135
|
-
display: block;
|
|
136
|
-
font-weight: bold;
|
|
137
|
-
margin: 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.table-minify tr:not(:hover) {
|
|
142
|
-
td:not(:first-child){
|
|
143
|
-
display: none;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// #endregion
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
// #region Table striped
|
|
152
|
-
.table-striped tbody tr:nth-of-type(odd) {
|
|
153
|
-
|
|
154
|
-
background-color: rgba(0, 0, 0, 0.1);
|
|
155
|
-
|
|
156
|
-
.bg-light & {
|
|
157
|
-
|
|
158
|
-
@include var(background-color,--colour-white);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
// #endregion
|
|
162
|
-
|
|
163
|
-
// #region Table hover
|
|
164
|
-
.table-hover tbody tr {
|
|
165
|
-
&:hover,
|
|
166
|
-
&:focus {
|
|
167
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
// #endregion
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// #region Sortable
|
|
174
|
-
[data-sortable] {
|
|
175
|
-
|
|
176
|
-
cursor: pointer;
|
|
177
|
-
position: relative;
|
|
178
|
-
user-select: none;
|
|
179
|
-
padding-right: 3.5rem;
|
|
180
|
-
|
|
181
|
-
&:hover {
|
|
182
|
-
color: var(--colour-hover);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
[data-sortable]:after {
|
|
186
|
-
|
|
187
|
-
content: "";
|
|
188
|
-
position: absolute;
|
|
189
|
-
top:0;
|
|
190
|
-
right: 0;
|
|
191
|
-
width: 3.5rem;
|
|
192
|
-
height: 4rem;
|
|
193
|
-
display: block;
|
|
194
|
-
mask-image: var(--icon-sort);
|
|
195
|
-
mask-size: 0.6rem 0.8rem;
|
|
196
|
-
mask-repeat: no-repeat;
|
|
197
|
-
mask-position: calc(100% - 1.5rem) calc(50% - 0.25rem);
|
|
198
|
-
|
|
199
|
-
-webkit-mask-image: var(--icon-sort);
|
|
200
|
-
-webkit-mask-size: 0.6rem 0.8rem;
|
|
201
|
-
-webkit-mask-repeat: no-repeat;
|
|
202
|
-
-webkit-mask-position: calc(100% - 1.5rem) calc(50% - 0.25rem);
|
|
203
|
-
background-color: currentColor;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
[data-sortable][aria-sort=ascending]:after {
|
|
207
|
-
--icon-sort: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' preserveAspectRatio='none'%3E%3Cpath d='M51 1l25 23 24 22H1l25-22z'/%3E%3Cpath opacity='.3' d='M51 101l25-23 24-22H1l25 22z'/%3E%3C/svg%3E");
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
[data-sortable][aria-sort=descending]:after {
|
|
211
|
-
--icon-sort: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='101' height='101' preserveAspectRatio='none'%3E%3Cpath opacity='.3' d='M51 1l25 23 24 22H1l25-22z'/%3E%3Cpath d='M51 101l25-23 24-22H1l25 22z'/%3E%3C/svg%3E");
|
|
212
|
-
}
|
|
213
|
-
// #endregion
|
|
214
|
-
|
|
215
|
-
// #region Pagination
|
|
216
|
-
.table__pagination select {
|
|
217
|
-
max-width: rem(240);
|
|
218
|
-
}
|
|
219
|
-
.table__pagination .showing-input-field {
|
|
220
|
-
min-width: 4.5rem;
|
|
221
|
-
}
|
|
222
|
-
.table__pagination .page-number {
|
|
223
|
-
min-width: 7rem;
|
|
224
|
-
}
|
|
225
|
-
// #endregion
|
|
226
|
-
|
|
227
|
-
// #region Reorderable
|
|
228
|
-
.table-order-reset {
|
|
229
|
-
|
|
230
|
-
cursor: pointer;
|
|
231
|
-
position: relative;
|
|
232
|
-
width: 1rem;
|
|
233
|
-
|
|
234
|
-
&:hover {
|
|
235
|
-
color: var(--colour-hover);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
overflow: hidden;
|
|
239
|
-
text-indent: -200%;
|
|
240
|
-
|
|
241
|
-
&:after {
|
|
242
|
-
content: "#";
|
|
243
|
-
position: absolute;
|
|
244
|
-
left: 0.5rem;
|
|
245
|
-
top: 1rem;
|
|
246
|
-
text-indent: 0;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
[data-reorder] tr[draggable] {
|
|
251
|
-
|
|
252
|
-
cursor: move;
|
|
253
|
-
|
|
254
|
-
&:hover,
|
|
255
|
-
&:focus {
|
|
256
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&.tr--dragging {
|
|
260
|
-
background: var(--colour-muted);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&.tr--dropable {
|
|
264
|
-
|
|
265
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// #endregion
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
.note-feed {
|
|
273
|
-
|
|
274
|
-
td:last-child {
|
|
275
|
-
min-width: 20rem;
|
|
276
|
-
|
|
277
|
-
/*
|
|
278
|
-
display: -webkit-box;
|
|
279
|
-
-webkit-line-clamp: 5;
|
|
280
|
-
-webkit-box-orient: vertical;
|
|
281
|
-
overflow: hidden;
|
|
282
|
-
padding-bottom: 0;
|
|
283
|
-
margin-bottom: 1rem;
|
|
284
|
-
|
|
285
|
-
&:hover {
|
|
286
|
-
|
|
287
|
-
-webkit-line-clamp: inherit;
|
|
288
|
-
}
|
|
289
|
-
*/
|
|
290
|
-
}
|
|
291
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
const modal = (element) => {
|
|
3
|
-
|
|
4
|
-
const links = element.querySelectorAll('.modal__outer a, .modal__outer button');
|
|
5
|
-
const firstLink = links[0]
|
|
6
|
-
const lastLink = links[links.length - 1]
|
|
7
|
-
const modalID = element.getAttribute('id');
|
|
8
|
-
|
|
9
|
-
const closeModal = function(){
|
|
10
|
-
const button = document.querySelector('[href="'+window.location.hash+'"]');
|
|
11
|
-
button.focus();
|
|
12
|
-
window.location.hash = "close";
|
|
13
|
-
history.replaceState("", document.title, window.location.pathname + window.location.search);
|
|
14
|
-
|
|
15
|
-
// If there is more than one video lets make sure there is only one playing at a time.
|
|
16
|
-
if(typeof window.player != "undefined" && typeof window.player.pauseVideo == "function")
|
|
17
|
-
window.player.pauseVideo();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Trap the tab focus inside
|
|
21
|
-
element.addEventListener('keydown', function(e){
|
|
22
|
-
|
|
23
|
-
if(e.key === "Tab" && e.shiftKey && document.activeElement == firstLink){
|
|
24
|
-
|
|
25
|
-
e.preventDefault();
|
|
26
|
-
lastLink.focus();
|
|
27
|
-
}
|
|
28
|
-
else if(e.key === "Tab" && !e.shiftKey && document.activeElement == lastLink) {
|
|
29
|
-
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
firstLink.focus();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// ESC will close the open modal
|
|
36
|
-
document.addEventListener("keydown", function(e){
|
|
37
|
-
if (e.key === "Escape" && document.querySelector('.modal:target'))
|
|
38
|
-
closeModal();
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
element.addEventListener('click', function(e){
|
|
42
|
-
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
43
|
-
|
|
44
|
-
// Close links will close the model by default but we want to remove the hash link also
|
|
45
|
-
if (target.matches('[href="#close"]')) {
|
|
46
|
-
|
|
47
|
-
e.preventDefault();
|
|
48
|
-
closeModal();
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
// Dock the modal to the right or left to make the content behind readable
|
|
52
|
-
else if (target.matches('.modal__dock--right')) {
|
|
53
|
-
|
|
54
|
-
e.preventDefault();
|
|
55
|
-
if(!element.classList.contains('modal--left'))
|
|
56
|
-
element.classList.add('modal--right');
|
|
57
|
-
|
|
58
|
-
element.classList.remove('modal--left');
|
|
59
|
-
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
else if (target.matches('.modal__dock--left')) {
|
|
63
|
-
|
|
64
|
-
e.preventDefault();
|
|
65
|
-
|
|
66
|
-
if(!element.classList.contains('modal--right'))
|
|
67
|
-
element.classList.add('modal--left');
|
|
68
|
-
|
|
69
|
-
element.classList.remove('modal--right');
|
|
70
|
-
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
function locationHashChanged() {
|
|
77
|
-
if (location.hash === '#'+modalID) {
|
|
78
|
-
console.log("Modal is now open");
|
|
79
|
-
const videoButton = document.querySelector('.modal:target .modal__inner > .youtube-embed:first-child:last-child a');
|
|
80
|
-
|
|
81
|
-
console.log(videoButton)
|
|
82
|
-
if (videoButton){
|
|
83
|
-
videoButton.click();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
window.onhashchange = locationHashChanged;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export default modal
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils'
|
|
2
|
-
import CardDeck from './/CardDeck.vue'
|
|
3
|
-
import Card from '../../components/Card/Card.vue'
|
|
4
|
-
|
|
5
|
-
describe('Card Deck component', () => {
|
|
6
|
-
|
|
7
|
-
const test = mount(CardDeck, {
|
|
8
|
-
propsData: {
|
|
9
|
-
items: [
|
|
10
|
-
{
|
|
11
|
-
link: '/components/card-deck',
|
|
12
|
-
title: 'Card 1',
|
|
13
|
-
content: `<p>It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages..</p>`
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
link: '/components/card-deck',
|
|
17
|
-
title: 'Card 2',
|
|
18
|
-
content: `<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec efficitur, tortor eu faucibus facilisis, felis libero blandit dolor.</p>`
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
link: '/components/card-deck',
|
|
22
|
-
title: 'Card 3',
|
|
23
|
-
content: `<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec efficitur, tortor eu faucibus facilisis, felis libero blandit dolor.</p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec efficitur.</p>`
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
slots: {
|
|
28
|
-
default: '<p>Hello</p>',
|
|
29
|
-
after: '<p>Hello 2</p>'
|
|
30
|
-
}
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
it('renders the content before the card deck', () => {
|
|
34
|
-
expect(test.html()).toContain('<p>Hello</p>')
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
it('renders the content after the card deck', () => {
|
|
38
|
-
expect(test.html()).toContain('<p>Hello 2</p>')
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('renders the card title', () => {
|
|
42
|
-
expect(test.html()).toContain('<span class="card-title d-block h4">Card 1</span>')
|
|
43
|
-
expect(test.html()).toContain('<span class="card-title d-block h4">Card 2</span>')
|
|
44
|
-
expect(test.html()).toContain('<span class="card-title d-block h4">Card 3</span>')
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
it('renders the correct number of cards', () => {
|
|
48
|
-
|
|
49
|
-
expect(test.findAll('.card').length).toBe(3)
|
|
50
|
-
})
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
describe('Property Card component', () => {
|
|
55
|
-
|
|
56
|
-
const test = mount(CardDeck, {
|
|
57
|
-
propsData: {
|
|
58
|
-
items: [
|
|
59
|
-
{
|
|
60
|
-
link: '/components/card-deck',
|
|
61
|
-
content: `<p>Reservation fee applies</p>`,
|
|
62
|
-
image: 'house.jpg',
|
|
63
|
-
title: '4 bed semi-detached',
|
|
64
|
-
subtitle: 'Burt terrace, Newcastle upon tyne',
|
|
65
|
-
details: {
|
|
66
|
-
tags: ['Modern method','Freehold'],
|
|
67
|
-
guideprice: '£90,000.00',
|
|
68
|
-
auctiontime: '19 days',
|
|
69
|
-
status: 'Live now',
|
|
70
|
-
images: 5,
|
|
71
|
-
videos: 2,
|
|
72
|
-
logo: 'logo.jpg'
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
it('renders the property card title', () => {
|
|
81
|
-
expect(test.html()).toContain('<span class="card-title d-block h4">4 bed semi-detached <span class="d-block fw-normal font-body text-body small">Burt terrace, Newcastle upon tyne</span></span>')
|
|
82
|
-
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
it('renders the card image', () => {
|
|
86
|
-
|
|
87
|
-
expect(test.html()).toContain('<img src="house.jpg" alt="" loading="lazy" class="card-image">')
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
it('renders the card logo', () => {
|
|
91
|
-
|
|
92
|
-
expect(test.html()).toContain('<img src="logo.jpg" alt="" loading="lazy" class="card-logo">')
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
it('renders the card tags', () => {
|
|
96
|
-
|
|
97
|
-
expect(test.html()).toContain('<span class="badge rounded-pill py-2 px-3 mb-3 me-2 bg-secondary text-primary">Modern method</span>')
|
|
98
|
-
})
|
|
99
|
-
})
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="container card-deck prevent-invert" :data-card-type="cardtype">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
<div :class="`row row-cols-${cols} row-cols-sm-${smcols} row-cols-md-${mdcols} ${gap ? `g-${gap}`: ``}`">
|
|
5
|
-
<div class="col" v-for="(value,index) in items" :key="index">
|
|
6
|
-
<Card v-bind="value" :class="cardclass" :type="cardtype" :btntype="(value.btntype ? value.btntype : btntype )" :titleclass="(value.titleclass ? value.titleclass : titleclass)" :ctatext="value.ctatext" :hidectatext="hidectatext"></Card>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<slot name="after"></slot>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<style lang="scss">
|
|
14
|
-
@import "../../../assets/sass/components/cardDeck.scss";
|
|
15
|
-
</style>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import Card from '../Card/Card.vue'
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
components: {
|
|
22
|
-
Card
|
|
23
|
-
},
|
|
24
|
-
name: 'CardDeck',
|
|
25
|
-
props: {
|
|
26
|
-
items: {
|
|
27
|
-
type: Array,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
cols: {
|
|
31
|
-
type: Number,
|
|
32
|
-
required: false,
|
|
33
|
-
default: 1
|
|
34
|
-
},
|
|
35
|
-
smcols: {
|
|
36
|
-
type: Number,
|
|
37
|
-
required: false,
|
|
38
|
-
default: 1
|
|
39
|
-
},
|
|
40
|
-
mdcols: {
|
|
41
|
-
type: Number,
|
|
42
|
-
required: false,
|
|
43
|
-
default: 3
|
|
44
|
-
},
|
|
45
|
-
gap: {
|
|
46
|
-
type: Number,
|
|
47
|
-
required: false,
|
|
48
|
-
default: 4
|
|
49
|
-
},
|
|
50
|
-
cardtype: {
|
|
51
|
-
type: String,
|
|
52
|
-
required: false
|
|
53
|
-
},
|
|
54
|
-
cardclass: {
|
|
55
|
-
type: String,
|
|
56
|
-
required: false
|
|
57
|
-
},
|
|
58
|
-
btntype: {
|
|
59
|
-
type: String,
|
|
60
|
-
required: false
|
|
61
|
-
},
|
|
62
|
-
titleclass: {
|
|
63
|
-
type: String,
|
|
64
|
-
required: false
|
|
65
|
-
},
|
|
66
|
-
ctatext: {
|
|
67
|
-
type: String,
|
|
68
|
-
required: false
|
|
69
|
-
},
|
|
70
|
-
hidectatext: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
required: false,
|
|
73
|
-
default: false
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
</script>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
### Usage
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
<CardDeck :items="items"></CardDeck>
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
### Properties
|
|
8
|
-
|
|
9
|
-
| Option | Type | Default Value | Description |
|
|
10
|
-
| ------ | ---- | ------------- | ----------- |
|
|
11
|
-
| cols | Number | 1 | Number of columns on mobile |
|
|
12
|
-
| smcols | Number | 1 | Number of columns on tablet |
|
|
13
|
-
| mdcols | Number | 3 | Number of columns on desktop |
|
|
14
|
-
| items | Array | - | Card data passed (See card component) |
|
|
15
|
-
| cardtype | String | - | Change the type of card (simple,quick) |
|
|
16
|
-
| btntype | String | (See card) | Change the type of button at the bottom of the card (primary,secondary,tertairy, link) |
|
|
17
|
-
| ctatext | String | (See card) | Update the cta text within the button at the bottom of the card |
|
|
18
|
-
| titleclass | String | (See card) | Update the class of the title from being a h2 |
|
|
19
|
-
|
|
20
|
-
### Slots
|
|
21
|
-
|
|
22
|
-
| Option | Default Value | Description |
|
|
23
|
-
| ------ | ------------- | ----------- |
|
|
24
|
-
| default | - | Will display before the cards |
|
|
25
|
-
| after | - | Will display underneath the cards |
|