@sparkle-learning/core 0.0.39 → 0.0.42

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 (267) hide show
  1. package/dist/cjs/{auth.service-4b584cd7.js → PrivateRoute-074c584e.js} +30 -0
  2. package/dist/cjs/{sparkle-export-lessons_6.cjs.entry.js → header-mobile-collapse_61.cjs.entry.js} +11602 -2716
  3. package/dist/cjs/{icons-c61db785.js → icons-fda820af.js} +0 -0
  4. package/dist/cjs/index.cjs.js +5 -6
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/sparkle-code.cjs.entry.js +1 -1
  7. package/dist/cjs/sparkle-core.cjs.js +1 -1
  8. package/dist/cjs/sparkle-feedback.cjs.entry.js +1 -2
  9. package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +1 -1
  10. package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +117 -0
  11. package/dist/cjs/sparkle-quiz.cjs.entry.js +120 -0
  12. package/dist/cjs/student.service-2e58f237.js +78 -0
  13. package/dist/esm/{auth.service-9fb86455.js → PrivateRoute-c5441f35.js} +33 -4
  14. package/dist/esm/{animation-e0716b39.js → animation-12377cb3.js} +1 -1
  15. package/dist/esm/{auth.store-633e8414.js → auth.store-dba2c2da.js} +1 -1
  16. package/dist/esm/{facilitator.service-8fd435bf.js → facilitator.service-b0292f7f.js} +2 -2
  17. package/dist/esm/{feed.service-ace049e5.js → feed.service-8fbe4ce3.js} +3 -3
  18. package/dist/esm/{framework-delegate-e4f8013b.js → framework-delegate-3e634a5c.js} +1 -1
  19. package/dist/esm/{sparkle-export-lessons_6.entry.js → header-mobile-collapse_61.entry.js} +11501 -2670
  20. package/dist/esm/{helpers-03073fe4.js → helpers-bf0e23d6.js} +1 -1
  21. package/dist/esm/{httpService-61864992.js → httpService-7b75b095.js} +2 -2
  22. package/dist/esm/{icons-90b957ab.js → icons-1c794c74.js} +1 -1
  23. package/dist/esm/{index-b4b4e503.js → index-2b84cad2.js} +3 -3
  24. package/dist/esm/{index-a2d2941d.js → index-45fec1e7.js} +1 -1
  25. package/dist/esm/{index-37004831.js → index-5e8971ae.js} +1 -1
  26. package/dist/esm/{index-dedabca0.js → index-cded2d87.js} +2 -2
  27. package/dist/esm/{index.es-283fbd2e.js → index.es-e0c0f891.js} +1 -1
  28. package/dist/esm/index.js +5 -6
  29. package/dist/esm/{input-shims-cc3720a0.js → input-shims-671d8d9f.js} +2 -2
  30. package/dist/esm/ion-accordion.entry.js +1 -1
  31. package/dist/esm/ion-action-sheet_4.entry.js +5 -5
  32. package/dist/esm/ion-app.entry.js +3 -3
  33. package/dist/esm/ion-back-button.entry.js +1 -1
  34. package/dist/esm/ion-breadcrumb.entry.js +1 -1
  35. package/dist/esm/ion-content_2.entry.js +2 -2
  36. package/dist/esm/ion-datetime-button.entry.js +1 -1
  37. package/dist/esm/ion-datetime.entry.js +1 -1
  38. package/dist/esm/ion-fab-button.entry.js +1 -1
  39. package/dist/esm/ion-footer.entry.js +2 -2
  40. package/dist/esm/ion-img.entry.js +1 -1
  41. package/dist/esm/ion-infinite-scroll.entry.js +2 -2
  42. package/dist/esm/ion-item-options.entry.js +1 -1
  43. package/dist/esm/ion-item-sliding.entry.js +2 -2
  44. package/dist/esm/ion-loading.entry.js +3 -3
  45. package/dist/esm/ion-menu-button.entry.js +4 -4
  46. package/dist/esm/ion-menu-toggle.entry.js +4 -4
  47. package/dist/esm/ion-menu.entry.js +4 -4
  48. package/dist/esm/ion-modal.entry.js +6 -6
  49. package/dist/esm/ion-nav.entry.js +4 -4
  50. package/dist/esm/ion-picker-column-internal_2.entry.js +1 -1
  51. package/dist/esm/ion-picker-column.entry.js +1 -1
  52. package/dist/esm/ion-picker.entry.js +3 -3
  53. package/dist/esm/ion-progress-bar.entry.js +1 -1
  54. package/dist/esm/ion-refresher.entry.js +3 -3
  55. package/dist/esm/ion-reorder-group.entry.js +2 -2
  56. package/dist/esm/ion-router-outlet.entry.js +4 -4
  57. package/dist/esm/ion-router.entry.js +1 -1
  58. package/dist/esm/ion-searchbar.entry.js +1 -1
  59. package/dist/esm/ion-segment-button.entry.js +1 -1
  60. package/dist/esm/ion-segment.entry.js +1 -1
  61. package/dist/esm/ion-select_2.entry.js +2 -2
  62. package/dist/esm/ion-slides.entry.js +1 -1
  63. package/dist/esm/ion-tab.entry.js +2 -2
  64. package/dist/esm/ion-textarea.entry.js +1 -1
  65. package/dist/esm/ion-toast.entry.js +3 -3
  66. package/dist/esm/ion-toggle.entry.js +1 -1
  67. package/dist/esm/ion-virtual-scroll.entry.js +1 -1
  68. package/dist/esm/{ios.transition-3a6179bb.js → ios.transition-131d64fe.js} +3 -3
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/{md.transition-cff16bf3.js → md.transition-f6126011.js} +3 -3
  71. package/dist/esm/{menu-toggle-util-59241733.js → menu-toggle-util-bace8ae6.js} +1 -1
  72. package/dist/esm/{overlays-bdd9344a.js → overlays-3b4dca92.js} +2 -2
  73. package/dist/esm/{purify-7085b248.js → purify-85bfcc69.js} +1 -1
  74. package/dist/esm/sparkle-animation-player.entry.js +1 -1
  75. package/dist/esm/sparkle-code.entry.js +1 -1
  76. package/dist/esm/sparkle-core.js +1 -1
  77. package/dist/esm/sparkle-facilitator-notes-form.entry.js +5 -5
  78. package/dist/esm/sparkle-feed-post.entry.js +1 -1
  79. package/dist/esm/sparkle-feedback.entry.js +5 -6
  80. package/dist/esm/sparkle-goal-form.entry.js +6 -6
  81. package/dist/esm/sparkle-menu-collapsible.entry.js +1 -1
  82. package/dist/esm/sparkle-quiz-feedback_5.entry.js +109 -0
  83. package/dist/esm/sparkle-quiz.entry.js +116 -0
  84. package/dist/esm/{status-tap-463d0f87.js → status-tap-dde52787.js} +2 -2
  85. package/dist/esm/{student.service-e6eb1f99.js → student.service-0746418b.js} +19 -3
  86. package/dist/esm/{swipe-back-f8765ac9.js → swipe-back-7847a0c1.js} +1 -1
  87. package/dist/esm/{util-a831d09d.js → util-6ef753e9.js} +1 -1
  88. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/button/button.css +49 -0
  89. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/card/card.css +208 -0
  90. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/cards.css +31 -0
  91. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/code/code.css +245 -0
  92. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/dropdown/dropdown.css +115 -0
  93. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header-mobile-collapse/header-mobile-collapse.css +255 -0
  94. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header.css +232 -0
  95. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/collapsible/collapsible.css +3 -0
  96. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu-toggle/menu-toggle.css +25 -0
  97. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu.css +71 -0
  98. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/nav/nav.css +194 -0
  99. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/notfound-page/notfound-page.css +4 -0
  100. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/overlay/overlay.css +67 -0
  101. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/page-footer/page-footer.css +18 -0
  102. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/pagination/pagination.css +89 -0
  103. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/select/select.css +52 -0
  104. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sidebar/sidebar.css +98 -0
  105. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sparkle-lower-content-nav/sparkle-lower-content-nav.css +8 -0
  106. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/table-of-contents/table-of-contents.css +37 -0
  107. package/dist/node_modules/@sparkle-learning/components/dist/collection/components/tabs/tabs.css +64 -0
  108. package/dist/sparkle-core/index.esm.js +1 -1
  109. package/dist/sparkle-core/{p-539bf742.js → p-00d10dc9.js} +2 -2
  110. package/dist/sparkle-core/{p-b9933822.js → p-05c032dd.js} +1 -1
  111. package/dist/sparkle-core/{p-dabc80c4.entry.js → p-0664370b.entry.js} +1 -1
  112. package/dist/sparkle-core/p-077c732b.js +4 -0
  113. package/dist/sparkle-core/{p-c278db5f.entry.js → p-0ad5c123.entry.js} +1 -1
  114. package/dist/sparkle-core/{p-b9b1d4da.entry.js → p-0afa3a4d.entry.js} +1 -1
  115. package/dist/sparkle-core/{p-285ab4ed.entry.js → p-0c3f3ea6.entry.js} +1 -1
  116. package/dist/sparkle-core/{p-727e1c28.entry.js → p-0f1c5899.entry.js} +1 -1
  117. package/dist/sparkle-core/{p-64e814b9.entry.js → p-11356b03.entry.js} +1 -1
  118. package/dist/sparkle-core/{p-b5ec8fb0.entry.js → p-11a6c175.entry.js} +1 -1
  119. package/dist/sparkle-core/p-12dd96d7.js +4 -0
  120. package/dist/sparkle-core/{p-a85598ad.js → p-1d4c7c11.js} +1 -1
  121. package/dist/sparkle-core/{p-c8fe45df.entry.js → p-1e125ca5.entry.js} +1 -1
  122. package/dist/sparkle-core/{p-cab3da3c.entry.js → p-1e4f65ee.entry.js} +1 -1
  123. package/dist/sparkle-core/{p-405f7c58.js → p-2033cd86.js} +2 -2
  124. package/dist/sparkle-core/p-23aca7ca.js +4 -0
  125. package/dist/sparkle-core/{p-e65c72cc.entry.js → p-24cb9a33.entry.js} +1 -1
  126. package/dist/sparkle-core/{p-014b5707.entry.js → p-2c1ca854.entry.js} +1 -1
  127. package/dist/sparkle-core/{p-340754ed.js → p-2f569553.js} +1 -1
  128. package/dist/sparkle-core/{p-2e2b813c.js → p-2ff67662.js} +2 -2
  129. package/dist/sparkle-core/{p-0c0f8acd.entry.js → p-30b810d1.entry.js} +1 -1
  130. package/dist/sparkle-core/{p-b236d258.entry.js → p-377b04c2.entry.js} +1 -1
  131. package/dist/sparkle-core/{p-fde382f0.entry.js → p-39712c56.entry.js} +1 -1
  132. package/dist/sparkle-core/{p-be28346b.js → p-3de0e00c.js} +1 -1
  133. package/dist/sparkle-core/p-462bffba.js +1 -0
  134. package/dist/sparkle-core/{p-3f85e1ca.js → p-48f72e63.js} +2 -2
  135. package/dist/sparkle-core/{p-6f0545b3.entry.js → p-54dd894f.entry.js} +1 -1
  136. package/dist/sparkle-core/{p-ce94efdb.entry.js → p-564e64fc.entry.js} +1 -1
  137. package/dist/sparkle-core/{p-db8387eb.entry.js → p-58e4bbe5.entry.js} +1 -1
  138. package/dist/sparkle-core/{p-ca4c8a10.js → p-5cad23f1.js} +1 -1
  139. package/dist/sparkle-core/p-5efc6566.js +1 -0
  140. package/dist/sparkle-core/{p-c9cd4ff1.js → p-600cf6a3.js} +1 -1
  141. package/dist/sparkle-core/{p-2e035338.entry.js → p-641bfc92.entry.js} +1 -1
  142. package/dist/sparkle-core/{p-b4bc8b02.entry.js → p-6faa194c.entry.js} +1 -1
  143. package/dist/sparkle-core/{p-2f10208d.entry.js → p-6ffd2420.entry.js} +1 -1
  144. package/dist/sparkle-core/p-73721c84.js +4 -0
  145. package/dist/sparkle-core/{p-ed9f48c4.entry.js → p-74864276.entry.js} +1 -1
  146. package/dist/sparkle-core/p-80d6b0e6.entry.js +1 -0
  147. package/dist/sparkle-core/p-8492a765.entry.js +1 -0
  148. package/dist/sparkle-core/{p-a019ad0c.js → p-86ed13f0.js} +1 -1
  149. package/dist/sparkle-core/{p-4ae75caa.entry.js → p-894ff7e6.entry.js} +1 -1
  150. package/dist/sparkle-core/{p-5519d283.entry.js → p-9289cdbc.entry.js} +1 -1
  151. package/dist/sparkle-core/{p-4bd4dab2.js → p-935e7cfc.js} +1 -1
  152. package/dist/sparkle-core/{p-25e556cc.entry.js → p-957715c5.entry.js} +1 -1
  153. package/dist/sparkle-core/{p-b4b01fa2.entry.js → p-9abbd715.entry.js} +1 -1
  154. package/dist/sparkle-core/{p-e7568d4b.js → p-9d894ed4.js} +1 -1
  155. package/dist/sparkle-core/{p-4320dac0.entry.js → p-9ebf0537.entry.js} +1 -1
  156. package/dist/sparkle-core/p-a49ab4e8.entry.js +1 -0
  157. package/dist/sparkle-core/{p-93e74f1b.entry.js → p-af3cc111.entry.js} +1 -1
  158. package/dist/sparkle-core/{p-5fc26938.js → p-b0603d19.js} +1 -1
  159. package/dist/sparkle-core/{p-317037de.entry.js → p-b3f375fb.entry.js} +1 -1
  160. package/dist/sparkle-core/p-b4408842.entry.js +352 -0
  161. package/dist/sparkle-core/{p-2fba9a3a.entry.js → p-b5f3e1bf.entry.js} +1 -1
  162. package/dist/sparkle-core/{p-82ad4e7c.entry.js → p-b96f3c84.entry.js} +2 -2
  163. package/dist/sparkle-core/{p-ad102371.js → p-bd80ff43.js} +1 -1
  164. package/dist/sparkle-core/{p-f0cf4a8f.entry.js → p-be64105c.entry.js} +1 -1
  165. package/dist/sparkle-core/{p-f4b0b6a4.entry.js → p-c0533c23.entry.js} +1 -1
  166. package/dist/sparkle-core/p-c3cadfc6.entry.js +1 -0
  167. package/dist/sparkle-core/{p-2d4a5ddf.entry.js → p-c60b29bd.entry.js} +2 -2
  168. package/dist/sparkle-core/{p-56a2e8a2.js → p-cabe9139.js} +1 -1
  169. package/dist/sparkle-core/{p-0bb0cf41.entry.js → p-cabfbf22.entry.js} +1 -1
  170. package/dist/sparkle-core/{p-66a85393.entry.js → p-ce4b22f7.entry.js} +1 -1
  171. package/dist/sparkle-core/{p-17eb4633.js → p-d68092b7.js} +1 -1
  172. package/dist/sparkle-core/{p-0ea2518d.entry.js → p-de4deb61.entry.js} +1 -1
  173. package/dist/sparkle-core/{p-1f0b3ff9.entry.js → p-e686d8b5.entry.js} +1 -1
  174. package/dist/sparkle-core/{p-08d97c59.entry.js → p-e77d982d.entry.js} +1 -1
  175. package/dist/sparkle-core/{p-44f813b7.entry.js → p-e863bf1d.entry.js} +1 -1
  176. package/dist/sparkle-core/{p-63f69cdc.entry.js → p-ebd4354b.entry.js} +1 -1
  177. package/dist/sparkle-core/{p-fc965b88.entry.js → p-ef4edc48.entry.js} +1 -1
  178. package/dist/sparkle-core/{p-c2bbaf55.entry.js → p-fb0ca75e.entry.js} +1 -1
  179. package/dist/sparkle-core/{p-b83444c7.entry.js → p-fb757951.entry.js} +1 -1
  180. package/dist/sparkle-core/{p-d81a0680.js → p-fbccd30c.js} +1 -1
  181. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  182. package/package.json +2 -2
  183. package/dist/cjs/PrivateRoute-4abc9d29.js +0 -35
  184. package/dist/cjs/dom-utils-b8befdd5.js +0 -63
  185. package/dist/cjs/header-mobile-collapse.cjs.entry.js +0 -90
  186. package/dist/cjs/index-70e63f5b.js +0 -3071
  187. package/dist/cjs/injectHistory-7206bbb9.js +0 -9
  188. package/dist/cjs/ion-avatar.cjs.entry.js +0 -25
  189. package/dist/cjs/ion-button.cjs.entry.js +0 -129
  190. package/dist/cjs/ion-card_2.cjs.entry.js +0 -91
  191. package/dist/cjs/ion-checkbox_4.cjs.entry.js +0 -360
  192. package/dist/cjs/ion-col_3.cjs.entry.js +0 -159
  193. package/dist/cjs/ion-icon_13.cjs.entry.js +0 -1505
  194. package/dist/cjs/ion-input_2.cjs.entry.js +0 -313
  195. package/dist/cjs/ion-label_2.cjs.entry.js +0 -126
  196. package/dist/cjs/ion-spinner.cjs.entry.js +0 -64
  197. package/dist/cjs/match-path-84c9f7ca.js +0 -511
  198. package/dist/cjs/sparkle-card_3.cjs.entry.js +0 -91
  199. package/dist/cjs/sparkle-course-root.cjs.entry.js +0 -146
  200. package/dist/cjs/sparkle-dropdown.cjs.entry.js +0 -61
  201. package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +0 -2130
  202. package/dist/cjs/sparkle-goal-progress.cjs.entry.js +0 -19
  203. package/dist/cjs/sparkle-gww-item.cjs.entry.js +0 -74
  204. package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +0 -236
  205. package/dist/cjs/sparkle-validation-error.cjs.entry.js +0 -21
  206. package/dist/cjs/stencil-router-redirect.cjs.entry.js +0 -32
  207. package/dist/cjs/student.service-d48f1c99.js +0 -61
  208. package/dist/cjs/user.store-8a049c4e.js +0 -21
  209. package/dist/esm/PrivateRoute-7b526801.js +0 -33
  210. package/dist/esm/dom-utils-109a7d75.js +0 -55
  211. package/dist/esm/header-mobile-collapse.entry.js +0 -86
  212. package/dist/esm/index-f9b9ba5d.js +0 -3067
  213. package/dist/esm/injectHistory-968f626d.js +0 -7
  214. package/dist/esm/ion-avatar.entry.js +0 -21
  215. package/dist/esm/ion-button.entry.js +0 -125
  216. package/dist/esm/ion-card_2.entry.js +0 -86
  217. package/dist/esm/ion-checkbox_4.entry.js +0 -353
  218. package/dist/esm/ion-col_3.entry.js +0 -153
  219. package/dist/esm/ion-icon_13.entry.js +0 -1489
  220. package/dist/esm/ion-input_2.entry.js +0 -308
  221. package/dist/esm/ion-label_2.entry.js +0 -121
  222. package/dist/esm/ion-spinner.entry.js +0 -60
  223. package/dist/esm/match-path-36fdf5c7.js +0 -499
  224. package/dist/esm/sparkle-card_3.entry.js +0 -85
  225. package/dist/esm/sparkle-course-root.entry.js +0 -142
  226. package/dist/esm/sparkle-dropdown.entry.js +0 -57
  227. package/dist/esm/sparkle-facilitator-header_19.entry.js +0 -2108
  228. package/dist/esm/sparkle-goal-progress.entry.js +0 -15
  229. package/dist/esm/sparkle-gww-item.entry.js +0 -70
  230. package/dist/esm/sparkle-menu-toggle_3.entry.js +0 -230
  231. package/dist/esm/sparkle-validation-error.entry.js +0 -17
  232. package/dist/esm/stencil-router-redirect.entry.js +0 -28
  233. package/dist/esm/user.store-b8645067.js +0 -19
  234. package/dist/sparkle-core/p-03585916.js +0 -1
  235. package/dist/sparkle-core/p-1019ebc3.js +0 -1
  236. package/dist/sparkle-core/p-1728ead7.js +0 -1
  237. package/dist/sparkle-core/p-32762a44.entry.js +0 -1
  238. package/dist/sparkle-core/p-3bc68dd0.js +0 -1
  239. package/dist/sparkle-core/p-3c133235.entry.js +0 -1
  240. package/dist/sparkle-core/p-46869031.entry.js +0 -1
  241. package/dist/sparkle-core/p-4a5f2b2b.js +0 -1
  242. package/dist/sparkle-core/p-53bcbd1d.js +0 -1
  243. package/dist/sparkle-core/p-54ada5e3.entry.js +0 -1
  244. package/dist/sparkle-core/p-554da5b8.entry.js +0 -1
  245. package/dist/sparkle-core/p-5da2d95a.entry.js +0 -1
  246. package/dist/sparkle-core/p-6b05a1d3.entry.js +0 -1
  247. package/dist/sparkle-core/p-6ea246fe.js +0 -4
  248. package/dist/sparkle-core/p-6ed0236e.entry.js +0 -1
  249. package/dist/sparkle-core/p-7f25366a.entry.js +0 -1
  250. package/dist/sparkle-core/p-91accfc1.js +0 -1
  251. package/dist/sparkle-core/p-a5c5da9a.entry.js +0 -1
  252. package/dist/sparkle-core/p-a8a77bec.entry.js +0 -1
  253. package/dist/sparkle-core/p-c4af184b.entry.js +0 -1
  254. package/dist/sparkle-core/p-c71cbbf7.entry.js +0 -1
  255. package/dist/sparkle-core/p-c8c73fa7.js +0 -4
  256. package/dist/sparkle-core/p-cd832fbf.entry.js +0 -1
  257. package/dist/sparkle-core/p-d0ac5f17.js +0 -1
  258. package/dist/sparkle-core/p-d1fcbfc2.js +0 -4
  259. package/dist/sparkle-core/p-d432d3ac.entry.js +0 -1
  260. package/dist/sparkle-core/p-d969f7d0.entry.js +0 -348
  261. package/dist/sparkle-core/p-dca90a55.entry.js +0 -4
  262. package/dist/sparkle-core/p-dd2e7f84.js +0 -4
  263. package/dist/sparkle-core/p-e0429a19.entry.js +0 -1
  264. package/dist/sparkle-core/p-e7066c64.entry.js +0 -1
  265. package/dist/sparkle-core/p-eb40a191.entry.js +0 -1
  266. package/dist/sparkle-core/p-ecdea569.entry.js +0 -1
  267. package/dist/sparkle-core/p-ef6c2352.entry.js +0 -1
@@ -1,7 +0,0 @@
1
- import { A as ActiveRouter } from './active-router-fc9e4e06.js';
2
-
3
- function injectHistory(Component) {
4
- ActiveRouter.injectProps(Component, ['history', 'location']);
5
- }
6
-
7
- export { injectHistory as i };
@@ -1,21 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-c04b9ed5.js';
2
- import { g as getIonMode } from './ionic-global-4903e23e.js';
3
-
4
- const avatarIosCss = ":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:48px;height:48px}";
5
-
6
- const avatarMdCss = ":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:64px;height:64px}";
7
-
8
- const Avatar = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- }
12
- render() {
13
- return (h(Host, { class: getIonMode(this) }, h("slot", null)));
14
- }
15
- };
16
- Avatar.style = {
17
- ios: avatarIosCss,
18
- md: avatarMdCss
19
- };
20
-
21
- export { Avatar as ion_avatar };
@@ -1,125 +0,0 @@
1
- import { r as registerInstance, i as createEvent, h, H as Host, e as getElement } from './index-c04b9ed5.js';
2
- import { g as getIonMode } from './ionic-global-4903e23e.js';
3
- import { q as hasShadowDom, i as inheritAriaAttributes } from './helpers-03073fe4.js';
4
- import { o as openURL, c as createColorClasses, h as hostContext } from './theme-7ef00c83.js';
5
-
6
- const buttonIosCss = ":host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #3880ff);--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;display:block;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;display:block;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;box-sizing:border-box;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::-moz-focus-inner{border:0}.button-inner{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted(ion-icon){font-size:1.4em;pointer-events:none}::slotted(ion-icon[slot=start]){margin-left:-0.3em;margin-right:0.3em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}::slotted(ion-icon[slot=end]){margin-left:0.3em;margin-right:-0.2em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em}}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:10px;--padding-top:0;--padding-bottom:0;--padding-start:1em;--padding-end:1em;--transition:background-color, opacity 100ms linear;margin-left:2px;margin-right:2px;margin-top:4px;margin-bottom:4px;height:2.8em;font-size:16px;font-weight:500;letter-spacing:-0.03em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.button-solid){--background-activated:var(--ion-color-primary-shade, #3171e0);--background-focused:var(--ion-color-primary-shade, #3171e0);--background-hover:var(--ion-color-primary-tint, #4c8dff);--background-activated-opacity:1;--background-focused-opacity:1;--background-hover-opacity:1}:host(.button-outline){--border-radius:10px;--border-width:1px;--border-style:solid;--background-activated:var(--ion-color-primary, #3880ff);--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;--color-activated:var(--ion-color-primary-contrast, #fff)}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;font-size:17px;font-weight:normal;letter-spacing:0}:host(.button-large){--border-radius:12px;--padding-top:0;--padding-start:1em;--padding-end:1em;--padding-bottom:0;height:2.8em;font-size:20px}:host(.button-small){--border-radius:6px;--padding-top:0;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:0;height:2.1em;font-size:13px}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-strong){font-weight:600}:host(.button-clear.ion-activated){opacity:0.4}:host(.button-outline.ion-activated.ion-color) .button-native{color:var(--ion-color-contrast)}:host(.button-outline.ion-activated.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-activated) .button-native::after{background:var(--ion-color-shade)}:host(.button-outline.ion-focused.ion-color) .button-native,:host(.button-clear.ion-focused.ion-color) .button-native{color:var(--ion-color-base)}:host(.button-outline.ion-focused.ion-color) .button-native::after,:host(.button-clear.ion-focused.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-shade)}@media (any-hover: hover){:host(.button-clear:hover),:host(.button-outline:hover){opacity:0.6}:host(.button-clear.ion-color:hover) .button-native,:host(.button-outline.ion-color:hover) .button-native{color:var(--ion-color-base)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:transparent}:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-tint)}:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native::after{background:#fff;opacity:0.1}}";
7
-
8
- const buttonMdCss = ":host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #3880ff);--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;display:block;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;display:block;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;box-sizing:border-box;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::-moz-focus-inner{border:0}.button-inner{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted(ion-icon){font-size:1.4em;pointer-events:none}::slotted(ion-icon[slot=start]){margin-left:-0.3em;margin-right:0.3em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}::slotted(ion-icon[slot=end]){margin-left:0.3em;margin-right:-0.2em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em}}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:4px;--padding-top:0;--padding-bottom:0;--padding-start:1.1em;--padding-end:1.1em;--transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),\n background-color 15ms linear,\n color 15ms linear;margin-left:2px;margin-right:2px;margin-top:4px;margin-bottom:4px;height:36px;font-size:14px;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.button-solid){--background-activated:transparent;--background-hover:var(--ion-color-primary-contrast, #fff);--background-focused:var(--ion-color-primary-contrast, #fff);--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}:host(.button-solid.ion-activated){--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)}:host(.button-outline){--border-width:2px;--border-style:solid;--box-shadow:none;--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:var(--ion-color-primary, #3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-outline.ion-activated.ion-color) .button-native{background:transparent}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:var(--ion-color-primary, #3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-large){--padding-top:0;--padding-start:1em;--padding-end:1em;--padding-bottom:0;height:2.8em;font-size:20px}:host(.button-small){--padding-top:0;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:0;height:2.1em;font-size:13px}:host(.button-strong){font-weight:bold}::slotted(ion-icon[slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color.ion-focused) .button-native::after,:host(.button-outline.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}";
9
-
10
- const Button = class {
11
- constructor(hostRef) {
12
- registerInstance(this, hostRef);
13
- this.ionFocus = createEvent(this, "ionFocus", 7);
14
- this.ionBlur = createEvent(this, "ionBlur", 7);
15
- this.inItem = false;
16
- this.inListHeader = false;
17
- this.inToolbar = false;
18
- this.inheritedAttributes = {};
19
- /**
20
- * The type of button.
21
- */
22
- this.buttonType = 'button';
23
- /**
24
- * If `true`, the user cannot interact with the button.
25
- */
26
- this.disabled = false;
27
- /**
28
- * When using a router, it specifies the transition direction when navigating to
29
- * another page using `href`.
30
- */
31
- this.routerDirection = 'forward';
32
- /**
33
- * If `true`, activates a button with a heavier font weight.
34
- */
35
- this.strong = false;
36
- /**
37
- * The type of the button.
38
- */
39
- this.type = 'button';
40
- this.handleClick = (ev) => {
41
- if (this.type === 'button') {
42
- openURL(this.href, ev, this.routerDirection, this.routerAnimation);
43
- }
44
- else if (hasShadowDom(this.el)) {
45
- // this button wants to specifically submit a form
46
- // climb up the dom to see if we're in a <form>
47
- // and if so, then use JS to submit it
48
- const form = this.el.closest('form');
49
- if (form) {
50
- ev.preventDefault();
51
- const fakeButton = document.createElement('button');
52
- fakeButton.type = this.type;
53
- fakeButton.style.display = 'none';
54
- form.appendChild(fakeButton);
55
- fakeButton.click();
56
- fakeButton.remove();
57
- }
58
- }
59
- };
60
- this.onFocus = () => {
61
- this.ionFocus.emit();
62
- };
63
- this.onBlur = () => {
64
- this.ionBlur.emit();
65
- };
66
- }
67
- componentWillLoad() {
68
- this.inToolbar = !!this.el.closest('ion-buttons');
69
- this.inListHeader = !!this.el.closest('ion-list-header');
70
- this.inItem = !!this.el.closest('ion-item') || !!this.el.closest('ion-item-divider');
71
- this.inheritedAttributes = inheritAriaAttributes(this.el);
72
- }
73
- get hasIconOnly() {
74
- return !!this.el.querySelector('[slot="icon-only"]');
75
- }
76
- get rippleType() {
77
- const hasClearFill = this.fill === undefined || this.fill === 'clear';
78
- // If the button is in a toolbar, has a clear fill (which is the default)
79
- // and only has an icon we use the unbounded "circular" ripple effect
80
- if (hasClearFill && this.hasIconOnly && this.inToolbar) {
81
- return 'unbounded';
82
- }
83
- return 'bounded';
84
- }
85
- render() {
86
- const mode = getIonMode(this);
87
- const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong, inheritedAttributes, } = this;
88
- const finalSize = size === undefined && this.inItem ? 'small' : size;
89
- const TagType = href === undefined ? 'button' : 'a';
90
- const attrs = TagType === 'button'
91
- ? { type }
92
- : {
93
- download: this.download,
94
- href,
95
- rel,
96
- target,
97
- };
98
- let fill = this.fill;
99
- if (fill === undefined) {
100
- fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
101
- }
102
- return (h(Host, { onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses(color, {
103
- [mode]: true,
104
- [buttonType]: true,
105
- [`${buttonType}-${expand}`]: expand !== undefined,
106
- [`${buttonType}-${finalSize}`]: finalSize !== undefined,
107
- [`${buttonType}-${shape}`]: shape !== undefined,
108
- [`${buttonType}-${fill}`]: true,
109
- [`${buttonType}-strong`]: strong,
110
- 'in-toolbar': hostContext('ion-toolbar', this.el),
111
- 'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
112
- 'button-has-icon-only': hasIconOnly,
113
- 'button-disabled': disabled,
114
- 'ion-activatable': true,
115
- 'ion-focusable': true,
116
- }) }, h(TagType, Object.assign({}, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), h("span", { class: "button-inner" }, h("slot", { name: "icon-only" }), h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), mode === 'md' && h("ion-ripple-effect", { type: this.rippleType }))));
117
- }
118
- get el() { return getElement(this); }
119
- };
120
- Button.style = {
121
- ios: buttonIosCss,
122
- md: buttonMdCss
123
- };
124
-
125
- export { Button as ion_button };
@@ -1,86 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-c04b9ed5.js';
2
- import { g as getIonMode } from './ionic-global-4903e23e.js';
3
- import { o as openURL, c as createColorClasses } from './theme-7ef00c83.js';
4
-
5
- const cardIosCss = ":host{--ion-safe-area-left:0px;--ion-safe-area-right:0px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.card-disabled){cursor:default;opacity:0.3;pointer-events:none}.card-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;min-height:var(--min-height);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:inherit}.card-native::-moz-focus-inner{border:0}button,a{cursor:pointer;user-select:none;-webkit-user-drag:none}ion-ripple-effect{color:var(--ripple-color)}:host{--background:var(--ion-card-background, var(--ion-item-background, var(--ion-background-color, #fff)));--color:var(--ion-card-color, var(--ion-item-color, var(--ion-color-step-600, #666666)));margin-left:16px;margin-right:16px;margin-top:24px;margin-bottom:24px;border-radius:8px;transform:translateZ(0);transition:transform 500ms cubic-bezier(0.12, 0.72, 0.29, 1);font-size:14px;box-shadow:0 4px 16px rgba(0, 0, 0, 0.12)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px}}:host(.ion-activated){transform:scale3d(0.97, 0.97, 1)}";
6
-
7
- const cardMdCss = ":host{--ion-safe-area-left:0px;--ion-safe-area-right:0px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.card-disabled){cursor:default;opacity:0.3;pointer-events:none}.card-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;min-height:var(--min-height);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:inherit}.card-native::-moz-focus-inner{border:0}button,a{cursor:pointer;user-select:none;-webkit-user-drag:none}ion-ripple-effect{color:var(--ripple-color)}:host{--background:var(--ion-card-background, var(--ion-item-background, var(--ion-background-color, #fff)));--color:var(--ion-card-color, var(--ion-item-color, var(--ion-color-step-550, #737373)));margin-left:10px;margin-right:10px;margin-top:10px;margin-bottom:10px;border-radius:4px;font-size:14px;box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}";
8
-
9
- const Card = class {
10
- constructor(hostRef) {
11
- registerInstance(this, hostRef);
12
- /**
13
- * If `true`, a button tag will be rendered and the card will be tappable.
14
- */
15
- this.button = false;
16
- /**
17
- * The type of the button. Only used when an `onclick` or `button` property is present.
18
- */
19
- this.type = 'button';
20
- /**
21
- * If `true`, the user cannot interact with the card.
22
- */
23
- this.disabled = false;
24
- /**
25
- * When using a router, it specifies the transition direction when navigating to
26
- * another page using `href`.
27
- */
28
- this.routerDirection = 'forward';
29
- }
30
- isClickable() {
31
- return this.href !== undefined || this.button;
32
- }
33
- renderCard(mode) {
34
- const clickable = this.isClickable();
35
- if (!clickable) {
36
- return [h("slot", null)];
37
- }
38
- const { href, routerAnimation, routerDirection } = this;
39
- const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div';
40
- const attrs = TagType === 'button'
41
- ? { type: this.type }
42
- : {
43
- download: this.download,
44
- href: this.href,
45
- rel: this.rel,
46
- target: this.target,
47
- };
48
- return (h(TagType, Object.assign({}, attrs, { class: "card-native", part: "native", disabled: this.disabled, onClick: (ev) => openURL(href, ev, routerDirection, routerAnimation) }), h("slot", null), clickable && mode === 'md' && h("ion-ripple-effect", null)));
49
- }
50
- render() {
51
- const mode = getIonMode(this);
52
- return (h(Host, { class: createColorClasses(this.color, {
53
- [mode]: true,
54
- 'card-disabled': this.disabled,
55
- 'ion-activatable': this.isClickable(),
56
- }) }, this.renderCard(mode)));
57
- }
58
- };
59
- Card.style = {
60
- ios: cardIosCss,
61
- md: cardMdCss
62
- };
63
-
64
- const cardContentIosCss = "ion-card-content{display:block;position:relative}.card-content-ios{padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;font-size:16px;line-height:1.4}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.card-content-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}.card-content-ios h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:24px;font-weight:normal}.card-content-ios h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:16px;font-weight:normal}.card-content-ios h3,.card-content-ios h4,.card-content-ios h5,.card-content-ios h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:14px;font-weight:normal}.card-content-ios p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:14px}ion-card-header+.card-content-ios{padding-top:0}";
65
-
66
- const cardContentMdCss = "ion-card-content{display:block;position:relative}.card-content-md{padding-left:16px;padding-right:16px;padding-top:13px;padding-bottom:13px;font-size:14px;line-height:1.5}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.card-content-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.card-content-md h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:24px;font-weight:normal}.card-content-md h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:16px;font-weight:normal}.card-content-md h3,.card-content-md h4,.card-content-md h5,.card-content-md h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:14px;font-weight:normal}.card-content-md p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:14px;font-weight:normal;line-height:1.5}ion-card-header+.card-content-md{padding-top:0}";
67
-
68
- const CardContent = class {
69
- constructor(hostRef) {
70
- registerInstance(this, hostRef);
71
- }
72
- render() {
73
- const mode = getIonMode(this);
74
- return (h(Host, { class: {
75
- [mode]: true,
76
- // Used internally for styling
77
- [`card-content-${mode}`]: true,
78
- } }));
79
- }
80
- };
81
- CardContent.style = {
82
- ios: cardContentIosCss,
83
- md: cardContentMdCss
84
- };
85
-
86
- export { Card as ion_card, CardContent as ion_card_content };
@@ -1,353 +0,0 @@
1
- import { r as registerInstance, i as createEvent, h, H as Host, e as getElement } from './index-c04b9ed5.js';
2
- import { g as getIonMode } from './ionic-global-4903e23e.js';
3
- import { h as getAriaLabel, j as renderHiddenInput, a as addEventListener, r as removeEventListener } from './helpers-03073fe4.js';
4
- import { c as createColorClasses, h as hostContext } from './theme-7ef00c83.js';
5
-
6
- const checkboxIosCss = ":host{--background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;user-select:none;z-index:2}:host(.ion-color){--background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.checkbox-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:1px;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--background:var(--ion-item-background, var(--ion-background-color, #fff));--size:26px;width:var(--size);height:var(--size)}:host(.checkbox-disabled){opacity:0.3}:host(.in-item){margin-left:0;margin-right:8px;margin-top:10px;margin-bottom:9px;display:block;position:static}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.in-item[slot=start]){margin-left:2px;margin-right:20px;margin-top:8px;margin-bottom:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:20px;margin-inline-end:20px}}";
7
-
8
- const checkboxMdCss = ":host{--background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;user-select:none;z-index:2}:host(.ion-color){--background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.checkbox-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.51);--checkmark-width:3;--background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px;width:var(--size);height:var(--size)}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled){opacity:0.3}:host(.in-item){margin-left:0;margin-right:0;margin-top:18px;margin-bottom:18px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:18px;margin-bottom:18px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
9
-
10
- const Checkbox = class {
11
- constructor(hostRef) {
12
- registerInstance(this, hostRef);
13
- this.ionChange = createEvent(this, "ionChange", 7);
14
- this.ionFocus = createEvent(this, "ionFocus", 7);
15
- this.ionBlur = createEvent(this, "ionBlur", 7);
16
- this.ionStyle = createEvent(this, "ionStyle", 7);
17
- this.inputId = `ion-cb-${checkboxIds++}`;
18
- /**
19
- * The name of the control, which is submitted with the form data.
20
- */
21
- this.name = this.inputId;
22
- /**
23
- * If `true`, the checkbox is selected.
24
- */
25
- this.checked = false;
26
- /**
27
- * If `true`, the checkbox will visually appear as indeterminate.
28
- */
29
- this.indeterminate = false;
30
- /**
31
- * If `true`, the user cannot interact with the checkbox.
32
- */
33
- this.disabled = false;
34
- /**
35
- * The value of the checkbox does not mean if it's checked or not, use the `checked`
36
- * property for that.
37
- *
38
- * The value of a checkbox is analogous to the value of an `<input type="checkbox">`,
39
- * it's only used when the checkbox participates in a native `<form>`.
40
- */
41
- this.value = 'on';
42
- this.onClick = (ev) => {
43
- ev.preventDefault();
44
- this.setFocus();
45
- this.checked = !this.checked;
46
- this.indeterminate = false;
47
- };
48
- this.onFocus = () => {
49
- this.ionFocus.emit();
50
- };
51
- this.onBlur = () => {
52
- this.ionBlur.emit();
53
- };
54
- }
55
- componentWillLoad() {
56
- this.emitStyle();
57
- }
58
- checkedChanged(isChecked) {
59
- this.ionChange.emit({
60
- checked: isChecked,
61
- value: this.value,
62
- });
63
- this.emitStyle();
64
- }
65
- disabledChanged() {
66
- this.emitStyle();
67
- }
68
- emitStyle() {
69
- this.ionStyle.emit({
70
- 'checkbox-checked': this.checked,
71
- 'interactive-disabled': this.disabled,
72
- });
73
- }
74
- setFocus() {
75
- if (this.focusEl) {
76
- this.focusEl.focus();
77
- }
78
- }
79
- render() {
80
- const { color, checked, disabled, el, indeterminate, inputId, name, value } = this;
81
- const mode = getIonMode(this);
82
- const { label, labelId, labelText } = getAriaLabel(el, inputId);
83
- renderHiddenInput(true, el, name, checked ? value : '', disabled);
84
- let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
85
- if (mode === 'md') {
86
- path = indeterminate ? (h("path", { d: "M2 12H22", part: "mark" })) : (h("path", { d: "M1.73,12.91 8.1,19.28 22.79,4.59", part: "mark" }));
87
- }
88
- return (h(Host, { onClick: this.onClick, "aria-labelledby": label ? labelId : null, "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, role: "checkbox", class: createColorClasses(color, {
89
- [mode]: true,
90
- 'in-item': hostContext('ion-item', el),
91
- 'checkbox-checked': checked,
92
- 'checkbox-disabled': disabled,
93
- 'checkbox-indeterminate': indeterminate,
94
- interactive: true,
95
- }) }, h("svg", { class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path), h("label", { htmlFor: inputId }, labelText), h("input", { type: "checkbox", "aria-checked": `${checked}`, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) })));
96
- }
97
- get el() { return getElement(this); }
98
- static get watchers() { return {
99
- "checked": ["checkedChanged"],
100
- "disabled": ["disabledChanged"]
101
- }; }
102
- };
103
- let checkboxIds = 0;
104
- Checkbox.style = {
105
- ios: checkboxIosCss,
106
- md: checkboxMdCss
107
- };
108
-
109
- const listHeaderIosCss = ":host{--border-style:solid;--border-width:0;--inner-border-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:40px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);color:var(--color);overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.list-header-inner{display:flex;position:relative;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;min-height:inherit;border-width:var(--inner-border-width);border-style:var(--border-style);border-color:var(--border-color);overflow:inherit;box-sizing:border-box}::slotted(ion-label){flex:1 1 auto}:host(.list-header-lines-inset),:host(.list-header-lines-none){--border-width:0}:host(.list-header-lines-full),:host(.list-header-lines-none){--inner-border-width:0}:host{--background:transparent;--color:var(--ion-color-step-850, #262626);--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));padding-left:calc(var(--ion-safe-area-left, 0px) + 20px);position:relative;align-items:flex-end;font-size:22px;font-weight:700;letter-spacing:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;-webkit-padding-start:calc(var(--ion-safe-area-left, 0px) + 20px);padding-inline-start:calc(var(--ion-safe-area-left, 0px) + 20px)}}::slotted(ion-button),::slotted(ion-label){margin-top:29px;margin-bottom:6px}::slotted(ion-button){margin-left:3px;margin-right:3px;height:1.4em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-button){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:3px;margin-inline-end:3px}}:host(.list-header-lines-full){--border-width:0 0 0.55px 0}:host(.list-header-lines-inset){--inner-border-width:0 0 0.55px 0}";
110
-
111
- const listHeaderMdCss = ":host{--border-style:solid;--border-width:0;--inner-border-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:40px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);color:var(--color);overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.list-header-inner{display:flex;position:relative;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;min-height:inherit;border-width:var(--inner-border-width);border-style:var(--border-style);border-color:var(--border-color);overflow:inherit;box-sizing:border-box}::slotted(ion-label){flex:1 1 auto}:host(.list-header-lines-inset),:host(.list-header-lines-none){--border-width:0}:host(.list-header-lines-full),:host(.list-header-lines-none){--inner-border-width:0}:host{--background:transparent;--color:var(--ion-text-color, #000);--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));padding-left:calc(var(--ion-safe-area-left, 0) + 16px);min-height:45px;font-size:14px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;-webkit-padding-start:calc(var(--ion-safe-area-left, 0) + 16px);padding-inline-start:calc(var(--ion-safe-area-left, 0) + 16px)}}:host(.list-header-lines-full){--border-width:0 0 1px 0}:host(.list-header-lines-inset){--inner-border-width:0 0 1px 0}";
112
-
113
- const ListHeader = class {
114
- constructor(hostRef) {
115
- registerInstance(this, hostRef);
116
- }
117
- render() {
118
- const { lines } = this;
119
- const mode = getIonMode(this);
120
- return (h(Host, { class: createColorClasses(this.color, {
121
- [mode]: true,
122
- [`list-header-lines-${lines}`]: lines !== undefined,
123
- }) }, h("div", { class: "list-header-inner" }, h("slot", null))));
124
- }
125
- };
126
- ListHeader.style = {
127
- ios: listHeaderIosCss,
128
- md: listHeaderMdCss
129
- };
130
-
131
- const radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host{--color-checked:var(--ion-color-primary, #3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:10px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}";
132
-
133
- const radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;box-sizing:border-box;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host{--color:var(--ion-color-step-400, #999999);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));transform:scale3d(0, 0, 0);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{transform:scale3d(1, 1, 1)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
134
-
135
- const Radio = class {
136
- constructor(hostRef) {
137
- registerInstance(this, hostRef);
138
- this.ionStyle = createEvent(this, "ionStyle", 7);
139
- this.ionFocus = createEvent(this, "ionFocus", 7);
140
- this.ionBlur = createEvent(this, "ionBlur", 7);
141
- this.inputId = `ion-rb-${radioButtonIds++}`;
142
- this.radioGroup = null;
143
- /**
144
- * If `true`, the radio is selected.
145
- */
146
- this.checked = false;
147
- /**
148
- * The tabindex of the radio button.
149
- * @internal
150
- */
151
- this.buttonTabindex = -1;
152
- /**
153
- * The name of the control, which is submitted with the form data.
154
- */
155
- this.name = this.inputId;
156
- /**
157
- * If `true`, the user cannot interact with the radio.
158
- */
159
- this.disabled = false;
160
- this.updateState = () => {
161
- if (this.radioGroup) {
162
- this.checked = this.radioGroup.value === this.value;
163
- }
164
- };
165
- this.onClick = () => {
166
- this.checked = this.nativeInput.checked;
167
- };
168
- this.onFocus = () => {
169
- this.ionFocus.emit();
170
- };
171
- this.onBlur = () => {
172
- this.ionBlur.emit();
173
- };
174
- }
175
- /** @internal */
176
- async setFocus(ev) {
177
- ev.stopPropagation();
178
- ev.preventDefault();
179
- this.el.focus();
180
- }
181
- /** @internal */
182
- async setButtonTabindex(value) {
183
- this.buttonTabindex = value;
184
- }
185
- connectedCallback() {
186
- if (this.value === undefined) {
187
- this.value = this.inputId;
188
- }
189
- const radioGroup = (this.radioGroup = this.el.closest('ion-radio-group'));
190
- if (radioGroup) {
191
- this.updateState();
192
- addEventListener(radioGroup, 'ionChange', this.updateState);
193
- }
194
- }
195
- disconnectedCallback() {
196
- const radioGroup = this.radioGroup;
197
- if (radioGroup) {
198
- removeEventListener(radioGroup, 'ionChange', this.updateState);
199
- this.radioGroup = null;
200
- }
201
- }
202
- componentWillLoad() {
203
- this.emitStyle();
204
- }
205
- emitStyle() {
206
- this.ionStyle.emit({
207
- 'radio-checked': this.checked,
208
- 'interactive-disabled': this.disabled,
209
- });
210
- }
211
- render() {
212
- const { inputId, disabled, checked, color, el, buttonTabindex } = this;
213
- const mode = getIonMode(this);
214
- const { label, labelId, labelText } = getAriaLabel(el, inputId);
215
- return (h(Host, { "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, "aria-labelledby": label ? labelId : null, role: "radio", tabindex: buttonTabindex, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
216
- [mode]: true,
217
- 'in-item': hostContext('ion-item', el),
218
- interactive: true,
219
- 'radio-checked': checked,
220
- 'radio-disabled': disabled,
221
- }) }, h("div", { class: "radio-icon", part: "container" }, h("div", { class: "radio-inner", part: "mark" }), h("div", { class: "radio-ripple" })), h("label", { htmlFor: inputId }, labelText), h("input", { type: "radio", checked: checked, disabled: disabled, tabindex: "-1", id: inputId, ref: (nativeEl) => (this.nativeInput = nativeEl) })));
222
- }
223
- get el() { return getElement(this); }
224
- static get watchers() { return {
225
- "color": ["emitStyle"],
226
- "checked": ["emitStyle"],
227
- "disabled": ["emitStyle"]
228
- }; }
229
- };
230
- let radioButtonIds = 0;
231
- Radio.style = {
232
- ios: radioIosCss,
233
- md: radioMdCss
234
- };
235
-
236
- const RadioGroup = class {
237
- constructor(hostRef) {
238
- registerInstance(this, hostRef);
239
- this.ionChange = createEvent(this, "ionChange", 7);
240
- this.inputId = `ion-rg-${radioGroupIds++}`;
241
- this.labelId = `${this.inputId}-lbl`;
242
- /**
243
- * If `true`, the radios can be deselected.
244
- */
245
- this.allowEmptySelection = false;
246
- /**
247
- * The name of the control, which is submitted with the form data.
248
- */
249
- this.name = this.inputId;
250
- this.setRadioTabindex = (value) => {
251
- const radios = this.getRadios();
252
- // Get the first radio that is not disabled and the checked one
253
- const first = radios.find((radio) => !radio.disabled);
254
- const checked = radios.find((radio) => radio.value === value && !radio.disabled);
255
- if (!first && !checked) {
256
- return;
257
- }
258
- // If an enabled checked radio exists, set it to be the focusable radio
259
- // otherwise we default to focus the first radio
260
- const focusable = checked || first;
261
- for (const radio of radios) {
262
- const tabindex = radio === focusable ? 0 : -1;
263
- radio.setButtonTabindex(tabindex);
264
- }
265
- };
266
- this.onClick = (ev) => {
267
- ev.preventDefault();
268
- const selectedRadio = ev.target && ev.target.closest('ion-radio');
269
- if (selectedRadio) {
270
- const currentValue = this.value;
271
- const newValue = selectedRadio.value;
272
- if (newValue !== currentValue) {
273
- this.value = newValue;
274
- }
275
- else if (this.allowEmptySelection) {
276
- this.value = undefined;
277
- }
278
- }
279
- };
280
- }
281
- valueChanged(value) {
282
- this.setRadioTabindex(value);
283
- this.ionChange.emit({ value });
284
- }
285
- componentDidLoad() {
286
- this.setRadioTabindex(this.value);
287
- }
288
- async connectedCallback() {
289
- // Get the list header if it exists and set the id
290
- // this is used to set aria-labelledby
291
- const header = this.el.querySelector('ion-list-header') || this.el.querySelector('ion-item-divider');
292
- if (header) {
293
- const label = (this.label = header.querySelector('ion-label'));
294
- if (label) {
295
- this.labelId = label.id = this.name + '-lbl';
296
- }
297
- }
298
- }
299
- getRadios() {
300
- return Array.from(this.el.querySelectorAll('ion-radio'));
301
- }
302
- onKeydown(ev) {
303
- const inSelectPopover = !!this.el.closest('ion-select-popover');
304
- if (ev.target && !this.el.contains(ev.target)) {
305
- return;
306
- }
307
- // Get all radios inside of the radio group and then
308
- // filter out disabled radios since we need to skip those
309
- const radios = this.getRadios().filter((radio) => !radio.disabled);
310
- // Only move the radio if the current focus is in the radio group
311
- if (ev.target && radios.includes(ev.target)) {
312
- const index = radios.findIndex((radio) => radio === ev.target);
313
- const current = radios[index];
314
- let next;
315
- // If hitting arrow down or arrow right, move to the next radio
316
- // If we're on the last radio, move to the first radio
317
- if (['ArrowDown', 'ArrowRight'].includes(ev.code)) {
318
- next = index === radios.length - 1 ? radios[0] : radios[index + 1];
319
- }
320
- // If hitting arrow up or arrow left, move to the previous radio
321
- // If we're on the first radio, move to the last radio
322
- if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) {
323
- next = index === 0 ? radios[radios.length - 1] : radios[index - 1];
324
- }
325
- if (next && radios.includes(next)) {
326
- next.setFocus(ev);
327
- if (!inSelectPopover) {
328
- this.value = next.value;
329
- }
330
- }
331
- // Update the radio group value when a user presses the
332
- // space bar on top of a selected radio
333
- if (['Space'].includes(ev.code)) {
334
- this.value = this.allowEmptySelection && this.value !== undefined ? undefined : current.value;
335
- // Prevent browsers from jumping
336
- // to the bottom of the screen
337
- ev.preventDefault();
338
- }
339
- }
340
- }
341
- render() {
342
- const { label, labelId } = this;
343
- const mode = getIonMode(this);
344
- return h(Host, { role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode });
345
- }
346
- get el() { return getElement(this); }
347
- static get watchers() { return {
348
- "value": ["valueChanged"]
349
- }; }
350
- };
351
- let radioGroupIds = 0;
352
-
353
- export { Checkbox as ion_checkbox, ListHeader as ion_list_header, Radio as ion_radio, RadioGroup as ion_radio_group };