@ionic/core 8.7.17-dev.11770147425.1bfcd5e5 → 8.7.17-dev.11770319814.172b4f50

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 (41) hide show
  1. package/components/ion-range.js +39 -97
  2. package/components/ion-refresher.js +32 -3
  3. package/components/ion-select.js +3 -2
  4. package/components/select-modal.js +6 -1
  5. package/dist/cjs/ion-range.cjs.entry.js +39 -95
  6. package/dist/cjs/ion-refresher_2.cjs.entry.js +32 -3
  7. package/dist/cjs/ion-select-modal.cjs.entry.js +5 -1
  8. package/dist/cjs/ion-select_3.cjs.entry.js +3 -2
  9. package/dist/cjs/ionic.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/components/range/range.js +42 -116
  12. package/dist/collection/components/refresher/refresher.js +70 -4
  13. package/dist/collection/components/select/select.js +3 -2
  14. package/dist/collection/components/select-modal/select-modal.js +25 -1
  15. package/dist/docs.json +83 -137
  16. package/dist/esm/ion-range.entry.js +39 -95
  17. package/dist/esm/ion-refresher_2.entry.js +32 -3
  18. package/dist/esm/ion-select-modal.entry.js +5 -1
  19. package/dist/esm/ion-select_3.entry.js +3 -2
  20. package/dist/esm/ionic.js +1 -1
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/html.html-data.json +5 -1
  23. package/dist/ionic/ionic.esm.js +1 -1
  24. package/dist/ionic/p-012212e4.entry.js +4 -0
  25. package/dist/ionic/p-88367362.entry.js +4 -0
  26. package/dist/ionic/p-90f2d3ff.entry.js +4 -0
  27. package/dist/ionic/p-d2489bf2.entry.js +4 -0
  28. package/dist/types/components/range/range-interface.d.ts +0 -1
  29. package/dist/types/components/range/range.d.ts +4 -24
  30. package/dist/types/components/refresher/refresher-interface.d.ts +7 -0
  31. package/dist/types/components/refresher/refresher.d.ts +16 -3
  32. package/dist/types/components/select-modal/select-modal.d.ts +4 -0
  33. package/dist/types/components.d.ts +26 -5
  34. package/dist/types/interface.d.ts +1 -1
  35. package/hydrate/index.js +83 -122
  36. package/hydrate/index.mjs +83 -122
  37. package/package.json +1 -1
  38. package/dist/ionic/p-02d76786.entry.js +0 -4
  39. package/dist/ionic/p-639dd543.entry.js +0 -4
  40. package/dist/ionic/p-b0c2f1f1.entry.js +0 -4
  41. package/dist/ionic/p-eb024a5b.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
  /**
@@ -208,7 +207,6 @@ const Range = class {
208
207
  this.onBlur = () => {
209
208
  if (this.hasFocus) {
210
209
  this.hasFocus = false;
211
- this.focusedKnob = undefined;
212
210
  this.ionBlur.emit();
213
211
  }
214
212
  };
@@ -219,20 +217,21 @@ const Range = class {
219
217
  }
220
218
  };
221
219
  this.onKnobFocus = (knob) => {
222
- // Clicking focuses the range which is needed for the keyboard,
223
- // but we only want to add the ion-focused class when focused via Tab.
224
- if (!this.focusFromPointer) {
225
- this.focusedKnob = knob;
226
- }
227
- else {
228
- this.focusFromPointer = false;
229
- this.focusedKnob = undefined;
230
- }
231
- // If the knob was not already focused, emit the focus event
232
220
  if (!this.hasFocus) {
233
221
  this.hasFocus = true;
234
222
  this.ionFocus.emit();
235
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
+ }
236
235
  };
237
236
  this.onKnobBlur = () => {
238
237
  // Check if focus is moving to another knob within the same range
@@ -244,18 +243,18 @@ const Range = class {
244
243
  if (!isStillFocusedOnKnob) {
245
244
  if (this.hasFocus) {
246
245
  this.hasFocus = false;
247
- this.focusedKnob = undefined;
248
246
  this.ionBlur.emit();
249
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
+ }
250
255
  }
251
256
  }, 0);
252
257
  };
253
- this.onKnobMouseEnter = (knob) => {
254
- this.hoveredKnob = knob;
255
- };
256
- this.onKnobMouseLeave = () => {
257
- this.hoveredKnob = undefined;
258
- };
259
258
  }
260
259
  debounceChanged() {
261
260
  const { ionInput, debounce, originalIonInput } = this;
@@ -509,6 +508,7 @@ const Range = class {
509
508
  ratio = 1 - ratio;
510
509
  }
511
510
  this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
511
+ this.setFocus(this.pressedKnob);
512
512
  }
513
513
  get valA() {
514
514
  return ratioToValue(this.ratioA, this.min, this.max, this.step);
@@ -535,23 +535,9 @@ const Range = class {
535
535
  updateRatio() {
536
536
  const value = this.getValue();
537
537
  const { min, max } = this;
538
- /**
539
- * For dual knobs, value gives lower/upper but not which is A vs B.
540
- * Assign (lowerRatio, upperRatio) to (ratioA, ratioB) in the way that
541
- * minimizes change from the current ratios so the knobs don't swap.
542
- */
543
538
  if (this.dualKnobs) {
544
- const lowerRatio = valueToRatio(value.lower, min, max);
545
- const upperRatio = valueToRatio(value.upper, min, max);
546
- if (Math.abs(this.ratioA - lowerRatio) + Math.abs(this.ratioB - upperRatio) <=
547
- Math.abs(this.ratioA - upperRatio) + Math.abs(this.ratioB - lowerRatio)) {
548
- this.ratioA = lowerRatio;
549
- this.ratioB = upperRatio;
550
- }
551
- else {
552
- this.ratioA = upperRatio;
553
- this.ratioB = lowerRatio;
554
- }
539
+ this.ratioA = valueToRatio(value.lower, min, max);
540
+ this.ratioB = valueToRatio(value.upper, min, max);
555
541
  }
556
542
  else {
557
543
  this.ratioA = valueToRatio(value, min, max);
@@ -568,6 +554,14 @@ const Range = class {
568
554
  };
569
555
  this.noUpdate = false;
570
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
+ }
571
565
  /**
572
566
  * Returns true if content was passed to the "start" slot
573
567
  */
@@ -585,7 +579,7 @@ const Range = class {
585
579
  }
586
580
  renderRangeSlider() {
587
581
  var _a;
588
- const { min, max, step, handleKeyboard, focusedKnob, hoveredKnob, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
582
+ const { min, max, step, handleKeyboard, pressedKnob, disabled, pin, ratioLower, ratioUpper, pinFormatter, inheritedAttributes, } = this;
589
583
  let barStart = `${ratioLower * 100}%`;
590
584
  let barEnd = `${100 - ratioUpper * 100}%`;
591
585
  const rtl = dir.isRTL(this.el);
@@ -645,9 +639,7 @@ const Range = class {
645
639
  ticks.push(tick);
646
640
  }
647
641
  }
648
- return (index.h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl), onPointerDown: () => {
649
- this.focusFromPointer = true;
650
- },
642
+ return (index.h("div", { class: "range-slider", ref: (rangeEl) => (this.rangeSlider = rangeEl),
651
643
  /**
652
644
  * Since the gesture has a threshold, the value
653
645
  * won't change until the user has dragged past
@@ -660,7 +652,6 @@ const Range = class {
660
652
  * we need to listen for the "pointerUp" event.
661
653
  */
662
654
  onPointerUp: (ev) => {
663
- this.focusFromPointer = false;
664
655
  /**
665
656
  * If the user drags the knob on the web
666
657
  * version (does not occur on mobile),
@@ -686,10 +677,6 @@ const Range = class {
686
677
  'has-ticks': ticks.length > 0,
687
678
  }, role: "presentation", style: barStyle, part: "bar-active" })), renderKnob(rtl, {
688
679
  knob: 'A',
689
- position: this.dualKnobs ? (this.ratioA <= this.ratioB ? 'lower' : 'upper') : 'lower',
690
- dualKnobs: this.dualKnobs,
691
- focused: focusedKnob === 'A',
692
- hovered: hoveredKnob === 'A',
693
680
  pressed: pressedKnob === 'A',
694
681
  value: this.valA,
695
682
  ratio: this.ratioA,
@@ -702,15 +689,9 @@ const Range = class {
702
689
  inheritedAttributes,
703
690
  onKnobFocus: this.onKnobFocus,
704
691
  onKnobBlur: this.onKnobBlur,
705
- onKnobMouseEnter: this.onKnobMouseEnter,
706
- onKnobMouseLeave: this.onKnobMouseLeave,
707
692
  }), this.dualKnobs &&
708
693
  renderKnob(rtl, {
709
694
  knob: 'B',
710
- position: this.ratioB <= this.ratioA ? 'lower' : 'upper',
711
- dualKnobs: this.dualKnobs,
712
- focused: focusedKnob === 'B',
713
- hovered: hoveredKnob === 'B',
714
695
  pressed: pressedKnob === 'B',
715
696
  value: this.valB,
716
697
  ratio: this.ratioB,
@@ -723,8 +704,6 @@ const Range = class {
723
704
  inheritedAttributes,
724
705
  onKnobFocus: this.onKnobFocus,
725
706
  onKnobBlur: this.onKnobBlur,
726
- onKnobMouseEnter: this.onKnobMouseEnter,
727
- onKnobMouseLeave: this.onKnobMouseLeave,
728
707
  })));
729
708
  }
730
709
  render() {
@@ -750,11 +729,10 @@ const Range = class {
750
729
  const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
751
730
  const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
752
731
  helpers.renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
753
- return (index.h(index.Host, { key: '4a393e229cf599f3377b606acaebe5f090d41f6e', 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, {
754
733
  [mode]: true,
755
734
  'in-item': inItem,
756
735
  'range-disabled': disabled,
757
- 'range-dual-knobs': dualKnobs,
758
736
  'range-pressed': pressedKnob !== undefined,
759
737
  'range-has-pin': pin,
760
738
  [`range-label-placement-${labelPlacement}`]: true,
@@ -762,10 +740,10 @@ const Range = class {
762
740
  'range-item-end-adjustment': needsEndAdjustment,
763
741
  'range-value-min': valueAtMin,
764
742
  'range-value-max': valueAtMax,
765
- }) }, index.h("label", { key: 'd7f45882aa7f11bbac1cb783caa0053151efcc70', class: "range-wrapper", id: "range-label" }, index.h("div", { key: '537d3b1e7f9fed0c8380678551e31325b1ef1f85', class: {
743
+ }) }, index.h("label", { key: '3083e4f2a624e3b268396acb4415f7c6ac44d851', class: "range-wrapper", id: "range-label" }, index.h("div", { key: '47b92f94d2a0381dd7c5cd3dda54ed2942096715', class: {
766
744
  'label-text-wrapper': true,
767
745
  'label-text-wrapper-hidden': !hasLabel,
768
- }, part: "label" }, label !== undefined ? index.h("div", { class: "label-text" }, label) : index.h("slot", { name: "label" })), index.h("div", { key: 'cb50f07a3704d04af3554211ffad35f7d9fcc450', class: "native-wrapper" }, index.h("slot", { key: '09004eaa72688ca0f0536bd5f5d7160a23d16406', name: "start" }), this.renderRangeSlider(), index.h("slot", { key: 'a94da21d2ea7ed2feafcc0651c72da21d6de1e57', 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" })))));
769
747
  }
770
748
  get el() { return index.getElement(this); }
771
749
  static get watchers() { return {
@@ -778,7 +756,7 @@ const Range = class {
778
756
  "value": ["valueChanged"]
779
757
  }; }
780
758
  };
781
- const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, disabled, pressed, focused, hovered, 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, }) => {
782
760
  const start = rtl ? 'right' : 'left';
783
761
  const knobStyle = () => {
784
762
  const style = {};
@@ -799,50 +777,16 @@ const renderKnob = (rtl, { knob, position, dualKnobs, value, ratio, min, max, di
799
777
  ev.preventDefault();
800
778
  ev.stopPropagation();
801
779
  }
802
- }, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, onMouseEnter: () => onKnobMouseEnter(knob), onMouseLeave: onKnobMouseLeave, class: {
780
+ }, onFocus: () => onKnobFocus(knob), onBlur: onKnobBlur, class: {
803
781
  'range-knob-handle': true,
804
- 'range-knob-handle-a': knob === 'A',
805
- 'range-knob-handle-b': knob === 'B',
782
+ 'range-knob-a': knob === 'A',
783
+ 'range-knob-b': knob === 'B',
806
784
  'range-knob-pressed': pressed,
807
785
  'range-knob-min': value === min,
808
786
  'range-knob-max': value === max,
809
787
  'ion-activatable': true,
810
788
  'ion-focusable': true,
811
- 'ion-focused': focused,
812
- }, part: [
813
- 'knob-handle',
814
- dualKnobs && knob === 'A' && 'knob-handle-a',
815
- dualKnobs && knob === 'B' && 'knob-handle-b',
816
- dualKnobs && position === 'lower' && 'knob-handle-lower',
817
- dualKnobs && position === 'upper' && 'knob-handle-upper',
818
- pressed && 'pressed',
819
- focused && 'focused',
820
- hovered && 'hover',
821
- ]
822
- .filter(Boolean)
823
- .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: [
824
- 'pin',
825
- dualKnobs && knob === 'A' && 'pin-a',
826
- dualKnobs && knob === 'B' && 'pin-b',
827
- dualKnobs && position === 'lower' && 'pin-lower',
828
- dualKnobs && position === 'upper' && 'pin-upper',
829
- pressed && 'pressed',
830
- focused && 'focused',
831
- hovered && 'hover',
832
- ]
833
- .filter(Boolean)
834
- .join(' ') }, pinFormatter(value))), index.h("div", { class: "range-knob", role: "presentation", part: [
835
- 'knob',
836
- dualKnobs && knob === 'A' && 'knob-a',
837
- dualKnobs && knob === 'B' && 'knob-b',
838
- dualKnobs && position === 'lower' && 'knob-lower',
839
- dualKnobs && position === 'upper' && 'knob-upper',
840
- pressed && 'pressed',
841
- focused && 'focused',
842
- hovered && 'hover',
843
- ]
844
- .filter(Boolean)
845
- .join(' ') })));
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" })));
846
790
  };
847
791
  const ratioToValue = (ratio, min, max, step) => {
848
792
  let value = (max - min) * ratio;
@@ -214,6 +214,8 @@ const Refresher = class {
214
214
  this.ionRefresh = index.createEvent(this, "ionRefresh", 7);
215
215
  this.ionPull = index.createEvent(this, "ionPull", 7);
216
216
  this.ionStart = index.createEvent(this, "ionStart", 7);
217
+ this.ionPullStart = index.createEvent(this, "ionPullStart", 7);
218
+ this.ionPullEnd = index.createEvent(this, "ionPullEnd", 7);
217
219
  this.appliedStyles = false;
218
220
  this.didStart = false;
219
221
  this.progress = 0;
@@ -268,8 +270,8 @@ const Refresher = class {
268
270
  * than `1`. The default value is `1` which is equal to the speed of the cursor.
269
271
  * If a negative value is passed in, the factor will be `1` instead.
270
272
  *
271
- * For example: If the value passed is `1.2` and the content is dragged by
272
- * `10` pixels, instead of `10` pixels the content will be pulled by `12` pixels
273
+ * For example, If the value passed is `1.2` and the content is dragged by
274
+ * `10` pixels, instead of `10` pixels, the content will be pulled by `12` pixels
273
275
  * (an increase of 20 percent). If the value passed is `0.8`, the dragged amount
274
276
  * will be `8` pixels, less than the amount the cursor has moved.
275
277
  *
@@ -319,6 +321,9 @@ const Refresher = class {
319
321
  this.animations = [];
320
322
  this.progress = 0;
321
323
  this.state = 1 /* RefresherState.Inactive */;
324
+ this.ionPullEnd.emit({
325
+ reason: state === 32 /* RefresherState.Completing */ ? 'complete' : 'cancel',
326
+ });
322
327
  }
323
328
  async setupiOSNativeRefresher(pullingSpinner, refreshingSpinner) {
324
329
  this.elementToTransform = this.scrollEl;
@@ -351,6 +356,7 @@ const Refresher = class {
351
356
  if (!this.didStart) {
352
357
  this.didStart = true;
353
358
  this.ionStart.emit();
359
+ this.ionPullStart.emit();
354
360
  }
355
361
  // emit "pulling" on every move
356
362
  if (this.pointerDown) {
@@ -426,6 +432,7 @@ const Refresher = class {
426
432
  this.lastVelocityY = ev.velocityY;
427
433
  },
428
434
  onEnd: () => {
435
+ const hadStarted = this.didStart;
429
436
  this.pointerDown = false;
430
437
  this.didStart = false;
431
438
  if (this.needsCompletion) {
@@ -435,6 +442,13 @@ const Refresher = class {
435
442
  else if (this.didRefresh) {
436
443
  index.readTask(() => translateElement(this.elementToTransform, `${this.el.clientHeight}px`));
437
444
  }
445
+ else if (hadStarted) {
446
+ /**
447
+ * User started pulling but released before reaching the refresh threshold.
448
+ * Emit ionPullEnd to complete the event pair.
449
+ */
450
+ this.ionPullEnd.emit({ reason: 'cancel' });
451
+ }
438
452
  },
439
453
  });
440
454
  this.disabledChanged();
@@ -481,6 +495,7 @@ const Refresher = class {
481
495
  ev.data.animation = animation;
482
496
  animation.progressStart(false, 0);
483
497
  this.ionStart.emit();
498
+ this.ionPullStart.emit();
484
499
  this.animations.push(animation);
485
500
  return;
486
501
  }
@@ -503,6 +518,7 @@ const Refresher = class {
503
518
  this.animations = [];
504
519
  this.gesture.enable(true);
505
520
  this.state = 1 /* RefresherState.Inactive */;
521
+ this.ionPullEnd.emit({ reason: 'cancel' });
506
522
  });
507
523
  return;
508
524
  }
@@ -747,6 +763,7 @@ const Refresher = class {
747
763
  if (!this.didStart) {
748
764
  this.didStart = true;
749
765
  this.ionStart.emit();
766
+ this.ionPullStart.emit();
750
767
  }
751
768
  // emit "pulling" on every move
752
769
  this.ionPull.emit();
@@ -790,6 +807,15 @@ const Refresher = class {
790
807
  * available right away.
791
808
  */
792
809
  this.restoreOverflowStyle();
810
+ /**
811
+ * If ionPullStart was emitted, we need to emit ionPullEnd
812
+ * even though the gesture was aborted before reaching the
813
+ * pulling threshold.
814
+ */
815
+ if (this.didStart) {
816
+ this.didStart = false;
817
+ this.ionPullEnd.emit({ reason: 'cancel' });
818
+ }
793
819
  }
794
820
  }
795
821
  beginRefresh() {
@@ -836,6 +862,9 @@ const Refresher = class {
836
862
  if (this.contentFullscreen && this.backgroundContentEl) {
837
863
  (_a = this.backgroundContentEl) === null || _a === void 0 ? void 0 : _a.style.removeProperty('--offset-top');
838
864
  }
865
+ this.ionPullEnd.emit({
866
+ reason: state === 32 /* RefresherState.Completing */ ? 'complete' : 'cancel',
867
+ });
839
868
  }, 600);
840
869
  // reset the styles on the scroll element
841
870
  // set that the refresh is actively cancelling/completing
@@ -889,7 +918,7 @@ const Refresher = class {
889
918
  }
890
919
  render() {
891
920
  const mode = ionicGlobal.getIonMode(this);
892
- return (index.h(index.Host, { key: '2d1bd880877b698604542ab2d602d38b9504d975', slot: "fixed", class: {
921
+ return (index.h(index.Host, { key: 'bed0c2f44c32ecac24b7d8326ac7c7ef1d12c44f', slot: "fixed", class: {
893
922
  [mode]: true,
894
923
  // Used internally for styling
895
924
  [`refresher-${mode}`]: true,
@@ -22,6 +22,10 @@ const selectModalMdCss = ".sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-
22
22
  const SelectModal = class {
23
23
  constructor(hostRef) {
24
24
  index.registerInstance(this, hostRef);
25
+ /**
26
+ * The text to display on the cancel button.
27
+ */
28
+ this.cancelText = 'Close';
25
29
  this.options = [];
26
30
  }
27
31
  closeModal() {
@@ -90,7 +94,7 @@ const SelectModal = class {
90
94
  } }, option.text))));
91
95
  }
92
96
  render() {
93
- return (index.h(index.Host, { key: 'b6c0dec240b2e41985b15fdf4e5a6d3a145c1567', class: ionicGlobal.getIonMode(this) }, index.h("ion-header", { key: 'cd177e85ee0f62a60a3a708342d6ab6eb19a44dc' }, index.h("ion-toolbar", { key: 'aee8222a5a4daa540ad202b2e4cac1ef93d9558c' }, this.header !== undefined && index.h("ion-title", { key: '5f8fecc764d97bf840d3d4cfddeeccd118ab4436' }, this.header), index.h("ion-buttons", { key: '919033950d7c2b0101f96a9c9698219de9f568ea', slot: "end" }, index.h("ion-button", { key: '34b571cab6dced4bde555a077a21e91800829931', onClick: () => this.closeModal() }, "Close")))), index.h("ion-content", { key: '3c9153d26ba7a5a03d3b20fcd628d0c3031661a7' }, index.h("ion-list", { key: 'e00b222c071bc97c82ad1bba4db95a8a5c43ed6d' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
97
+ return (index.h(index.Host, { key: '59ba79ffdbb69befe8e13745450c1071a1fe8c6c', class: ionicGlobal.getIonMode(this) }, index.h("ion-header", { key: 'fa4d08ee43eec4b9add09d9ffabcba9ed13dd4af' }, index.h("ion-toolbar", { key: 'b5e26cf092297c51c1dba3ce7963e7b03420393b' }, this.header !== undefined && index.h("ion-title", { key: 'a8a93cdea4d119d3a17d8cef3878b8a1daa86e26' }, this.header), index.h("ion-buttons", { key: 'bbc656713b41ef09099ed466f93a9cfbdaceecc1', slot: "end" }, index.h("ion-button", { key: '80b8751fe4c96e06b620a0b9d17b2d9b3da2faa5', onClick: () => this.closeModal() }, this.cancelText)))), index.h("ion-content", { key: 'a251fc00ae4cc7e6b3abe13caa10d95bb515558e' }, index.h("ion-list", { key: 'bcaf38d6d91accfabb4a9d26783bc0e4801abe3c' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
94
98
  }
95
99
  get el() { return index.getElement(this); }
96
100
  };
@@ -540,6 +540,7 @@ const Select = class {
540
540
  const mode = ionicGlobal.getIonMode(this);
541
541
  const modalOpts = Object.assign(Object.assign({}, interfaceOptions), { mode, cssClass: ['select-modal', interfaceOptions.cssClass], component: 'ion-select-modal', componentProps: {
542
542
  header: interfaceOptions.header,
543
+ cancelText: this.cancelText,
543
544
  multiple,
544
545
  value,
545
546
  options: this.createOverlaySelectOptions(this.childOpts, value),
@@ -789,7 +790,7 @@ const Select = class {
789
790
  * TODO(FW-5592): Remove hasStartEndSlots condition
790
791
  */
791
792
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
792
- return (index.h(index.Host, { key: 'd8026835993d0e6dce747098f741a06ae4e4f54d', onClick: this.onClick, class: theme.createColorClasses(this.color, {
793
+ return (index.h(index.Host, { key: 'b7fa907f8fbc54fd63e2d07a9bb5156d94fd5057', onClick: this.onClick, class: theme.createColorClasses(this.color, {
793
794
  [mode]: true,
794
795
  'in-item': inItem,
795
796
  'in-item-color': theme.hostContext('ion-item.ion-color', el),
@@ -807,7 +808,7 @@ const Select = class {
807
808
  [`select-justify-${justify}`]: justifyEnabled,
808
809
  [`select-shape-${shape}`]: shape !== undefined,
809
810
  [`select-label-placement-${labelPlacement}`]: true,
810
- }) }, index.h("label", { key: 'fcfb40209d6d07d49c7fdca4884b31abf6ac2567', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick }, this.renderLabelContainer(), index.h("div", { key: 'f191664f2290c3890bde1156157c83a6ff17dbe2', class: "select-wrapper-inner" }, index.h("slot", { key: '317a28d1115b4214f291e228ce0fe6fc782e57d5', name: "start" }), index.h("div", { key: 'db68e18abd5ca3a1023d7c7b58bf89893ae18073', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), index.h("slot", { key: '4274e042267c2234a198b0f65c89477898d08130', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && index.h("div", { key: '2e2eb1ee2b2791e0683d9afb186fde6e938ca59c', class: "select-highlight" })), this.renderBottomContent()));
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
812
  }
812
813
  get el() { return index.getElement(this); }
813
814
  static get watchers() { return {