@iamproperty/components 4.1.0-beta-2 → 4.1.0-beta-3

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.
Files changed (34) hide show
  1. package/assets/css/components/dialog.css +1 -1
  2. package/assets/css/components/dialog.css.map +1 -1
  3. package/assets/css/components/forms.css +1 -1
  4. package/assets/css/components/forms.css.map +1 -1
  5. package/assets/css/core.min.css +1 -1
  6. package/assets/css/core.min.css.map +1 -1
  7. package/assets/css/style.min.css +1 -1
  8. package/assets/css/style.min.css.map +1 -1
  9. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  10. package/assets/js/components/actionbar/actionbar.component.min.js +3 -3
  11. package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
  12. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  13. package/assets/js/components/card/card.component.min.js +1 -1
  14. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  15. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  16. package/assets/js/components/header/header.component.min.js +1 -1
  17. package/assets/js/components/nav/nav.component.min.js +1 -1
  18. package/assets/js/components/notification/notification.component.min.js +1 -1
  19. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  20. package/assets/js/components/table/table.component.min.js +1 -1
  21. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  22. package/assets/js/dynamic.min.js +5 -5
  23. package/assets/js/dynamic.min.js.map +1 -1
  24. package/assets/js/modules/dialogs.js +15 -3
  25. package/assets/js/scripts.bundle.js +15 -15
  26. package/assets/js/scripts.bundle.js.map +1 -1
  27. package/assets/js/scripts.bundle.min.js +2 -2
  28. package/assets/js/scripts.bundle.min.js.map +1 -1
  29. package/assets/sass/components/dialog.scss +17 -13
  30. package/assets/sass/components/forms.scss +19 -19
  31. package/assets/ts/modules/dialogs.ts +19 -4
  32. package/dist/components.es.js +135 -130
  33. package/dist/components.umd.js +52 -52
  34. package/package.json +1 -1
@@ -24,13 +24,11 @@ dialog[open] {
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
 
27
- > *:last-child,
28
- > .mh-lg > *:last-child{
27
+ > *:last-child {
29
28
  margin-bottom: 0;
30
29
  }
31
30
 
32
- > :is(p):last-child,
33
- > .mh-lg > :is(p):last-child {
31
+ > :is(p):last-child {
34
32
  padding-bottom: 0;
35
33
  }
36
34
  }
@@ -161,13 +159,13 @@ dialog[open] {
161
159
  padding-right: calc(var(--dialog-padding) - 10px);
162
160
  margin-right: calc((var(--dialog-padding) * -1) + 10px);
163
161
  margin-bottom: calc(var(--dialog-padding) * -1);
164
- padding-bottom: var(--dialog-padding);
165
- //max-height: none!important;
166
162
 
167
- &:before {
168
- top: 100%;
169
- height: var(--dialog-padding);
170
- margin-bottom: -2rem;
163
+ > *:last-child {
164
+ margin-bottom: 2rem!important;
165
+ }
166
+
167
+ > p:last-child {
168
+ padding-bottom: 0!important;
171
169
  }
172
170
  }
173
171
  }
@@ -464,12 +462,18 @@ dialog::backdrop {
464
462
 
465
463
  overflow: auto;
466
464
  margin-bottom: calc(var(--dialog-padding) * -1);
467
- padding-bottom: var(--dialog-padding);
468
-
469
-
470
465
  padding-right: calc(var(--dialog-padding) - 10px);
471
466
  margin-right: calc((var(--dialog-padding) * -1) + 10px);
472
467
 
468
+ > :last-child {
469
+ margin-bottom: var(--dialog-padding)!important;
470
+ }
471
+
472
+ > p:last-child {
473
+ padding-bottom: 0!important;
474
+ margin-bottom: var(--dialog-padding)!important;
475
+ }
476
+
473
477
  &::before {
474
478
  content: "";
475
479
  top: 100%;
@@ -108,7 +108,7 @@ div:has(> label:first-child):has(> input) {
108
108
  text-align: center;
109
109
  }
110
110
 
111
- input, output, .prefix, .suffix {
111
+ input:not([type="checkbox"]):not([type="radio"]), output, .prefix, .suffix {
112
112
  margin-bottom: 0;
113
113
  }
114
114
 
@@ -116,12 +116,12 @@ div:has(> label:first-child):has(> input) {
116
116
  flex-wrap: wrap;
117
117
  align-items: center;
118
118
 
119
- > *:not(input):not(output):not(.prefix):not(.suffix) {
119
+ > *:not(input:not([type="checkbox"]):not([type="radio"])):not(output):not(.prefix):not(.suffix) {
120
120
  flex-shrink: 0;
121
121
  width: 100%;
122
122
  }
123
123
 
124
- :is(input,textarea,output) {
124
+ :is(input:not([type="checkbox"]):not([type="radio"]),textarea,output) {
125
125
  flex-shrink: 1;
126
126
  flex-grow: 1;
127
127
  width: 0;
@@ -133,9 +133,9 @@ div:has(> label:first-child):has(> input) {
133
133
  }
134
134
 
135
135
  input[type="color"]{
136
- width: 3rem;
137
- flex-shrink: 0;
138
- flex-grow: 0;
136
+ width: 3rem!important;
137
+ flex-shrink: 0!important;
138
+ flex-grow: 0!important;
139
139
  border-start-end-radius: 0;
140
140
  border-end-end-radius: 0;
141
141
  padding: 0;
@@ -156,9 +156,10 @@ div:has(> label:first-child):has(> input) {
156
156
  }
157
157
 
158
158
  output {
159
- border-left: none;
160
- border-end-start-radius: 0;
161
- border-start-start-radius: 0;
159
+ border-left: none!important;
160
+ border-end-start-radius: 0!important;
161
+ border-start-start-radius: 0!important;
162
+ margin: 0!important;
162
163
  }
163
164
  }
164
165
 
@@ -291,17 +292,17 @@ div:has(> label:first-child):has(> input):has(> :is(.form-control-inline,.input-
291
292
  }
292
293
  }
293
294
 
294
- .prefix ~ :is(input,textarea,output) {
295
+ .prefix ~ :is(input:not([type="checkbox"]):not([type="radio"]),textarea,output) {
295
296
 
296
- border-end-start-radius: 0;
297
- border-start-start-radius: 0;
297
+ border-end-start-radius: 0!important;
298
+ border-start-start-radius: 0!important;
298
299
  }
299
300
 
300
- .suffix ~ :is(input,textarea,output) {
301
+ .suffix ~ :is(input:not([type="checkbox"]):not([type="radio"]),textarea,output) {
301
302
  order: 1;
302
303
 
303
- border-start-end-radius: 0;
304
- border-end-end-radius: 0;
304
+ border-start-end-radius: 0!important;
305
+ border-end-end-radius: 0!important;
305
306
  }
306
307
  }
307
308
  // #endregion
@@ -400,8 +401,7 @@ input:is([type="radio"],[type="checkbox"]) {
400
401
 
401
402
  :is(div,fieldset):has(> input:is([type="radio"],[type="checkbox"])) {
402
403
  position: relative;
403
-
404
- padding-bottom: rem(24);
404
+ margin-bottom: rem(24);
405
405
  }
406
406
 
407
407
  :is(div,fieldset):has( > input[type="radio"]){
@@ -441,7 +441,7 @@ input:is([type="radio"],[type="checkbox"]) + label:not(:has(> iam-card)) {
441
441
 
442
442
  &:last-child {
443
443
 
444
- margin-bottom: rem(24);
444
+ margin-bottom: 0;
445
445
  }
446
446
 
447
447
  &:before {
@@ -505,7 +505,7 @@ input[type="radio"] + label:not(:has(> iam-card)) {
505
505
  }
506
506
 
507
507
  div:has(> :is(input[type="radio"],input[type="checkbox"]):nth-of-type(2)) {
508
- label:not(:has(> iam-card)):not(:last-of-type) {
508
+ label:not(:has(> iam-card)) {
509
509
  margin-bottom: 0rem;
510
510
  }
511
511
  }
@@ -261,6 +261,7 @@ export const createMultiFormDialog = (dialog) => {
261
261
 
262
262
  let buttons = "";
263
263
  let fieldsets = Array.from(dialog.querySelectorAll('fieldset[data-title]'));
264
+ let form = dialog.querySelector('form');
264
265
 
265
266
  fieldsets.forEach((fieldset,index) => {
266
267
  buttons += `<button data-title="${fieldset.getAttribute('data-title')}" type="button" class="${index == 0 ? "active":""}" tabindex="-1">${fieldset.getAttribute('data-title')}</button>`;
@@ -275,8 +276,18 @@ export const createMultiFormDialog = (dialog) => {
275
276
  if(index != fieldsets.length - 1)
276
277
  btnWrapper.innerHTML += `<button data-title="${fieldsets[index+1].getAttribute('data-title')}" class="btn btn-primary mb-0" data-next type="button">Next</button>`;
277
278
 
278
- if(index == fieldsets.length - 1)
279
- btnWrapper.innerHTML += `<button data-title="${fieldsets[index].getAttribute('data-title')}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`;
279
+ // Last fieldset
280
+ if(index == fieldsets.length - 1){
281
+ if(form && form.querySelector(':scope > button[type="submit"]')){
282
+
283
+ let existingButton = form.querySelector(':scope > button[type="submit"]');
284
+ existingButton.classList.add('mb-0')
285
+
286
+ btnWrapper.insertAdjacentElement('beforeend',existingButton);
287
+ }
288
+ else
289
+ btnWrapper.innerHTML += `<button data-title="${fieldsets[index].getAttribute('data-title')}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`;
290
+ }
280
291
  });
281
292
 
282
293
  dialog.insertAdjacentHTML('afterbegin',`<div class="steps bg-primary">${buttons}</div>`);
@@ -376,11 +387,12 @@ export const createMultiFormDialog = (dialog) => {
376
387
 
377
388
  const button = event.target.closest('button');
378
389
 
379
- if(event.keyCode == 13){
390
+ if(event.keyCode == 13 && button.getAttribute('type') != "submit"){
380
391
 
381
392
  event.preventDefault();
382
393
  validateFieldset(button);
383
394
  }
395
+
384
396
  }
385
397
 
386
398
  if (event && event.target instanceof HTMLElement && event.target.closest('input')){
@@ -388,7 +400,10 @@ export const createMultiFormDialog = (dialog) => {
388
400
 
389
401
  input.classList.remove('is-invalid');
390
402
 
391
-
403
+ if(event.keyCode == 13){
404
+
405
+ event.preventDefault();
406
+ }
392
407
  }
393
408
  });
394
409