@venite/components 0.16.2 → 0.16.6

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 (253) hide show
  1. package/dist/cjs/ion-button_13.cjs.entry.js +1787 -0
  2. package/dist/cjs/ion-checkbox_3.cjs.entry.js +235 -0
  3. package/dist/cjs/ion-segment_16.cjs.entry.js +5 -4
  4. package/dist/cjs/ldf-day-name_5.cjs.entry.js +1 -2
  5. package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +2 -2
  6. package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +1 -1
  7. package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +3 -3
  8. package/dist/cjs/ldf-editable-metadata.cjs.entry.js +3 -3
  9. package/dist/cjs/ldf.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{option-a9f12c93.js → option-1ebd4514.js} +6 -2
  12. package/dist/cjs/{rubric-85fc7418.js → rubric-662d8baa.js} +44 -5
  13. package/dist/cjs/{specific-class-acf1bb37.js → specific-class-d80d272a.js} +2 -2
  14. package/dist/collection/components/liturgical-document/dist/liturgical-document.js +6 -1
  15. package/dist/collection/components/liturgical-document/liturgical-document.js +21 -1
  16. package/dist/collection/components/option/dist/option.js +318 -0
  17. package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js +258 -0
  18. package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.js +55 -36
  19. package/dist/collection/components/psalm/dist/psalm.js +0 -1
  20. package/dist/collection/components/psalm/psalm.js +0 -1
  21. package/dist/collection/components/string/dist/string.js +0 -1
  22. package/dist/collection/components/string/string.js +0 -1
  23. package/dist/collection/components/text/dist/text.js +1 -1
  24. package/dist/collection/components/text/text.js +1 -1
  25. package/dist/esm/{app-globals-2b41bd8d.js → app-globals-729b03cf.js} +1 -1
  26. package/dist/esm/{index-1885f1b8.js → index-734a6b69.js} +1 -1
  27. package/dist/esm/{index-8b9e221a.js → index-9579282b.js} +3 -3
  28. package/dist/esm/{index-dcd553ac.js → index-f0f6a379.js} +1 -1
  29. package/dist/esm/ion-action-sheet.entry.js +3 -3
  30. package/dist/esm/ion-alert.entry.js +3 -3
  31. package/dist/esm/ion-app.entry.js +3 -3
  32. package/dist/esm/ion-avatar.entry.js +2 -2
  33. package/dist/esm/ion-back-button.entry.js +2 -2
  34. package/dist/esm/ion-backdrop.entry.js +2 -2
  35. package/dist/esm/ion-badge.entry.js +2 -2
  36. package/dist/esm/ion-button_13.entry.js +1771 -0
  37. package/dist/esm/ion-card-content_6.entry.js +3 -3
  38. package/dist/esm/ion-card-subtitle.entry.js +2 -2
  39. package/dist/esm/ion-card_2.entry.js +2 -2
  40. package/dist/esm/ion-checkbox_3.entry.js +229 -0
  41. package/dist/esm/ion-chip.entry.js +2 -2
  42. package/dist/esm/ion-datetime_2.entry.js +3 -3
  43. package/dist/esm/ion-fab-button.entry.js +2 -2
  44. package/dist/esm/ion-fab-list.entry.js +2 -2
  45. package/dist/esm/ion-fab.entry.js +2 -2
  46. package/dist/esm/ion-footer.entry.js +2 -2
  47. package/dist/esm/ion-img.entry.js +2 -2
  48. package/dist/esm/ion-infinite-scroll-content.entry.js +2 -2
  49. package/dist/esm/ion-infinite-scroll.entry.js +2 -2
  50. package/dist/esm/ion-input_2.entry.js +2 -2
  51. package/dist/esm/ion-item-divider.entry.js +2 -2
  52. package/dist/esm/ion-item-group.entry.js +2 -2
  53. package/dist/esm/ion-item-option.entry.js +2 -2
  54. package/dist/esm/ion-item-options.entry.js +2 -2
  55. package/dist/esm/ion-item-sliding.entry.js +2 -2
  56. package/dist/esm/ion-list-header.entry.js +2 -2
  57. package/dist/esm/ion-loading.entry.js +3 -3
  58. package/dist/esm/ion-menu-button.entry.js +4 -4
  59. package/dist/esm/ion-menu-toggle.entry.js +4 -4
  60. package/dist/esm/ion-menu.entry.js +3 -3
  61. package/dist/esm/ion-modal.entry.js +4 -4
  62. package/dist/esm/ion-nav-link.entry.js +1 -1
  63. package/dist/esm/ion-nav.entry.js +3 -3
  64. package/dist/esm/ion-note.entry.js +2 -2
  65. package/dist/esm/ion-picker-column.entry.js +2 -2
  66. package/dist/esm/ion-picker.entry.js +3 -3
  67. package/dist/esm/ion-popover.entry.js +4 -4
  68. package/dist/esm/ion-progress-bar.entry.js +2 -2
  69. package/dist/esm/ion-radio_2.entry.js +2 -2
  70. package/dist/esm/ion-range.entry.js +2 -2
  71. package/dist/esm/ion-refresher-content.entry.js +2 -2
  72. package/dist/esm/ion-refresher.entry.js +2 -2
  73. package/dist/esm/ion-reorder-group.entry.js +2 -2
  74. package/dist/esm/ion-reorder.entry.js +2 -2
  75. package/dist/esm/ion-route-redirect.entry.js +1 -1
  76. package/dist/esm/ion-route.entry.js +1 -1
  77. package/dist/esm/ion-router-link.entry.js +2 -2
  78. package/dist/esm/ion-router-outlet.entry.js +3 -3
  79. package/dist/esm/ion-router.entry.js +1 -1
  80. package/dist/esm/ion-segment_16.entry.js +8 -7
  81. package/dist/esm/ion-select-popover.entry.js +3 -3
  82. package/dist/esm/ion-select_2.entry.js +3 -3
  83. package/dist/esm/ion-slide.entry.js +2 -2
  84. package/dist/esm/ion-slides.entry.js +2 -2
  85. package/dist/esm/ion-spinner.entry.js +2 -2
  86. package/dist/esm/ion-split-pane.entry.js +2 -2
  87. package/dist/esm/ion-tab-bar.entry.js +2 -2
  88. package/dist/esm/ion-tab-button.entry.js +2 -2
  89. package/dist/esm/ion-tab.entry.js +1 -1
  90. package/dist/esm/ion-tabs.entry.js +1 -1
  91. package/dist/esm/ion-text.entry.js +2 -2
  92. package/dist/esm/ion-textarea.entry.js +2 -2
  93. package/dist/esm/ion-thumbnail.entry.js +2 -2
  94. package/dist/esm/ion-toast.entry.js +3 -3
  95. package/dist/esm/ion-virtual-scroll.entry.js +1 -1
  96. package/dist/esm/{ionic-global-fef4299f.js → ionic-global-ef89a0a5.js} +1 -1
  97. package/dist/esm/{ios.transition-2460f61e.js → ios.transition-b1be0863.js} +2 -2
  98. package/dist/esm/ldf-day-name_5.entry.js +4 -5
  99. package/dist/esm/ldf-editable-add-block-menu.entry.js +3 -3
  100. package/dist/esm/ldf-editable-condition-piece.entry.js +1 -1
  101. package/dist/esm/ldf-editable-condition.entry.js +1 -1
  102. package/dist/esm/ldf-editable-filter-documents.entry.js +2 -2
  103. package/dist/esm/ldf-editable-lookup_2.entry.js +4 -4
  104. package/dist/esm/ldf-editable-metadata.entry.js +4 -4
  105. package/dist/esm/ldf-editable-preference-option.entry.js +1 -1
  106. package/dist/esm/ldf-editable-preference.entry.js +1 -1
  107. package/dist/esm/ldf-editable-preferences.entry.js +3 -3
  108. package/dist/esm/ldf-editable-string-list.entry.js +1 -1
  109. package/dist/esm/ldf-editor-cursors.entry.js +1 -1
  110. package/dist/esm/ldf-editor.entry.js +1 -1
  111. package/dist/esm/ldf.js +4 -4
  112. package/dist/esm/loader.js +4 -4
  113. package/dist/esm/{md.transition-7eb37dd1.js → md.transition-1763f475.js} +2 -2
  114. package/dist/esm/{menu-toggle-util-d6bed342.js → menu-toggle-util-29e61ff3.js} +1 -1
  115. package/dist/esm/{option-042c9673.js → option-47d50244.js} +6 -2
  116. package/dist/esm/{overlays-e1d5aa58.js → overlays-06b43b65.js} +2 -2
  117. package/dist/esm/{rubric-9c750946.js → rubric-2330a030.js} +44 -5
  118. package/dist/esm/{specific-class-2df4b72a.js → specific-class-28e26e40.js} +2 -2
  119. package/dist/esm/{status-tap-900b721a.js → status-tap-7458bd71.js} +1 -1
  120. package/dist/ldf/ldf.esm.js +1 -1
  121. package/dist/ldf/{p-a7a10747.entry.js → p-018e57db.entry.js} +1 -1
  122. package/dist/ldf/p-02ef484e.entry.js +1 -0
  123. package/dist/ldf/{p-5bfa9969.entry.js → p-04715bf0.entry.js} +1 -1
  124. package/dist/ldf/{p-8cb241a8.entry.js → p-0651768a.entry.js} +1 -1
  125. package/dist/ldf/{p-a80bce6a.entry.js → p-07d6d3ad.entry.js} +1 -1
  126. package/dist/ldf/p-08584ccc.entry.js +1 -0
  127. package/dist/ldf/{p-d3a17399.entry.js → p-0873a34a.entry.js} +1 -1
  128. package/dist/ldf/{p-5febfbde.entry.js → p-0f69db87.entry.js} +1 -1
  129. package/dist/ldf/{p-6b6b9f77.entry.js → p-1504379f.entry.js} +1 -1
  130. package/dist/ldf/{p-110c6e85.entry.js → p-1a8e2899.entry.js} +1 -1
  131. package/dist/ldf/p-21e2f0a3.entry.js +1 -0
  132. package/dist/ldf/{p-6c3d4341.entry.js → p-25a736f1.entry.js} +1 -1
  133. package/dist/ldf/{p-43d7a734.entry.js → p-2c36a583.entry.js} +1 -1
  134. package/dist/ldf/{p-4c8f895f.entry.js → p-2fa1c501.entry.js} +1 -1
  135. package/dist/ldf/{p-a0b9b689.entry.js → p-302dc0d5.entry.js} +1 -1
  136. package/dist/ldf/{p-54f83929.entry.js → p-327b14ac.entry.js} +1 -1
  137. package/dist/ldf/{p-4d5b52ad.entry.js → p-32f7ba8e.entry.js} +1 -1
  138. package/dist/ldf/{p-8a064810.entry.js → p-3545fcdc.entry.js} +1 -1
  139. package/dist/ldf/{p-8c8bf861.entry.js → p-374118d7.entry.js} +1 -1
  140. package/dist/ldf/p-37f356a4.entry.js +1 -0
  141. package/dist/ldf/{p-7f7de09a.entry.js → p-380f8655.entry.js} +1 -1
  142. package/dist/ldf/{p-7df0687c.entry.js → p-3c9930ff.entry.js} +1 -1
  143. package/dist/ldf/{p-dbdb2b0a.entry.js → p-3f39c2ad.entry.js} +1 -1
  144. package/dist/ldf/{p-35680ca6.entry.js → p-430c418a.entry.js} +1 -1
  145. package/dist/ldf/{p-986921d2.js → p-48e44122.js} +1 -1
  146. package/dist/ldf/{p-4b154310.entry.js → p-4a4380fa.entry.js} +1 -1
  147. package/dist/ldf/p-4b80de48.js +1 -0
  148. package/dist/ldf/{p-06bc76d9.entry.js → p-4d392128.entry.js} +1 -1
  149. package/dist/ldf/p-4e0b3c0f.entry.js +1 -0
  150. package/dist/ldf/{p-b631cadf.entry.js → p-52656429.entry.js} +1 -1
  151. package/dist/ldf/p-53c807a4.js +1 -0
  152. package/dist/ldf/{p-91969280.js → p-55d797c1.js} +1 -1
  153. package/dist/ldf/{p-71ed0c0f.entry.js → p-59340423.entry.js} +1 -1
  154. package/dist/ldf/{p-0c8f1542.entry.js → p-5be7ff17.entry.js} +1 -1
  155. package/dist/ldf/p-5bf20b51.js +1 -0
  156. package/dist/ldf/{p-ae3cd06a.entry.js → p-63b5daf6.entry.js} +1 -1
  157. package/dist/ldf/{p-0afd3d32.entry.js → p-66a7385e.entry.js} +1 -1
  158. package/dist/ldf/p-698a3399.entry.js +1 -0
  159. package/dist/ldf/{p-4d92e32b.entry.js → p-69f85ad3.entry.js} +1 -1
  160. package/dist/ldf/{p-0cb749f6.entry.js → p-6fe24d85.entry.js} +1 -1
  161. package/dist/ldf/{p-ceb4c199.entry.js → p-70e47f8b.entry.js} +1 -1
  162. package/dist/ldf/{p-e778bf3c.entry.js → p-73a16936.entry.js} +1 -1
  163. package/dist/ldf/{p-bacac874.entry.js → p-79a526a1.entry.js} +1 -1
  164. package/dist/ldf/{p-20f5f7c0.entry.js → p-7abeb82c.entry.js} +1 -1
  165. package/dist/ldf/{p-79997a72.entry.js → p-7df11f48.entry.js} +1 -1
  166. package/dist/ldf/{p-91cef52f.entry.js → p-7efa633b.entry.js} +1 -1
  167. package/dist/ldf/{p-8ed588f7.entry.js → p-84f38db6.entry.js} +1 -1
  168. package/dist/ldf/{p-5a74ad40.entry.js → p-8767a74e.entry.js} +1 -1
  169. package/dist/ldf/{p-7fba586d.entry.js → p-8932ec85.entry.js} +1 -1
  170. package/dist/ldf/{p-74e1596c.entry.js → p-8c2727db.entry.js} +1 -1
  171. package/dist/ldf/{p-913c92ca.entry.js → p-972e4f2a.entry.js} +1 -1
  172. package/dist/ldf/{p-0ce10dcd.js → p-978e2c6d.js} +1 -1
  173. package/dist/ldf/p-9bd5d1d4.entry.js +1 -0
  174. package/dist/ldf/{p-5fa1dcfb.entry.js → p-9c397c49.entry.js} +1 -1
  175. package/dist/ldf/p-9e2c172e.entry.js +1 -0
  176. package/dist/ldf/{p-6b0fab5d.js → p-9e82b403.js} +2 -2
  177. package/dist/ldf/{p-2b9556d3.entry.js → p-a98c89d1.entry.js} +1 -1
  178. package/dist/ldf/{p-c3dbb344.entry.js → p-ac7a17ce.entry.js} +1 -1
  179. package/dist/ldf/{p-3b236b73.js → p-acbbd1ec.js} +1 -1
  180. package/dist/ldf/p-b1242016.js +1 -0
  181. package/dist/ldf/{p-50d56c76.entry.js → p-b7388aec.entry.js} +1 -1
  182. package/dist/ldf/{p-37ead536.entry.js → p-b78336d7.entry.js} +1 -1
  183. package/dist/ldf/{p-9282f514.entry.js → p-ba021918.entry.js} +1 -1
  184. package/dist/ldf/{p-65c80b87.entry.js → p-c1bcd0a9.entry.js} +1 -1
  185. package/dist/ldf/{p-4c825920.entry.js → p-c1df632d.entry.js} +1 -1
  186. package/dist/ldf/{p-a467efd9.entry.js → p-c3042920.entry.js} +1 -1
  187. package/dist/ldf/{p-860e2e8c.entry.js → p-c3807857.entry.js} +1 -1
  188. package/dist/ldf/{p-faf3cb15.entry.js → p-c3841978.entry.js} +1 -1
  189. package/dist/ldf/{p-b7fe7b29.entry.js → p-c41e055c.entry.js} +1 -1
  190. package/dist/ldf/{p-5cefe450.entry.js → p-c6163f81.entry.js} +1 -1
  191. package/dist/ldf/{p-944c44a7.entry.js → p-c6b42618.entry.js} +1 -1
  192. package/dist/ldf/{p-1d8e06c7.entry.js → p-c74d3fd0.entry.js} +1 -1
  193. package/dist/ldf/{p-741e1b4e.entry.js → p-c82dd468.entry.js} +1 -1
  194. package/dist/ldf/{p-342e45c0.entry.js → p-ca698b8f.entry.js} +1 -1
  195. package/dist/ldf/p-ca7e0de9.entry.js +1 -0
  196. package/dist/ldf/{p-059fcd05.entry.js → p-cbfbb80c.entry.js} +1 -1
  197. package/dist/ldf/{p-a8264864.entry.js → p-d195c957.entry.js} +1 -1
  198. package/dist/ldf/{p-664b2872.js → p-d282d4f9.js} +1 -1
  199. package/dist/ldf/{p-bc59e89e.entry.js → p-d7966e9b.entry.js} +1 -1
  200. package/dist/ldf/{p-f562ae50.js → p-d7f8c770.js} +1 -1
  201. package/dist/ldf/{p-396025ba.entry.js → p-d7fa99cc.entry.js} +1 -1
  202. package/dist/ldf/{p-ae136041.entry.js → p-db435131.entry.js} +1 -1
  203. package/dist/ldf/{p-ae287f67.entry.js → p-dc445c36.entry.js} +1 -1
  204. package/dist/ldf/{p-385a3ecf.entry.js → p-dd99e42a.entry.js} +1 -1
  205. package/dist/ldf/{p-b8a8f9c8.js → p-de5bb5ad.js} +1 -1
  206. package/dist/ldf/{p-7e388cb7.entry.js → p-e0e12ae3.entry.js} +1 -1
  207. package/dist/ldf/{p-128ac9e9.entry.js → p-e215fd02.entry.js} +1 -1
  208. package/dist/ldf/{p-4b7027b1.entry.js → p-e4be11ad.entry.js} +1 -1
  209. package/dist/ldf/{p-8d6f1d6b.entry.js → p-ea66c343.entry.js} +1 -1
  210. package/dist/ldf/{p-ac9a93aa.entry.js → p-ec5eecdc.entry.js} +1 -1
  211. package/dist/ldf/{p-64c46765.js → p-f2ce126e.js} +1 -1
  212. package/dist/ldf/{p-186eed18.entry.js → p-fe59a676.entry.js} +1 -1
  213. package/dist/ldf/p-ff51dbd0.entry.js +1 -0
  214. package/dist/types/components/liturgical-document/liturgical-document.d.ts +2 -0
  215. package/dist/types/components/prayers-and-thanksgivings/prayers-and-thanksgivings.d.ts +1 -1
  216. package/dist/types/components.d.ts +8 -0
  217. package/package.json +2 -2
  218. package/dist/cjs/ion-button_3.cjs.entry.js +0 -413
  219. package/dist/cjs/ion-buttons_6.cjs.entry.js +0 -584
  220. package/dist/cjs/ion-content.cjs.entry.js +0 -303
  221. package/dist/cjs/ion-item_2.cjs.entry.js +0 -168
  222. package/dist/cjs/ion-ripple-effect.cjs.entry.js +0 -93
  223. package/dist/cjs/ion-searchbar.cjs.entry.js +0 -330
  224. package/dist/cjs/ion-title.cjs.entry.js +0 -48
  225. package/dist/cjs/ldf-prayers-and-thanksgivings.cjs.entry.js +0 -108
  226. package/dist/esm/ion-button_3.entry.js +0 -407
  227. package/dist/esm/ion-buttons_6.entry.js +0 -575
  228. package/dist/esm/ion-content.entry.js +0 -299
  229. package/dist/esm/ion-item_2.entry.js +0 -163
  230. package/dist/esm/ion-ripple-effect.entry.js +0 -89
  231. package/dist/esm/ion-searchbar.entry.js +0 -326
  232. package/dist/esm/ion-title.entry.js +0 -44
  233. package/dist/esm/ldf-prayers-and-thanksgivings.entry.js +0 -104
  234. package/dist/ldf/p-01655d40.js +0 -1
  235. package/dist/ldf/p-07e48862.entry.js +0 -1
  236. package/dist/ldf/p-2471a9c7.entry.js +0 -1
  237. package/dist/ldf/p-356f9ee6.entry.js +0 -1
  238. package/dist/ldf/p-68f963c7.entry.js +0 -1
  239. package/dist/ldf/p-72718314.entry.js +0 -1
  240. package/dist/ldf/p-78ed7ef0.entry.js +0 -1
  241. package/dist/ldf/p-7aecb410.js +0 -1
  242. package/dist/ldf/p-7ccf2257.entry.js +0 -1
  243. package/dist/ldf/p-867f7c02.js +0 -1
  244. package/dist/ldf/p-8e1286c3.entry.js +0 -1
  245. package/dist/ldf/p-92461769.entry.js +0 -1
  246. package/dist/ldf/p-9382bbe1.entry.js +0 -1
  247. package/dist/ldf/p-96967103.entry.js +0 -1
  248. package/dist/ldf/p-accacaed.entry.js +0 -1
  249. package/dist/ldf/p-bcb82c8e.js +0 -1
  250. package/dist/ldf/p-c7c0acf1.entry.js +0 -1
  251. package/dist/ldf/p-cee7604d.entry.js +0 -1
  252. package/dist/ldf/p-e3ce57d7.entry.js +0 -1
  253. package/dist/ldf/p-ecb2e631.entry.js +0 -1
@@ -1,407 +0,0 @@
1
- import { e as getAssetPath, r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-dcd553ac.js';
2
- import { g as getIonMode$1 } from './ionic-global-fef4299f.js';
3
- import { h as hasShadowDom } from './helpers-8c93393b.js';
4
- import { o as openURL, c as createColorClasses$1, h as hostContext } from './theme-74c22054.js';
5
-
6
- let CACHED_MAP;
7
- const getIconMap = () => {
8
- if (typeof window === 'undefined') {
9
- return new Map();
10
- }
11
- else {
12
- if (!CACHED_MAP) {
13
- const win = window;
14
- win.Ionicons = win.Ionicons || {};
15
- CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();
16
- }
17
- return CACHED_MAP;
18
- }
19
- };
20
- const getUrl = (i) => {
21
- let url = getSrc(i.src);
22
- if (url) {
23
- return url;
24
- }
25
- url = getName(i.name, i.icon, i.mode, i.ios, i.md);
26
- if (url) {
27
- return getNamedUrl(url);
28
- }
29
- if (i.icon) {
30
- url = getSrc(i.icon);
31
- if (url) {
32
- return url;
33
- }
34
- url = getSrc(i.icon[i.mode]);
35
- if (url) {
36
- return url;
37
- }
38
- }
39
- return null;
40
- };
41
- const getNamedUrl = (iconName) => {
42
- const url = getIconMap().get(iconName);
43
- if (url) {
44
- return url;
45
- }
46
- return getAssetPath(`svg/${iconName}.svg`);
47
- };
48
- const getName = (iconName, icon, mode, ios, md) => {
49
- // default to "md" if somehow the mode wasn't set
50
- mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';
51
- // if an icon was passed in using the ios or md attributes
52
- // set the iconName to whatever was passed in
53
- if (ios && mode === 'ios') {
54
- iconName = toLower(ios);
55
- }
56
- else if (md && mode === 'md') {
57
- iconName = toLower(md);
58
- }
59
- else {
60
- if (!iconName && icon && !isSrc(icon)) {
61
- iconName = icon;
62
- }
63
- if (isStr(iconName)) {
64
- iconName = toLower(iconName);
65
- }
66
- }
67
- if (!isStr(iconName) || iconName.trim() === '') {
68
- return null;
69
- }
70
- // only allow alpha characters and dash
71
- const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
72
- if (invalidChars !== '') {
73
- return null;
74
- }
75
- return iconName;
76
- };
77
- const getSrc = (src) => {
78
- if (isStr(src)) {
79
- src = src.trim();
80
- if (isSrc(src)) {
81
- return src;
82
- }
83
- }
84
- return null;
85
- };
86
- const isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
87
- const isStr = (val) => typeof val === 'string';
88
- const toLower = (val) => val.toLowerCase();
89
-
90
- 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;pointer-events:auto;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}}";
91
-
92
- 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;pointer-events:auto;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);opacity:0.24}: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);opacity:0.12}@media (any-hover: hover){:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-contrast);opacity:0.08}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:var(--ion-color-base);opacity:0.04}}";
93
-
94
- const Button = class {
95
- constructor(hostRef) {
96
- registerInstance(this, hostRef);
97
- this.ionFocus = createEvent(this, "ionFocus", 7);
98
- this.ionBlur = createEvent(this, "ionBlur", 7);
99
- this.inItem = false;
100
- this.inListHeader = false;
101
- this.inToolbar = false;
102
- /**
103
- * The type of button.
104
- */
105
- this.buttonType = 'button';
106
- /**
107
- * If `true`, the user cannot interact with the button.
108
- */
109
- this.disabled = false;
110
- /**
111
- * When using a router, it specifies the transition direction when navigating to
112
- * another page using `href`.
113
- */
114
- this.routerDirection = 'forward';
115
- /**
116
- * If `true`, activates a button with a heavier font weight.
117
- */
118
- this.strong = false;
119
- /**
120
- * The type of the button.
121
- */
122
- this.type = 'button';
123
- this.handleClick = (ev) => {
124
- if (this.type === 'button') {
125
- openURL(this.href, ev, this.routerDirection);
126
- }
127
- else if (hasShadowDom(this.el)) {
128
- // this button wants to specifically submit a form
129
- // climb up the dom to see if we're in a <form>
130
- // and if so, then use JS to submit it
131
- const form = this.el.closest('form');
132
- if (form) {
133
- ev.preventDefault();
134
- const fakeButton = document.createElement('button');
135
- fakeButton.type = this.type;
136
- fakeButton.style.display = 'none';
137
- form.appendChild(fakeButton);
138
- fakeButton.click();
139
- fakeButton.remove();
140
- }
141
- }
142
- };
143
- this.onFocus = () => {
144
- this.ionFocus.emit();
145
- };
146
- this.onBlur = () => {
147
- this.ionBlur.emit();
148
- };
149
- }
150
- componentWillLoad() {
151
- this.inToolbar = !!this.el.closest('ion-buttons');
152
- this.inListHeader = !!this.el.closest('ion-list-header');
153
- this.inItem = !!this.el.closest('ion-item') || !!this.el.closest('ion-item-divider');
154
- }
155
- get hasIconOnly() {
156
- return !!this.el.querySelector('ion-icon[slot="icon-only"]');
157
- }
158
- get rippleType() {
159
- const hasClearFill = this.fill === undefined || this.fill === 'clear';
160
- // If the button is in a toolbar, has a clear fill (which is the default)
161
- // and only has an icon we use the unbounded "circular" ripple effect
162
- if (hasClearFill && this.hasIconOnly && this.inToolbar) {
163
- return 'unbounded';
164
- }
165
- return 'bounded';
166
- }
167
- render() {
168
- const mode = getIonMode$1(this);
169
- const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong } = this;
170
- const finalSize = size === undefined && this.inItem ? 'small' : size;
171
- const TagType = href === undefined ? 'button' : 'a';
172
- const attrs = (TagType === 'button')
173
- ? { type }
174
- : {
175
- download: this.download,
176
- href,
177
- rel,
178
- target
179
- };
180
- let fill = this.fill;
181
- if (fill === undefined) {
182
- fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
183
- }
184
- return (h(Host, { onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: Object.assign(Object.assign({}, createColorClasses$1(color)), { [mode]: true, [buttonType]: true, [`${buttonType}-${expand}`]: expand !== undefined, [`${buttonType}-${finalSize}`]: finalSize !== undefined, [`${buttonType}-${shape}`]: shape !== undefined, [`${buttonType}-${fill}`]: true, [`${buttonType}-strong`]: strong, 'in-toolbar': hostContext('ion-toolbar', this.el), 'in-toolbar-color': hostContext('ion-toolbar[color]', this.el), 'button-has-icon-only': hasIconOnly, 'button-disabled': disabled, 'ion-activatable': true, 'ion-focusable': true }) }, h(TagType, Object.assign({}, attrs, { class: "button-native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }), 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 }))));
185
- }
186
- get el() { return getElement(this); }
187
- };
188
- Button.style = {
189
- ios: buttonIosCss,
190
- md: buttonMdCss
191
- };
192
-
193
- const validateContent = (svgContent) => {
194
- if (svgContent && typeof document !== 'undefined') {
195
- const div = document.createElement('div');
196
- div.innerHTML = svgContent;
197
- // setup this way to ensure it works on our buddy IE
198
- for (let i = div.childNodes.length - 1; i >= 0; i--) {
199
- if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {
200
- div.removeChild(div.childNodes[i]);
201
- }
202
- }
203
- // must only have 1 root element
204
- const svgElm = div.firstElementChild;
205
- if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
206
- const svgClass = svgElm.getAttribute('class') || '';
207
- svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());
208
- // root element must be an svg
209
- // lets double check we've got valid elements
210
- // do not allow scripts
211
- if (isValid(svgElm)) {
212
- return div.innerHTML;
213
- }
214
- }
215
- }
216
- return '';
217
- };
218
- const isValid = (elm) => {
219
- if (elm.nodeType === 1) {
220
- if (elm.nodeName.toLowerCase() === 'script') {
221
- return false;
222
- }
223
- for (let i = 0; i < elm.attributes.length; i++) {
224
- const val = elm.attributes[i].value;
225
- if (isStr(val) && val.toLowerCase().indexOf('on') === 0) {
226
- return false;
227
- }
228
- }
229
- for (let i = 0; i < elm.childNodes.length; i++) {
230
- if (!isValid(elm.childNodes[i])) {
231
- return false;
232
- }
233
- }
234
- }
235
- return true;
236
- };
237
-
238
- const ioniconContent = new Map();
239
- const requests = new Map();
240
- const getSvgContent = (url) => {
241
- // see if we already have a request for this url
242
- let req = requests.get(url);
243
- if (!req) {
244
- if (typeof fetch !== 'undefined') {
245
- // we don't already have a request
246
- req = fetch(url).then(rsp => {
247
- if (rsp.ok) {
248
- return rsp.text().then(svgContent => {
249
- ioniconContent.set(url, validateContent(svgContent));
250
- });
251
- }
252
- ioniconContent.set(url, '');
253
- });
254
- // cache for the same requests
255
- requests.set(url, req);
256
- }
257
- else {
258
- // set to empty for ssr scenarios and resolve promise
259
- ioniconContent.set(url, '');
260
- return Promise.resolve();
261
- }
262
- }
263
- return req;
264
- };
265
-
266
- const iconCss = ":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:32px;stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}:host(.flip-rtl) .icon-inner{transform:scaleX(-1)}:host(.icon-small){font-size:18px !important}:host(.icon-large){font-size:32px !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";
267
-
268
- const Icon = class {
269
- constructor(hostRef) {
270
- registerInstance(this, hostRef);
271
- this.isVisible = false;
272
- /**
273
- * The mode determines which platform styles to use.
274
- */
275
- this.mode = getIonMode();
276
- /**
277
- * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
278
- * Default, `false`.
279
- */
280
- this.lazy = false;
281
- }
282
- connectedCallback() {
283
- // purposely do not return the promise here because loading
284
- // the svg file should not hold up loading the app
285
- // only load the svg if it's visible
286
- this.waitUntilVisible(this.el, '50px', () => {
287
- this.isVisible = true;
288
- this.loadIcon();
289
- });
290
- }
291
- disconnectedCallback() {
292
- if (this.io) {
293
- this.io.disconnect();
294
- this.io = undefined;
295
- }
296
- }
297
- waitUntilVisible(el, rootMargin, cb) {
298
- if (this.lazy && typeof window !== 'undefined' && window.IntersectionObserver) {
299
- const io = this.io = new window.IntersectionObserver((data) => {
300
- if (data[0].isIntersecting) {
301
- io.disconnect();
302
- this.io = undefined;
303
- cb();
304
- }
305
- }, { rootMargin });
306
- io.observe(el);
307
- }
308
- else {
309
- // browser doesn't support IntersectionObserver
310
- // so just fallback to always show it
311
- cb();
312
- }
313
- }
314
- loadIcon() {
315
- if (this.isVisible) {
316
- const url = getUrl(this);
317
- if (url) {
318
- if (ioniconContent.has(url)) {
319
- // sync if it's already loaded
320
- this.svgContent = ioniconContent.get(url);
321
- }
322
- else {
323
- // async if it hasn't been loaded
324
- getSvgContent(url).then(() => this.svgContent = ioniconContent.get(url));
325
- }
326
- }
327
- }
328
- if (!this.ariaLabel) {
329
- const label = getName(this.name, this.icon, this.mode, this.ios, this.md);
330
- // user did not provide a label
331
- // come up with the label based on the icon name
332
- if (label) {
333
- this.ariaLabel = label.replace(/\-/g, ' ');
334
- }
335
- }
336
- }
337
- render() {
338
- const mode = this.mode || 'md';
339
- const flipRtl = this.flipRtl || (this.ariaLabel && (this.ariaLabel.indexOf('arrow') > -1 || this.ariaLabel.indexOf('chevron') > -1) && this.flipRtl !== false);
340
- return (h(Host, { role: "img", class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), { [`icon-${this.size}`]: !!this.size, 'flip-rtl': !!flipRtl && this.el.ownerDocument.dir === 'rtl' }) }, ((this.svgContent)
341
- ? h("div", { class: "icon-inner", innerHTML: this.svgContent })
342
- : h("div", { class: "icon-inner" }))));
343
- }
344
- static get assetsDirs() { return ["svg"]; }
345
- get el() { return getElement(this); }
346
- static get watchers() { return {
347
- "name": ["loadIcon"],
348
- "src": ["loadIcon"],
349
- "icon": ["loadIcon"]
350
- }; }
351
- };
352
- const getIonMode = () => (typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';
353
- const createColorClasses = (color) => {
354
- return (color) ? {
355
- 'ion-color': true,
356
- [`ion-color-${color}`]: true
357
- } : null;
358
- };
359
- Icon.style = iconCss;
360
-
361
- const labelIosCss = ".item.sc-ion-label-ios-h,.item .sc-ion-label-ios-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:border-box}.ion-color.sc-ion-label-ios-h{color:var(--ion-color-base)}.ion-text-wrap.sc-ion-label-ios-h,[text-wrap].sc-ion-label-ios-h{white-space:normal}.item-interactive-disabled.sc-ion-label-ios-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-ios-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-ios-h,.item-input .sc-ion-label-ios-h{flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-ios-h,.item-textarea .sc-ion-label-ios-h{align-self:baseline}.label-fixed.sc-ion-label-ios-h{flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-ios-h,.label-floating.sc-ion-label-ios-h{margin-bottom:0;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-ios-h{transition:none}.sc-ion-label-ios-s h1,.sc-ion-label-ios-s h2,.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-ios-h,[text-wrap].sc-ion-label-ios-h{font-size:14px;line-height:1.5}.label-stacked.sc-ion-label-ios-h{margin-bottom:4px;font-size:14px}.label-floating.sc-ion-label-ios-h{margin-bottom:0;transform:translate3d(0, 27px, 0);transform-origin:left top;transition:transform 150ms ease-in-out}[dir=rtl].sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl] .sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl].label-floating.sc-ion-label-ios-h,[dir=rtl] .label-floating.sc-ion-label-ios-h{transform-origin:right top}.item-has-focus.label-floating.sc-ion-label-ios-h,.item-has-focus .label-floating.sc-ion-label-ios-h,.item-has-placeholder.label-floating.sc-ion-label-ios-h,.item-has-placeholder .label-floating.sc-ion-label-ios-h,.item-has-value.label-floating.sc-ion-label-ios-h,.item-has-value .label-floating.sc-ion-label-ios-h{transform:translate3d(0, 0, 0) scale(0.82)}.sc-ion-label-ios-s h1{margin-left:0;margin-right:0;margin-top:3px;margin-bottom:2px;font-size:22px;font-weight:normal}.sc-ion-label-ios-s h2{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:17px;font-weight:normal}.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{margin-left:0;margin-right:0;margin-top:0;margin-bottom:3px;font-size:14px;font-weight:normal;line-height:normal}.sc-ion-label-ios-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:14px;line-height:normal;text-overflow:inherit;overflow:inherit}.sc-ion-label-ios-s>p{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.4)}.sc-ion-label-ios-h.ion-color.sc-ion-label-ios-s>p,.ion-color .sc-ion-label-ios-h.sc-ion-label-ios-s>p{color:inherit}.sc-ion-label-ios-s h2:last-child,.sc-ion-label-ios-s h3:last-child,.sc-ion-label-ios-s h4:last-child,.sc-ion-label-ios-s h5:last-child,.sc-ion-label-ios-s h6:last-child,.sc-ion-label-ios-s p:last-child{margin-bottom:0}";
362
-
363
- const labelMdCss = ".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:border-box}.ion-color.sc-ion-label-md-h{color:var(--ion-color-base)}.ion-text-wrap.sc-ion-label-md-h,[text-wrap].sc-ion-label-md-h{white-space:normal}.item-interactive-disabled.sc-ion-label-md-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-md-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-md-h,.item-input .sc-ion-label-md-h{flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-md-h,.item-textarea .sc-ion-label-md-h{align-self:baseline}.label-fixed.sc-ion-label-md-h{flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-md-h,.label-floating.sc-ion-label-md-h{margin-bottom:0;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-md-h{transition:none}.sc-ion-label-md-s h1,.sc-ion-label-md-s h2,.sc-ion-label-md-s h3,.sc-ion-label-md-s h4,.sc-ion-label-md-s h5,.sc-ion-label-md-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-md-h,[text-wrap].sc-ion-label-md-h{line-height:1.5}.label-stacked.sc-ion-label-md-h{transform-origin:left top;transform:translate3d(0, 50%, 0) scale(0.75);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl].sc-ion-label-md-h -no-combinator.label-stacked.sc-ion-label-md-h,[dir=rtl] .sc-ion-label-md-h -no-combinator.label-stacked.sc-ion-label-md-h,[dir=rtl].label-stacked.sc-ion-label-md-h,[dir=rtl] .label-stacked.sc-ion-label-md-h{transform-origin:right top}.label-floating.sc-ion-label-md-h{transform:translate3d(0, 96%, 0);transform-origin:left top;transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl].sc-ion-label-md-h -no-combinator.label-floating.sc-ion-label-md-h,[dir=rtl] .sc-ion-label-md-h -no-combinator.label-floating.sc-ion-label-md-h,[dir=rtl].label-floating.sc-ion-label-md-h,[dir=rtl] .label-floating.sc-ion-label-md-h{transform-origin:right top}.label-stacked.sc-ion-label-md-h,.label-floating.sc-ion-label-md-h{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.item-select.label-floating.sc-ion-label-md-h,.item-select .label-floating.sc-ion-label-md-h{transform:translate3d(0, 130%, 0)}.item-has-focus.label-floating.sc-ion-label-md-h,.item-has-focus .label-floating.sc-ion-label-md-h,.item-has-placeholder.label-floating.sc-ion-label-md-h,.item-has-placeholder .label-floating.sc-ion-label-md-h,.item-has-value.label-floating.sc-ion-label-md-h,.item-has-value .label-floating.sc-ion-label-md-h{transform:translate3d(0, 50%, 0) scale(0.75)}.item-has-focus.label-stacked.sc-ion-label-md-h,.item-has-focus .label-stacked.sc-ion-label-md-h,.item-has-focus.label-floating.sc-ion-label-md-h,.item-has-focus .label-floating.sc-ion-label-md-h{color:var(--ion-color-primary, #3880ff)}.sc-ion-label-md-s h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:24px;font-weight:normal}.sc-ion-label-md-s h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:16px;font-weight:normal}.sc-ion-label-md-s h3,.sc-ion-label-md-s h4,.sc-ion-label-md-s h5,.sc-ion-label-md-s h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:14px;font-weight:normal;line-height:normal}.sc-ion-label-md-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:14px;line-height:20px;text-overflow:inherit;overflow:inherit}.sc-ion-label-md-s>p{color:var(--ion-color-step-600, #666666)}.sc-ion-label-md-h.ion-color.sc-ion-label-md-s>p,.ion-color .sc-ion-label-md-h.sc-ion-label-md-s>p{color:inherit}";
364
-
365
- const Label = class {
366
- constructor(hostRef) {
367
- registerInstance(this, hostRef);
368
- this.ionStyle = createEvent(this, "ionStyle", 7);
369
- this.noAnimate = false;
370
- }
371
- componentWillLoad() {
372
- this.noAnimate = (this.position === 'floating');
373
- this.emitStyle();
374
- }
375
- componentDidLoad() {
376
- if (this.noAnimate) {
377
- setTimeout(() => {
378
- this.noAnimate = false;
379
- }, 1000);
380
- }
381
- }
382
- positionChanged() {
383
- this.emitStyle();
384
- }
385
- emitStyle() {
386
- const position = this.position;
387
- this.ionStyle.emit({
388
- 'label': true,
389
- [`label-${position}`]: position !== undefined
390
- });
391
- }
392
- render() {
393
- const position = this.position;
394
- const mode = getIonMode$1(this);
395
- return (h(Host, { class: Object.assign(Object.assign({}, createColorClasses$1(this.color)), { [mode]: true, [`label-${position}`]: position !== undefined, [`label-no-animate`]: (this.noAnimate) }) }));
396
- }
397
- get el() { return getElement(this); }
398
- static get watchers() { return {
399
- "position": ["positionChanged"]
400
- }; }
401
- };
402
- Label.style = {
403
- ios: labelIosCss,
404
- md: labelMdCss
405
- };
406
-
407
- export { Button as ion_button, Icon as ion_icon, Label as ion_label };