@iamproperty/components 5.5.1-beta-1 → 5.5.1-beta-4
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 +1 -1
- package/assets/css/components/actionbar.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/card.global.css +1 -1
- package/assets/css/components/card.global.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/fileupload.css.map +1 -1
- package/assets/css/components/inline-edit.css +1 -0
- package/assets/css/components/inline-edit.css.map +1 -0
- package/assets/css/components/inline-edit.preload.css +1 -0
- package/assets/css/components/inline-edit.preload.css.map +1 -0
- package/assets/css/components/multiselect.css +1 -0
- package/assets/css/components/multiselect.css.map +1 -0
- package/assets/css/components/multiselect.preload.css +1 -0
- package/assets/css/components/multiselect.preload.css.map +1 -0
- package/assets/css/components/nav.css.map +1 -1
- package/assets/css/components/nav.global.css +1 -1
- package/assets/css/components/nav.global.css.map +1 -1
- package/assets/css/components/slider.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.js +12 -3
- 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 +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +6 -6
- package/assets/js/components/applied-filters/applied-filters.component.min.js.map +1 -1
- package/assets/js/components/card/card.component.min.js +3 -3
- package/assets/js/components/chart/chart.component.js +71 -0
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +5 -5
- package/assets/js/components/fileupload/fileupload.component.min.js.map +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 +148 -0
- package/assets/js/components/inline-edit/inline-edit.component.min.js +22 -0
- package/assets/js/components/inline-edit/inline-edit.component.min.js.map +1 -0
- package/assets/js/components/multiselect/multiselect.component.js +221 -0
- package/assets/js/components/multiselect/multiselect.component.min.js +25 -0
- package/assets/js/components/multiselect/multiselect.component.min.js.map +1 -0
- package/assets/js/components/nav/nav.component.min.js +2 -2
- 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/search/search.component.min.js.map +1 -1
- package/assets/js/components/table/table.component.js +2 -2
- package/assets/js/components/table/table.component.min.js +6 -6
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +2 -2
- package/assets/js/dynamic.min.js +5 -5
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/modules/applied-filters.js +39 -7
- package/assets/js/modules/chart.js +613 -111
- package/assets/js/modules/fileupload.js +11 -0
- package/assets/js/modules/helpers.js +20 -0
- package/assets/js/modules/inputs.js +6 -2
- package/assets/js/modules/table.js +62 -11
- package/assets/js/scripts.bundle.js +31 -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/sass/_components.scss +5 -0
- package/assets/sass/_elements.scss +1 -1
- package/assets/sass/_functions/variables.scss +80 -0
- package/assets/sass/_utilities.scss +1 -0
- package/assets/sass/components/actionbar.scss +16 -0
- package/assets/sass/components/applied-filters.scss +6 -48
- package/assets/sass/components/card.global.scss +4 -0
- package/assets/sass/components/card.scss +1 -1
- package/assets/sass/components/charts.scss +981 -234
- package/assets/sass/components/inline-edit.preload.scss +98 -0
- package/assets/sass/components/inline-edit.scss +32 -0
- package/assets/sass/components/multiselect.preload.scss +37 -0
- package/assets/sass/components/multiselect.scss +186 -0
- package/assets/sass/components/nav.global.scss +2 -0
- package/assets/sass/components/tabs.scss +10 -1
- package/assets/sass/elements/admin-panel.scss +0 -3
- package/assets/sass/elements/badge-tag.scss +92 -0
- package/assets/sass/elements/buttons.scss +13 -1
- package/assets/sass/elements/details.scss +94 -5
- package/assets/sass/elements/dialog.scss +2 -0
- package/assets/sass/elements/forms.scss +42 -25
- package/assets/sass/elements/tooltips.scss +4 -3
- package/assets/sass/foundations/root.scss +11 -0
- package/assets/sass/helpers/wider-colours.scss +11 -0
- package/assets/ts/components/actionbar/actionbar.component.ts +14 -3
- package/assets/ts/components/chart/README.md +37 -0
- package/assets/ts/components/chart/chart.component.ts +98 -0
- package/assets/ts/components/fileupload/fileupload.component.ts +1 -1
- package/assets/ts/components/inline-edit/README.md +30 -0
- package/assets/ts/components/inline-edit/inline-edit.component.ts +211 -0
- package/assets/ts/components/multiselect/README.md +35 -0
- package/assets/ts/components/multiselect/multiselect.component.ts +304 -0
- package/assets/ts/components/search/README.md +36 -0
- package/assets/ts/components/table/table.component.ts +2 -2
- package/assets/ts/modules/applied-filters.ts +61 -7
- package/assets/ts/modules/chart.ts +808 -119
- package/assets/ts/modules/fileupload.ts +19 -0
- package/assets/ts/modules/helpers.ts +29 -1
- package/assets/ts/modules/inputs.ts +8 -2
- package/assets/ts/modules/table.ts +86 -12
- package/dist/components.es.js +348 -329
- package/dist/components.umd.js +59 -63
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/AppliedFilters/AppliedFilters.vue +1 -1
- package/src/components/Chart/Chart.vue +26 -96
- package/src/components/InlineEdit/InlineEdit.vue +45 -0
- package/src/components/InlineEdit/README.md +7 -0
- package/src/components/Multiselect/Multiselect.vue +24 -0
- package/src/components/Multiselect/README.md +12 -0
- package/src/components/Search/README.md +11 -0
- package/src/components/Search/Search.vue +1 -1
- package/assets/sass/elements/badge.scss +0 -29
|
@@ -5,7 +5,7 @@ $icon-error: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' vie
|
|
|
5
5
|
$icon-tick: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d='M441 103c9.4 9.4 9.4 24.6 0 33.9L177 401c-9.4 9.4-24.6 9.4-33.9 0L7 265c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l119 119L407 103c9.4-9.4 24.6-9.4 33.9 0z' fill='#0f9d58' /></svg>");
|
|
6
6
|
|
|
7
7
|
// #region Form label
|
|
8
|
-
:is(label,.label) {
|
|
8
|
+
:is(label:not(.tag),.label) {
|
|
9
9
|
font-size: rem(18);
|
|
10
10
|
line-height: rem(21);
|
|
11
11
|
margin-bottom: rem(8);
|
|
@@ -16,7 +16,7 @@ $icon-tick: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' view
|
|
|
16
16
|
// #endregion
|
|
17
17
|
|
|
18
18
|
// #region Optional text
|
|
19
|
-
:is(label,.label) {
|
|
19
|
+
:is(label:not(.tag),.label) {
|
|
20
20
|
|
|
21
21
|
@if $optionalText == "true" {
|
|
22
22
|
&:has(+ input:not(:disabled):not([readonly]):not(:required):not([type='radio']):not([type='checkbox']):not([type='file'])):after {
|
|
@@ -328,8 +328,8 @@ div:has(> label:first-child):has(> input):has(> :is(.form-control-inline,.input-
|
|
|
328
328
|
border-start-start-radius: 0!important;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
.suffix ~ :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),textarea,output),
|
|
332
|
-
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),textarea,output):has(~ .suffix) {
|
|
331
|
+
.suffix ~ :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="date"]),textarea,output),
|
|
332
|
+
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="date"]),textarea,output):has(~ .suffix) {
|
|
333
333
|
order: 1;
|
|
334
334
|
|
|
335
335
|
border-start-end-radius: 0!important;
|
|
@@ -373,6 +373,18 @@ input[maxlength] + span {
|
|
|
373
373
|
|
|
374
374
|
border-color: var(--colour-danger)!important;
|
|
375
375
|
}
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
.was-validated select:is(:invalid, .is-invalid, [aria-invalid],:-internal-autofill-selected) {
|
|
379
|
+
|
|
380
|
+
$form-select-indicator-new: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m2 5 6 6 6-6'/></svg>") !default;
|
|
381
|
+
|
|
382
|
+
background: escape-svg($form-select-indicator-new) right var(--input-padding-block, 0.75rem) top var(--input-padding-block, 0.75rem) / var(--input-lh, 1.25rem) var(--input-lh, 1.25rem) no-repeat,
|
|
383
|
+
linear-gradient(to left, var(--colour-primary-theme), var(--colour-primary-theme) 100%) right top / calc(var(--input-padding-block, 0.75rem) + var(--input-padding-block, 0.75rem) + var(--input-lh, 1.25rem)) calc(var(--input-padding-block, 0.75rem) + var(--input-padding-block, 0.8rem) + var(--input-lh, 1.25rem)) no-repeat,
|
|
384
|
+
escape-svg($icon-error) right var(--input-padding-block, 3.5rem) top var(--input-padding-block, 0.75rem) / var(--input-lh, 1.25rem) var(--input-lh, 1.25rem) no-repeat;
|
|
385
|
+
padding-right: 6rem!important;
|
|
386
|
+
}
|
|
387
|
+
|
|
376
388
|
.was-validated input:is(:invalid, .is-invalid,[aria-invalid],:-internal-autofill-selected) {
|
|
377
389
|
|
|
378
390
|
background-image: escape-svg($icon-error);
|
|
@@ -457,25 +469,25 @@ input:is([type="radio"],[type="checkbox"]) {
|
|
|
457
469
|
pointer-events: none;
|
|
458
470
|
}
|
|
459
471
|
|
|
460
|
-
:is(div,fieldset,label):has(> input:is([type="radio"],[type="checkbox"])):not(:has(label input)) {
|
|
472
|
+
:is(div,fieldset,label:not(.tag)):has(> input:is([type="radio"],[type="checkbox"])):not(:has(label input)) {
|
|
461
473
|
position: relative;
|
|
462
474
|
margin-bottom: rem(24);
|
|
463
475
|
}
|
|
464
476
|
|
|
465
|
-
:is(div,fieldset,label):has( > input[type="radio"]){
|
|
477
|
+
:is(div,fieldset,label:not(.tag)):has( > input[type="radio"]){
|
|
466
478
|
|
|
467
479
|
--border-radius: 50%;
|
|
468
480
|
--outline-width: #{rem(8)};
|
|
469
481
|
}
|
|
470
482
|
|
|
471
|
-
:is(div,fieldset,label):has( > input[type="checkbox"]) {
|
|
483
|
+
:is(div,fieldset,label:not(.tag)):has( > input[type="checkbox"]) {
|
|
472
484
|
|
|
473
485
|
--border-radius: #{rem(4)};
|
|
474
486
|
--outline-width: #{rem(4)};
|
|
475
487
|
}
|
|
476
488
|
|
|
477
489
|
input:is([type="radio"],[type="checkbox"]) + label:not(:has(> iam-card)),
|
|
478
|
-
label:has(input:is([type="radio"],[type="checkbox"])):not(:has(> iam-card)){
|
|
490
|
+
label:not(.tag):has(input:is([type="radio"],[type="checkbox"])):not(:has(> iam-card)){
|
|
479
491
|
|
|
480
492
|
--tick-colour: transparent;
|
|
481
493
|
|
|
@@ -523,7 +535,7 @@ label:has(input:is([type="radio"],[type="checkbox"])):not(:has(> iam-card)){
|
|
|
523
535
|
|
|
524
536
|
|
|
525
537
|
input[type="radio"] + label:not(:has(> iam-card)),
|
|
526
|
-
label:has(input[type="radio"]):not(:has(> iam-card)) {
|
|
538
|
+
label:not(.tag):has(input[type="radio"]):not(:has(> iam-card)) {
|
|
527
539
|
|
|
528
540
|
&:after {
|
|
529
541
|
content: ""!important;
|
|
@@ -572,13 +584,13 @@ label:has(input[type="radio"]):not(:has(> iam-card)) {
|
|
|
572
584
|
|
|
573
585
|
// multiple radio's together
|
|
574
586
|
:is(div,fieldset):has(> :is(input[type="radio"],input[type="checkbox"]):nth-of-type(2)) {
|
|
575
|
-
label:not(:has(> iam-card)) {
|
|
587
|
+
label:not(.tag):not(:has(> iam-card)) {
|
|
576
588
|
margin-bottom: 0rem;
|
|
577
589
|
}
|
|
578
590
|
}
|
|
579
591
|
|
|
580
592
|
input:is([type="radio"],[type="checkbox"]):checked + label,
|
|
581
|
-
label:has(input:is([type="radio"],[type="checkbox"]):checked) {
|
|
593
|
+
label:not(.tag):has(input:is([type="radio"],[type="checkbox"]):checked) {
|
|
582
594
|
|
|
583
595
|
--tick-colour: var(--colour-info);
|
|
584
596
|
|
|
@@ -596,7 +608,7 @@ label:has(input:is([type="radio"],[type="checkbox"]):checked) {
|
|
|
596
608
|
}
|
|
597
609
|
|
|
598
610
|
input[type="checkbox"]:not([disabled]):checked + label,
|
|
599
|
-
label:has(input[type="checkbox"]:not([disabled]):checked) {
|
|
611
|
+
label:not(.tag):has(input[type="checkbox"]:not([disabled]):checked) {
|
|
600
612
|
|
|
601
613
|
&:before {
|
|
602
614
|
background: var(--colour-info)!important;
|
|
@@ -604,7 +616,7 @@ label:has(input[type="checkbox"]:not([disabled]):checked) {
|
|
|
604
616
|
}
|
|
605
617
|
|
|
606
618
|
input[type="checkbox"]:checked + label,
|
|
607
|
-
label:has(input[type="checkbox"]:checked) {
|
|
619
|
+
label:not(.tag):has(input[type="checkbox"]:checked) {
|
|
608
620
|
|
|
609
621
|
&:after {
|
|
610
622
|
content: "\f00c";
|
|
@@ -627,7 +639,7 @@ label:has(input[type="checkbox"]:checked) {
|
|
|
627
639
|
}
|
|
628
640
|
|
|
629
641
|
input[type="checkbox"]:indeterminate + label,
|
|
630
|
-
label:has(input[type="checkbox"]:indeterminate) {
|
|
642
|
+
label:not(.tag):has(input[type="checkbox"]:indeterminate) {
|
|
631
643
|
|
|
632
644
|
&:before {
|
|
633
645
|
background: var(--colour-info) !important;
|
|
@@ -656,13 +668,13 @@ label:has(input[type="checkbox"]:indeterminate) {
|
|
|
656
668
|
|
|
657
669
|
|
|
658
670
|
input:is([type="radio"],[type="checkbox"]):checked:is(:focus,:hover,.focus) + label,
|
|
659
|
-
label:has(input:is([type="radio"],[type="checkbox"]):checked:is(:focus,:hover,.focus)) {
|
|
671
|
+
label:not(.tag):has(input:is([type="radio"],[type="checkbox"]):checked:is(:focus,:hover,.focus)) {
|
|
660
672
|
|
|
661
673
|
--tick-colour: var(--colour-info);
|
|
662
674
|
}
|
|
663
675
|
|
|
664
676
|
input:is([type="radio"],[type="checkbox"]):is(:focus,:hover,.focus) + label,
|
|
665
|
-
label:has(input:is([type="radio"],[type="checkbox"]):is(:focus,:hover,.focus)) {
|
|
677
|
+
label:not(.tag):has(input:is([type="radio"],[type="checkbox"]):is(:focus,:hover,.focus)) {
|
|
666
678
|
|
|
667
679
|
--tick-colour: var(--colour-muted);
|
|
668
680
|
|
|
@@ -672,7 +684,7 @@ label:has(input:is([type="radio"],[type="checkbox"]):is(:focus,:hover,.focus)) {
|
|
|
672
684
|
}
|
|
673
685
|
}
|
|
674
686
|
input:is([type="radio"],[type="checkbox"]):is(:active,.active) + label,
|
|
675
|
-
label:has(input:is([type="radio"],[type="checkbox"]):is(:active,.active)) {
|
|
687
|
+
label:not(.tag):has(input:is([type="radio"],[type="checkbox"]):is(:active,.active)) {
|
|
676
688
|
|
|
677
689
|
--tick-colour: var(--colour-light);
|
|
678
690
|
|
|
@@ -684,7 +696,7 @@ label:has(input:is([type="radio"],[type="checkbox"]):is(:active,.active)) {
|
|
|
684
696
|
|
|
685
697
|
// Disabled
|
|
686
698
|
input:is([type="radio"],[type="checkbox"]):disabled + label,
|
|
687
|
-
label:has(input:is([type="radio"],[type="checkbox"]):disabled) {
|
|
699
|
+
label:not(.tag):has(input:is([type="radio"],[type="checkbox"]):disabled) {
|
|
688
700
|
|
|
689
701
|
opacity: 0.4;
|
|
690
702
|
cursor: not-allowed;
|
|
@@ -701,7 +713,7 @@ label:has(input:is([type="radio"],[type="checkbox"]):disabled) {
|
|
|
701
713
|
}
|
|
702
714
|
|
|
703
715
|
input[type="radio"][disabled]:checked + label,
|
|
704
|
-
label:has(input[type="radio"][disabled]:checked) {
|
|
716
|
+
label:not(.tag):has(input[type="radio"][disabled]:checked) {
|
|
705
717
|
|
|
706
718
|
&:after {
|
|
707
719
|
background-color: var(--colour-primary)!important;
|
|
@@ -709,7 +721,7 @@ label:has(input[type="radio"][disabled]:checked) {
|
|
|
709
721
|
}
|
|
710
722
|
|
|
711
723
|
input[type="checkbox"][disabled]:checked + label,
|
|
712
|
-
label:has(input[type="checkbox"][disabled]:checked) {
|
|
724
|
+
label:not(.tag):has(input[type="checkbox"][disabled]:checked) {
|
|
713
725
|
|
|
714
726
|
&:before {
|
|
715
727
|
background: #E0E0E0!important;
|
|
@@ -769,12 +781,13 @@ select[multiple]::-webkit-scrollbar-thumb {
|
|
|
769
781
|
select {
|
|
770
782
|
$form-select-indicator-new: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m2 5 6 6 6-6'/></svg>") !default;
|
|
771
783
|
|
|
772
|
-
background: escape-svg($form-select-indicator-new) right var(--input-padding-block, 0.75rem) top var(--input-padding-block, 0.75rem)/var(--input-lh, 1.25rem) var(--input-lh, 1.25rem) no-repeat,
|
|
773
|
-
linear-gradient(to left, var(--colour-primary-theme), var(--colour-primary-theme) 100%) right top/calc(var(--input-padding-block, 0.75rem) + var(--input-padding-block, 0.75rem) + var(--input-lh, 1.25rem)) calc(var(--input-padding-block, 0.75rem) + var(--input-padding-block, 0.
|
|
784
|
+
background: escape-svg($form-select-indicator-new) right var(--input-padding-block, 0.75rem) top var(--input-padding-block, 0.75rem) / var(--input-lh, 1.25rem) var(--input-lh, 1.25rem) no-repeat,
|
|
785
|
+
linear-gradient(to left, var(--colour-primary-theme), var(--colour-primary-theme) 100%) right top / calc(var(--input-padding-block, 0.75rem) + var(--input-padding-block, 0.75rem) + var(--input-lh, 1.25rem)) calc(var(--input-padding-block, 0.75rem) + var(--input-padding-block, 0.8rem) + var(--input-lh, 1.25rem)) no-repeat;
|
|
774
786
|
|
|
775
787
|
padding-right: calc(var(--input-padding-inline, #{rem(16)}) + var(--input-padding-inline, #{rem(16)}) + var(--input-lh, 1.25rem))!important;
|
|
776
788
|
option {font-size: 1.2em;}
|
|
777
789
|
|
|
790
|
+
box-shadow: inset -2px 0px 0px var(--colour-primary-theme);
|
|
778
791
|
|
|
779
792
|
max-width: $select-max-width;
|
|
780
793
|
|
|
@@ -814,7 +827,7 @@ div:has(> select){
|
|
|
814
827
|
border: none;
|
|
815
828
|
display: inline-block;
|
|
816
829
|
margin: 0;
|
|
817
|
-
padding: 0 calc(1.25em + 0.8ch) 0 0.25em;
|
|
830
|
+
padding: 0 calc(1.25em + 0.8ch) 0 0.25em!important;
|
|
818
831
|
height: auto;
|
|
819
832
|
cursor: pointer;
|
|
820
833
|
|
|
@@ -858,13 +871,13 @@ iam-fileupload {
|
|
|
858
871
|
|
|
859
872
|
|
|
860
873
|
// #region label with input field in
|
|
861
|
-
:is(label, .label):has(:is(input,select)){
|
|
874
|
+
:is(label:not(.tag), .label):has(:is(input,select)){
|
|
862
875
|
|
|
863
876
|
display: block;
|
|
864
877
|
margin-bottom: rem(24);
|
|
865
878
|
max-width: $input-max-width;
|
|
866
879
|
|
|
867
|
-
:is(input:not([type="range"]),select) {
|
|
880
|
+
:is(input:not([type="range"]),select,textarea) {
|
|
868
881
|
margin-top: rem(8);
|
|
869
882
|
margin-bottom: 0!important;
|
|
870
883
|
}
|
|
@@ -1030,6 +1043,10 @@ iam-slider input::-webkit-inner-spin-button {
|
|
|
1030
1043
|
// #region Date and time fields
|
|
1031
1044
|
:is(input[type="date"],input[type="time"]) {
|
|
1032
1045
|
position: relative;
|
|
1046
|
+
margin-right: -3rem;
|
|
1047
|
+
padding-right: 3rem !important;
|
|
1048
|
+
background-position: right 4rem center;
|
|
1049
|
+
border-radius: 0.5rem !important;
|
|
1033
1050
|
}
|
|
1034
1051
|
:is(input[type="date"],input[type="time"])::-webkit-calendar-picker-indicator {
|
|
1035
1052
|
background: transparent;
|
|
@@ -26,6 +26,17 @@ $root: ':root'!default;
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// Wider colours
|
|
30
|
+
@each $colour, $value in $wider-colours {
|
|
31
|
+
--wider-colour-#{$colour}: #{$value};
|
|
32
|
+
}
|
|
33
|
+
@each $colour, $value in $wider-colours-hover {
|
|
34
|
+
--wider-colour-#{$colour}-hover: #{$value};
|
|
35
|
+
}
|
|
36
|
+
@each $colour, $value in $wider-colours-active {
|
|
37
|
+
--wider-colour-#{$colour}-active: #{$value};
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
// Extra vars needed
|
|
30
41
|
--content-max-width: #{$content-max-width};
|
|
31
42
|
--colour-brand: var(--colour-primary);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
@each $colour, $value in $wider-colours {
|
|
4
|
+
|
|
5
|
+
.wider-colour-#{$colour} {
|
|
6
|
+
--wider-colour: var(--wider-colour-#{$colour});
|
|
7
|
+
--wider-colour-hover: var(--wider-colour-#{$colour}-hover);
|
|
8
|
+
--wider-colour-active: var(--wider-colour-#{$colour}-active);
|
|
9
|
+
color: #262626!important;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -214,6 +214,9 @@ class iamActionbar extends HTMLElement {
|
|
|
214
214
|
|
|
215
215
|
// #region search
|
|
216
216
|
const searchBar = this.shadowRoot.querySelector('.actionbar--search');
|
|
217
|
+
if(this.hasAttribute('data-search-value')){
|
|
218
|
+
this.shadowRoot.querySelector('#search').value = this.getAttribute('data-search-value');
|
|
219
|
+
}
|
|
217
220
|
|
|
218
221
|
if(this.hasAttribute('data-search') && this.getAttribute('data-search') == 'show')
|
|
219
222
|
searchBar.classList.add('show');
|
|
@@ -262,14 +265,22 @@ class iamActionbar extends HTMLElement {
|
|
|
262
265
|
const screenWidth = document.documentElement.scrollWidth;
|
|
263
266
|
let safeAreaWidth = 750;
|
|
264
267
|
let elementMargin = 16;
|
|
268
|
+
let tabletSafeWidth = 450;
|
|
265
269
|
let mobileSafeWidth = that.hasAttribute('data-switchviews') ? 144 : 210;
|
|
266
270
|
|
|
271
|
+
if(that.hasAttribute('data-large-safe-area')){
|
|
272
|
+
|
|
273
|
+
safeAreaWidth = 1048;
|
|
274
|
+
tabletSafeWidth = 620;
|
|
275
|
+
mobileSafeWidth = 260;
|
|
276
|
+
}
|
|
277
|
+
|
|
267
278
|
// We need to modify the widths to mimic the CSS's scaling functionality
|
|
268
279
|
let modifier = 1;
|
|
269
280
|
if (screenWidth >= 992 && screenWidth <= 1280){
|
|
270
281
|
modifier = screenWidth/1280;
|
|
271
282
|
}
|
|
272
|
-
else if (screenWidth >= 576 && screenWidth
|
|
283
|
+
else if (screenWidth >= 576 && screenWidth < 992) {
|
|
273
284
|
modifier = screenWidth/768;
|
|
274
285
|
}
|
|
275
286
|
else if (screenWidth < 576) {
|
|
@@ -280,8 +291,8 @@ class iamActionbar extends HTMLElement {
|
|
|
280
291
|
if (wrapperWidth >= 992 && wrapperWidth <= 1280){
|
|
281
292
|
safeAreaWidth = safeAreaWidth*modifier;
|
|
282
293
|
}
|
|
283
|
-
else if (wrapperWidth >= 576 && wrapperWidth
|
|
284
|
-
safeAreaWidth =
|
|
294
|
+
else if (wrapperWidth >= 576 && wrapperWidth < 992) {
|
|
295
|
+
safeAreaWidth = tabletSafeWidth*modifier;
|
|
285
296
|
}
|
|
286
297
|
else if (wrapperWidth < 576) {
|
|
287
298
|
safeAreaWidth = mobileSafeWidth*modifier;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
```
|
|
2
|
+
<iam-chart>
|
|
3
|
+
<table>
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>Issue</th>
|
|
7
|
+
<th>Democrat</th>
|
|
8
|
+
<th>Republican</th>
|
|
9
|
+
</tr>
|
|
10
|
+
</thead>
|
|
11
|
+
<tbody>
|
|
12
|
+
<tr><td>Inflation</td><td>45%</td><td>18%</td></tr><tr><td>Abortion</td><td>12%</td><td>43%</td></tr>
|
|
13
|
+
<tr><td>Gun policy</td><td>8%</td><td>14%</td></tr><tr><td>Immigration</td><td>15%</td><td>5%</td></tr>
|
|
14
|
+
<tr><td>Crime</td><td>13%</td><td>10%</td></tr>
|
|
15
|
+
</tbody>
|
|
16
|
+
</table>
|
|
17
|
+
</iam-chart>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**To do**
|
|
21
|
+
|
|
22
|
+
- Animation
|
|
23
|
+
- Add more chart types
|
|
24
|
+
- optimise code
|
|
25
|
+
- change key
|
|
26
|
+
- Fill in readme with class and attributes
|
|
27
|
+
- flout
|
|
28
|
+
|
|
29
|
+
**Note**
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
**Properties**
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
**Class modifiers**
|
|
36
|
+
|
|
37
|
+
- .chart--no-animate turns of the animation
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import {setupChart,setEventObservers,setEventHandlers} from "../../modules/chart";
|
|
3
|
+
|
|
4
|
+
class iamChart extends HTMLElement {
|
|
5
|
+
|
|
6
|
+
constructor(){
|
|
7
|
+
super();
|
|
8
|
+
this.attachShadow({ mode: 'open'});
|
|
9
|
+
|
|
10
|
+
const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';
|
|
11
|
+
const loadCSS = `@import "${assetLocation}/css/components/charts.css";`;
|
|
12
|
+
const chartID = `chart-${Date.now()+(Math.floor(Math.random() * 100) + 1)}`;
|
|
13
|
+
const chartType = this.hasAttribute('data-type') ? this.getAttribute('data-type') : 'column';
|
|
14
|
+
const availableTypes = this.hasAttribute('data-types') ? this.getAttribute('data-types').split(',') : [];
|
|
15
|
+
|
|
16
|
+
const template = document.createElement('template');
|
|
17
|
+
template.innerHTML = `
|
|
18
|
+
<style>
|
|
19
|
+
@import "${assetLocation}/css/core.min.css";
|
|
20
|
+
${loadCSS}
|
|
21
|
+
${this.hasAttribute('css') ? `@import "${this.getAttribute('css')}";` : ``}
|
|
22
|
+
</style>
|
|
23
|
+
<div class="chart__outer">
|
|
24
|
+
<div class="chart__key"></div>
|
|
25
|
+
|
|
26
|
+
<div class="chart__options">
|
|
27
|
+
<span>Chart Type</span>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="chart__wrapper">
|
|
31
|
+
<div class="chart__yaxis"></div>
|
|
32
|
+
<div class="chart">
|
|
33
|
+
<div class="chart__lines"></div>
|
|
34
|
+
<div class="chart__guidelines"></div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>`;
|
|
38
|
+
|
|
39
|
+
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
|
|
44
|
+
const element = this;
|
|
45
|
+
const orginalTable = this.querySelector('table');
|
|
46
|
+
const newTable = orginalTable.cloneNode(true);
|
|
47
|
+
const chart = this.shadowRoot.querySelector('.chart');
|
|
48
|
+
const chartOuter = this.shadowRoot.querySelector('.chart__outer');
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
chart.appendChild(newTable);
|
|
52
|
+
|
|
53
|
+
if(!this.classList.contains('chart--no-animate'))
|
|
54
|
+
chartOuter.classList.add('chart--animate');
|
|
55
|
+
|
|
56
|
+
setupChart(this,chartOuter,newTable);
|
|
57
|
+
setEventObservers(this,chartOuter);
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
const options = {
|
|
61
|
+
rootMargin: '50px',
|
|
62
|
+
threshold: 0.1
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let callback = (entries:any) => {
|
|
66
|
+
|
|
67
|
+
entries.forEach((entry:any) => {
|
|
68
|
+
|
|
69
|
+
if(entry.intersectionRatio > 0){
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
chartOuter.classList.add('animating');
|
|
73
|
+
chartOuter.classList.add('inview');
|
|
74
|
+
intObserver.unobserve(entry.target);
|
|
75
|
+
|
|
76
|
+
let rowCount = entry.target.querySelectorAll('tbody tr').length;
|
|
77
|
+
let animationTime = 2000 + (rowCount*100);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
setTimeout(function() {
|
|
81
|
+
chartOuter.classList.remove('animating');
|
|
82
|
+
}, animationTime);
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const intObserver = new IntersectionObserver(callback, options);
|
|
89
|
+
intObserver.observe(element);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
attributeChangedCallback(attrName, oldVal, newVal) {
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export default iamChart;
|
|
@@ -32,7 +32,7 @@ class iamFileupload extends HTMLElement {
|
|
|
32
32
|
<div class="drop-area"></div>
|
|
33
33
|
<hr/>
|
|
34
34
|
<slot></slot>
|
|
35
|
-
<div class="files"></div>
|
|
35
|
+
<div class="files"><slot name="files"></slot></div>
|
|
36
36
|
</div>
|
|
37
37
|
`;
|
|
38
38
|
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
**Add the below to your initialise script**
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
import('../node_modules/@iamproperty/components/assets/js/components/nav/nav.component.min').then(module => { // Might need to update the path
|
|
5
|
+
|
|
6
|
+
if (!window.customElements.get(`iam-nav`))
|
|
7
|
+
window.customElements.define(`iam-nav`, module.default);
|
|
8
|
+
|
|
9
|
+
}).catch((err) => {
|
|
10
|
+
console.log(err.message);
|
|
11
|
+
});
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Add the below HTML code to where you want the component to live.**
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
<iam-inline-edit id="inlineEdit" data-autosave>
|
|
18
|
+
<label >Optional label
|
|
19
|
+
<input type="text" name="text" value="Placeholder text" />
|
|
20
|
+
</label>
|
|
21
|
+
</iam-inline-edit>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Properties**
|
|
27
|
+
|
|
28
|
+
| Option | Type | Default Value | Description |
|
|
29
|
+
| ------ | ---- | ------------- | ----------- |
|
|
30
|
+
| data-autosave | Flag | - | Allows the input field to dispatch the autosave event when unfocusing the input field |
|