@ionic/core 8.7.17-dev.11771865171.14f4c2cf → 8.7.17-dev.11771870864.19b2cde1

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 (52) hide show
  1. package/components/ion-range.js +39 -152
  2. package/components/ion-segment-view.js +11 -5
  3. package/components/ion-select.js +3 -3
  4. package/components/ion-textarea.js +4 -4
  5. package/components/modal.js +206 -43
  6. package/dist/cjs/ion-modal.cjs.entry.js +206 -43
  7. package/dist/cjs/ion-range.cjs.entry.js +39 -149
  8. package/dist/cjs/ion-segment-view.cjs.entry.js +10 -5
  9. package/dist/cjs/ion-select_3.cjs.entry.js +3 -3
  10. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  11. package/dist/cjs/ionic.cjs.js +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/components/modal/gestures/sheet.js +108 -11
  14. package/dist/collection/components/modal/gestures/swipe-to-close.js +54 -1
  15. package/dist/collection/components/modal/modal.js +98 -31
  16. package/dist/collection/components/range/range.js +42 -172
  17. package/dist/collection/components/segment-view/segment-view.ios.css +2 -1
  18. package/dist/collection/components/segment-view/segment-view.js +28 -3
  19. package/dist/collection/components/segment-view/segment-view.md.css +2 -1
  20. package/dist/collection/components/select/select.js +6 -3
  21. package/dist/collection/components/textarea/textarea.js +4 -4
  22. package/dist/docs.json +120 -144
  23. package/dist/esm/ion-modal.entry.js +206 -43
  24. package/dist/esm/ion-range.entry.js +39 -149
  25. package/dist/esm/ion-segment-view.entry.js +10 -5
  26. package/dist/esm/ion-select_3.entry.js +3 -3
  27. package/dist/esm/ion-textarea.entry.js +2 -2
  28. package/dist/esm/ionic.js +1 -1
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/html.html-data.json +4 -0
  31. package/dist/ionic/ionic.esm.js +1 -1
  32. package/dist/ionic/p-012212e4.entry.js +4 -0
  33. package/dist/ionic/p-0f418a37.entry.js +4 -0
  34. package/dist/ionic/p-1838bed5.entry.js +4 -0
  35. package/dist/ionic/p-9a2d390d.entry.js +4 -0
  36. package/dist/ionic/{p-c19f63d0.entry.js → p-e1d1f3cc.entry.js} +1 -1
  37. package/dist/types/components/modal/gestures/sheet.d.ts +2 -2
  38. package/dist/types/components/modal/gestures/swipe-to-close.d.ts +2 -2
  39. package/dist/types/components/modal/modal-interface.d.ts +7 -0
  40. package/dist/types/components/modal/modal.d.ts +17 -1
  41. package/dist/types/components/range/range-interface.d.ts +0 -1
  42. package/dist/types/components/range/range.d.ts +4 -33
  43. package/dist/types/components/segment-view/segment-view.d.ts +4 -0
  44. package/dist/types/components/select/select.d.ts +3 -0
  45. package/dist/types/components.d.ts +27 -2
  46. package/hydrate/index.js +270 -228
  47. package/hydrate/index.mjs +270 -228
  48. package/package.json +1 -1
  49. package/dist/ionic/p-020af078.entry.js +0 -4
  50. package/dist/ionic/p-88367362.entry.js +0 -4
  51. package/dist/ionic/p-91840a80.entry.js +0 -4
  52. package/dist/ionic/p-991a3dd9.entry.js +0 -4
@@ -74,7 +74,6 @@ const Range = class {
74
74
  this.inheritedAttributes = {};
75
75
  this.contentEl = null;
76
76
  this.initialContentScrollY = true;
77
- this.focusFromPointer = false;
78
77
  this.ratioA = 0;
79
78
  this.ratioB = 0;
80
79
  /**
@@ -184,29 +183,6 @@ const Range = class {
184
183
  this.gesture.enable(!this.disabled);
185
184
  }
186
185
  };
187
- /**
188
- * Observes the knob handles for the ion-activated class and syncs
189
- * activatedKnob so the activated part is correctly set on the handle,
190
- * knob, and pin.
191
- */
192
- this.setupActivatedObserver = () => {
193
- const knobHandleA = this.el.shadowRoot.querySelector('.range-knob-handle-a');
194
- const knobHandleB = this.el.shadowRoot.querySelector('.range-knob-handle-b');
195
- const syncActivated = () => {
196
- this.activatedKnob = (knobHandleA === null || knobHandleA === void 0 ? void 0 : knobHandleA.classList.contains('ion-activated'))
197
- ? 'A'
198
- : (knobHandleB === null || knobHandleB === void 0 ? void 0 : knobHandleB.classList.contains('ion-activated'))
199
- ? 'B'
200
- : undefined;
201
- };
202
- this.activatedObserver = new MutationObserver(syncActivated);
203
- this.activatedObserver.observe(this.el.shadowRoot, {
204
- attributes: true,
205
- attributeFilter: ['class'],
206
- subtree: true,
207
- });
208
- syncActivated();
209
- };
210
186
  this.handleKeyboard = (knob, isIncrease) => {
211
187
  const { ensureValueInBounds } = this;
212
188
  let step = this.step;
@@ -229,7 +205,6 @@ const Range = class {
229
205
  this.onBlur = () => {
230
206
  if (this.hasFocus) {
231
207
  this.hasFocus = false;
232
- this.focusedKnob = undefined;
233
208
  this.ionBlur.emit();
234
209
  }
235
210
  };
@@ -240,20 +215,21 @@ const Range = class {
240
215
  }
241
216
  };
242
217
  this.onKnobFocus = (knob) => {
243
- // Clicking focuses the range which is needed for the keyboard,
244
- // but we only want to add the ion-focused class when focused via Tab.
245
- if (!this.focusFromPointer) {
246
- this.focusedKnob = knob;
247
- }
248
- else {
249
- this.focusFromPointer = false;
250
- this.focusedKnob = undefined;
251
- }
252
- // If the knob was not already focused, emit the focus event
253
218
  if (!this.hasFocus) {
254
219
  this.hasFocus = true;
255
220
  this.ionFocus.emit();
256
221
  }
222
+ // Manually manage ion-focused class for dual knobs
223
+ if (this.dualKnobs && this.el.shadowRoot) {
224
+ const knobA = this.el.shadowRoot.querySelector('.range-knob-a');
225
+ const knobB = this.el.shadowRoot.querySelector('.range-knob-b');
226
+ // Remove ion-focused from both knobs first
227
+ knobA === null || knobA === void 0 ? void 0 : knobA.classList.remove('ion-focused');
228
+ knobB === null || knobB === void 0 ? void 0 : knobB.classList.remove('ion-focused');
229
+ // Add ion-focused only to the focused knob
230
+ const focusedKnobEl = knob === 'A' ? knobA : knobB;
231
+ focusedKnobEl === null || focusedKnobEl === void 0 ? void 0 : focusedKnobEl.classList.add('ion-focused');
232
+ }
257
233
  };
258
234
  this.onKnobBlur = () => {
259
235
  // Check if focus is moving to another knob within the same range
@@ -265,18 +241,18 @@ const Range = class {
265
241
  if (!isStillFocusedOnKnob) {
266
242
  if (this.hasFocus) {
267
243
  this.hasFocus = false;
268
- this.focusedKnob = undefined;
269
244
  this.ionBlur.emit();
270
245
  }
246
+ // Remove ion-focused from both knobs when focus leaves the range
247
+ if (this.dualKnobs && this.el.shadowRoot) {
248
+ const knobA = this.el.shadowRoot.querySelector('.range-knob-a');
249
+ const knobB = this.el.shadowRoot.querySelector('.range-knob-b');
250
+ knobA === null || knobA === void 0 ? void 0 : knobA.classList.remove('ion-focused');
251
+ knobB === null || knobB === void 0 ? void 0 : knobB.classList.remove('ion-focused');
252
+ }
271
253
  }
272
254
  }, 0);
273
255
  };
274
- this.onKnobMouseEnter = (knob) => {
275
- this.hoveredKnob = knob;
276
- };
277
- this.onKnobMouseLeave = () => {
278
- this.hoveredKnob = undefined;
279
- };
280
256
  }
281
257
  debounceChanged() {
282
258
  const { ionInput, debounce, originalIonInput } = this;
@@ -353,7 +329,6 @@ const Range = class {
353
329
  this.originalIonInput = this.ionInput;
354
330
  this.setupGesture();
355
331
  this.updateRatio();
356
- this.setupActivatedObserver();
357
332
  this.didLoad = true;
358
333
  }
359
334
  connectedCallback() {
@@ -379,10 +354,6 @@ const Range = class {
379
354
  this.gesture.destroy();
380
355
  this.gesture = undefined;
381
356
  }
382
- if (this.activatedObserver) {
383
- this.activatedObserver.disconnect();
384
- this.activatedObserver = undefined;
385
- }
386
357
  }
387
358
  getValue() {
388
359
  var _a;
@@ -535,6 +506,7 @@ const Range = class {
535
506
  ratio = 1 - ratio;
536
507
  }
537
508
  this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
509
+ this.setFocus(this.pressedKnob);
538
510
  }
539
511
  get valA() {
540
512
  return ratioToValue(this.ratioA, this.min, this.max, this.step);
@@ -561,23 +533,9 @@ const Range = class {
561
533
  updateRatio() {
562
534
  const value = this.getValue();
563
535
  const { min, max } = this;
564
- /**
565
- * For dual knobs, value gives lower/upper but not which is A vs B.
566
- * Assign (lowerRatio, upperRatio) to (ratioA, ratioB) in the way that
567
- * minimizes change from the current ratios so the knobs don't swap.
568
- */
569
536
  if (this.dualKnobs) {
570
- const lowerRatio = valueToRatio(value.lower, min, max);
571
- const upperRatio = valueToRatio(value.upper, min, max);
572
- if (Math.abs(this.ratioA - lowerRatio) + Math.abs(this.ratioB - upperRatio) <=
573
- Math.abs(this.ratioA - upperRatio) + Math.abs(this.ratioB - lowerRatio)) {
574
- this.ratioA = lowerRatio;
575
- this.ratioB = upperRatio;
576
- }
577
- else {
578
- this.ratioA = upperRatio;
579
- this.ratioB = lowerRatio;
580
- }
537
+ this.ratioA = valueToRatio(value.lower, min, max);
538
+ this.ratioB = valueToRatio(value.upper, min, max);
581
539
  }
582
540
  else {
583
541
  this.ratioA = valueToRatio(value, min, max);
@@ -594,6 +552,14 @@ const Range = class {
594
552
  };
595
553
  this.noUpdate = false;
596
554
  }
555
+ setFocus(knob) {
556
+ if (this.el.shadowRoot) {
557
+ const knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');
558
+ if (knobEl) {
559
+ knobEl.focus();
560
+ }
561
+ }
562
+ }
597
563
  /**
598
564
  * Returns true if content was passed to the "start" slot
599
565
  */
@@ -611,7 +577,7 @@ const Range = class {
611
577
  }
612
578
  renderRangeSlider() {
613
579
  var _a;
614
- const { min, max, step, handleKeyboard, activatedKnob, focusedKnob, hoveredKnob, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
580
+ const { min, max, step, handleKeyboard, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
615
581
  let barStart = `${ratioLower * 100}%`;
616
582
  let barEnd = `${100 - ratioUpper * 100}%`;
617
583
  const rtl = isRTL(this.el);
@@ -671,9 +637,7 @@ const Range = class {
671
637
  ticks.push(tick);
672
638
  }
673
639
  }
674
- return (h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl), onPointerDown: () => {
675
- this.focusFromPointer = true;
676
- },
640
+ return (h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl),
677
641
  /**
678
642
  * Since the gesture has a threshold, the value
679
643
  * won't change until the user has dragged past
@@ -686,7 +650,6 @@ const Range = class {
686
650
  * we need to listen for the "pointerUp" event.
687
651
  */
688
652
  onPointerUp: (ev) => {
689
- this.focusFromPointer = false;
690
653
  /**
691
654
  * If the user drags the knob on the web
692
655
  * version (does not occur on mobile),
@@ -712,11 +675,6 @@ const Range = class {
712
675
  'has-ticks': ticks.length > 0,
713
676
  }, role: "presentation", style: barStyle, part: "bar-active" })), renderKnob(rtl, {
714
677
  knob: 'A',
715
- position: getKnobPosition('A', this.ratioA, this.ratioB, this.dualKnobs),
716
- dualKnobs: this.dualKnobs,
717
- activated: activatedKnob === 'A',
718
- focused: focusedKnob === 'A',
719
- hovered: hoveredKnob === 'A',
720
678
  pressed: pressedKnob === 'A',
721
679
  value: this.valA,
722
680
  ratio: this.ratioA,
@@ -729,16 +687,9 @@ const Range = class {
729
687
  inheritedAttributes,
730
688
  onKnobFocus: this.onKnobFocus,
731
689
  onKnobBlur: this.onKnobBlur,
732
- onKnobMouseEnter: this.onKnobMouseEnter,
733
- onKnobMouseLeave: this.onKnobMouseLeave,
734
690
  }), this.dualKnobs &&
735
691
  renderKnob(rtl, {
736
692
  knob: 'B',
737
- position: getKnobPosition('B', this.ratioA, this.ratioB, this.dualKnobs),
738
- dualKnobs: this.dualKnobs,
739
- activated: activatedKnob === 'B',
740
- focused: focusedKnob === 'B',
741
- hovered: hoveredKnob === 'B',
742
693
  pressed: pressedKnob === 'B',
743
694
  value: this.valB,
744
695
  ratio: this.ratioB,
@@ -751,8 +702,6 @@ const Range = class {
751
702
  inheritedAttributes,
752
703
  onKnobFocus: this.onKnobFocus,
753
704
  onKnobBlur: this.onKnobBlur,
754
- onKnobMouseEnter: this.onKnobMouseEnter,
755
- onKnobMouseLeave: this.onKnobMouseLeave,
756
705
  })));
757
706
  }
758
707
  render() {
@@ -771,12 +720,6 @@ const Range = class {
771
720
  const hasEndContent = (hasLabel && labelPlacement === 'end') || this.hasEndSlotContent;
772
721
  const needsEndAdjustment = inItem && !hasEndContent;
773
722
  const mode = getIonMode(this);
774
- /**
775
- * Determine the name and position of the pressed knob to apply
776
- * Host classes for styling.
777
- */
778
- const pressedKnobName = dualKnobs ? pressedKnob === null || pressedKnob === void 0 ? void 0 : pressedKnob.toLowerCase() : undefined;
779
- const pressedKnobPosition = dualKnobs && pressedKnob ? getKnobPosition(pressedKnob, this.ratioA, this.ratioB, dualKnobs) : undefined;
780
723
  /**
781
724
  * Determine if any knob is at the min or max value to
782
725
  * apply Host classes for styling.
@@ -784,24 +727,21 @@ const Range = class {
784
727
  const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
785
728
  const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
786
729
  renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
787
- return (h(Host, { key: '8e439db9836fdefdc779573082c788e3ddb3ef73', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
730
+ return (h(Host, { key: 'ed646a42d51b8fe22012198c354cbcf5a389c108', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
788
731
  [mode]: true,
789
732
  'in-item': inItem,
790
733
  'range-disabled': disabled,
791
- 'range-dual-knobs': dualKnobs,
792
734
  'range-pressed': pressedKnob !== undefined,
793
- [`range-pressed-${pressedKnobName}`]: pressedKnob !== undefined && pressedKnobName !== undefined,
794
- [`range-pressed-${pressedKnobPosition}`]: pressedKnob !== undefined && pressedKnobPosition !== undefined,
795
735
  'range-has-pin': pin,
796
736
  [`range-label-placement-${labelPlacement}`]: true,
797
737
  'range-item-start-adjustment': needsStartAdjustment,
798
738
  'range-item-end-adjustment': needsEndAdjustment,
799
739
  'range-value-min': valueAtMin,
800
740
  'range-value-max': valueAtMax,
801
- }) }, h("label", { key: 'e14c56db4d1eef11a3a0639c4bbed368041fc3eb', class: "range-wrapper", id: "range-label" }, h("div", { key: '16d125b0af19fdfa3663731657a7cca51a7ed442', class: {
741
+ }) }, h("label", { key: '3083e4f2a624e3b268396acb4415f7c6ac44d851', class: "range-wrapper", id: "range-label" }, h("div", { key: '47b92f94d2a0381dd7c5cd3dda54ed2942096715', class: {
802
742
  'label-text-wrapper': true,
803
743
  'label-text-wrapper-hidden': !hasLabel,
804
- }, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '545cc52a3e675e9df328dab537a4e44b7f3c59f8', class: "native-wrapper" }, h("slot", { key: 'ac54b45a21c9db231ebe11498d508d05864b56fb', name: "start" }), this.renderRangeSlider(), h("slot", { key: '7182dba53df2ff878d572b30afda64b37082c82e', name: "end" })))));
744
+ }, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '5341da8d19eb29091df680978a0e20cc8f2eec65', class: "native-wrapper" }, h("slot", { key: '09f1437078032676695442d8c827a16faa7dffe2', name: "start" }), this.renderRangeSlider(), h("slot", { key: '02b7781970ea4d44f10b5f4627a2ca36eca45f85', name: "end" })))));
805
745
  }
806
746
  get el() { return getElement(this); }
807
747
  static get watchers() { return {
@@ -814,7 +754,7 @@ const Range = class {
814
754
  "value": ["valueChanged"]
815
755
  }; }
816
756
  };
817
- const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, disabled, activated, focused, hovered, pressed, pin, handleKeyboard, pinFormatter, inheritedAttributes, onKnobFocus, onKnobBlur, onKnobMouseEnter, onKnobMouseLeave, }) => {
757
+ const renderKnob = (rtl, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, pinFormatter, inheritedAttributes, onKnobFocus, onKnobBlur, }) => {
818
758
  const start = rtl ? 'right' : 'left';
819
759
  const knobStyle = () => {
820
760
  const style = {};
@@ -835,66 +775,16 @@ const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, di
835
775
  ev.preventDefault();
836
776
  ev.stopPropagation();
837
777
  }
838
- }, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, onMouseEnter: () => onKnobMouseEnter(knob), onMouseLeave: onKnobMouseLeave, class: {
778
+ }, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, class: {
839
779
  'range-knob-handle': true,
840
- 'range-knob-handle-a': knob === 'A',
841
- 'range-knob-handle-b': knob === 'B',
780
+ 'range-knob-a': knob === 'A',
781
+ 'range-knob-b': knob === 'B',
842
782
  'range-knob-pressed': pressed,
843
783
  'range-knob-min': value === min,
844
784
  'range-knob-max': value === max,
845
785
  'ion-activatable': true,
846
786
  'ion-focusable': true,
847
- 'ion-focused': focused,
848
- }, part: [
849
- 'knob-handle',
850
- dualKnobs && knob === 'A' && 'knob-handle-a',
851
- dualKnobs && knob === 'B' && 'knob-handle-b',
852
- dualKnobs && position === 'lower' && 'knob-handle-lower',
853
- dualKnobs && position === 'upper' && 'knob-handle-upper',
854
- pressed && 'pressed',
855
- focused && 'focused',
856
- hovered && 'hover',
857
- activated && 'activated',
858
- ]
859
- .filter(Boolean)
860
- .join(' '), style: knobStyle(), role: "slider", tabindex: disabled ? -1 : 0, "aria-label": ariaLabel !== undefined ? ariaLabel : null, "aria-labelledby": ariaLabel === undefined ? 'range-label' : null, "aria-valuemin": min, "aria-valuemax": max, "aria-disabled": disabled ? 'true' : null, "aria-valuenow": value }, pin && (h("div", { class: "range-pin", role: "presentation", part: [
861
- 'pin',
862
- dualKnobs && knob === 'A' && 'pin-a',
863
- dualKnobs && knob === 'B' && 'pin-b',
864
- dualKnobs && position === 'lower' && 'pin-lower',
865
- dualKnobs && position === 'upper' && 'pin-upper',
866
- pressed && 'pressed',
867
- focused && 'focused',
868
- hovered && 'hover',
869
- activated && 'activated',
870
- ]
871
- .filter(Boolean)
872
- .join(' ') }, pinFormatter(value))), h("div", { class: "range-knob", role: "presentation", part: [
873
- 'knob',
874
- dualKnobs && knob === 'A' && 'knob-a',
875
- dualKnobs && knob === 'B' && 'knob-b',
876
- dualKnobs && position === 'lower' && 'knob-lower',
877
- dualKnobs && position === 'upper' && 'knob-upper',
878
- pressed && 'pressed',
879
- focused && 'focused',
880
- hovered && 'hover',
881
- activated && 'activated',
882
- ]
883
- .filter(Boolean)
884
- .join(' ') })));
885
- };
886
- /**
887
- * Returns whether the given knob is at the lower or upper position based
888
- * on current ratios for the given knob.
889
- */
890
- const getKnobPosition = (knob, ratioA, ratioB, dualKnobs) => {
891
- if (dualKnobs) {
892
- if (knob === 'A') {
893
- return ratioA <= ratioB ? 'lower' : 'upper';
894
- }
895
- return ratioB <= ratioA ? 'lower' : 'upper';
896
- }
897
- return 'lower';
787
+ }, style: knobStyle(), role: "slider", tabindex: disabled ? -1 : 0, "aria-label": ariaLabel !== undefined ? ariaLabel : null, "aria-labelledby": ariaLabel === undefined ? 'range-label' : null, "aria-valuemin": min, "aria-valuemax": max, "aria-disabled": disabled ? 'true' : null, "aria-valuenow": value }, pin && (h("div", { class: "range-pin", role: "presentation", part: "pin" }, pinFormatter(value))), h("div", { class: "range-knob", role: "presentation", part: "knob" })));
898
788
  };
899
789
  const ratioToValue = (ratio, min, max, step) => {
900
790
  let value = (max - min) * ratio;
@@ -4,9 +4,9 @@
4
4
  import { r as registerInstance, c as createEvent, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
5
5
  import { i as isRTL } from './dir-C53feagD.js';
6
6
 
7
- 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 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),:host(.segment-view-swipe-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}";
8
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}";
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),:host(.segment-view-swipe-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
10
 
11
11
  const SegmentView = class {
12
12
  constructor(hostRef) {
@@ -18,6 +18,10 @@ const SegmentView = class {
18
18
  * If `true`, the segment view cannot be interacted with.
19
19
  */
20
20
  this.disabled = false;
21
+ /**
22
+ * If `true`, users will be able to swipe the segment view to navigate between segment contents.
23
+ */
24
+ this.swipeGesture = true;
21
25
  }
22
26
  handleScroll(ev) {
23
27
  var _a;
@@ -105,11 +109,12 @@ const SegmentView = class {
105
109
  return Array.from(this.el.querySelectorAll('ion-segment-content'));
106
110
  }
107
111
  render() {
108
- const { disabled, isManualScroll } = this;
109
- return (h(Host, { key: 'e180b67bb3143a5f4611fb358c037be6fc782a8f', class: {
112
+ const { disabled, isManualScroll, swipeGesture } = this;
113
+ return (h(Host, { key: '565cccce7f0cfc4c71508777cc60292d6f24334f', class: {
110
114
  'segment-view-disabled': disabled,
111
115
  'segment-view-scroll-disabled': isManualScroll === false,
112
- } }, h("slot", { key: '41c11d6a7406a10f5c64a2e73abfc072afd8fc73' })));
116
+ 'segment-view-swipe-disabled': swipeGesture === false,
117
+ } }, h("slot", { key: '4118c240364467302b8f593e33c37837ea5d06f0' })));
113
118
  }
114
119
  get el() { return getElement(this); }
115
120
  };
@@ -757,7 +757,7 @@ const Select = class {
757
757
  if (!hasHintText) {
758
758
  return;
759
759
  }
760
- return h("div", { class: "select-bottom" }, this.renderHintText());
760
+ return (h("div", { class: "select-bottom", part: "bottom" }, this.renderHintText()));
761
761
  }
762
762
  render() {
763
763
  const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value, hasFocus, } = this;
@@ -788,7 +788,7 @@ const Select = class {
788
788
  * TODO(FW-5592): Remove hasStartEndSlots condition
789
789
  */
790
790
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
791
- return (h(Host, { key: 'b7fa907f8fbc54fd63e2d07a9bb5156d94fd5057', onClick: this.onClick, class: createColorClasses(this.color, {
791
+ return (h(Host, { key: 'ada627c442ebcdd4a4ee96e5f5f3ec0e2181d689', onClick: this.onClick, class: createColorClasses(this.color, {
792
792
  [mode]: true,
793
793
  'in-item': inItem,
794
794
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -806,7 +806,7 @@ const Select = class {
806
806
  [`select-justify-${justify}`]: justifyEnabled,
807
807
  [`select-shape-${shape}`]: shape !== undefined,
808
808
  [`select-label-placement-${labelPlacement}`]: true,
809
- }) }, h("label", { key: '11137e6a8b0374e93923ddb5a4629972ded5f43c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '99e3c09b5e6c2e7be493ed5834f991fffe45cfff', class: "select-wrapper-inner" }, h("slot", { key: '740f0e5a913cb0209d5acae31c33a6ed8f672dfc', name: "start" }), h("div", { key: 'b20e33c8b60915a5194948fcf8e22d7789f0b050', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '0199f338185d5fa2cdd977bb20516746bd9ddad5', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '3b54de893cc8fc66df8588cee22e30d6f10850b3', class: "select-highlight" })), this.renderBottomContent()));
809
+ }) }, h("label", { key: 'd1c4663e740cfdcd28f90a5e0297d05cf42cc4df', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: 'cd671e0b543378e7b822ce649a7b4006094b111f', class: "select-wrapper-inner", part: "inner" }, h("slot", { key: '48e7df0c517a382195736273019b855e422a82ed', name: "start" }), h("div", { key: '822747ffb9101cb1d3ff947da55bc2e8e1f2c8e2', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '349200d9f9ebf25e0b8708ac8683a76e7c6ed33c', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '7eefb70d431cb9c01cc408d35349f7a3d0f2af35', class: "select-highlight" })), this.renderBottomContent()));
810
810
  }
811
811
  get el() { return getElement(this); }
812
812
  static get watchers() { return {
@@ -475,7 +475,7 @@ const Textarea = class {
475
475
  * TODO(FW-5592): Remove hasStartEndSlots condition
476
476
  */
477
477
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
478
- return (h(Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: createColorClasses(this.color, {
478
+ return (h(Host, { key: '543076e7ed730451b490a9008cabe8f4a5d1f347', class: createColorClasses(this.color, {
479
479
  [mode]: true,
480
480
  'has-value': hasValue,
481
481
  'has-focus': hasFocus,
@@ -484,7 +484,7 @@ const Textarea = class {
484
484
  [`textarea-shape-${shape}`]: shape !== undefined,
485
485
  [`textarea-label-placement-${labelPlacement}`]: true,
486
486
  'textarea-disabled': disabled,
487
- }) }, h("label", { key: '8a2dd59a60f7469df84018eb0ede3a9ec3862703', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '1bfc368236e3da7a225a45118c27fbfc1fe5fa46', class: "textarea-wrapper-inner" }, h("div", { key: '215cbb2635ff52e31a8973376989b85e7245d40f', class: "start-slot-wrapper" }, h("slot", { key: '9f6b461cdee9d629deb695d2bea054ece2f32305', name: "start" })), h("div", { key: 'c1af35a2d5bc452bebe0b22a26d15ff52b4e9fc8', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: '69a69b3cf0932baafbe37e6e846f1a571608d3f2', 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, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), h("div", { key: 'c053ea8b865d0e29763aed2e4939cc9c9e374c15', class: "end-slot-wrapper" }, h("slot", { key: '930aa641833b0df54b9ea10368fc2f46d5f491f6', name: "end" }))), shouldRenderHighlight && h("div", { key: '8d12597d15f5f429d80e8272ea99e64ed924e482', class: "textarea-highlight" })), this.renderBottomContent()));
487
+ }) }, h("label", { key: '3aebaa02edde10e19b2bbe2fbcc10f70b4faccff', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), h("div", { key: '73c1c7fee0ffffe65296060dd4110003d3975c44', class: "textarea-wrapper-inner" }, h("div", { key: '5a245b822afae0b9858ef0d176a2fe06983954e2', class: "start-slot-wrapper" }, h("slot", { key: '684305a1b558f93af6eb99825981ced1c09c7a8c', name: "start" })), h("div", { key: 'f2f723b674cff48cf76656450ff6c1362514ea90', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: 'ae826e876a4b476502498b9c64ea020010c55db3', 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, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), h("div", { key: '018cbf061fb53aa1d1caf6173fd08348cbe3413a', class: "end-slot-wrapper" }, h("slot", { key: 'c383636f2d8a548e48848d0967f71ee1969b1411', name: "end" }))), shouldRenderHighlight && h("div", { key: '6522d2058f9842abad9e7223b542cb7e1af40477', class: "textarea-highlight" })), this.renderBottomContent()));
488
488
  }
489
489
  get el() { return getElement(this); }
490
490
  static get watchers() { return {