@ionic/core 8.8.4-dev.11776184632.103b8351 → 8.8.4-dev.11776246162.138c2737

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 (217) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-action-sheet.js +1 -1
  3. package/components/ion-alert.js +1 -1
  4. package/components/ion-datetime.js +1 -1
  5. package/components/ion-infinite-scroll-content.js +1 -1
  6. package/components/ion-loading.js +1 -1
  7. package/components/ion-menu.js +1 -1
  8. package/components/ion-modal.js +1 -1
  9. package/components/ion-picker-legacy.js +1 -1
  10. package/components/ion-popover.js +1 -1
  11. package/components/ion-refresher-content.js +1 -1
  12. package/components/ion-select-modal.js +1 -1
  13. package/components/ion-select-option.js +1 -1
  14. package/components/ion-select-popover.js +1 -1
  15. package/components/ion-select.js +1 -1
  16. package/components/ion-skeleton-text.js +1 -1
  17. package/components/ion-spinner.js +1 -1
  18. package/components/ion-split-pane.js +1 -1
  19. package/components/ion-tab-bar.js +1 -1
  20. package/components/ion-tab-button.js +1 -1
  21. package/components/ion-tab.js +1 -1
  22. package/components/ion-tabs.js +1 -1
  23. package/components/ion-text.js +1 -1
  24. package/components/ion-textarea.js +1 -1
  25. package/components/ion-thumbnail.js +1 -1
  26. package/components/ion-title.js +1 -1
  27. package/components/ion-toast.js +1 -1
  28. package/components/ion-toggle.js +1 -1
  29. package/components/ion-toolbar.js +1 -1
  30. package/components/p-B36-MWK0.js +4 -0
  31. package/components/p-BDPU2685.js +4 -0
  32. package/components/p-BrNzoF1U.js +4 -0
  33. package/components/{p-B0orUoaV.js → p-C-_EGKki.js} +1 -1
  34. package/components/{p-qhBzWoOF.js → p-C2cZvGcF.js} +1 -1
  35. package/components/p-CEUppJkx.js +4 -0
  36. package/components/p-CSexRbnt.js +4 -0
  37. package/components/{p-ZRp3l6Dk.js → p-CoarhFWH.js} +1 -1
  38. package/components/p-DNdBtsfu.js +4 -0
  39. package/components/p-Njik5v4C.js +4 -0
  40. package/dist/cjs/index.cjs.js +1 -1
  41. package/dist/cjs/ion-action-sheet.cjs.entry.js +34 -18
  42. package/dist/cjs/ion-alert.cjs.entry.js +35 -32
  43. package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
  44. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-datetime_3.cjs.entry.js +28 -4
  46. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  47. package/dist/cjs/ion-loading.cjs.entry.js +29 -4
  48. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  49. package/dist/cjs/ion-modal.cjs.entry.js +176 -79
  50. package/dist/cjs/ion-popover.cjs.entry.js +90 -4
  51. package/dist/cjs/ion-select-modal.cjs.entry.js +27 -46
  52. package/dist/cjs/ion-select_3.cjs.entry.js +48 -177
  53. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  54. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  55. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  56. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  57. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  58. package/dist/cjs/ion-textarea.cjs.entry.js +3 -3
  59. package/dist/cjs/ion-toast.cjs.entry.js +32 -4
  60. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  61. package/dist/cjs/ionic.cjs.js +1 -1
  62. package/dist/cjs/loader.cjs.js +1 -1
  63. package/dist/cjs/{overlays-Dhoy6v_5.js → overlays-BbhewSIQ.js} +4 -4
  64. package/dist/collection/components/action-sheet/action-sheet.ios.css +0 -84
  65. package/dist/collection/components/action-sheet/action-sheet.js +8 -15
  66. package/dist/collection/components/action-sheet/action-sheet.md.css +0 -84
  67. package/dist/collection/components/action-sheet/animations/ionic.enter.js +27 -0
  68. package/dist/collection/components/action-sheet/animations/ionic.leave.js +21 -0
  69. package/dist/collection/components/alert/alert.ios.css +0 -83
  70. package/dist/collection/components/alert/alert.js +8 -29
  71. package/dist/collection/components/alert/alert.md.css +0 -83
  72. package/dist/collection/components/alert/animations/ionic.enter.js +28 -0
  73. package/dist/collection/components/alert/animations/ionic.leave.js +19 -0
  74. package/dist/collection/components/loading/animations/ionic.enter.js +28 -0
  75. package/dist/collection/components/loading/animations/ionic.leave.js +22 -0
  76. package/dist/collection/components/loading/loading.js +4 -3
  77. package/dist/collection/components/modal/animations/ionic.enter.js +40 -0
  78. package/dist/collection/components/modal/animations/ionic.leave.js +28 -0
  79. package/dist/collection/components/modal/gestures/sheet.js +71 -9
  80. package/dist/collection/components/modal/modal.ionic.css +1 -1
  81. package/dist/collection/components/modal/modal.js +6 -5
  82. package/dist/collection/components/picker-legacy/animations/ionic.enter.js +27 -0
  83. package/dist/collection/components/picker-legacy/animations/ionic.leave.js +23 -0
  84. package/dist/collection/components/picker-legacy/picker.js +4 -3
  85. package/dist/collection/components/popover/animations/ionic.enter.js +91 -0
  86. package/dist/collection/components/popover/animations/ionic.leave.js +29 -0
  87. package/dist/collection/components/popover/popover.js +4 -3
  88. package/dist/collection/components/select/select.ionic.css +0 -31
  89. package/dist/collection/components/select/select.ios.css +0 -31
  90. package/dist/collection/components/select/select.js +14 -125
  91. package/dist/collection/components/select/select.md.css +0 -31
  92. package/dist/collection/components/select-modal/select-modal.ionic.css +0 -24
  93. package/dist/collection/components/select-modal/select-modal.ios.css +0 -77
  94. package/dist/collection/components/select-modal/select-modal.js +23 -42
  95. package/dist/collection/components/select-modal/select-modal.md.css +1 -80
  96. package/dist/collection/components/select-option/select-option.js +2 -21
  97. package/dist/collection/components/select-popover/select-popover.ios.css +0 -77
  98. package/dist/collection/components/select-popover/select-popover.js +26 -45
  99. package/dist/collection/components/select-popover/select-popover.md.css +0 -77
  100. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  101. package/dist/collection/components/spinner/spinner.js +1 -1
  102. package/dist/collection/components/split-pane/split-pane.js +2 -2
  103. package/dist/collection/components/tab/tab.js +2 -2
  104. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  105. package/dist/collection/components/tab-button/tab-button.js +2 -2
  106. package/dist/collection/components/tabs/tabs.js +1 -1
  107. package/dist/collection/components/text/text.js +2 -2
  108. package/dist/collection/components/textarea/textarea.js +3 -3
  109. package/dist/collection/components/thumbnail/thumbnail.js +2 -2
  110. package/dist/collection/components/title/title.js +2 -2
  111. package/dist/collection/components/toast/animations/ionic.enter.js +33 -0
  112. package/dist/collection/components/toast/animations/ionic.leave.js +16 -0
  113. package/dist/collection/components/toast/toast.js +4 -3
  114. package/dist/collection/components/toggle/toggle.js +3 -3
  115. package/dist/collection/components/toolbar/toolbar.js +2 -2
  116. package/dist/collection/utils/overlays.js +5 -5
  117. package/dist/docs.json +5 -139
  118. package/dist/esm/index.js +1 -1
  119. package/dist/esm/ion-action-sheet.entry.js +34 -18
  120. package/dist/esm/ion-alert.entry.js +35 -32
  121. package/dist/esm/ion-app_8.entry.js +4 -4
  122. package/dist/esm/ion-avatar_3.entry.js +2 -2
  123. package/dist/esm/ion-datetime_3.entry.js +28 -4
  124. package/dist/esm/ion-item_8.entry.js +2 -2
  125. package/dist/esm/ion-loading.entry.js +29 -4
  126. package/dist/esm/ion-menu_3.entry.js +1 -1
  127. package/dist/esm/ion-modal.entry.js +177 -80
  128. package/dist/esm/ion-popover.entry.js +90 -4
  129. package/dist/esm/ion-select-modal.entry.js +27 -46
  130. package/dist/esm/ion-select_3.entry.js +49 -178
  131. package/dist/esm/ion-spinner.entry.js +1 -1
  132. package/dist/esm/ion-split-pane.entry.js +2 -2
  133. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  134. package/dist/esm/ion-tab_2.entry.js +3 -3
  135. package/dist/esm/ion-text.entry.js +2 -2
  136. package/dist/esm/ion-textarea.entry.js +3 -3
  137. package/dist/esm/ion-toast.entry.js +32 -4
  138. package/dist/esm/ion-toggle.entry.js +3 -3
  139. package/dist/esm/ionic.js +1 -1
  140. package/dist/esm/loader.js +1 -1
  141. package/dist/esm/{overlays-CvFHfO3y.js → overlays-VA-4NWjf.js} +5 -5
  142. package/dist/html.html-data.json +0 -4
  143. package/dist/ionic/index.esm.js +1 -1
  144. package/dist/ionic/ionic.esm.js +1 -1
  145. package/dist/ionic/p-07b129d5.entry.js +4 -0
  146. package/dist/ionic/p-0cb50208.entry.js +4 -0
  147. package/dist/ionic/{p-db4f4eaf.entry.js → p-1efe83c8.entry.js} +1 -1
  148. package/dist/ionic/{p-d2fe6791.entry.js → p-2193e875.entry.js} +1 -1
  149. package/dist/ionic/{p-69033ad6.entry.js → p-2bf931ae.entry.js} +1 -1
  150. package/dist/ionic/{p-26595044.entry.js → p-3bf01c2c.entry.js} +1 -1
  151. package/dist/ionic/p-3d4c8528.entry.js +4 -0
  152. package/dist/ionic/{p-9e71982e.entry.js → p-49799a34.entry.js} +1 -1
  153. package/dist/ionic/p-64341e32.entry.js +4 -0
  154. package/dist/ionic/p-6992d9d6.entry.js +4 -0
  155. package/dist/ionic/{p-aa8c1e64.entry.js → p-6c8c37c2.entry.js} +1 -1
  156. package/dist/ionic/{p-a94016be.entry.js → p-91e242e4.entry.js} +1 -1
  157. package/dist/ionic/{p-96ec9a10.entry.js → p-9b9b1450.entry.js} +1 -1
  158. package/dist/ionic/p-9dd4276b.entry.js +4 -0
  159. package/dist/ionic/p-BExfzy0B.js +4 -0
  160. package/dist/ionic/p-a3d794ba.entry.js +4 -0
  161. package/dist/ionic/p-ba9f8cbb.entry.js +4 -0
  162. package/dist/ionic/{p-2095969c.entry.js → p-bae3ebe5.entry.js} +1 -1
  163. package/dist/ionic/{p-a1c8ba8c.entry.js → p-bc5713f7.entry.js} +1 -1
  164. package/dist/ionic/{p-71f28573.entry.js → p-cdfbe4cc.entry.js} +1 -1
  165. package/dist/ionic/p-fa701753.entry.js +4 -0
  166. package/dist/types/components/action-sheet/action-sheet-interface.d.ts +1 -4
  167. package/dist/types/components/action-sheet/animations/ionic.enter.d.ts +5 -0
  168. package/dist/types/components/action-sheet/animations/ionic.leave.d.ts +5 -0
  169. package/dist/types/components/alert/alert-interface.d.ts +1 -4
  170. package/dist/types/components/alert/animations/ionic.enter.d.ts +5 -0
  171. package/dist/types/components/alert/animations/ionic.leave.d.ts +5 -0
  172. package/dist/types/components/loading/animations/ionic.enter.d.ts +5 -0
  173. package/dist/types/components/loading/animations/ionic.leave.d.ts +5 -0
  174. package/dist/types/components/modal/animations/ionic.enter.d.ts +6 -0
  175. package/dist/types/components/modal/animations/ionic.leave.d.ts +6 -0
  176. package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
  177. package/dist/types/components/picker-legacy/animations/ionic.enter.d.ts +5 -0
  178. package/dist/types/components/picker-legacy/animations/ionic.leave.d.ts +5 -0
  179. package/dist/types/components/popover/animations/ionic.enter.d.ts +5 -0
  180. package/dist/types/components/popover/animations/ionic.leave.d.ts +5 -0
  181. package/dist/types/components/select/select.d.ts +0 -7
  182. package/dist/types/components/select-modal/select-modal-interface.d.ts +1 -4
  183. package/dist/types/components/select-option/select-option.d.ts +0 -4
  184. package/dist/types/components/select-popover/select-popover-interface.d.ts +1 -4
  185. package/dist/types/components/toast/animations/ionic.enter.d.ts +6 -0
  186. package/dist/types/components/toast/animations/ionic.leave.d.ts +5 -0
  187. package/dist/types/components.d.ts +0 -9
  188. package/dist/types/utils/overlays.d.ts +1 -1
  189. package/hydrate/index.js +518 -442
  190. package/hydrate/index.mjs +518 -442
  191. package/package.json +1 -1
  192. package/components/p-B6czg-mf.js +0 -4
  193. package/components/p-BDwab5EM.js +0 -4
  194. package/components/p-BjV_nNDy.js +0 -4
  195. package/components/p-C8Dne7pI.js +0 -4
  196. package/components/p-C9d4LXRu.js +0 -4
  197. package/components/p-CvoKp7OI.js +0 -4
  198. package/components/p-GytrfCp8.js +0 -4
  199. package/components/p-ZeIAjDcZ.js +0 -4
  200. package/dist/cjs/select-option-render-qQf4xz8P.js +0 -67
  201. package/dist/collection/components/action-sheet/action-sheet.ionic.css +0 -834
  202. package/dist/collection/components/alert/alert.ionic.css +0 -1165
  203. package/dist/collection/components/select-popover/select-popover.ionic.css +0 -489
  204. package/dist/collection/utils/select-option-render.js +0 -62
  205. package/dist/esm/select-option-render-BQUT9Aqa.js +0 -65
  206. package/dist/ionic/p-37f895a8.entry.js +0 -4
  207. package/dist/ionic/p-3884bfa4.entry.js +0 -4
  208. package/dist/ionic/p-38897781.entry.js +0 -4
  209. package/dist/ionic/p-63e09af5.entry.js +0 -4
  210. package/dist/ionic/p-6bffc700.entry.js +0 -4
  211. package/dist/ionic/p-6e0ce081.entry.js +0 -4
  212. package/dist/ionic/p-BYtS2rae.js +0 -4
  213. package/dist/ionic/p-Dr3N4o63.js +0 -4
  214. package/dist/ionic/p-a64ae62e.entry.js +0 -4
  215. package/dist/ionic/p-d45b911b.entry.js +0 -4
  216. package/dist/ionic/p-ef0c281a.entry.js +0 -4
  217. package/dist/types/utils/select-option-render.d.ts +0 -26
@@ -3,13 +3,11 @@
3
3
  */
4
4
  import caretDownRegular from "@phosphor-icons/core/assets/regular/caret-down.svg";
5
5
  import { Build, Host, h, forceUpdate } from "@stencil/core";
6
- import { ENABLE_HTML_CONTENT_DEFAULT } from "../../utils/config";
7
6
  import { compareOptions, createNotchController, isOptionSelected, checkInvalidState } from "../../utils/forms/index";
8
7
  import { focusVisibleElement, renderHiddenInput, inheritAttributes } from "../../utils/helpers";
9
8
  import { printIonWarning } from "../../utils/logging/index";
10
9
  import { actionSheetController, alertController, popoverController, modalController } from "../../utils/overlays";
11
10
  import { isRTL } from "../../utils/rtl/index";
12
- import { sanitizeDOMString } from "../../utils/sanitization/index";
13
11
  import { createColorClasses, hostContext } from "../../utils/theme";
14
12
  import { watchForOptions } from "../../utils/watch-options";
15
13
  import { caretDownSharp, chevronExpand } from "ionicons/icons";
@@ -42,7 +40,6 @@ export class Select {
42
40
  this.helperTextId = `${this.inputId}-helper-text`;
43
41
  this.errorTextId = `${this.inputId}-error-text`;
44
42
  this.inheritedAttributes = {};
45
- this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
46
43
  this.isExpanded = false;
47
44
  /**
48
45
  * The `hasFocus` state ensures the focus class is
@@ -405,14 +402,9 @@ export class Select {
405
402
  .join(' ');
406
403
  const optClass = `${OPTION_CLASS} ${copyClasses}`;
407
404
  const isSelected = isOptionSelected(selectValue, value, this.compareWith);
408
- const text = this.customHTMLEnabled ? getOptionContent(option) : option.textContent;
409
- const startContent = this.customHTMLEnabled
410
- ? getOptionContent(option, 'start')
411
- : undefined;
412
- const endContent = this.customHTMLEnabled ? getOptionContent(option, 'end') : undefined;
413
405
  return {
414
406
  role: isSelected ? 'selected' : '',
415
- text: text !== null && text !== void 0 ? text : '',
407
+ text: option.textContent,
416
408
  cssClass: optClass,
417
409
  handler: () => {
418
410
  this.setValue(value);
@@ -421,9 +413,6 @@ export class Select {
421
413
  'aria-checked': isSelected ? 'true' : 'false',
422
414
  role: 'radio',
423
415
  },
424
- startContent: startContent !== null && startContent !== void 0 ? startContent : undefined,
425
- endContent: endContent !== null && endContent !== void 0 ? endContent : undefined,
426
- description: option.description,
427
416
  };
428
417
  });
429
418
  // Add "cancel" button
@@ -444,21 +433,13 @@ export class Select {
444
433
  .filter((cls) => cls !== 'hydrated')
445
434
  .join(' ');
446
435
  const optClass = `${OPTION_CLASS} ${copyClasses}`;
447
- const label = this.customHTMLEnabled ? getOptionContent(option) : option.textContent;
448
- const startContent = this.customHTMLEnabled
449
- ? getOptionContent(option, 'start')
450
- : undefined;
451
- const endContent = this.customHTMLEnabled ? getOptionContent(option, 'end') : undefined;
452
436
  return {
453
437
  type: inputType,
454
438
  cssClass: optClass,
455
- label: label !== null && label !== void 0 ? label : '',
439
+ label: option.textContent || '',
456
440
  value,
457
441
  checked: isOptionSelected(selectValue, value, this.compareWith),
458
442
  disabled: option.disabled,
459
- startContent: startContent !== null && startContent !== void 0 ? startContent : undefined,
460
- endContent: endContent !== null && endContent !== void 0 ? endContent : undefined,
461
- description: option.description,
462
443
  };
463
444
  });
464
445
  return alertInputs;
@@ -471,13 +452,8 @@ export class Select {
471
452
  .filter((cls) => cls !== 'hydrated')
472
453
  .join(' ');
473
454
  const optClass = `${OPTION_CLASS} ${copyClasses}`;
474
- const text = this.customHTMLEnabled ? getOptionContent(option) : option.textContent;
475
- const startContent = this.customHTMLEnabled
476
- ? getOptionContent(option, 'start')
477
- : undefined;
478
- const endContent = this.customHTMLEnabled ? getOptionContent(option, 'end') : undefined;
479
455
  return {
480
- text: text !== null && text !== void 0 ? text : '',
456
+ text: option.textContent || '',
481
457
  cssClass: optClass,
482
458
  value,
483
459
  checked: isOptionSelected(selectValue, value, this.compareWith),
@@ -488,9 +464,6 @@ export class Select {
488
464
  this.close();
489
465
  }
490
466
  },
491
- startContent: startContent !== null && startContent !== void 0 ? startContent : undefined,
492
- endContent: endContent !== null && endContent !== void 0 ? endContent : undefined,
493
- description: option.description,
494
467
  };
495
468
  });
496
469
  return popoverOptions;
@@ -658,18 +631,12 @@ export class Select {
658
631
  }
659
632
  return;
660
633
  }
661
- /**
662
- * Returns the text to display in the select based on the selected value.
663
- *
664
- * @param useHTML If `true`, the returned text will include any custom HTML content from the selected option. If `false`, the returned text will be plain text without any HTML. Defaults to `false`.
665
- * @returns The text to display in the select, either with or without HTML based on the `useHTML` parameter.
666
- */
667
- getText(useHTML = false) {
634
+ getText() {
668
635
  const selectedText = this.selectedText;
669
636
  if (selectedText != null && selectedText !== '') {
670
637
  return selectedText;
671
638
  }
672
- return generateText(this.childOpts, this.value, this.compareWith, useHTML);
639
+ return generateText(this.childOpts, this.value, this.compareWith);
673
640
  }
674
641
  setFocus() {
675
642
  if (this.focusEl) {
@@ -758,7 +725,7 @@ export class Select {
758
725
  */
759
726
  renderSelectText() {
760
727
  const { placeholder } = this;
761
- const displayValue = this.getText(true);
728
+ const displayValue = this.getText();
762
729
  let addPlaceholderClass = false;
763
730
  let selectText = displayValue;
764
731
  if (selectText === '' && placeholder !== undefined) {
@@ -770,9 +737,6 @@ export class Select {
770
737
  'select-placeholder': addPlaceholderClass,
771
738
  };
772
739
  const textPart = addPlaceholderClass ? 'placeholder' : 'text';
773
- if (this.customHTMLEnabled) {
774
- return h("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart, innerHTML: selectText });
775
- }
776
740
  return (h("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart }, selectText));
777
741
  }
778
742
  /**
@@ -790,7 +754,6 @@ export class Select {
790
754
  get ariaLabel() {
791
755
  var _a;
792
756
  const { placeholder, inheritedAttributes } = this;
793
- // Get the plain text from the selected text
794
757
  const displayValue = this.getText();
795
758
  // The aria label should be preferred over visible text if both are specified
796
759
  const definedLabel = (_a = inheritedAttributes['aria-label']) !== null && _a !== void 0 ? _a : this.labelText;
@@ -945,7 +908,7 @@ export class Select {
945
908
  * TODO(FW-5592): Remove hasStartEndSlots condition
946
909
  */
947
910
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
948
- return (h(Host, { key: '3b96c1aab2242d6d5c78c264e619b4bd48a5d41c', onClick: this.onClick, class: createColorClasses(this.color, {
911
+ return (h(Host, { key: '663520f7e688836f89101008efd49f38cc5e4aed', onClick: this.onClick, class: createColorClasses(this.color, {
949
912
  [theme]: true,
950
913
  'in-item': inItem,
951
914
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -964,7 +927,7 @@ export class Select {
964
927
  [`select-shape-${shape}`]: shape !== undefined,
965
928
  [`select-label-placement-${labelPlacement}`]: true,
966
929
  [`select-size-${size}`]: size !== undefined,
967
- }) }, h("label", { key: '5d313940bd87d981d46ff8d463a68ba35ccb3285', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: '6ae3e00ce2f93e72bd03cc25988660d2c98b1b22', class: "select-wrapper-inner", part: "inner" },
930
+ }) }, h("label", { key: '17c2602b8e33017cbb898a332f9960482ac72c84', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: '00b4887a9f5c6137b2c817e69e77498b3502051d', class: "select-wrapper-inner", part: "inner" },
968
931
  /**
969
932
  * For the ionic theme, we render the outline container here
970
933
  * instead of higher up, so it can be positioned relative to
@@ -974,7 +937,7 @@ export class Select {
974
937
  * <label> element, ensuring that clicking the label text
975
938
  * focuses the select.
976
939
  */
977
- theme === 'ionic' && fill === 'outline' && h("div", { key: 'f6ef2571b7512bdbfd9a891bb0c4965165eb8b0e', class: "select-outline" }), h("slot", { key: '6d31e8769453c6a6119c93602cabbc25a45aba03', name: "start" }), h("div", { key: 'c3c88a6e11ec1ea09c77b9a40a1be9335e99637a', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '627ca905d4721fa0b12a2e9ca808e323a2b98e69', name: "end" }), shouldRenderInnerIcon && this.renderSelectIcon()), shouldRenderOuterIcon && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '3fc203f66aad27caf9e3cc533c2a81242900bd78', class: "select-highlight" })), this.renderBottomContent()));
940
+ theme === 'ionic' && fill === 'outline' && h("div", { key: 'd4916d84ec0d92888139b84be64cd766150e1d83', class: "select-outline" }), h("slot", { key: 'ad9ca19118b0a4cad5995f1010bf8dc9b6c1d4d3', name: "start" }), h("div", { key: '7f36c316973409d237a135ee191bb0f39174e47c', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '0a23c1be8afefa31cf7161dd7470decf30603ce0', name: "end" }), shouldRenderInnerIcon && this.renderSelectIcon()), shouldRenderOuterIcon && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '0c455c157c0fb6f43f3f030758f5c583f13fceda', class: "select-highlight" })), this.renderBottomContent()));
978
941
  }
979
942
  static get is() { return "ion-select"; }
980
943
  static get encapsulation() { return "shadow"; }
@@ -1655,99 +1618,25 @@ const parseValue = (value) => {
1655
1618
  }
1656
1619
  return value.toString();
1657
1620
  };
1658
- const generateText = (opts, value, compareWith, useHTML = false) => {
1621
+ const generateText = (opts, value, compareWith) => {
1659
1622
  if (value === undefined) {
1660
1623
  return '';
1661
1624
  }
1662
1625
  if (Array.isArray(value)) {
1663
1626
  return value
1664
- .map((v) => textForValue(opts, v, compareWith, useHTML))
1627
+ .map((v) => textForValue(opts, v, compareWith))
1665
1628
  .filter((opt) => opt !== null)
1666
1629
  .join(', ');
1667
1630
  }
1668
1631
  else {
1669
- return textForValue(opts, value, compareWith, useHTML) || '';
1632
+ return textForValue(opts, value, compareWith) || '';
1670
1633
  }
1671
1634
  };
1672
- const textForValue = (opts, value, compareWith, useHTML = false) => {
1635
+ const textForValue = (opts, value, compareWith) => {
1673
1636
  const selectOpt = opts.find((opt) => {
1674
1637
  return compareOptions(value, getOptionValue(opt), compareWith);
1675
1638
  });
1676
- const customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
1677
- if (!selectOpt)
1678
- return null;
1679
- return customHTMLEnabled && useHTML
1680
- ? getOptionContent(selectOpt, undefined, true)
1681
- : selectOpt.textContent;
1682
- };
1683
- /**
1684
- * Trims whitespace from all text nodes within a DOM tree.
1685
- * This prevents invisible layout shifts and unwanted gaps between
1686
- * elements when HTML content is injected via innerHTML or cloneNode,
1687
- * as browsers preserve whitespace (tabs, newlines, spaces) from
1688
- * the original source markup.
1689
- *
1690
- * @param node The root node to start trimming text nodes from.
1691
- */
1692
- const trimTextNodes = (node) => {
1693
- node.childNodes.forEach((child) => {
1694
- var _a;
1695
- if (child.nodeType === Node.TEXT_NODE) {
1696
- child.textContent = ((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
1697
- }
1698
- else if (child.nodeType === Node.ELEMENT_NODE) {
1699
- trimTextNodes(child);
1700
- }
1701
- });
1702
- };
1703
- /**
1704
- * Extracts and clones content from an `ion-select-option` element
1705
- * for rendering within overlay interfaces or the select text when `customHTMLEnabled` is `true`.
1706
- *
1707
- * @param option - The `ion-select-option` element to extract content from.
1708
- * @param slotName - Optional slot name to extract. If omitted, extracts the default slot content.
1709
- * @param useHTML - If `true`, the returned string will include any custom HTML content. If `false`, the returned string will be plain text without any HTML.
1710
- * @returns When `useHTML` is `true`, a sanitized HTML string. When `false`, a
1711
- * div element containing cloned child nodes. Returns `null` if no matching
1712
- * content is found.
1713
- */
1714
- const getOptionContent = (option, slotName, useHTML = false) => {
1715
- let nodes;
1716
- if (slotName) {
1717
- // Named slot: get elements with matching slot attribute
1718
- nodes = Array.from(option.children).filter((el) => el.getAttribute('slot') === slotName);
1719
- }
1720
- else {
1721
- // Default slot: get nodes without a slot attribute
1722
- nodes = Array.from(option.childNodes).filter((node) => {
1723
- var _a;
1724
- if (node.nodeType === Node.ELEMENT_NODE) {
1725
- return !node.hasAttribute('slot');
1726
- }
1727
- // Exclude whitespace-only text nodes to prevent empty container returns
1728
- return ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim().length) !== 0;
1729
- });
1730
- }
1731
- if (nodes.length === 0) {
1732
- return null;
1733
- }
1734
- // Clone each node into a temporary container
1735
- const container = document.createElement('div');
1736
- nodes.forEach((n) => {
1737
- var _a;
1738
- const clone = n.cloneNode(true);
1739
- if (clone.nodeType === Node.TEXT_NODE) {
1740
- clone.textContent = ((_a = clone.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
1741
- }
1742
- else {
1743
- trimTextNodes(clone);
1744
- }
1745
- container.appendChild(clone);
1746
- });
1747
- if (useHTML) {
1748
- return sanitizeDOMString(container.innerHTML.trim()) || null;
1749
- }
1750
- return container;
1639
+ return selectOpt ? selectOpt.textContent : null;
1751
1640
  };
1752
1641
  let selectIds = 0;
1753
1642
  const OPTION_CLASS = 'select-interface-option';
@@ -103,13 +103,6 @@
103
103
  * @prop --border-width: Width of the select border
104
104
  *
105
105
  * @prop --ripple-color: The color of the ripple effect on MD mode.
106
- *
107
- * @prop --select-text-media-width: The width of media (icons/images) in the select text.
108
- * @prop --select-text-media-height: The height of media (icons/images) in the select text.
109
- * @prop --select-text-media-border-width: The border width of media (icons/images) in the select text.
110
- * @prop --select-text-media-border-color: The border color of media (icons/images) in the select text.
111
- * @prop --select-text-media-border-radius: The border radius of media (icons/images) in the select text.
112
- * @prop --select-text-media-border-style: The border style of media (icons/images) in the select text.
113
106
  */
114
107
  --padding-top: 0px;
115
108
  --padding-end: 0px;
@@ -121,8 +114,6 @@
121
114
  --highlight-color-focused: var(--ion-color-primary, #0054e9);
122
115
  --highlight-color-valid: var(--ion-color-success, #2dd55b);
123
116
  --highlight-color-invalid: var(--ion-color-danger, #c5000f);
124
- --select-text-media-height: 1.5em;
125
- --select-text-media-width: 1.5em;
126
117
  /**
127
118
  * This is a private API that is used to switch
128
119
  * out the highlight color based on the state
@@ -227,19 +218,6 @@ button {
227
218
  overflow: hidden;
228
219
  }
229
220
 
230
- .select-text img,
231
- .select-text ion-img,
232
- .select-text ion-icon,
233
- .select-text ion-thumbnail,
234
- .select-text ion-avatar {
235
- border-radius: var(--select-text-media-border-radius);
236
- width: var(--select-text-media-width);
237
- height: var(--select-text-media-height);
238
- border-width: var(--select-text-media-border-width);
239
- border-style: var(--select-text-media-border-style);
240
- border-color: var(--select-text-media-border-color);
241
- }
242
-
243
221
  .select-wrapper {
244
222
  display: flex;
245
223
  position: relative;
@@ -641,15 +619,6 @@ button {
641
619
  min-width: 16px;
642
620
  }
643
621
 
644
- /**
645
- * If the select text contains rich content, we want to add some
646
- * spacing between the items without changing the display to prevent
647
- * losing the ellipsis behavior.
648
- */
649
- .select-text > * {
650
- margin-inline-start: 8px;
651
- }
652
-
653
622
  .label-text-wrapper {
654
623
  /**
655
624
  * Label text should not extend
@@ -63,15 +63,6 @@
63
63
  height: 100%;
64
64
  }
65
65
 
66
- .select-option-label {
67
- display: flex;
68
- align-items: center;
69
- }
70
-
71
- .select-option-description {
72
- display: block;
73
- }
74
-
75
66
  :host(.in-modal-default) ion-content::part(scroll) {
76
67
  --padding-bottom: var(--token-space-400, var(--token-scale-400, 16px));
77
68
  }
@@ -136,19 +127,4 @@ ion-content {
136
127
  }
137
128
  ion-content:has(.radio-checked) .ion-focused:not(.item-radio-checked) {
138
129
  --background-focused-opacity: 1;
139
- }
140
-
141
- .select-option-label {
142
- gap: var(--token-space-300, var(--token-scale-300, 12px));
143
- }
144
-
145
- .select-option-description {
146
- font-size: var(--token-font-size-350, 0.875rem);
147
- font-weight: var(--token-font-weight-regular, 400);
148
- letter-spacing: var(--token-font-letter-spacing-0, 0%);
149
- line-height: var(--token-font-line-height-600, var(--token-scale-600, 24px));
150
- text-decoration: none;
151
- text-transform: none;
152
- color: var(--token-text-subtle, var(--token-primitives-neutral-1000, #3b3b3b));
153
- font-size: var(--token-font-size-350, 0.875rem);
154
130
  }
@@ -1,84 +1,7 @@
1
- /**
2
- * A heuristic that applies CSS to tablet
3
- * viewports.
4
- *
5
- * Usage:
6
- * @include tablet-viewport() {
7
- * :host {
8
- * background-color: green;
9
- * }
10
- * }
11
- */
12
- /**
13
- * A heuristic that applies CSS to mobile
14
- * viewports (i.e. phones, not tablets).
15
- *
16
- * Usage:
17
- * @include mobile-viewport() {
18
- * :host {
19
- * background-color: blue;
20
- * }
21
- * }
22
- */
23
- /**
24
- * Convert a font size to a dynamic font size.
25
- * Fonts that participate in Dynamic Type should use
26
- * dynamic font sizes.
27
- * @param size - The initial font size including the unit (i.e. px or pt)
28
- * @param unit (optional) - The unit to convert to. Use this if you want to
29
- * convert to a unit other than $baselineUnit.
30
- */
31
- /**
32
- * Convert a font size to a dynamic font size but impose
33
- * a maximum font size.
34
- * @param size - The initial font size including the unit (i.e. px or pt)
35
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
36
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
37
- * convert to a unit other than $baselineUnit.
38
- */
39
- /**
40
- * Convert a font size to a dynamic font size but impose
41
- * a minimum font size.
42
- * @param size - The initial font size including the unit (i.e. px or pt)
43
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
44
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
45
- * convert to a unit other than $baselineUnit.
46
- */
47
- /**
48
- * Convert a font size to a dynamic font size but impose
49
- * maximum and minimum font sizes.
50
- * @param size - The initial font size including the unit (i.e. px or pt)
51
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
52
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
53
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
54
- * convert to a unit other than $baselineUnit.
55
- */
56
1
  :host {
57
2
  height: 100%;
58
3
  }
59
4
 
60
- .select-option-label {
61
- display: flex;
62
- align-items: center;
63
- }
64
-
65
- .select-option-description {
66
- display: block;
67
- }
68
-
69
- .select-option-label {
70
- gap: 12px;
71
- }
72
-
73
- .select-option-description {
74
- padding-left: 0;
75
- padding-right: 0;
76
- padding-top: 5px;
77
- padding-bottom: 0;
78
- color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
79
- font-size: 0.75rem;
80
- }
81
-
82
5
  /**
83
6
  * Convert a pixels given value into rem
84
7
  *
@@ -4,7 +4,6 @@
4
4
  import { getIonMode } from "../../global/ionic-global";
5
5
  import { Host, forceUpdate, h } from "@stencil/core";
6
6
  import { safeCall } from "../../utils/overlays";
7
- import { renderOptionLabel } from "../../utils/select-option-render";
8
7
  import { getClassMap, hostContext } from "../../utils/theme";
9
8
  export class SelectModal {
10
9
  constructor() {
@@ -61,51 +60,33 @@ export class SelectModal {
61
60
  }
62
61
  renderRadioOptions() {
63
62
  const checked = this.options.filter((o) => o.checked).map((o) => o.value)[0];
64
- return (h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option, index) => {
65
- const optionLabelOptions = {
66
- id: `modal-option-${index}`,
67
- label: option.text,
68
- startContent: option.startContent,
69
- endContent: option.endContent,
70
- description: option.description,
71
- };
72
- return (h("ion-item", { lines: "none", class: Object.assign({
73
- // TODO FW-4784
74
- 'item-radio-checked': option.value === checked
75
- }, getClassMap(option.cssClass)) }, h("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyUp: (ev) => {
76
- if (ev.key === ' ') {
77
- /**
78
- * Selecting a radio option with keyboard navigation,
79
- * either through the Enter or Space keys, should
80
- * dismiss the modal.
81
- */
82
- this.closeModal();
83
- }
84
- } }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
85
- })));
63
+ return (h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option) => (h("ion-item", { lines: "none", class: Object.assign({
64
+ // TODO FW-4784
65
+ 'item-radio-checked': option.value === checked
66
+ }, getClassMap(option.cssClass)) }, h("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyUp: (ev) => {
67
+ if (ev.key === ' ') {
68
+ /**
69
+ * Selecting a radio option with keyboard navigation,
70
+ * either through the Enter or Space keys, should
71
+ * dismiss the modal.
72
+ */
73
+ this.closeModal();
74
+ }
75
+ } }, option.text))))));
86
76
  }
87
77
  renderCheckboxOptions() {
88
- return this.options.map((option, index) => {
89
- const optionLabelOptions = {
90
- id: `modal-option-${index}`,
91
- label: option.text,
92
- startContent: option.startContent,
93
- endContent: option.endContent,
94
- description: option.description,
95
- };
96
- return (h("ion-item", { class: Object.assign({
97
- // TODO FW-4784
98
- 'item-checkbox-checked': option.checked
99
- }, getClassMap(option.cssClass)) }, h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
100
- this.setChecked(ev);
101
- this.callOptionHandler(ev);
102
- // TODO FW-4784
103
- forceUpdate(this);
104
- } }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
105
- });
78
+ return this.options.map((option) => (h("ion-item", { class: Object.assign({
79
+ // TODO FW-4784
80
+ 'item-checkbox-checked': option.checked
81
+ }, getClassMap(option.cssClass)) }, h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
82
+ this.setChecked(ev);
83
+ this.callOptionHandler(ev);
84
+ // TODO FW-4784
85
+ forceUpdate(this);
86
+ } }, option.text))));
106
87
  }
107
88
  render() {
108
- return (h(Host, { key: '18730fa65652d7f4889222d085b96324df5938fa', class: Object.assign({ [getIonMode(this)]: true }, this.getModalContextClasses()) }, h("ion-header", { key: 'f919ce66062f36b0826f4fbd51a34563971d7fc5' }, h("ion-toolbar", { key: 'd60bb24925145dde45493cae446e581b9aadefab' }, this.header !== undefined && h("ion-title", { key: 'fd26f906b8bd3e05233576f4c568eefcdb25f5de' }, this.header), h("ion-buttons", { key: 'b3683b2d7e75ba63b7271da71849e905a37337b5', slot: "end" }, h("ion-button", { key: '40a26fc0f05119538b0522276d6e798ce8e18c77', onClick: () => this.closeModal() }, this.cancelText)))), h("ion-content", { key: '7c61146a953ebf2280564a02f1fa57c50f4b62bc' }, h("ion-list", { key: '4d6742ae8bd030d60ea2cd5686f445063ba1e9a5' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
89
+ return (h(Host, { key: 'c0218aa9ebcbe9d70a6cc1ed8d005ca656e163d3', class: Object.assign({ [getIonMode(this)]: true }, this.getModalContextClasses()) }, h("ion-header", { key: '4698d7442befa17e449655b2f9439001298991a0' }, h("ion-toolbar", { key: 'd0f1d3418f8fdbfdf12fef752f6be4939e70eb79' }, this.header !== undefined && h("ion-title", { key: '2916c22b3a42635e503fa0a0c916b32909999761' }, this.header), h("ion-buttons", { key: 'e93827fc49edd8ac04100e7df8a2a5144d257c19', slot: "end" }, h("ion-button", { key: '0b46828d67d5b4864f40fcbf082ae24797099fb9', onClick: () => this.closeModal() }, this.cancelText)))), h("ion-content", { key: '8460ad9ce425ad0b25b603d0cd42c58b68ca63ee' }, h("ion-list", { key: 'c48ea90af6f36a44102a8852267bd7f6f82f9598' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
109
90
  }
110
91
  static get is() { return "ion-select-modal"; }
111
92
  static get encapsulation() { return "scoped"; }
@@ -1,85 +1,6 @@
1
- /**
2
- * A heuristic that applies CSS to tablet
3
- * viewports.
4
- *
5
- * Usage:
6
- * @include tablet-viewport() {
7
- * :host {
8
- * background-color: green;
9
- * }
10
- * }
11
- */
12
- /**
13
- * A heuristic that applies CSS to mobile
14
- * viewports (i.e. phones, not tablets).
15
- *
16
- * Usage:
17
- * @include mobile-viewport() {
18
- * :host {
19
- * background-color: blue;
20
- * }
21
- * }
22
- */
23
- /**
24
- * Convert a font size to a dynamic font size.
25
- * Fonts that participate in Dynamic Type should use
26
- * dynamic font sizes.
27
- * @param size - The initial font size including the unit (i.e. px or pt)
28
- * @param unit (optional) - The unit to convert to. Use this if you want to
29
- * convert to a unit other than $baselineUnit.
30
- */
31
- /**
32
- * Convert a font size to a dynamic font size but impose
33
- * a maximum font size.
34
- * @param size - The initial font size including the unit (i.e. px or pt)
35
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
36
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
37
- * convert to a unit other than $baselineUnit.
38
- */
39
- /**
40
- * Convert a font size to a dynamic font size but impose
41
- * a minimum font size.
42
- * @param size - The initial font size including the unit (i.e. px or pt)
43
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
44
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
45
- * convert to a unit other than $baselineUnit.
46
- */
47
- /**
48
- * Convert a font size to a dynamic font size but impose
49
- * maximum and minimum font sizes.
50
- * @param size - The initial font size including the unit (i.e. px or pt)
51
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
52
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
53
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
54
- * convert to a unit other than $baselineUnit.
55
- */
56
1
  :host {
57
2
  height: 100%;
58
- }
59
-
60
- .select-option-label {
61
- display: flex;
62
- align-items: center;
63
- }
64
-
65
- .select-option-description {
66
- display: block;
67
- }
68
-
69
- .select-option-label {
70
- gap: 12px;
71
- }
72
-
73
- .select-option-description {
74
- padding-left: 0;
75
- padding-right: 0;
76
- padding-top: 5px;
77
- padding-bottom: 0;
78
- color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
79
- font-size: 0.75rem;
80
- }
81
-
82
- /**
3
+ } /**
83
4
  * A heuristic that applies CSS to tablet
84
5
  * viewports.
85
6
  *
@@ -17,9 +17,9 @@ export class SelectOption {
17
17
  }
18
18
  render() {
19
19
  const theme = getIonTheme(this);
20
- return (h(Host, { key: '0cbcce707a2318d0d340ec71d4b0e65e1412bbd1', class: {
20
+ return (h(Host, { key: '39af595655b3645c923617fe4d4fa64112008273', class: {
21
21
  [theme]: true,
22
- }, role: "option", id: this.inputId }, h("slot", { key: 'efec7e8638cc038209ccdb5a2a4ba9c4cf417c51', name: "start" }), h("slot", { key: 'bcd0e9b789ab9d47ccd8b38722778567fbee896e' }), h("slot", { key: '9efd253bb1497ca1f2295a2c7a241e9e80981635', name: "end" })));
22
+ }, role: "option", id: this.inputId }));
23
23
  }
24
24
  static get is() { return "ion-select-option"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -73,25 +73,6 @@ export class SelectOption {
73
73
  "setter": false,
74
74
  "reflect": false,
75
75
  "attribute": "value"
76
- },
77
- "description": {
78
- "type": "string",
79
- "mutable": false,
80
- "complexType": {
81
- "original": "string",
82
- "resolved": "string | undefined",
83
- "references": {}
84
- },
85
- "required": false,
86
- "optional": true,
87
- "docs": {
88
- "tags": [],
89
- "text": "Text that is placed underneath the option text to provide additional details about the option."
90
- },
91
- "getter": false,
92
- "setter": false,
93
- "reflect": false,
94
- "attribute": "description"
95
76
  }
96
77
  };
97
78
  }