@ionic/core 8.8.14-dev.11783984044.10eaba06 → 8.8.14-dev.11784037956.17449639

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 (349) 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-back-button.js +1 -1
  5. package/components/ion-button.js +1 -1
  6. package/components/ion-card.js +1 -1
  7. package/components/ion-chip.js +1 -1
  8. package/components/ion-datetime-button.js +1 -1
  9. package/components/ion-datetime.js +1 -1
  10. package/components/ion-fab-button.js +1 -1
  11. package/components/ion-img.js +1 -1
  12. package/components/ion-infinite-scroll-content.js +1 -1
  13. package/components/ion-input-password-toggle.js +1 -1
  14. package/components/ion-input.js +1 -1
  15. package/components/ion-item-option.js +1 -1
  16. package/components/ion-item.js +1 -1
  17. package/components/ion-loading.js +1 -1
  18. package/components/ion-menu-button.js +1 -1
  19. package/components/ion-menu.js +1 -1
  20. package/components/ion-modal.js +1 -1
  21. package/components/ion-picker-legacy-column.d.ts +11 -0
  22. package/components/ion-picker-legacy-column.js +4 -0
  23. package/components/ion-picker-legacy.d.ts +11 -0
  24. package/components/ion-picker-legacy.js +4 -0
  25. package/components/ion-popover.js +1 -1
  26. package/components/ion-progress-bar.js +1 -1
  27. package/components/ion-radio.js +1 -1
  28. package/components/ion-range.js +1 -1
  29. package/components/ion-refresher-content.js +1 -1
  30. package/components/ion-refresher.js +1 -1
  31. package/components/ion-reorder-group.js +1 -1
  32. package/components/ion-reorder.js +1 -1
  33. package/components/ion-ripple-effect.js +1 -1
  34. package/components/ion-router-link.js +1 -1
  35. package/components/ion-router-outlet.js +1 -1
  36. package/components/ion-row.js +1 -1
  37. package/components/ion-searchbar.js +1 -1
  38. package/components/ion-segment-button.js +1 -1
  39. package/components/ion-segment-content.js +1 -1
  40. package/components/ion-segment-view.js +1 -1
  41. package/components/ion-segment.js +1 -1
  42. package/components/ion-select-modal.js +1 -1
  43. package/components/ion-select-option.js +1 -1
  44. package/components/ion-select-popover.js +1 -1
  45. package/components/ion-select.js +1 -1
  46. package/components/ion-skeleton-text.js +1 -1
  47. package/components/ion-spinner.js +1 -1
  48. package/components/ion-split-pane.js +1 -1
  49. package/components/ion-tab-bar.js +1 -1
  50. package/components/ion-tab-button.js +1 -1
  51. package/components/ion-tab.js +1 -1
  52. package/components/ion-tabs.js +1 -1
  53. package/components/ion-text.js +1 -1
  54. package/components/ion-textarea.js +1 -1
  55. package/components/ion-thumbnail.js +1 -1
  56. package/components/ion-title.js +1 -1
  57. package/components/ion-toast.js +1 -1
  58. package/components/ion-toggle.js +1 -1
  59. package/components/ion-toolbar.js +1 -1
  60. package/components/{p-DpV-p5Xs.js → p-5bE_Wz4Y.js} +1 -1
  61. package/components/p-B1BWKArA.js +4 -0
  62. package/components/p-B4PlLGHT.js +4 -0
  63. package/components/{p-r0aq7dpt.js → p-B60hm8Qv.js} +1 -1
  64. package/components/p-BFsEcwW9.js +4 -0
  65. package/components/{p-Buf_7zcy.js → p-BHrrc-3d.js} +1 -1
  66. package/components/{p-XJWMAP8m.js → p-BLmJ0zRm.js} +1 -1
  67. package/components/{p-DhkITZ-y.js → p-BSEgsdFI.js} +1 -1
  68. package/components/p-CFRyvUvJ.js +4 -0
  69. package/components/p-CU5rbWAW.js +4 -0
  70. package/components/{p-Dz74mwlk.js → p-Cfx4M1Bn.js} +1 -1
  71. package/components/p-CgLiHbz0.js +4 -0
  72. package/components/p-MLyEeL3Q.js +4 -0
  73. package/components/p-PgMVWD8U.js +4 -0
  74. package/components/p-k_E4tX5Z.js +4 -0
  75. package/components/{p-wk2QqrAo.js → p-rCa2eL0j.js} +1 -1
  76. package/dist/cjs/config-xninhj0J.js +201 -0
  77. package/dist/cjs/index.cjs.js +6 -6
  78. package/dist/cjs/ion-action-sheet.cjs.entry.js +7 -27
  79. package/dist/cjs/ion-alert.cjs.entry.js +25 -64
  80. package/dist/cjs/ion-app_8.cjs.entry.js +9 -23
  81. package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
  82. package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
  83. package/dist/cjs/{ion-datetime.cjs.entry.js → ion-datetime_3.cjs.entry.js} +639 -1
  84. package/dist/cjs/ion-img.cjs.entry.js +1 -3
  85. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -3
  86. package/dist/cjs/ion-input.cjs.entry.js +4 -4
  87. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  88. package/dist/cjs/ion-loading.cjs.entry.js +5 -10
  89. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  90. package/dist/cjs/ion-modal.cjs.entry.js +33 -23
  91. package/dist/cjs/ion-popover.cjs.entry.js +5 -9
  92. package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
  93. package/dist/cjs/ion-radio_2.cjs.entry.js +3 -3
  94. package/dist/cjs/ion-range.cjs.entry.js +3 -3
  95. package/dist/cjs/ion-refresher_2.cjs.entry.js +5 -6
  96. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  97. package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
  98. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  99. package/dist/cjs/ion-searchbar.cjs.entry.js +5 -5
  100. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  101. package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
  102. package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
  103. package/dist/cjs/ion-select-modal.cjs.entry.js +30 -84
  104. package/dist/cjs/ion-select_3.cjs.entry.js +49 -407
  105. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  106. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  107. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  108. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  109. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  110. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  111. package/dist/cjs/ion-toast.cjs.entry.js +5 -6
  112. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  113. package/dist/cjs/ionic.cjs.js +1 -1
  114. package/dist/cjs/loader.cjs.js +1 -1
  115. package/dist/cjs/{overlays-DSmSrd_4.js → overlays-B9UiYZ4R.js} +30 -27
  116. package/dist/collection/collection-manifest.json +10 -6
  117. package/dist/collection/components/action-sheet/action-sheet.ios.css +2 -229
  118. package/dist/collection/components/action-sheet/action-sheet.js +5 -24
  119. package/dist/collection/components/action-sheet/action-sheet.md.css +2 -175
  120. package/dist/collection/components/alert/alert.ios.css +10 -280
  121. package/dist/collection/components/alert/alert.js +21 -59
  122. package/dist/collection/components/alert/alert.md.css +20 -269
  123. package/dist/collection/components/img/img.js +1 -6
  124. package/dist/collection/components/input/input.js +8 -8
  125. package/dist/collection/components/loading/loading.js +3 -7
  126. package/dist/collection/components/modal/gestures/sheet.js +8 -0
  127. package/dist/collection/components/modal/gestures/swipe-to-close.js +8 -0
  128. package/dist/collection/components/modal/modal.ios.css +8 -0
  129. package/dist/collection/components/modal/modal.js +17 -23
  130. package/dist/collection/components/modal/modal.md.css +8 -0
  131. package/dist/collection/components/picker-legacy/animations/ios.enter.js +27 -0
  132. package/dist/collection/components/picker-legacy/animations/ios.leave.js +23 -0
  133. package/dist/collection/components/picker-legacy/picker-interface.js +1 -0
  134. package/dist/collection/components/picker-legacy/picker.ios.css +300 -0
  135. package/dist/collection/components/picker-legacy/picker.js +890 -0
  136. package/dist/collection/components/picker-legacy/picker.md.css +287 -0
  137. package/dist/collection/components/picker-legacy-column/picker-column.ios.css +231 -0
  138. package/dist/collection/components/picker-legacy-column/picker-column.js +422 -0
  139. package/dist/collection/components/picker-legacy-column/picker-column.md.css +222 -0
  140. package/dist/collection/components/picker-legacy-column/test/test.utils.js +43 -0
  141. package/dist/collection/components/popover/popover.ios.css +0 -15
  142. package/dist/collection/components/popover/popover.js +3 -7
  143. package/dist/collection/components/popover/popover.md.css +0 -15
  144. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  145. package/dist/collection/components/radio/radio.js +4 -4
  146. package/dist/collection/components/range/range.js +3 -3
  147. package/dist/collection/components/refresher/refresher.js +1 -1
  148. package/dist/collection/components/refresher-content/refresher-content.js +1 -1
  149. package/dist/collection/components/reorder/reorder.js +1 -1
  150. package/dist/collection/components/reorder-group/reorder-group.js +1 -1
  151. package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
  152. package/dist/collection/components/router-link/router-link.js +2 -2
  153. package/dist/collection/components/router-outlet/router-outlet.js +5 -38
  154. package/dist/collection/components/row/row.js +1 -1
  155. package/dist/collection/components/searchbar/searchbar.js +9 -9
  156. package/dist/collection/components/segment/segment.js +2 -2
  157. package/dist/collection/components/segment-button/segment-button.js +2 -2
  158. package/dist/collection/components/segment-content/segment-content.js +1 -1
  159. package/dist/collection/components/segment-view/segment-view.js +2 -2
  160. package/dist/collection/components/select/select.ios.css +0 -33
  161. package/dist/collection/components/select/select.js +16 -323
  162. package/dist/collection/components/select/select.md.css +0 -33
  163. package/dist/collection/components/select-modal/select-modal.ios.css +0 -219
  164. package/dist/collection/components/select-modal/select-modal.js +26 -79
  165. package/dist/collection/components/select-modal/select-modal.md.css +0 -165
  166. package/dist/collection/components/select-option/select-option.js +3 -67
  167. package/dist/collection/components/select-popover/select-popover.ios.css +0 -219
  168. package/dist/collection/components/select-popover/select-popover.js +26 -78
  169. package/dist/collection/components/select-popover/select-popover.md.css +0 -165
  170. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  171. package/dist/collection/components/spinner/spinner.js +1 -1
  172. package/dist/collection/components/split-pane/split-pane.js +2 -2
  173. package/dist/collection/components/tab/tab.js +2 -2
  174. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  175. package/dist/collection/components/tab-button/tab-button.js +2 -2
  176. package/dist/collection/components/tabs/tabs.js +1 -1
  177. package/dist/collection/components/text/text.js +2 -2
  178. package/dist/collection/components/textarea/textarea.js +2 -2
  179. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  180. package/dist/collection/components/title/title.js +2 -2
  181. package/dist/collection/components/toast/toast.js +2 -2
  182. package/dist/collection/components/toggle/toggle.js +3 -3
  183. package/dist/collection/components/toolbar/toolbar.js +2 -2
  184. package/dist/collection/index.js +1 -1
  185. package/dist/collection/utils/overlays.js +29 -26
  186. package/dist/collection/utils/sanitization/index.js +18 -274
  187. package/dist/docs.json +1177 -485
  188. package/dist/esm/config-DQCONYYp.js +195 -0
  189. package/dist/esm/{index-AlrZKoWR.js → index-DV3sJJW8.js} +1 -1
  190. package/dist/esm/index.js +2 -3
  191. package/dist/esm/ion-accordion_2.entry.js +1 -1
  192. package/dist/esm/ion-action-sheet.entry.js +7 -27
  193. package/dist/esm/ion-alert.entry.js +24 -63
  194. package/dist/esm/ion-app_8.entry.js +9 -23
  195. package/dist/esm/ion-avatar_3.entry.js +1 -1
  196. package/dist/esm/ion-back-button.entry.js +1 -1
  197. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  198. package/dist/esm/ion-col_3.entry.js +1 -1
  199. package/dist/esm/{ion-datetime.entry.js → ion-datetime_3.entry.js} +641 -5
  200. package/dist/esm/ion-fab_3.entry.js +1 -1
  201. package/dist/esm/ion-img.entry.js +2 -4
  202. package/dist/esm/ion-infinite-scroll_2.entry.js +1 -2
  203. package/dist/esm/ion-input-password-toggle.entry.js +1 -1
  204. package/dist/esm/ion-input.entry.js +5 -5
  205. package/dist/esm/ion-item_8.entry.js +3 -3
  206. package/dist/esm/ion-loading.entry.js +4 -9
  207. package/dist/esm/ion-menu_3.entry.js +2 -2
  208. package/dist/esm/ion-modal.entry.js +33 -23
  209. package/dist/esm/ion-popover.entry.js +5 -9
  210. package/dist/esm/ion-progress-bar.entry.js +1 -1
  211. package/dist/esm/ion-radio_2.entry.js +3 -3
  212. package/dist/esm/ion-range.entry.js +3 -3
  213. package/dist/esm/ion-refresher_2.entry.js +4 -5
  214. package/dist/esm/ion-reorder_2.entry.js +3 -3
  215. package/dist/esm/ion-ripple-effect.entry.js +1 -1
  216. package/dist/esm/ion-route_4.entry.js +2 -2
  217. package/dist/esm/ion-searchbar.entry.js +6 -6
  218. package/dist/esm/ion-segment-content.entry.js +1 -1
  219. package/dist/esm/ion-segment-view.entry.js +2 -2
  220. package/dist/esm/ion-segment_2.entry.js +4 -4
  221. package/dist/esm/ion-select-modal.entry.js +30 -84
  222. package/dist/esm/ion-select_3.entry.js +52 -410
  223. package/dist/esm/ion-spinner.entry.js +1 -1
  224. package/dist/esm/ion-split-pane.entry.js +2 -2
  225. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  226. package/dist/esm/ion-tab_2.entry.js +3 -3
  227. package/dist/esm/ion-text.entry.js +2 -2
  228. package/dist/esm/ion-textarea.entry.js +2 -2
  229. package/dist/esm/ion-toast.entry.js +4 -5
  230. package/dist/esm/ion-toggle.entry.js +4 -4
  231. package/dist/esm/ionic.js +1 -1
  232. package/dist/esm/loader.js +1 -1
  233. package/dist/esm/{overlays-DLNOHWNc.js → overlays-Bmfhux69.js} +31 -28
  234. package/dist/html.html-data.json +79 -51
  235. package/dist/ionic/index.esm.js +1 -1
  236. package/dist/ionic/ionic.esm.js +1 -1
  237. package/dist/ionic/p-01f81ea5.entry.js +4 -0
  238. package/dist/ionic/p-02473803.entry.js +4 -0
  239. package/dist/ionic/{p-fe4aa1db.entry.js → p-0fa9c382.entry.js} +1 -1
  240. package/dist/ionic/p-20b1a044.entry.js +4 -0
  241. package/dist/ionic/p-21eb76d5.entry.js +4 -0
  242. package/dist/ionic/p-27d30585.entry.js +4 -0
  243. package/dist/ionic/p-2bb2cb18.entry.js +4 -0
  244. package/dist/ionic/p-2f529a55.entry.js +4 -0
  245. package/dist/ionic/{p-80b44b3c.entry.js → p-3353c229.entry.js} +1 -1
  246. package/dist/ionic/{p-a7628bc7.entry.js → p-37e720da.entry.js} +1 -1
  247. package/dist/ionic/{p-9177f4ac.entry.js → p-390ca786.entry.js} +1 -1
  248. package/dist/ionic/{p-259d0d98.entry.js → p-3a126bca.entry.js} +1 -1
  249. package/dist/ionic/{p-4502a274.entry.js → p-3a7d1e91.entry.js} +1 -1
  250. package/dist/ionic/{p-627fabd9.entry.js → p-3ae5f277.entry.js} +1 -1
  251. package/dist/ionic/{p-a5213260.entry.js → p-4858af1f.entry.js} +1 -1
  252. package/dist/ionic/p-485fda23.entry.js +4 -0
  253. package/dist/ionic/p-48fa7fb1.entry.js +4 -0
  254. package/dist/ionic/p-4baa5b82.entry.js +4 -0
  255. package/dist/ionic/p-4d9181c7.entry.js +4 -0
  256. package/dist/ionic/p-50e1194a.entry.js +4 -0
  257. package/dist/ionic/p-532eb373.entry.js +4 -0
  258. package/dist/ionic/{p-76e92a84.entry.js → p-5d1da0a2.entry.js} +1 -1
  259. package/dist/ionic/{p-d2c7f046.entry.js → p-75dc25ba.entry.js} +1 -1
  260. package/dist/ionic/{p-b9ac1fe0.entry.js → p-84d5ce05.entry.js} +1 -1
  261. package/dist/ionic/{p-51cd1643.entry.js → p-874b4bd8.entry.js} +1 -1
  262. package/dist/ionic/{p-ef93ca92.entry.js → p-8eb8ee76.entry.js} +1 -1
  263. package/dist/ionic/{p-14095ba5.entry.js → p-8fce95d5.entry.js} +1 -1
  264. package/dist/ionic/{p-db1b6738.entry.js → p-9a65ac7f.entry.js} +1 -1
  265. package/dist/ionic/{p-7a37b3ce.entry.js → p-9f1103ce.entry.js} +1 -1
  266. package/dist/ionic/p-B0zdMdR0.js +4 -0
  267. package/dist/ionic/{p-AlrZKoWR.js → p-DV3sJJW8.js} +1 -1
  268. package/dist/ionic/p-DzWaWHGc.js +4 -0
  269. package/dist/ionic/p-a21add2f.entry.js +4 -0
  270. package/dist/ionic/p-ab60b48a.entry.js +4 -0
  271. package/dist/ionic/{p-d8387b99.entry.js → p-c4d8641b.entry.js} +1 -1
  272. package/dist/ionic/{p-c93553d2.entry.js → p-cf91e738.entry.js} +1 -1
  273. package/dist/ionic/{p-629e4703.entry.js → p-e0be05c5.entry.js} +1 -1
  274. package/dist/ionic/p-ec090e0a.entry.js +4 -0
  275. package/dist/ionic/{p-b1599fca.entry.js → p-ef4c3bee.entry.js} +1 -1
  276. package/dist/ionic/p-f994dc44.entry.js +4 -0
  277. package/dist/ionic/{p-341032b3.entry.js → p-fabcce6c.entry.js} +1 -1
  278. package/dist/ionic/p-fd76f647.entry.js +4 -0
  279. package/dist/ionic/p-fda60562.entry.js +4 -0
  280. package/dist/types/components/img/img.d.ts +0 -2
  281. package/dist/types/components/input/input.d.ts +1 -1
  282. package/dist/types/components/modal/modal.d.ts +4 -11
  283. package/dist/types/components/picker-legacy/animations/ios.enter.d.ts +5 -0
  284. package/dist/types/components/picker-legacy/animations/ios.leave.d.ts +5 -0
  285. package/dist/types/components/picker-legacy/picker-interface.d.ts +52 -0
  286. package/dist/types/components/picker-legacy/picker.d.ts +158 -0
  287. package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
  288. package/dist/types/components/picker-legacy-column/test/test.utils.d.ts +9 -0
  289. package/dist/types/components/router-outlet/router-outlet.d.ts +0 -7
  290. package/dist/types/components/searchbar/searchbar.d.ts +1 -1
  291. package/dist/types/components/select/select-interface.d.ts +0 -31
  292. package/dist/types/components/select/select.d.ts +0 -18
  293. package/dist/types/components/select-option/select-option.d.ts +1 -42
  294. package/dist/types/components.d.ts +288 -72
  295. package/dist/types/index.d.ts +1 -1
  296. package/dist/types/interface.d.ts +1 -0
  297. package/dist/types/utils/config.d.ts +8 -0
  298. package/dist/types/utils/overlays.d.ts +9 -11
  299. package/dist/types/utils/sanitization/index.d.ts +2 -58
  300. package/hydrate/index.js +1188 -1407
  301. package/hydrate/index.mjs +1188 -1407
  302. package/package.json +5 -37
  303. package/components/p-279dFMvg.js +0 -4
  304. package/components/p-BSQPZ79H.js +0 -4
  305. package/components/p-BwKpO3Is.js +0 -4
  306. package/components/p-C-Rx1zny.js +0 -4
  307. package/components/p-CHzfYZbv.js +0 -4
  308. package/components/p-D4h1H_hh.js +0 -4
  309. package/components/p-LMGfIvTf.js +0 -4
  310. package/components/p-_lHSumhG.js +0 -4
  311. package/components/p-j9Da6cYO.js +0 -4
  312. package/components/p-jOtMJMv8.js +0 -4
  313. package/components/p-uTR_dEqg.js +0 -4
  314. package/dist/cjs/config-DWdFbSNK.js +0 -35
  315. package/dist/cjs/index-Cueg3U4w.js +0 -429
  316. package/dist/cjs/overlay-control-label-D2sdL2O8.js +0 -50
  317. package/dist/cjs/select-option-render-DTF50t5r.js +0 -124
  318. package/dist/collection/utils/overlay-control-label.js +0 -45
  319. package/dist/collection/utils/select-option-render.js +0 -119
  320. package/dist/esm/config-BwKpO3Is.js +0 -31
  321. package/dist/esm/index-DQSkZyOJ.js +0 -424
  322. package/dist/esm/overlay-control-label-BSQPZ79H.js +0 -47
  323. package/dist/esm/select-option-render-B8nWZRnd.js +0 -122
  324. package/dist/ionic/p-038eb991.entry.js +0 -4
  325. package/dist/ionic/p-4621c387.entry.js +0 -4
  326. package/dist/ionic/p-4ace7762.entry.js +0 -4
  327. package/dist/ionic/p-4bb3eb60.entry.js +0 -4
  328. package/dist/ionic/p-4e9ec5c5.entry.js +0 -4
  329. package/dist/ionic/p-5c3ec490.entry.js +0 -4
  330. package/dist/ionic/p-5d1ac2c7.entry.js +0 -4
  331. package/dist/ionic/p-700795f6.entry.js +0 -4
  332. package/dist/ionic/p-79a36078.entry.js +0 -4
  333. package/dist/ionic/p-913b218a.entry.js +0 -4
  334. package/dist/ionic/p-BDtODLZ4.js +0 -4
  335. package/dist/ionic/p-BSQPZ79H.js +0 -4
  336. package/dist/ionic/p-BwKpO3Is.js +0 -4
  337. package/dist/ionic/p-Cg5-OQYy.js +0 -4
  338. package/dist/ionic/p-DCOvXkOm.js +0 -4
  339. package/dist/ionic/p-a9a33367.entry.js +0 -4
  340. package/dist/ionic/p-ad728198.entry.js +0 -4
  341. package/dist/ionic/p-bfc8c629.entry.js +0 -4
  342. package/dist/ionic/p-c08e666a.entry.js +0 -4
  343. package/dist/ionic/p-ce7992c4.entry.js +0 -4
  344. package/dist/ionic/p-ed797c72.entry.js +0 -4
  345. package/dist/ionic/p-f09f9642.entry.js +0 -4
  346. package/dist/ionic/p-f1c06f82.entry.js +0 -4
  347. package/dist/ionic/p-f718fccb.entry.js +0 -4
  348. package/dist/types/utils/overlay-control-label.d.ts +0 -32
  349. package/dist/types/utils/select-option-render.d.ts +0 -53
@@ -1,424 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { j as printIonError } from './index-tcQvqkiX.js';
5
-
6
- /**
7
- * Sanitize an untrusted HTML string.
8
- *
9
- * Parses the string into a detached DOM, removes blocked tags, strips
10
- * attributes outside the narrow `domStringAllowedAttributes` list (refer
11
- * `sanitizeElement`), and scrubs script-scheme URLs. Returns the sanitized
12
- * HTML string.
13
- *
14
- * Use this when you have an HTML string from an unknown source and need to
15
- * render it via `innerHTML`. Use `sanitizeDOMTree` instead when you already
16
- * have a DOM tree and want to sanitize it in place without a string round
17
- * trip. The two apply the same dangerous-vector scrubbing but different
18
- * attribute allowlists: this path stays narrow so existing consumers
19
- * (toast, loading, alert message, etc.) are unaffected, while
20
- * `sanitizeDOMTree` uses the wider rich-content allowlist.
21
- *
22
- * @param untrustedString - The HTML string to sanitize. Pass an
23
- * `IonicSafeString` to bypass sanitization, or `undefined` to short-circuit.
24
- * @returns The sanitized HTML string, or `undefined` if the input was
25
- * `undefined`. Returns `''` if sanitization fails or the input contains
26
- * an inline `onload=` handler.
27
- */
28
- const sanitizeDOMString = (untrustedString) => {
29
- try {
30
- if (untrustedString instanceof IonicSafeString) {
31
- return untrustedString.value;
32
- }
33
- if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
34
- return untrustedString;
35
- }
36
- /**
37
- * onload is fired when appending to a document
38
- * fragment in Chrome. If a string
39
- * contains onload then we should not
40
- * attempt to add this to the fragment.
41
- */
42
- if (untrustedString.includes('onload=')) {
43
- return '';
44
- }
45
- /**
46
- * Create a document fragment
47
- * separate from the main DOM,
48
- * create a div to do our work in
49
- */
50
- const documentFragment = document.createDocumentFragment();
51
- const workingDiv = document.createElement('div');
52
- documentFragment.appendChild(workingDiv);
53
- workingDiv.innerHTML = untrustedString;
54
- /**
55
- * Remove any elements
56
- * that are blocked
57
- */
58
- blockedTags.forEach((blockedTag) => {
59
- const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
60
- for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
61
- const element = getElementsToRemove[elementIndex];
62
- if (element.parentNode) {
63
- element.parentNode.removeChild(element);
64
- }
65
- else {
66
- documentFragment.removeChild(element);
67
- }
68
- /**
69
- * We still need to sanitize
70
- * the children of this element
71
- * as they are left behind
72
- */
73
- const childElements = getElementChildren(element);
74
- /* eslint-disable-next-line */
75
- for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
76
- sanitizeElement(childElements[childIndex], domStringAllowedAttributes);
77
- }
78
- }
79
- });
80
- /**
81
- * Go through remaining elements and remove
82
- * non-allowed attribs
83
- */
84
- // IE does not support .children on document fragments, only .childNodes
85
- const dfChildren = getElementChildren(documentFragment);
86
- /* eslint-disable-next-line */
87
- for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
88
- sanitizeElement(dfChildren[childIndex], domStringAllowedAttributes);
89
- }
90
- // Append document fragment to div
91
- const fragmentDiv = document.createElement('div');
92
- fragmentDiv.appendChild(documentFragment);
93
- // First child is always the div we did our work in
94
- const getInnerDiv = fragmentDiv.querySelector('div');
95
- return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
96
- }
97
- catch (err) {
98
- printIonError('sanitizeDOMString', err);
99
- return '';
100
- }
101
- };
102
- /**
103
- * Sanitize an entire trusted DOM tree in place.
104
- *
105
- * Removes blocked tags (`script`, `iframe`, etc.) from the subtree and
106
- * then sanitizes attributes on every remaining element using the wider
107
- * `richContentAllowedAttributes` allowlist (refer `sanitizeElement`).
108
- * Component presentational attributes (`size`, `color`, `shape`, inline
109
- * SVG, `aria-*`, `data-*`) are preserved; `style`, event handlers (`on*`),
110
- * form/navigation-hijack attributes, script-scheme URLs, and non-image
111
- * `data:` URLs are stripped.
112
- *
113
- * Use this when you have a DOM tree the developer controls (e.g.
114
- * cloned slot content from a component) and you need to render it
115
- * elsewhere safely.
116
- *
117
- * @param root - The root element whose subtree will be sanitized in
118
- * place. No-op when the sanitizer is disabled via `Ionic.config`.
119
- */
120
- const sanitizeDOMTree = (root) => {
121
- if (!isSanitizerEnabled()) {
122
- return;
123
- }
124
- blockedTags.forEach((tag) => {
125
- const matches = root.querySelectorAll(tag);
126
- for (let i = matches.length - 1; i >= 0; i--) {
127
- matches[i].remove();
128
- }
129
- });
130
- sanitizeElement(root, richContentAllowedAttributes, richContentAllowedAttributePrefixes);
131
- };
132
- /**
133
- * Clean up current element based on allowed attributes
134
- * and then recursively dig down into any child elements to
135
- * clean those up as well
136
- */
137
- // TODO(FW-2832): type (using Element triggers other type errors as well)
138
- const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes = []) => {
139
- // IE uses childNodes, so ignore nodes that are not elements
140
- if (element.nodeType && element.nodeType !== 1) {
141
- return;
142
- }
143
- /**
144
- * If attributes is not a NamedNodeMap
145
- * then we should remove the element entirely.
146
- * This helps avoid DOM Clobbering attacks where
147
- * attributes is overridden.
148
- */
149
- if (typeof NamedNodeMap !== 'undefined' && !(element.attributes instanceof NamedNodeMap)) {
150
- element.remove();
151
- return;
152
- }
153
- /**
154
- * Always strip `style` (CSS injection, `background:url()` beaconing, UI
155
- * spoofing). It is never on the allowlist, but it is removed explicitly
156
- * here because some engines (e.g. jsdom) don't enumerate the CSSOM-backed
157
- * `style` attribute in `element.attributes`, which would let the loop
158
- * below skip over it.
159
- */
160
- element.removeAttribute('style');
161
- for (let i = element.attributes.length - 1; i >= 0; i--) {
162
- const attribute = element.attributes.item(i);
163
- const attributeName = attribute.name;
164
- const lowerName = attributeName.toLowerCase();
165
- /**
166
- * Remove any attribute that is not on the allowlist. This drops event
167
- * handlers (`on*`), `style`, the form/navigation-hijack attributes
168
- * (`formaction`, `action`, `target`), namespaced attributes like
169
- * `xlink:href`, and anything else not explicitly known to be safe.
170
- */
171
- if (!isAttributeAllowed(lowerName, allowedAttributes, allowedAttributePrefixes)) {
172
- element.removeAttribute(attributeName);
173
- continue;
174
- }
175
- // clean up any allowed attribs
176
- // that attempt to do any JS funny-business
177
- const attributeValue = attribute.value;
178
- if (attributeValue == null) {
179
- continue;
180
- }
181
- /**
182
- * Scrub dangerous schemes from the value. The value is normalized first
183
- * (whitespace and ASCII control characters removed) so entity-obfuscated
184
- * payloads such as `java&#9;script:`, which the parser decodes to
185
- * `java\tscript:`, are still caught. Normalizing the value also covers
186
- * namespaced attributes, where the previous `element[attributeName]`
187
- * property reflection returned `undefined` and let them slip through.
188
- */
189
- const normalizedValue = attributeValue.replace(controlCharactersAndWhitespace, '').toLowerCase();
190
- // Script schemes are never allowed, on any attribute.
191
- if (normalizedValue.includes('javascript:') || normalizedValue.includes('vbscript:')) {
192
- element.removeAttribute(attributeName);
193
- continue;
194
- }
195
- /**
196
- * For URL-bearing attributes, allow `data:` URIs only for raster
197
- * images. Document-bearing types (`text/html`, `image/svg+xml`,
198
- * `application/*`, etc.) can carry markup or script when navigated to
199
- * or rendered, so they are stripped, while safe image types are kept so
200
- * inline images keep working.
201
- */
202
- if (urlAttributes.includes(lowerName) &&
203
- normalizedValue.startsWith('data:') &&
204
- !safeDataImageUri.test(normalizedValue)) {
205
- element.removeAttribute(attributeName);
206
- }
207
- }
208
- /**
209
- * Sanitize any nested children
210
- */
211
- const childElements = getElementChildren(element);
212
- /* eslint-disable-next-line */
213
- for (let i = 0; i < childElements.length; i++) {
214
- sanitizeElement(childElements[i], allowedAttributes, allowedAttributePrefixes);
215
- }
216
- };
217
- /**
218
- * IE doesn't always support .children
219
- * so we revert to .childNodes instead
220
- */
221
- // TODO(FW-2832): type
222
- const getElementChildren = (el) => {
223
- return el.children != null ? el.children : el.childNodes;
224
- };
225
- const isSanitizerEnabled = () => {
226
- var _a;
227
- const win = window;
228
- const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
229
- if (config) {
230
- if (config.get) {
231
- return config.get('sanitizerEnabled', true);
232
- }
233
- else {
234
- return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
235
- }
236
- }
237
- return true;
238
- };
239
- /**
240
- * Mirror known custom-element DOM properties onto attributes so they
241
- * survive `cloneNode`. Call this on a DOM subtree before cloning it for
242
- * rendering elsewhere (e.g. cloning slotted option content into an
243
- * overlay).
244
- *
245
- * Only sets the attribute when the property holds a non-empty string
246
- * and the attribute isn't already present, so existing attributes
247
- * take precedence.
248
- *
249
- * @param root - The root element whose subtree (and itself) will be
250
- * inspected.
251
- */
252
- const reflectPropertiesToAttributes = (root) => {
253
- const candidates = [];
254
- if (root.tagName in elementPropsToReflect) {
255
- candidates.push(root);
256
- }
257
- for (const tagName of Object.keys(elementPropsToReflect)) {
258
- candidates.push(...Array.from(root.querySelectorAll(tagName.toLowerCase())));
259
- }
260
- for (const el of candidates) {
261
- if (!(el.tagName in elementPropsToReflect)) {
262
- continue;
263
- }
264
- const props = elementPropsToReflect[el.tagName];
265
- for (const prop of props) {
266
- const value = el[prop];
267
- if (typeof value === 'string' && value.length > 0 && !el.hasAttribute(prop)) {
268
- el.setAttribute(prop, value);
269
- }
270
- }
271
- }
272
- };
273
- /**
274
- * Attribute allowlist for `sanitizeDOMString`. Intentionally narrow: this
275
- * path sanitizes developer HTML strings rendered via `innerHTML` by
276
- * `ion-toast`, `ion-loading`, the `ion-alert` message,
277
- * `ion-refresher-content`, and `ion-infinite-scroll-content`, so the list
278
- * is kept to the minimum those have always needed. Broadening it here would
279
- * change sanitization output for all of those consumers, so the wider
280
- * rich-content allowlist below is deliberately scoped to `sanitizeDOMTree`
281
- * instead.
282
- */
283
- const domStringAllowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
284
- /**
285
- * Attribute allowlist for `sanitizeDOMTree` (the select rich-content path).
286
- * Covers global HTML attributes, the Ionic component presentational props
287
- * that cloned rich content (e.g. `ion-select-option` markup) relies on, and
288
- * the inert SVG presentation attributes used by inline icons.
289
- *
290
- * `aria-*` and `data-*` are allowed separately by prefix (refer
291
- * `richContentAllowedAttributePrefixes`) since they are inert and not worth
292
- * enumerating. URL-bearing names (`href`, `src`) are allowed here, but
293
- * their values are still scrubbed for script schemes in `sanitizeElement`.
294
- *
295
- * Notably absent: `style`, event handlers (`on*`), and the
296
- * form/navigation-hijack attributes (`formaction`, `action`, `target`),
297
- * which are therefore stripped.
298
- */
299
- const richContentAllowedAttributes = [
300
- // Global / structural
301
- 'class',
302
- 'id',
303
- 'slot',
304
- 'name',
305
- 'title',
306
- 'alt',
307
- 'lang',
308
- 'dir',
309
- 'role',
310
- 'type',
311
- 'value',
312
- 'disabled',
313
- 'width',
314
- 'height',
315
- 'href',
316
- 'src',
317
- // Ionic component presentational props
318
- 'color',
319
- 'size',
320
- 'shape',
321
- 'fill',
322
- 'expand',
323
- 'mode',
324
- 'theme',
325
- 'icon',
326
- 'label',
327
- 'label-placement',
328
- 'justify',
329
- 'inset',
330
- 'lines',
331
- 'ios',
332
- 'md',
333
- // SVG presentation attributes (compared lowercased, e.g. `viewBox`)
334
- 'xmlns',
335
- 'viewbox',
336
- 'preserveaspectratio',
337
- 'stroke',
338
- 'stroke-width',
339
- 'stroke-linecap',
340
- 'stroke-linejoin',
341
- 'stroke-opacity',
342
- 'stroke-dasharray',
343
- 'fill-rule',
344
- 'fill-opacity',
345
- 'clip-rule',
346
- 'd',
347
- 'points',
348
- 'cx',
349
- 'cy',
350
- 'r',
351
- 'rx',
352
- 'ry',
353
- 'x',
354
- 'y',
355
- 'x1',
356
- 'y1',
357
- 'x2',
358
- 'y2',
359
- 'transform',
360
- 'opacity',
361
- ];
362
- /**
363
- * Attribute-name prefixes that are always safe to keep in the rich-content
364
- * path. `aria-*` and `data-*` attributes cannot execute script or load
365
- * resources, so they are allowed wholesale rather than enumerated by name.
366
- */
367
- const richContentAllowedAttributePrefixes = ['aria-', 'data-'];
368
- /**
369
- * Whether an attribute name (already lowercased) is safe to keep, by exact
370
- * match or by an allowed prefix.
371
- */
372
- const isAttributeAllowed = (lowerName, allowedAttributes, allowedAttributePrefixes) => {
373
- if (allowedAttributes.includes(lowerName)) {
374
- return true;
375
- }
376
- return allowedAttributePrefixes.some((prefix) => lowerName.startsWith(prefix));
377
- };
378
- /**
379
- * Matches ASCII control characters and whitespace (including the
380
- * non-breaking space). Used to normalize attribute values before matching
381
- * a URL scheme so entity-obfuscated payloads such as `java&#9;script:`
382
- * (decoded by the parser to `java\tscript:`) can't smuggle a scheme past
383
- * the check.
384
- */
385
- // eslint-disable-next-line no-control-regex -- matching control characters is the point
386
- const controlCharactersAndWhitespace = /[\u0000-\u0020\u007f-\u00a0]/g;
387
- /**
388
- * Attributes whose values are URLs. Their values are scheme-checked in
389
- * `sanitizeElement` (e.g. `data:` filtering) beyond the script-scheme scrub
390
- * applied to every attribute.
391
- */
392
- const urlAttributes = ['href', 'src'];
393
- /**
394
- * Matches a `data:` URI for a raster image type that cannot carry script.
395
- * `image/svg+xml` is deliberately excluded (SVG can execute script), as are
396
- * document types like `text/html` and `application/*`. The value is already
397
- * lowercased and whitespace-stripped before this is tested.
398
- */
399
- const safeDataImageUri = /^data:image\/(?:png|jpe?g|gif|webp|bmp|avif|x-icon|vnd\.microsoft\.icon)[;,]/;
400
- /**
401
- * Tags removed entirely (with their subtree) before attribute sanitization.
402
- * Exported so tests can assert the set without hardcoding it.
403
- */
404
- const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed', 'base'];
405
- /**
406
- * Properties on custom elements that frameworks (Vue, Angular) often
407
- * set as DOM properties rather than attributes. `cloneNode` only copies
408
- * attributes, so these values are lost when slotted content is cloned
409
- * into an overlay. For each known custom element, we mirror the listed
410
- * properties onto attributes so the cloned copy still has the data it
411
- * needs to render.
412
- *
413
- * Keyed by uppercased tagName so the lookup matches `Element.tagName`.
414
- */
415
- const elementPropsToReflect = {
416
- 'ION-ICON': ['icon', 'name', 'src', 'ios', 'md'],
417
- };
418
- class IonicSafeString {
419
- constructor(value) {
420
- this.value = value;
421
- }
422
- }
423
-
424
- export { IonicSafeString as I, sanitizeDOMTree as a, reflectPropertiesToAttributes as r, sanitizeDOMString as s };
@@ -1,47 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- // TODO(FW-6886, FW-6892, FW-6891): Remove this file in favor of the Modular Ionic component config. Each overlay will be able to select its own defaults for label placement and justify based on the interface and mode, so this utility will no longer be necessary.
5
- /**
6
- * Returns the default `labelPlacement` for a radio or checkbox option
7
- * rendered inside an overlay. Defaults follow each mode's established
8
- * option-row layout:
9
- * - `ios`: `"start"` for radio in `alert` and `popover`. The `modal`
10
- * interface flips iOS radio back to `"end"`. Checkbox is always
11
- * `"end"` on iOS.
12
- * - everything else (e.g. `md`): `"end"`.
13
- *
14
- * `interfaceType` is optional; only `"modal"` changes the result, so
15
- * callers that aren't a modal can omit it.
16
- *
17
- * Used by `select-popover` and `select-modal` as the fallback when an
18
- * option doesn't explicitly set `labelPlacement`.
19
- */
20
- const getOverlayLabelPlacement = (mode, control, interfaceType) => {
21
- if (mode === 'ios' && control === 'radio' && interfaceType !== 'modal') {
22
- return 'start';
23
- }
24
- return 'end';
25
- };
26
- /**
27
- * Returns the default `justify` for a radio or checkbox option rendered
28
- * inside an overlay. Defaults follow each mode's option-row layout:
29
- * - `ios`: `"space-between"` for radio in `alert` and `popover`. The
30
- * `modal` interface falls back to `"start"`. Checkbox is always `"start"`
31
- * on iOS.
32
- * - everything else (e.g. `md`): `"start"`.
33
- *
34
- * `interfaceType` is optional; only `"modal"` changes the result, so
35
- * callers that aren't a modal can omit it.
36
- *
37
- * Used by `select-popover` and `select-modal` as the fallback when an
38
- * option doesn't explicitly set `justify`.
39
- */
40
- const getOverlayLabelJustify = (mode, control, interfaceType) => {
41
- if (mode === 'ios' && control === 'radio' && interfaceType !== 'modal') {
42
- return 'space-between';
43
- }
44
- return 'start';
45
- };
46
-
47
- export { getOverlayLabelPlacement as a, getOverlayLabelJustify as g };
@@ -1,122 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { h } from './index-tcQvqkiX.js';
5
- import { a as sanitizeDOMTree } from './index-DQSkZyOJ.js';
6
-
7
- /**
8
- * Converts a DOM node into a Stencil VNode (or text string) so the
9
- * resulting tree is rendered through the component's normal render
10
- * path. Rendering through Stencil ensures that scoped CSS classes
11
- * (e.g. `sc-ion-action-sheet-ionic`) are applied to every element.
12
- *
13
- * Highly recommended to pre-sanitize the source DOM (see
14
- * `getOptionContent` in select.tsx). This function performs pure
15
- * structural conversion — no security filtering.
16
- *
17
- * Preserves attributes only — properties set imperatively on the source
18
- * element (e.g. `input.value` after a user types) won't carry through.
19
- * In practice this isn't a concern: interactive controls shouldn't
20
- * appear in select-option rich content since they'd nest inside the
21
- * overlay's button/radio/checkbox wrapper, which is invalid HTML and
22
- * an accessibility issue.
23
- *
24
- * @param node - The DOM node to convert. Text nodes become strings,
25
- * element nodes become VNodes, and any other node types are skipped.
26
- * @param keyPrefix - String prefix used to build a stable VNode key,
27
- * so Stencil's diff can preserve elements across re-renders.
28
- * @param index - Position of this node among its siblings. Combined
29
- * with `keyPrefix` to form the final unique key.
30
- * @returns The converted VNode, a text string, or `null` if the node
31
- * type isn't supported.
32
- *
33
- * @internal Exported only so it can be unit tested; not part of the
34
- * public API.
35
- */
36
- const cloneToVNode = (node, keyPrefix, index) => {
37
- var _a;
38
- if (node.nodeType === Node.TEXT_NODE) {
39
- return (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
40
- }
41
- if (node.nodeType !== Node.ELEMENT_NODE) {
42
- return null;
43
- }
44
- const el = node;
45
- const tag = el.tagName.toLowerCase();
46
- const key = `${keyPrefix}-${index}`;
47
- const attrs = { key };
48
- for (let i = 0; i < el.attributes.length; i++) {
49
- const attr = el.attributes.item(i);
50
- attrs[attr.name] = attr.value;
51
- }
52
- const children = Array.from(el.childNodes)
53
- .map((child, i) => cloneToVNode(child, key, i))
54
- .filter((c) => c !== null);
55
- return h(tag, attrs, children);
56
- };
57
- /**
58
- * Renders cloned DOM content as Stencil JSX. Walking the source DOM
59
- * into VNodes (rather than injecting it via innerHTML) keeps the
60
- * content inside Stencil's render path, so scoped CSS classes are
61
- * applied automatically and component attributes like `size` or
62
- * `color` survive intact.
63
- *
64
- * Span elements should be used when this content renders within buttons,
65
- * depending on the select interface. Buttons can only have phrasing
66
- * content to prevent accessibility issues.
67
- *
68
- * @param id - Unique identifier for generating stable virtual DOM keys.
69
- * @param content - The HTMLElement container whose child nodes will be cloned.
70
- * @param className - CSS class applied to the wrapper element.
71
- * @param useSpan - Whether to use a span element instead of a div for the wrapper.
72
- */
73
- const renderClonedContent = (id, content, className, useSpan = false) => {
74
- const Tag = useSpan ? 'span' : 'div';
75
- const keyPrefix = `${className}-${id}`;
76
- /**
77
- * Do not remove. This is the only sanitization pass for callers that pass
78
- * an `HTMLElement` straight to `renderOptionLabel` (e.g. vanilla JS)
79
- * without going through `getOptionContent`, which sanitizes upstream.
80
- * `cloneToVNode` does pure structural conversion and no security
81
- * filtering, so dropping this call would reopen an XSS hole on the
82
- * direct `HTMLElement` path.
83
- */
84
- sanitizeDOMTree(content);
85
- return (h(Tag, { class: className, key: keyPrefix }, Array.from(content.childNodes).map((child, i) => cloneToVNode(child, keyPrefix, i))));
86
- };
87
- /**
88
- * Renders the label content for a select option within an overlay
89
- * interface based on the presence of rich content.
90
- *
91
- * Span elements should be used when this content renders within buttons,
92
- * depending on the select interface. Buttons can only have phrasing
93
- * content to prevent accessibility issues.
94
- *
95
- * @param option - The content option data containing label, slots,
96
- * and description.
97
- * @param className - The base CSS class for the label element.
98
- * @param useSpan - Whether to use a span element instead of a div for the label.
99
- */
100
- const renderOptionLabel = (option, className, useSpan = false) => {
101
- const { id, label, startContent, endContent, description } = option;
102
- const hasRichContent = !!startContent || !!endContent || !!description;
103
- const Tag = useSpan ? 'span' : 'div';
104
- // Render simple string label if there is no rich content to display
105
- if (!hasRichContent && (typeof label === 'string' || !label)) {
106
- return (h(Tag, { class: className, key: `${className}-${id}` }, label));
107
- }
108
- // Render the main label
109
- const labelEl = typeof label === 'string' || !label ? (
110
- // Label is a simple string or undefined
111
- h(Tag, { key: `${className}-label-${id}` }, label)) : (
112
- // Label is an HTMLElement with potential rich content
113
- renderClonedContent(id, label, `${className}-text`, useSpan));
114
- // No rich content, render just the label
115
- if (!hasRichContent) {
116
- return (h(Tag, { class: className, key: `${className}-${id}` }, labelEl));
117
- }
118
- // Render label with rich content (start, end, description)
119
- return (h(Tag, { class: `${className} ${className}-has-rich-content`, key: `${className}-${id}` }, startContent && renderClonedContent(id, startContent, 'select-option-start', useSpan), h(Tag, { class: "select-option-content", key: `${className}-content-${id}` }, labelEl, description && (h(Tag, { class: "select-option-description", key: `${className}-desc-${id}` }, description))), endContent && renderClonedContent(id, endContent, 'select-option-end', useSpan)));
120
- };
121
-
122
- export { renderOptionLabel as r };
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{r as o,h as e,i,d as t,g as c}from"./p-tcQvqkiX.js";import{b as l}from"./p-Nqf6uvGh.js";import{a as s,g as n}from"./p-BSQPZ79H.js";import{s as a}from"./p-Cg5-OQYy.js";import{r as d}from"./p-DCOvXkOm.js";import{g as r}from"./p-DiVJyqlX.js";import"./p-ZjP4CjeZ.js";import"./p-DIuEbVLu.js";import"./p-BUFIpxKM.js";import"./p-CFlfIb2g.js";import"./p-BTEOs1at.js";import"./p-BDtODLZ4.js";const m=class{constructor(e){o(this,e),this.pendingEnterTarget=null,this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}getValues(o){const{multiple:e,options:i}=this;if(e)return i.filter((o=>o.checked)).map((o=>o.value));const t=o?this.findOptionFromEvent(o):null;return t?t.value:void 0}callOptionHandler(o){const e=this.findOptionFromEvent(o),i=this.getValues(o);(null==e?void 0:e.handler)&&a(e.handler,i)}setChecked(o){const{multiple:e}=this,i=this.findOptionFromEvent(o);e&&i&&(i.checked=o.detail.checked)}renderRadioOptions(){const o=l(this),i=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return e("ion-radio-group",{value:i,onIonChange:o=>this.callOptionHandler(o)},this.options.map(((t,c)=>{var l,a;const m=t,p=!!m.startContent||!!m.endContent||!!m.description,h={id:`modal-option-${c}`,label:m.text,startContent:m.startContent,endContent:m.endContent,description:m.description},b=s(o,"radio","modal"),x=n(o,"radio","modal");return e("ion-item",{lines:"none",disabled:t.disabled,class:Object.assign({"item-radio-checked":t.value===i},r(t.cssClass))},e("ion-radio",{class:{"select-option-has-rich-content":p},value:t.value,disabled:t.disabled,justify:null!==(l=m.justify)&&void 0!==l?l:x,labelPlacement:null!==(a=m.labelPlacement)&&void 0!==a?a:b,onClick:()=>this.closeModal(),onKeyDown:o=>{"Enter"!==o.key||o.repeat||(this.pendingEnterTarget=o.currentTarget)},onKeyUp:o=>{if(" "===o.key)this.closeModal();else if("Enter"===o.key){const e=this.pendingEnterTarget===o.currentTarget;this.pendingEnterTarget=null,e&&this.closeModal()}}},d(h,"select-option-label")))})))}renderCheckboxOptions(){const o=l(this);return this.options.map(((t,c)=>{var l,a;const m=t,p=!!m.startContent||!!m.endContent||!!m.description,h={id:`modal-option-${c}`,label:m.text,startContent:m.startContent,endContent:m.endContent,description:m.description},b=s(o,"checkbox","modal"),x=n(o,"checkbox","modal");return e("ion-item",{disabled:t.disabled,class:Object.assign({"item-checkbox-checked":t.checked},r(t.cssClass))},e("ion-checkbox",{class:{"select-option-has-rich-content":p},value:t.value,disabled:t.disabled,checked:t.checked,justify:null!==(l=m.justify)&&void 0!==l?l:x,labelPlacement:null!==(a=m.labelPlacement)&&void 0!==a?a:b,onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),i(this)}},d(h,"select-option-label")))}))}render(){return e(t,{key:"2cb1ae057b7a66f5d12c926f618f6b945f019803",class:l(this)},e("ion-header",{key:"e41f1c4ad1c71dcc927d210502d6366cea894a14"},e("ion-toolbar",{key:"1a191dfc8980541469ee4d8996ba4de52cac1ac5"},void 0!==this.header&&e("ion-title",{key:"14ab9cb7d41d15b982c6ccd8ba6cee0e9cb528d9"},this.header),e("ion-buttons",{key:"80451a2ed3a82138eb1575135cf2ebbd5e8f6e60",slot:"end"},e("ion-button",{key:"01a315cd739569f3c0b23a4d243d52b69b63dfa7",onClick:()=>this.closeModal()},this.cancelText)))),e("ion-content",{key:"d953101bae9a91f8108f7a5e411bb1e34338655d"},e("ion-list",{key:"171a5668afc67b03d2ee87e91cf400b17541bc7f"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return c(this)}};m.style={ionic:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ionic,.alert-checkbox-label-text.sc-ion-select-modal-ionic,.alert-radio-label-text.sc-ion-select-modal-ionic,.select-option-label-text.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ionic{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-ionic:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic{width:40px;height:40px}.select-option-start.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic{width:24px;height:24px}.select-option-start.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic{width:56px;height:56px}.select-option-start.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic{width:114px;height:56px}.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ios,.alert-checkbox-label-text.sc-ion-select-modal-ios,.alert-radio-label-text.sc-ion-select-modal-ios,.select-option-label-text.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ios{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios{width:44px;height:44px}.select-option-start.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios{width:28px;height:28px}.action-sheet-button-label-text.sc-ion-select-modal-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-select-modal-ios{-webkit-padding-end:16px;padding-inline-end:16px}.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-md,.alert-checkbox-label-text.sc-ion-select-modal-md,.alert-radio-label-text.sc-ion-select-modal-md,.select-option-label-text.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-md{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-select-modal-md:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md{width:40px;height:40px}.select-option-start.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md{width:24px;height:24px}.select-option-start.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md{width:56px;height:56px}.select-option-start.sc-ion-select-modal-md>video.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>video.sc-ion-select-modal-md{width:114px;height:56px}.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'};export{m as ion_select_modal}