kemet-ui 1.3.0 → 1.3.1
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/custom-elements.json +333 -325
- package/dist/components/kemet-combo/kemet-combo.js +6 -1
- package/dist/kemet-components.cjs +153 -148
- package/dist/kemet-components.js +153 -148
- package/dist/kemet-components.min.js +55 -55
- package/package.json +1 -1
|
@@ -78,6 +78,11 @@ export default class KemetCombo extends LitElement {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
constructor() {
|
|
82
|
+
super();
|
|
83
|
+
this.options = [];
|
|
84
|
+
}
|
|
85
|
+
|
|
81
86
|
firstUpdated() {
|
|
82
87
|
// standard properties
|
|
83
88
|
this.field = this.closest('kemet-field');
|
|
@@ -111,7 +116,7 @@ export default class KemetCombo extends LitElement {
|
|
|
111
116
|
makeOptions() {
|
|
112
117
|
if (this.input) {
|
|
113
118
|
this.filteredOptions = this.options.filter(
|
|
114
|
-
option => option.toLowerCase().indexOf(this.input.value
|
|
119
|
+
option => option.toLowerCase().indexOf(this.input.value?.toLowerCase()) !== -1,
|
|
115
120
|
);
|
|
116
121
|
|
|
117
122
|
const options = this.filteredOptions.map(
|
|
@@ -463,6 +463,107 @@ class KemetAccordion extends s$1 {
|
|
|
463
463
|
// eslint-disable-next-line no-unused-expressions
|
|
464
464
|
customElements.get('kemet-accordion') || customElements.define('kemet-accordion', KemetAccordion);
|
|
465
465
|
|
|
466
|
+
class KemetBadge extends s$1 {
|
|
467
|
+
static get styles() {
|
|
468
|
+
return [
|
|
469
|
+
r$3`
|
|
470
|
+
:host {
|
|
471
|
+
display: inline-flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: center;
|
|
474
|
+
padding: var(--kemet-badge-padding, 10px);
|
|
475
|
+
line-height: 1;
|
|
476
|
+
color: var(--kemet-color-white);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
:host([status='primary']) {
|
|
480
|
+
background-color: var(--kemet-color-primary);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
:host([status='success']) {
|
|
484
|
+
background-color: var(--kemet-color-success);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
:host([status='standard']) {
|
|
488
|
+
background-color: var(--kemet-color-gray6);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
:host([status='warning']) {
|
|
492
|
+
background-color: var(--kemet-color-warning);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
:host([status='error']) {
|
|
496
|
+
background-color: var(--kemet-color-error);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
:host([circle]) {
|
|
500
|
+
border-radius: 50%;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
:host([pill]) {
|
|
504
|
+
border-radius: 99rem;
|
|
505
|
+
}
|
|
506
|
+
`,
|
|
507
|
+
];
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
static get properties() {
|
|
511
|
+
return {
|
|
512
|
+
/**
|
|
513
|
+
* The status of the badge
|
|
514
|
+
*/
|
|
515
|
+
status: {
|
|
516
|
+
type: String,
|
|
517
|
+
reflect: true,
|
|
518
|
+
},
|
|
519
|
+
/**
|
|
520
|
+
* Displays the badge in a circle
|
|
521
|
+
*/
|
|
522
|
+
circle: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
reflect: true,
|
|
525
|
+
},
|
|
526
|
+
/**
|
|
527
|
+
* Rounds the corners on the badge
|
|
528
|
+
*/
|
|
529
|
+
pill: {
|
|
530
|
+
type: Boolean,
|
|
531
|
+
reflect: true,
|
|
532
|
+
},
|
|
533
|
+
/**
|
|
534
|
+
* Padding on the badge as a circle
|
|
535
|
+
*/
|
|
536
|
+
circlePadding: {
|
|
537
|
+
type: Number,
|
|
538
|
+
attribute: 'circle-padding',
|
|
539
|
+
},
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
constructor() {
|
|
544
|
+
super();
|
|
545
|
+
|
|
546
|
+
this.status = 'primary';
|
|
547
|
+
this.pill = false;
|
|
548
|
+
this.circle = false;
|
|
549
|
+
this.circlePadding = 0;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
render() {
|
|
553
|
+
return $`<slot @slotchange=${() => this.handleSlotChange()}></slot>`;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
handleSlotChange() {
|
|
557
|
+
if (this.circle) {
|
|
558
|
+
this.style.height = `${this.offsetWidth + this.circlePadding}px`;
|
|
559
|
+
this.style.width = `${this.offsetWidth + this.circlePadding}px`;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// eslint-disable-next-line no-unused-expressions
|
|
565
|
+
customElements.get('kemet-badge') || customElements.define('kemet-badge', KemetBadge);
|
|
566
|
+
|
|
466
567
|
class FormSubmitController {
|
|
467
568
|
host;
|
|
468
569
|
form;
|
|
@@ -814,107 +915,6 @@ class KemetButton extends s$1 {
|
|
|
814
915
|
// eslint-disable-next-line no-unused-expressions
|
|
815
916
|
customElements.get('kemet-button') || customElements.define('kemet-button', KemetButton);
|
|
816
917
|
|
|
817
|
-
class KemetBadge extends s$1 {
|
|
818
|
-
static get styles() {
|
|
819
|
-
return [
|
|
820
|
-
r$3`
|
|
821
|
-
:host {
|
|
822
|
-
display: inline-flex;
|
|
823
|
-
align-items: center;
|
|
824
|
-
justify-content: center;
|
|
825
|
-
padding: var(--kemet-badge-padding, 10px);
|
|
826
|
-
line-height: 1;
|
|
827
|
-
color: var(--kemet-color-white);
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
:host([status='primary']) {
|
|
831
|
-
background-color: var(--kemet-color-primary);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
:host([status='success']) {
|
|
835
|
-
background-color: var(--kemet-color-success);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
:host([status='standard']) {
|
|
839
|
-
background-color: var(--kemet-color-gray6);
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
:host([status='warning']) {
|
|
843
|
-
background-color: var(--kemet-color-warning);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
:host([status='error']) {
|
|
847
|
-
background-color: var(--kemet-color-error);
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
:host([circle]) {
|
|
851
|
-
border-radius: 50%;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
:host([pill]) {
|
|
855
|
-
border-radius: 99rem;
|
|
856
|
-
}
|
|
857
|
-
`,
|
|
858
|
-
];
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
static get properties() {
|
|
862
|
-
return {
|
|
863
|
-
/**
|
|
864
|
-
* The status of the badge
|
|
865
|
-
*/
|
|
866
|
-
status: {
|
|
867
|
-
type: String,
|
|
868
|
-
reflect: true,
|
|
869
|
-
},
|
|
870
|
-
/**
|
|
871
|
-
* Displays the badge in a circle
|
|
872
|
-
*/
|
|
873
|
-
circle: {
|
|
874
|
-
type: Boolean,
|
|
875
|
-
reflect: true,
|
|
876
|
-
},
|
|
877
|
-
/**
|
|
878
|
-
* Rounds the corners on the badge
|
|
879
|
-
*/
|
|
880
|
-
pill: {
|
|
881
|
-
type: Boolean,
|
|
882
|
-
reflect: true,
|
|
883
|
-
},
|
|
884
|
-
/**
|
|
885
|
-
* Padding on the badge as a circle
|
|
886
|
-
*/
|
|
887
|
-
circlePadding: {
|
|
888
|
-
type: Number,
|
|
889
|
-
attribute: 'circle-padding',
|
|
890
|
-
},
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
constructor() {
|
|
895
|
-
super();
|
|
896
|
-
|
|
897
|
-
this.status = 'primary';
|
|
898
|
-
this.pill = false;
|
|
899
|
-
this.circle = false;
|
|
900
|
-
this.circlePadding = 0;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
render() {
|
|
904
|
-
return $`<slot @slotchange=${() => this.handleSlotChange()}></slot>`;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
handleSlotChange() {
|
|
908
|
-
if (this.circle) {
|
|
909
|
-
this.style.height = `${this.offsetWidth + this.circlePadding}px`;
|
|
910
|
-
this.style.width = `${this.offsetWidth + this.circlePadding}px`;
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
// eslint-disable-next-line no-unused-expressions
|
|
916
|
-
customElements.get('kemet-badge') || customElements.define('kemet-badge', KemetBadge);
|
|
917
|
-
|
|
918
918
|
/**
|
|
919
919
|
* @license
|
|
920
920
|
* Copyright 2018 Google LLC
|
|
@@ -1361,6 +1361,52 @@ class KemetCarouselLast extends s$1 {
|
|
|
1361
1361
|
// eslint-disable-next-line no-unused-expressions
|
|
1362
1362
|
customElements.get('kemet-carousel-last') || customElements.define('kemet-carousel-last', KemetCarouselLast);
|
|
1363
1363
|
|
|
1364
|
+
class KemetCarouselPrev extends s$1 {
|
|
1365
|
+
static get styles() {
|
|
1366
|
+
return [
|
|
1367
|
+
r$3`
|
|
1368
|
+
:host {
|
|
1369
|
+
cursor: pointer;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
:host([disabled]) {
|
|
1373
|
+
cursor: not-allowed;
|
|
1374
|
+
}
|
|
1375
|
+
`,
|
|
1376
|
+
];
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
static get properties() {
|
|
1380
|
+
return {
|
|
1381
|
+
disabled: {
|
|
1382
|
+
type: Boolean,
|
|
1383
|
+
reflect: true,
|
|
1384
|
+
},
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
render() {
|
|
1389
|
+
return $`
|
|
1390
|
+
<span tabindex="0" @keyup=${() => this.prev()} @click=${() => this.prev()}>
|
|
1391
|
+
<slot></slot>
|
|
1392
|
+
</span>
|
|
1393
|
+
`;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
prev() {
|
|
1397
|
+
if (!this.disabled) {
|
|
1398
|
+
this.dispatchEvent(new CustomEvent('kemet-carousel-prev', {
|
|
1399
|
+
bubbles: true,
|
|
1400
|
+
composed: true,
|
|
1401
|
+
detail: this,
|
|
1402
|
+
}));
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
// eslint-disable-next-line no-unused-expressions
|
|
1408
|
+
customElements.get('kemet-carousel-prev') || customElements.define('kemet-carousel-prev', KemetCarouselPrev);
|
|
1409
|
+
|
|
1364
1410
|
class KemetCarouselLink extends s$1 {
|
|
1365
1411
|
static get properties() {
|
|
1366
1412
|
return {
|
|
@@ -1465,52 +1511,6 @@ class KemetCarouselNext extends s$1 {
|
|
|
1465
1511
|
// eslint-disable-next-line no-unused-expressions
|
|
1466
1512
|
customElements.get('kemet-carousel-next') || customElements.define('kemet-carousel-next', KemetCarouselNext);
|
|
1467
1513
|
|
|
1468
|
-
class KemetCarouselPrev extends s$1 {
|
|
1469
|
-
static get styles() {
|
|
1470
|
-
return [
|
|
1471
|
-
r$3`
|
|
1472
|
-
:host {
|
|
1473
|
-
cursor: pointer;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
:host([disabled]) {
|
|
1477
|
-
cursor: not-allowed;
|
|
1478
|
-
}
|
|
1479
|
-
`,
|
|
1480
|
-
];
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
static get properties() {
|
|
1484
|
-
return {
|
|
1485
|
-
disabled: {
|
|
1486
|
-
type: Boolean,
|
|
1487
|
-
reflect: true,
|
|
1488
|
-
},
|
|
1489
|
-
};
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
render() {
|
|
1493
|
-
return $`
|
|
1494
|
-
<span tabindex="0" @keyup=${() => this.prev()} @click=${() => this.prev()}>
|
|
1495
|
-
<slot></slot>
|
|
1496
|
-
</span>
|
|
1497
|
-
`;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
prev() {
|
|
1501
|
-
if (!this.disabled) {
|
|
1502
|
-
this.dispatchEvent(new CustomEvent('kemet-carousel-prev', {
|
|
1503
|
-
bubbles: true,
|
|
1504
|
-
composed: true,
|
|
1505
|
-
detail: this,
|
|
1506
|
-
}));
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
// eslint-disable-next-line no-unused-expressions
|
|
1512
|
-
customElements.get('kemet-carousel-prev') || customElements.define('kemet-carousel-prev', KemetCarouselPrev);
|
|
1513
|
-
|
|
1514
1514
|
class KemetCarouselSlide extends s$1 {
|
|
1515
1515
|
static get styles() {
|
|
1516
1516
|
return [
|
|
@@ -2165,6 +2165,11 @@ class KemetCombo extends s$1 {
|
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
2167
|
|
|
2168
|
+
constructor() {
|
|
2169
|
+
super();
|
|
2170
|
+
this.options = [];
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2168
2173
|
firstUpdated() {
|
|
2169
2174
|
// standard properties
|
|
2170
2175
|
this.field = this.closest('kemet-field');
|
|
@@ -2198,7 +2203,7 @@ class KemetCombo extends s$1 {
|
|
|
2198
2203
|
makeOptions() {
|
|
2199
2204
|
if (this.input) {
|
|
2200
2205
|
this.filteredOptions = this.options.filter(
|
|
2201
|
-
option => option.toLowerCase().indexOf(this.input.value
|
|
2206
|
+
option => option.toLowerCase().indexOf(this.input.value?.toLowerCase()) !== -1,
|
|
2202
2207
|
);
|
|
2203
2208
|
|
|
2204
2209
|
const options = this.filteredOptions.map(
|
package/dist/kemet-components.js
CHANGED
|
@@ -459,6 +459,107 @@ class KemetAccordion extends s$1 {
|
|
|
459
459
|
// eslint-disable-next-line no-unused-expressions
|
|
460
460
|
customElements.get('kemet-accordion') || customElements.define('kemet-accordion', KemetAccordion);
|
|
461
461
|
|
|
462
|
+
class KemetBadge extends s$1 {
|
|
463
|
+
static get styles() {
|
|
464
|
+
return [
|
|
465
|
+
r$3`
|
|
466
|
+
:host {
|
|
467
|
+
display: inline-flex;
|
|
468
|
+
align-items: center;
|
|
469
|
+
justify-content: center;
|
|
470
|
+
padding: var(--kemet-badge-padding, 10px);
|
|
471
|
+
line-height: 1;
|
|
472
|
+
color: var(--kemet-color-white);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
:host([status='primary']) {
|
|
476
|
+
background-color: var(--kemet-color-primary);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
:host([status='success']) {
|
|
480
|
+
background-color: var(--kemet-color-success);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
:host([status='standard']) {
|
|
484
|
+
background-color: var(--kemet-color-gray6);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
:host([status='warning']) {
|
|
488
|
+
background-color: var(--kemet-color-warning);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
:host([status='error']) {
|
|
492
|
+
background-color: var(--kemet-color-error);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
:host([circle]) {
|
|
496
|
+
border-radius: 50%;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
:host([pill]) {
|
|
500
|
+
border-radius: 99rem;
|
|
501
|
+
}
|
|
502
|
+
`,
|
|
503
|
+
];
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
static get properties() {
|
|
507
|
+
return {
|
|
508
|
+
/**
|
|
509
|
+
* The status of the badge
|
|
510
|
+
*/
|
|
511
|
+
status: {
|
|
512
|
+
type: String,
|
|
513
|
+
reflect: true,
|
|
514
|
+
},
|
|
515
|
+
/**
|
|
516
|
+
* Displays the badge in a circle
|
|
517
|
+
*/
|
|
518
|
+
circle: {
|
|
519
|
+
type: Boolean,
|
|
520
|
+
reflect: true,
|
|
521
|
+
},
|
|
522
|
+
/**
|
|
523
|
+
* Rounds the corners on the badge
|
|
524
|
+
*/
|
|
525
|
+
pill: {
|
|
526
|
+
type: Boolean,
|
|
527
|
+
reflect: true,
|
|
528
|
+
},
|
|
529
|
+
/**
|
|
530
|
+
* Padding on the badge as a circle
|
|
531
|
+
*/
|
|
532
|
+
circlePadding: {
|
|
533
|
+
type: Number,
|
|
534
|
+
attribute: 'circle-padding',
|
|
535
|
+
},
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
constructor() {
|
|
540
|
+
super();
|
|
541
|
+
|
|
542
|
+
this.status = 'primary';
|
|
543
|
+
this.pill = false;
|
|
544
|
+
this.circle = false;
|
|
545
|
+
this.circlePadding = 0;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
render() {
|
|
549
|
+
return $`<slot @slotchange=${() => this.handleSlotChange()}></slot>`;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
handleSlotChange() {
|
|
553
|
+
if (this.circle) {
|
|
554
|
+
this.style.height = `${this.offsetWidth + this.circlePadding}px`;
|
|
555
|
+
this.style.width = `${this.offsetWidth + this.circlePadding}px`;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// eslint-disable-next-line no-unused-expressions
|
|
561
|
+
customElements.get('kemet-badge') || customElements.define('kemet-badge', KemetBadge);
|
|
562
|
+
|
|
462
563
|
class FormSubmitController {
|
|
463
564
|
host;
|
|
464
565
|
form;
|
|
@@ -810,107 +911,6 @@ class KemetButton extends s$1 {
|
|
|
810
911
|
// eslint-disable-next-line no-unused-expressions
|
|
811
912
|
customElements.get('kemet-button') || customElements.define('kemet-button', KemetButton);
|
|
812
913
|
|
|
813
|
-
class KemetBadge extends s$1 {
|
|
814
|
-
static get styles() {
|
|
815
|
-
return [
|
|
816
|
-
r$3`
|
|
817
|
-
:host {
|
|
818
|
-
display: inline-flex;
|
|
819
|
-
align-items: center;
|
|
820
|
-
justify-content: center;
|
|
821
|
-
padding: var(--kemet-badge-padding, 10px);
|
|
822
|
-
line-height: 1;
|
|
823
|
-
color: var(--kemet-color-white);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
:host([status='primary']) {
|
|
827
|
-
background-color: var(--kemet-color-primary);
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
:host([status='success']) {
|
|
831
|
-
background-color: var(--kemet-color-success);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
:host([status='standard']) {
|
|
835
|
-
background-color: var(--kemet-color-gray6);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
:host([status='warning']) {
|
|
839
|
-
background-color: var(--kemet-color-warning);
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
:host([status='error']) {
|
|
843
|
-
background-color: var(--kemet-color-error);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
:host([circle]) {
|
|
847
|
-
border-radius: 50%;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
:host([pill]) {
|
|
851
|
-
border-radius: 99rem;
|
|
852
|
-
}
|
|
853
|
-
`,
|
|
854
|
-
];
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
static get properties() {
|
|
858
|
-
return {
|
|
859
|
-
/**
|
|
860
|
-
* The status of the badge
|
|
861
|
-
*/
|
|
862
|
-
status: {
|
|
863
|
-
type: String,
|
|
864
|
-
reflect: true,
|
|
865
|
-
},
|
|
866
|
-
/**
|
|
867
|
-
* Displays the badge in a circle
|
|
868
|
-
*/
|
|
869
|
-
circle: {
|
|
870
|
-
type: Boolean,
|
|
871
|
-
reflect: true,
|
|
872
|
-
},
|
|
873
|
-
/**
|
|
874
|
-
* Rounds the corners on the badge
|
|
875
|
-
*/
|
|
876
|
-
pill: {
|
|
877
|
-
type: Boolean,
|
|
878
|
-
reflect: true,
|
|
879
|
-
},
|
|
880
|
-
/**
|
|
881
|
-
* Padding on the badge as a circle
|
|
882
|
-
*/
|
|
883
|
-
circlePadding: {
|
|
884
|
-
type: Number,
|
|
885
|
-
attribute: 'circle-padding',
|
|
886
|
-
},
|
|
887
|
-
};
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
constructor() {
|
|
891
|
-
super();
|
|
892
|
-
|
|
893
|
-
this.status = 'primary';
|
|
894
|
-
this.pill = false;
|
|
895
|
-
this.circle = false;
|
|
896
|
-
this.circlePadding = 0;
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
render() {
|
|
900
|
-
return $`<slot @slotchange=${() => this.handleSlotChange()}></slot>`;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
handleSlotChange() {
|
|
904
|
-
if (this.circle) {
|
|
905
|
-
this.style.height = `${this.offsetWidth + this.circlePadding}px`;
|
|
906
|
-
this.style.width = `${this.offsetWidth + this.circlePadding}px`;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
// eslint-disable-next-line no-unused-expressions
|
|
912
|
-
customElements.get('kemet-badge') || customElements.define('kemet-badge', KemetBadge);
|
|
913
|
-
|
|
914
914
|
/**
|
|
915
915
|
* @license
|
|
916
916
|
* Copyright 2018 Google LLC
|
|
@@ -1357,6 +1357,52 @@ class KemetCarouselLast extends s$1 {
|
|
|
1357
1357
|
// eslint-disable-next-line no-unused-expressions
|
|
1358
1358
|
customElements.get('kemet-carousel-last') || customElements.define('kemet-carousel-last', KemetCarouselLast);
|
|
1359
1359
|
|
|
1360
|
+
class KemetCarouselPrev extends s$1 {
|
|
1361
|
+
static get styles() {
|
|
1362
|
+
return [
|
|
1363
|
+
r$3`
|
|
1364
|
+
:host {
|
|
1365
|
+
cursor: pointer;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
:host([disabled]) {
|
|
1369
|
+
cursor: not-allowed;
|
|
1370
|
+
}
|
|
1371
|
+
`,
|
|
1372
|
+
];
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
static get properties() {
|
|
1376
|
+
return {
|
|
1377
|
+
disabled: {
|
|
1378
|
+
type: Boolean,
|
|
1379
|
+
reflect: true,
|
|
1380
|
+
},
|
|
1381
|
+
};
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
render() {
|
|
1385
|
+
return $`
|
|
1386
|
+
<span tabindex="0" @keyup=${() => this.prev()} @click=${() => this.prev()}>
|
|
1387
|
+
<slot></slot>
|
|
1388
|
+
</span>
|
|
1389
|
+
`;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
prev() {
|
|
1393
|
+
if (!this.disabled) {
|
|
1394
|
+
this.dispatchEvent(new CustomEvent('kemet-carousel-prev', {
|
|
1395
|
+
bubbles: true,
|
|
1396
|
+
composed: true,
|
|
1397
|
+
detail: this,
|
|
1398
|
+
}));
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
// eslint-disable-next-line no-unused-expressions
|
|
1404
|
+
customElements.get('kemet-carousel-prev') || customElements.define('kemet-carousel-prev', KemetCarouselPrev);
|
|
1405
|
+
|
|
1360
1406
|
class KemetCarouselLink extends s$1 {
|
|
1361
1407
|
static get properties() {
|
|
1362
1408
|
return {
|
|
@@ -1461,52 +1507,6 @@ class KemetCarouselNext extends s$1 {
|
|
|
1461
1507
|
// eslint-disable-next-line no-unused-expressions
|
|
1462
1508
|
customElements.get('kemet-carousel-next') || customElements.define('kemet-carousel-next', KemetCarouselNext);
|
|
1463
1509
|
|
|
1464
|
-
class KemetCarouselPrev extends s$1 {
|
|
1465
|
-
static get styles() {
|
|
1466
|
-
return [
|
|
1467
|
-
r$3`
|
|
1468
|
-
:host {
|
|
1469
|
-
cursor: pointer;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
:host([disabled]) {
|
|
1473
|
-
cursor: not-allowed;
|
|
1474
|
-
}
|
|
1475
|
-
`,
|
|
1476
|
-
];
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
static get properties() {
|
|
1480
|
-
return {
|
|
1481
|
-
disabled: {
|
|
1482
|
-
type: Boolean,
|
|
1483
|
-
reflect: true,
|
|
1484
|
-
},
|
|
1485
|
-
};
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
render() {
|
|
1489
|
-
return $`
|
|
1490
|
-
<span tabindex="0" @keyup=${() => this.prev()} @click=${() => this.prev()}>
|
|
1491
|
-
<slot></slot>
|
|
1492
|
-
</span>
|
|
1493
|
-
`;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
prev() {
|
|
1497
|
-
if (!this.disabled) {
|
|
1498
|
-
this.dispatchEvent(new CustomEvent('kemet-carousel-prev', {
|
|
1499
|
-
bubbles: true,
|
|
1500
|
-
composed: true,
|
|
1501
|
-
detail: this,
|
|
1502
|
-
}));
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
// eslint-disable-next-line no-unused-expressions
|
|
1508
|
-
customElements.get('kemet-carousel-prev') || customElements.define('kemet-carousel-prev', KemetCarouselPrev);
|
|
1509
|
-
|
|
1510
1510
|
class KemetCarouselSlide extends s$1 {
|
|
1511
1511
|
static get styles() {
|
|
1512
1512
|
return [
|
|
@@ -2161,6 +2161,11 @@ class KemetCombo extends s$1 {
|
|
|
2161
2161
|
};
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
+
constructor() {
|
|
2165
|
+
super();
|
|
2166
|
+
this.options = [];
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2164
2169
|
firstUpdated() {
|
|
2165
2170
|
// standard properties
|
|
2166
2171
|
this.field = this.closest('kemet-field');
|
|
@@ -2194,7 +2199,7 @@ class KemetCombo extends s$1 {
|
|
|
2194
2199
|
makeOptions() {
|
|
2195
2200
|
if (this.input) {
|
|
2196
2201
|
this.filteredOptions = this.options.filter(
|
|
2197
|
-
option => option.toLowerCase().indexOf(this.input.value
|
|
2202
|
+
option => option.toLowerCase().indexOf(this.input.value?.toLowerCase()) !== -1,
|
|
2198
2203
|
);
|
|
2199
2204
|
|
|
2200
2205
|
const options = this.filteredOptions.map(
|