@iamproperty/components 5.6.0 → 5.6.1-beta2
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/collapsible-side.css +1 -1
- package/assets/css/components/collapsible-side.css.map +1 -1
- package/assets/css/components/inline-edit.preload.css +1 -1
- package/assets/css/components/inline-edit.preload.css.map +1 -1
- package/assets/css/components/multiselect.css +1 -1
- package/assets/css/components/multiselect.css.map +1 -1
- package/assets/css/components/tabs.css +1 -1
- package/assets/css/components/tabs.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/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +3 -3
- package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.js +14 -10
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +14 -14
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js.map +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +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/inline-edit/inline-edit.component.js +8 -0
- package/assets/js/components/inline-edit/inline-edit.component.min.js +4 -4
- package/assets/js/components/inline-edit/inline-edit.component.min.js.map +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +2 -2
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +2 -2
- package/assets/js/dynamic.min.js +4 -4
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/modules/dialogs.js +9 -4
- package/assets/js/scripts.bundle.js +10 -10
- 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/sass/_components.scss +7 -0
- package/assets/sass/_functions/variables.scss +1 -1
- package/assets/sass/components/collapsible-side.scss +56 -48
- package/assets/sass/components/inline-edit.preload.scss +57 -3
- package/assets/sass/components/multiselect.scss +1 -1
- package/assets/sass/components/tabs.scss +1 -6
- package/assets/sass/elements/buttons.scss +1 -1
- package/assets/sass/elements/dialog.scss +29 -1
- package/assets/sass/elements/forms.scss +4 -1
- package/assets/sass/foundations/reboot.scss +3 -3
- package/assets/sass/foundations/root.scss +2 -2
- package/assets/ts/components/collapsible-side/collapsible-side.component.ts +17 -11
- package/assets/ts/components/inline-edit/inline-edit.component.ts +12 -1
- package/assets/ts/modules/dialogs.ts +12 -4
- package/dist/components.es.js +21 -21
- package/dist/components.umd.js +24 -24
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:host {
|
|
4
4
|
--colour-border: #e9e9e9;
|
|
5
5
|
--side-link-hover: var(--colour-canvas-2);
|
|
6
|
+
grid-column: full-width;
|
|
6
7
|
|
|
7
8
|
@include light-mode() {
|
|
8
9
|
|
|
@@ -13,9 +14,14 @@
|
|
|
13
14
|
min-height: calc(100vh - var(--nav-height));
|
|
14
15
|
padding-top: 0!important;
|
|
15
16
|
margin-inline: auto;
|
|
16
|
-
|
|
17
|
+
width: 100%;
|
|
17
18
|
overflow: hidden;
|
|
18
19
|
position: relative;
|
|
20
|
+
|
|
21
|
+
@include media-breakpoint-up(md) {
|
|
22
|
+
max-height: calc(100vh - var(--nav-height));
|
|
23
|
+
overflow: auto;
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
.container {
|
|
@@ -28,8 +34,7 @@
|
|
|
28
34
|
@include media-breakpoint-up(md) {
|
|
29
35
|
|
|
30
36
|
padding-left: 5.25rem!important;
|
|
31
|
-
|
|
32
|
-
}
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
// #region Side menu
|
|
@@ -40,7 +45,7 @@
|
|
|
40
45
|
height: 100%;
|
|
41
46
|
min-height: calc(100vh - var(--nav-height));
|
|
42
47
|
width: rem(30);
|
|
43
|
-
height: 100
|
|
48
|
+
height: calc(100% - var(--nav-height));
|
|
44
49
|
background-color: var(--colour-canvas);
|
|
45
50
|
transition: width 1s;
|
|
46
51
|
|
|
@@ -61,25 +66,13 @@
|
|
|
61
66
|
|
|
62
67
|
@include media-breakpoint-up(md) {
|
|
63
68
|
|
|
64
|
-
left:
|
|
69
|
+
left: rem(84);
|
|
65
70
|
margin-left: #{rem(-84)};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
content: "";
|
|
69
|
-
position: absolute;
|
|
70
|
-
top: 0;
|
|
71
|
-
height: 100%;
|
|
72
|
-
border-right: 2px solid var(--colour-border);
|
|
73
|
-
left: 0;
|
|
74
|
-
opacity: 1;
|
|
75
|
-
transition: all 1s;
|
|
76
|
-
//margin-left: rem(-260);
|
|
77
|
-
width: rem(40);
|
|
78
|
-
background: var(--colour-canvas);
|
|
79
|
-
}
|
|
71
|
+
position: fixed;
|
|
72
|
+
top: var(--nav-height);
|
|
80
73
|
|
|
81
74
|
&:not(.open).hover {
|
|
82
|
-
width: rem(
|
|
75
|
+
width: rem(304);
|
|
83
76
|
|
|
84
77
|
.btn[class*=fa-]:before {
|
|
85
78
|
content: "\f023" !important;
|
|
@@ -88,6 +81,7 @@
|
|
|
88
81
|
}
|
|
89
82
|
|
|
90
83
|
.btn {
|
|
84
|
+
display: var(--btn-display, block);
|
|
91
85
|
position: absolute;
|
|
92
86
|
top: rem(32);
|
|
93
87
|
right: 0;
|
|
@@ -96,7 +90,8 @@
|
|
|
96
90
|
background-color: var(--colour-canvas-2);
|
|
97
91
|
border: 2px solid var(--colour-border);
|
|
98
92
|
z-index: 99;
|
|
99
|
-
|
|
93
|
+
color: var(--colour-primary-theme);
|
|
94
|
+
|
|
100
95
|
&[aria-expanded]{
|
|
101
96
|
// Change icon
|
|
102
97
|
&[class*=fa-]:before {
|
|
@@ -105,15 +100,20 @@
|
|
|
105
100
|
|
|
106
101
|
@include media-breakpoint-up(md) {
|
|
107
102
|
opacity: 0;
|
|
108
|
-
transition: opacity 0.5s;
|
|
109
|
-
|
|
110
|
-
&:is(:hover,:focus,:active) {
|
|
111
|
-
opacity: 1;
|
|
112
|
-
}
|
|
113
103
|
}
|
|
114
104
|
}
|
|
115
105
|
}
|
|
116
106
|
|
|
107
|
+
&:is(:hover,:focus-within,:active) .btn {
|
|
108
|
+
|
|
109
|
+
border: 2px solid var(--colour-border);
|
|
110
|
+
color: var(--colour-primary-theme);
|
|
111
|
+
|
|
112
|
+
@include media-breakpoint-up(md) {
|
|
113
|
+
opacity: 1;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
117
|
&:is(.open) {
|
|
118
118
|
|
|
119
119
|
width: calc(100% - var(--container-padding-x));
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
@include media-breakpoint-up(md) {
|
|
126
126
|
|
|
127
|
-
width: rem(
|
|
127
|
+
width: rem(304);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -142,9 +142,6 @@
|
|
|
142
142
|
overflow: auto;
|
|
143
143
|
max-height: 100%;
|
|
144
144
|
|
|
145
|
-
&.closed {
|
|
146
|
-
}
|
|
147
|
-
|
|
148
145
|
.h3 {
|
|
149
146
|
padding-left: rem(24);
|
|
150
147
|
}
|
|
@@ -161,6 +158,9 @@
|
|
|
161
158
|
|
|
162
159
|
width: rem(304);
|
|
163
160
|
|
|
161
|
+
.h3{
|
|
162
|
+
padding-left: var(--container-padding-x-md);
|
|
163
|
+
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
padding-left: rem(24);
|
|
187
187
|
|
|
188
188
|
@include media-breakpoint-up(sm) {
|
|
189
|
-
padding-left:
|
|
189
|
+
padding-left: var(--container-padding-x-md);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -215,24 +215,15 @@
|
|
|
215
215
|
padding-left: rem(40)!important;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
@include media-breakpoint-up(sm) {
|
|
219
|
+
padding-left: var(--container-padding-x-md)!important;
|
|
220
|
+
}
|
|
218
221
|
&:after {
|
|
219
222
|
display: none;
|
|
220
223
|
}
|
|
221
224
|
|
|
222
225
|
|
|
223
226
|
border-right: 2px solid var(--colour-border)!important;
|
|
224
|
-
/*
|
|
225
|
-
&:before {
|
|
226
|
-
content: "";
|
|
227
|
-
position: absolute;
|
|
228
|
-
top: 0;
|
|
229
|
-
right: 0;
|
|
230
|
-
height: calc(100%);
|
|
231
|
-
margin-top: 0;
|
|
232
|
-
width: 2px;
|
|
233
|
-
background-color: var(--colour-border);
|
|
234
|
-
}
|
|
235
|
-
*/
|
|
236
227
|
}
|
|
237
228
|
|
|
238
229
|
::slotted(a[slot="menu"]:where(:hover,:focus,[aria-expanded])) {
|
|
@@ -317,13 +308,30 @@
|
|
|
317
308
|
|
|
318
309
|
@include media-breakpoint-up(md) {
|
|
319
310
|
|
|
320
|
-
.side-menu.open + .main-content {
|
|
321
|
-
|
|
322
|
-
padding-left: rem(300);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
311
|
::slotted(.main-content__title){
|
|
326
312
|
display: none;
|
|
327
313
|
}
|
|
328
314
|
}
|
|
315
|
+
|
|
329
316
|
// #endregion
|
|
317
|
+
|
|
318
|
+
// #region Desktop open state
|
|
319
|
+
@include media-breakpoint-up(md) {
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
.container:has(.side-menu.open) {
|
|
323
|
+
padding-left: 2rem!important;
|
|
324
|
+
margin-left: max(19rem, calc(50% - calc(var(--container-max-width) / 2)));
|
|
325
|
+
margin-right: 0;
|
|
326
|
+
max-width: min(var(--container-max-width), 100% - 19rem);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// #endregion
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
@include media-breakpoint-up(md) {
|
|
333
|
+
|
|
334
|
+
:host([open-always]){
|
|
335
|
+
--btn-display: none;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
@@ -14,8 +14,8 @@ iam-inline-edit {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
iam-inline-edit:focus-within {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
position: relative;
|
|
18
|
+
z-index: 99;
|
|
19
19
|
--display-status: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -95,4 +95,58 @@ iam-inline-edit.was-validated label:has(:is(input:not([type=radio]):not([type=ch
|
|
|
95
95
|
border-radius: 0.5rem;
|
|
96
96
|
margin: 0 0 -1rem 0;
|
|
97
97
|
outline: var(--contrast-outline-width, 0px) solid var(--colour-primary);
|
|
98
|
-
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
// #region preview element
|
|
102
|
+
|
|
103
|
+
iam-inline-edit:has(.preview) {
|
|
104
|
+
|
|
105
|
+
position: relative;
|
|
106
|
+
|
|
107
|
+
label {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
margin-top: -0.75rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.preview {
|
|
113
|
+
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: 0;
|
|
116
|
+
left: 0;
|
|
117
|
+
width: 100%;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
padding: 0.75rem;
|
|
120
|
+
margin-top: -0.75rem;
|
|
121
|
+
margin-left: -0.75rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.preview:empty {
|
|
125
|
+
&:before {
|
|
126
|
+
content: attr(data-placeholder);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&:hover, &:focus {
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
.preview {
|
|
134
|
+
|
|
135
|
+
border: none;
|
|
136
|
+
background: var(--colour-light);
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:focus-within {
|
|
142
|
+
label {
|
|
143
|
+
opacity: 1;
|
|
144
|
+
}
|
|
145
|
+
.preview {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
// #endregion
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
top: 0;
|
|
17
17
|
bottom: 1px;
|
|
18
18
|
width: 2.5rem;
|
|
19
|
-
background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,1));
|
|
19
|
+
background: var(--tabs-gradient, linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,1)));
|
|
20
20
|
z-index: 1000;
|
|
21
21
|
pointer-events: none;
|
|
22
22
|
}
|
|
@@ -33,11 +33,6 @@
|
|
|
33
33
|
clear: both;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
@media screen and (prefers-color-scheme: dark) {
|
|
37
|
-
&:before {
|
|
38
|
-
background: linear-gradient(90deg, rgba(38,38,38,0), rgba(38,38,38,1));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
36
|
}
|
|
42
37
|
}
|
|
43
38
|
|
|
@@ -280,7 +280,7 @@ a:is(:hover, :focus, .hover, :active, .active):not([disabled]) .btn-secondary,
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
&.btn-secondary:is(:hover, :focus, .hover, :active, .active, [aria-expanded], :focus-within):not([disabled]) {
|
|
283
|
+
&.btn-secondary:is(:hover, :focus, .hover, :active, .active, [aria-expanded], :focus-within):not([disabled]):not(.btn-collapse) {
|
|
284
284
|
background-color: var(--colour);
|
|
285
285
|
color: var(--colour-primary-theme);
|
|
286
286
|
border-color: transparent!important;
|
|
@@ -527,6 +527,15 @@ dialog::backdrop {
|
|
|
527
527
|
margin-bottom: calc(var(--btn-margin) - 0.25rem);
|
|
528
528
|
|
|
529
529
|
|
|
530
|
+
&:has(dialog[open]) > button {
|
|
531
|
+
background: var(--colour-btn-secondary-bg-hover);
|
|
532
|
+
color: var(--colour-btn-secondary-hover);
|
|
533
|
+
filter: brightness(85%);
|
|
534
|
+
transition: background 0.1s, color 0.1s;
|
|
535
|
+
//color: var(--colour-btn);
|
|
536
|
+
border-radius: 1.5rem;
|
|
537
|
+
}
|
|
538
|
+
|
|
530
539
|
> .btn:first-child {
|
|
531
540
|
|
|
532
541
|
margin-bottom: 0.25rem;
|
|
@@ -749,4 +758,23 @@ dialog::backdrop {
|
|
|
749
758
|
}
|
|
750
759
|
}
|
|
751
760
|
}
|
|
752
|
-
// #endregion
|
|
761
|
+
// #endregion
|
|
762
|
+
|
|
763
|
+
// #region admin panel dialog
|
|
764
|
+
dialog:has(> .admin-panel) {
|
|
765
|
+
|
|
766
|
+
.dialog__close {
|
|
767
|
+
margin-top: -0.8rem;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
dialog > .admin-panel {
|
|
771
|
+
margin: -1rem calc(var(--dialog-padding) * -1) calc(var(--dialog-padding) * -1) calc(var(--dialog-padding) * -1)!important;
|
|
772
|
+
padding-top: 0;
|
|
773
|
+
|
|
774
|
+
&:last-child {
|
|
775
|
+
|
|
776
|
+
margin-bottom: calc(var(--dialog-padding) * -1);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// #endregion
|
|
@@ -50,6 +50,10 @@ $icon-tick: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' view
|
|
|
50
50
|
min-height: calc(var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + var(--input-lh, #{rem(20)}) + 4px);
|
|
51
51
|
max-height: calc(var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + var(--input-lh, #{rem(20)}) + 4px);
|
|
52
52
|
|
|
53
|
+
&:is(textarea) {
|
|
54
|
+
max-height: 100%
|
|
55
|
+
}
|
|
56
|
+
|
|
53
57
|
// Customize the `:focus` state to imitate native WebKit styles.
|
|
54
58
|
&:is(:focus,.focus):not(:disabled) {
|
|
55
59
|
border-color: var(--colour-info);
|
|
@@ -80,7 +84,6 @@ $icon-tick: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' view
|
|
|
80
84
|
|
|
81
85
|
textarea {
|
|
82
86
|
min-height: calc(var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + (var(--input-lh, #{rem(20)}) * 3) + 4px)!important;
|
|
83
|
-
max-height: calc(var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + (var(--input-lh, #{rem(20)}) * 3) + 4px)!important;
|
|
84
87
|
}
|
|
85
88
|
// #endregion
|
|
86
89
|
|
|
@@ -182,12 +182,12 @@ details {
|
|
|
182
182
|
var(--padding-inline) [container-end]
|
|
183
183
|
var(--full-width-start) [full-width-end];
|
|
184
184
|
|
|
185
|
-
&:not(:has(.container:last-child)){
|
|
185
|
+
&:not(:has(.container:last-child)):not(:has(iam-collapsible-side:last-child)){
|
|
186
186
|
padding-bottom: 1rem;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
main > :not(.full-width, .container, iam-header, [class*="bg-"]) {
|
|
190
|
+
main > :not(.full-width, .container, iam-header, iam-collapsible-side, [class*="bg-"]) {
|
|
191
191
|
grid-column: content;
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -196,7 +196,7 @@ main > :is(.full-width, .container, iam-header) {
|
|
|
196
196
|
grid-column: container;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
main > :is(.full-width, [class*="bg-"]) {
|
|
199
|
+
main > :is(.full-width, [class*="bg-"], iam-collapsible-side) {
|
|
200
200
|
grid-column: full-width;
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -97,7 +97,7 @@ $root: ':root'!default;
|
|
|
97
97
|
@include light-mode() {
|
|
98
98
|
|
|
99
99
|
// Reset the colours of lighter backgrounds to make sure they aren't over written by dark mode. Some other tweaks to colours are applied
|
|
100
|
-
[class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.bg-white):not(.bg-admin):not(.bg-canvas):not(.bg-canvas-2):not(.invert-colours) {
|
|
100
|
+
html:not(.dark-theme) [class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.bg-white):not(.bg-admin):not(.bg-canvas):not(.bg-canvas-2):not(.invert-colours) {
|
|
101
101
|
|
|
102
102
|
@each $color, $value in $theme-colors {
|
|
103
103
|
--colour-#{$color}: #{$value};
|
|
@@ -120,7 +120,7 @@ $root: ':root'!default;
|
|
|
120
120
|
@include dark-mode() {
|
|
121
121
|
|
|
122
122
|
// Reset the colours of lighter backgrounds to make sure they aren't over written by dark mode. Some other tweaks to colours are applied
|
|
123
|
-
[class*="bg-"]:not(.bg-canvas):not(.bg-canvas-2) {
|
|
123
|
+
[class*="bg-"]:not(.bg-canvas):not(.bg-canvas-2):not(.bg-light) {
|
|
124
124
|
|
|
125
125
|
@include reset-colours();
|
|
126
126
|
--colour-body: #{$primary};
|
|
@@ -24,20 +24,20 @@ class iamCollapsibleSideMenu extends HTMLElement {
|
|
|
24
24
|
${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
|
|
25
25
|
</style>
|
|
26
26
|
<link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">
|
|
27
|
-
|
|
27
|
+
<div class="container" part="container">
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
<div class="side-menu">
|
|
30
|
+
<button class="btn btn-compact fa-chevron-right btn-secondary btn-sm btn-collapse">Open or close Collapsible menu</button>
|
|
31
|
+
<div class="side-menu-content closed">
|
|
32
|
+
<slot name="menu"></slot>
|
|
33
|
+
</div>
|
|
33
34
|
</div>
|
|
34
|
-
</div>
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
<div class="main-content">
|
|
37
|
+
<slot></slot>
|
|
38
|
+
</div>
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
</div>
|
|
41
41
|
`;
|
|
42
42
|
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
|
43
43
|
}
|
|
@@ -65,7 +65,13 @@ class iamCollapsibleSideMenu extends HTMLElement {
|
|
|
65
65
|
this.querySelector(':scope > :is(h1,h2,h3,h4,h5,h6)').classList.add('h4');
|
|
66
66
|
this.querySelector(':scope > :is(h1,h2,h3,h4,h5,h6)').classList.add('main-content__title');
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
if(this.hasAttribute('open')){
|
|
71
|
+
sideMenu.classList.add('open');
|
|
72
|
+
button.setAttribute('aria-expanded', true);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
// Open the menu
|
|
70
76
|
button.addEventListener('click', (event) => {
|
|
71
77
|
|
|
@@ -47,6 +47,7 @@ class iamInlineEdit extends HTMLElement {
|
|
|
47
47
|
|
|
48
48
|
let label = this.querySelector('label');
|
|
49
49
|
let input = this.querySelector('input, textarea, select');
|
|
50
|
+
let preview = this.querySelector('.preview');
|
|
50
51
|
|
|
51
52
|
let statusSaving = this.shadowRoot.querySelector('#saving');
|
|
52
53
|
let statusSaved = this.shadowRoot.querySelector('#saved');
|
|
@@ -92,8 +93,14 @@ class iamInlineEdit extends HTMLElement {
|
|
|
92
93
|
input.blur();
|
|
93
94
|
inlineEdit.blur();
|
|
94
95
|
|
|
95
|
-
|
|
96
96
|
statusSaving.classList.remove('d-none');
|
|
97
|
+
|
|
98
|
+
if(preview){
|
|
99
|
+
|
|
100
|
+
console.log(input.value)
|
|
101
|
+
|
|
102
|
+
preview.innerHTML = input.value;
|
|
103
|
+
}
|
|
97
104
|
});
|
|
98
105
|
|
|
99
106
|
// Save
|
|
@@ -174,6 +181,10 @@ class iamInlineEdit extends HTMLElement {
|
|
|
174
181
|
inlineEdit.dispatchEvent(saveEvent);
|
|
175
182
|
|
|
176
183
|
statusSaving.classList.remove('d-none');
|
|
184
|
+
|
|
185
|
+
if(preview){
|
|
186
|
+
preview.innerHTML = input.value;
|
|
187
|
+
}
|
|
177
188
|
}
|
|
178
189
|
else if(!inlineEdit.querySelector('.inline-feedback')){
|
|
179
190
|
statusNotSaved.classList.remove('d-none');
|
|
@@ -130,12 +130,20 @@ const extendDialogs = (body) => {
|
|
|
130
130
|
event.stopPropagation();
|
|
131
131
|
|
|
132
132
|
let btn = event.target.closest('.dialog__wrapper > button');
|
|
133
|
-
let parent =
|
|
133
|
+
let parent = btn.parentNode;
|
|
134
134
|
let dataEvent = "openPopover"
|
|
135
135
|
let popover = parent.querySelector(':scope > dialog');
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
|
|
138
|
+
// close open dialogs
|
|
139
|
+
if(document.querySelector('*:not([data-keep-open]) > dialog[open]') && document.querySelector('*:not([data-keep-open]) > dialog[open]') != popover){
|
|
140
|
+
|
|
141
|
+
// Check that the ope dialog isn't a parent of the dialog being opened
|
|
142
|
+
if(btn.closest('dialog[open]') != document.querySelector('*:not([data-keep-open]) > dialog[open]')){
|
|
143
|
+
document.querySelector('*:not([data-keep-open]) > dialog[open]').close();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
139
147
|
|
|
140
148
|
// Remove active class from exiting active buttons
|
|
141
149
|
Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement,index) => {
|
|
@@ -227,7 +235,7 @@ export const createDialog = (dialog) => {
|
|
|
227
235
|
}
|
|
228
236
|
|
|
229
237
|
// If you are using Vue eevents and bindings its recommended to add in the .mh-lg div manually to the dialog
|
|
230
|
-
if(!dialog.querySelector(':scope
|
|
238
|
+
if(!dialog.querySelector(':scope .mh-lg') && !dialog.classList.contains('dialog--multi')){
|
|
231
239
|
dialog.innerHTML = `<div class="mh-lg">${dialog.innerHTML}</div>`;
|
|
232
240
|
|
|
233
241
|
let dialogContent = dialog.querySelector('.mh-lg');
|