@ionic/core 7.5.4-nightly.20231107 → 7.5.4

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 (52) hide show
  1. package/components/form-controller.js +1 -5
  2. package/dist/cjs/{form-controller-5e223b54.js → form-controller-9343050c.js} +1 -5
  3. package/dist/cjs/ion-checkbox.cjs.entry.js +1 -1
  4. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  5. package/dist/cjs/ion-radio_2.cjs.entry.js +1 -1
  6. package/dist/cjs/ion-range.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  8. package/dist/cjs/ion-textarea.cjs.entry.js +1 -1
  9. package/dist/cjs/ion-toggle.cjs.entry.js +1 -1
  10. package/dist/cjs/ionic.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/utils/forms/form-controller.js +1 -5
  13. package/dist/docs.json +2 -2
  14. package/dist/esm/{form-controller-ed77647a.js → form-controller-64edeaad.js} +1 -5
  15. package/dist/esm/ion-checkbox.entry.js +1 -1
  16. package/dist/esm/ion-input.entry.js +1 -1
  17. package/dist/esm/ion-radio_2.entry.js +1 -1
  18. package/dist/esm/ion-range.entry.js +1 -1
  19. package/dist/esm/ion-select_3.entry.js +1 -1
  20. package/dist/esm/ion-textarea.entry.js +1 -1
  21. package/dist/esm/ion-toggle.entry.js +1 -1
  22. package/dist/esm/ionic.js +1 -1
  23. package/dist/esm-es5/{form-controller-ed77647a.js → form-controller-64edeaad.js} +1 -1
  24. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  25. package/dist/esm-es5/ion-input.entry.js +1 -1
  26. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  27. package/dist/esm-es5/ion-range.entry.js +1 -1
  28. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  29. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  30. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  31. package/dist/ionic/ionic.esm.js +1 -1
  32. package/dist/ionic/ionic.js +1 -1
  33. package/dist/ionic/{p-30d6fb24.system.entry.js → p-07fd5d40.system.entry.js} +1 -1
  34. package/dist/ionic/{p-ae590bcd.entry.js → p-3a9f1ddc.entry.js} +1 -1
  35. package/dist/ionic/{p-aa310f38.entry.js → p-49cfa5b2.entry.js} +1 -1
  36. package/dist/ionic/{p-0e7712cb.entry.js → p-4c75aded.entry.js} +1 -1
  37. package/dist/ionic/p-5370e786.js +4 -0
  38. package/dist/ionic/{p-3d726a67.system.js → p-55ed230e.system.js} +1 -1
  39. package/dist/ionic/{p-bf731526.system.entry.js → p-63676ade.system.entry.js} +1 -1
  40. package/dist/ionic/{p-d40d3245.system.entry.js → p-6867d3af.system.entry.js} +1 -1
  41. package/dist/ionic/{p-daf71560.entry.js → p-7a3766ec.entry.js} +1 -1
  42. package/dist/ionic/{p-d6c6b195.system.entry.js → p-82c17a8e.system.entry.js} +1 -1
  43. package/dist/ionic/{p-f2ad4b10.entry.js → p-852b83c7.entry.js} +1 -1
  44. package/dist/ionic/{p-dbc066cd.system.entry.js → p-8b951f8a.system.entry.js} +1 -1
  45. package/dist/ionic/{p-1ad8ddc1.system.entry.js → p-9e32dda4.system.entry.js} +1 -1
  46. package/dist/ionic/{p-9bb21465.system.entry.js → p-a99f55ed.system.entry.js} +1 -1
  47. package/dist/ionic/{p-02663394.system.js → p-c1db8914.system.js} +1 -1
  48. package/dist/ionic/{p-40762835.entry.js → p-e408b9ad.entry.js} +1 -1
  49. package/dist/ionic/{p-17ebfee6.entry.js → p-f76c3181.entry.js} +1 -1
  50. package/hydrate/index.js +19 -23
  51. package/package.json +2 -2
  52. package/dist/ionic/p-ca5cf574.js +0 -4
@@ -40,10 +40,6 @@ const createLegacyFormController = (el) => {
40
40
  return { hasLegacyControl };
41
41
  };
42
42
  const hasLabelSlot = (controlEl) => {
43
- const root = controlEl.shadowRoot;
44
- if (root === null) {
45
- return false;
46
- }
47
43
  /**
48
44
  * Components that have a named label slot
49
45
  * also have other slots, so we need to query for
@@ -62,7 +58,7 @@ const hasLabelSlot = (controlEl) => {
62
58
  }
63
59
  return false;
64
60
  };
65
- const NAMED_LABEL_SLOT_COMPONENTS = ['ION-RANGE'];
61
+ const NAMED_LABEL_SLOT_COMPONENTS = ['ION-INPUT', 'ION-TEXTAREA', 'ION-SELECT', 'ION-RANGE'];
66
62
  const UNNAMED_LABEL_SLOT_COMPONENTS = ['ION-TOGGLE', 'ION-CHECKBOX', 'ION-RADIO'];
67
63
 
68
64
  export { createLegacyFormController as c };
@@ -42,10 +42,6 @@ const createLegacyFormController = (el) => {
42
42
  return { hasLegacyControl };
43
43
  };
44
44
  const hasLabelSlot = (controlEl) => {
45
- const root = controlEl.shadowRoot;
46
- if (root === null) {
47
- return false;
48
- }
49
45
  /**
50
46
  * Components that have a named label slot
51
47
  * also have other slots, so we need to query for
@@ -64,7 +60,7 @@ const hasLabelSlot = (controlEl) => {
64
60
  }
65
61
  return false;
66
62
  };
67
- const NAMED_LABEL_SLOT_COMPONENTS = ['ION-RANGE'];
63
+ const NAMED_LABEL_SLOT_COMPONENTS = ['ION-INPUT', 'ION-TEXTAREA', 'ION-SELECT', 'ION-RANGE'];
68
64
  const UNNAMED_LABEL_SLOT_COMPONENTS = ['ION-TOGGLE', 'ION-CHECKBOX', 'ION-RADIO'];
69
65
 
70
66
  exports.createLegacyFormController = createLegacyFormController;
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
- const formController = require('./form-controller-5e223b54.js');
9
+ const formController = require('./form-controller-9343050c.js');
10
10
  const helpers = require('./helpers-ea4ccbcb.js');
11
11
  const index$1 = require('./index-cc7dfb7c.js');
12
12
  const theme = require('./theme-fbc56b3b.js');
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
- const formController = require('./form-controller-5e223b54.js');
9
+ const formController = require('./form-controller-9343050c.js');
10
10
  const notchController = require('./notch-controller-f4f6af5d.js');
11
11
  const helpers = require('./helpers-ea4ccbcb.js');
12
12
  const index$2 = require('./index-cc7dfb7c.js');
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
- const formController = require('./form-controller-5e223b54.js');
9
+ const formController = require('./form-controller-9343050c.js');
10
10
  const helpers = require('./helpers-ea4ccbcb.js');
11
11
  const index$1 = require('./index-cc7dfb7c.js');
12
12
  const theme = require('./theme-fbc56b3b.js');
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
9
  const index$2 = require('./index-da2c7a37.js');
10
- const formController = require('./form-controller-5e223b54.js');
10
+ const formController = require('./form-controller-9343050c.js');
11
11
  const helpers = require('./helpers-ea4ccbcb.js');
12
12
  const index$1 = require('./index-cc7dfb7c.js');
13
13
  const dir = require('./dir-f1e0ca26.js');
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
- const formController = require('./form-controller-5e223b54.js');
9
+ const formController = require('./form-controller-9343050c.js');
10
10
  const notchController = require('./notch-controller-f4f6af5d.js');
11
11
  const helpers = require('./helpers-ea4ccbcb.js');
12
12
  const index$1 = require('./index-cc7dfb7c.js');
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
- const formController = require('./form-controller-5e223b54.js');
9
+ const formController = require('./form-controller-9343050c.js');
10
10
  const notchController = require('./notch-controller-f4f6af5d.js');
11
11
  const helpers = require('./helpers-ea4ccbcb.js');
12
12
  const index$1 = require('./index-cc7dfb7c.js');
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-73186843.js');
9
- const formController = require('./form-controller-5e223b54.js');
9
+ const formController = require('./form-controller-9343050c.js');
10
10
  const helpers = require('./helpers-ea4ccbcb.js');
11
11
  const index$2 = require('./index-cc7dfb7c.js');
12
12
  const haptic = require('./haptic-678abc9f.js');
@@ -10,7 +10,7 @@ const appGlobals = require('./app-globals-ef077808.js');
10
10
  require('./ionic-global-4538d91c.js');
11
11
 
12
12
  /*
13
- Stencil Client Patch Browser v4.7.0 | MIT Licensed | https://stenciljs.com
13
+ Stencil Client Patch Browser v4.7.1 | MIT Licensed | https://stenciljs.com
14
14
  */
15
15
  const patchBrowser = () => {
16
16
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('ionic.cjs.js', document.baseURI).href));
@@ -94,7 +94,7 @@
94
94
  ],
95
95
  "compiler": {
96
96
  "name": "@stencil/core",
97
- "version": "4.7.0",
97
+ "version": "4.7.1",
98
98
  "typescriptVersion": "5.2.2"
99
99
  },
100
100
  "collections": [
@@ -39,10 +39,6 @@ export const createLegacyFormController = (el) => {
39
39
  return { hasLegacyControl };
40
40
  };
41
41
  const hasLabelSlot = (controlEl) => {
42
- const root = controlEl.shadowRoot;
43
- if (root === null) {
44
- return false;
45
- }
46
42
  /**
47
43
  * Components that have a named label slot
48
44
  * also have other slots, so we need to query for
@@ -61,5 +57,5 @@ const hasLabelSlot = (controlEl) => {
61
57
  }
62
58
  return false;
63
59
  };
64
- const NAMED_LABEL_SLOT_COMPONENTS = ['ION-RANGE'];
60
+ const NAMED_LABEL_SLOT_COMPONENTS = ['ION-INPUT', 'ION-TEXTAREA', 'ION-SELECT', 'ION-RANGE'];
65
61
  const UNNAMED_LABEL_SLOT_COMPONENTS = ['ION-TOGGLE', 'ION-CHECKBOX', 'ION-RADIO'];
package/dist/docs.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "timestamp": "2023-11-07T06:03:28",
2
+ "timestamp": "2023-11-08T14:43:35",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
- "version": "4.7.0",
5
+ "version": "4.7.1",
6
6
  "typescriptVersion": "5.2.2"
7
7
  },
8
8
  "components": [
@@ -40,10 +40,6 @@ const createLegacyFormController = (el) => {
40
40
  return { hasLegacyControl };
41
41
  };
42
42
  const hasLabelSlot = (controlEl) => {
43
- const root = controlEl.shadowRoot;
44
- if (root === null) {
45
- return false;
46
- }
47
43
  /**
48
44
  * Components that have a named label slot
49
45
  * also have other slots, so we need to query for
@@ -62,7 +58,7 @@ const hasLabelSlot = (controlEl) => {
62
58
  }
63
59
  return false;
64
60
  };
65
- const NAMED_LABEL_SLOT_COMPONENTS = ['ION-RANGE'];
61
+ const NAMED_LABEL_SLOT_COMPONENTS = ['ION-INPUT', 'ION-TEXTAREA', 'ION-SELECT', 'ION-RANGE'];
66
62
  const UNNAMED_LABEL_SLOT_COMPONENTS = ['ION-TOGGLE', 'ION-CHECKBOX', 'ION-RADIO'];
67
63
 
68
64
  export { createLegacyFormController as c };
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-4392ebcb.js';
5
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
5
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
6
6
  import { i as inheritAriaAttributes, d as renderHiddenInput, e as getAriaLabel } from './helpers-3379ba19.js';
7
7
  import { p as printIonWarning } from './index-595d62c9.js';
8
8
  import { c as createColorClasses, h as hostContext } from './theme-17531cdf.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement, i as forceUpdate } from './index-4392ebcb.js';
5
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
5
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
6
6
  import { c as createNotchController } from './notch-controller-8c9c0e54.js';
7
7
  import { j as debounceEvent, i as inheritAriaAttributes, k as inheritAttributes, c as componentOnReady, h as findItemLabel } from './helpers-3379ba19.js';
8
8
  import { p as printIonWarning } from './index-595d62c9.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-4392ebcb.js';
5
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
5
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
6
6
  import { a as addEventListener, b as removeEventListener, e as getAriaLabel, d as renderHiddenInput } from './helpers-3379ba19.js';
7
7
  import { p as printIonWarning } from './index-595d62c9.js';
8
8
  import { h as hostContext, c as createColorClasses } from './theme-17531cdf.js';
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-4392ebcb.js';
5
5
  import { f as findClosestIonContent, d as disableContentScrollY, r as resetContentScrollY } from './index-4392efa5.js';
6
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
6
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
7
7
  import { l as clamp, j as debounceEvent, i as inheritAriaAttributes, d as renderHiddenInput, e as getAriaLabel } from './helpers-3379ba19.js';
8
8
  import { p as printIonWarning } from './index-595d62c9.js';
9
9
  import { i as isRTL } from './dir-912e3e13.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement, i as forceUpdate } from './index-4392ebcb.js';
5
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
5
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
6
6
  import { c as createNotchController } from './notch-controller-8c9c0e54.js';
7
7
  import { k as inheritAttributes, f as focusElement, h as findItemLabel, d as renderHiddenInput, e as getAriaLabel } from './helpers-3379ba19.js';
8
8
  import { p as printIonWarning } from './index-595d62c9.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, w as writeTask, h, H as Host, f as getElement, i as forceUpdate } from './index-4392ebcb.js';
5
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
5
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
6
6
  import { c as createNotchController } from './notch-controller-8c9c0e54.js';
7
7
  import { j as debounceEvent, i as inheritAriaAttributes, k as inheritAttributes, c as componentOnReady, h as findItemLabel } from './helpers-3379ba19.js';
8
8
  import { p as printIonWarning } from './index-595d62c9.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-4392ebcb.js';
5
- import { c as createLegacyFormController } from './form-controller-ed77647a.js';
5
+ import { c as createLegacyFormController } from './form-controller-64edeaad.js';
6
6
  import { i as inheritAriaAttributes, d as renderHiddenInput, e as getAriaLabel } from './helpers-3379ba19.js';
7
7
  import { p as printIonWarning } from './index-595d62c9.js';
8
8
  import { c as hapticSelection } from './haptic-1243b917.js';
package/dist/esm/ionic.js CHANGED
@@ -7,7 +7,7 @@ import { g as globalScripts } from './app-globals-ba8b3a06.js';
7
7
  import './ionic-global-7efdecd0.js';
8
8
 
9
9
  /*
10
- Stencil Client Patch Browser v4.7.0 | MIT Licensed | https://stenciljs.com
10
+ Stencil Client Patch Browser v4.7.1 | MIT Licensed | https://stenciljs.com
11
11
  */
12
12
  const patchBrowser = () => {
13
13
  const importMeta = import.meta.url;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import{h as findItemLabel}from"./helpers-3379ba19.js";var createLegacyFormController=function(r){var e=r;var a;var l=function(){if(a===undefined){var r=e.label!==undefined||hasLabelSlot(e);var l=e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")&&e.shadowRoot===null;var n=findItemLabel(e);a=e.legacy===true||!r&&!l&&n!==null}return a};return{hasLegacyControl:l}};var hasLabelSlot=function(r){var e=r.shadowRoot;if(e===null){return false}if(NAMED_LABEL_SLOT_COMPONENTS.includes(r.tagName)&&r.querySelector('[slot="label"]')!==null){return true}if(UNNAMED_LABEL_SLOT_COMPONENTS.includes(r.tagName)&&r.textContent!==""){return true}return false};var NAMED_LABEL_SLOT_COMPONENTS=["ION-RANGE"];var UNNAMED_LABEL_SLOT_COMPONENTS=["ION-TOGGLE","ION-CHECKBOX","ION-RADIO"];export{createLegacyFormController as c};
4
+ import{h as findItemLabel}from"./helpers-3379ba19.js";var createLegacyFormController=function(r){var e=r;var a;var l=function(){if(a===undefined){var r=e.label!==undefined||hasLabelSlot(e);var l=e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")&&e.shadowRoot===null;var n=findItemLabel(e);a=e.legacy===true||!r&&!l&&n!==null}return a};return{hasLegacyControl:l}};var hasLabelSlot=function(r){if(NAMED_LABEL_SLOT_COMPONENTS.includes(r.tagName)&&r.querySelector('[slot="label"]')!==null){return true}if(UNNAMED_LABEL_SLOT_COMPONENTS.includes(r.tagName)&&r.textContent!==""){return true}return false};var NAMED_LABEL_SLOT_COMPONENTS=["ION-INPUT","ION-TEXTAREA","ION-SELECT","ION-RANGE"];var UNNAMED_LABEL_SLOT_COMPONENTS=["ION-TOGGLE","ION-CHECKBOX","ION-RADIO"];export{createLegacyFormController as c};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-4392ebcb.js";import{c as createLegacyFormController}from"./form-controller-ed77647a.js";import{i as inheritAriaAttributes,d as renderHiddenInput,e as getAriaLabel}from"./helpers-3379ba19.js";import{p as printIonWarning}from"./index-595d62c9.js";import{c as createColorClasses,h as hostContext}from"./theme-17531cdf.js";import{b as getIonMode}from"./ionic-global-7efdecd0.js";var checkboxIosCss=":host{--checkbox-background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){width:100%;height:100%}:host([slot=start]:not(.legacy-checkbox)),:host([slot=end]:not(.legacy-checkbox)){width:auto}:host(.legacy-checkbox){width:var(--size);height:var(--size)}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}:host(.legacy-checkbox) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-checkbox) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-checkbox) label{left:0}:host-context([dir=rtl]):host(.legacy-checkbox) label,:host-context([dir=rtl]).legacy-checkbox label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-checkbox:dir(rtl)) label{left:unset;right:unset;right:0}}}:host(.legacy-checkbox) label::-moz-focus-inner{border:0}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-checkbox)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-checkbox) .checkbox-icon{display:block;width:100%;height:100%}:host(:not(.legacy-checkbox)) .checkbox-icon{width:var(--size);height:var(--size)}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.0625rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.625rem, 65.988px)}:host(.checkbox-disabled){opacity:0.3}:host(.in-item.legacy-checkbox){-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:9px;display:block;position:static}:host(.in-item.legacy-checkbox[slot=start]){-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:8px;margin-bottom:8px}";var checkboxMdCss=":host{--checkbox-background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){width:100%;height:100%}:host([slot=start]:not(.legacy-checkbox)),:host([slot=end]:not(.legacy-checkbox)){width:auto}:host(.legacy-checkbox){width:var(--size);height:var(--size)}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}:host(.legacy-checkbox) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-checkbox) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-checkbox) label{left:0}:host-context([dir=rtl]):host(.legacy-checkbox) label,:host-context([dir=rtl]).legacy-checkbox label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-checkbox:dir(rtl)) label{left:unset;right:unset;right:0}}}:host(.legacy-checkbox) label::-moz-focus-inner{border:0}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-checkbox)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-checkbox) .checkbox-icon{display:block;width:100%;height:100%}:host(:not(.legacy-checkbox)) .checkbox-icon{width:var(--size);height:var(--size)}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.legacy-checkbox.checkbox-disabled),:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}:host(.in-item.legacy-checkbox){margin-left:0;margin-right:0;margin-top:18px;margin-bottom:18px;display:block;position:static}:host(.in-item.legacy-checkbox[slot=start]){-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px;margin-top:18px;margin-bottom:18px}";var Checkbox=function(){function e(e){var t=this;registerInstance(this,e);this.ionChange=createEvent(this,"ionChange",7);this.ionFocus=createEvent(this,"ionFocus",7);this.ionBlur=createEvent(this,"ionBlur",7);this.ionStyle=createEvent(this,"ionStyle",7);this.inputId="ion-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.hasLoggedDeprecationWarning=false;this.setChecked=function(e){var r=t.checked=e;t.ionChange.emit({checked:r,value:t.value})};this.toggleChecked=function(e){e.preventDefault();t.setFocus();t.setChecked(!t.checked);t.indeterminate=false};this.onFocus=function(){t.ionFocus.emit()};this.onBlur=function(){t.ionBlur.emit()};this.onClick=function(e){if(t.disabled){return}t.toggleChecked(e)};this.color=undefined;this.name=this.inputId;this.checked=false;this.indeterminate=false;this.disabled=false;this.value="on";this.labelPlacement="start";this.justify="space-between";this.alignment="center";this.legacy=undefined}e.prototype.connectedCallback=function(){this.legacyFormController=createLegacyFormController(this.el)};e.prototype.componentWillLoad=function(){this.emitStyle();if(!this.legacyFormController.hasLegacyControl()){this.inheritedAttributes=Object.assign({},inheritAriaAttributes(this.el))}};e.prototype.styleChanged=function(){this.emitStyle()};e.prototype.emitStyle=function(){var e={"interactive-disabled":this.disabled};if(this.legacyFormController.hasLegacyControl()){e["checkbox-checked"]=this.checked}this.ionStyle.emit(e)};e.prototype.setFocus=function(){if(this.focusEl){this.focusEl.focus()}};e.prototype.render=function(){var e=this.legacyFormController;return e.hasLegacyControl()?this.renderLegacyCheckbox():this.renderCheckbox()};e.prototype.renderCheckbox=function(){var e;var t=this;var r=this,o=r.color,i=r.checked,a=r.disabled,n=r.el,c=r.getSVGPath,l=r.indeterminate,s=r.inheritedAttributes,b=r.inputId,p=r.justify,x=r.labelPlacement,d=r.name,k=r.value,m=r.alignment;var g=getIonMode(this);var f=c(g,l);renderHiddenInput(true,n,d,i?k:"",a);return h(Host,{class:createColorClasses(o,(e={},e[g]=true,e["in-item"]=hostContext("ion-item",n),e["checkbox-checked"]=i,e["checkbox-disabled"]=a,e["checkbox-indeterminate"]=l,e.interactive=true,e["checkbox-justify-".concat(p)]=true,e["checkbox-alignment-".concat(m)]=true,e["checkbox-label-placement-".concat(x)]=true,e)),onClick:this.onClick},h("label",{class:"checkbox-wrapper"},h("input",Object.assign({type:"checkbox",checked:i?true:undefined,disabled:a,id:b,onChange:this.toggleChecked,onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()},ref:function(e){return t.focusEl=e}},s)),h("div",{class:{"label-text-wrapper":true,"label-text-wrapper-hidden":n.textContent===""}},h("slot",null)),h("div",{class:"native-wrapper"},h("svg",{class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},f))))};e.prototype.renderLegacyCheckbox=function(){var e;var t=this;if(!this.hasLoggedDeprecationWarning){printIonWarning('ion-checkbox now requires providing a label with either the default slot or the "aria-label" attribute. To migrate, remove any usage of "ion-label" and pass the label text to either the component or the "aria-label" attribute.\n\nExample: <ion-checkbox>Label</ion-checkbox>\nExample with aria-label: <ion-checkbox aria-label="Label"></ion-checkbox>\n\nDevelopers can use the "legacy" property to continue using the legacy form markup. This property will be removed in an upcoming major release of Ionic where this form control will use the modern form markup.',this.el);if(this.legacy){printIonWarning('ion-checkbox is being used with the "legacy" property enabled which will forcibly enable the legacy form markup. This property will be removed in an upcoming major release of Ionic where this form control will use the modern form markup.\nDevelopers can dismiss this warning by removing their usage of the "legacy" property and using the new checkbox syntax.',this.el)}this.hasLoggedDeprecationWarning=true}var r=this,o=r.color,i=r.checked,a=r.disabled,n=r.el,c=r.getSVGPath,l=r.indeterminate,s=r.inputId,b=r.name,p=r.value;var x=getIonMode(this);var d=getAriaLabel(n,s),k=d.label,m=d.labelId,g=d.labelText;var f=c(x,l);renderHiddenInput(true,n,b,i?p:"",a);return h(Host,{"aria-labelledby":k?m:null,"aria-checked":"".concat(i),"aria-hidden":a?"true":null,role:"checkbox",class:createColorClasses(o,(e={},e[x]=true,e["in-item"]=hostContext("ion-item",n),e["checkbox-checked"]=i,e["checkbox-disabled"]=a,e["checkbox-indeterminate"]=l,e["legacy-checkbox"]=true,e.interactive=true,e)),onClick:this.onClick},h("svg",{class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},f),h("label",{htmlFor:s},g),h("input",{type:"checkbox","aria-checked":"".concat(i),disabled:a,id:s,onChange:this.toggleChecked,onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()},ref:function(e){return t.focusEl=e}}))};e.prototype.getSVGPath=function(e,t){var r=t?h("path",{d:"M6 12L18 12",part:"mark"}):h("path",{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});if(e==="md"){r=t?h("path",{d:"M2 12H22",part:"mark"}):h("path",{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})}return r};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["styleChanged"],disabled:["styleChanged"]}},enumerable:false,configurable:true});return e}();var checkboxIds=0;Checkbox.style={ios:checkboxIosCss,md:checkboxMdCss};export{Checkbox as ion_checkbox};
4
+ import{r as registerInstance,d as createEvent,h,H as Host,f as getElement}from"./index-4392ebcb.js";import{c as createLegacyFormController}from"./form-controller-64edeaad.js";import{i as inheritAriaAttributes,d as renderHiddenInput,e as getAriaLabel}from"./helpers-3379ba19.js";import{p as printIonWarning}from"./index-595d62c9.js";import{c as createColorClasses,h as hostContext}from"./theme-17531cdf.js";import{b as getIonMode}from"./ionic-global-7efdecd0.js";var checkboxIosCss=":host{--checkbox-background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){width:100%;height:100%}:host([slot=start]:not(.legacy-checkbox)),:host([slot=end]:not(.legacy-checkbox)){width:auto}:host(.legacy-checkbox){width:var(--size);height:var(--size)}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}:host(.legacy-checkbox) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-checkbox) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-checkbox) label{left:0}:host-context([dir=rtl]):host(.legacy-checkbox) label,:host-context([dir=rtl]).legacy-checkbox label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-checkbox:dir(rtl)) label{left:unset;right:unset;right:0}}}:host(.legacy-checkbox) label::-moz-focus-inner{border:0}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-checkbox)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-checkbox) .checkbox-icon{display:block;width:100%;height:100%}:host(:not(.legacy-checkbox)) .checkbox-icon{width:var(--size);height:var(--size)}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.0625rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.625rem, 65.988px)}:host(.checkbox-disabled){opacity:0.3}:host(.in-item.legacy-checkbox){-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:9px;display:block;position:static}:host(.in-item.legacy-checkbox[slot=start]){-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:8px;margin-bottom:8px}";var checkboxMdCss=":host{--checkbox-background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){width:100%;height:100%}:host([slot=start]:not(.legacy-checkbox)),:host([slot=end]:not(.legacy-checkbox)){width:auto}:host(.legacy-checkbox){width:var(--size);height:var(--size)}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}:host(.legacy-checkbox) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-checkbox) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-checkbox) label{left:0}:host-context([dir=rtl]):host(.legacy-checkbox) label,:host-context([dir=rtl]).legacy-checkbox label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-checkbox:dir(rtl)) label{left:unset;right:unset;right:0}}}:host(.legacy-checkbox) label::-moz-focus-inner{border:0}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-checkbox)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-checkbox) .checkbox-icon{display:block;width:100%;height:100%}:host(:not(.legacy-checkbox)) .checkbox-icon{width:var(--size);height:var(--size)}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.legacy-checkbox.checkbox-disabled),:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}:host(.in-item.legacy-checkbox){margin-left:0;margin-right:0;margin-top:18px;margin-bottom:18px;display:block;position:static}:host(.in-item.legacy-checkbox[slot=start]){-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px;margin-top:18px;margin-bottom:18px}";var Checkbox=function(){function e(e){var t=this;registerInstance(this,e);this.ionChange=createEvent(this,"ionChange",7);this.ionFocus=createEvent(this,"ionFocus",7);this.ionBlur=createEvent(this,"ionBlur",7);this.ionStyle=createEvent(this,"ionStyle",7);this.inputId="ion-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.hasLoggedDeprecationWarning=false;this.setChecked=function(e){var r=t.checked=e;t.ionChange.emit({checked:r,value:t.value})};this.toggleChecked=function(e){e.preventDefault();t.setFocus();t.setChecked(!t.checked);t.indeterminate=false};this.onFocus=function(){t.ionFocus.emit()};this.onBlur=function(){t.ionBlur.emit()};this.onClick=function(e){if(t.disabled){return}t.toggleChecked(e)};this.color=undefined;this.name=this.inputId;this.checked=false;this.indeterminate=false;this.disabled=false;this.value="on";this.labelPlacement="start";this.justify="space-between";this.alignment="center";this.legacy=undefined}e.prototype.connectedCallback=function(){this.legacyFormController=createLegacyFormController(this.el)};e.prototype.componentWillLoad=function(){this.emitStyle();if(!this.legacyFormController.hasLegacyControl()){this.inheritedAttributes=Object.assign({},inheritAriaAttributes(this.el))}};e.prototype.styleChanged=function(){this.emitStyle()};e.prototype.emitStyle=function(){var e={"interactive-disabled":this.disabled};if(this.legacyFormController.hasLegacyControl()){e["checkbox-checked"]=this.checked}this.ionStyle.emit(e)};e.prototype.setFocus=function(){if(this.focusEl){this.focusEl.focus()}};e.prototype.render=function(){var e=this.legacyFormController;return e.hasLegacyControl()?this.renderLegacyCheckbox():this.renderCheckbox()};e.prototype.renderCheckbox=function(){var e;var t=this;var r=this,o=r.color,i=r.checked,a=r.disabled,n=r.el,c=r.getSVGPath,l=r.indeterminate,s=r.inheritedAttributes,b=r.inputId,p=r.justify,x=r.labelPlacement,d=r.name,k=r.value,m=r.alignment;var g=getIonMode(this);var f=c(g,l);renderHiddenInput(true,n,d,i?k:"",a);return h(Host,{class:createColorClasses(o,(e={},e[g]=true,e["in-item"]=hostContext("ion-item",n),e["checkbox-checked"]=i,e["checkbox-disabled"]=a,e["checkbox-indeterminate"]=l,e.interactive=true,e["checkbox-justify-".concat(p)]=true,e["checkbox-alignment-".concat(m)]=true,e["checkbox-label-placement-".concat(x)]=true,e)),onClick:this.onClick},h("label",{class:"checkbox-wrapper"},h("input",Object.assign({type:"checkbox",checked:i?true:undefined,disabled:a,id:b,onChange:this.toggleChecked,onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()},ref:function(e){return t.focusEl=e}},s)),h("div",{class:{"label-text-wrapper":true,"label-text-wrapper-hidden":n.textContent===""}},h("slot",null)),h("div",{class:"native-wrapper"},h("svg",{class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},f))))};e.prototype.renderLegacyCheckbox=function(){var e;var t=this;if(!this.hasLoggedDeprecationWarning){printIonWarning('ion-checkbox now requires providing a label with either the default slot or the "aria-label" attribute. To migrate, remove any usage of "ion-label" and pass the label text to either the component or the "aria-label" attribute.\n\nExample: <ion-checkbox>Label</ion-checkbox>\nExample with aria-label: <ion-checkbox aria-label="Label"></ion-checkbox>\n\nDevelopers can use the "legacy" property to continue using the legacy form markup. This property will be removed in an upcoming major release of Ionic where this form control will use the modern form markup.',this.el);if(this.legacy){printIonWarning('ion-checkbox is being used with the "legacy" property enabled which will forcibly enable the legacy form markup. This property will be removed in an upcoming major release of Ionic where this form control will use the modern form markup.\nDevelopers can dismiss this warning by removing their usage of the "legacy" property and using the new checkbox syntax.',this.el)}this.hasLoggedDeprecationWarning=true}var r=this,o=r.color,i=r.checked,a=r.disabled,n=r.el,c=r.getSVGPath,l=r.indeterminate,s=r.inputId,b=r.name,p=r.value;var x=getIonMode(this);var d=getAriaLabel(n,s),k=d.label,m=d.labelId,g=d.labelText;var f=c(x,l);renderHiddenInput(true,n,b,i?p:"",a);return h(Host,{"aria-labelledby":k?m:null,"aria-checked":"".concat(i),"aria-hidden":a?"true":null,role:"checkbox",class:createColorClasses(o,(e={},e[x]=true,e["in-item"]=hostContext("ion-item",n),e["checkbox-checked"]=i,e["checkbox-disabled"]=a,e["checkbox-indeterminate"]=l,e["legacy-checkbox"]=true,e.interactive=true,e)),onClick:this.onClick},h("svg",{class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},f),h("label",{htmlFor:s},g),h("input",{type:"checkbox","aria-checked":"".concat(i),disabled:a,id:s,onChange:this.toggleChecked,onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()},ref:function(e){return t.focusEl=e}}))};e.prototype.getSVGPath=function(e,t){var r=t?h("path",{d:"M6 12L18 12",part:"mark"}):h("path",{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});if(e==="md"){r=t?h("path",{d:"M2 12H22",part:"mark"}):h("path",{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})}return r};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["styleChanged"],disabled:["styleChanged"]}},enumerable:false,configurable:true});return e}();var checkboxIds=0;Checkbox.style={ios:checkboxIosCss,md:checkboxMdCss};export{Checkbox as ion_checkbox};