@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
@@ -0,0 +1,118 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { r as registerInstance, d as createEvent, h, f as Host, i as getElement } from './index-28849c61.js';
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 = class {
13
+ constructor(hostRef) {
14
+ registerInstance(this, hostRef);
15
+ this.ionSegmentViewScroll = createEvent(this, "ionSegmentViewScroll", 7);
16
+ this.scrollEndTimeout = null;
17
+ this.isTouching = false;
18
+ this.disabled = false;
19
+ this.isManualScroll = undefined;
20
+ }
21
+ handleScroll(ev) {
22
+ var _a;
23
+ const { scrollLeft, scrollWidth, clientWidth } = ev.target;
24
+ const scrollRatio = scrollLeft / (scrollWidth - clientWidth);
25
+ this.ionSegmentViewScroll.emit({
26
+ scrollRatio,
27
+ isManualScroll: (_a = this.isManualScroll) !== null && _a !== void 0 ? _a : true,
28
+ });
29
+ // Reset the timeout to check for scroll end
30
+ this.resetScrollEndTimeout();
31
+ }
32
+ /**
33
+ * Handle touch start event to know when the user is actively dragging the segment view.
34
+ */
35
+ handleScrollStart() {
36
+ if (this.scrollEndTimeout) {
37
+ clearTimeout(this.scrollEndTimeout);
38
+ this.scrollEndTimeout = null;
39
+ }
40
+ this.isTouching = true;
41
+ }
42
+ /**
43
+ * Handle touch end event to know when the user is no longer dragging the segment view.
44
+ */
45
+ handleTouchEnd() {
46
+ this.isTouching = false;
47
+ }
48
+ /**
49
+ * Reset the scroll end detection timer. This is called on every scroll event.
50
+ */
51
+ resetScrollEndTimeout() {
52
+ if (this.scrollEndTimeout) {
53
+ clearTimeout(this.scrollEndTimeout);
54
+ this.scrollEndTimeout = null;
55
+ }
56
+ this.scrollEndTimeout = setTimeout(() => {
57
+ this.checkForScrollEnd();
58
+ },
59
+ // Setting this to a lower value may result in inconsistencies in behavior
60
+ // across browsers (particularly Firefox).
61
+ // Ideally, all of this logic is removed once the scroll end event is
62
+ // supported on all browsers (https://caniuse.com/?search=scrollend)
63
+ 100);
64
+ }
65
+ /**
66
+ * Check if the scroll has ended and the user is not actively touching.
67
+ * If the conditions are met (active content is enabled and no active touch),
68
+ * reset the scroll position and emit the scroll end event.
69
+ */
70
+ checkForScrollEnd() {
71
+ // Only emit scroll end event if the active content is not disabled and
72
+ // the user is not touching the segment view
73
+ if (!this.isTouching) {
74
+ this.isManualScroll = undefined;
75
+ }
76
+ }
77
+ /**
78
+ * @internal
79
+ *
80
+ * This method is used to programmatically set the displayed segment content
81
+ * in the segment view. Calling this method will update the `value` of the
82
+ * corresponding segment button.
83
+ *
84
+ * @param id: The id of the segment content to display.
85
+ * @param smoothScroll: Whether to animate the scroll transition.
86
+ */
87
+ async setContent(id, smoothScroll = true) {
88
+ const contents = this.getSegmentContents();
89
+ const index = contents.findIndex((content) => content.id === id);
90
+ if (index === -1)
91
+ return;
92
+ this.isManualScroll = false;
93
+ this.resetScrollEndTimeout();
94
+ const contentWidth = this.el.offsetWidth;
95
+ this.el.scrollTo({
96
+ top: 0,
97
+ left: index * contentWidth,
98
+ behavior: smoothScroll ? 'smooth' : 'instant',
99
+ });
100
+ }
101
+ getSegmentContents() {
102
+ return Array.from(this.el.querySelectorAll('ion-segment-content'));
103
+ }
104
+ render() {
105
+ const { disabled, isManualScroll } = this;
106
+ return (h(Host, { key: '9f4f11d31c4db776f077e59ae895b35dd4454717', class: {
107
+ 'segment-view-disabled': disabled,
108
+ 'segment-view-scroll-disabled': isManualScroll === false,
109
+ } }, h("slot", { key: 'ea58b21f031cee2ab2b70580f336deaefa364538' })));
110
+ }
111
+ get el() { return getElement(this); }
112
+ };
113
+ SegmentView.style = {
114
+ ios: IonSegmentViewIosStyle0,
115
+ md: IonSegmentViewMdStyle0
116
+ };
117
+
118
+ export { SegmentView as ion_segment_view };
@@ -19,6 +19,7 @@ const Segment = class {
19
19
  this.ionChange = createEvent(this, "ionChange", 7);
20
20
  this.ionSelect = createEvent(this, "ionSelect", 7);
21
21
  this.ionStyle = createEvent(this, "ionStyle", 7);
22
+ this.segmentViewEl = null;
22
23
  this.onClick = (ev) => {
23
24
  const current = ev.target;
24
25
  const previous = this.checked;
@@ -33,7 +34,13 @@ const Segment = class {
33
34
  if (current !== previous) {
34
35
  this.emitValueChange();
35
36
  }
36
- if (this.scrollable || !this.swipeGesture) {
37
+ if (this.segmentViewEl) {
38
+ this.updateSegmentView();
39
+ if (this.scrollable && previous) {
40
+ this.checkButton(previous, current);
41
+ }
42
+ }
43
+ else if (this.scrollable || !this.swipeGesture) {
37
44
  if (previous) {
38
45
  this.checkButton(previous, current);
39
46
  }
@@ -89,19 +96,49 @@ const Segment = class {
89
96
  swipeGestureChanged() {
90
97
  this.gestureChanged();
91
98
  }
92
- valueChanged(value) {
99
+ valueChanged(value, oldValue) {
100
+ // Force a value to exist if we're using a segment view
101
+ if (this.segmentViewEl && value === undefined) {
102
+ this.value = this.getButtons()[0].value;
103
+ return;
104
+ }
105
+ if (oldValue !== undefined && value !== undefined) {
106
+ const buttons = this.getButtons();
107
+ const previous = buttons.find((button) => button.value === oldValue);
108
+ const current = buttons.find((button) => button.value === value);
109
+ if (previous && current) {
110
+ if (!this.segmentViewEl) {
111
+ this.checkButton(previous, current);
112
+ }
113
+ else if (this.triggerScrollOnValueChange !== false) {
114
+ this.updateSegmentView();
115
+ }
116
+ }
117
+ }
118
+ else if (value !== undefined && oldValue === undefined && this.segmentViewEl) {
119
+ this.updateSegmentView();
120
+ }
93
121
  /**
94
122
  * `ionSelect` is emitted every time the value changes (internal or external changes).
95
123
  * Used by `ion-segment-button` to determine if the button should be checked.
96
124
  */
97
125
  this.ionSelect.emit({ value });
98
- this.scrollActiveButtonIntoView();
126
+ // The scroll listener should handle scrolling the active button into view as needed
127
+ if (!this.segmentViewEl) {
128
+ this.scrollActiveButtonIntoView();
129
+ }
130
+ this.triggerScrollOnValueChange = undefined;
99
131
  }
100
132
  disabledChanged() {
101
133
  this.gestureChanged();
102
- const buttons = this.getButtons();
103
- for (const button of buttons) {
104
- button.disabled = this.disabled;
134
+ if (!this.segmentViewEl) {
135
+ const buttons = this.getButtons();
136
+ for (const button of buttons) {
137
+ button.disabled = this.disabled;
138
+ }
139
+ }
140
+ else {
141
+ this.segmentViewEl.disabled = this.disabled;
105
142
  }
106
143
  }
107
144
  gestureChanged() {
@@ -111,6 +148,10 @@ const Segment = class {
111
148
  }
112
149
  connectedCallback() {
113
150
  this.emitStyle();
151
+ this.segmentViewEl = this.getSegmentView();
152
+ }
153
+ disconnectedCallback() {
154
+ this.segmentViewEl = null;
114
155
  }
115
156
  componentWillLoad() {
116
157
  this.emitStyle();
@@ -144,6 +185,9 @@ const Segment = class {
144
185
  if (this.disabled) {
145
186
  this.disabledChanged();
146
187
  }
188
+ // Update segment view based on the initial value,
189
+ // but do not animate the scroll
190
+ this.updateSegmentView(false);
147
191
  }
148
192
  onStart(detail) {
149
193
  this.valueBeforeGesture = this.value;
@@ -160,6 +204,7 @@ const Segment = class {
160
204
  if (value !== undefined) {
161
205
  if (this.valueBeforeGesture !== value) {
162
206
  this.emitValueChange();
207
+ this.updateSegmentView();
163
208
  }
164
209
  }
165
210
  this.valueBeforeGesture = undefined;
@@ -187,12 +232,7 @@ const Segment = class {
187
232
  setActivated(activated) {
188
233
  const buttons = this.getButtons();
189
234
  buttons.forEach((button) => {
190
- if (activated) {
191
- button.classList.add('segment-button-activated');
192
- }
193
- else {
194
- button.classList.remove('segment-button-activated');
195
- }
235
+ button.classList.toggle('segment-button-activated', activated);
196
236
  });
197
237
  this.activated = activated;
198
238
  }
@@ -243,6 +283,7 @@ const Segment = class {
243
283
  currentIndicator.classList.add('segment-button-indicator-animated');
244
284
  // Remove the transform to slide the indicator back to the button clicked
245
285
  currentIndicator.style.setProperty('transform', '');
286
+ this.scrollActiveButtonIntoView(true);
246
287
  });
247
288
  this.value = current.value;
248
289
  this.setCheckedClasses();
@@ -258,6 +299,60 @@ const Segment = class {
258
299
  buttons[next].classList.add('segment-button-after-checked');
259
300
  }
260
301
  }
302
+ getSegmentView() {
303
+ const buttons = this.getButtons();
304
+ // Get the first button with a contentId
305
+ const firstContentId = buttons.find((button) => button.contentId);
306
+ // Get the segment content with an id matching the button's contentId
307
+ const segmentContent = document.querySelector(`ion-segment-content[id="${firstContentId === null || firstContentId === void 0 ? void 0 : firstContentId.contentId}"]`);
308
+ // Return the segment view for that matching segment content
309
+ return segmentContent === null || segmentContent === void 0 ? void 0 : segmentContent.closest('ion-segment-view');
310
+ }
311
+ handleSegmentViewScroll(ev) {
312
+ const { scrollRatio, isManualScroll } = ev.detail;
313
+ if (!isManualScroll) {
314
+ return;
315
+ }
316
+ const dispatchedFrom = ev.target;
317
+ const segmentViewEl = this.segmentViewEl;
318
+ const segmentEl = this.el;
319
+ // Only update the indicator if the event was dispatched from the correct segment view
320
+ if (ev.composedPath().includes(segmentViewEl) || (dispatchedFrom === null || dispatchedFrom === void 0 ? void 0 : dispatchedFrom.contains(segmentEl))) {
321
+ const buttons = this.getButtons();
322
+ // If no buttons are found or there is no value set then do nothing
323
+ if (!buttons.length)
324
+ return;
325
+ const index = buttons.findIndex((button) => button.value === this.value);
326
+ const current = buttons[index];
327
+ const nextIndex = Math.round(scrollRatio * (buttons.length - 1));
328
+ if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
329
+ this.lastNextIndex = nextIndex;
330
+ this.triggerScrollOnValueChange = false;
331
+ this.checkButton(current, buttons[nextIndex]);
332
+ this.emitValueChange();
333
+ }
334
+ }
335
+ }
336
+ /**
337
+ * Finds the related segment view and sets its current content
338
+ * based on the selected segment button. This method
339
+ * should be called on initial load of the segment,
340
+ * after the gesture is completed (if dragging between segments)
341
+ * and when a segment button is clicked directly.
342
+ */
343
+ updateSegmentView(smoothScroll = true) {
344
+ const buttons = this.getButtons();
345
+ const button = buttons.find((btn) => btn.value === this.value);
346
+ // If the button does not have a contentId then there is
347
+ // no associated segment view to update
348
+ if (!(button === null || button === void 0 ? void 0 : button.contentId)) {
349
+ return;
350
+ }
351
+ const segmentView = this.segmentViewEl;
352
+ if (segmentView) {
353
+ segmentView.setContent(button.contentId, smoothScroll);
354
+ }
355
+ }
261
356
  scrollActiveButtonIntoView(smoothScroll = true) {
262
357
  const { scrollable, value, el } = this;
263
358
  if (scrollable) {
@@ -440,14 +535,14 @@ const Segment = class {
440
535
  }
441
536
  render() {
442
537
  const mode = getIonMode(this);
443
- return (h(Host, { key: '1f50689291d24812e33145272f9a73c01e085383', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
538
+ return (h(Host, { key: '66bd7a565ba73540b3bbe56dd23b95e59bcef9bc', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
444
539
  [mode]: true,
445
540
  'in-toolbar': hostContext('ion-toolbar', this.el),
446
541
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
447
542
  'segment-activated': this.activated,
448
543
  'segment-disabled': this.disabled,
449
544
  'segment-scrollable': this.scrollable,
450
- }) }, h("slot", { key: 'd3b90e1adabf0b923e41a36cd856dc0a5a3d041e', onSlotchange: this.onSlottedItemsChange })));
545
+ }) }, h("slot", { key: '782c521b1a33729b8eab1c4b879bc3f2ff48ae1b', onSlotchange: this.onSlottedItemsChange })));
451
546
  }
452
547
  get el() { return getElement(this); }
453
548
  static get watchers() { return {
@@ -487,6 +582,7 @@ const SegmentButton = class {
487
582
  }
488
583
  };
489
584
  this.checked = false;
585
+ this.contentId = undefined;
490
586
  this.disabled = false;
491
587
  this.layout = 'icon-top';
492
588
  this.type = 'button';
@@ -502,6 +598,26 @@ const SegmentButton = class {
502
598
  addEventListener(segmentEl, 'ionSelect', this.updateState);
503
599
  addEventListener(segmentEl, 'ionStyle', this.updateStyle);
504
600
  }
601
+ // Return if there is no contentId defined
602
+ if (!this.contentId)
603
+ return;
604
+ // Attempt to find the Segment Content by its contentId
605
+ const segmentContent = document.getElementById(this.contentId);
606
+ // If no associated Segment Content exists, log an error and return
607
+ if (!segmentContent) {
608
+ console.error(`Segment Button: Unable to find Segment Content with id="${this.contentId}".`);
609
+ return;
610
+ }
611
+ // Ensure the found element is a valid ION-SEGMENT-CONTENT
612
+ if (segmentContent.tagName !== 'ION-SEGMENT-CONTENT') {
613
+ console.error(`Segment Button: Element with id="${this.contentId}" is not an <ion-segment-content> element.`);
614
+ return;
615
+ }
616
+ // Prevent buttons from being disabled when associated with segment content
617
+ if (this.disabled) {
618
+ console.warn(`Segment Button: Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
619
+ this.disabled = false;
620
+ }
505
621
  }
506
622
  disconnectedCallback() {
507
623
  const segmentEl = this.segmentEl;
@@ -535,7 +651,7 @@ const SegmentButton = class {
535
651
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
536
652
  const mode = getIonMode(this);
537
653
  const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
538
- return (h(Host, { key: '9b54e4841be5d0f4f2ee230a649bfbe01066c7c7', class: {
654
+ return (h(Host, { key: 'd50a5d5e2f6206e8523598f258d8217d2903f69b', class: {
539
655
  [mode]: true,
540
656
  'in-toolbar': hostContext('ion-toolbar', this.el),
541
657
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
@@ -551,10 +667,7 @@ const SegmentButton = class {
551
667
  'ion-activatable': true,
552
668
  'ion-activatable-instant': true,
553
669
  'ion-focusable': true,
554
- } }, 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: {
555
- 'segment-button-indicator': true,
556
- 'segment-button-indicator-animated': true,
557
- } }, h("div", { key: 'b43124415ebd77c87285791522c5afc26a137f96', part: "indicator-background", class: "segment-button-indicator-background" }))));
670
+ } }, 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" }))));
558
671
  }
559
672
  get el() { return getElement(this); }
560
673
  static get watchers() { return {
@@ -94,7 +94,7 @@ const SelectModal = class {
94
94
  } }, option.text))));
95
95
  }
96
96
  render() {
97
- return (h(Host, { key: '694a6d282f489b4997105f6e602777d4df90421a', class: getIonMode(this) }, h("ion-header", { key: '50bdd9144222231817bbb9adbb8f7f43985fc786' }, h("ion-toolbar", { key: '47c1a62e188c6b79e32fa42724fde91cf396bc8a' }, this.header !== undefined && h("ion-title", { key: 'db2a5480ac0f710842108de116ac8218be409fdb' }, this.header), h("ion-buttons", { key: '21ca4e72b6220b821c3bac890ec9a8aacab69c29', slot: "end" }, h("ion-button", { key: 'f08b33ff0b82c04c8205e0186235acdaf8085733', onClick: () => this.closeModal() }, "Close")))), h("ion-content", { key: 'c35d024bebda7250b44b2b0ff97c2778c815f1ca' }, h("ion-list", { key: '027ad22799a82b49c03bc9d9f2779cdbe896f218' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
97
+ return (h(Host, { key: 'f4b92f4fc3d646f9a327e43a9622abaf69659c28', class: getIonMode(this) }, h("ion-header", { key: '11232ef496e7abd69e55cef988963a4869a7b01e' }, h("ion-toolbar", { key: 'e7c41878691a504d44c658db02807867df542588' }, this.header !== undefined && h("ion-title", { key: 'fcf9d33e0f3e0076ff14805de68848f9ef199cca' }, this.header), h("ion-buttons", { key: '748a967ae0ce68bc2fd018a6b9ebe0e4b810f6ac', slot: "end" }, h("ion-button", { key: 'f5e60791870b5085a31b7af70ed4bb3fb83eb185', onClick: () => this.closeModal() }, "Close")))), h("ion-content", { key: '159797957b6f788a9b393d91864c18db34481c68' }, h("ion-list", { key: '4124554fe8b2411637cbf02f08e50e0d8f804175' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
98
98
  }
99
99
  get el() { return getElement(this); }
100
100
  };
@@ -620,7 +620,7 @@ const Select = class {
620
620
  * TODO(FW-5592): Remove hasStartEndSlots condition
621
621
  */
622
622
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
623
- return (h(Host, { key: '66adece2b18fe49825ac12a28f3e7815b18f4558', onClick: this.onClick, class: createColorClasses(this.color, {
623
+ return (h(Host, { key: '144dfa5c49549a74fe516c65b9b8104a477ac789', onClick: this.onClick, class: createColorClasses(this.color, {
624
624
  [mode]: true,
625
625
  'in-item': inItem,
626
626
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -636,7 +636,7 @@ const Select = class {
636
636
  [`select-justify-${justify}`]: justifyEnabled,
637
637
  [`select-shape-${shape}`]: shape !== undefined,
638
638
  [`select-label-placement-${labelPlacement}`]: true,
639
- }) }, 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" }))));
639
+ }) }, 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" }))));
640
640
  }
641
641
  get el() { return getElement(this); }
642
642
  static get watchers() { return {
@@ -697,7 +697,7 @@ const SelectOption = class {
697
697
  this.value = undefined;
698
698
  }
699
699
  render() {
700
- return h(Host, { key: 'b874cf2085770674ea56ce978c1e7c55d002b266', role: "option", id: this.inputId, class: getIonMode(this) });
700
+ return h(Host, { key: '2e6fa159464f04f6d8720f960141f67918bc7534', role: "option", id: this.inputId, class: getIonMode(this) });
701
701
  }
702
702
  get el() { return getElement(this); }
703
703
  };
@@ -805,7 +805,7 @@ const SelectPopover = class {
805
805
  render() {
806
806
  const { header, message, options, subHeader } = this;
807
807
  const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
808
- return (h(Host, { key: '8baf834489a89d2e65554eb4241fe389a525f85c', class: getIonMode(this) }, h("ion-list", { key: '2646cd1047a308c4cbb89c3a936f9a13c307221b' }, header !== undefined && h("ion-list-header", { key: 'aec9975d382f9e97eb5b7bd036fbd08f645f6462' }, header), hasSubHeaderOrMessage && (h("ion-item", { key: 'd9e3298ba2c289fdef7624e2cbddc247061d4d75' }, h("ion-label", { key: '6f068afe5db73092638dff9d1d3f60cefd1d2599', class: "ion-text-wrap" }, subHeader !== undefined && h("h3", { key: '4403c78b13c3e861d199f4e75cca2876cb058267' }, subHeader), message !== undefined && h("p", { key: '6af680fd7ed7bf0c04baa63e7e9bc44ad2d7a057' }, message)))), this.renderOptions(options))));
808
+ return (h(Host, { key: 'dd0990db4de4f175b176b27f35501dd1604ca400', class: getIonMode(this) }, h("ion-list", { key: 'cea2bc3687b8b2490a2a9ff4a1e16cd34169558e' }, header !== undefined && h("ion-list-header", { key: '194aebb53453c43f913daae45a1a3066a1708c4c' }, header), hasSubHeaderOrMessage && (h("ion-item", { key: 'b706b07a3c63ad8104d2db413e210c735ec1bec9' }, h("ion-label", { key: '6e52b5b4cf6b04ff3dd5671d64264233de4190d5', class: "ion-text-wrap" }, subHeader !== undefined && h("h3", { key: '6ef4440d17f5db8c96c63b9aa5073f4fe4b8ad62' }, subHeader), message !== undefined && h("p", { key: 'c7b3b76c30ecd606c0e985a0258c13d3a75756e7' }, message)))), this.renderOptions(options))));
809
809
  }
810
810
  get el() { return getElement(this); }
811
811
  };
@@ -43,7 +43,7 @@ const Spinner = class {
43
43
  svgs.push(buildLine(spinner, duration, i, spinner.lines));
44
44
  }
45
45
  }
46
- return (h(Host, { key: '1313eca457d022d1e5aed560b03d7f2c9eba31d3', class: createColorClasses(self.color, {
46
+ return (h(Host, { key: '9d30ee9f5aa0dd0e220da07e75d05b8b2435224d', class: createColorClasses(self.color, {
47
47
  [mode]: true,
48
48
  [`spinner-${spinnerName}`]: true,
49
49
  'spinner-paused': self.paused || config.getBoolean('_testing'),
@@ -121,12 +121,12 @@ const SplitPane = class {
121
121
  }
122
122
  render() {
123
123
  const mode = getIonMode(this);
124
- return (h(Host, { key: '4b1685044b3a9a80e001a543d8c854450c4d54d2', class: {
124
+ return (h(Host, { key: '1ca0b0299d03605bb358112ca56cbafbe58f00f5', class: {
125
125
  [mode]: true,
126
126
  // Used internally for styling
127
127
  [`split-pane-${mode}`]: true,
128
128
  'split-pane-visible': this.visible,
129
- } }, h("slot", { key: '4c3403788443770b356d671aeadabcf831623f46' })));
129
+ } }, h("slot", { key: 'abe231361727ae7fc63edd592a4490caac1909fb' })));
130
130
  }
131
131
  get el() { return getElement(this); }
132
132
  static get watchers() { return {
@@ -62,11 +62,11 @@ const TabBar = class {
62
62
  const { color, translucent, keyboardVisible } = this;
63
63
  const mode = getIonMode(this);
64
64
  const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
65
- return (h(Host, { key: '00ab2e0a72b41a18b2e01115138015106c0dd44a', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses(color, {
65
+ return (h(Host, { key: 'a87fd2ea5df053705a37ea7ffec043e75c4a9907', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses(color, {
66
66
  [mode]: true,
67
67
  'tab-bar-translucent': translucent,
68
68
  'tab-bar-hidden': shouldHide,
69
- }) }, h("slot", { key: 'b57cd1a769232291d209c069c3ce7235f76b763b' })));
69
+ }) }, h("slot", { key: '81a6223299b6cab29d7ddced590e9152e2b3ded0' })));
70
70
  }
71
71
  get el() { return getElement(this); }
72
72
  static get watchers() { return {
@@ -146,7 +146,7 @@ const TabButton = class {
146
146
  rel,
147
147
  target,
148
148
  };
149
- return (h(Host, { key: '373a1dddbbe787ca4d0eb911ea44a514c82de241', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
149
+ return (h(Host, { key: '5976c45943ea7ea8e7c1a85fc9996de421439f08', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
150
150
  [mode]: true,
151
151
  'tab-selected': selected,
152
152
  'tab-disabled': disabled,
@@ -158,7 +158,7 @@ const TabButton = class {
158
158
  'ion-activatable': true,
159
159
  'ion-selectable': true,
160
160
  'ion-focusable': true,
161
- } }, 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" }))));
161
+ } }, 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" }))));
162
162
  }
163
163
  get el() { return getElement(this); }
164
164
  };
@@ -46,10 +46,10 @@ const Tab = class {
46
46
  }
47
47
  render() {
48
48
  const { tab, active, component } = this;
49
- return (h(Host, { key: 'efde265064f6ef0080adf7a62d7364988900304c', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
49
+ return (h(Host, { key: 'cb75d0877979b3b8df8f7e1952bfa9677da1eaa5', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
50
50
  'ion-page': component === undefined,
51
51
  'tab-hidden': !active,
52
- } }, h("slot", { key: 'e66fc4de857ffb7a78686bf41ecaae81f7b86cdb' })));
52
+ } }, h("slot", { key: '37fbb7b7a6b03eb93b1dacd2dc1025b78eb2aa6b' })));
53
53
  }
54
54
  get el() { return getElement(this); }
55
55
  static get watchers() { return {
@@ -203,7 +203,7 @@ const Tabs = class {
203
203
  return Array.from(this.el.querySelectorAll('ion-tab'));
204
204
  }
205
205
  render() {
206
- 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" })));
206
+ 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" })));
207
207
  }
208
208
  get el() { return getElement(this); }
209
209
  };
@@ -15,9 +15,9 @@ const Text = class {
15
15
  }
16
16
  render() {
17
17
  const mode = getIonMode(this);
18
- return (h(Host, { key: 'b1179acfcabae40555440d14c05f8610802cd884', class: createColorClasses(this.color, {
18
+ return (h(Host, { key: 'e134d70c04344b708a2ecf6253722781ad2ca826', class: createColorClasses(this.color, {
19
19
  [mode]: true,
20
- }) }, h("slot", { key: 'b240a6f543ed2d8b91b6584bb2834f1ecee8b606' })));
20
+ }) }, h("slot", { key: 'da79c760f7ebbcd007ce110439f05a62cb22eac8' })));
21
21
  }
22
22
  };
23
23
  Text.style = IonTextStyle0;
@@ -365,7 +365,7 @@ const Textarea = class {
365
365
  * TODO(FW-5592): Remove hasStartEndSlots condition
366
366
  */
367
367
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
368
- return (h(Host, { key: 'dd11d9187439e1b15791585a39490ab086c4bec9', class: createColorClasses(this.color, {
368
+ return (h(Host, { key: '8ce5e2f5ba3ac645f95f9b95922cfc2a7d3da459', class: createColorClasses(this.color, {
369
369
  [mode]: true,
370
370
  'has-value': hasValue,
371
371
  'has-focus': hasFocus,
@@ -374,7 +374,7 @@ const Textarea = class {
374
374
  [`textarea-shape-${shape}`]: shape !== undefined,
375
375
  [`textarea-label-placement-${labelPlacement}`]: true,
376
376
  'textarea-disabled': disabled,
377
- }) }, 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()));
377
+ }) }, 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()));
378
378
  }
379
379
  get el() { return getElement(this); }
380
380
  static get watchers() { return {
@@ -828,9 +828,9 @@ const Toast = class {
828
828
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
829
829
  printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
830
830
  }
831
- return (h(Host, Object.assign({ key: '8a04b1456cd16d54905ab006600110322b94b42a', tabindex: "-1" }, this.htmlAttributes, { style: {
831
+ return (h(Host, Object.assign({ key: 'c05655ff06af8d0e48c2a85396b07ad942fa81b4', tabindex: "-1" }, this.htmlAttributes, { style: {
832
832
  zIndex: `${60000 + this.overlayIndex}`,
833
- }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'f89bd416cc490790efb46f92f0c172b7f40a39d9', class: wrapperClass }, h("div", { key: 'a12e4b4678f147d081cfeb7b2e3e2a32ce185e19', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '00c796e53e9199cf785e44e998b40425acba8888', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'd7cd8e583198b71a81e2ad2520f2927f28258d2a', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
833
+ }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '9393ead4de1bf28529661d6f64049d34e18d725c', class: wrapperClass }, h("div", { key: '3e9dd73c17c337849c3f26e8d0f395b3e5ee20a7', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '5d15b18364301ad55e44e9f601014ac33181590b', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'f6dd164502637a882c5caf18445d8509b85ad6f9', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
834
834
  }
835
835
  get el() { return getElement(this); }
836
836
  static get watchers() { return {
@@ -160,7 +160,7 @@ const Toggle = class {
160
160
  const value = this.getValue();
161
161
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
162
162
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
163
- return (h(Host, { key: '4e9013794a74f581b4f969ceadef4e53c920e9a6', onClick: this.onClick, class: createColorClasses(color, {
163
+ return (h(Host, { key: 'f52195ec3bc14c024647cb41319c32a4cd330e19', onClick: this.onClick, class: createColorClasses(color, {
164
164
  [mode]: true,
165
165
  'in-item': hostContext('ion-item', el),
166
166
  'toggle-activated': activated,
@@ -170,10 +170,10 @@ const Toggle = class {
170
170
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
171
171
  [`toggle-label-placement-${labelPlacement}`]: true,
172
172
  [`toggle-${rtl}`]: true,
173
- }) }, h("label", { key: '24585bfe9c697e160b1d3d52522b43498d415a4d', class: "toggle-wrapper" }, h("input", Object.assign({ key: '9d56368c0474c5741fa8768b5ea0c8ff3d8c2f27', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: 'd21d608eada02baf5b91c38d577805deaec5f9ef', class: {
173
+ }) }, h("label", { key: 'f8b3a215ad85b2cee611ad63449b584e1640f27f', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'f387b1ea840737a9737917e516834c887be99c09', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: '936af880db59fe377cd2de9101eb28a1c4fb8914', class: {
174
174
  'label-text-wrapper': true,
175
175
  'label-text-wrapper-hidden': !this.hasLabel,
176
- }, part: "label" }, h("slot", { key: 'c4f2e790a73d583938d70d72b4708b31b8ad1035' })), h("div", { key: 'ced527f5f74d3066bf022e8af31f9ea82aaa6c8c', class: "native-wrapper" }, this.renderToggleControl()))));
176
+ }, part: "label" }, h("slot", { key: '80a6672e2e792c15011a9496dcd75363cdba31c6' })), h("div", { key: '2b2b318b38ab27b194c0dab4cecd77d9d780f2ca', class: "native-wrapper" }, this.renderToggleControl()))));
177
177
  }
178
178
  get el() { return getElement(this); }
179
179
  static get watchers() { return {