@ionic/core 8.4.4-dev.11741377533.15770110 → 8.4.4-dev.11741630999.189d7fc2

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 (265) hide show
  1. package/components/checkbox.js +6 -4
  2. package/components/index6.js +11 -3
  3. package/components/ion-input.js +2 -2
  4. package/components/ion-range.js +13 -5
  5. package/components/ion-select.js +6 -4
  6. package/components/ion-textarea.js +2 -2
  7. package/components/ion-toggle.js +41 -6
  8. package/components/modal.js +259 -35
  9. package/components/toolbar.js +2 -2
  10. package/css/core.css.map +1 -1
  11. package/css/ionic.bundle.css.map +1 -1
  12. package/dist/cjs/{data-21dc0f81.js → data-26456291.js} +1 -1
  13. package/dist/cjs/{index-1248dbd7.js → index-0d2610b6.js} +1 -1
  14. package/dist/cjs/{index-5915f9b3.js → index-275c982e.js} +11 -3
  15. package/dist/cjs/{index-a4a74252.js → index-608fc5fd.js} +1 -1
  16. package/dist/cjs/{index-4e37257d.js → index-6ad4725f.js} +3 -3
  17. package/dist/cjs/index.cjs.js +6 -6
  18. package/dist/cjs/{input-shims-b4c0eee7.js → input-shims-a2cf9d15.js} +4 -2
  19. package/dist/cjs/{input.utils-4af208ab.js → input.utils-18725f61.js} +1 -1
  20. package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
  22. package/dist/cjs/ion-alert.cjs.entry.js +2 -2
  23. package/dist/cjs/ion-app_8.cjs.entry.js +7 -7
  24. package/dist/cjs/ion-button_2.cjs.entry.js +1 -1
  25. package/dist/cjs/ion-checkbox.cjs.entry.js +5 -4
  26. package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
  27. package/dist/cjs/ion-datetime_3.cjs.entry.js +3 -3
  28. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +1 -1
  30. package/dist/cjs/ion-input.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  32. package/dist/cjs/ion-loading.cjs.entry.js +2 -2
  33. package/dist/cjs/ion-menu_3.cjs.entry.js +3 -3
  34. package/dist/cjs/ion-modal.cjs.entry.js +262 -39
  35. package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-popover.cjs.entry.js +3 -3
  37. package/dist/cjs/ion-range.cjs.entry.js +14 -7
  38. package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-select-modal.cjs.entry.js +2 -2
  41. package/dist/cjs/ion-select_3.cjs.entry.js +7 -6
  42. package/dist/cjs/ion-textarea.cjs.entry.js +4 -4
  43. package/dist/cjs/ion-toast.cjs.entry.js +2 -2
  44. package/dist/cjs/ion-toggle.cjs.entry.js +38 -6
  45. package/dist/cjs/ionic.cjs.js +1 -1
  46. package/dist/cjs/{ios.transition-8d363d77.js → ios.transition-e188169d.js} +2 -2
  47. package/dist/cjs/loader.cjs.js +1 -1
  48. package/dist/cjs/{md.transition-57d695fa.js → md.transition-b66da2a1.js} +2 -2
  49. package/dist/cjs/{overlays-27703a30.js → overlays-b0b07774.js} +1 -1
  50. package/dist/cjs/{status-tap-654077ee.js → status-tap-3b633cba.js} +3 -2
  51. package/dist/collection/components/checkbox/checkbox.js +23 -4
  52. package/dist/collection/components/input/input.ios.css +3 -2
  53. package/dist/collection/components/input/input.md.css +7 -2
  54. package/dist/collection/components/modal/animations/ios.enter.js +50 -4
  55. package/dist/collection/components/modal/animations/ios.leave.js +24 -2
  56. package/dist/collection/components/modal/animations/md.enter.js +52 -5
  57. package/dist/collection/components/modal/animations/md.leave.js +26 -3
  58. package/dist/collection/components/modal/animations/sheet.js +11 -2
  59. package/dist/collection/components/modal/gestures/sheet.js +79 -10
  60. package/dist/collection/components/modal/modal.ios.css +16 -0
  61. package/dist/collection/components/modal/modal.js +32 -7
  62. package/dist/collection/components/modal/modal.md.css +6 -0
  63. package/dist/collection/components/range/range.js +14 -5
  64. package/dist/collection/components/select/select.js +23 -4
  65. package/dist/collection/components/textarea/textarea.ios.css +3 -2
  66. package/dist/collection/components/textarea/textarea.md.css +7 -2
  67. package/dist/collection/components/toggle/toggle.ios.css +52 -15
  68. package/dist/collection/components/toggle/toggle.js +91 -4
  69. package/dist/collection/components/toggle/toggle.md.css +52 -15
  70. package/dist/collection/components/toolbar/toolbar.js +6 -2
  71. package/dist/collection/utils/logging/index.js +10 -3
  72. package/dist/docs.json +187 -2
  73. package/dist/esm/{data-ae11fd43.js → data-bf516e75.js} +1 -1
  74. package/dist/esm/{index-4b39521b.js → index-879a2080.js} +3 -3
  75. package/dist/esm/{index-6b548278.js → index-b4ac4019.js} +1 -1
  76. package/dist/esm/{index-9b0d46f4.js → index-ce8d38d0.js} +11 -3
  77. package/dist/esm/{index-edf58462.js → index-ec2140bf.js} +1 -1
  78. package/dist/esm/index.js +6 -6
  79. package/dist/esm/{input-shims-5e5e47e8.js → input-shims-4c3d7279.js} +4 -2
  80. package/dist/esm/{input.utils-d3717b00.js → input.utils-b4805900.js} +1 -1
  81. package/dist/esm/ion-accordion_2.entry.js +1 -1
  82. package/dist/esm/ion-action-sheet.entry.js +2 -2
  83. package/dist/esm/ion-alert.entry.js +2 -2
  84. package/dist/esm/ion-app_8.entry.js +7 -7
  85. package/dist/esm/ion-button_2.entry.js +1 -1
  86. package/dist/esm/ion-checkbox.entry.js +5 -4
  87. package/dist/esm/ion-datetime-button.entry.js +2 -2
  88. package/dist/esm/ion-datetime_3.entry.js +3 -3
  89. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  90. package/dist/esm/ion-input-password-toggle.entry.js +1 -1
  91. package/dist/esm/ion-input.entry.js +4 -4
  92. package/dist/esm/ion-item-option_3.entry.js +2 -2
  93. package/dist/esm/ion-loading.entry.js +2 -2
  94. package/dist/esm/ion-menu_3.entry.js +3 -3
  95. package/dist/esm/ion-modal.entry.js +262 -39
  96. package/dist/esm/ion-nav_2.entry.js +2 -2
  97. package/dist/esm/ion-popover.entry.js +3 -3
  98. package/dist/esm/ion-range.entry.js +14 -7
  99. package/dist/esm/ion-refresher_2.entry.js +2 -2
  100. package/dist/esm/ion-reorder_2.entry.js +2 -2
  101. package/dist/esm/ion-select-modal.entry.js +2 -2
  102. package/dist/esm/ion-select_3.entry.js +7 -6
  103. package/dist/esm/ion-textarea.entry.js +4 -4
  104. package/dist/esm/ion-toast.entry.js +2 -2
  105. package/dist/esm/ion-toggle.entry.js +38 -6
  106. package/dist/esm/ionic.js +1 -1
  107. package/dist/esm/{ios.transition-e7a4de4f.js → ios.transition-ffee637f.js} +2 -2
  108. package/dist/esm/loader.js +1 -1
  109. package/dist/esm/{md.transition-290d8802.js → md.transition-3a4f9709.js} +2 -2
  110. package/dist/esm/{overlays-4ff6e618.js → overlays-36f5880e.js} +1 -1
  111. package/dist/esm/{status-tap-ba401484.js → status-tap-2ce7841e.js} +3 -2
  112. package/dist/esm-es5/{data-ae11fd43.js → data-bf516e75.js} +1 -1
  113. package/dist/esm-es5/{index-4b39521b.js → index-879a2080.js} +1 -1
  114. package/dist/esm-es5/{index-6b548278.js → index-b4ac4019.js} +1 -1
  115. package/dist/esm-es5/index-ce8d38d0.js +4 -0
  116. package/dist/esm-es5/{index-edf58462.js → index-ec2140bf.js} +1 -1
  117. package/dist/esm-es5/index.js +1 -1
  118. package/dist/esm-es5/input-shims-4c3d7279.js +4 -0
  119. package/dist/esm-es5/{input.utils-d3717b00.js → input.utils-b4805900.js} +1 -1
  120. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  121. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  122. package/dist/esm-es5/ion-alert.entry.js +1 -1
  123. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  124. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  125. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  126. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  127. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  128. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  129. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  130. package/dist/esm-es5/ion-input.entry.js +1 -1
  131. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  132. package/dist/esm-es5/ion-loading.entry.js +1 -1
  133. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  134. package/dist/esm-es5/ion-modal.entry.js +1 -1
  135. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  136. package/dist/esm-es5/ion-popover.entry.js +1 -1
  137. package/dist/esm-es5/ion-range.entry.js +1 -1
  138. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  139. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  140. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  141. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  142. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  143. package/dist/esm-es5/ion-toast.entry.js +1 -1
  144. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  145. package/dist/esm-es5/ionic.js +1 -1
  146. package/dist/esm-es5/{ios.transition-e7a4de4f.js → ios.transition-ffee637f.js} +1 -1
  147. package/dist/esm-es5/loader.js +1 -1
  148. package/dist/esm-es5/md.transition-3a4f9709.js +4 -0
  149. package/dist/esm-es5/{overlays-4ff6e618.js → overlays-36f5880e.js} +1 -1
  150. package/dist/esm-es5/status-tap-2ce7841e.js +4 -0
  151. package/dist/html.html-data.json +24 -0
  152. package/dist/ionic/index.esm.js +1 -1
  153. package/dist/ionic/ionic.esm.js +1 -1
  154. package/dist/ionic/{p-d60342e3.js → p-03940ae5.js} +1 -1
  155. package/dist/ionic/p-0412232d.js +4 -0
  156. package/dist/ionic/{p-ebd0a280.entry.js → p-09e4bf0d.entry.js} +1 -1
  157. package/dist/ionic/{p-d7607262.system.js → p-187396b1.system.js} +1 -1
  158. package/dist/ionic/p-193d447d.system.entry.js +4 -0
  159. package/dist/ionic/p-21ee4f71.system.entry.js +4 -0
  160. package/dist/ionic/{p-f687573e.system.js → p-2c1d4963.system.js} +1 -1
  161. package/dist/ionic/{p-43df2d06.system.entry.js → p-2cb33c6c.system.entry.js} +1 -1
  162. package/dist/ionic/{p-fced06e0.entry.js → p-2cf956b8.entry.js} +1 -1
  163. package/dist/ionic/{p-d854f4bc.system.entry.js → p-323984f9.system.entry.js} +1 -1
  164. package/dist/ionic/p-38df41a6.system.js +4 -0
  165. package/dist/ionic/{p-bba0bc47.system.js → p-3a4d77b9.system.js} +1 -1
  166. package/dist/ionic/{p-d6b3e734.system.entry.js → p-3b8b35c7.system.entry.js} +1 -1
  167. package/dist/ionic/p-3c29cb9d.entry.js +4 -0
  168. package/dist/ionic/{p-cc991f05.entry.js → p-3c3d353b.entry.js} +1 -1
  169. package/dist/ionic/{p-213b12ce.system.entry.js → p-447d4981.system.entry.js} +1 -1
  170. package/dist/ionic/p-49b2653a.system.entry.js +4 -0
  171. package/dist/ionic/{p-230af7f2.js → p-4e0643a3.js} +1 -1
  172. package/dist/ionic/{p-6a183958.system.entry.js → p-57cca929.system.entry.js} +1 -1
  173. package/dist/ionic/{p-361ab803.system.entry.js → p-59884cc7.system.entry.js} +2 -2
  174. package/dist/ionic/{p-379d9002.entry.js → p-5a1017f3.entry.js} +1 -1
  175. package/dist/ionic/{p-eab9414f.entry.js → p-5bc47f96.entry.js} +1 -1
  176. package/dist/ionic/p-5bf080b2.entry.js +4 -0
  177. package/dist/ionic/{p-665f9987.entry.js → p-60f7c85d.entry.js} +1 -1
  178. package/dist/ionic/{p-733f53f8.system.js → p-6579f457.system.js} +1 -1
  179. package/dist/ionic/p-6f36e4c8.system.entry.js +4 -0
  180. package/dist/ionic/{p-ae02a7ea.system.entry.js → p-7112ab06.system.entry.js} +1 -1
  181. package/dist/ionic/p-71e1d84d.entry.js +4 -0
  182. package/dist/ionic/{p-ac2c154f.system.entry.js → p-72210f2a.system.entry.js} +1 -1
  183. package/dist/ionic/{p-0116e7d7.system.js → p-74e328cf.system.js} +1 -1
  184. package/dist/ionic/{p-5d1be985.js → p-761c42da.js} +1 -1
  185. package/dist/ionic/{p-486dc46d.system.entry.js → p-7896a440.system.entry.js} +1 -1
  186. package/dist/ionic/{p-e3be9fa8.system.entry.js → p-7d1cbf97.system.entry.js} +1 -1
  187. package/dist/ionic/p-7e70835f.js +4 -0
  188. package/dist/ionic/{p-953d9cf5.system.js → p-80d837dd.system.js} +1 -1
  189. package/dist/ionic/{p-ffb6d30e.js → p-845f8d16.js} +1 -1
  190. package/dist/ionic/{p-b533b7ab.system.entry.js → p-84fb742d.system.entry.js} +1 -1
  191. package/dist/ionic/{p-c09a2f58.system.js → p-86a9a4ca.system.js} +1 -1
  192. package/dist/ionic/p-8973b827.system.js +4 -0
  193. package/dist/ionic/{p-f6fe87c1.js → p-8a3509b8.js} +1 -1
  194. package/dist/ionic/{p-feab8373.system.entry.js → p-8c42a26f.system.entry.js} +1 -1
  195. package/dist/ionic/{p-7a9407cc.system.entry.js → p-9104d662.system.entry.js} +2 -2
  196. package/dist/ionic/{p-0793353d.system.entry.js → p-97542341.system.entry.js} +1 -1
  197. package/dist/ionic/{p-45109533.system.entry.js → p-98ce0c01.system.entry.js} +1 -1
  198. package/dist/ionic/{p-364ed29d.system.entry.js → p-9994c82e.system.entry.js} +1 -1
  199. package/dist/ionic/{p-13637707.entry.js → p-a17a1fb9.entry.js} +1 -1
  200. package/dist/ionic/p-a3e60403.js +4 -0
  201. package/dist/ionic/p-ab2f4b05.entry.js +4 -0
  202. package/dist/ionic/{p-f8ef15ba.system.entry.js → p-b6208867.system.entry.js} +1 -1
  203. package/dist/ionic/{p-ee41045b.system.entry.js → p-b6849d30.system.entry.js} +1 -1
  204. package/dist/ionic/p-ba61193a.entry.js +4 -0
  205. package/dist/ionic/{p-a69cf9ea.entry.js → p-badd3610.entry.js} +1 -1
  206. package/dist/ionic/{p-327b452e.entry.js → p-bbfa740f.entry.js} +1 -1
  207. package/dist/ionic/p-be8ecfc1.js +4 -0
  208. package/dist/ionic/p-c1ad8eb0.system.js +4 -0
  209. package/dist/ionic/{p-07d0478c.js → p-c30c10af.js} +1 -1
  210. package/dist/ionic/p-d25142f7.entry.js +4 -0
  211. package/dist/ionic/{p-17c772fb.entry.js → p-d6b60875.entry.js} +1 -1
  212. package/dist/ionic/{p-c06312bf.entry.js → p-d782ad8d.entry.js} +1 -1
  213. package/dist/ionic/{p-64bb1da1.system.js → p-d8c1ac0d.system.js} +1 -1
  214. package/dist/ionic/{p-bc148b43.system.entry.js → p-d9ef8526.system.entry.js} +1 -1
  215. package/dist/ionic/{p-a8d31cd5.entry.js → p-dd14d988.entry.js} +1 -1
  216. package/dist/ionic/{p-5e9733d0.entry.js → p-e18fc89c.entry.js} +1 -1
  217. package/dist/ionic/{p-31918ee1.entry.js → p-e2f893bd.entry.js} +1 -1
  218. package/dist/ionic/{p-830f1a37.system.entry.js → p-e56b4e0f.system.entry.js} +1 -1
  219. package/dist/ionic/p-e824ffe7.entry.js +4 -0
  220. package/dist/ionic/{p-ca5eef42.entry.js → p-ec197876.entry.js} +1 -1
  221. package/dist/ionic/p-efcb7383.entry.js +4 -0
  222. package/dist/ionic/{p-80f2a47b.entry.js → p-f4cddcd0.entry.js} +1 -1
  223. package/dist/ionic/p-f4f255cb.system.js +1 -1
  224. package/dist/ionic/{p-d785235b.system.entry.js → p-f670529f.system.entry.js} +1 -1
  225. package/dist/ionic/{p-6a649fcd.system.js → p-f6d066b4.system.js} +2 -2
  226. package/dist/ionic/{p-4429e8c5.entry.js → p-fc9149bd.entry.js} +1 -1
  227. package/dist/ionic/{p-5ae70860.js → p-fe7be7b4.js} +1 -1
  228. package/dist/types/components/checkbox/checkbox.d.ts +6 -0
  229. package/dist/types/components/modal/animations/sheet.d.ts +1 -0
  230. package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
  231. package/dist/types/components/modal/modal-interface.d.ts +1 -0
  232. package/dist/types/components/modal/modal.d.ts +11 -0
  233. package/dist/types/components/range/range.d.ts +1 -0
  234. package/dist/types/components/select/select.d.ts +6 -0
  235. package/dist/types/components/toggle/toggle.d.ts +25 -0
  236. package/dist/types/components/toolbar/toolbar.d.ts +4 -0
  237. package/dist/types/components.d.ts +48 -0
  238. package/dist/types/utils/config.d.ts +9 -0
  239. package/dist/types/utils/logging/index.d.ts +13 -1
  240. package/hydrate/index.js +346 -63
  241. package/hydrate/index.mjs +346 -63
  242. package/package.json +1 -1
  243. package/dist/esm-es5/index-9b0d46f4.js +0 -4
  244. package/dist/esm-es5/input-shims-5e5e47e8.js +0 -4
  245. package/dist/esm-es5/md.transition-290d8802.js +0 -4
  246. package/dist/esm-es5/status-tap-ba401484.js +0 -4
  247. package/dist/ionic/p-06fee233.js +0 -4
  248. package/dist/ionic/p-1b2657c9.system.entry.js +0 -4
  249. package/dist/ionic/p-4075165f.js +0 -4
  250. package/dist/ionic/p-4133f9ec.entry.js +0 -4
  251. package/dist/ionic/p-47ed8b64.entry.js +0 -4
  252. package/dist/ionic/p-8f3d6be8.entry.js +0 -4
  253. package/dist/ionic/p-9a74b1ea.entry.js +0 -4
  254. package/dist/ionic/p-9e23592d.system.js +0 -4
  255. package/dist/ionic/p-a749d4a9.entry.js +0 -4
  256. package/dist/ionic/p-acb5a6e4.entry.js +0 -4
  257. package/dist/ionic/p-b58057d4.js +0 -4
  258. package/dist/ionic/p-b5a10c8b.system.entry.js +0 -4
  259. package/dist/ionic/p-b6ee3fc7.system.entry.js +0 -4
  260. package/dist/ionic/p-c312ea08.entry.js +0 -4
  261. package/dist/ionic/p-e03cd18a.system.entry.js +0 -4
  262. package/dist/ionic/p-e03d645e.entry.js +0 -4
  263. package/dist/ionic/p-efa8edbc.system.js +0 -4
  264. package/dist/ionic/p-f1bbc785.js +0 -4
  265. package/dist/ionic/p-ff4b7e40.system.js +0 -4
@@ -91,6 +91,7 @@ export class Select {
91
91
  this.expandedIcon = undefined;
92
92
  this.shape = undefined;
93
93
  this.value = undefined;
94
+ this.required = false;
94
95
  }
95
96
  styleChanged() {
96
97
  this.emitStyle();
@@ -655,8 +656,8 @@ export class Select {
655
656
  return renderedLabel;
656
657
  }
657
658
  renderListbox() {
658
- const { disabled, inputId, isExpanded } = this;
659
- return (h("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
659
+ 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) }));
660
661
  }
661
662
  render() {
662
663
  const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
@@ -687,7 +688,7 @@ export class Select {
687
688
  * TODO(FW-5592): Remove hasStartEndSlots condition
688
689
  */
689
690
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
690
- return (h(Host, { key: 'b2dca9ae25d88e4d9fdb55003041a66be5668fcf', onClick: this.onClick, class: createColorClasses(this.color, {
691
+ return (h(Host, { key: 'f7cf03de773cd85da42978e274d65cc1eb6ed8a3', onClick: this.onClick, class: createColorClasses(this.color, {
691
692
  [mode]: true,
692
693
  'in-item': inItem,
693
694
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -703,7 +704,7 @@ export class Select {
703
704
  [`select-justify-${justify}`]: justifyEnabled,
704
705
  [`select-shape-${shape}`]: shape !== undefined,
705
706
  [`select-label-placement-${labelPlacement}`]: true,
706
- }) }, h("label", { key: 'c22fe9aee8cd448223497ef143e89529fcef8af6', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '601972df4579f4fa6a9c2c12865593e807decb72', class: "select-wrapper-inner" }, h("slot", { key: '5f7b1261862f74b978b26f026533e3fd1cc666ba', name: "start" }), h("div", { key: '39616da89f4b4b78432f6da85116a7de2ca589e7', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '1d7b3601b73af7c05b3627cfc8e5147ea379bb03', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'b0344f0ac15003e22fee66d3d7ed03a07da7e8b7', class: "select-highlight" }))));
707
+ }) }, h("label", { key: '91674f8f5cce37c87a7096d09b3f1d351cba1527', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '2229333833047db13ed2a01cb10bb6e6f774031d', class: "select-wrapper-inner" }, h("slot", { key: 'f2766bdf8bff261efa5711f72d9edef407e45189', name: "start" }), h("div", { key: '84fec020ecaaac41298a01dbffdbb2f3744170b4', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '9b91237d7a1621bce1e15546abcb4f6b74cccc5f', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'e02aea3e8f344376013257f5261a29408e62b359', class: "select-highlight" }))));
707
708
  }
708
709
  static get is() { return "ion-select"; }
709
710
  static get encapsulation() { return "shadow"; }
@@ -1069,6 +1070,24 @@ export class Select {
1069
1070
  },
1070
1071
  "attribute": "value",
1071
1072
  "reflect": false
1073
+ },
1074
+ "required": {
1075
+ "type": "boolean",
1076
+ "mutable": false,
1077
+ "complexType": {
1078
+ "original": "boolean",
1079
+ "resolved": "boolean",
1080
+ "references": {}
1081
+ },
1082
+ "required": false,
1083
+ "optional": false,
1084
+ "docs": {
1085
+ "tags": [],
1086
+ "text": "If true, screen readers will announce it as a required field. This property\nworks only for accessibility purposes, it will not prevent the form from\nsubmitting if the value is invalid."
1087
+ },
1088
+ "attribute": "required",
1089
+ "reflect": false,
1090
+ "defaultValue": "false"
1072
1091
  }
1073
1092
  };
1074
1093
  }
@@ -373,6 +373,7 @@
373
373
  justify-content: space-between;
374
374
  border-top: var(--border-width) var(--border-style) var(--border-color);
375
375
  font-size: 0.75rem;
376
+ white-space: normal;
376
377
  }
377
378
 
378
379
  /**
@@ -396,7 +397,7 @@
396
397
 
397
398
  .textarea-bottom .helper-text {
398
399
  display: block;
399
- color: var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));
400
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
400
401
  }
401
402
 
402
403
  :host(.ion-touched.ion-invalid) .textarea-bottom .error-text {
@@ -415,7 +416,7 @@
415
416
  */
416
417
  -webkit-margin-start: auto;
417
418
  margin-inline-start: auto;
418
- color: var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));
419
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
419
420
  white-space: nowrap;
420
421
  padding-inline-start: 16px;
421
422
  }
@@ -373,6 +373,7 @@
373
373
  justify-content: space-between;
374
374
  border-top: var(--border-width) var(--border-style) var(--border-color);
375
375
  font-size: 0.75rem;
376
+ white-space: normal;
376
377
  }
377
378
 
378
379
  /**
@@ -396,7 +397,7 @@
396
397
 
397
398
  .textarea-bottom .helper-text {
398
399
  display: block;
399
- color: var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));
400
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
400
401
  }
401
402
 
402
403
  :host(.ion-touched.ion-invalid) .textarea-bottom .error-text {
@@ -415,7 +416,7 @@
415
416
  */
416
417
  -webkit-margin-start: auto;
417
418
  margin-inline-start: auto;
418
- color: var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));
419
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
419
420
  white-space: nowrap;
420
421
  padding-inline-start: 16px;
421
422
  }
@@ -928,6 +929,10 @@
928
929
  --border-color: var(--highlight-color);
929
930
  }
930
931
 
932
+ /**
933
+ * The bottom content should never have
934
+ * a border with the solid style.
935
+ */
931
936
  :host(.textarea-fill-solid) .textarea-bottom {
932
937
  border-top: none;
933
938
  }
@@ -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,11 +71,14 @@ 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';
72
79
  this.justify = undefined;
73
80
  this.alignment = undefined;
81
+ this.required = false;
74
82
  }
75
83
  disabledChanged() {
76
84
  if (this.gesture) {
@@ -81,6 +89,7 @@ export class Toggle {
81
89
  const { checked, value } = this;
82
90
  const isNowChecked = !checked;
83
91
  this.checked = isNowChecked;
92
+ this.setFocus();
84
93
  this.ionChange.emit({
85
94
  checked: isNowChecked,
86
95
  value,
@@ -151,13 +160,39 @@ export class Toggle {
151
160
  get hasLabel() {
152
161
  return this.el.textContent !== '';
153
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
+ }
154
189
  render() {
155
- const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
190
+ const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
156
191
  const mode = getIonMode(this);
157
192
  const value = this.getValue();
158
193
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
159
194
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
160
- return (h(Host, { key: 'f52195ec3bc14c024647cb41319c32a4cd330e19', onClick: this.onClick, class: createColorClasses(color, {
195
+ return (h(Host, { key: 'd0c60711ea00ad36fe88766780cffaf9fc5dd538', "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, onClick: this.onClick, class: createColorClasses(color, {
161
196
  [mode]: true,
162
197
  'in-item': hostContext('ion-item', el),
163
198
  'toggle-activated': activated,
@@ -167,10 +202,10 @@ export class Toggle {
167
202
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
168
203
  [`toggle-label-placement-${labelPlacement}`]: true,
169
204
  [`toggle-${rtl}`]: true,
170
- }) }, h("label", { key: 'f8b3a215ad85b2cee611ad63449b584e1640f27f', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'f387b1ea840737a9737917e516834c887be99c09', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: '936af880db59fe377cd2de9101eb28a1c4fb8914', class: {
205
+ }) }, h("label", { key: 'ec01cb69c55748d59e325bd3272051568d46d3c9', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'beefe7f842954dd1661504f3b41b6048e8b848f7', 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: 'bbe542a0d6fe29868ff8ffba37a1e96d43ccdccb', class: {
171
206
  'label-text-wrapper': true,
172
207
  'label-text-wrapper-hidden': !this.hasLabel,
173
- }, part: "label" }, h("slot", { key: '80a6672e2e792c15011a9496dcd75363cdba31c6' })), h("div", { key: '2b2b318b38ab27b194c0dab4cecd77d9d780f2ca', class: "native-wrapper" }, this.renderToggleControl()))));
208
+ }, part: "label" }, h("slot", { key: '2c4d6ce193bba3e8cc101664cfacfdeca4c2eb01' }), this.renderHintText()), h("div", { key: 'e9a4ea4c4bb48e7bf8a58ef742b4024867e77051', class: "native-wrapper" }, this.renderToggleControl()))));
174
209
  }
175
210
  static get is() { return "ion-toggle"; }
176
211
  static get encapsulation() { return "shadow"; }
@@ -265,6 +300,40 @@ export class Toggle {
265
300
  "reflect": false,
266
301
  "defaultValue": "false"
267
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
+ },
268
337
  "value": {
269
338
  "type": "string",
270
339
  "mutable": false,
@@ -352,6 +421,24 @@ export class Toggle {
352
421
  },
353
422
  "attribute": "alignment",
354
423
  "reflect": false
424
+ },
425
+ "required": {
426
+ "type": "boolean",
427
+ "mutable": false,
428
+ "complexType": {
429
+ "original": "boolean",
430
+ "resolved": "boolean",
431
+ "references": {}
432
+ },
433
+ "required": false,
434
+ "optional": false,
435
+ "docs": {
436
+ "tags": [],
437
+ "text": "If true, screen readers will announce it as a required field. This property\nworks only for accessibility purposes, it will not prevent the form from\nsubmitting if the value is invalid."
438
+ },
439
+ "attribute": "required",
440
+ "reflect": false,
441
+ "defaultValue": "false"
355
442
  }
356
443
  };
357
444
  }
@@ -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;
@@ -12,6 +12,10 @@ import { getIonMode } from "../../global/ionic-global";
12
12
  * @slot secondary - Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode.
13
13
  * @slot primary - Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode.
14
14
  * @slot end - Content is placed to the right of the toolbar text in LTR, and to the left in RTL.
15
+ *
16
+ * @part background - The background of the toolbar, covering the entire area behind the toolbar content.
17
+ * @part container - The container that wraps all toolbar content, including the default slot and named slot content.
18
+ * @part content - The container for the default slot, wrapping content provided without a named slot.
15
19
  */
16
20
  export class Toolbar {
17
21
  constructor() {
@@ -62,10 +66,10 @@ export class Toolbar {
62
66
  this.childrenStyles.forEach((value) => {
63
67
  Object.assign(childStyles, value);
64
68
  });
65
- return (h(Host, { key: '462538a5ecd01baf3cde116c9f029aeda26c81be', class: Object.assign(Object.assign({}, childStyles), createColorClasses(this.color, {
69
+ return (h(Host, { key: '4fdc9ae82a93237cc28ceb95b0ebd8069b62839d', class: Object.assign(Object.assign({}, childStyles), createColorClasses(this.color, {
66
70
  [mode]: true,
67
71
  'in-toolbar': hostContext('ion-toolbar', this.el),
68
- })) }, h("div", { key: 'c0b4415d3b2472de643a9be7cb3b13b3b628621b', class: "toolbar-background" }), h("div", { key: '0ccb8a2dbeaa28d8f9bed87629c0c097446690c2', class: "toolbar-container" }, h("slot", { key: '3e726dac359e923df21d80301651f16063a3de20', name: "start" }), h("slot", { key: 'cd799330b56a7f8833bc61bb2807aafb21846f71', name: "secondary" }), h("div", { key: '395282e6ac8c53576922dcdb5f08c25d34638c86', class: "toolbar-content" }, h("slot", { key: 'a437c60e4ba5aae65e55169ae82a6f379868ec1d' })), h("slot", { key: '711af9b9d321a7b31ede924c9bdcad767aa9a1ca', name: "primary" }), h("slot", { key: 'ecc02edeaf80a837890bcb08d5096df1e22a0b9a', name: "end" }))));
72
+ })) }, h("div", { key: '443a216362bbbf1c149ed12140d52b0f0ea2d664', class: "toolbar-background", part: "background" }), h("div", { key: '1df87f4027d605e42757a13d4828df45b90a4fdc', class: "toolbar-container", part: "container" }, h("slot", { key: 'f66f34972be8e3f4915b9c6f5808600dbaedb1ea', name: "start" }), h("slot", { key: '14f38b0975e956f404c4eb3ee56f2055c6615276', name: "secondary" }), h("div", { key: '75ba5953a25c7544793484d2b245792cb0a5af75', class: "toolbar-content", part: "content" }, h("slot", { key: '149dfa58ff7106f318fecb4134e7c69edf8bc231' })), h("slot", { key: '807ab9ad21d7f1d9d427a4086460bcb9e5e8c019', name: "primary" }), h("slot", { key: 'bd2f9da95d2fa8e74dc6e0666587ceecbba99d9f', name: "end" }))));
69
73
  }
70
74
  static get is() { return "ion-toolbar"; }
71
75
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
+ import { config } from "../../global/config";
4
5
  /**
5
6
  * Logs a warning to the console with an Ionic prefix
6
7
  * to indicate the library that is warning the developer.
@@ -8,9 +9,12 @@
8
9
  * @param message - The string message to be logged to the console.
9
10
  */
10
11
  export const printIonWarning = (message, ...params) => {
11
- return console.warn(`[Ionic Warning]: ${message}`, ...params);
12
+ const logLevel = config.get('logLevel', "WARN" /* LogLevel.WARN */);
13
+ if (["WARN" /* LogLevel.WARN */].includes(logLevel)) {
14
+ return console.warn(`[Ionic Warning]: ${message}`, ...params);
15
+ }
12
16
  };
13
- /*
17
+ /**
14
18
  * Logs an error to the console with an Ionic prefix
15
19
  * to indicate the library that is warning the developer.
16
20
  *
@@ -18,7 +22,10 @@ export const printIonWarning = (message, ...params) => {
18
22
  * @param params - Additional arguments to supply to the console.error.
19
23
  */
20
24
  export const printIonError = (message, ...params) => {
21
- return console.error(`[Ionic Error]: ${message}`, ...params);
25
+ const logLevel = config.get('logLevel', "ERROR" /* LogLevel.ERROR */);
26
+ if (["ERROR" /* LogLevel.ERROR */, "WARN" /* LogLevel.WARN */].includes(logLevel)) {
27
+ return console.error(`[Ionic Error]: ${message}`, ...params);
28
+ }
22
29
  };
23
30
  /**
24
31
  * Prints an error informing developers that an implementation requires an element to be used