@tet/tet-components 1.3.35-staging → 1.3.36-staging
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tet-accordion.cjs.entry.js +6 -6
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +1 -1
- package/dist/cjs/tet-b2b-service-calculator.cjs.entry.js +1 -1
- package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-lines.cjs.entry.js +1 -1
- package/dist/cjs/tet-button.cjs.entry.js +9 -1
- package/dist/cjs/tet-colors.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-card_4.cjs.entry.js +2 -2
- package/dist/cjs/tet-components.cjs.js +1 -1
- package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
- package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
- package/dist/cjs/tet-grid.cjs.entry.js +1 -1
- package/dist/cjs/tet-input.cjs.entry.js +2 -2
- package/dist/cjs/tet-layout.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +1 -1
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +3 -3
- package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-notification.cjs.entry.js +1 -1
- package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
- package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-textarea.cjs.entry.js +44 -8
- package/dist/cjs/tet-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.css +51 -172
- package/dist/collection/components/basic/buttons/tet-button/test/tet-button.spec.js +15 -0
- package/dist/collection/components/basic/buttons/tet-button/tet-button.js +45 -1
- package/dist/collection/components/simple/inputs/tet-dropdown/tet-dropdown.css +54 -19
- package/dist/collection/components/simple/inputs/tet-input/test/tet-input.spec.js +5 -5
- package/dist/collection/components/simple/inputs/tet-input/tet-input.css +54 -26
- package/dist/collection/components/simple/inputs/tet-input/tet-input.js +1 -1
- package/dist/collection/components/simple/inputs/tet-textarea/tet-textarea.css +647 -30
- package/dist/collection/components/simple/inputs/tet-textarea/tet-textarea.js +91 -13
- package/dist/collection/components/simple/lists/tet-news-card-list/tet-news-card-list.js +1 -1
- package/dist/collection/components/simple/lists/tet-text-list/tet-text-list.css +51 -172
- package/dist/collection/components/simple/menu/tet-navigation-mobile/tet-navigation-mobile.js +3 -3
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.js +6 -6
- package/dist/collection/components/simple/structural/tet-expansion-panel/tet-expansion-panel.js +1 -1
- package/dist/collection/components/simple/text-blocks/tet-notification/tet-notification.js +1 -1
- package/dist/collection/components/simple/text-blocks/tet-tooltip/tet-tooltip.js +1 -1
- package/dist/collection/components/views/tet-address-offers-view/tet-address-offers-view.js +1 -1
- package/dist/collection/components/views/tet-b2b-service-calculator/tet-b2b-service-calculator.js +1 -1
- package/dist/collection/components/views/tet-business-lines/tet-business-lines.js +1 -1
- package/dist/collection/docs/styling/border-radius/tet-border-radius.js +1 -1
- package/dist/collection/docs/styling/colors/tet-colors.js +3 -3
- package/dist/collection/docs/styling/font-weight/tet-font-weight.js +1 -1
- package/dist/collection/docs/styling/fonts/tet-fonts.js +1 -1
- package/dist/collection/docs/styling/layout/tet-layout.js +1 -1
- package/dist/collection/docs/styling/link/tet-link.js +1 -1
- package/dist/collection/docs/styling/spacing/tet-spacing.js +1 -1
- package/dist/collection/docs/styling/tet-grid/tet-grid.js +1 -1
- package/dist/components/{p-10ac7329.js → p-0e8e9969.js} +1 -1
- package/dist/components/{p-acfce9fc.js → p-137831a1.js} +2 -2
- package/dist/components/{p-b7a584f2.js → p-2512a377.js} +1 -1
- package/dist/components/{p-92212842.js → p-3224ce0c.js} +1 -1
- package/dist/components/{p-c815ced9.js → p-35989691.js} +2 -2
- package/dist/components/{p-c3505a00.js → p-59637c1a.js} +1 -1
- package/dist/components/{p-7dbe7816.js → p-6fbac2cc.js} +1 -1
- package/dist/components/{p-8911f3cb.js → p-7ab97fb1.js} +12 -2
- package/dist/components/{p-9562e2a7.js → p-7d8a6b54.js} +1 -1
- package/dist/components/{p-d1a5c127.js → p-8d5857fd.js} +2 -2
- package/dist/components/{p-3f462a6d.js → p-afca8b65.js} +1 -1
- package/dist/components/{p-48de78b0.js → p-b8b28286.js} +2 -2
- package/dist/components/{p-9b01a541.js → p-dda0282b.js} +1 -1
- package/dist/components/{p-65af555d.js → p-ecec9519.js} +2 -2
- package/dist/components/{p-d1850046.js → p-ff31012f.js} +2 -2
- package/dist/components/tet-accordion.js +6 -6
- package/dist/components/tet-address-offers-view.js +8 -8
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-address-search.js +1 -1
- package/dist/components/tet-asset-addresses.js +2 -2
- package/dist/components/tet-autocomplete-dropdown.js +1 -1
- package/dist/components/tet-availability-contact-form.js +1 -1
- package/dist/components/tet-b2b-service-calculator.js +4 -4
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-compare-card.js +1 -1
- package/dist/components/tet-business-lines.js +1 -1
- package/dist/components/tet-button.js +1 -1
- package/dist/components/tet-card-list.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +2 -2
- package/dist/components/tet-cloud-configurator.js +3 -3
- package/dist/components/tet-colors.js +3 -3
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +3 -3
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-contact-form.js +2 -2
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-expandable-input.js +1 -1
- package/dist/components/tet-expansion-panel.js +1 -1
- package/dist/components/tet-font-weight.js +1 -1
- package/dist/components/tet-fonts.js +1 -1
- package/dist/components/tet-grid.js +1 -1
- package/dist/components/tet-input.js +1 -1
- package/dist/components/tet-layout.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-macd-view.js +2 -2
- package/dist/components/tet-multi-step-dialog.js +1 -1
- package/dist/components/tet-navigation-mobile.js +3 -3
- package/dist/components/tet-news-card-list.js +3 -3
- package/dist/components/tet-notification.js +1 -1
- package/dist/components/tet-number-input.js +1 -1
- package/dist/components/tet-range-slider.js +1 -1
- package/dist/components/tet-referral.js +2 -2
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-stepper-input.js +1 -1
- package/dist/components/tet-table.js +1 -1
- package/dist/components/tet-text-list.js +1 -1
- package/dist/components/tet-textarea.js +49 -10
- package/dist/components/tet-thank-you-view-v2.js +1 -1
- package/dist/components/tet-thank-you-view.js +1 -1
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tet-accordion.entry.js +6 -6
- package/dist/esm/tet-address-offers-view.entry.js +1 -1
- package/dist/esm/tet-b2b-service-calculator.entry.js +1 -1
- package/dist/esm/tet-border-radius.entry.js +1 -1
- package/dist/esm/tet-business-lines.entry.js +1 -1
- package/dist/esm/tet-button.entry.js +9 -1
- package/dist/esm/tet-colors.entry.js +3 -3
- package/dist/esm/tet-compare-card_4.entry.js +2 -2
- package/dist/esm/tet-components.js +1 -1
- package/dist/esm/tet-expansion-panel.entry.js +1 -1
- package/dist/esm/tet-font-weight.entry.js +1 -1
- package/dist/esm/tet-fonts.entry.js +1 -1
- package/dist/esm/tet-grid.entry.js +1 -1
- package/dist/esm/tet-input.entry.js +2 -2
- package/dist/esm/tet-layout.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +1 -1
- package/dist/esm/tet-navigation-mobile.entry.js +3 -3
- package/dist/esm/tet-news-card-list.entry.js +1 -1
- package/dist/esm/tet-notification.entry.js +1 -1
- package/dist/esm/tet-spacing.entry.js +1 -1
- package/dist/esm/tet-text-list.entry.js +1 -1
- package/dist/esm/tet-textarea.entry.js +44 -8
- package/dist/esm/tet-tooltip.entry.js +1 -1
- package/dist/tet-components/{p-26eba44f.entry.js → p-15b70f90.entry.js} +1 -1
- package/dist/tet-components/{p-e07d1bd1.entry.js → p-17028ff9.entry.js} +1 -1
- package/dist/tet-components/{p-45e14d92.entry.js → p-25f8f58c.entry.js} +1 -1
- package/dist/tet-components/p-28ca2ec4.entry.js +1 -0
- package/dist/tet-components/{p-ebf0611c.entry.js → p-313f016d.entry.js} +1 -1
- package/dist/tet-components/{p-44822ad9.entry.js → p-3b6ad95f.entry.js} +1 -1
- package/dist/tet-components/{p-1268aa23.entry.js → p-3d1093ac.entry.js} +1 -1
- package/dist/tet-components/{p-83d64cbd.entry.js → p-43bcfad3.entry.js} +1 -1
- package/dist/tet-components/{p-a0f7099f.entry.js → p-4864da73.entry.js} +1 -1
- package/dist/tet-components/{p-4ae6e17c.entry.js → p-48b0ca02.entry.js} +1 -1
- package/dist/tet-components/{p-486cb131.entry.js → p-51093fb8.entry.js} +1 -1
- package/dist/tet-components/{p-0c9675d2.entry.js → p-7fd1cbd0.entry.js} +1 -1
- package/dist/tet-components/{p-8c2b999b.entry.js → p-833f5a7b.entry.js} +1 -1
- package/dist/tet-components/{p-2cc550a0.entry.js → p-88a1be78.entry.js} +1 -1
- package/dist/tet-components/p-8b38a255.entry.js +1 -0
- package/dist/tet-components/p-a2fb3ecf.entry.js +1 -0
- package/dist/tet-components/{p-0b901542.entry.js → p-a811d7fe.entry.js} +1 -1
- package/dist/tet-components/{p-14598ec6.entry.js → p-aef89e2d.entry.js} +1 -1
- package/dist/tet-components/{p-becd06b3.entry.js → p-c016df1b.entry.js} +1 -1
- package/dist/tet-components/{p-af1eff3f.entry.js → p-e31d543a.entry.js} +1 -1
- package/dist/tet-components/p-e73357e6.entry.js +1 -0
- package/dist/tet-components/{p-e6ea5a96.entry.js → p-f125b69a.entry.js} +1 -1
- package/dist/tet-components/tet-components.css +1 -1
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/basic/buttons/tet-button/tet-button.d.ts +5 -0
- package/dist/types/components/simple/inputs/tet-textarea/tet-textarea.d.ts +27 -4
- package/dist/types/components.d.ts +27 -3
- package/package.json +1 -1
- package/dist/tet-components/p-4bce5438.entry.js +0 -1
- package/dist/tet-components/p-67b4dd36.entry.js +0 -1
- package/dist/tet-components/p-c2720ef1.entry.js +0 -1
- package/dist/tet-components/p-c5589653.entry.js +0 -1
|
@@ -480,9 +480,12 @@
|
|
|
480
480
|
--input-border-disabled: rgb(215, 219, 224);
|
|
481
481
|
--input-disabled-background-color: rgba(88, 99, 116, 0.08);
|
|
482
482
|
--input-disabled-icon-color: var(--input-icon-color);
|
|
483
|
+
--textarea-border-radius: 0.625rem;
|
|
484
|
+
--textarea-min-height: 5.25rem;
|
|
483
485
|
}
|
|
484
486
|
|
|
485
|
-
.tet-input__dark
|
|
487
|
+
.tet-input__dark,
|
|
488
|
+
.tet-textarea__dark {
|
|
486
489
|
--input-icon-color: var(--tc-icon-primary-dark);
|
|
487
490
|
--input-label-color: var(--tc-text-primary-dark);
|
|
488
491
|
--input-text-color: var(--tc-text-primary-dark);
|
|
@@ -501,7 +504,8 @@
|
|
|
501
504
|
--input-disabled-icon-color: var(--tc-button-icon-inverse-disabled-dark);
|
|
502
505
|
--input-color-error: var(--tc-alert-accent-error-dark);
|
|
503
506
|
}
|
|
504
|
-
.tet-input__dark.tet-input__dark.keyboard-focus:focus
|
|
507
|
+
.tet-input__dark.tet-input__dark.keyboard-focus:focus,
|
|
508
|
+
.tet-textarea__dark.tet-input__dark.keyboard-focus:focus {
|
|
505
509
|
outline: 0.125rem solid var(--tc-blue-40);
|
|
506
510
|
outline: 0.125rem solid var(--tc-blue-40-dark);
|
|
507
511
|
outline-offset: 0.125rem;
|
|
@@ -526,7 +530,8 @@
|
|
|
526
530
|
--input-disabled-text-color: rgb(67, 75, 86);
|
|
527
531
|
}
|
|
528
532
|
|
|
529
|
-
.tet-input__light
|
|
533
|
+
.tet-input__light,
|
|
534
|
+
.tet-textarea__light {
|
|
530
535
|
--input-icon-color: var(--tc-icon-primary);
|
|
531
536
|
--input-label-color: var(--tc-text-primary);
|
|
532
537
|
--input-text-color: var(--tc-text-primary);
|
|
@@ -558,7 +563,8 @@
|
|
|
558
563
|
--input-focus-background-color: #1d2128;
|
|
559
564
|
}
|
|
560
565
|
|
|
561
|
-
.tet-input__base
|
|
566
|
+
.tet-input__base,
|
|
567
|
+
.tet-textarea__base {
|
|
562
568
|
width: 100%;
|
|
563
569
|
height: var(--input-height);
|
|
564
570
|
box-sizing: border-box;
|
|
@@ -591,74 +597,103 @@
|
|
|
591
597
|
* }
|
|
592
598
|
*/
|
|
593
599
|
}
|
|
594
|
-
.tet-input__base::placeholder
|
|
600
|
+
.tet-input__base::placeholder,
|
|
601
|
+
.tet-textarea__base::placeholder {
|
|
595
602
|
color: var(--input-placeholder-color);
|
|
596
603
|
}
|
|
597
|
-
.tet-input__base.tet-input__mint-original:not(:disabled):hover
|
|
604
|
+
.tet-input__base.tet-input__mint-original:not(:disabled):hover,
|
|
605
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):hover {
|
|
598
606
|
background-color: #1d2128;
|
|
599
607
|
border-color: #01cbe0;
|
|
600
608
|
box-shadow: 0 0.0625rem 0.25rem 0.125rem rgba(1, 203, 224, 0.4);
|
|
601
609
|
}
|
|
602
|
-
.tet-input__base.tet-input__mint-original:not(:disabled):hover.error, .tet-input__base.tet-input__mint-original:not(:disabled):focus.error, .tet-input__base.tet-input__mint-original:not(:disabled):active.error
|
|
610
|
+
.tet-input__base.tet-input__mint-original:not(:disabled):hover.error, .tet-input__base.tet-input__mint-original:not(:disabled):focus.error, .tet-input__base.tet-input__mint-original:not(:disabled):active.error,
|
|
611
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):hover.error,
|
|
612
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):focus.error,
|
|
613
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):active.error {
|
|
603
614
|
border-color: rgb(233, 69, 54);
|
|
604
615
|
}
|
|
605
|
-
.tet-input__base.tet-input__mint-original:not(:disabled):focus, .tet-input__base.tet-input__mint-original:not(:disabled):active
|
|
616
|
+
.tet-input__base.tet-input__mint-original:not(:disabled):focus, .tet-input__base.tet-input__mint-original:not(:disabled):active,
|
|
617
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):focus,
|
|
618
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):active {
|
|
606
619
|
outline: none;
|
|
607
620
|
}
|
|
608
|
-
.tet-input__base.tet-input__mint-original.keyboard-focus:focus
|
|
621
|
+
.tet-input__base.tet-input__mint-original.keyboard-focus:focus,
|
|
622
|
+
.tet-textarea__base.tet-input__mint-original.keyboard-focus:focus {
|
|
609
623
|
outline: 0.125rem solid var(--tc-blue-40);
|
|
610
624
|
outline-offset: 0.125rem;
|
|
611
625
|
transition: outline 0s;
|
|
612
626
|
box-shadow: none;
|
|
613
627
|
}
|
|
614
|
-
.tet-input__base[disabled]
|
|
628
|
+
.tet-input__base[disabled],
|
|
629
|
+
.tet-textarea__base[disabled] {
|
|
615
630
|
cursor: not-allowed;
|
|
616
631
|
outline: none;
|
|
617
632
|
border: 0.0625rem solid var(--input-border-disabled);
|
|
618
633
|
background-color: var(--input-disabled-background-color);
|
|
619
634
|
color: var(--input-disabled-text-color);
|
|
620
635
|
}
|
|
621
|
-
.tet-input__base:not(:disabled).error
|
|
636
|
+
.tet-input__base:not(:disabled).error,
|
|
637
|
+
.tet-textarea__base:not(:disabled).error {
|
|
622
638
|
border-color: var(--input-color-error);
|
|
623
639
|
}
|
|
624
|
-
.tet-input__base:not(:disabled):hover
|
|
640
|
+
.tet-input__base:not(:disabled):hover,
|
|
641
|
+
.tet-textarea__base:not(:disabled):hover {
|
|
625
642
|
background: var(--input-hover-background-color);
|
|
626
643
|
}
|
|
627
|
-
.tet-input__base:not(:disabled):focus, .tet-input__base:not(:disabled):active
|
|
644
|
+
.tet-input__base:not(:disabled):focus, .tet-input__base:not(:disabled):active,
|
|
645
|
+
.tet-textarea__base:not(:disabled):focus,
|
|
646
|
+
.tet-textarea__base:not(:disabled):active {
|
|
628
647
|
background: var(--input-focus-background-color);
|
|
629
648
|
border: 0.0625rem solid var(--input-focus-border-color);
|
|
630
649
|
box-shadow: 0 0 0 0.25rem var(--input-focus-outline-color);
|
|
631
650
|
}
|
|
632
|
-
.tet-input__base.keyboard-focus:focus
|
|
651
|
+
.tet-input__base.keyboard-focus:focus,
|
|
652
|
+
.tet-textarea__base.keyboard-focus:focus {
|
|
633
653
|
outline: 0.125rem solid var(--tc-blue-40);
|
|
634
654
|
outline-offset: 0.125rem;
|
|
635
655
|
transition: outline 0s;
|
|
636
656
|
box-shadow: none;
|
|
637
657
|
}
|
|
638
|
-
.tet-input__base.error
|
|
658
|
+
.tet-input__base.error:not(:disabled).keyboard-focus,
|
|
659
|
+
.tet-textarea__base.error:not(:disabled).keyboard-focus {
|
|
639
660
|
border-color: var(--input-color-error);
|
|
640
661
|
}
|
|
641
662
|
|
|
642
|
-
.tet-input__label
|
|
663
|
+
.tet-input__label,
|
|
664
|
+
.tet-textarea__label {
|
|
643
665
|
display: block;
|
|
644
666
|
margin-left: 0.25rem !important;
|
|
645
667
|
margin-bottom: 0.25rem !important;
|
|
646
668
|
color: var(--input-label-color);
|
|
647
669
|
font: 500 0.875rem/1.25rem "Inter", "Gilroy, Arial, sans-serif";
|
|
648
670
|
}
|
|
649
|
-
.tet-input__label.tet-input__mint-original
|
|
671
|
+
.tet-input__label.tet-input__mint-original,
|
|
672
|
+
.tet-textarea__label.tet-input__mint-original {
|
|
650
673
|
margin-left: 0 !important;
|
|
651
674
|
font-family: var(--font-family-fallback);
|
|
652
675
|
}
|
|
653
|
-
.tet-input__label:has(~ .input-container input[disabled])
|
|
676
|
+
.tet-input__label:has(~ .input-container input[disabled]),
|
|
677
|
+
.tet-textarea__label:has(~ .input-container input[disabled]) {
|
|
654
678
|
color: var(--input-disabled-label-color);
|
|
655
679
|
}
|
|
656
680
|
|
|
657
|
-
.tet-input__error-message
|
|
681
|
+
.tet-input__error-message,
|
|
682
|
+
.tet-textarea__error-message {
|
|
658
683
|
font: 500 0.75rem/1rem "Inter", "Gilroy, Arial, sans-serif";
|
|
659
684
|
color: var(--input-color-error);
|
|
660
685
|
}
|
|
661
686
|
|
|
687
|
+
.errors {
|
|
688
|
+
display: flex;
|
|
689
|
+
flex-direction: column;
|
|
690
|
+
gap: 0.5em;
|
|
691
|
+
margin-top: 0.5em;
|
|
692
|
+
}
|
|
693
|
+
.errors--hidden {
|
|
694
|
+
display: none;
|
|
695
|
+
}
|
|
696
|
+
|
|
662
697
|
:host {
|
|
663
698
|
/**
|
|
664
699
|
* @prop --options-max-height: The maximum height of the options panel.
|
|
@@ -82,25 +82,25 @@ describe('tet-input', () => {
|
|
|
82
82
|
const validators = [new RequiredValidator('Test required validation message')];
|
|
83
83
|
const page = await newSpecPage({
|
|
84
84
|
components: [TetInput],
|
|
85
|
-
template: () => h("tet-input", { validators: validators }),
|
|
85
|
+
template: () => h("tet-input", { validators: validators, theme: "dark" }),
|
|
86
86
|
});
|
|
87
87
|
// Trigger validation
|
|
88
88
|
await page.root.validateInput();
|
|
89
89
|
await page.waitForChanges();
|
|
90
90
|
expect(page.root).toEqualHtml(`
|
|
91
91
|
<tet-input>
|
|
92
|
-
<label class="
|
|
93
|
-
<div class="input-container tet-
|
|
92
|
+
<label class="dark">
|
|
93
|
+
<div class="input-container tet-input__dark">
|
|
94
94
|
<input
|
|
95
95
|
autocomplete="off"
|
|
96
|
-
class="error tet-input__base tet-
|
|
96
|
+
class="error tet-input__base tet-input__dark"
|
|
97
97
|
placeholder=""
|
|
98
98
|
type="text"
|
|
99
99
|
value=""
|
|
100
100
|
/>
|
|
101
101
|
</div>
|
|
102
102
|
</label>
|
|
103
|
-
<div class="errors">
|
|
103
|
+
<div class="errors tet-input__dark">
|
|
104
104
|
<p class="tet-input__error-message">Test required validation message</p>
|
|
105
105
|
</div>
|
|
106
106
|
</tet-input>
|
|
@@ -480,9 +480,12 @@
|
|
|
480
480
|
--input-border-disabled: rgb(215, 219, 224);
|
|
481
481
|
--input-disabled-background-color: rgba(88, 99, 116, 0.08);
|
|
482
482
|
--input-disabled-icon-color: var(--input-icon-color);
|
|
483
|
+
--textarea-border-radius: 0.625rem;
|
|
484
|
+
--textarea-min-height: 5.25rem;
|
|
483
485
|
}
|
|
484
486
|
|
|
485
|
-
.tet-input__dark
|
|
487
|
+
.tet-input__dark,
|
|
488
|
+
.tet-textarea__dark {
|
|
486
489
|
--input-icon-color: var(--tc-icon-primary-dark);
|
|
487
490
|
--input-label-color: var(--tc-text-primary-dark);
|
|
488
491
|
--input-text-color: var(--tc-text-primary-dark);
|
|
@@ -501,7 +504,8 @@
|
|
|
501
504
|
--input-disabled-icon-color: var(--tc-button-icon-inverse-disabled-dark);
|
|
502
505
|
--input-color-error: var(--tc-alert-accent-error-dark);
|
|
503
506
|
}
|
|
504
|
-
.tet-input__dark.tet-input__dark.keyboard-focus:focus
|
|
507
|
+
.tet-input__dark.tet-input__dark.keyboard-focus:focus,
|
|
508
|
+
.tet-textarea__dark.tet-input__dark.keyboard-focus:focus {
|
|
505
509
|
outline: 0.125rem solid var(--tc-blue-40);
|
|
506
510
|
outline: 0.125rem solid var(--tc-blue-40-dark);
|
|
507
511
|
outline-offset: 0.125rem;
|
|
@@ -526,7 +530,8 @@
|
|
|
526
530
|
--input-disabled-text-color: rgb(67, 75, 86);
|
|
527
531
|
}
|
|
528
532
|
|
|
529
|
-
.tet-input__light
|
|
533
|
+
.tet-input__light,
|
|
534
|
+
.tet-textarea__light {
|
|
530
535
|
--input-icon-color: var(--tc-icon-primary);
|
|
531
536
|
--input-label-color: var(--tc-text-primary);
|
|
532
537
|
--input-text-color: var(--tc-text-primary);
|
|
@@ -558,7 +563,8 @@
|
|
|
558
563
|
--input-focus-background-color: #1d2128;
|
|
559
564
|
}
|
|
560
565
|
|
|
561
|
-
.tet-input__base
|
|
566
|
+
.tet-input__base,
|
|
567
|
+
.tet-textarea__base {
|
|
562
568
|
width: 100%;
|
|
563
569
|
height: var(--input-height);
|
|
564
570
|
box-sizing: border-box;
|
|
@@ -591,74 +597,103 @@
|
|
|
591
597
|
* }
|
|
592
598
|
*/
|
|
593
599
|
}
|
|
594
|
-
.tet-input__base::placeholder
|
|
600
|
+
.tet-input__base::placeholder,
|
|
601
|
+
.tet-textarea__base::placeholder {
|
|
595
602
|
color: var(--input-placeholder-color);
|
|
596
603
|
}
|
|
597
|
-
.tet-input__base.tet-input__mint-original:not(:disabled):hover
|
|
604
|
+
.tet-input__base.tet-input__mint-original:not(:disabled):hover,
|
|
605
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):hover {
|
|
598
606
|
background-color: #1d2128;
|
|
599
607
|
border-color: #01cbe0;
|
|
600
608
|
box-shadow: 0 0.0625rem 0.25rem 0.125rem rgba(1, 203, 224, 0.4);
|
|
601
609
|
}
|
|
602
|
-
.tet-input__base.tet-input__mint-original:not(:disabled):hover.error, .tet-input__base.tet-input__mint-original:not(:disabled):focus.error, .tet-input__base.tet-input__mint-original:not(:disabled):active.error
|
|
610
|
+
.tet-input__base.tet-input__mint-original:not(:disabled):hover.error, .tet-input__base.tet-input__mint-original:not(:disabled):focus.error, .tet-input__base.tet-input__mint-original:not(:disabled):active.error,
|
|
611
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):hover.error,
|
|
612
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):focus.error,
|
|
613
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):active.error {
|
|
603
614
|
border-color: rgb(233, 69, 54);
|
|
604
615
|
}
|
|
605
|
-
.tet-input__base.tet-input__mint-original:not(:disabled):focus, .tet-input__base.tet-input__mint-original:not(:disabled):active
|
|
616
|
+
.tet-input__base.tet-input__mint-original:not(:disabled):focus, .tet-input__base.tet-input__mint-original:not(:disabled):active,
|
|
617
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):focus,
|
|
618
|
+
.tet-textarea__base.tet-input__mint-original:not(:disabled):active {
|
|
606
619
|
outline: none;
|
|
607
620
|
}
|
|
608
|
-
.tet-input__base.tet-input__mint-original.keyboard-focus:focus
|
|
621
|
+
.tet-input__base.tet-input__mint-original.keyboard-focus:focus,
|
|
622
|
+
.tet-textarea__base.tet-input__mint-original.keyboard-focus:focus {
|
|
609
623
|
outline: 0.125rem solid var(--tc-blue-40);
|
|
610
624
|
outline-offset: 0.125rem;
|
|
611
625
|
transition: outline 0s;
|
|
612
626
|
box-shadow: none;
|
|
613
627
|
}
|
|
614
|
-
.tet-input__base[disabled]
|
|
628
|
+
.tet-input__base[disabled],
|
|
629
|
+
.tet-textarea__base[disabled] {
|
|
615
630
|
cursor: not-allowed;
|
|
616
631
|
outline: none;
|
|
617
632
|
border: 0.0625rem solid var(--input-border-disabled);
|
|
618
633
|
background-color: var(--input-disabled-background-color);
|
|
619
634
|
color: var(--input-disabled-text-color);
|
|
620
635
|
}
|
|
621
|
-
.tet-input__base:not(:disabled).error
|
|
636
|
+
.tet-input__base:not(:disabled).error,
|
|
637
|
+
.tet-textarea__base:not(:disabled).error {
|
|
622
638
|
border-color: var(--input-color-error);
|
|
623
639
|
}
|
|
624
|
-
.tet-input__base:not(:disabled):hover
|
|
640
|
+
.tet-input__base:not(:disabled):hover,
|
|
641
|
+
.tet-textarea__base:not(:disabled):hover {
|
|
625
642
|
background: var(--input-hover-background-color);
|
|
626
643
|
}
|
|
627
|
-
.tet-input__base:not(:disabled):focus, .tet-input__base:not(:disabled):active
|
|
644
|
+
.tet-input__base:not(:disabled):focus, .tet-input__base:not(:disabled):active,
|
|
645
|
+
.tet-textarea__base:not(:disabled):focus,
|
|
646
|
+
.tet-textarea__base:not(:disabled):active {
|
|
628
647
|
background: var(--input-focus-background-color);
|
|
629
648
|
border: 0.0625rem solid var(--input-focus-border-color);
|
|
630
649
|
box-shadow: 0 0 0 0.25rem var(--input-focus-outline-color);
|
|
631
650
|
}
|
|
632
|
-
.tet-input__base.keyboard-focus:focus
|
|
651
|
+
.tet-input__base.keyboard-focus:focus,
|
|
652
|
+
.tet-textarea__base.keyboard-focus:focus {
|
|
633
653
|
outline: 0.125rem solid var(--tc-blue-40);
|
|
634
654
|
outline-offset: 0.125rem;
|
|
635
655
|
transition: outline 0s;
|
|
636
656
|
box-shadow: none;
|
|
637
657
|
}
|
|
638
|
-
.tet-input__base.error
|
|
658
|
+
.tet-input__base.error:not(:disabled).keyboard-focus,
|
|
659
|
+
.tet-textarea__base.error:not(:disabled).keyboard-focus {
|
|
639
660
|
border-color: var(--input-color-error);
|
|
640
661
|
}
|
|
641
662
|
|
|
642
|
-
.tet-input__label
|
|
663
|
+
.tet-input__label,
|
|
664
|
+
.tet-textarea__label {
|
|
643
665
|
display: block;
|
|
644
666
|
margin-left: 0.25rem !important;
|
|
645
667
|
margin-bottom: 0.25rem !important;
|
|
646
668
|
color: var(--input-label-color);
|
|
647
669
|
font: 500 0.875rem/1.25rem "Inter", "Gilroy, Arial, sans-serif";
|
|
648
670
|
}
|
|
649
|
-
.tet-input__label.tet-input__mint-original
|
|
671
|
+
.tet-input__label.tet-input__mint-original,
|
|
672
|
+
.tet-textarea__label.tet-input__mint-original {
|
|
650
673
|
margin-left: 0 !important;
|
|
651
674
|
font-family: var(--font-family-fallback);
|
|
652
675
|
}
|
|
653
|
-
.tet-input__label:has(~ .input-container input[disabled])
|
|
676
|
+
.tet-input__label:has(~ .input-container input[disabled]),
|
|
677
|
+
.tet-textarea__label:has(~ .input-container input[disabled]) {
|
|
654
678
|
color: var(--input-disabled-label-color);
|
|
655
679
|
}
|
|
656
680
|
|
|
657
|
-
.tet-input__error-message
|
|
681
|
+
.tet-input__error-message,
|
|
682
|
+
.tet-textarea__error-message {
|
|
658
683
|
font: 500 0.75rem/1rem "Inter", "Gilroy, Arial, sans-serif";
|
|
659
684
|
color: var(--input-color-error);
|
|
660
685
|
}
|
|
661
686
|
|
|
687
|
+
.errors {
|
|
688
|
+
display: flex;
|
|
689
|
+
flex-direction: column;
|
|
690
|
+
gap: 0.5em;
|
|
691
|
+
margin-top: 0.5em;
|
|
692
|
+
}
|
|
693
|
+
.errors--hidden {
|
|
694
|
+
display: none;
|
|
695
|
+
}
|
|
696
|
+
|
|
662
697
|
:host {
|
|
663
698
|
/**
|
|
664
699
|
* @prop --input-height: The height of the input field.
|
|
@@ -731,11 +766,4 @@
|
|
|
731
766
|
}
|
|
732
767
|
.icon.icon-right {
|
|
733
768
|
right: 0.75rem;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.errors {
|
|
737
|
-
display: flex;
|
|
738
|
-
flex-direction: column;
|
|
739
|
-
gap: 0.5em;
|
|
740
|
-
margin-top: 0.5em;
|
|
741
769
|
}
|
|
@@ -34,7 +34,7 @@ export class TetInput {
|
|
|
34
34
|
return h("tet-icon", { name: iconName, class: classes, onClick: callback, accessibilityLabel: clickable ? 'Area label' : '', onKeyDown: a11yBtnClick });
|
|
35
35
|
};
|
|
36
36
|
this.renderErrorMessages = () => {
|
|
37
|
-
return (h("div", { class:
|
|
37
|
+
return (h("div", { class: { 'errors': true, [`tet-input__${this.theme}`]: true, 'errors--hidden': this.disabled } }, this.errorMessages.map((message) => h("p", { class: "tet-input__error-message" }, t(message)))));
|
|
38
38
|
};
|
|
39
39
|
this.errorMessages = [];
|
|
40
40
|
this.class = '';
|