@ionic/core 8.3.4-dev.11730315987.18af6259 → 8.3.4-dev.11730395663.1a0f4848

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/components/ion-segment-button.js +24 -5
  2. package/components/ion-segment-content.d.ts +11 -0
  3. package/components/ion-segment-content.js +37 -0
  4. package/components/ion-segment-view.d.ts +11 -0
  5. package/components/ion-segment-view.js +140 -0
  6. package/components/ion-segment.js +110 -15
  7. package/components/ion-select-option.js +1 -1
  8. package/components/ion-select.js +2 -2
  9. package/components/ion-skeleton-text.js +2 -2
  10. package/components/ion-split-pane.js +2 -2
  11. package/components/ion-tab-bar.js +2 -2
  12. package/components/ion-tab-button.js +2 -2
  13. package/components/ion-tab.js +2 -2
  14. package/components/ion-tabs.js +1 -1
  15. package/components/ion-text.js +2 -2
  16. package/components/ion-textarea.js +2 -2
  17. package/components/ion-thumbnail.js +1 -1
  18. package/components/ion-toast.js +2 -2
  19. package/components/ion-toggle.js +3 -3
  20. package/components/select-modal.js +1 -1
  21. package/components/select-popover.js +1 -1
  22. package/components/spinner.js +1 -1
  23. package/components/title.js +2 -2
  24. package/components/toolbar.js +2 -2
  25. package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
  26. package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
  27. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-segment-content.cjs.entry.js +23 -0
  29. package/dist/cjs/ion-segment-view.cjs.entry.js +122 -0
  30. package/dist/cjs/ion-segment_2.cjs.entry.js +132 -19
  31. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  32. package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
  33. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  34. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  35. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  36. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  37. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  38. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-toast.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  41. package/dist/cjs/ionic.cjs.js +1 -1
  42. package/dist/cjs/loader.cjs.js +1 -1
  43. package/dist/collection/collection-manifest.json +2 -0
  44. package/dist/collection/components/segment/segment.js +115 -14
  45. package/dist/collection/components/segment-button/segment-button.js +40 -5
  46. package/dist/collection/components/segment-content/segment-content.css +6 -0
  47. package/dist/collection/components/segment-content/segment-content.js +21 -0
  48. package/dist/collection/components/segment-view/segment-view-interface.js +1 -0
  49. package/dist/collection/components/segment-view/segment-view.ios.css +83 -0
  50. package/dist/collection/components/segment-view/segment-view.js +227 -0
  51. package/dist/collection/components/segment-view/segment-view.md.css +83 -0
  52. package/dist/collection/components/select/select.js +2 -2
  53. package/dist/collection/components/select-modal/select-modal.js +1 -1
  54. package/dist/collection/components/select-option/select-option.js +1 -1
  55. package/dist/collection/components/select-popover/select-popover.js +1 -1
  56. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  57. package/dist/collection/components/spinner/spinner.js +1 -1
  58. package/dist/collection/components/split-pane/split-pane.js +2 -2
  59. package/dist/collection/components/tab/tab.js +2 -2
  60. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  61. package/dist/collection/components/tab-button/tab-button.js +2 -2
  62. package/dist/collection/components/tabs/tabs.js +1 -1
  63. package/dist/collection/components/text/text.js +2 -2
  64. package/dist/collection/components/textarea/textarea.js +2 -2
  65. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  66. package/dist/collection/components/title/title.js +2 -2
  67. package/dist/collection/components/toast/toast.js +2 -2
  68. package/dist/collection/components/toggle/toggle.js +3 -3
  69. package/dist/collection/components/toolbar/toolbar.js +2 -2
  70. package/dist/docs.json +132 -1
  71. package/dist/esm/ion-app_8.entry.js +4 -4
  72. package/dist/esm/ion-avatar_3.entry.js +1 -1
  73. package/dist/esm/ion-item_8.entry.js +2 -2
  74. package/dist/esm/ion-segment-content.entry.js +19 -0
  75. package/dist/esm/ion-segment-view.entry.js +118 -0
  76. package/dist/esm/ion-segment_2.entry.js +132 -19
  77. package/dist/esm/ion-select-modal.entry.js +1 -1
  78. package/dist/esm/ion-select_3.entry.js +4 -4
  79. package/dist/esm/ion-spinner.entry.js +1 -1
  80. package/dist/esm/ion-split-pane.entry.js +2 -2
  81. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  82. package/dist/esm/ion-tab_2.entry.js +3 -3
  83. package/dist/esm/ion-text.entry.js +2 -2
  84. package/dist/esm/ion-textarea.entry.js +2 -2
  85. package/dist/esm/ion-toast.entry.js +2 -2
  86. package/dist/esm/ion-toggle.entry.js +3 -3
  87. package/dist/esm/ionic.js +1 -1
  88. package/dist/esm/loader.js +1 -1
  89. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  90. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  91. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  92. package/dist/esm-es5/ion-segment-content.entry.js +4 -0
  93. package/dist/esm-es5/ion-segment-view.entry.js +4 -0
  94. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  95. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  96. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  97. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  98. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  99. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  100. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  101. package/dist/esm-es5/ion-text.entry.js +1 -1
  102. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  103. package/dist/esm-es5/ion-toast.entry.js +1 -1
  104. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  105. package/dist/esm-es5/ionic.js +1 -1
  106. package/dist/esm-es5/loader.js +1 -1
  107. package/dist/html.html-data.json +37 -0
  108. package/dist/ionic/ionic.esm.js +1 -1
  109. package/dist/ionic/p-14be4015.entry.js +4 -0
  110. package/dist/ionic/{p-8c357539.entry.js → p-16188af7.entry.js} +1 -1
  111. package/dist/ionic/p-16799667.system.entry.js +4 -0
  112. package/dist/ionic/p-16bfb979.system.entry.js +4 -0
  113. package/dist/ionic/{p-da6ce51b.system.entry.js → p-2172893e.system.entry.js} +2 -2
  114. package/dist/ionic/{p-5e890005.system.entry.js → p-2abae1cc.system.entry.js} +1 -1
  115. package/dist/ionic/{p-2407875c.system.entry.js → p-2b838f86.system.entry.js} +1 -1
  116. package/dist/ionic/{p-249b6d9d.entry.js → p-312d16df.entry.js} +1 -1
  117. package/dist/ionic/p-322c5fb4.system.js +1 -1
  118. package/dist/ionic/p-424eb140.system.entry.js +4 -0
  119. package/dist/ionic/p-49a0e74c.entry.js +4 -0
  120. package/dist/ionic/{p-aa5f43c1.entry.js → p-4ec778aa.entry.js} +1 -1
  121. package/dist/ionic/{p-d8097686.entry.js → p-52f9cf4b.entry.js} +1 -1
  122. package/dist/ionic/{p-540db186.system.entry.js → p-5972efea.system.entry.js} +1 -1
  123. package/dist/ionic/{p-f1b9c92a.entry.js → p-5ab1b709.entry.js} +1 -1
  124. package/dist/ionic/{p-0de13e8e.entry.js → p-5b932840.entry.js} +1 -1
  125. package/dist/ionic/{p-a6827f02.entry.js → p-62af944c.entry.js} +1 -1
  126. package/dist/ionic/{p-cca6e227.system.entry.js → p-6a901f69.system.entry.js} +1 -1
  127. package/dist/ionic/p-73dc4950.entry.js +4 -0
  128. package/dist/ionic/{p-5e9a7134.system.entry.js → p-797eeea8.system.entry.js} +1 -1
  129. package/dist/ionic/{p-90d1e6e2.entry.js → p-845f8376.entry.js} +1 -1
  130. package/dist/ionic/{p-430f30e8.entry.js → p-95775830.entry.js} +1 -1
  131. package/dist/ionic/{p-e629a9fb.system.entry.js → p-975fc268.system.entry.js} +1 -1
  132. package/dist/ionic/{p-5663547d.entry.js → p-98ff6b32.entry.js} +1 -1
  133. package/dist/ionic/p-adbc4bdf.entry.js +4 -0
  134. package/dist/ionic/{p-9cb9edb5.system.entry.js → p-b1e1364f.system.entry.js} +1 -1
  135. package/dist/ionic/p-c2b74d92.system.entry.js +4 -0
  136. package/dist/ionic/{p-08f910f4.entry.js → p-e9a173ed.entry.js} +1 -1
  137. package/dist/ionic/{p-3ef0ebd1.system.entry.js → p-ebf042e0.system.entry.js} +1 -1
  138. package/dist/ionic/{p-471b5a49.system.entry.js → p-ed75fcfb.system.entry.js} +1 -1
  139. package/dist/ionic/{p-d3eaac24.entry.js → p-eedf2757.entry.js} +1 -1
  140. package/dist/ionic/{p-c25cf9e8.system.entry.js → p-f4bc18a1.system.entry.js} +1 -1
  141. package/dist/ionic/{p-2e1c94d5.system.entry.js → p-fca6ef5f.system.entry.js} +1 -1
  142. package/dist/types/components/segment/segment.d.ts +21 -1
  143. package/dist/types/components/segment-button/segment-button.d.ts +4 -0
  144. package/dist/types/components/segment-content/segment-content.d.ts +4 -0
  145. package/dist/types/components/segment-view/segment-view-interface.d.ts +4 -0
  146. package/dist/types/components/segment-view/segment-view.d.ts +55 -0
  147. package/dist/types/components.d.ts +68 -0
  148. package/hydrate/index.js +312 -51
  149. package/hydrate/index.mjs +312 -51
  150. package/package.json +1 -1
  151. package/dist/ionic/p-3254d107.entry.js +0 -4
  152. package/dist/ionic/p-457998b5.entry.js +0 -4
  153. package/dist/ionic/p-a62911e6.system.entry.js +0 -4
  154. package/dist/ionic/p-adcb6def.system.entry.js +0 -4
@@ -34,6 +34,7 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
34
34
  }
35
35
  };
36
36
  this.checked = false;
37
+ this.contentId = undefined;
37
38
  this.disabled = false;
38
39
  this.layout = 'icon-top';
39
40
  this.type = 'button';
@@ -49,6 +50,26 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
49
50
  addEventListener(segmentEl, 'ionSelect', this.updateState);
50
51
  addEventListener(segmentEl, 'ionStyle', this.updateStyle);
51
52
  }
53
+ // Return if there is no contentId defined
54
+ if (!this.contentId)
55
+ return;
56
+ // Attempt to find the Segment Content by its contentId
57
+ const segmentContent = document.getElementById(this.contentId);
58
+ // If no associated Segment Content exists, log an error and return
59
+ if (!segmentContent) {
60
+ console.error(`Segment Button: Unable to find Segment Content with id="${this.contentId}".`);
61
+ return;
62
+ }
63
+ // Ensure the found element is a valid ION-SEGMENT-CONTENT
64
+ if (segmentContent.tagName !== 'ION-SEGMENT-CONTENT') {
65
+ console.error(`Segment Button: Element with id="${this.contentId}" is not an <ion-segment-content> element.`);
66
+ return;
67
+ }
68
+ // Prevent buttons from being disabled when associated with segment content
69
+ if (this.disabled) {
70
+ console.warn(`Segment Button: Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
71
+ this.disabled = false;
72
+ }
52
73
  }
53
74
  disconnectedCallback() {
54
75
  const segmentEl = this.segmentEl;
@@ -82,7 +103,7 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
82
103
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
83
104
  const mode = getIonMode(this);
84
105
  const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
85
- return (h(Host, { key: '9b54e4841be5d0f4f2ee230a649bfbe01066c7c7', class: {
106
+ return (h(Host, { key: 'd50a5d5e2f6206e8523598f258d8217d2903f69b', class: {
86
107
  [mode]: true,
87
108
  'in-toolbar': hostContext('ion-toolbar', this.el),
88
109
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
@@ -98,10 +119,7 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
98
119
  'ion-activatable': true,
99
120
  'ion-activatable-instant': true,
100
121
  'ion-focusable': true,
101
- } }, h("button", Object.assign({ key: 'b97b964b5f3f1bf53e41ad2a1ad4853d5f956fe5', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '0eeb2616f7c5a7a7fc1e2e3bd34ab461de6179f4', class: "button-inner" }, h("slot", { key: '5ac8fafa2f23e30f8df63bfe236a9604cfb388ae' })), mode === 'md' && h("ion-ripple-effect", { key: '86032e9726e2b6437ffc34f59fcbe564616cc9ca' })), h("div", { key: '536b1da58dd2521be290707d6b1726831340cf9f', part: "indicator", class: {
102
- 'segment-button-indicator': true,
103
- 'segment-button-indicator-animated': true,
104
- } }, h("div", { key: 'b43124415ebd77c87285791522c5afc26a137f96', part: "indicator-background", class: "segment-button-indicator-background" }))));
122
+ } }, h("button", Object.assign({ key: 'b4f6f145286ba8ab79669e11035b906daa85ae7e', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '67965996c9ffe70553875e00d3da0ae5b2b1d814', class: "button-inner" }, h("slot", { key: '5087988fe45a8fdf388ec44c395d0b745b207806' })), mode === 'md' && h("ion-ripple-effect", { key: 'b24858de0750bbc769b3183fac0077dfe817ba27' })), h("div", { key: '97b4359432acd1c9da0816360cd1df9472e183f7', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '0561738ea15b0986f4ed3d8276d5e6f2d13f7e51', part: "indicator-background", class: "segment-button-indicator-background" }))));
105
123
  }
106
124
  get el() { return this; }
107
125
  static get watchers() { return {
@@ -112,6 +130,7 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
112
130
  md: IonSegmentButtonMdStyle0
113
131
  }; }
114
132
  }, [33, "ion-segment-button", {
133
+ "contentId": [513, "content-id"],
115
134
  "disabled": [1028],
116
135
  "layout": [1],
117
136
  "type": [1],
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface IonSegmentContent extends Components.IonSegmentContent, HTMLElement {}
4
+ export const IonSegmentContent: {
5
+ prototype: IonSegmentContent;
6
+ new (): IonSegmentContent;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+
6
+ const segmentContentCss = ":host{scroll-snap-align:center;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}";
7
+ const IonSegmentContentStyle0 = segmentContentCss;
8
+
9
+ const SegmentContent = /*@__PURE__*/ proxyCustomElement(class SegmentContent extends HTMLElement {
10
+ constructor() {
11
+ super();
12
+ this.__registerHost();
13
+ this.__attachShadow();
14
+ }
15
+ render() {
16
+ return (h(Host, { key: '03684b2999ac64fe13e376fd7e7f279976e9d4f2' }, h("slot", { key: '143031075bf33ca19e7cfd76fc8a67b83ccaf11c' })));
17
+ }
18
+ static get style() { return IonSegmentContentStyle0; }
19
+ }, [1, "ion-segment-content"]);
20
+ function defineCustomElement$1() {
21
+ if (typeof customElements === "undefined") {
22
+ return;
23
+ }
24
+ const components = ["ion-segment-content"];
25
+ components.forEach(tagName => { switch (tagName) {
26
+ case "ion-segment-content":
27
+ if (!customElements.get(tagName)) {
28
+ customElements.define(tagName, SegmentContent);
29
+ }
30
+ break;
31
+ } });
32
+ }
33
+
34
+ const IonSegmentContent = SegmentContent;
35
+ const defineCustomElement = defineCustomElement$1;
36
+
37
+ export { IonSegmentContent, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface IonSegmentView extends Components.IonSegmentView, HTMLElement {}
4
+ export const IonSegmentView: {
5
+ prototype: IonSegmentView;
6
+ new (): IonSegmentView;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,140 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
+
6
+ const segmentViewIosCss = ":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}";
7
+ const IonSegmentViewIosStyle0 = segmentViewIosCss;
8
+
9
+ const segmentViewMdCss = ":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}";
10
+ const IonSegmentViewMdStyle0 = segmentViewMdCss;
11
+
12
+ const SegmentView = /*@__PURE__*/ proxyCustomElement(class SegmentView extends HTMLElement {
13
+ constructor() {
14
+ super();
15
+ this.__registerHost();
16
+ this.__attachShadow();
17
+ this.ionSegmentViewScroll = createEvent(this, "ionSegmentViewScroll", 7);
18
+ this.scrollEndTimeout = null;
19
+ this.isTouching = false;
20
+ this.disabled = false;
21
+ this.isManualScroll = undefined;
22
+ }
23
+ handleScroll(ev) {
24
+ var _a;
25
+ const { scrollLeft, scrollWidth, clientWidth } = ev.target;
26
+ const scrollRatio = scrollLeft / (scrollWidth - clientWidth);
27
+ this.ionSegmentViewScroll.emit({
28
+ scrollRatio,
29
+ isManualScroll: (_a = this.isManualScroll) !== null && _a !== void 0 ? _a : true,
30
+ });
31
+ // Reset the timeout to check for scroll end
32
+ this.resetScrollEndTimeout();
33
+ }
34
+ /**
35
+ * Handle touch start event to know when the user is actively dragging the segment view.
36
+ */
37
+ handleScrollStart() {
38
+ if (this.scrollEndTimeout) {
39
+ clearTimeout(this.scrollEndTimeout);
40
+ this.scrollEndTimeout = null;
41
+ }
42
+ this.isTouching = true;
43
+ }
44
+ /**
45
+ * Handle touch end event to know when the user is no longer dragging the segment view.
46
+ */
47
+ handleTouchEnd() {
48
+ this.isTouching = false;
49
+ }
50
+ /**
51
+ * Reset the scroll end detection timer. This is called on every scroll event.
52
+ */
53
+ resetScrollEndTimeout() {
54
+ if (this.scrollEndTimeout) {
55
+ clearTimeout(this.scrollEndTimeout);
56
+ this.scrollEndTimeout = null;
57
+ }
58
+ this.scrollEndTimeout = setTimeout(() => {
59
+ this.checkForScrollEnd();
60
+ },
61
+ // Setting this to a lower value may result in inconsistencies in behavior
62
+ // across browsers (particularly Firefox).
63
+ // Ideally, all of this logic is removed once the scroll end event is
64
+ // supported on all browsers (https://caniuse.com/?search=scrollend)
65
+ 100);
66
+ }
67
+ /**
68
+ * Check if the scroll has ended and the user is not actively touching.
69
+ * If the conditions are met (active content is enabled and no active touch),
70
+ * reset the scroll position and emit the scroll end event.
71
+ */
72
+ checkForScrollEnd() {
73
+ // Only emit scroll end event if the active content is not disabled and
74
+ // the user is not touching the segment view
75
+ if (!this.isTouching) {
76
+ this.isManualScroll = undefined;
77
+ }
78
+ }
79
+ /**
80
+ * @internal
81
+ *
82
+ * This method is used to programmatically set the displayed segment content
83
+ * in the segment view. Calling this method will update the `value` of the
84
+ * corresponding segment button.
85
+ *
86
+ * @param id: The id of the segment content to display.
87
+ * @param smoothScroll: Whether to animate the scroll transition.
88
+ */
89
+ async setContent(id, smoothScroll = true) {
90
+ const contents = this.getSegmentContents();
91
+ const index = contents.findIndex((content) => content.id === id);
92
+ if (index === -1)
93
+ return;
94
+ this.isManualScroll = false;
95
+ this.resetScrollEndTimeout();
96
+ const contentWidth = this.el.offsetWidth;
97
+ this.el.scrollTo({
98
+ top: 0,
99
+ left: index * contentWidth,
100
+ behavior: smoothScroll ? 'smooth' : 'instant',
101
+ });
102
+ }
103
+ getSegmentContents() {
104
+ return Array.from(this.el.querySelectorAll('ion-segment-content'));
105
+ }
106
+ render() {
107
+ const { disabled, isManualScroll } = this;
108
+ return (h(Host, { key: '9f4f11d31c4db776f077e59ae895b35dd4454717', class: {
109
+ 'segment-view-disabled': disabled,
110
+ 'segment-view-scroll-disabled': isManualScroll === false,
111
+ } }, h("slot", { key: 'ea58b21f031cee2ab2b70580f336deaefa364538' })));
112
+ }
113
+ get el() { return this; }
114
+ static get style() { return {
115
+ ios: IonSegmentViewIosStyle0,
116
+ md: IonSegmentViewMdStyle0
117
+ }; }
118
+ }, [33, "ion-segment-view", {
119
+ "disabled": [4],
120
+ "isManualScroll": [32],
121
+ "setContent": [64]
122
+ }, [[1, "scroll", "handleScroll"], [1, "touchstart", "handleScrollStart"], [1, "touchend", "handleTouchEnd"]]]);
123
+ function defineCustomElement$1() {
124
+ if (typeof customElements === "undefined") {
125
+ return;
126
+ }
127
+ const components = ["ion-segment-view"];
128
+ components.forEach(tagName => { switch (tagName) {
129
+ case "ion-segment-view":
130
+ if (!customElements.get(tagName)) {
131
+ customElements.define(tagName, SegmentView);
132
+ }
133
+ break;
134
+ } });
135
+ }
136
+
137
+ const IonSegmentView = SegmentView;
138
+ const defineCustomElement = defineCustomElement$1;
139
+
140
+ export { IonSegmentView, defineCustomElement };
@@ -21,6 +21,7 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
21
21
  this.ionChange = createEvent(this, "ionChange", 7);
22
22
  this.ionSelect = createEvent(this, "ionSelect", 7);
23
23
  this.ionStyle = createEvent(this, "ionStyle", 7);
24
+ this.segmentViewEl = null;
24
25
  this.onClick = (ev) => {
25
26
  const current = ev.target;
26
27
  const previous = this.checked;
@@ -35,7 +36,13 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
35
36
  if (current !== previous) {
36
37
  this.emitValueChange();
37
38
  }
38
- if (this.scrollable || !this.swipeGesture) {
39
+ if (this.segmentViewEl) {
40
+ this.updateSegmentView();
41
+ if (this.scrollable && previous) {
42
+ this.checkButton(previous, current);
43
+ }
44
+ }
45
+ else if (this.scrollable || !this.swipeGesture) {
39
46
  if (previous) {
40
47
  this.checkButton(previous, current);
41
48
  }
@@ -91,19 +98,49 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
91
98
  swipeGestureChanged() {
92
99
  this.gestureChanged();
93
100
  }
94
- valueChanged(value) {
101
+ valueChanged(value, oldValue) {
102
+ // Force a value to exist if we're using a segment view
103
+ if (this.segmentViewEl && value === undefined) {
104
+ this.value = this.getButtons()[0].value;
105
+ return;
106
+ }
107
+ if (oldValue !== undefined && value !== undefined) {
108
+ const buttons = this.getButtons();
109
+ const previous = buttons.find((button) => button.value === oldValue);
110
+ const current = buttons.find((button) => button.value === value);
111
+ if (previous && current) {
112
+ if (!this.segmentViewEl) {
113
+ this.checkButton(previous, current);
114
+ }
115
+ else if (this.triggerScrollOnValueChange !== false) {
116
+ this.updateSegmentView();
117
+ }
118
+ }
119
+ }
120
+ else if (value !== undefined && oldValue === undefined && this.segmentViewEl) {
121
+ this.updateSegmentView();
122
+ }
95
123
  /**
96
124
  * `ionSelect` is emitted every time the value changes (internal or external changes).
97
125
  * Used by `ion-segment-button` to determine if the button should be checked.
98
126
  */
99
127
  this.ionSelect.emit({ value });
100
- this.scrollActiveButtonIntoView();
128
+ // The scroll listener should handle scrolling the active button into view as needed
129
+ if (!this.segmentViewEl) {
130
+ this.scrollActiveButtonIntoView();
131
+ }
132
+ this.triggerScrollOnValueChange = undefined;
101
133
  }
102
134
  disabledChanged() {
103
135
  this.gestureChanged();
104
- const buttons = this.getButtons();
105
- for (const button of buttons) {
106
- button.disabled = this.disabled;
136
+ if (!this.segmentViewEl) {
137
+ const buttons = this.getButtons();
138
+ for (const button of buttons) {
139
+ button.disabled = this.disabled;
140
+ }
141
+ }
142
+ else {
143
+ this.segmentViewEl.disabled = this.disabled;
107
144
  }
108
145
  }
109
146
  gestureChanged() {
@@ -113,6 +150,10 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
113
150
  }
114
151
  connectedCallback() {
115
152
  this.emitStyle();
153
+ this.segmentViewEl = this.getSegmentView();
154
+ }
155
+ disconnectedCallback() {
156
+ this.segmentViewEl = null;
116
157
  }
117
158
  componentWillLoad() {
118
159
  this.emitStyle();
@@ -146,6 +187,9 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
146
187
  if (this.disabled) {
147
188
  this.disabledChanged();
148
189
  }
190
+ // Update segment view based on the initial value,
191
+ // but do not animate the scroll
192
+ this.updateSegmentView(false);
149
193
  }
150
194
  onStart(detail) {
151
195
  this.valueBeforeGesture = this.value;
@@ -162,6 +206,7 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
162
206
  if (value !== undefined) {
163
207
  if (this.valueBeforeGesture !== value) {
164
208
  this.emitValueChange();
209
+ this.updateSegmentView();
165
210
  }
166
211
  }
167
212
  this.valueBeforeGesture = undefined;
@@ -189,12 +234,7 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
189
234
  setActivated(activated) {
190
235
  const buttons = this.getButtons();
191
236
  buttons.forEach((button) => {
192
- if (activated) {
193
- button.classList.add('segment-button-activated');
194
- }
195
- else {
196
- button.classList.remove('segment-button-activated');
197
- }
237
+ button.classList.toggle('segment-button-activated', activated);
198
238
  });
199
239
  this.activated = activated;
200
240
  }
@@ -245,6 +285,7 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
245
285
  currentIndicator.classList.add('segment-button-indicator-animated');
246
286
  // Remove the transform to slide the indicator back to the button clicked
247
287
  currentIndicator.style.setProperty('transform', '');
288
+ this.scrollActiveButtonIntoView(true);
248
289
  });
249
290
  this.value = current.value;
250
291
  this.setCheckedClasses();
@@ -260,6 +301,60 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
260
301
  buttons[next].classList.add('segment-button-after-checked');
261
302
  }
262
303
  }
304
+ getSegmentView() {
305
+ const buttons = this.getButtons();
306
+ // Get the first button with a contentId
307
+ const firstContentId = buttons.find((button) => button.contentId);
308
+ // Get the segment content with an id matching the button's contentId
309
+ const segmentContent = document.querySelector(`ion-segment-content[id="${firstContentId === null || firstContentId === void 0 ? void 0 : firstContentId.contentId}"]`);
310
+ // Return the segment view for that matching segment content
311
+ return segmentContent === null || segmentContent === void 0 ? void 0 : segmentContent.closest('ion-segment-view');
312
+ }
313
+ handleSegmentViewScroll(ev) {
314
+ const { scrollRatio, isManualScroll } = ev.detail;
315
+ if (!isManualScroll) {
316
+ return;
317
+ }
318
+ const dispatchedFrom = ev.target;
319
+ const segmentViewEl = this.segmentViewEl;
320
+ const segmentEl = this.el;
321
+ // Only update the indicator if the event was dispatched from the correct segment view
322
+ if (ev.composedPath().includes(segmentViewEl) || (dispatchedFrom === null || dispatchedFrom === void 0 ? void 0 : dispatchedFrom.contains(segmentEl))) {
323
+ const buttons = this.getButtons();
324
+ // If no buttons are found or there is no value set then do nothing
325
+ if (!buttons.length)
326
+ return;
327
+ const index = buttons.findIndex((button) => button.value === this.value);
328
+ const current = buttons[index];
329
+ const nextIndex = Math.round(scrollRatio * (buttons.length - 1));
330
+ if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
331
+ this.lastNextIndex = nextIndex;
332
+ this.triggerScrollOnValueChange = false;
333
+ this.checkButton(current, buttons[nextIndex]);
334
+ this.emitValueChange();
335
+ }
336
+ }
337
+ }
338
+ /**
339
+ * Finds the related segment view and sets its current content
340
+ * based on the selected segment button. This method
341
+ * should be called on initial load of the segment,
342
+ * after the gesture is completed (if dragging between segments)
343
+ * and when a segment button is clicked directly.
344
+ */
345
+ updateSegmentView(smoothScroll = true) {
346
+ const buttons = this.getButtons();
347
+ const button = buttons.find((btn) => btn.value === this.value);
348
+ // If the button does not have a contentId then there is
349
+ // no associated segment view to update
350
+ if (!(button === null || button === void 0 ? void 0 : button.contentId)) {
351
+ return;
352
+ }
353
+ const segmentView = this.segmentViewEl;
354
+ if (segmentView) {
355
+ segmentView.setContent(button.contentId, smoothScroll);
356
+ }
357
+ }
263
358
  scrollActiveButtonIntoView(smoothScroll = true) {
264
359
  const { scrollable, value, el } = this;
265
360
  if (scrollable) {
@@ -442,14 +537,14 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
442
537
  }
443
538
  render() {
444
539
  const mode = getIonMode(this);
445
- return (h(Host, { key: '1f50689291d24812e33145272f9a73c01e085383', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
540
+ return (h(Host, { key: '66bd7a565ba73540b3bbe56dd23b95e59bcef9bc', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
446
541
  [mode]: true,
447
542
  'in-toolbar': hostContext('ion-toolbar', this.el),
448
543
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
449
544
  'segment-activated': this.activated,
450
545
  'segment-disabled': this.disabled,
451
546
  'segment-scrollable': this.scrollable,
452
- }) }, h("slot", { key: 'd3b90e1adabf0b923e41a36cd856dc0a5a3d041e', onSlotchange: this.onSlottedItemsChange })));
547
+ }) }, h("slot", { key: '782c521b1a33729b8eab1c4b879bc3f2ff48ae1b', onSlotchange: this.onSlottedItemsChange })));
453
548
  }
454
549
  get el() { return this; }
455
550
  static get watchers() { return {
@@ -470,7 +565,7 @@ const Segment = /*@__PURE__*/ proxyCustomElement(class Segment extends HTMLEleme
470
565
  "value": [1032],
471
566
  "selectOnFocus": [4, "select-on-focus"],
472
567
  "activated": [32]
473
- }, [[0, "keydown", "onKeyDown"]], {
568
+ }, [[16, "ionSegmentViewScroll", "handleSegmentViewScroll"], [0, "keydown", "onKeyDown"]], {
474
569
  "color": ["colorChanged"],
475
570
  "swipeGesture": ["swipeGestureChanged"],
476
571
  "value": ["valueChanged"],
@@ -17,7 +17,7 @@ const SelectOption = /*@__PURE__*/ proxyCustomElement(class SelectOption extends
17
17
  this.value = undefined;
18
18
  }
19
19
  render() {
20
- return h(Host, { key: 'b874cf2085770674ea56ce978c1e7c55d002b266', role: "option", id: this.inputId, class: getIonMode(this) });
20
+ return h(Host, { key: '2e6fa159464f04f6d8720f960141f67918bc7534', role: "option", id: this.inputId, class: getIonMode(this) });
21
21
  }
22
22
  get el() { return this; }
23
23
  static get style() { return IonSelectOptionStyle0; }
@@ -638,7 +638,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
638
638
  * TODO(FW-5592): Remove hasStartEndSlots condition
639
639
  */
640
640
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
641
- return (h(Host, { key: '66adece2b18fe49825ac12a28f3e7815b18f4558', onClick: this.onClick, class: createColorClasses(this.color, {
641
+ return (h(Host, { key: '144dfa5c49549a74fe516c65b9b8104a477ac789', onClick: this.onClick, class: createColorClasses(this.color, {
642
642
  [mode]: true,
643
643
  'in-item': inItem,
644
644
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -654,7 +654,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
654
654
  [`select-justify-${justify}`]: justifyEnabled,
655
655
  [`select-shape-${shape}`]: shape !== undefined,
656
656
  [`select-label-placement-${labelPlacement}`]: true,
657
- }) }, h("label", { key: '39baea2f689358281a88ee99823f6ae0196bed08', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '0cc64c4c86d9f9555c2a6485ad4fe54ebc051937', class: "select-wrapper-inner" }, h("slot", { key: '727faf66ffafc560338ed153fd71a644fdaa436a', name: "start" }), h("div", { key: '4b2167f408158a0bdf0b9f23ebbc38cf1ec3486d', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '7d84957672f9e467736d343ddc21f7eade33e469', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'ab1324b4b7e5c57082bdb954a24f63030c2ca480', class: "select-highlight" }))));
657
+ }) }, h("label", { key: '0edcfcbac575a9dccc77991531b6980d1caebf42', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '348151d90cb093f5d21c7d4a834264ac4a312c40', class: "select-wrapper-inner" }, h("slot", { key: '8b7708c7f81217435c58276da0c08bba766d9500', name: "start" }), h("div", { key: '10c520a335da0a0d1cf40f9365597beb244d3b48', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '0f15c40a5495e98e29d2a21ba21e0bc6f1c0125a', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'c87faad2e5ebf7f9453397d7ede43abd64d21294', class: "select-highlight" }))));
658
658
  }
659
659
  get el() { return this; }
660
660
  static get watchers() { return {
@@ -32,11 +32,11 @@ const SkeletonText = /*@__PURE__*/ proxyCustomElement(class SkeletonText extends
32
32
  const animated = this.animated && config.getBoolean('animated', true);
33
33
  const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
34
34
  const mode = getIonMode(this);
35
- return (h(Host, { key: '8a822ebe9b4e097bdb22765b3becc2949ebefbfb', class: {
35
+ return (h(Host, { key: 'fdfabf9364caf507450239b62be24f08873bd650', class: {
36
36
  [mode]: true,
37
37
  'skeleton-text-animated': animated,
38
38
  'in-media': inMedia,
39
- } }, h("span", { key: '6d85ce8c7561af1cfd5145c7224d08352d271a1c' }, "\u00A0")));
39
+ } }, h("span", { key: '3482c88dcc177547185ce87972afa064a542367d' }, "\u00A0")));
40
40
  }
41
41
  get el() { return this; }
42
42
  static get style() { return IonSkeletonTextStyle0; }
@@ -129,12 +129,12 @@ const SplitPane = /*@__PURE__*/ proxyCustomElement(class SplitPane extends HTMLE
129
129
  }
130
130
  render() {
131
131
  const mode = getIonMode(this);
132
- return (h(Host, { key: '4b1685044b3a9a80e001a543d8c854450c4d54d2', class: {
132
+ return (h(Host, { key: '1ca0b0299d03605bb358112ca56cbafbe58f00f5', class: {
133
133
  [mode]: true,
134
134
  // Used internally for styling
135
135
  [`split-pane-${mode}`]: true,
136
136
  'split-pane-visible': this.visible,
137
- } }, h("slot", { key: '4c3403788443770b356d671aeadabcf831623f46' })));
137
+ } }, h("slot", { key: 'abe231361727ae7fc63edd592a4490caac1909fb' })));
138
138
  }
139
139
  get el() { return this; }
140
140
  static get watchers() { return {
@@ -60,11 +60,11 @@ const TabBar = /*@__PURE__*/ proxyCustomElement(class TabBar extends HTMLElement
60
60
  const { color, translucent, keyboardVisible } = this;
61
61
  const mode = getIonMode(this);
62
62
  const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
63
- return (h(Host, { key: '00ab2e0a72b41a18b2e01115138015106c0dd44a', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses(color, {
63
+ return (h(Host, { key: 'a87fd2ea5df053705a37ea7ffec043e75c4a9907', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses(color, {
64
64
  [mode]: true,
65
65
  'tab-bar-translucent': translucent,
66
66
  'tab-bar-hidden': shouldHide,
67
- }) }, h("slot", { key: 'b57cd1a769232291d209c069c3ce7235f76b763b' })));
67
+ }) }, h("slot", { key: '81a6223299b6cab29d7ddced590e9152e2b3ded0' })));
68
68
  }
69
69
  get el() { return this; }
70
70
  static get watchers() { return {
@@ -76,7 +76,7 @@ const TabButton = /*@__PURE__*/ proxyCustomElement(class TabButton extends HTMLE
76
76
  rel,
77
77
  target,
78
78
  };
79
- return (h(Host, { key: '373a1dddbbe787ca4d0eb911ea44a514c82de241', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
79
+ return (h(Host, { key: '5976c45943ea7ea8e7c1a85fc9996de421439f08', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
80
80
  [mode]: true,
81
81
  'tab-selected': selected,
82
82
  'tab-disabled': disabled,
@@ -88,7 +88,7 @@ const TabButton = /*@__PURE__*/ proxyCustomElement(class TabButton extends HTMLE
88
88
  'ion-activatable': true,
89
89
  'ion-selectable': true,
90
90
  'ion-focusable': true,
91
- } }, h("a", Object.assign({ key: 'be801e43c709675e2f4706fddb26c50875342b4e' }, attrs, { class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : undefined }, inheritedAttributes), h("span", { key: 'b98aeff191a9d85f57f6cf3f47a8cefe1cd82f80', class: "button-inner" }, h("slot", { key: '2d672ec926d9446f9839405e91cfd65e6c693583' })), mode === 'md' && h("ion-ripple-effect", { key: '8cb8e7e39b2d16679c7855f7656b1380657415a1', type: "unbounded" }))));
91
+ } }, h("a", Object.assign({ key: '1db09d861b67ff292018fb4b0dc7b85bd4677eb8' }, attrs, { class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : undefined }, inheritedAttributes), h("span", { key: '4381eafcb27e8c7bb0d86d4f115ceb0caf03b9b4', class: "button-inner" }, h("slot", { key: '1981135f6fbb88376c1bd923c55c70fe8b5c5159' })), mode === 'md' && h("ion-ripple-effect", { key: '0509bc7155d055d1ed710600e9cf4df135881491', type: "unbounded" }))));
92
92
  }
93
93
  get el() { return this; }
94
94
  static get style() { return {
@@ -55,10 +55,10 @@ const Tab = /*@__PURE__*/ proxyCustomElement(class Tab extends HTMLElement {
55
55
  }
56
56
  render() {
57
57
  const { tab, active, component } = this;
58
- return (h(Host, { key: 'efde265064f6ef0080adf7a62d7364988900304c', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
58
+ return (h(Host, { key: 'cb75d0877979b3b8df8f7e1952bfa9677da1eaa5', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
59
59
  'ion-page': component === undefined,
60
60
  'tab-hidden': !active,
61
- } }, h("slot", { key: 'e66fc4de857ffb7a78686bf41ecaae81f7b86cdb' })));
61
+ } }, h("slot", { key: '37fbb7b7a6b03eb93b1dacd2dc1025b78eb2aa6b' })));
62
62
  }
63
63
  get el() { return this; }
64
64
  static get watchers() { return {
@@ -150,7 +150,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
150
150
  return Array.from(this.el.querySelectorAll('ion-tab'));
151
151
  }
152
152
  render() {
153
- return (h(Host, { key: '7c66ed6987f13190b66d5c205f2cf2d6e75e2ce4', onIonTabButtonClick: this.onTabClicked }, h("slot", { key: '57bc955794abbf4cb83760f4537ceca254e04266', name: "top" }), h("div", { key: 'b40cf45fb2c8257891e734901ce992946394cd4e', class: "tabs-inner" }, h("slot", { key: '690dc089bf85660d0cf8c415cb03239d1ddca66a' })), h("slot", { key: '9c49f441d74f0db2f77ebdff4d0c4d37c41f1a16', name: "bottom" })));
153
+ return (h(Host, { key: 'e01ccf6bfaccad094515be50e407399c733fc226', onIonTabButtonClick: this.onTabClicked }, h("slot", { key: '38d2d01dbfd8a08f01e6f0e27274b21d75424e37', name: "top" }), h("div", { key: '7e894f0f423e2d43e1c68daff5f9f6c442fad237', class: "tabs-inner" }, h("slot", { key: 'df16be529a0370a26d0adf850530b31607507c23' })), h("slot", { key: '44642e1cb24c3281c43db75fd69a32fe0defe40a', name: "bottom" })));
154
154
  }
155
155
  get el() { return this; }
156
156
  static get style() { return IonTabsStyle0; }
@@ -17,9 +17,9 @@ const Text = /*@__PURE__*/ proxyCustomElement(class Text extends HTMLElement {
17
17
  }
18
18
  render() {
19
19
  const mode = getIonMode(this);
20
- return (h(Host, { key: 'b1179acfcabae40555440d14c05f8610802cd884', class: createColorClasses(this.color, {
20
+ return (h(Host, { key: 'e134d70c04344b708a2ecf6253722781ad2ca826', class: createColorClasses(this.color, {
21
21
  [mode]: true,
22
- }) }, h("slot", { key: 'b240a6f543ed2d8b91b6584bb2834f1ecee8b606' })));
22
+ }) }, h("slot", { key: 'da79c760f7ebbcd007ce110439f05a62cb22eac8' })));
23
23
  }
24
24
  static get style() { return IonTextStyle0; }
25
25
  }, [1, "ion-text", {
@@ -364,7 +364,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class Textarea extends HTMLEle
364
364
  * TODO(FW-5592): Remove hasStartEndSlots condition
365
365
  */
366
366
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
367
- return (h(Host, { key: 'dd11d9187439e1b15791585a39490ab086c4bec9', class: createColorClasses(this.color, {
367
+ return (h(Host, { key: '8ce5e2f5ba3ac645f95f9b95922cfc2a7d3da459', class: createColorClasses(this.color, {
368
368
  [mode]: true,
369
369
  'has-value': hasValue,
370
370
  'has-focus': hasFocus,
@@ -373,7 +373,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class Textarea extends HTMLEle
373
373
  [`textarea-shape-${shape}`]: shape !== undefined,
374
374
  [`textarea-label-placement-${labelPlacement}`]: true,
375
375
  'textarea-disabled': disabled,
376
- }) }, h("label", { key: '6c349e386e8b7834dc7ea01be6e217162869f5b3', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '2cfee57f35198e9d509ac8fe9d69705308b06e78', class: "textarea-wrapper-inner" }, h("div", { key: '969c6ae37f1940a83fbead95f621973281c9390e', class: "start-slot-wrapper" }, h("slot", { key: '17877837a5cf60069d3c683d9eb56c73c7d4c02e', name: "start" })), h("div", { key: 'd83136eab5b43dfa10685977c7b48868dde4743e', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: '43b17361dbbf65c0bca11e353a3e112b125d3067', class: "native-textarea", 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 }, this.inheritedAttributes), value)), h("div", { key: '226ab7a01466bdfd30f425b7c6acbbf13514cc23', class: "end-slot-wrapper" }, h("slot", { key: '4341c8ace1a5694d8d86dccd5f72fca0e08f5f7d', name: "end" }))), shouldRenderHighlight && h("div", { key: '81ec5a64c111e2d04df50a8576695cf048352a1f', class: "textarea-highlight" })), this.renderBottomContent()));
376
+ }) }, h("label", { key: '746c40872c085d064f8f1e51580281c692626d5d', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '603f5e72ff1ee1deeaab7103f76cbc913663b4b4', class: "textarea-wrapper-inner" }, h("div", { key: '6185ed2a5ef3a5ea318a9fea16d38a24d522cb19', class: "start-slot-wrapper" }, h("slot", { key: '7376b204ca49c1468df12363298c449adcb149f1', name: "start" })), h("div", { key: '429183415690d7390acfaea6344e7b69c948f749', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: 'e7f00f1c2e5706832a80eb0a73e5b28eec428943', class: "native-textarea", 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 }, this.inheritedAttributes), value)), h("div", { key: '6a82280cfbd2856a64b1078dd3ad94a62066494e', class: "end-slot-wrapper" }, h("slot", { key: '0a9543f5751e4fbf1039b247dfe0d437c3f9beed', name: "end" }))), shouldRenderHighlight && h("div", { key: 'b34296c968af3cdf46115ea7776af3a359c74734', class: "textarea-highlight" })), this.renderBottomContent()));
377
377
  }
378
378
  get el() { return this; }
379
379
  static get watchers() { return {