@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
@@ -76,7 +76,6 @@ const Range = class {
76
76
  this.inheritedAttributes = {};
77
77
  this.contentEl = null;
78
78
  this.initialContentScrollY = true;
79
- this.focusFromPointer = false;
80
79
  this.ratioA = 0;
81
80
  this.ratioB = 0;
82
81
  /**
@@ -186,29 +185,6 @@ const Range = class {
186
185
  this.gesture.enable(!this.disabled);
187
186
  }
188
187
  };
189
- /**
190
- * Observes the knob handles for the ion-activated class and syncs
191
- * activatedKnob so the activated part is correctly set on the handle,
192
- * knob, and pin.
193
- */
194
- this.setupActivatedObserver = () => {
195
- const knobHandleA = this.el.shadowRoot.querySelector('.range-knob-handle-a');
196
- const knobHandleB = this.el.shadowRoot.querySelector('.range-knob-handle-b');
197
- const syncActivated = () => {
198
- this.activatedKnob = (knobHandleA === null || knobHandleA === void 0 ? void 0 : knobHandleA.classList.contains('ion-activated'))
199
- ? 'A'
200
- : (knobHandleB === null || knobHandleB === void 0 ? void 0 : knobHandleB.classList.contains('ion-activated'))
201
- ? 'B'
202
- : undefined;
203
- };
204
- this.activatedObserver = new MutationObserver(syncActivated);
205
- this.activatedObserver.observe(this.el.shadowRoot, {
206
- attributes: true,
207
- attributeFilter: ['class'],
208
- subtree: true,
209
- });
210
- syncActivated();
211
- };
212
188
  this.handleKeyboard = (knob, isIncrease) => {
213
189
  const { ensureValueInBounds } = this;
214
190
  let step = this.step;
@@ -231,7 +207,6 @@ const Range = class {
231
207
  this.onBlur = () => {
232
208
  if (this.hasFocus) {
233
209
  this.hasFocus = false;
234
- this.focusedKnob = undefined;
235
210
  this.ionBlur.emit();
236
211
  }
237
212
  };
@@ -242,20 +217,21 @@ const Range = class {
242
217
  }
243
218
  };
244
219
  this.onKnobFocus = (knob) => {
245
- // Clicking focuses the range which is needed for the keyboard,
246
- // but we only want to add the ion-focused class when focused via Tab.
247
- if (!this.focusFromPointer) {
248
- this.focusedKnob = knob;
249
- }
250
- else {
251
- this.focusFromPointer = false;
252
- this.focusedKnob = undefined;
253
- }
254
- // If the knob was not already focused, emit the focus event
255
220
  if (!this.hasFocus) {
256
221
  this.hasFocus = true;
257
222
  this.ionFocus.emit();
258
223
  }
224
+ // Manually manage ion-focused class for dual knobs
225
+ if (this.dualKnobs && this.el.shadowRoot) {
226
+ const knobA = this.el.shadowRoot.querySelector('.range-knob-a');
227
+ const knobB = this.el.shadowRoot.querySelector('.range-knob-b');
228
+ // Remove ion-focused from both knobs first
229
+ knobA === null || knobA === void 0 ? void 0 : knobA.classList.remove('ion-focused');
230
+ knobB === null || knobB === void 0 ? void 0 : knobB.classList.remove('ion-focused');
231
+ // Add ion-focused only to the focused knob
232
+ const focusedKnobEl = knob === 'A' ? knobA : knobB;
233
+ focusedKnobEl === null || focusedKnobEl === void 0 ? void 0 : focusedKnobEl.classList.add('ion-focused');
234
+ }
259
235
  };
260
236
  this.onKnobBlur = () => {
261
237
  // Check if focus is moving to another knob within the same range
@@ -267,18 +243,18 @@ const Range = class {
267
243
  if (!isStillFocusedOnKnob) {
268
244
  if (this.hasFocus) {
269
245
  this.hasFocus = false;
270
- this.focusedKnob = undefined;
271
246
  this.ionBlur.emit();
272
247
  }
248
+ // Remove ion-focused from both knobs when focus leaves the range
249
+ if (this.dualKnobs && this.el.shadowRoot) {
250
+ const knobA = this.el.shadowRoot.querySelector('.range-knob-a');
251
+ const knobB = this.el.shadowRoot.querySelector('.range-knob-b');
252
+ knobA === null || knobA === void 0 ? void 0 : knobA.classList.remove('ion-focused');
253
+ knobB === null || knobB === void 0 ? void 0 : knobB.classList.remove('ion-focused');
254
+ }
273
255
  }
274
256
  }, 0);
275
257
  };
276
- this.onKnobMouseEnter = (knob) => {
277
- this.hoveredKnob = knob;
278
- };
279
- this.onKnobMouseLeave = () => {
280
- this.hoveredKnob = undefined;
281
- };
282
258
  }
283
259
  debounceChanged() {
284
260
  const { ionInput, debounce, originalIonInput } = this;
@@ -355,7 +331,6 @@ const Range = class {
355
331
  this.originalIonInput = this.ionInput;
356
332
  this.setupGesture();
357
333
  this.updateRatio();
358
- this.setupActivatedObserver();
359
334
  this.didLoad = true;
360
335
  }
361
336
  connectedCallback() {
@@ -381,10 +356,6 @@ const Range = class {
381
356
  this.gesture.destroy();
382
357
  this.gesture = undefined;
383
358
  }
384
- if (this.activatedObserver) {
385
- this.activatedObserver.disconnect();
386
- this.activatedObserver = undefined;
387
- }
388
359
  }
389
360
  getValue() {
390
361
  var _a;
@@ -537,6 +508,7 @@ const Range = class {
537
508
  ratio = 1 - ratio;
538
509
  }
539
510
  this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
511
+ this.setFocus(this.pressedKnob);
540
512
  }
541
513
  get valA() {
542
514
  return ratioToValue(this.ratioA, this.min, this.max, this.step);
@@ -563,23 +535,9 @@ const Range = class {
563
535
  updateRatio() {
564
536
  const value = this.getValue();
565
537
  const { min, max } = this;
566
- /**
567
- * For dual knobs, value gives lower/upper but not which is A vs B.
568
- * Assign (lowerRatio, upperRatio) to (ratioA, ratioB) in the way that
569
- * minimizes change from the current ratios so the knobs don't swap.
570
- */
571
538
  if (this.dualKnobs) {
572
- const lowerRatio = valueToRatio(value.lower, min, max);
573
- const upperRatio = valueToRatio(value.upper, min, max);
574
- if (Math.abs(this.ratioA - lowerRatio) + Math.abs(this.ratioB - upperRatio) <=
575
- Math.abs(this.ratioA - upperRatio) + Math.abs(this.ratioB - lowerRatio)) {
576
- this.ratioA = lowerRatio;
577
- this.ratioB = upperRatio;
578
- }
579
- else {
580
- this.ratioA = upperRatio;
581
- this.ratioB = lowerRatio;
582
- }
539
+ this.ratioA = valueToRatio(value.lower, min, max);
540
+ this.ratioB = valueToRatio(value.upper, min, max);
583
541
  }
584
542
  else {
585
543
  this.ratioA = valueToRatio(value, min, max);
@@ -596,6 +554,14 @@ const Range = class {
596
554
  };
597
555
  this.noUpdate = false;
598
556
  }
557
+ setFocus(knob) {
558
+ if (this.el.shadowRoot) {
559
+ const knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');
560
+ if (knobEl) {
561
+ knobEl.focus();
562
+ }
563
+ }
564
+ }
599
565
  /**
600
566
  * Returns true if content was passed to the "start" slot
601
567
  */
@@ -613,7 +579,7 @@ const Range = class {
613
579
  }
614
580
  renderRangeSlider() {
615
581
  var _a;
616
- const { min, max, step, handleKeyboard, activatedKnob, focusedKnob, hoveredKnob, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
582
+ const { min, max, step, handleKeyboard, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
617
583
  let barStart = `${ratioLower * 100}%`;
618
584
  let barEnd = `${100 - ratioUpper * 100}%`;
619
585
  const rtl = dir.isRTL(this.el);
@@ -673,9 +639,7 @@ const Range = class {
673
639
  ticks.push(tick);
674
640
  }
675
641
  }
676
- return (index.h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl), onPointerDown: () => {
677
- this.focusFromPointer = true;
678
- },
642
+ return (index.h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl),
679
643
  /**
680
644
  * Since the gesture has a threshold, the value
681
645
  * won't change until the user has dragged past
@@ -688,7 +652,6 @@ const Range = class {
688
652
  * we need to listen for the "pointerUp" event.
689
653
  */
690
654
  onPointerUp: (ev) => {
691
- this.focusFromPointer = false;
692
655
  /**
693
656
  * If the user drags the knob on the web
694
657
  * version (does not occur on mobile),
@@ -714,11 +677,6 @@ const Range = class {
714
677
  'has-ticks': ticks.length > 0,
715
678
  }, role: "presentation", style: barStyle, part: "bar-active" })), renderKnob(rtl, {
716
679
  knob: 'A',
717
- position: getKnobPosition('A', this.ratioA, this.ratioB, this.dualKnobs),
718
- dualKnobs: this.dualKnobs,
719
- activated: activatedKnob === 'A',
720
- focused: focusedKnob === 'A',
721
- hovered: hoveredKnob === 'A',
722
680
  pressed: pressedKnob === 'A',
723
681
  value: this.valA,
724
682
  ratio: this.ratioA,
@@ -731,16 +689,9 @@ const Range = class {
731
689
  inheritedAttributes,
732
690
  onKnobFocus: this.onKnobFocus,
733
691
  onKnobBlur: this.onKnobBlur,
734
- onKnobMouseEnter: this.onKnobMouseEnter,
735
- onKnobMouseLeave: this.onKnobMouseLeave,
736
692
  }), this.dualKnobs &&
737
693
  renderKnob(rtl, {
738
694
  knob: 'B',
739
- position: getKnobPosition('B', this.ratioA, this.ratioB, this.dualKnobs),
740
- dualKnobs: this.dualKnobs,
741
- activated: activatedKnob === 'B',
742
- focused: focusedKnob === 'B',
743
- hovered: hoveredKnob === 'B',
744
695
  pressed: pressedKnob === 'B',
745
696
  value: this.valB,
746
697
  ratio: this.ratioB,
@@ -753,8 +704,6 @@ const Range = class {
753
704
  inheritedAttributes,
754
705
  onKnobFocus: this.onKnobFocus,
755
706
  onKnobBlur: this.onKnobBlur,
756
- onKnobMouseEnter: this.onKnobMouseEnter,
757
- onKnobMouseLeave: this.onKnobMouseLeave,
758
707
  })));
759
708
  }
760
709
  render() {
@@ -773,12 +722,6 @@ const Range = class {
773
722
  const hasEndContent = (hasLabel && labelPlacement === 'end') || this.hasEndSlotContent;
774
723
  const needsEndAdjustment = inItem && !hasEndContent;
775
724
  const mode = ionicGlobal.getIonMode(this);
776
- /**
777
- * Determine the name and position of the pressed knob to apply
778
- * Host classes for styling.
779
- */
780
- const pressedKnobName = dualKnobs ? pressedKnob === null || pressedKnob === void 0 ? void 0 : pressedKnob.toLowerCase() : undefined;
781
- const pressedKnobPosition = dualKnobs && pressedKnob ? getKnobPosition(pressedKnob, this.ratioA, this.ratioB, dualKnobs) : undefined;
782
725
  /**
783
726
  * Determine if any knob is at the min or max value to
784
727
  * apply Host classes for styling.
@@ -786,24 +729,21 @@ const Range = class {
786
729
  const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
787
730
  const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
788
731
  helpers.renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
789
- return (index.h(index.Host, { key: '8e439db9836fdefdc779573082c788e3ddb3ef73', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: theme.createColorClasses(this.color, {
732
+ return (index.h(index.Host, { key: 'ed646a42d51b8fe22012198c354cbcf5a389c108', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: theme.createColorClasses(this.color, {
790
733
  [mode]: true,
791
734
  'in-item': inItem,
792
735
  'range-disabled': disabled,
793
- 'range-dual-knobs': dualKnobs,
794
736
  'range-pressed': pressedKnob !== undefined,
795
- [`range-pressed-${pressedKnobName}`]: pressedKnob !== undefined && pressedKnobName !== undefined,
796
- [`range-pressed-${pressedKnobPosition}`]: pressedKnob !== undefined && pressedKnobPosition !== undefined,
797
737
  'range-has-pin': pin,
798
738
  [`range-label-placement-${labelPlacement}`]: true,
799
739
  'range-item-start-adjustment': needsStartAdjustment,
800
740
  'range-item-end-adjustment': needsEndAdjustment,
801
741
  'range-value-min': valueAtMin,
802
742
  'range-value-max': valueAtMax,
803
- }) }, index.h("label", { key: 'e14c56db4d1eef11a3a0639c4bbed368041fc3eb', class: "range-wrapper", id: "range-label" }, index.h("div", { key: '16d125b0af19fdfa3663731657a7cca51a7ed442', class: {
743
+ }) }, index.h("label", { key: '3083e4f2a624e3b268396acb4415f7c6ac44d851', class: "range-wrapper", id: "range-label" }, index.h("div", { key: '47b92f94d2a0381dd7c5cd3dda54ed2942096715', class: {
804
744
  'label-text-wrapper': true,
805
745
  'label-text-wrapper-hidden': !hasLabel,
806
- }, part: "label" }, label !== undefined ? index.h("div", { class: "label-text" }, label) : index.h("slot", { name: "label" })), index.h("div", { key: '545cc52a3e675e9df328dab537a4e44b7f3c59f8', class: "native-wrapper" }, index.h("slot", { key: 'ac54b45a21c9db231ebe11498d508d05864b56fb', name: "start" }), this.renderRangeSlider(), index.h("slot", { key: '7182dba53df2ff878d572b30afda64b37082c82e', name: "end" })))));
746
+ }, part: "label" }, label !== undefined ? index.h("div", { class: "label-text" }, label) : index.h("slot", { name: "label" })), index.h("div", { key: '5341da8d19eb29091df680978a0e20cc8f2eec65', class: "native-wrapper" }, index.h("slot", { key: '09f1437078032676695442d8c827a16faa7dffe2', name: "start" }), this.renderRangeSlider(), index.h("slot", { key: '02b7781970ea4d44f10b5f4627a2ca36eca45f85', name: "end" })))));
807
747
  }
808
748
  get el() { return index.getElement(this); }
809
749
  static get watchers() { return {
@@ -816,7 +756,7 @@ const Range = class {
816
756
  "value": ["valueChanged"]
817
757
  }; }
818
758
  };
819
- const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, disabled, activated, focused, hovered, pressed, pin, handleKeyboard, pinFormatter, inheritedAttributes, onKnobFocus, onKnobBlur, onKnobMouseEnter, onKnobMouseLeave, }) => {
759
+ const renderKnob = (rtl, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, pinFormatter, inheritedAttributes, onKnobFocus, onKnobBlur, }) => {
820
760
  const start = rtl ? 'right' : 'left';
821
761
  const knobStyle = () => {
822
762
  const style = {};
@@ -837,66 +777,16 @@ const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, di
837
777
  ev.preventDefault();
838
778
  ev.stopPropagation();
839
779
  }
840
- }, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, onMouseEnter: () => onKnobMouseEnter(knob), onMouseLeave: onKnobMouseLeave, class: {
780
+ }, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, class: {
841
781
  'range-knob-handle': true,
842
- 'range-knob-handle-a': knob === 'A',
843
- 'range-knob-handle-b': knob === 'B',
782
+ 'range-knob-a': knob === 'A',
783
+ 'range-knob-b': knob === 'B',
844
784
  'range-knob-pressed': pressed,
845
785
  'range-knob-min': value === min,
846
786
  'range-knob-max': value === max,
847
787
  'ion-activatable': true,
848
788
  'ion-focusable': true,
849
- 'ion-focused': focused,
850
- }, part: [
851
- 'knob-handle',
852
- dualKnobs && knob === 'A' && 'knob-handle-a',
853
- dualKnobs && knob === 'B' && 'knob-handle-b',
854
- dualKnobs && position === 'lower' && 'knob-handle-lower',
855
- dualKnobs && position === 'upper' && 'knob-handle-upper',
856
- pressed && 'pressed',
857
- focused && 'focused',
858
- hovered && 'hover',
859
- activated && 'activated',
860
- ]
861
- .filter(Boolean)
862
- .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 && (index.h("div", { class: "range-pin", role: "presentation", part: [
863
- 'pin',
864
- dualKnobs && knob === 'A' && 'pin-a',
865
- dualKnobs && knob === 'B' && 'pin-b',
866
- dualKnobs && position === 'lower' && 'pin-lower',
867
- dualKnobs && position === 'upper' && 'pin-upper',
868
- pressed && 'pressed',
869
- focused && 'focused',
870
- hovered && 'hover',
871
- activated && 'activated',
872
- ]
873
- .filter(Boolean)
874
- .join(' ') }, pinFormatter(value))), index.h("div", { class: "range-knob", role: "presentation", part: [
875
- 'knob',
876
- dualKnobs && knob === 'A' && 'knob-a',
877
- dualKnobs && knob === 'B' && 'knob-b',
878
- dualKnobs && position === 'lower' && 'knob-lower',
879
- dualKnobs && position === 'upper' && 'knob-upper',
880
- pressed && 'pressed',
881
- focused && 'focused',
882
- hovered && 'hover',
883
- activated && 'activated',
884
- ]
885
- .filter(Boolean)
886
- .join(' ') })));
887
- };
888
- /**
889
- * Returns whether the given knob is at the lower or upper position based
890
- * on current ratios for the given knob.
891
- */
892
- const getKnobPosition = (knob, ratioA, ratioB, dualKnobs) => {
893
- if (dualKnobs) {
894
- if (knob === 'A') {
895
- return ratioA <= ratioB ? 'lower' : 'upper';
896
- }
897
- return ratioB <= ratioA ? 'lower' : 'upper';
898
- }
899
- return 'lower';
789
+ }, 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 && (index.h("div", { class: "range-pin", role: "presentation", part: "pin" }, pinFormatter(value))), index.h("div", { class: "range-knob", role: "presentation", part: "knob" })));
900
790
  };
901
791
  const ratioToValue = (ratio, min, max, step) => {
902
792
  let value = (max - min) * ratio;
@@ -6,9 +6,9 @@
6
6
  var index = require('./index-D6Wc6v08.js');
7
7
  var dir = require('./dir-Cn0z1rJH.js');
8
8
 
9
- 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}";
9
+ 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}";
10
10
 
11
- 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}";
11
+ 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}";
12
12
 
13
13
  const SegmentView = class {
14
14
  constructor(hostRef) {
@@ -20,6 +20,10 @@ const SegmentView = class {
20
20
  * If `true`, the segment view cannot be interacted with.
21
21
  */
22
22
  this.disabled = false;
23
+ /**
24
+ * If `true`, users will be able to swipe the segment view to navigate between segment contents.
25
+ */
26
+ this.swipeGesture = true;
23
27
  }
24
28
  handleScroll(ev) {
25
29
  var _a;
@@ -107,11 +111,12 @@ const SegmentView = class {
107
111
  return Array.from(this.el.querySelectorAll('ion-segment-content'));
108
112
  }
109
113
  render() {
110
- const { disabled, isManualScroll } = this;
111
- return (index.h(index.Host, { key: 'e180b67bb3143a5f4611fb358c037be6fc782a8f', class: {
114
+ const { disabled, isManualScroll, swipeGesture } = this;
115
+ return (index.h(index.Host, { key: '565cccce7f0cfc4c71508777cc60292d6f24334f', class: {
112
116
  'segment-view-disabled': disabled,
113
117
  'segment-view-scroll-disabled': isManualScroll === false,
114
- } }, index.h("slot", { key: '41c11d6a7406a10f5c64a2e73abfc072afd8fc73' })));
118
+ 'segment-view-swipe-disabled': swipeGesture === false,
119
+ } }, index.h("slot", { key: '4118c240364467302b8f593e33c37837ea5d06f0' })));
115
120
  }
116
121
  get el() { return index.getElement(this); }
117
122
  };
@@ -759,7 +759,7 @@ const Select = class {
759
759
  if (!hasHintText) {
760
760
  return;
761
761
  }
762
- return index.h("div", { class: "select-bottom" }, this.renderHintText());
762
+ return (index.h("div", { class: "select-bottom", part: "bottom" }, this.renderHintText()));
763
763
  }
764
764
  render() {
765
765
  const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value, hasFocus, } = this;
@@ -790,7 +790,7 @@ const Select = class {
790
790
  * TODO(FW-5592): Remove hasStartEndSlots condition
791
791
  */
792
792
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
793
- return (index.h(index.Host, { key: 'b7fa907f8fbc54fd63e2d07a9bb5156d94fd5057', onClick: this.onClick, class: theme.createColorClasses(this.color, {
793
+ return (index.h(index.Host, { key: 'ada627c442ebcdd4a4ee96e5f5f3ec0e2181d689', onClick: this.onClick, class: theme.createColorClasses(this.color, {
794
794
  [mode]: true,
795
795
  'in-item': inItem,
796
796
  'in-item-color': theme.hostContext('ion-item.ion-color', el),
@@ -808,7 +808,7 @@ const Select = class {
808
808
  [`select-justify-${justify}`]: justifyEnabled,
809
809
  [`select-shape-${shape}`]: shape !== undefined,
810
810
  [`select-label-placement-${labelPlacement}`]: true,
811
- }) }, index.h("label", { key: '11137e6a8b0374e93923ddb5a4629972ded5f43c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), index.h("div", { key: '99e3c09b5e6c2e7be493ed5834f991fffe45cfff', class: "select-wrapper-inner" }, index.h("slot", { key: '740f0e5a913cb0209d5acae31c33a6ed8f672dfc', name: "start" }), index.h("div", { key: 'b20e33c8b60915a5194948fcf8e22d7789f0b050', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), index.h("slot", { key: '0199f338185d5fa2cdd977bb20516746bd9ddad5', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && index.h("div", { key: '3b54de893cc8fc66df8588cee22e30d6f10850b3', class: "select-highlight" })), this.renderBottomContent()));
811
+ }) }, index.h("label", { key: 'd1c4663e740cfdcd28f90a5e0297d05cf42cc4df', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), index.h("div", { key: 'cd671e0b543378e7b822ce649a7b4006094b111f', class: "select-wrapper-inner", part: "inner" }, index.h("slot", { key: '48e7df0c517a382195736273019b855e422a82ed', name: "start" }), index.h("div", { key: '822747ffb9101cb1d3ff947da55bc2e8e1f2c8e2', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), index.h("slot", { key: '349200d9f9ebf25e0b8708ac8683a76e7c6ed33c', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && index.h("div", { key: '7eefb70d431cb9c01cc408d35349f7a3d0f2af35', class: "select-highlight" })), this.renderBottomContent()));
812
812
  }
813
813
  get el() { return index.getElement(this); }
814
814
  static get watchers() { return {
@@ -477,7 +477,7 @@ const Textarea = class {
477
477
  * TODO(FW-5592): Remove hasStartEndSlots condition
478
478
  */
479
479
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
480
- return (index.h(index.Host, { key: 'a70a62d7aae3831a50acd74f60b930925ada1326', class: theme.createColorClasses(this.color, {
480
+ return (index.h(index.Host, { key: '543076e7ed730451b490a9008cabe8f4a5d1f347', class: theme.createColorClasses(this.color, {
481
481
  [mode]: true,
482
482
  'has-value': hasValue,
483
483
  'has-focus': hasFocus,
@@ -486,7 +486,7 @@ const Textarea = class {
486
486
  [`textarea-shape-${shape}`]: shape !== undefined,
487
487
  [`textarea-label-placement-${labelPlacement}`]: true,
488
488
  'textarea-disabled': disabled,
489
- }) }, index.h("label", { key: '8a2dd59a60f7469df84018eb0ede3a9ec3862703', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), index.h("div", { key: '1bfc368236e3da7a225a45118c27fbfc1fe5fa46', class: "textarea-wrapper-inner" }, index.h("div", { key: '215cbb2635ff52e31a8973376989b85e7245d40f', class: "start-slot-wrapper" }, index.h("slot", { key: '9f6b461cdee9d629deb695d2bea054ece2f32305', name: "start" })), index.h("div", { key: 'c1af35a2d5bc452bebe0b22a26d15ff52b4e9fc8', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, index.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)), index.h("div", { key: 'c053ea8b865d0e29763aed2e4939cc9c9e374c15', class: "end-slot-wrapper" }, index.h("slot", { key: '930aa641833b0df54b9ea10368fc2f46d5f491f6', name: "end" }))), shouldRenderHighlight && index.h("div", { key: '8d12597d15f5f429d80e8272ea99e64ed924e482', class: "textarea-highlight" })), this.renderBottomContent()));
489
+ }) }, index.h("label", { key: '3aebaa02edde10e19b2bbe2fbcc10f70b4faccff', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), index.h("div", { key: '73c1c7fee0ffffe65296060dd4110003d3975c44', class: "textarea-wrapper-inner" }, index.h("div", { key: '5a245b822afae0b9858ef0d176a2fe06983954e2', class: "start-slot-wrapper" }, index.h("slot", { key: '684305a1b558f93af6eb99825981ced1c09c7a8c', name: "start" })), index.h("div", { key: 'f2f723b674cff48cf76656450ff6c1362514ea90', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, index.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)), index.h("div", { key: '018cbf061fb53aa1d1caf6173fd08348cbe3413a', class: "end-slot-wrapper" }, index.h("slot", { key: 'c383636f2d8a548e48848d0967f71ee1969b1411', name: "end" }))), shouldRenderHighlight && index.h("div", { key: '6522d2058f9842abad9e7223b542cb7e1af40477', class: "textarea-highlight" })), this.renderBottomContent()));
490
490
  }
491
491
  get el() { return index.getElement(this); }
492
492
  static get watchers() { return {