@ionic/core 8.4.4-dev.11741632207.1cb10db6 → 8.4.4-dev.11741648084.118e26ac

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 (419) hide show
  1. package/components/alert.js +30 -4
  2. package/components/checkbox.js +37 -5
  3. package/components/helpers.js +7 -1
  4. package/components/index9.js +1 -1
  5. package/components/ion-range.js +28 -6
  6. package/components/ion-router.js +1 -1
  7. package/components/ion-segment-button.js +1 -1
  8. package/components/ion-select.js +47 -5
  9. package/components/ion-toggle.js +38 -5
  10. package/components/ionic-global.js +2 -1
  11. package/components/modal.js +15 -7
  12. package/dist/cjs/{app-globals-21afee77.js → app-globals-4283fe37.js} +1 -1
  13. package/dist/cjs/{data-108e531d.js → data-26456291.js} +1 -1
  14. package/dist/cjs/{framework-delegate-05579976.js → framework-delegate-c4f2ba04.js} +1 -1
  15. package/dist/cjs/{hardware-back-button-9e8a2c4f.js → hardware-back-button-f2cbbdce.js} +1 -1
  16. package/dist/cjs/{helpers-4be3f90d.js → helpers-b14a0f09.js} +7 -0
  17. package/dist/cjs/{index-0ff61d0b.js → index-0d2610b6.js} +4 -4
  18. package/dist/cjs/{index-2a46a047.js → index-275c982e.js} +1 -1
  19. package/dist/cjs/{index-6770fc00.js → index-608fc5fd.js} +2 -2
  20. package/dist/cjs/{index-26bb7e42.js → index-6ad4725f.js} +5 -5
  21. package/dist/cjs/{index-ad7a712e.js → index-786364c7.js} +1 -1
  22. package/dist/cjs/index.cjs.js +10 -10
  23. package/dist/cjs/{input-shims-fd997b01.js → input-shims-a2cf9d15.js} +4 -4
  24. package/dist/cjs/{input.utils-c15a1814.js → input.utils-18725f61.js} +2 -2
  25. package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
  26. package/dist/cjs/ion-action-sheet.cjs.entry.js +6 -6
  27. package/dist/cjs/ion-alert.cjs.entry.js +36 -10
  28. package/dist/cjs/ion-app_8.cjs.entry.js +12 -12
  29. package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
  30. package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
  31. package/dist/cjs/ion-backdrop.cjs.entry.js +1 -1
  32. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
  33. package/dist/cjs/ion-button_2.cjs.entry.js +3 -3
  34. package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
  35. package/dist/cjs/ion-checkbox.cjs.entry.js +37 -7
  36. package/dist/cjs/ion-chip.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
  38. package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
  39. package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -7
  40. package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
  41. package/dist/cjs/ion-img.cjs.entry.js +2 -2
  42. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +4 -4
  43. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/ion-input.cjs.entry.js +5 -5
  45. package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
  46. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  47. package/dist/cjs/ion-loading.cjs.entry.js +6 -6
  48. package/dist/cjs/ion-menu_3.cjs.entry.js +7 -7
  49. package/dist/cjs/ion-modal.cjs.entry.js +23 -15
  50. package/dist/cjs/ion-nav_2.cjs.entry.js +6 -6
  51. package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
  52. package/dist/cjs/ion-picker-column.cjs.entry.js +2 -2
  53. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  54. package/dist/cjs/ion-popover.cjs.entry.js +7 -7
  55. package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
  56. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  57. package/dist/cjs/ion-range.cjs.entry.js +30 -9
  58. package/dist/cjs/ion-refresher_2.cjs.entry.js +4 -4
  59. package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
  60. package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
  61. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  62. package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
  63. package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
  64. package/dist/cjs/ion-select-modal.cjs.entry.js +6 -6
  65. package/dist/cjs/ion-select_3.cjs.entry.js +52 -12
  66. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  67. package/dist/cjs/ion-split-pane.cjs.entry.js +1 -1
  68. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
  69. package/dist/cjs/ion-tab_2.cjs.entry.js +2 -2
  70. package/dist/cjs/ion-text.cjs.entry.js +1 -1
  71. package/dist/cjs/ion-textarea.cjs.entry.js +5 -5
  72. package/dist/cjs/ion-toast.cjs.entry.js +6 -6
  73. package/dist/cjs/ion-toggle.cjs.entry.js +38 -7
  74. package/dist/cjs/{ionic-global-d9a8bb5b.js → ionic-global-96da1b2e.js} +2 -1
  75. package/dist/cjs/ionic.cjs.js +3 -3
  76. package/dist/cjs/{ios.transition-a4f35c55.js → ios.transition-e188169d.js} +4 -4
  77. package/dist/cjs/loader.cjs.js +3 -3
  78. package/dist/cjs/{md.transition-cdf904e6.js → md.transition-b66da2a1.js} +4 -4
  79. package/dist/cjs/{notch-controller-a0c464d1.js → notch-controller-bd07748b.js} +1 -1
  80. package/dist/cjs/{overlays-86695cf1.js → overlays-b0b07774.js} +5 -5
  81. package/dist/cjs/{status-tap-1a2485c1.js → status-tap-3b633cba.js} +4 -4
  82. package/dist/cjs/{swipe-back-47a52b83.js → swipe-back-b70cd52e.js} +1 -1
  83. package/dist/collection/components/alert/alert.js +34 -4
  84. package/dist/collection/components/checkbox/checkbox.ios.css +52 -15
  85. package/dist/collection/components/checkbox/checkbox.js +70 -3
  86. package/dist/collection/components/checkbox/checkbox.md.css +52 -15
  87. package/dist/collection/components/modal/gestures/sheet.js +11 -3
  88. package/dist/collection/components/modal/modal.js +5 -5
  89. package/dist/collection/components/range/range.js +25 -6
  90. package/dist/collection/components/select/select.ios.css +59 -0
  91. package/dist/collection/components/select/select.js +80 -3
  92. package/dist/collection/components/select/select.md.css +61 -0
  93. package/dist/collection/components/toggle/toggle.ios.css +52 -15
  94. package/dist/collection/components/toggle/toggle.js +71 -3
  95. package/dist/collection/components/toggle/toggle.md.css +52 -15
  96. package/dist/collection/utils/floating-point/index.js +5 -0
  97. package/dist/collection/utils/helpers.js +6 -0
  98. package/dist/collection/utils/platform.js +2 -1
  99. package/dist/collection/utils/test/platform.utils.js +1 -1
  100. package/dist/docs.json +222 -2
  101. package/dist/esm/{app-globals-5dbb61a5.js → app-globals-c10a1137.js} +1 -1
  102. package/dist/esm/{data-b3284b5e.js → data-bf516e75.js} +1 -1
  103. package/dist/esm/{framework-delegate-f683816e.js → framework-delegate-42bc40b1.js} +1 -1
  104. package/dist/esm/{hardware-back-button-06ef3c3e.js → hardware-back-button-44195e92.js} +1 -1
  105. package/dist/esm/{helpers-9b49d7d2.js → helpers-13b816c6.js} +7 -1
  106. package/dist/esm/{index-5a0f5fd0.js → index-28c8fd64.js} +1 -1
  107. package/dist/esm/{index-6a5baab0.js → index-879a2080.js} +5 -5
  108. package/dist/esm/{index-7105cd59.js → index-b4ac4019.js} +4 -4
  109. package/dist/esm/{index-6ad967f3.js → index-ce8d38d0.js} +1 -1
  110. package/dist/esm/{index-dd0f7395.js → index-ec2140bf.js} +2 -2
  111. package/dist/esm/index.js +10 -10
  112. package/dist/esm/{input-shims-dff819a9.js → input-shims-4c3d7279.js} +4 -4
  113. package/dist/esm/{input.utils-2f1029cf.js → input.utils-b4805900.js} +2 -2
  114. package/dist/esm/ion-accordion_2.entry.js +3 -3
  115. package/dist/esm/ion-action-sheet.entry.js +6 -6
  116. package/dist/esm/ion-alert.entry.js +36 -10
  117. package/dist/esm/ion-app_8.entry.js +12 -12
  118. package/dist/esm/ion-avatar_3.entry.js +1 -1
  119. package/dist/esm/ion-back-button.entry.js +2 -2
  120. package/dist/esm/ion-backdrop.entry.js +1 -1
  121. package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
  122. package/dist/esm/ion-button_2.entry.js +3 -3
  123. package/dist/esm/ion-card_5.entry.js +2 -2
  124. package/dist/esm/ion-checkbox.entry.js +37 -7
  125. package/dist/esm/ion-chip.entry.js +1 -1
  126. package/dist/esm/ion-col_3.entry.js +1 -1
  127. package/dist/esm/ion-datetime-button.entry.js +4 -4
  128. package/dist/esm/ion-datetime_3.entry.js +7 -7
  129. package/dist/esm/ion-fab_3.entry.js +2 -2
  130. package/dist/esm/ion-img.entry.js +2 -2
  131. package/dist/esm/ion-infinite-scroll_2.entry.js +4 -4
  132. package/dist/esm/ion-input-password-toggle.entry.js +2 -2
  133. package/dist/esm/ion-input.entry.js +5 -5
  134. package/dist/esm/ion-item-option_3.entry.js +4 -4
  135. package/dist/esm/ion-item_8.entry.js +2 -2
  136. package/dist/esm/ion-loading.entry.js +6 -6
  137. package/dist/esm/ion-menu_3.entry.js +7 -7
  138. package/dist/esm/ion-modal.entry.js +23 -15
  139. package/dist/esm/ion-nav_2.entry.js +6 -6
  140. package/dist/esm/ion-picker-column-option.entry.js +2 -2
  141. package/dist/esm/ion-picker-column.entry.js +2 -2
  142. package/dist/esm/ion-picker.entry.js +1 -1
  143. package/dist/esm/ion-popover.entry.js +7 -7
  144. package/dist/esm/ion-progress-bar.entry.js +2 -2
  145. package/dist/esm/ion-radio_2.entry.js +2 -2
  146. package/dist/esm/ion-range.entry.js +30 -9
  147. package/dist/esm/ion-refresher_2.entry.js +4 -4
  148. package/dist/esm/ion-reorder_2.entry.js +4 -4
  149. package/dist/esm/ion-ripple-effect.entry.js +1 -1
  150. package/dist/esm/ion-route_4.entry.js +2 -2
  151. package/dist/esm/ion-searchbar.entry.js +2 -2
  152. package/dist/esm/ion-segment_2.entry.js +2 -2
  153. package/dist/esm/ion-select-modal.entry.js +6 -6
  154. package/dist/esm/ion-select_3.entry.js +52 -12
  155. package/dist/esm/ion-spinner.entry.js +1 -1
  156. package/dist/esm/ion-split-pane.entry.js +1 -1
  157. package/dist/esm/ion-tab-bar_2.entry.js +2 -2
  158. package/dist/esm/ion-tab_2.entry.js +2 -2
  159. package/dist/esm/ion-text.entry.js +1 -1
  160. package/dist/esm/ion-textarea.entry.js +5 -5
  161. package/dist/esm/ion-toast.entry.js +6 -6
  162. package/dist/esm/ion-toggle.entry.js +38 -7
  163. package/dist/esm/{ionic-global-c81d82ab.js → ionic-global-bf78a847.js} +2 -1
  164. package/dist/esm/ionic.js +3 -3
  165. package/dist/esm/{ios.transition-314468a2.js → ios.transition-ffee637f.js} +4 -4
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/esm/{md.transition-a560e0e2.js → md.transition-3a4f9709.js} +4 -4
  168. package/dist/esm/{notch-controller-3dc61260.js → notch-controller-bb8f3a48.js} +1 -1
  169. package/dist/esm/{overlays-9a81f230.js → overlays-36f5880e.js} +5 -5
  170. package/dist/esm/{status-tap-d07dbc82.js → status-tap-2ce7841e.js} +4 -4
  171. package/dist/esm/{swipe-back-23ee7ab1.js → swipe-back-a258b011.js} +1 -1
  172. package/dist/esm-es5/app-globals-c10a1137.js +4 -0
  173. package/dist/esm-es5/{data-b3284b5e.js → data-bf516e75.js} +1 -1
  174. package/dist/esm-es5/{framework-delegate-f683816e.js → framework-delegate-42bc40b1.js} +1 -1
  175. package/dist/esm-es5/{hardware-back-button-06ef3c3e.js → hardware-back-button-44195e92.js} +1 -1
  176. package/dist/esm-es5/{helpers-9b49d7d2.js → helpers-13b816c6.js} +1 -1
  177. package/dist/esm-es5/{index-5a0f5fd0.js → index-28c8fd64.js} +1 -1
  178. package/dist/esm-es5/{index-6a5baab0.js → index-879a2080.js} +1 -1
  179. package/dist/esm-es5/{index-7105cd59.js → index-b4ac4019.js} +1 -1
  180. package/dist/esm-es5/{index-6ad967f3.js → index-ce8d38d0.js} +1 -1
  181. package/dist/esm-es5/{index-dd0f7395.js → index-ec2140bf.js} +1 -1
  182. package/dist/esm-es5/index.js +1 -1
  183. package/dist/esm-es5/{input-shims-dff819a9.js → input-shims-4c3d7279.js} +1 -1
  184. package/dist/esm-es5/{input.utils-2f1029cf.js → input.utils-b4805900.js} +1 -1
  185. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  186. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  187. package/dist/esm-es5/ion-alert.entry.js +1 -1
  188. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  189. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  190. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  191. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  192. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  193. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  194. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  195. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  196. package/dist/esm-es5/ion-chip.entry.js +1 -1
  197. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  198. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  199. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  200. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  201. package/dist/esm-es5/ion-img.entry.js +1 -1
  202. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  203. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  204. package/dist/esm-es5/ion-input.entry.js +1 -1
  205. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  206. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  207. package/dist/esm-es5/ion-loading.entry.js +1 -1
  208. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  209. package/dist/esm-es5/ion-modal.entry.js +1 -1
  210. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  211. package/dist/esm-es5/ion-picker-column-option.entry.js +1 -1
  212. package/dist/esm-es5/ion-picker-column.entry.js +1 -1
  213. package/dist/esm-es5/ion-picker.entry.js +1 -1
  214. package/dist/esm-es5/ion-popover.entry.js +1 -1
  215. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  216. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  217. package/dist/esm-es5/ion-range.entry.js +1 -1
  218. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  219. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  220. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  221. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  222. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  223. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  224. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  225. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  226. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  227. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  228. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  229. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  230. package/dist/esm-es5/ion-text.entry.js +1 -1
  231. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  232. package/dist/esm-es5/ion-toast.entry.js +1 -1
  233. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  234. package/dist/esm-es5/{ionic-global-c81d82ab.js → ionic-global-bf78a847.js} +1 -1
  235. package/dist/esm-es5/ionic.js +1 -1
  236. package/dist/esm-es5/{ios.transition-314468a2.js → ios.transition-ffee637f.js} +1 -1
  237. package/dist/esm-es5/loader.js +1 -1
  238. package/dist/esm-es5/md.transition-3a4f9709.js +4 -0
  239. package/dist/esm-es5/{notch-controller-3dc61260.js → notch-controller-bb8f3a48.js} +1 -1
  240. package/dist/esm-es5/{overlays-9a81f230.js → overlays-36f5880e.js} +1 -1
  241. package/dist/esm-es5/{status-tap-d07dbc82.js → status-tap-2ce7841e.js} +1 -1
  242. package/dist/esm-es5/{swipe-back-23ee7ab1.js → swipe-back-a258b011.js} +1 -1
  243. package/dist/html.html-data.json +25 -1
  244. package/dist/ionic/index.esm.js +1 -1
  245. package/dist/ionic/ionic.esm.js +1 -1
  246. package/dist/ionic/ionic.js +1 -1
  247. package/dist/ionic/{p-bb2a6761.entry.js → p-00d5ab83.entry.js} +1 -1
  248. package/dist/ionic/{p-b1f885df.entry.js → p-020df11a.entry.js} +1 -1
  249. package/dist/ionic/{p-1a5bc5f7.js → p-03940ae5.js} +1 -1
  250. package/dist/ionic/p-0412232d.js +4 -0
  251. package/dist/ionic/{p-a309ca1c.entry.js → p-0434c94c.entry.js} +1 -1
  252. package/dist/ionic/{p-da8ef548.system.entry.js → p-05f90810.system.entry.js} +1 -1
  253. package/dist/ionic/{p-89bf08c7.entry.js → p-09e4bf0d.entry.js} +1 -1
  254. package/dist/ionic/p-0ab8caf8.system.entry.js +4 -0
  255. package/dist/ionic/{p-6ca64f4e.entry.js → p-0eab6979.entry.js} +1 -1
  256. package/dist/ionic/p-0f138cf3.entry.js +4 -0
  257. package/dist/ionic/{p-78c884a1.system.entry.js → p-166a794f.system.entry.js} +1 -1
  258. package/dist/ionic/{p-fca17935.entry.js → p-16dd9c9b.entry.js} +1 -1
  259. package/dist/ionic/{p-acb30a5c.system.js → p-187396b1.system.js} +1 -1
  260. package/dist/ionic/{p-fa210a45.system.entry.js → p-1cf593cf.system.entry.js} +1 -1
  261. package/dist/ionic/{p-4ad78edc.entry.js → p-1f62c30b.entry.js} +1 -1
  262. package/dist/ionic/p-21780245.entry.js +4 -0
  263. package/dist/ionic/{p-b936eb7e.system.entry.js → p-21ee4f71.system.entry.js} +1 -1
  264. package/dist/ionic/{p-04b4ee62.entry.js → p-221fbdf5.entry.js} +1 -1
  265. package/dist/ionic/{p-dd0c9350.system.entry.js → p-25580c85.system.entry.js} +1 -1
  266. package/dist/ionic/{p-dde1e5b8.entry.js → p-2840743b.entry.js} +1 -1
  267. package/dist/ionic/{p-3624eb4f.entry.js → p-29cccf08.entry.js} +1 -1
  268. package/dist/ionic/{p-343b6b1d.system.js → p-2c1d4963.system.js} +1 -1
  269. package/dist/ionic/{p-b93144e1.entry.js → p-2f429536.entry.js} +1 -1
  270. package/dist/ionic/{p-9b3bb24e.entry.js → p-34182275.entry.js} +1 -1
  271. package/dist/ionic/{p-2bc73fb5.js → p-3559bd4f.js} +1 -1
  272. package/dist/ionic/p-38df41a6.system.js +4 -0
  273. package/dist/ionic/{p-8e407469.system.js → p-3a4d77b9.system.js} +1 -1
  274. package/dist/ionic/{p-3731296e.entry.js → p-3b872754.entry.js} +1 -1
  275. package/dist/ionic/{p-16960598.entry.js → p-41d7ca3c.entry.js} +1 -1
  276. package/dist/ionic/{p-f2fb9a7b.system.entry.js → p-4200e056.system.entry.js} +1 -1
  277. package/dist/ionic/{p-bf63d4b2.entry.js → p-43bfbfd7.entry.js} +1 -1
  278. package/dist/ionic/{p-e8f34871.entry.js → p-441c2c8c.entry.js} +1 -1
  279. package/dist/ionic/{p-1f9fa897.system.entry.js → p-47026941.system.entry.js} +1 -1
  280. package/dist/ionic/{p-f3102647.system.entry.js → p-478dfa8c.system.entry.js} +1 -1
  281. package/dist/ionic/{p-ba3f918e.entry.js → p-48e9eedb.entry.js} +1 -1
  282. package/dist/ionic/{p-0eb2553a.system.entry.js → p-4a98a017.system.entry.js} +1 -1
  283. package/dist/ionic/{p-990630ca.js → p-4e0643a3.js} +1 -1
  284. package/dist/ionic/p-4e8946f7.js +4 -0
  285. package/dist/ionic/{p-c59abcb6.system.entry.js → p-506f2664.system.entry.js} +1 -1
  286. package/dist/ionic/p-51d4cdba.system.js +4 -0
  287. package/dist/ionic/{p-5126cf1e.system.js → p-52b61cba.system.js} +1 -1
  288. package/dist/ionic/p-541b5191.entry.js +4 -0
  289. package/dist/ionic/{p-f5d6624d.entry.js → p-5a1017f3.entry.js} +1 -1
  290. package/dist/ionic/{p-36c448fe.entry.js → p-5bc47f96.entry.js} +1 -1
  291. package/dist/ionic/p-5c364a5b.entry.js +4 -0
  292. package/dist/ionic/{p-ca7b5bec.system.entry.js → p-5f10138c.system.entry.js} +1 -1
  293. package/dist/ionic/{p-ad10b555.system.entry.js → p-5f7a9125.system.entry.js} +2 -2
  294. package/dist/ionic/p-60f7c85d.entry.js +4 -0
  295. package/dist/ionic/p-62151078.system.entry.js +4 -0
  296. package/dist/ionic/p-623b4fa6.system.entry.js +4 -0
  297. package/dist/ionic/{p-78604c34.entry.js → p-62d2e17d.entry.js} +1 -1
  298. package/dist/ionic/{p-4f8e2c0a.system.entry.js → p-6321783a.system.entry.js} +1 -1
  299. package/dist/ionic/{p-d99e8644.system.js → p-6579f457.system.js} +1 -1
  300. package/dist/ionic/{p-73262d9e.system.entry.js → p-66425a02.system.entry.js} +1 -1
  301. package/dist/ionic/{p-8f2fe279.system.entry.js → p-6703c724.system.entry.js} +1 -1
  302. package/dist/ionic/{p-bb11d9fb.js → p-6eb35904.js} +1 -1
  303. package/dist/ionic/{p-ecceeb90.js → p-6f3d8334.js} +1 -1
  304. package/dist/ionic/{p-462ddb40.entry.js → p-6f6dd24f.entry.js} +1 -1
  305. package/dist/ionic/p-717520d6.system.entry.js +4 -0
  306. package/dist/ionic/{p-655723eb.system.entry.js → p-72210f2a.system.entry.js} +1 -1
  307. package/dist/ionic/{p-73897169.system.js → p-74e328cf.system.js} +1 -1
  308. package/dist/ionic/{p-39dd4f62.js → p-761c42da.js} +1 -1
  309. package/dist/ionic/{p-484d855b.system.entry.js → p-7d1cbf97.system.entry.js} +2 -2
  310. package/dist/ionic/{p-5c9324c6.js → p-7e70835f.js} +1 -1
  311. package/dist/ionic/{p-c1dbc8b6.system.entry.js → p-7ef62ef9.system.entry.js} +1 -1
  312. package/dist/ionic/{p-af452fa4.system.js → p-80d837dd.system.js} +1 -1
  313. package/dist/ionic/{p-744b2484.system.entry.js → p-826c4d67.system.entry.js} +1 -1
  314. package/dist/ionic/{p-4a1d747d.entry.js → p-82afe775.entry.js} +1 -1
  315. package/dist/ionic/{p-4d3a5f86.js → p-845f8d16.js} +1 -1
  316. package/dist/ionic/{p-af744710.system.entry.js → p-84fb742d.system.entry.js} +1 -1
  317. package/dist/ionic/{p-29c6c783.entry.js → p-85d6d07c.entry.js} +1 -1
  318. package/dist/ionic/{p-860eb968.system.js → p-86a9a4ca.system.js} +1 -1
  319. package/dist/ionic/{p-3c8e5c23.system.js → p-8911101b.system.js} +1 -1
  320. package/dist/ionic/{p-c3802319.system.js → p-8973b827.system.js} +1 -1
  321. package/dist/ionic/{p-7a1766d6.js → p-89e678fa.js} +1 -1
  322. package/dist/ionic/p-8a3509b8.js +4 -0
  323. package/dist/ionic/{p-b3680e2f.system.js → p-8aa290af.system.js} +1 -1
  324. package/dist/ionic/{p-fd6cff12.entry.js → p-8eee812a.entry.js} +1 -1
  325. package/dist/ionic/{p-955c3eb8.entry.js → p-8f89c8e3.entry.js} +1 -1
  326. package/dist/ionic/{p-21c7f006.entry.js → p-8fa80de0.entry.js} +1 -1
  327. package/dist/ionic/{p-18e101b7.system.entry.js → p-9104d662.system.entry.js} +1 -1
  328. package/dist/ionic/{p-2cd35dd9.entry.js → p-95a11fc4.entry.js} +1 -1
  329. package/dist/ionic/{p-e32557bb.system.entry.js → p-97542341.system.entry.js} +1 -1
  330. package/dist/ionic/{p-60e2b91f.system.entry.js → p-986a98d9.system.entry.js} +2 -2
  331. package/dist/ionic/{p-88d323cd.system.entry.js → p-98aefaa1.system.entry.js} +1 -1
  332. package/dist/ionic/{p-d821466d.system.entry.js → p-9994c82e.system.entry.js} +1 -1
  333. package/dist/ionic/{p-e06861a9.system.entry.js → p-99b4160f.system.entry.js} +1 -1
  334. package/dist/ionic/p-9a950d3c.entry.js +4 -0
  335. package/dist/ionic/{p-75cc5913.system.entry.js → p-9aaaff17.system.entry.js} +1 -1
  336. package/dist/ionic/{p-5fce0c0b.system.entry.js → p-9c7efe25.system.entry.js} +1 -1
  337. package/dist/ionic/{p-bdad26e3.entry.js → p-9d4a8059.entry.js} +1 -1
  338. package/dist/ionic/{p-70af0afb.entry.js → p-a17a1fb9.entry.js} +1 -1
  339. package/dist/ionic/{p-e8d56122.js → p-a3e60403.js} +1 -1
  340. package/dist/ionic/{p-c8d645b3.entry.js → p-a4b108a7.entry.js} +1 -1
  341. package/dist/ionic/{p-fd4e25b5.system.entry.js → p-a4e7eaf6.system.entry.js} +1 -1
  342. package/dist/ionic/{p-b3c4ddc2.system.entry.js → p-aae5907a.system.entry.js} +1 -1
  343. package/dist/ionic/p-afba4c00.system.entry.js +4 -0
  344. package/dist/ionic/p-b1c4a9db.js +4 -0
  345. package/dist/ionic/{p-826a2aaf.entry.js → p-b1dbfc12.entry.js} +1 -1
  346. package/dist/ionic/{p-d4ca0475.js → p-b566749e.js} +1 -1
  347. package/dist/ionic/{p-bc616455.entry.js → p-bbfa740f.entry.js} +1 -1
  348. package/dist/ionic/{p-0609cf64.entry.js → p-bd1c99cb.entry.js} +1 -1
  349. package/dist/ionic/p-be8ecfc1.js +4 -0
  350. package/dist/ionic/p-c1ad8eb0.system.js +4 -0
  351. package/dist/ionic/{p-c935cfc9.js → p-c30c10af.js} +1 -1
  352. package/dist/ionic/{p-f89cf011.system.entry.js → p-c3de6cd1.system.entry.js} +1 -1
  353. package/dist/ionic/{p-6e077659.entry.js → p-c43872df.entry.js} +1 -1
  354. package/dist/ionic/{p-e75b0c87.entry.js → p-c4f9367a.entry.js} +1 -1
  355. package/dist/ionic/{p-648f5e38.system.entry.js → p-c52ca485.system.entry.js} +1 -1
  356. package/dist/ionic/{p-a9e24ae2.system.entry.js → p-c55254f0.system.entry.js} +1 -1
  357. package/dist/ionic/{p-33a8a71b.entry.js → p-c66604e4.entry.js} +1 -1
  358. package/dist/ionic/{p-f8e37d24.system.entry.js → p-cad0b874.system.entry.js} +1 -1
  359. package/dist/ionic/{p-a69b9fc5.system.js → p-d86d7845.system.js} +1 -1
  360. package/dist/ionic/{p-058e61eb.system.js → p-d8c1ac0d.system.js} +1 -1
  361. package/dist/ionic/{p-75544514.system.entry.js → p-d9162cf7.system.entry.js} +1 -1
  362. package/dist/ionic/{p-e5ed3da9.entry.js → p-dbe534f5.entry.js} +1 -1
  363. package/dist/ionic/{p-2d1d8a25.entry.js → p-dde5afee.entry.js} +1 -1
  364. package/dist/ionic/{p-2abc5389.entry.js → p-de0b8503.entry.js} +1 -1
  365. package/dist/ionic/{p-dc146a2a.system.entry.js → p-de4fef3c.system.entry.js} +1 -1
  366. package/dist/ionic/{p-84d08aae.system.entry.js → p-e0a2abde.system.entry.js} +1 -1
  367. package/dist/ionic/{p-d743e981.js → p-e25cd3c7.js} +1 -1
  368. package/dist/ionic/{p-665c22ee.entry.js → p-e3bd1070.entry.js} +1 -1
  369. package/dist/ionic/{p-8cfba7e9.system.entry.js → p-e56b4e0f.system.entry.js} +1 -1
  370. package/dist/ionic/{p-9a100adc.entry.js → p-e824ffe7.entry.js} +1 -1
  371. package/dist/ionic/{p-9f3008d4.system.js → p-eb4ac14d.system.js} +1 -1
  372. package/dist/ionic/{p-1c934892.entry.js → p-ebceb0ac.entry.js} +1 -1
  373. package/dist/ionic/{p-e0a6dc45.system.entry.js → p-ec92cc52.system.entry.js} +1 -1
  374. package/dist/ionic/{p-1283c4fa.system.entry.js → p-ee70a913.system.entry.js} +1 -1
  375. package/dist/ionic/{p-d7bb5325.entry.js → p-f4cddcd0.entry.js} +1 -1
  376. package/dist/ionic/p-f4f255cb.system.js +4 -0
  377. package/dist/ionic/{p-4452a8ac.system.js → p-f5a536e1.system.js} +1 -1
  378. package/dist/ionic/{p-a6cf686b.system.entry.js → p-f5f52b6d.system.entry.js} +1 -1
  379. package/dist/ionic/{p-578efda4.system.js → p-f6d066b4.system.js} +1 -1
  380. package/dist/ionic/{p-95da3ae2.system.js → p-f6e7870b.system.js} +1 -1
  381. package/dist/ionic/{p-e9ddf8fe.system.entry.js → p-fa5a45cd.system.entry.js} +1 -1
  382. package/dist/ionic/{p-a9eda6d0.system.entry.js → p-fb048d4d.system.entry.js} +1 -1
  383. package/dist/ionic/p-fe00ac05.system.entry.js +4 -0
  384. package/dist/ionic/{p-346b2baf.js → p-fe7be7b4.js} +1 -1
  385. package/dist/types/components/checkbox/checkbox.d.ts +19 -0
  386. package/dist/types/components/modal/modal.d.ts +6 -3
  387. package/dist/types/components/range/range.d.ts +3 -2
  388. package/dist/types/components/select/select.d.ts +23 -0
  389. package/dist/types/components/toggle/toggle.d.ts +19 -0
  390. package/dist/types/components.d.ts +50 -2
  391. package/dist/types/utils/helpers.d.ts +4 -0
  392. package/dist/types/utils/native/capacitor.d.ts +7 -1
  393. package/dist/types/utils/test/platform.utils.d.ts +1 -1
  394. package/hydrate/index.js +210 -32
  395. package/hydrate/index.mjs +210 -32
  396. package/package.json +5 -5
  397. package/dist/esm-es5/app-globals-5dbb61a5.js +0 -4
  398. package/dist/esm-es5/md.transition-a560e0e2.js +0 -4
  399. package/dist/ionic/p-0574e87e.js +0 -4
  400. package/dist/ionic/p-155f4d90.entry.js +0 -4
  401. package/dist/ionic/p-1f405274.js +0 -4
  402. package/dist/ionic/p-21227121.js +0 -4
  403. package/dist/ionic/p-22149a4f.js +0 -4
  404. package/dist/ionic/p-2c9eb774.system.js +0 -4
  405. package/dist/ionic/p-322c5fb4.system.js +0 -4
  406. package/dist/ionic/p-4a25618e.system.entry.js +0 -4
  407. package/dist/ionic/p-52245809.js +0 -4
  408. package/dist/ionic/p-5733b3de.system.entry.js +0 -4
  409. package/dist/ionic/p-67222c16.system.js +0 -4
  410. package/dist/ionic/p-68c5fcd6.system.entry.js +0 -4
  411. package/dist/ionic/p-712fedc9.entry.js +0 -4
  412. package/dist/ionic/p-7b02a0e4.entry.js +0 -4
  413. package/dist/ionic/p-7c3b0a9b.system.entry.js +0 -4
  414. package/dist/ionic/p-8f4361a8.system.entry.js +0 -4
  415. package/dist/ionic/p-9f763f14.entry.js +0 -4
  416. package/dist/ionic/p-a43ad5b5.entry.js +0 -4
  417. package/dist/ionic/p-acc8399c.system.entry.js +0 -4
  418. package/dist/ionic/p-c67ded77.entry.js +0 -4
  419. package/dist/ionic/p-fbf86e62.system.js +0 -4
@@ -23,10 +23,15 @@ import { getIonMode } from "../../global/ionic-global";
23
23
  * @part icon - The select icon container.
24
24
  * @part container - The container for the selected text or placeholder.
25
25
  * @part label - The label text describing the select.
26
+ * @part supporting-text - Supporting text displayed beneath the select.
27
+ * @part helper-text - Supporting text displayed beneath the select when the select is valid.
28
+ * @part error-text - Supporting text displayed beneath the select when the select is invalid and touched.
26
29
  */
27
30
  export class Select {
28
31
  constructor() {
29
32
  this.inputId = `ion-sel-${selectIds++}`;
33
+ this.helperTextId = `${this.inputId}-helper-text`;
34
+ this.errorTextId = `${this.inputId}-error-text`;
30
35
  this.inheritedAttributes = {};
31
36
  this.onClick = (ev) => {
32
37
  const target = ev.target;
@@ -77,6 +82,8 @@ export class Select {
77
82
  this.compareWith = undefined;
78
83
  this.disabled = false;
79
84
  this.fill = undefined;
85
+ this.errorText = undefined;
86
+ this.helperText = undefined;
80
87
  this.interface = 'alert';
81
88
  this.interfaceOptions = {};
82
89
  this.justify = undefined;
@@ -657,7 +664,43 @@ export class Select {
657
664
  }
658
665
  renderListbox() {
659
666
  const { disabled, inputId, isExpanded, required } = this;
660
- return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
667
+ return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
668
+ }
669
+ getHintTextID() {
670
+ const { el, helperText, errorText, helperTextId, errorTextId } = this;
671
+ if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
672
+ return errorTextId;
673
+ }
674
+ if (helperText) {
675
+ return helperTextId;
676
+ }
677
+ return undefined;
678
+ }
679
+ /**
680
+ * Renders the helper text or error text values
681
+ */
682
+ renderHintText() {
683
+ const { helperText, errorText, helperTextId, errorTextId } = this;
684
+ return [
685
+ h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText),
686
+ h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText),
687
+ ];
688
+ }
689
+ /**
690
+ * Responsible for rendering helper text, and error text. This element
691
+ * should only be rendered if hint text is set.
692
+ */
693
+ renderBottomContent() {
694
+ const { helperText, errorText } = this;
695
+ /**
696
+ * undefined and empty string values should
697
+ * be treated as not having helper/error text.
698
+ */
699
+ const hasHintText = !!helperText || !!errorText;
700
+ if (!hasHintText) {
701
+ return;
702
+ }
703
+ return h("div", { class: "select-bottom" }, this.renderHintText());
661
704
  }
662
705
  render() {
663
706
  const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
@@ -688,7 +731,7 @@ export class Select {
688
731
  * TODO(FW-5592): Remove hasStartEndSlots condition
689
732
  */
690
733
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
691
- return (h(Host, { key: 'c8733e313b58edabdc591f0ff719b5b9b438fc42', onClick: this.onClick, class: createColorClasses(this.color, {
734
+ return (h(Host, { key: 'aa7bd7fbb6479c7805486990650a406e5470fd13', onClick: this.onClick, class: createColorClasses(this.color, {
692
735
  [mode]: true,
693
736
  'in-item': inItem,
694
737
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -704,7 +747,7 @@ export class Select {
704
747
  [`select-justify-${justify}`]: justifyEnabled,
705
748
  [`select-shape-${shape}`]: shape !== undefined,
706
749
  [`select-label-placement-${labelPlacement}`]: true,
707
- }) }, h("label", { key: 'eb8ae26be8337b5483ad9e8e41aacab8ccf2f903', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '9b965f9f2d8b7aa00d9d966e883effc63d2d5c59', class: "select-wrapper-inner" }, h("slot", { key: '91cf7c4f0c529f1553c2664718424695769762ee', name: "start" }), h("div", { key: 'ec3818dbc16754d3bda242959d14bdd16b002c7a', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '118f6c2ae3a80e53ddd247e6790204ec3828b565', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'cad959d69694eea98685daf6068ca2c20a961b3e', class: "select-highlight" }))));
750
+ }) }, h("label", { key: 'fde3cdfd0ef7d1a20263e35ff4358ee7f61a789f', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '6fb8deedc827b6be2f19f9e57a62efefaaba200f', class: "select-wrapper-inner" }, h("slot", { key: 'a57a204ea1cbd9c4bac338f14e196e780dab0a10', name: "start" }), h("div", { key: '78b83e1484a446537e038527d539d997e330cd69', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '9fc660134e5247c4e5243c7d9d71ac6cec08705d', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '7f143285efa7fd7756dfdc5517ca33e84c8a027e', class: "select-highlight" })), this.renderBottomContent()));
708
751
  }
709
752
  static get is() { return "ion-select"; }
710
753
  static get encapsulation() { return "shadow"; }
@@ -821,6 +864,40 @@ export class Select {
821
864
  "attribute": "fill",
822
865
  "reflect": false
823
866
  },
867
+ "errorText": {
868
+ "type": "string",
869
+ "mutable": false,
870
+ "complexType": {
871
+ "original": "string",
872
+ "resolved": "string | undefined",
873
+ "references": {}
874
+ },
875
+ "required": false,
876
+ "optional": true,
877
+ "docs": {
878
+ "tags": [],
879
+ "text": "Text that is placed under the select and displayed when an error is detected."
880
+ },
881
+ "attribute": "error-text",
882
+ "reflect": false
883
+ },
884
+ "helperText": {
885
+ "type": "string",
886
+ "mutable": false,
887
+ "complexType": {
888
+ "original": "string",
889
+ "resolved": "string | undefined",
890
+ "references": {}
891
+ },
892
+ "required": false,
893
+ "optional": true,
894
+ "docs": {
895
+ "tags": [],
896
+ "text": "Text that is placed under the select and displayed when no error is detected."
897
+ },
898
+ "attribute": "helper-text",
899
+ "reflect": false
900
+ },
824
901
  "interface": {
825
902
  "type": "string",
826
903
  "mutable": false,
@@ -299,6 +299,63 @@ button {
299
299
  --highlight-color: var(--highlight-color-valid);
300
300
  }
301
301
 
302
+ .select-bottom {
303
+ /**
304
+ * The bottom content should take on the start and end
305
+ * padding so it is always aligned with either the label
306
+ * or the start of the text select.
307
+ */
308
+ -webkit-padding-start: var(--padding-start);
309
+ padding-inline-start: var(--padding-start);
310
+ -webkit-padding-end: var(--padding-end);
311
+ padding-inline-end: var(--padding-end);
312
+ padding-top: 5px;
313
+ padding-bottom: 0;
314
+ display: flex;
315
+ justify-content: space-between;
316
+ border-top: var(--border-width) var(--border-style) var(--border-color);
317
+ font-size: 0.75rem;
318
+ white-space: normal;
319
+ }
320
+
321
+ /**
322
+ * If the select has a validity state, the
323
+ * border and label should reflect that as a color.
324
+ * The invalid state should show if the select is
325
+ * invalid and has already been touched.
326
+ * The valid state should show if the select
327
+ * is valid, has already been touched, and
328
+ * is currently focused. Do not show the valid
329
+ * highlight when the select is blurred.
330
+ */
331
+ :host(.has-focus.ion-valid),
332
+ :host(.ion-touched.ion-invalid) {
333
+ --border-color: var(--highlight-color);
334
+ }
335
+
336
+ /**
337
+ * Error text should only be shown when .ion-invalid is
338
+ * present on the select. Otherwise the helper text should
339
+ * be shown.
340
+ */
341
+ .select-bottom .error-text {
342
+ display: none;
343
+ color: var(--highlight-color-invalid);
344
+ }
345
+
346
+ .select-bottom .helper-text {
347
+ display: block;
348
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
349
+ }
350
+
351
+ :host(.ion-touched.ion-invalid) .select-bottom .error-text {
352
+ display: block;
353
+ }
354
+
355
+ :host(.ion-touched.ion-invalid) .select-bottom .helper-text {
356
+ display: none;
357
+ }
358
+
302
359
  .label-text-wrapper {
303
360
  /**
304
361
  * This causes the label to take up
@@ -768,6 +825,10 @@ button {
768
825
  --border-color: var(--highlight-color);
769
826
  }
770
827
 
828
+ /**
829
+ * The bottom content should never have
830
+ * a border with the solid style.
831
+ */
771
832
  :host(.select-fill-solid) .select-bottom {
772
833
  border-top: none;
773
834
  }
@@ -171,32 +171,39 @@ input {
171
171
  align-items: center;
172
172
  }
173
173
 
174
- :host(.toggle-justify-space-between) .toggle-wrapper {
174
+ .toggle-bottom {
175
+ padding-top: 4px;
176
+ display: flex;
175
177
  justify-content: space-between;
178
+ font-size: 0.75rem;
179
+ white-space: normal;
176
180
  }
177
181
 
178
- :host(.toggle-justify-start) .toggle-wrapper {
179
- justify-content: start;
182
+ :host(.toggle-label-placement-stacked) .toggle-bottom {
183
+ font-size: 1rem;
180
184
  }
181
185
 
182
- :host(.toggle-justify-end) .toggle-wrapper {
183
- justify-content: end;
186
+ /**
187
+ * Error text should only be shown when .ion-invalid is
188
+ * present on the checkbox. Otherwise the helper text should
189
+ * be shown.
190
+ */
191
+ .toggle-bottom .error-text {
192
+ display: none;
193
+ color: var(--ion-color-danger, #c5000f);
184
194
  }
185
195
 
186
- :host(.toggle-alignment-start) .toggle-wrapper {
187
- align-items: start;
196
+ .toggle-bottom .helper-text {
197
+ display: block;
198
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
188
199
  }
189
200
 
190
- :host(.toggle-alignment-center) .toggle-wrapper {
191
- align-items: center;
201
+ :host(.ion-touched.ion-invalid) .toggle-bottom .error-text {
202
+ display: block;
192
203
  }
193
204
 
194
- :host(.toggle-justify-space-between),
195
- :host(.toggle-justify-start),
196
- :host(.toggle-justify-end),
197
- :host(.toggle-alignment-start),
198
- :host(.toggle-alignment-center) {
199
- display: block;
205
+ :host(.ion-touched.ion-invalid) .toggle-bottom .helper-text {
206
+ display: none;
200
207
  }
201
208
 
202
209
  /**
@@ -225,6 +232,7 @@ input {
225
232
  */
226
233
  :host(.toggle-label-placement-end) .toggle-wrapper {
227
234
  flex-direction: row-reverse;
235
+ justify-content: start;
228
236
  }
229
237
 
230
238
  /**
@@ -267,6 +275,7 @@ input {
267
275
  */
268
276
  :host(.toggle-label-placement-stacked) .toggle-wrapper {
269
277
  flex-direction: column;
278
+ text-align: center;
270
279
  }
271
280
 
272
281
  :host(.toggle-label-placement-stacked) .label-text-wrapper {
@@ -312,6 +321,34 @@ input {
312
321
  }
313
322
  }
314
323
 
324
+ :host(.toggle-justify-space-between) .toggle-wrapper {
325
+ justify-content: space-between;
326
+ }
327
+
328
+ :host(.toggle-justify-start) .toggle-wrapper {
329
+ justify-content: start;
330
+ }
331
+
332
+ :host(.toggle-justify-end) .toggle-wrapper {
333
+ justify-content: end;
334
+ }
335
+
336
+ :host(.toggle-alignment-start) .toggle-wrapper {
337
+ align-items: start;
338
+ }
339
+
340
+ :host(.toggle-alignment-center) .toggle-wrapper {
341
+ align-items: center;
342
+ }
343
+
344
+ :host(.toggle-justify-space-between),
345
+ :host(.toggle-justify-start),
346
+ :host(.toggle-justify-end),
347
+ :host(.toggle-alignment-start),
348
+ :host(.toggle-alignment-center) {
349
+ display: block;
350
+ }
351
+
315
352
  .toggle-icon-wrapper {
316
353
  display: flex;
317
354
  position: relative;
@@ -17,10 +17,15 @@ import { getIonMode } from "../../global/ionic-global";
17
17
  * @part track - The background track of the toggle.
18
18
  * @part handle - The toggle handle, or knob, used to change the checked state.
19
19
  * @part label - The label text describing the toggle.
20
+ * @part supporting-text - Supporting text displayed beneath the toggle label.
21
+ * @part helper-text - Supporting text displayed beneath the toggle label when the toggle is valid.
22
+ * @part error-text - Supporting text displayed beneath the toggle label when the toggle is invalid and touched.
20
23
  */
21
24
  export class Toggle {
22
25
  constructor() {
23
26
  this.inputId = `ion-tg-${toggleIds++}`;
27
+ this.helperTextId = `${this.inputId}-helper-text`;
28
+ this.errorTextId = `${this.inputId}-error-text`;
24
29
  this.lastDrag = 0;
25
30
  this.inheritedAttributes = {};
26
31
  this.didLoad = false;
@@ -66,6 +71,8 @@ export class Toggle {
66
71
  this.name = this.inputId;
67
72
  this.checked = false;
68
73
  this.disabled = false;
74
+ this.errorText = undefined;
75
+ this.helperText = undefined;
69
76
  this.value = 'on';
70
77
  this.enableOnOffLabels = config.get('toggleOnOffLabels');
71
78
  this.labelPlacement = 'start';
@@ -82,6 +89,7 @@ export class Toggle {
82
89
  const { checked, value } = this;
83
90
  const isNowChecked = !checked;
84
91
  this.checked = isNowChecked;
92
+ this.setFocus();
85
93
  this.ionChange.emit({
86
94
  checked: isNowChecked,
87
95
  value,
@@ -152,13 +160,39 @@ export class Toggle {
152
160
  get hasLabel() {
153
161
  return this.el.textContent !== '';
154
162
  }
163
+ getHintTextID() {
164
+ const { el, helperText, errorText, helperTextId, errorTextId } = this;
165
+ if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
166
+ return errorTextId;
167
+ }
168
+ if (helperText) {
169
+ return helperTextId;
170
+ }
171
+ return undefined;
172
+ }
173
+ /**
174
+ * Responsible for rendering helper text and error text.
175
+ * This element should only be rendered if hint text is set.
176
+ */
177
+ renderHintText() {
178
+ const { helperText, errorText, helperTextId, errorTextId } = this;
179
+ /**
180
+ * undefined and empty string values should
181
+ * be treated as not having helper/error text.
182
+ */
183
+ const hasHintText = !!helperText || !!errorText;
184
+ if (!hasHintText) {
185
+ return;
186
+ }
187
+ return (h("div", { class: "toggle-bottom" }, h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText), h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText)));
188
+ }
155
189
  render() {
156
190
  const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
157
191
  const mode = getIonMode(this);
158
192
  const value = this.getValue();
159
193
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
160
194
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
161
- return (h(Host, { key: '381632cf12ef5d27d729e0d59efcb14efad12a51', onClick: this.onClick, class: createColorClasses(color, {
195
+ return (h(Host, { key: 'c6db7f5bc0b358944c0d79e24aeb4d319793422f', "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, onClick: this.onClick, class: createColorClasses(color, {
162
196
  [mode]: true,
163
197
  'in-item': hostContext('ion-item', el),
164
198
  'toggle-activated': activated,
@@ -168,10 +202,10 @@ export class Toggle {
168
202
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
169
203
  [`toggle-label-placement-${labelPlacement}`]: true,
170
204
  [`toggle-${rtl}`]: true,
171
- }) }, h("label", { key: '73f2bd13ccfc4a1efc68781155f603e665be3d7e', class: "toggle-wrapper" }, h("input", Object.assign({ key: '0c4b7663ddbf3b1ce94b5fd4c7c21e51db907d71', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, this.inheritedAttributes)), h("div", { key: 'ef1e73bee832bf9ab58d1e47eb037c50b609c0ee', class: {
205
+ }) }, h("label", { key: 'f49531391f4513d084061c27ebc4c4eb1dcd02ab', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'f4ab2dc29eae053f54613d1304f755e151037f47', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, this.inheritedAttributes)), h("div", { key: '85674bfab5ec1e422c787d025c4f9f5b3aadd4f2', class: {
172
206
  'label-text-wrapper': true,
173
207
  'label-text-wrapper-hidden': !this.hasLabel,
174
- }, part: "label" }, h("slot", { key: '67b7e20dc96503cb76dd5e31c5579752de465dcc' })), h("div", { key: '17f89960bcc3302ef8e0c0d4e10513241744e232', class: "native-wrapper" }, this.renderToggleControl()))));
208
+ }, part: "label" }, h("slot", { key: '9bdf7e85c95dc7373f18894ebfe6ad022f098107' }), this.renderHintText()), h("div", { key: '33883642b38421a82001e37db3dd5e5c643785b0', class: "native-wrapper" }, this.renderToggleControl()))));
175
209
  }
176
210
  static get is() { return "ion-toggle"; }
177
211
  static get encapsulation() { return "shadow"; }
@@ -266,6 +300,40 @@ export class Toggle {
266
300
  "reflect": false,
267
301
  "defaultValue": "false"
268
302
  },
303
+ "errorText": {
304
+ "type": "string",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "string",
308
+ "resolved": "string | undefined",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": true,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Text that is placed under the toggle label and displayed when an error is detected."
316
+ },
317
+ "attribute": "error-text",
318
+ "reflect": false
319
+ },
320
+ "helperText": {
321
+ "type": "string",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "string",
325
+ "resolved": "string | undefined",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": true,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "Text that is placed under the toggle label and displayed when no error is detected."
333
+ },
334
+ "attribute": "helper-text",
335
+ "reflect": false
336
+ },
269
337
  "value": {
270
338
  "type": "string",
271
339
  "mutable": false,
@@ -171,32 +171,39 @@ input {
171
171
  align-items: center;
172
172
  }
173
173
 
174
- :host(.toggle-justify-space-between) .toggle-wrapper {
174
+ .toggle-bottom {
175
+ padding-top: 4px;
176
+ display: flex;
175
177
  justify-content: space-between;
178
+ font-size: 0.75rem;
179
+ white-space: normal;
176
180
  }
177
181
 
178
- :host(.toggle-justify-start) .toggle-wrapper {
179
- justify-content: start;
182
+ :host(.toggle-label-placement-stacked) .toggle-bottom {
183
+ font-size: 1rem;
180
184
  }
181
185
 
182
- :host(.toggle-justify-end) .toggle-wrapper {
183
- justify-content: end;
186
+ /**
187
+ * Error text should only be shown when .ion-invalid is
188
+ * present on the checkbox. Otherwise the helper text should
189
+ * be shown.
190
+ */
191
+ .toggle-bottom .error-text {
192
+ display: none;
193
+ color: var(--ion-color-danger, #c5000f);
184
194
  }
185
195
 
186
- :host(.toggle-alignment-start) .toggle-wrapper {
187
- align-items: start;
196
+ .toggle-bottom .helper-text {
197
+ display: block;
198
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
188
199
  }
189
200
 
190
- :host(.toggle-alignment-center) .toggle-wrapper {
191
- align-items: center;
201
+ :host(.ion-touched.ion-invalid) .toggle-bottom .error-text {
202
+ display: block;
192
203
  }
193
204
 
194
- :host(.toggle-justify-space-between),
195
- :host(.toggle-justify-start),
196
- :host(.toggle-justify-end),
197
- :host(.toggle-alignment-start),
198
- :host(.toggle-alignment-center) {
199
- display: block;
205
+ :host(.ion-touched.ion-invalid) .toggle-bottom .helper-text {
206
+ display: none;
200
207
  }
201
208
 
202
209
  /**
@@ -225,6 +232,7 @@ input {
225
232
  */
226
233
  :host(.toggle-label-placement-end) .toggle-wrapper {
227
234
  flex-direction: row-reverse;
235
+ justify-content: start;
228
236
  }
229
237
 
230
238
  /**
@@ -267,6 +275,7 @@ input {
267
275
  */
268
276
  :host(.toggle-label-placement-stacked) .toggle-wrapper {
269
277
  flex-direction: column;
278
+ text-align: center;
270
279
  }
271
280
 
272
281
  :host(.toggle-label-placement-stacked) .label-text-wrapper {
@@ -312,6 +321,34 @@ input {
312
321
  }
313
322
  }
314
323
 
324
+ :host(.toggle-justify-space-between) .toggle-wrapper {
325
+ justify-content: space-between;
326
+ }
327
+
328
+ :host(.toggle-justify-start) .toggle-wrapper {
329
+ justify-content: start;
330
+ }
331
+
332
+ :host(.toggle-justify-end) .toggle-wrapper {
333
+ justify-content: end;
334
+ }
335
+
336
+ :host(.toggle-alignment-start) .toggle-wrapper {
337
+ align-items: start;
338
+ }
339
+
340
+ :host(.toggle-alignment-center) .toggle-wrapper {
341
+ align-items: center;
342
+ }
343
+
344
+ :host(.toggle-justify-space-between),
345
+ :host(.toggle-justify-start),
346
+ :host(.toggle-justify-end),
347
+ :host(.toggle-alignment-start),
348
+ :host(.toggle-alignment-center) {
349
+ display: block;
350
+ }
351
+
315
352
  .toggle-icon-wrapper {
316
353
  display: flex;
317
354
  position: relative;
@@ -1,7 +1,10 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
+ import { isSafeNumber } from "../helpers";
4
5
  export function getDecimalPlaces(n) {
6
+ if (!isSafeNumber(n))
7
+ return 0;
5
8
  if (n % 1 === 0)
6
9
  return 0;
7
10
  return n.toString().split('.')[1].length;
@@ -39,6 +42,8 @@ export function getDecimalPlaces(n) {
39
42
  * be used as a reference for the desired specificity.
40
43
  */
41
44
  export function roundToMaxDecimalPlaces(n, ...references) {
45
+ if (!isSafeNumber(n))
46
+ return 0;
42
47
  const maxPlaces = Math.max(...references.map((r) => getDecimalPlaces(r)));
43
48
  return Number(n.toFixed(maxPlaces));
44
49
  }
@@ -374,3 +374,9 @@ export const getNextSiblingOfType = (element) => {
374
374
  }
375
375
  return null;
376
376
  };
377
+ /**
378
+ * Checks input for usable number. Not NaN and not Infinite.
379
+ */
380
+ export const isSafeNumber = (input) => {
381
+ return typeof input === 'number' && !isNaN(input) && isFinite(input);
382
+ };
@@ -67,7 +67,8 @@ const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
67
67
  const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
68
68
  const isCapacitorNative = (win) => {
69
69
  const capacitor = win['Capacitor'];
70
- return !!(capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative);
70
+ // TODO(ROU-11693): Remove when we no longer support Capacitor 2, which does not have isNativePlatform
71
+ return !!((capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative) || ((capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNativePlatform) && !!capacitor.isNativePlatform()));
71
72
  };
72
73
  const isElectron = (win) => testUserAgent(win, /electron/i);
73
74
  const isPWA = (win) => { var _a; return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone); };
@@ -28,7 +28,7 @@ export const PlatformConfiguration = {
28
28
  },
29
29
  Capacitor: {
30
30
  Capacitor: {
31
- isNative: true,
31
+ isNativePlatform: () => true,
32
32
  },
33
33
  },
34
34
  PWA: {