@ionic/core 7.5.6-dev.11700520259.172f33bb → 7.5.6-dev.11701102039.134ebc28

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 (154) hide show
  1. package/components/icon.js +17 -25
  2. package/components/index7.js +1 -1
  3. package/components/ion-datetime.js +2 -15
  4. package/dist/cjs/{index-6b8be5a4.js → index-5ea49600.js} +1 -1
  5. package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
  6. package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +1 -1
  8. package/dist/cjs/ion-button_2.cjs.entry.js +17 -25
  9. package/dist/cjs/ion-datetime_3.cjs.entry.js +3 -16
  10. package/dist/cjs/ion-fab_3.cjs.entry.js +1 -1
  11. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  12. package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
  13. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  14. package/dist/cjs/ion-refresher_2.cjs.entry.js +1 -1
  15. package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-searchbar.cjs.entry.js +1 -1
  17. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  18. package/dist/cjs/ion-toggle.cjs.entry.js +1 -1
  19. package/dist/collection/collection-manifest.json +4 -4
  20. package/dist/collection/components/datetime/datetime.js +2 -15
  21. package/dist/docs.json +21 -21
  22. package/dist/esm/{index-5d8e6a4f.js → index-d1a56aed.js} +1 -1
  23. package/dist/esm/ion-accordion_2.entry.js +1 -1
  24. package/dist/esm/ion-back-button.entry.js +1 -1
  25. package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
  26. package/dist/esm/ion-button_2.entry.js +17 -25
  27. package/dist/esm/ion-datetime_3.entry.js +3 -16
  28. package/dist/esm/ion-fab_3.entry.js +1 -1
  29. package/dist/esm/ion-input.entry.js +1 -1
  30. package/dist/esm/ion-item_8.entry.js +1 -1
  31. package/dist/esm/ion-menu_3.entry.js +1 -1
  32. package/dist/esm/ion-refresher_2.entry.js +1 -1
  33. package/dist/esm/ion-reorder_2.entry.js +1 -1
  34. package/dist/esm/ion-searchbar.entry.js +1 -1
  35. package/dist/esm/ion-select_3.entry.js +1 -1
  36. package/dist/esm/ion-toggle.entry.js +1 -1
  37. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  38. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  39. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  40. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  41. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  42. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  43. package/dist/esm-es5/ion-input.entry.js +1 -1
  44. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  45. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  46. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  47. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  48. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  49. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  50. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  51. package/dist/ionic/ionic.esm.js +1 -1
  52. package/dist/ionic/{p-8dc8c0b7.entry.js → p-04dca48d.entry.js} +1 -1
  53. package/dist/ionic/{p-85f8bc31.entry.js → p-0838e6bb.entry.js} +1 -1
  54. package/dist/ionic/{p-68d27845.system.entry.js → p-14923cd7.system.entry.js} +1 -1
  55. package/dist/ionic/{p-1f21e106.system.entry.js → p-19a7c660.system.entry.js} +1 -1
  56. package/dist/ionic/{p-1070ed59.entry.js → p-29adc040.entry.js} +1 -1
  57. package/dist/ionic/p-40903d34.system.js +1 -1
  58. package/dist/ionic/{p-edeb2f05.system.entry.js → p-42435018.system.entry.js} +1 -1
  59. package/dist/ionic/{p-52138a68.entry.js → p-431151f2.entry.js} +1 -1
  60. package/dist/ionic/p-47c2e0a5.entry.js +4 -0
  61. package/dist/ionic/{p-3f4fdd67.system.entry.js → p-4d786d1f.system.entry.js} +1 -1
  62. package/dist/ionic/{p-bb20a3fb.entry.js → p-52360c7a.entry.js} +1 -1
  63. package/dist/ionic/{p-1f011033.system.entry.js → p-61c30156.system.entry.js} +1 -1
  64. package/dist/ionic/{p-a94bed6d.system.entry.js → p-640efee6.system.entry.js} +1 -1
  65. package/dist/ionic/{p-9437dac6.system.entry.js → p-6594d76a.system.entry.js} +1 -1
  66. package/dist/ionic/{p-73ab9076.entry.js → p-68166ba6.entry.js} +1 -1
  67. package/dist/ionic/{p-324226bf.system.entry.js → p-7b4cd5fc.system.entry.js} +1 -1
  68. package/dist/ionic/{p-d4bd82e9.system.entry.js → p-7d7fdaf0.system.entry.js} +1 -1
  69. package/dist/ionic/p-8659f9a9.system.entry.js +4 -0
  70. package/dist/ionic/{p-ace47557.entry.js → p-899fb2da.entry.js} +1 -1
  71. package/dist/ionic/{p-413e5a56.entry.js → p-8cbf0979.entry.js} +1 -1
  72. package/dist/ionic/{p-d50f9c4b.entry.js → p-8d5a30dd.entry.js} +1 -1
  73. package/dist/ionic/{p-dc527a33.entry.js → p-97a96f5f.entry.js} +1 -1
  74. package/dist/ionic/p-a3cbbb36.system.entry.js +4 -0
  75. package/dist/ionic/{p-3101643f.entry.js → p-a43603ce.entry.js} +1 -1
  76. package/dist/ionic/{p-459dd2a9.entry.js → p-bd76524d.entry.js} +1 -1
  77. package/dist/ionic/{p-cb9c77e7.system.entry.js → p-c429a314.system.entry.js} +1 -1
  78. package/dist/ionic/{p-54aba2a6.system.entry.js → p-cd2808f5.system.entry.js} +1 -1
  79. package/dist/ionic/{p-5b885cc5.system.entry.js → p-dbf7d6e5.system.entry.js} +1 -1
  80. package/dist/ionic/{p-af83378e.entry.js → p-ee2469c1.entry.js} +1 -1
  81. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +1 -0
  82. package/hydrate/index.js +17 -26
  83. package/package.json +3 -4
  84. package/dist/collection/components/accordion/test/accordion.spec.js +0 -195
  85. package/dist/collection/components/action-sheet/test/action-sheet-id.spec.js +0 -32
  86. package/dist/collection/components/action-sheet/test/basic/action-sheet.spec.js +0 -18
  87. package/dist/collection/components/alert/test/alert-id.spec.js +0 -32
  88. package/dist/collection/components/alert/test/alert.spec.js +0 -37
  89. package/dist/collection/components/back-button/test/back-button.spec.js +0 -86
  90. package/dist/collection/components/breadcrumb/test/aria.spec.js +0 -22
  91. package/dist/collection/components/breadcrumbs/test/breadcrumbs.spec.js +0 -58
  92. package/dist/collection/components/button/test/form-reference/button.spec.js +0 -26
  93. package/dist/collection/components/card/test/aria.spec.js +0 -16
  94. package/dist/collection/components/checkbox/test/checkbox.spec.js +0 -20
  95. package/dist/collection/components/datetime/test/a11y/datetime.spec.js +0 -43
  96. package/dist/collection/components/datetime/test/comparison.spec.js +0 -43
  97. package/dist/collection/components/datetime/test/data.spec.js +0 -456
  98. package/dist/collection/components/datetime/test/format.spec.js +0 -124
  99. package/dist/collection/components/datetime/test/helpers.spec.js +0 -72
  100. package/dist/collection/components/datetime/test/manipulation.spec.js +0 -433
  101. package/dist/collection/components/datetime/test/parse.spec.js +0 -222
  102. package/dist/collection/components/datetime/test/state.spec.js +0 -114
  103. package/dist/collection/components/infinite-scroll-content/test/infinite-scroll-content.spec.js +0 -37
  104. package/dist/collection/components/input/test/input.spec.js +0 -85
  105. package/dist/collection/components/input/test/item/input.spec.js +0 -24
  106. package/dist/collection/components/item/test/a11y/item.spec.js +0 -48
  107. package/dist/collection/components/loading/test/basic/loading.spec.js +0 -16
  108. package/dist/collection/components/loading/test/loading-id.spec.js +0 -32
  109. package/dist/collection/components/loading/test/loading.spec.js +0 -37
  110. package/dist/collection/components/modal/test/a11y/modal.spec.js +0 -22
  111. package/dist/collection/components/modal/test/basic/modal.spec.js +0 -16
  112. package/dist/collection/components/modal/test/can-dismiss/modal.spec.js +0 -191
  113. package/dist/collection/components/modal/test/modal-id.spec.js +0 -32
  114. package/dist/collection/components/nav/test/nav-controller.spec.js +0 -749
  115. package/dist/collection/components/picker/test/picker-id.spec.js +0 -32
  116. package/dist/collection/components/picker-column/test/picker-column-aria.spec.js +0 -35
  117. package/dist/collection/components/picker-column/test/picker-column-dynamic.spec.js +0 -29
  118. package/dist/collection/components/picker-column/test/picker-column.spec.js +0 -17
  119. package/dist/collection/components/popover/test/basic/popover.spec.js +0 -16
  120. package/dist/collection/components/popover/test/popover-id.spec.js +0 -32
  121. package/dist/collection/components/popover/test/util.spec.js +0 -53
  122. package/dist/collection/components/radio/test/radio.spec.js +0 -46
  123. package/dist/collection/components/range/test/label/range.spec.js +0 -23
  124. package/dist/collection/components/range/test/range.spec.js +0 -205
  125. package/dist/collection/components/refresher-content/test/refresher-content.spec.js +0 -46
  126. package/dist/collection/components/router/test/matching.spec.js +0 -250
  127. package/dist/collection/components/router/test/parser.spec.js +0 -133
  128. package/dist/collection/components/router/test/path.spec.js +0 -218
  129. package/dist/collection/components/router/test/router.spec.js +0 -55
  130. package/dist/collection/components/searchbar/test/searchbar.spec.js +0 -15
  131. package/dist/collection/components/segment/test/segment.spec.js +0 -37
  132. package/dist/collection/components/select/test/select.spec.js +0 -59
  133. package/dist/collection/components/textarea/test/textarea.spec.js +0 -59
  134. package/dist/collection/components/toast/test/toast-id.spec.js +0 -32
  135. package/dist/collection/components/toast/test/toast.spec.js +0 -120
  136. package/dist/collection/components/toggle/test/toggle.spec.js +0 -55
  137. package/dist/collection/global/test/config-controller.spec.js +0 -77
  138. package/dist/collection/utils/animation/test/animation.spec.js +0 -431
  139. package/dist/collection/utils/keyboard/test/keyboard-controller.spec.js +0 -21
  140. package/dist/collection/utils/keyboard/test/keyboard.spec.js +0 -214
  141. package/dist/collection/utils/sanitization/test/sanitization.spec.js +0 -43
  142. package/dist/collection/utils/test/aria.spec.js +0 -79
  143. package/dist/collection/utils/test/attributes.spec.js +0 -53
  144. package/dist/collection/utils/test/hardware-back-button.spec.js +0 -53
  145. package/dist/collection/utils/test/overlays/overlays.spec.js +0 -102
  146. package/dist/collection/utils/test/platform.spec.js +0 -132
  147. package/dist/collection/utils/test/ready.spec.js +0 -39
  148. package/dist/collection/utils/test/theme.spec.js +0 -56
  149. package/dist/ionic/p-178fa84b.system.entry.js +0 -4
  150. package/dist/ionic/p-3cd4001e.system.entry.js +0 -4
  151. package/dist/ionic/p-7821df39.entry.js +0 -4
  152. /package/dist/esm-es5/{index-5d8e6a4f.js → index-d1a56aed.js} +0 -0
  153. /package/dist/ionic/{p-6856db55.js → p-6e383534.js} +0 -0
  154. /package/dist/ionic/{p-a2e89e43.system.js → p-84c6dece.system.js} +0 -0
@@ -1,43 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { IonicSafeString, sanitizeDOMString } from "..";
5
- describe('sanitizeDOMString', () => {
6
- it('disable sanitizer', () => {
7
- enableSanitizer(false);
8
- expect(sanitizeDOMString('<img src="x" onerror="alert(document.cookie);">')).toEqual('<img src="x" onerror="alert(document.cookie);">');
9
- });
10
- it('bypass sanitizer', () => {
11
- expect(sanitizeDOMString(new IonicSafeString('<img src="x" onerror="alert(document.cookie);">'))).toEqual('<img src="x" onerror="alert(document.cookie);">');
12
- });
13
- it('filter onerror', () => {
14
- expect(sanitizeDOMString('<img src="x" onerror="alert(document.cookie);">')).toEqual('<img src="x">');
15
- });
16
- it('filter onclick', () => {
17
- expect(sanitizeDOMString('<button id="myButton" name="myButton" onclick="alert(document.cookie);">harmless button</button>')).toEqual('<button id="myButton" name="myButton">harmless button</button>');
18
- });
19
- it('filter <a> href JS', () => {
20
- expect(sanitizeDOMString('<a href="javascript:alert(document.cookie)">harmless link</a>')).toEqual('<a>harmless link</a>');
21
- expect(sanitizeDOMString('<a href="javascr&Tab;ipt:alert(document.cookie)">harmless link</a>')).toEqual('<a>harmless link</a>');
22
- });
23
- it('filter <a> href JS + class attribute', () => {
24
- expect(sanitizeDOMString('<a class="link" href="Javascript&#58;alert(document.cookie)">harmless link</a>')).toEqual('<a class="link">harmless link</a>');
25
- });
26
- it('filter <iframe>', () => {
27
- expect(sanitizeDOMString('<iframe src="javascript:alert(document.cookie)"></iframe>')).toEqual('');
28
- });
29
- it('filter href + javascript ', () => {
30
- expect(sanitizeDOMString('<div><button><a href="javascript:alert(document.cookie)">click me</a></button></div>')).toEqual('<div><button><a>click me</a></button></div>');
31
- });
32
- it('filter <object>', () => {
33
- expect(sanitizeDOMString('<object><img src="x" onerror="alert(document.cookie);"></object>')).toEqual('');
34
- });
35
- it('sanitizeDOMString', () => {
36
- expect(sanitizeDOMString('<ion-item><ion-label>Hello!</ion-label><ion-button onclick="alert(document.cookie);">Click me</ion-button>')).toEqual('<ion-item><ion-label>Hello!</ion-label><ion-button>Click me</ion-button></ion-item>');
37
- });
38
- });
39
- const enableSanitizer = (enable = true) => {
40
- window.Ionic = {};
41
- window.Ionic.config = {};
42
- window.Ionic.config.sanitizerEnabled = enable;
43
- };
@@ -1,79 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { newSpecPage } from "@stencil/core/testing";
5
- import { Item } from "../../components/item/item";
6
- import { Label } from "../../components/label/label";
7
- import { Toggle } from "../../components/toggle/toggle";
8
- import { getAriaLabel } from "../helpers";
9
- describe('getAriaLabel()', () => {
10
- it('should correctly link component to label', async () => {
11
- const page = await newSpecPage({
12
- components: [Item, Label, Toggle],
13
- html: `
14
- <ion-item>
15
- <ion-label>My Label</ion-label>
16
- <ion-toggle></ion-toggle>
17
- </ion-item>
18
- `,
19
- });
20
- const toggle = page.body.querySelector('ion-toggle');
21
- const { label, labelId, labelText } = getAriaLabel(toggle, 'ion-tg-0');
22
- expect(labelText).toEqual('My Label');
23
- expect(labelId).toEqual('ion-tg-0-lbl');
24
- expect(label).toEqual(page.body.querySelector('ion-label'));
25
- });
26
- it('should correctly link component when using custom label', async () => {
27
- const page = await newSpecPage({
28
- components: [Toggle],
29
- html: `
30
- <div id="my-label">Hello World</div>
31
- <ion-toggle legacy="true" aria-labelledby="my-label"></ion-toggle>
32
- `,
33
- });
34
- const toggle = page.body.querySelector('ion-toggle');
35
- const { label, labelId, labelText } = getAriaLabel(toggle, 'ion-tg-0');
36
- expect(labelText).toEqual('Hello World');
37
- expect(labelId).toEqual('my-label');
38
- expect(label).toEqual(page.body.querySelector('#my-label'));
39
- });
40
- it('should correctly link component when special characters are used', async () => {
41
- const page = await newSpecPage({
42
- components: [Toggle],
43
- html: `
44
- <div id="id.1">Hello World</div>
45
- <ion-toggle legacy="true" aria-labelledby="id.1"></ion-toggle>
46
- `,
47
- });
48
- const toggle = page.body.querySelector('ion-toggle');
49
- const { labelId, labelText } = getAriaLabel(toggle, 'ion-tg-0');
50
- expect(labelText).toEqual('Hello World');
51
- expect(labelId).toEqual('id.1');
52
- });
53
- it('should only set the label id if one was not set already', async () => {
54
- const page = await newSpecPage({
55
- components: [Toggle],
56
- html: `
57
- <label id="my-id" for="id.1">Hello World</label>
58
- <ion-toggle legacy="true" id="id.1"></ion-toggle>
59
- `,
60
- });
61
- const toggle = page.body.querySelector('ion-toggle');
62
- const { labelId, labelText } = getAriaLabel(toggle, 'ion-tg-0');
63
- expect(labelText).toEqual('Hello World');
64
- expect(labelId).toEqual('my-id');
65
- });
66
- it('should set label id', async () => {
67
- const page = await newSpecPage({
68
- components: [Toggle],
69
- html: `
70
- <label for="id.1">Hello World</label>
71
- <ion-toggle legacy="true" id="id.1"></ion-toggle>
72
- `,
73
- });
74
- const toggle = page.body.querySelector('ion-toggle');
75
- const { labelId, labelText } = getAriaLabel(toggle, 'ion-tg-0');
76
- expect(labelText).toEqual('Hello World');
77
- expect(labelId).toEqual('id.1-lbl');
78
- });
79
- });
@@ -1,53 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { inheritAttributes, inheritAriaAttributes } from "../helpers";
5
- describe('inheritAttributes()', () => {
6
- it('should create an attribute inheritance object', () => {
7
- const el = document.createElement('div');
8
- el.setAttribute('tabindex', '20');
9
- el.setAttribute('title', 'myTitle');
10
- const attributeObject = inheritAttributes(el, ['tabindex', 'title']);
11
- expect(attributeObject).toEqual({
12
- tabindex: '20',
13
- title: 'myTitle',
14
- });
15
- });
16
- it('should not inherit attributes that are not defined on the element', () => {
17
- const el = document.createElement('div');
18
- el.setAttribute('tabindex', '20');
19
- const attributeObject = inheritAttributes(el, ['tabindex', 'title']);
20
- expect(attributeObject).toEqual({
21
- tabindex: '20',
22
- });
23
- });
24
- it('should not inherit attributes that are not defined on the input array', () => {
25
- const el = document.createElement('div');
26
- el.setAttribute('tabindex', '20');
27
- el.setAttribute('title', 'myTitle');
28
- const attributeObject = inheritAttributes(el, ['title']);
29
- expect(attributeObject).toEqual({
30
- title: 'myTitle',
31
- });
32
- });
33
- });
34
- describe('inheritAriaAttributes()', () => {
35
- it('should inherit ARIA attributes defined on the HTML element', () => {
36
- const el = document.createElement('div');
37
- el.setAttribute('aria-label', 'myLabel');
38
- el.setAttribute('aria-describedby', 'myDescription');
39
- const attributeObject = inheritAriaAttributes(el);
40
- expect(attributeObject).toEqual({
41
- 'aria-label': 'myLabel',
42
- 'aria-describedby': 'myDescription',
43
- });
44
- });
45
- it('should inherit the role attribute defined on the HTML element', () => {
46
- const el = document.createElement('div');
47
- el.setAttribute('role', 'button');
48
- const attributeObject = inheritAriaAttributes(el);
49
- expect(attributeObject).toEqual({
50
- role: 'button',
51
- });
52
- });
53
- });
@@ -1,53 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { startHardwareBackButton } from "../hardware-back-button";
5
- describe('Hardware Back Button', () => {
6
- beforeEach(() => startHardwareBackButton());
7
- it('should call handler', () => {
8
- const cbSpy = jest.fn();
9
- document.addEventListener('ionBackButton', (ev) => {
10
- ev.detail.register(0, cbSpy);
11
- });
12
- dispatchBackButtonEvent();
13
- expect(cbSpy).toHaveBeenCalled();
14
- });
15
- it('should call handlers in order of priority', () => {
16
- const cbSpy = jest.fn();
17
- const cbSpyTwo = jest.fn();
18
- document.addEventListener('ionBackButton', (ev) => {
19
- ev.detail.register(100, cbSpy);
20
- ev.detail.register(99, cbSpyTwo);
21
- });
22
- dispatchBackButtonEvent();
23
- expect(cbSpy).toHaveBeenCalled();
24
- expect(cbSpyTwo).not.toHaveBeenCalled();
25
- });
26
- it('should only call last handler to be added for handlers with same priority', () => {
27
- const cbSpy = jest.fn();
28
- const cbSpyTwo = jest.fn();
29
- document.addEventListener('ionBackButton', (ev) => {
30
- ev.detail.register(100, cbSpy);
31
- ev.detail.register(100, cbSpyTwo);
32
- });
33
- dispatchBackButtonEvent();
34
- expect(cbSpy).not.toHaveBeenCalled();
35
- expect(cbSpyTwo).toHaveBeenCalled();
36
- });
37
- it('should call multiple callbacks', () => {
38
- const cbSpy = (processNextHandler) => {
39
- processNextHandler();
40
- };
41
- const cbSpyTwo = jest.fn();
42
- document.addEventListener('ionBackButton', (ev) => {
43
- ev.detail.register(100, cbSpy);
44
- ev.detail.register(99, cbSpyTwo);
45
- });
46
- dispatchBackButtonEvent();
47
- expect(cbSpyTwo).toHaveBeenCalled();
48
- });
49
- });
50
- const dispatchBackButtonEvent = () => {
51
- const ev = new Event('backbutton');
52
- document.dispatchEvent(ev);
53
- };
@@ -1,102 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { newSpecPage } from "@stencil/core/testing";
5
- import { Modal } from "../../../components/modal/modal";
6
- import { Nav } from "../../../components/nav/nav";
7
- import { RouterOutlet } from "../../../components/router-outlet/router-outlet";
8
- import { setRootAriaHidden } from "../../overlays";
9
- describe('setRootAriaHidden()', () => {
10
- it('should correctly remove and re-add router outlet from accessibility tree', async () => {
11
- const page = await newSpecPage({
12
- components: [RouterOutlet],
13
- html: `
14
- <ion-router-outlet></ion-router-outlet>
15
- `,
16
- });
17
- const routerOutlet = page.body.querySelector('ion-router-outlet');
18
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(false);
19
- setRootAriaHidden(true);
20
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(true);
21
- setRootAriaHidden(false);
22
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(false);
23
- });
24
- it('should correctly remove and re-add nav from accessibility tree', async () => {
25
- const page = await newSpecPage({
26
- components: [Nav],
27
- html: `
28
- <ion-nav></ion-nav>
29
- `,
30
- });
31
- const nav = page.body.querySelector('ion-nav');
32
- expect(nav.hasAttribute('aria-hidden')).toEqual(false);
33
- setRootAriaHidden(true);
34
- expect(nav.hasAttribute('aria-hidden')).toEqual(true);
35
- setRootAriaHidden(false);
36
- expect(nav.hasAttribute('aria-hidden')).toEqual(false);
37
- });
38
- it('should correctly remove and re-add custom container from accessibility tree', async () => {
39
- const page = await newSpecPage({
40
- components: [],
41
- html: `
42
- <div id="ion-view-container-root"></div>
43
- <div id="not-container-root"></div>
44
- `,
45
- });
46
- const containerRoot = page.body.querySelector('#ion-view-container-root');
47
- const notContainerRoot = page.body.querySelector('#not-container-root');
48
- expect(containerRoot.hasAttribute('aria-hidden')).toEqual(false);
49
- expect(notContainerRoot.hasAttribute('aria-hidden')).toEqual(false);
50
- setRootAriaHidden(true);
51
- expect(containerRoot.hasAttribute('aria-hidden')).toEqual(true);
52
- expect(notContainerRoot.hasAttribute('aria-hidden')).toEqual(false);
53
- setRootAriaHidden(false);
54
- expect(containerRoot.hasAttribute('aria-hidden')).toEqual(false);
55
- expect(notContainerRoot.hasAttribute('aria-hidden')).toEqual(false);
56
- });
57
- it('should not error if router outlet was not found', async () => {
58
- await newSpecPage({
59
- components: [],
60
- html: `
61
- <div></div>
62
- `,
63
- });
64
- setRootAriaHidden(true);
65
- });
66
- it('should remove router-outlet from accessibility tree when overlay is presented', async () => {
67
- const page = await newSpecPage({
68
- components: [RouterOutlet, Modal],
69
- html: `
70
- <ion-router-outlet>
71
- <ion-modal></ion-modal>
72
- </ion-router-outlet>
73
- `,
74
- });
75
- const routerOutlet = page.body.querySelector('ion-router-outlet');
76
- const modal = page.body.querySelector('ion-modal');
77
- await modal.present();
78
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(true);
79
- });
80
- it('should add router-outlet from accessibility tree when then final overlay is dismissed', async () => {
81
- const page = await newSpecPage({
82
- components: [RouterOutlet, Modal],
83
- html: `
84
- <ion-router-outlet>
85
- <ion-modal id="one"></ion-modal>
86
- <ion-modal id="two"></ion-modal>
87
- </ion-router-outlet>
88
- `,
89
- });
90
- const routerOutlet = page.body.querySelector('ion-router-outlet');
91
- const modalOne = page.body.querySelector('ion-modal#one');
92
- const modalTwo = page.body.querySelector('ion-modal#two');
93
- await modalOne.present();
94
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(true);
95
- await modalTwo.present();
96
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(true);
97
- await modalOne.dismiss();
98
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(true);
99
- await modalTwo.dismiss();
100
- expect(routerOutlet.hasAttribute('aria-hidden')).toEqual(false);
101
- });
102
- });
@@ -1,132 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import initialize from "../../global/ionic-global";
5
- import { testUserAgent, getPlatforms, isPlatform } from "../platform";
6
- import { PlatformConfiguration, configureBrowser } from "./platform.utils";
7
- describe('Platform Tests', () => {
8
- describe('testUserAgent()', () => {
9
- it('should return true when testing if user agent is an iPhone', () => {
10
- const win = configureBrowser(PlatformConfiguration.iPhone);
11
- expect(testUserAgent(win, /iPhone/)).toEqual(true);
12
- });
13
- it('should return false when testing if user agent is an iPad', () => {
14
- const win = configureBrowser(PlatformConfiguration.iPhone);
15
- expect(testUserAgent(win, /iPad/)).toEqual(false);
16
- });
17
- it('should return false when testing if user agent is an Android', () => {
18
- const win = configureBrowser(PlatformConfiguration.iPhone);
19
- expect(testUserAgent(win, /android|sink/i)).toEqual(false);
20
- });
21
- it('should return true when testing if user agent is an Android', () => {
22
- const win = configureBrowser(PlatformConfiguration.AndroidTablet);
23
- expect(testUserAgent(win, /android|sink/i)).toEqual(true);
24
- });
25
- });
26
- describe('getPlatforms()', () => {
27
- it('should contain "desktop" platform', () => {
28
- const win = configureBrowser(PlatformConfiguration.DesktopSafari);
29
- expect(getPlatforms(win)).toContain('desktop');
30
- });
31
- it('should contain "android" and "tablet" platforms', () => {
32
- const win = configureBrowser(PlatformConfiguration.AndroidTablet);
33
- const platforms = getPlatforms(win);
34
- expect(platforms).toContain('android');
35
- expect(platforms).toContain('tablet');
36
- });
37
- it('should contain "capacitor" platform', () => {
38
- const win = configureBrowser(PlatformConfiguration.Capacitor);
39
- expect(getPlatforms(win)).toContain('capacitor');
40
- });
41
- });
42
- describe('isPlatform()', () => {
43
- it('should return true for "capacitor" and "hybrid" in a Capacitor app', () => {
44
- const win = configureBrowser(PlatformConfiguration.Capacitor);
45
- expect(isPlatform(win, 'capacitor')).toEqual(true);
46
- expect(isPlatform(win, 'hybrid')).toEqual(true);
47
- });
48
- it('should work without win parameter', () => {
49
- global.window = configureBrowser(PlatformConfiguration.DesktopSafari);
50
- expect(isPlatform('capacitor')).toEqual(false);
51
- expect(isPlatform('desktop')).toEqual(true);
52
- });
53
- it('should return false for "capacitor" and true for "desktop" on desktop safari', () => {
54
- const win = configureBrowser(PlatformConfiguration.DesktopSafari);
55
- expect(isPlatform(win, 'capacitor')).toEqual(false);
56
- expect(isPlatform(win, 'desktop')).toEqual(true);
57
- });
58
- it('should return true for "android" and "tablet" and false for "ios" on an android tablet', () => {
59
- const win = configureBrowser(PlatformConfiguration.AndroidTablet);
60
- expect(isPlatform(win, 'android')).toEqual(true);
61
- expect(isPlatform(win, 'tablet')).toEqual(true);
62
- expect(isPlatform(win, 'ios')).toEqual(false);
63
- });
64
- it('should return true for "cordova" and "hybrid" in a Cordova app', () => {
65
- const win = configureBrowser(PlatformConfiguration.Cordova);
66
- expect(isPlatform(win, 'cordova')).toEqual(true);
67
- expect(isPlatform(win, 'hybrid')).toEqual(true);
68
- });
69
- it('should return true for "ipad" and "tablet" on an iPad Pro', () => {
70
- const win = configureBrowser(PlatformConfiguration.iPadPro);
71
- expect(isPlatform(win, 'ipad')).toEqual(true);
72
- expect(isPlatform(win, 'tablet')).toEqual(true);
73
- });
74
- it('should return true for "android", false for "tablet, and false for "desktop"" on a Pixel 2 XL', () => {
75
- const win = configureBrowser(PlatformConfiguration.Pixel2XL);
76
- expect(isPlatform(win, 'android')).toEqual(true);
77
- expect(isPlatform(win, 'tablet')).toEqual(false);
78
- expect(isPlatform(win, 'desktop')).toEqual(false);
79
- });
80
- it('should return true for "android" and "tablet" and false for "desktop" on a Galaxy View', () => {
81
- const win = configureBrowser(PlatformConfiguration.GalaxyView);
82
- expect(isPlatform(win, 'android')).toEqual(true);
83
- expect(isPlatform(win, 'tablet')).toEqual(true);
84
- expect(isPlatform(win, 'desktop')).toEqual(false);
85
- });
86
- it('should return false for "android", "tablet", and "ipad" on desktop Safari', () => {
87
- const win = configureBrowser(PlatformConfiguration.DesktopSafari);
88
- expect(isPlatform(win, 'android')).toEqual(false);
89
- expect(isPlatform(win, 'tablet')).toEqual(false);
90
- expect(isPlatform(win, 'ipad')).toEqual(false);
91
- });
92
- it('should return false for "android" and "tablet" and false for "desktop" on iPhone', () => {
93
- const win = configureBrowser(PlatformConfiguration.iPhone);
94
- expect(isPlatform(win, 'android')).toEqual(false);
95
- expect(isPlatform(win, 'tablet')).toEqual(false);
96
- expect(isPlatform(win, 'desktop')).toEqual(false);
97
- });
98
- it('should return true for "android", false for "tablet", and false for "desktop" on Galaxy S9 Plus', () => {
99
- const win = configureBrowser(PlatformConfiguration.GalaxyS9Plus);
100
- expect(isPlatform(win, 'android')).toEqual(true);
101
- expect(isPlatform(win, 'tablet')).toEqual(false);
102
- expect(isPlatform(win, 'desktop')).toEqual(false);
103
- });
104
- it('should return true for "pwa" and false for "cordova"', () => {
105
- const win = configureBrowser(PlatformConfiguration.PWA);
106
- expect(isPlatform(win, 'pwa')).toEqual(true);
107
- expect(isPlatform(win, 'cordova')).toEqual(false);
108
- });
109
- it('should return true for "ios", "ipad", and "tablet" and false for "iphone" and "android"', () => {
110
- const win = configureBrowser(PlatformConfiguration.iPadOS);
111
- expect(isPlatform(win, 'ios')).toEqual(true);
112
- expect(isPlatform(win, 'ipad')).toEqual(true);
113
- expect(isPlatform(win, 'tablet')).toEqual(true);
114
- expect(isPlatform(win, 'iphone')).toEqual(false);
115
- expect(isPlatform(win, 'android')).toEqual(false);
116
- });
117
- });
118
- describe('Custom Platform Config', () => {
119
- it('should use custom platform detection methods', () => {
120
- const win = configureBrowser(PlatformConfiguration.DesktopSafari);
121
- initialize({
122
- platform: {
123
- desktop: () => false,
124
- cordova: () => true,
125
- },
126
- });
127
- expect(isPlatform(win, 'desktop')).toEqual(false);
128
- expect(isPlatform(win, 'cordova')).toEqual(true);
129
- expect(getPlatforms(win).includes('cordova')).toEqual(true);
130
- });
131
- });
132
- });
@@ -1,39 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { componentOnReady } from "../helpers";
5
- describe('componentOnReady()', () => {
6
- it('should correctly call callback for a custom element', (done) => {
7
- customElements.define('hello-world', class extends HTMLElement {
8
- constructor() {
9
- super();
10
- }
11
- });
12
- const component = document.createElement('hello-world');
13
- componentOnReady(component, (el) => {
14
- expect(el).toBe(component);
15
- done();
16
- });
17
- });
18
- it('should correctly call callback for a lazy loaded component', (done) => {
19
- const cb = jest.fn((el) => {
20
- return new Promise((resolve) => {
21
- setTimeout(() => resolve(el), 250);
22
- });
23
- });
24
- customElements.define('hello-world', class extends HTMLElement {
25
- constructor() {
26
- super();
27
- }
28
- componentOnReady() {
29
- return cb(this);
30
- }
31
- });
32
- const component = document.createElement('hello-world');
33
- componentOnReady(component, (el) => {
34
- expect(el).toBe(component);
35
- expect(cb).toHaveBeenCalledTimes(1);
36
- done();
37
- });
38
- });
39
- });
@@ -1,56 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import { getClassList, getClassMap } from "../theme";
5
- describe('getClassList()', () => {
6
- it('should parse string', () => {
7
- expect(getClassList(' class class-event THEME-ios-bar-button')).toEqual([
8
- 'class',
9
- 'class-event',
10
- 'THEME-ios-bar-button',
11
- ]);
12
- expect(getClassList('')).toEqual([]);
13
- expect(getClassList(' ')).toEqual([]);
14
- });
15
- it('should pass array', () => {
16
- expect(getClassList(['class', 'class-event', 'THEME-ios-bar-button'])).toEqual([
17
- 'class',
18
- 'class-event',
19
- 'THEME-ios-bar-button',
20
- ]);
21
- expect(getClassList(['class ', ' class-event', ' THEME-ios-bar-button '])).toEqual([
22
- 'class',
23
- 'class-event',
24
- 'THEME-ios-bar-button',
25
- ]);
26
- expect(getClassList(['class ', null, undefined, '', ' class-event', ' ', ' THEME-ios-bar-button '])).toEqual(['class', 'class-event', 'THEME-ios-bar-button']);
27
- });
28
- });
29
- describe('getClassMap()', () => {
30
- it('should parse string', () => {
31
- expect(getClassMap(' class class-event THEME-ios-bar-button')).toEqual({
32
- class: true,
33
- 'class-event': true,
34
- 'THEME-ios-bar-button': true,
35
- });
36
- expect(getClassMap('')).toEqual({});
37
- expect(getClassMap(' ')).toEqual({});
38
- });
39
- it('should pass array', () => {
40
- expect(getClassMap(['class', 'class-event', 'THEME-ios-bar-button'])).toEqual({
41
- class: true,
42
- 'class-event': true,
43
- 'THEME-ios-bar-button': true,
44
- });
45
- expect(getClassMap(['class ', ' class-event', ' THEME-ios-bar-button '])).toEqual({
46
- class: true,
47
- 'class-event': true,
48
- 'THEME-ios-bar-button': true,
49
- });
50
- expect(getClassMap(['class ', null, undefined, '', ' class-event', ' ', ' THEME-ios-bar-button '])).toEqual({
51
- class: true,
52
- 'class-event': true,
53
- 'THEME-ios-bar-button': true,
54
- });
55
- });
56
- });
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- System.register(["./p-d2597b3e.system.js","./p-815c2fba.system.js","./p-479cdbf8.system.js","./p-44bc8b45.system.js","./p-a545b4f1.system.js"],(function(o){"use strict";var t,n,r,i,e,a,s,c,l,d,u,b,h;return{setters:[function(o){t=o.j;n=o.r;r=o.d;i=o.h;e=o.H;a=o.f},function(o){s=o.n;c=o.i},function(o){l=o.p},function(o){d=o.o;u=o.c;b=o.h},function(o){h=o.b}],execute:function(){var f;var v=function(){if(typeof window==="undefined"){return new Map}else{if(!f){var o=window;o.Ionicons=o.Ionicons||{};f=o.Ionicons.map=o.Ionicons.map||new Map}return f}};var p=function(o){var t=k(o.src);if(t){return t}t=m(o.name,o.icon,o.mode,o.ios,o.md);if(t){return g(t,o)}if(o.icon){t=k(o.icon);if(t){return t}t=k(o.icon[o.mode]);if(t){return t}}return null};var g=function(o,n){var r=v().get(o);if(r){return r}try{return t("svg/".concat(o,".svg"))}catch(t){console.warn('[Ionicons Warning]: Could not load icon with name "'.concat(o,'". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.'),n)}};var m=function(o,t,n,r,i){n=(n&&y(n))==="ios"?"ios":"md";if(r&&n==="ios"){o=y(r)}else if(i&&n==="md"){o=y(i)}else{if(!o&&t&&!x(t)){o=t}if(w(o)){o=y(o)}}if(!w(o)||o.trim()===""){return null}var e=o.replace(/[a-z]|-|\d/gi,"");if(e!==""){return null}return o};var k=function(o){if(w(o)){o=o.trim();if(x(o)){return o}}return null};var x=function(o){return o.length>0&&/(\/|\.)/.test(o)};var w=function(o){return typeof o==="string"};var y=function(o){return o.toLowerCase()};var z=function(o,t){if(t===void 0){t=[]}var n={};t.forEach((function(t){if(o.hasAttribute(t)){var r=o.getAttribute(t);if(r!==null){n[t]=o.getAttribute(t)}o.removeAttribute(t)}}));return n};var j=function(o){if(o){if(o.dir!==""){return o.dir.toLowerCase()==="rtl"}}return(document===null||document===void 0?void 0:document.dir.toLowerCase())==="rtl"};var O=':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;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;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;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;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;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end: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:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);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;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}::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-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(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-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(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--color));color:var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff))}:host{--border-radius:14px;--padding-top:13px;--padding-bottom:13px;--padding-start:1em;--padding-end:1em;--transition:background-color, opacity 100ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:3.1em;font-size:min(1rem, 48px);font-weight:500;letter-spacing:0}: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:14px;--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-activated-opacity:0;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;font-size:min(1.0625rem, 51px);font-weight:normal}:host(.in-buttons){font-size:clamp(17px, 1.0625rem, 21.08px);font-weight:400}:host(.button-large){--border-radius:16px;--padding-top:17px;--padding-start:1em;--padding-end:1em;--padding-bottom:17px;min-height:3.1em;font-size:min(1.25rem, 60px)}:host(.button-small){--border-radius:6px;--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:min(0.8125rem, 39px)}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:0}: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-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:not(.ion-activated):hover),:host(.button-outline:not(.ion-activated):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):not(.ion-activated)) .button-native::after{background:#fff;opacity:0.1}}: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)}';var M=':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;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;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;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;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;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end: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:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);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;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}::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-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(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-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(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--color));color:var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff))}:host{--border-radius:4px;--padding-top:8px;--padding-bottom:8px;--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;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:36px;font-size:0.875rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}: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:14px;--padding-start:1em;--padding-end:1em;--padding-bottom:14px;min-height:2.8em;font-size:1.25rem}:host(.button-small){--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:0.8125rem}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:0}: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)}}';var X=o("ion_button",function(){function o(o){var t=this;n(this,o);this.ionFocus=r(this,"ionFocus",7);this.ionBlur=r(this,"ionBlur",7);this.inItem=false;this.inListHeader=false;this.inToolbar=false;this.formButtonEl=null;this.formEl=null;this.inheritedAttributes={};this.handleClick=function(o){var n=t.el;if(t.type==="button"){d(t.href,o,t.routerDirection,t.routerAnimation)}else if(s(n)){t.submitForm(o)}};this.onFocus=function(){t.ionFocus.emit()};this.onBlur=function(){t.ionBlur.emit()};this.color=undefined;this.buttonType="button";this.disabled=false;this.expand=undefined;this.fill=undefined;this.routerDirection="forward";this.routerAnimation=undefined;this.download=undefined;this.href=undefined;this.rel=undefined;this.shape=undefined;this.size=undefined;this.strong=false;this.target=undefined;this.type="button";this.form=undefined}o.prototype.disabledChanged=function(){var o=this.disabled;if(this.formButtonEl){this.formButtonEl.disabled=o}};o.prototype.renderHiddenButton=function(){var o=this.formEl=this.findForm();if(o){var t=this.formButtonEl;if(t!==null&&o.contains(t)){return}var n=this.formButtonEl=document.createElement("button");n.type=this.type;n.style.display="none";n.disabled=this.disabled;o.appendChild(n)}};o.prototype.componentWillLoad=function(){this.inToolbar=!!this.el.closest("ion-buttons");this.inListHeader=!!this.el.closest("ion-list-header");this.inItem=!!this.el.closest("ion-item")||!!this.el.closest("ion-item-divider");this.inheritedAttributes=c(this.el)};Object.defineProperty(o.prototype,"hasIconOnly",{get:function(){return!!this.el.querySelector('[slot="icon-only"]')},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"rippleType",{get:function(){var o=this.fill===undefined||this.fill==="clear";if(o&&this.hasIconOnly&&this.inToolbar){return"unbounded"}return"bounded"},enumerable:false,configurable:true});o.prototype.findForm=function(){var o=this.form;if(o instanceof HTMLFormElement){return o}if(typeof o==="string"){var t=document.getElementById(o);if(t){if(t instanceof HTMLFormElement){return t}else{l('Form with selector: "#'.concat(o,'" could not be found. Verify that the id is attached to a <form> element.'),this.el);return null}}else{l('Form with selector: "#'.concat(o,'" could not be found. Verify that the id is correct and the form is rendered in the DOM.'),this.el);return null}}if(o!==undefined){l('The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.',this.el);return null}return this.el.closest("form")};o.prototype.submitForm=function(o){if(this.formEl&&this.formButtonEl){o.preventDefault();this.formButtonEl.click()}};o.prototype.render=function(){var o;var t=h(this);var n=this,r=n.buttonType,a=n.type,s=n.disabled,c=n.rel,l=n.target,d=n.size,f=n.href,v=n.color,p=n.expand,g=n.hasIconOnly,m=n.shape,k=n.strong,x=n.inheritedAttributes;var w=d===undefined&&this.inItem?"small":d;var y=f===undefined?"button":"a";var z=y==="button"?{type:a}:{download:this.download,href:f,rel:c,target:l};var j=this.fill;if(j==null){j=this.inToolbar||this.inListHeader?"clear":"solid"}{a!=="button"&&this.renderHiddenButton()}return i(e,{onClick:this.handleClick,"aria-disabled":s?"true":null,class:u(v,(o={},o[t]=true,o[r]=true,o["".concat(r,"-").concat(p)]=p!==undefined,o["".concat(r,"-").concat(w)]=w!==undefined,o["".concat(r,"-").concat(m)]=m!==undefined,o["".concat(r,"-").concat(j)]=true,o["".concat(r,"-strong")]=k,o["in-toolbar"]=b("ion-toolbar",this.el),o["in-toolbar-color"]=b("ion-toolbar[color]",this.el),o["in-buttons"]=b("ion-buttons",this.el),o["button-has-icon-only"]=g,o["button-disabled"]=s,o["ion-activatable"]=true,o["ion-focusable"]=true,o))},i(y,Object.assign({},z,{class:"button-native",part:"native",disabled:s,onFocus:this.onFocus,onBlur:this.onBlur},x),i("span",{class:"button-inner"},i("slot",{name:"icon-only"}),i("slot",{name:"start"}),i("slot",null),i("slot",{name:"end"})),t==="md"&&i("ion-ripple-effect",{type:this.rippleType})))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{disabled:["disabledChanged"]}},enumerable:false,configurable:true});return o}());X.style={ios:O,md:M};var I=function(o){var t=document.createElement("div");t.innerHTML=o;for(var n=t.childNodes.length-1;n>=0;n--){if(t.childNodes[n].nodeName.toLowerCase()!=="svg"){t.removeChild(t.childNodes[n])}}var r=t.firstElementChild;if(r&&r.nodeName.toLowerCase()==="svg"){var i=r.getAttribute("class")||"";r.setAttribute("class",(i+" s-ion-icon").trim());if(C(r)){return t.innerHTML}}return""};var C=function(o){if(o.nodeType===1){if(o.nodeName.toLowerCase()==="script"){return false}for(var t=0;t<o.attributes.length;t++){var n=o.attributes[t].name;if(w(n)&&n.toLowerCase().indexOf("on")===0){return false}}for(var t=0;t<o.childNodes.length;t++){if(!C(o.childNodes[t])){return false}}}return true};var F=function(o){return o.startsWith("data:image/svg+xml")};var T=function(o){return o.indexOf(";utf8,")!==-1};var D=new Map;var E=new Map;var H;var L=function(o,t){var n=E.get(o);if(!n){if(typeof fetch!=="undefined"&&typeof document!=="undefined"){if(F(o)&&T(o)){if(!H){H=new DOMParser}var r=H.parseFromString(o,"text/html");var i=r.querySelector("svg");if(i){D.set(o,i.outerHTML)}return Promise.resolve()}else{n=fetch(o).then((function(n){if(n.ok){return n.text().then((function(n){if(n&&t!==false){n=I(n)}D.set(o,n||"")}))}D.set(o,"")}));E.set(o,n)}}else{D.set(o,"");return Promise.resolve()}}return n};var V=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box !important;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%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !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)}";var P=o("ion_icon",function(){function o(o){n(this,o);this.iconName=null;this.inheritedAttributes={};this.svgContent=undefined;this.isVisible=false;this.mode=B();this.color=undefined;this.ios=undefined;this.md=undefined;this.flipRtl=undefined;this.name=undefined;this.src=undefined;this.icon=undefined;this.size=undefined;this.lazy=false;this.sanitize=true}o.prototype.componentWillLoad=function(){this.inheritedAttributes=z(this.el,["aria-label"])};o.prototype.connectedCallback=function(){var o=this;this.waitUntilVisible(this.el,"50px",(function(){o.isVisible=true;o.loadIcon()}))};o.prototype.disconnectedCallback=function(){if(this.io){this.io.disconnect();this.io=undefined}};o.prototype.waitUntilVisible=function(o,t,n){var r=this;if(this.lazy&&typeof window!=="undefined"&&window.IntersectionObserver){var i=this.io=new window.IntersectionObserver((function(o){if(o[0].isIntersecting){i.disconnect();r.io=undefined;n()}}),{rootMargin:t});i.observe(o)}else{n()}};o.prototype.loadIcon=function(){var o=this;if(this.isVisible){var t=p(this);if(t){if(D.has(t)){this.svgContent=D.get(t)}else{L(t,this.sanitize).then((function(){return o.svgContent=D.get(t)}))}}}this.iconName=m(this.name,this.icon,this.mode,this.ios,this.md)};o.prototype.render=function(){var o,t;var n=this,r=n.flipRtl,a=n.iconName,s=n.inheritedAttributes,c=n.el;var l=this.mode||"md";var d=a?(a.includes("arrow")||a.includes("chevron"))&&r!==false:false;var u=r||d;return i(e,Object.assign({role:"img",class:Object.assign(Object.assign((o={},o[l]=true,o),S(this.color)),(t={},t["icon-".concat(this.size)]=!!this.size,t["flip-rtl"]=u,t["icon-rtl"]=u&&j(c),t))},s),this.svgContent?i("div",{class:"icon-inner",innerHTML:this.svgContent}):i("div",{class:"icon-inner"}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["svg"]},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}},enumerable:false,configurable:true});return o}());var B=function(){return typeof document!=="undefined"&&document.documentElement.getAttribute("mode")||"md"};var S=function(o){var t;return o?(t={"ion-color":true},t["ion-color-".concat(o)]=true,t):null};P.style=V}}}));