@ionic/core 8.7.16-dev.11770836513.1c72c75c → 8.7.16-dev.11771578921.1a6016f8
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/components/ion-textarea.js +6 -8
- package/dist/cjs/ion-textarea.cjs.entry.js +6 -8
- package/dist/collection/components/textarea/textarea.ionic.css +102 -124
- package/dist/collection/components/textarea/textarea.ios.css +0 -12
- package/dist/collection/components/textarea/textarea.js +3 -5
- package/dist/collection/components/textarea/textarea.md.css +0 -12
- package/dist/docs.json +1 -1
- package/dist/esm/ion-textarea.entry.js +6 -8
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-61e3cde1.entry.js +4 -0
- package/hydrate/index.js +6 -8
- package/hydrate/index.mjs +6 -8
- package/package.json +1 -1
- package/dist/ionic/p-4932570b.entry.js +0 -4
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
1
|
/**
|
|
3
2
|
* A heuristic that applies CSS to tablet
|
|
4
3
|
* viewports.
|
|
@@ -550,18 +549,6 @@
|
|
|
550
549
|
opacity: 1;
|
|
551
550
|
}
|
|
552
551
|
|
|
553
|
-
/**
|
|
554
|
-
* When the rows attribute is set, the textarea should not force a min-height,
|
|
555
|
-
* but rather respect the natural height of the textarea, especially when
|
|
556
|
-
* rows is set to 1.
|
|
557
|
-
*/
|
|
558
|
-
:host(.textarea-fill-solid[rows]),
|
|
559
|
-
:host(.textarea-fill-outline[rows]),
|
|
560
|
-
:host(.textarea-label-placement-stacked[rows]),
|
|
561
|
-
:host(.textarea-label-placement-floating[rows]) {
|
|
562
|
-
min-height: auto;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
552
|
.start-slot-wrapper,
|
|
566
553
|
.end-slot-wrapper {
|
|
567
554
|
display: flex;
|
|
@@ -686,10 +673,6 @@
|
|
|
686
673
|
--highlight-color-focused: var(--ion-color-base);
|
|
687
674
|
}
|
|
688
675
|
|
|
689
|
-
.textarea-wrapper-inner {
|
|
690
|
-
height: 0;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
676
|
:host(.textarea-size-small) .textarea-wrapper-inner {
|
|
694
677
|
--padding-top: var(--token-space-200, var(--token-scale-200, 8px));
|
|
695
678
|
--padding-end: var(--token-space-300, var(--token-scale-300, 12px));
|
|
@@ -711,24 +694,11 @@
|
|
|
711
694
|
--padding-start: var(--token-space-500, var(--token-scale-500, 20px));
|
|
712
695
|
}
|
|
713
696
|
|
|
714
|
-
:host
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
--number-rows: calc(max(var(--host-rows, 1), 1) + 0.5);
|
|
720
|
-
/**
|
|
721
|
-
* Calculate the minimum height for the textarea container based on the number of rows.
|
|
722
|
-
* - $textarea-row-line-height: Approximate height of a single line based on
|
|
723
|
-
* the browser's default line-height: normal (~1.2 × font-size).
|
|
724
|
-
* - (var(--number-rows) + 0.5): Show the requested rows plus a half-line peek
|
|
725
|
-
* at the next row, hinting that the textarea is scrollable.
|
|
726
|
-
* - var(--padding-top), var(--border-width): Account for
|
|
727
|
-
* box-sizing: border-box, which includes padding and border in min-height.
|
|
728
|
-
*/
|
|
729
|
-
min-height: calc(
|
|
730
|
-
var(--number-rows) * 1.2em + var(--padding-top, 0px) + var(--border-width, 0px)
|
|
731
|
-
);
|
|
697
|
+
:host .native-wrapper::after {
|
|
698
|
+
padding-left: 0;
|
|
699
|
+
padding-right: 0;
|
|
700
|
+
padding-top: 0;
|
|
701
|
+
padding-bottom: 0;
|
|
732
702
|
}
|
|
733
703
|
|
|
734
704
|
:host(.textarea-shape-soft) {
|
|
@@ -743,11 +713,29 @@
|
|
|
743
713
|
--border-radius: var(--token-rectangular-xl, var(--token-border-radius-0, var(--token-scale-0, 0px)));
|
|
744
714
|
}
|
|
745
715
|
|
|
716
|
+
:host([auto-grow]) .textarea-wrapper-inner {
|
|
717
|
+
height: auto;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
:host([auto-grow]) .native-wrapper {
|
|
721
|
+
min-height: inherit;
|
|
722
|
+
max-height: inherit;
|
|
723
|
+
}
|
|
724
|
+
|
|
746
725
|
.textarea-wrapper {
|
|
747
726
|
gap: var(--token-space-100, var(--token-scale-100, 4px));
|
|
748
727
|
}
|
|
749
728
|
|
|
750
729
|
.textarea-wrapper-inner {
|
|
730
|
+
-webkit-padding-start: var(--padding-start);
|
|
731
|
+
padding-inline-start: var(--padding-start);
|
|
732
|
+
-webkit-padding-end: var(--padding-end);
|
|
733
|
+
padding-inline-end: var(--padding-end);
|
|
734
|
+
padding-top: var(--padding-top);
|
|
735
|
+
padding-bottom: var(--padding-bottom);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
:host([rows]:not([auto-grow])) .textarea-wrapper-inner {
|
|
751
739
|
-webkit-padding-start: var(--padding-start);
|
|
752
740
|
padding-inline-start: var(--padding-start);
|
|
753
741
|
-webkit-padding-end: var(--padding-end);
|
|
@@ -757,50 +745,33 @@
|
|
|
757
745
|
}
|
|
758
746
|
|
|
759
747
|
/**
|
|
760
|
-
* Top and bottom padding are
|
|
761
|
-
*
|
|
762
|
-
* the
|
|
748
|
+
* Top and bottom padding are applied to ensure that text remains visible
|
|
749
|
+
* as it scrolls past the container boundaries. This provides a "sneak peek"
|
|
750
|
+
* of the content transitioning off-screen, mirroring native textarea behavior
|
|
751
|
+
* where text isn't immediately clipped or "glued" to the border at the
|
|
752
|
+
* scroll limits.
|
|
763
753
|
*/
|
|
764
|
-
.textarea-wrapper-inner .native-textarea {
|
|
754
|
+
:host([rows]:not([auto-grow])) .textarea-wrapper-inner .native-textarea {
|
|
765
755
|
padding-top: var(--padding-top);
|
|
766
756
|
padding-bottom: var(--padding-bottom);
|
|
767
757
|
}
|
|
768
758
|
|
|
769
|
-
:host(
|
|
770
|
-
:host(
|
|
771
|
-
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
:host(:not([rows])) .native-wrapper,
|
|
775
|
-
:host([auto-grow]) .native-wrapper {
|
|
776
|
-
min-height: inherit;
|
|
777
|
-
max-height: inherit;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
.label-text-wrapper {
|
|
781
|
-
font-size: var(--token-font-size-300, 12px);
|
|
782
|
-
font-weight: var(--token-font-weight-medium, 500);
|
|
783
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0%);
|
|
784
|
-
line-height: var(--token-font-line-height-500, var(--token-scale-500, 20px));
|
|
785
|
-
text-decoration: none;
|
|
786
|
-
text-transform: none;
|
|
787
|
-
max-width: var(--token-scale-5000, 200px);
|
|
788
|
-
transition: color var(--token-transition-time-150, 150ms) var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1)), transform var(--token-transition-time-150, 150ms) var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1));
|
|
789
|
-
color: var(--token-text-subtle, var(--token-primitives-neutral-1000, #3b3b3b));
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
:host(.label-floating) .label-text-wrapper {
|
|
793
|
-
transform: none;
|
|
759
|
+
:host(.has-focus.ion-valid),
|
|
760
|
+
:host(.ion-touched.ion-invalid) {
|
|
761
|
+
--border-width: var(--token-border-size-025, var(--token-scale-025, 1px));
|
|
794
762
|
}
|
|
795
763
|
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
764
|
+
.textarea-highlight {
|
|
765
|
+
bottom: -1px;
|
|
766
|
+
position: absolute;
|
|
767
|
+
width: 100%;
|
|
768
|
+
height: var(--token-border-size-050, var(--token-scale-050, 2px));
|
|
769
|
+
transform: scale(0);
|
|
770
|
+
transition: transform var(--token-transition-time-200, 200ms);
|
|
771
|
+
background: var(--border-color);
|
|
799
772
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
.end-slot-wrapper {
|
|
803
|
-
margin-top: var(--token-space-050, var(--token-scale-050, 2px));
|
|
773
|
+
.textarea-highlight {
|
|
774
|
+
inset-inline-start: 0;
|
|
804
775
|
}
|
|
805
776
|
|
|
806
777
|
.textarea-bottom {
|
|
@@ -830,22 +801,69 @@ ion-icon {
|
|
|
830
801
|
color: var(--highlight-color-valid);
|
|
831
802
|
}
|
|
832
803
|
|
|
833
|
-
|
|
834
|
-
:
|
|
835
|
-
|
|
804
|
+
.label-text-wrapper {
|
|
805
|
+
font-size: var(--token-font-size-300, 12px);
|
|
806
|
+
font-weight: var(--token-font-weight-medium, 500);
|
|
807
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0%);
|
|
808
|
+
line-height: var(--token-font-line-height-500, var(--token-scale-500, 20px));
|
|
809
|
+
text-decoration: none;
|
|
810
|
+
text-transform: none;
|
|
811
|
+
max-width: var(--token-scale-5000, 200px);
|
|
812
|
+
transition: color var(--token-transition-time-150, 150ms) var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1)), transform var(--token-transition-time-150, 150ms) var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1));
|
|
813
|
+
color: var(--token-text-subtle, var(--token-primitives-neutral-1000, #3b3b3b));
|
|
836
814
|
}
|
|
837
815
|
|
|
838
|
-
.
|
|
839
|
-
|
|
840
|
-
position: absolute;
|
|
841
|
-
width: 100%;
|
|
842
|
-
height: var(--token-border-size-050, var(--token-scale-050, 2px));
|
|
843
|
-
transform: scale(0);
|
|
844
|
-
transition: transform var(--token-transition-time-200, 200ms);
|
|
845
|
-
background: var(--border-color);
|
|
816
|
+
:host(.label-floating) .label-text-wrapper {
|
|
817
|
+
transform: none;
|
|
846
818
|
}
|
|
847
|
-
|
|
848
|
-
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* This makes the label sit above the textarea.
|
|
822
|
+
*/
|
|
823
|
+
:host(.label-floating) .label-text-wrapper {
|
|
824
|
+
/**
|
|
825
|
+
* Label text should not extend
|
|
826
|
+
* beyond the bounds of the textarea.
|
|
827
|
+
*/
|
|
828
|
+
max-width: calc(100% / 0.75);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.textarea-wrapper textarea {
|
|
832
|
+
/**
|
|
833
|
+
* When the floating label appears on top of the
|
|
834
|
+
* textarea, we need to fade the textarea out so that the
|
|
835
|
+
* label does not overlap with the placeholder.
|
|
836
|
+
*/
|
|
837
|
+
transition: opacity var(--token-transition-time-150, 150ms) var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1));
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Label is on the left of the textarea in LTR and
|
|
842
|
+
* on the right in RTL. Label also has a fixed width.
|
|
843
|
+
*/
|
|
844
|
+
:host(.textarea-label-placement-fixed) .label-text {
|
|
845
|
+
flex: 0 0 calc(var(--token-scale-2400, 96px) + var(--token-space-100, var(--token-scale-100, 4px)));
|
|
846
|
+
width: calc(var(--token-scale-2400, 96px) + var(--token-space-100, var(--token-scale-100, 4px)));
|
|
847
|
+
min-width: calc(var(--token-scale-2400, 96px) + var(--token-space-100, var(--token-scale-100, 4px)));
|
|
848
|
+
max-width: var(--token-scale-5000, 200px);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
ion-icon {
|
|
852
|
+
--color: globals.$ion-icon-subtlest;
|
|
853
|
+
font-size: var(--token-scale-400, 16px);
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.start-slot-wrapper,
|
|
857
|
+
.end-slot-wrapper {
|
|
858
|
+
margin-top: var(--token-space-050, var(--token-scale-050, 2px));
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
:host([rows]:not([auto-grow])) .start-slot-wrapper,
|
|
862
|
+
:host([rows]:not([auto-grow])) .end-slot-wrapper {
|
|
863
|
+
padding-left: 0;
|
|
864
|
+
padding-right: 0;
|
|
865
|
+
padding-top: var(--padding-top);
|
|
866
|
+
padding-bottom: var(--padding-bottom);
|
|
849
867
|
}
|
|
850
868
|
|
|
851
869
|
:host(.has-focus) {
|
|
@@ -894,44 +912,4 @@ ion-icon {
|
|
|
894
912
|
|
|
895
913
|
:host(.textarea-readonly) {
|
|
896
914
|
--background: var(--token-bg-input-read-only, var(--token-primitives-neutral-100, #f3f3f3));
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* This makes the label sit above the textarea.
|
|
901
|
-
*/
|
|
902
|
-
:host(.label-floating) .label-text-wrapper {
|
|
903
|
-
/**
|
|
904
|
-
* Label text should not extend
|
|
905
|
-
* beyond the bounds of the textarea.
|
|
906
|
-
*/
|
|
907
|
-
max-width: calc(100% / 0.75);
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
.textarea-wrapper textarea {
|
|
911
|
-
/**
|
|
912
|
-
* When the floating label appears on top of the
|
|
913
|
-
* textarea, we need to fade the textarea out so that the
|
|
914
|
-
* label does not overlap with the placeholder.
|
|
915
|
-
*/
|
|
916
|
-
transition: opacity var(--token-transition-time-150, 150ms) var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1));
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* Label is on the left of the textarea in LTR and
|
|
921
|
-
* on the right in RTL. Label also has a fixed width.
|
|
922
|
-
*/
|
|
923
|
-
:host(.textarea-label-placement-fixed) .label-text {
|
|
924
|
-
flex: 0 0 calc(var(--token-scale-2400, 96px) + var(--token-space-100, var(--token-scale-100, 4px)));
|
|
925
|
-
width: calc(var(--token-scale-2400, 96px) + var(--token-space-100, var(--token-scale-100, 4px)));
|
|
926
|
-
min-width: calc(var(--token-scale-2400, 96px) + var(--token-space-100, var(--token-scale-100, 4px)));
|
|
927
|
-
max-width: var(--token-scale-5000, 200px);
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/*
|
|
931
|
-
* As the ionic theme introduces padding in the textarea,
|
|
932
|
-
* there is no need to add margin-top to the textarea.
|
|
933
|
-
*/
|
|
934
|
-
:host(.textarea-label-placement-stacked) textarea,
|
|
935
|
-
:host(.textarea-label-placement-floating) textarea {
|
|
936
|
-
margin-top: 0;
|
|
937
915
|
}
|
|
@@ -552,18 +552,6 @@
|
|
|
552
552
|
opacity: 1;
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
-
/**
|
|
556
|
-
* When the rows attribute is set, the textarea should not force a min-height,
|
|
557
|
-
* but rather respect the natural height of the textarea, especially when
|
|
558
|
-
* rows is set to 1.
|
|
559
|
-
*/
|
|
560
|
-
:host(.textarea-fill-solid[rows]),
|
|
561
|
-
:host(.textarea-fill-outline[rows]),
|
|
562
|
-
:host(.textarea-label-placement-stacked[rows]),
|
|
563
|
-
:host(.textarea-label-placement-floating[rows]) {
|
|
564
|
-
min-height: auto;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
555
|
.start-slot-wrapper,
|
|
568
556
|
.end-slot-wrapper {
|
|
569
557
|
display: flex;
|
|
@@ -565,7 +565,7 @@ export class Textarea {
|
|
|
565
565
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
566
566
|
*/
|
|
567
567
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
568
|
-
return (h(Host, { key: '
|
|
568
|
+
return (h(Host, { key: '5be3ab7c5adf5ef61d70aff916d233239cc3034e', class: createColorClasses(this.color, {
|
|
569
569
|
[theme]: true,
|
|
570
570
|
'has-value': hasValue,
|
|
571
571
|
'has-focus': hasFocus,
|
|
@@ -577,9 +577,7 @@ export class Textarea {
|
|
|
577
577
|
'in-item': inItem,
|
|
578
578
|
'textarea-disabled': disabled,
|
|
579
579
|
'textarea-readonly': readonly,
|
|
580
|
-
}),
|
|
581
|
-
// For ionic theme, we need to define this css variable
|
|
582
|
-
style: theme === 'ionic' ? { '--host-rows': this.rows !== undefined ? this.rows.toString() : undefined } : undefined }, h("label", { key: '332962e7d9a0348f27c69bffd5176f6f5f89b4dc', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: '64e47a172c111455d4c85df000ac3b1680bf84f1', class: "textarea-wrapper-inner" },
|
|
580
|
+
}) }, h("label", { key: '7eb9826e9618606e1de74cb842c9236a2b5d0cb4', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: '5f0362d9f1f07f73b3d7d89d55fcb463ad0bc1da', class: "textarea-wrapper-inner" },
|
|
583
581
|
/**
|
|
584
582
|
* For the ionic theme, we render the outline container here
|
|
585
583
|
* instead of higher up, so it can be positioned relative to
|
|
@@ -589,7 +587,7 @@ export class Textarea {
|
|
|
589
587
|
* <label> element, ensuring that clicking the label text
|
|
590
588
|
* focuses the textarea.
|
|
591
589
|
*/
|
|
592
|
-
theme === 'ionic' && fill === 'outline' && h("div", { key: '
|
|
590
|
+
theme === 'ionic' && fill === 'outline' && h("div", { key: 'c8f68629935444bedaf41c8958e13fd1916a0871', class: "textarea-outline" }), h("div", { key: '56349914a8348214f9a663c768a3915fc70e21cd', class: "start-slot-wrapper" }, h("slot", { key: '8b399fd0f049f579f7af1183052614f459d52169', name: "start" })), h("div", { key: '5edec308a1ade5d4634ee5bae413e27a9f17e3cb', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el), part: "container" }, h("textarea", Object.assign({ key: 'ac792e9d46e30bb0fe72b6e8f57880ff5114dff6', class: "native-textarea", part: "native", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), h("div", { key: '02e2a10f1f8fd6e05f457320cb90fade56cf06a9', class: "end-slot-wrapper" }, h("slot", { key: '4314c344b0054cafcb65358451afa2dbef5bd8ef', name: "end" }))), shouldRenderHighlight && h("div", { key: '94e8b3639665cf9c068abfd681e7fa4c515307f4', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
593
591
|
}
|
|
594
592
|
static get is() { return "ion-textarea"; }
|
|
595
593
|
static get encapsulation() { return "shadow"; }
|
|
@@ -552,18 +552,6 @@
|
|
|
552
552
|
opacity: 1;
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
-
/**
|
|
556
|
-
* When the rows attribute is set, the textarea should not force a min-height,
|
|
557
|
-
* but rather respect the natural height of the textarea, especially when
|
|
558
|
-
* rows is set to 1.
|
|
559
|
-
*/
|
|
560
|
-
:host(.textarea-fill-solid[rows]),
|
|
561
|
-
:host(.textarea-fill-outline[rows]),
|
|
562
|
-
:host(.textarea-label-placement-stacked[rows]),
|
|
563
|
-
:host(.textarea-label-placement-floating[rows]) {
|
|
564
|
-
min-height: auto;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
555
|
.start-slot-wrapper,
|
|
568
556
|
.end-slot-wrapper {
|
|
569
557
|
display: flex;
|
package/dist/docs.json
CHANGED