@ionic/core 8.2.8 → 8.3.0

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 (65) hide show
  1. package/components/checkbox.js +9 -9
  2. package/components/ion-select.js +6 -6
  3. package/components/ion-tabs.js +12 -2
  4. package/components/ion-toggle.js +9 -9
  5. package/components/radio.js +9 -9
  6. package/dist/cjs/ion-checkbox.cjs.entry.js +9 -9
  7. package/dist/cjs/ion-radio_2.cjs.entry.js +9 -9
  8. package/dist/cjs/ion-select_3.cjs.entry.js +6 -6
  9. package/dist/cjs/ion-tab_2.cjs.entry.js +12 -2
  10. package/dist/cjs/ion-toggle.cjs.entry.js +9 -9
  11. package/dist/collection/components/checkbox/checkbox.ios.css +9 -0
  12. package/dist/collection/components/checkbox/checkbox.js +15 -17
  13. package/dist/collection/components/checkbox/checkbox.md.css +9 -0
  14. package/dist/collection/components/radio/radio.ios.css +9 -0
  15. package/dist/collection/components/radio/radio.js +15 -17
  16. package/dist/collection/components/radio/radio.md.css +9 -0
  17. package/dist/collection/components/select/select.ios.css +1 -0
  18. package/dist/collection/components/select/select.js +7 -8
  19. package/dist/collection/components/select/select.md.css +1 -0
  20. package/dist/collection/components/tabs/tabs.js +12 -2
  21. package/dist/collection/components/toggle/toggle.ios.css +10 -0
  22. package/dist/collection/components/toggle/toggle.js +15 -17
  23. package/dist/collection/components/toggle/toggle.md.css +10 -0
  24. package/dist/docs.json +49 -35
  25. package/dist/esm/ion-checkbox.entry.js +9 -9
  26. package/dist/esm/ion-radio_2.entry.js +9 -9
  27. package/dist/esm/ion-select_3.entry.js +6 -6
  28. package/dist/esm/ion-tab_2.entry.js +12 -2
  29. package/dist/esm/ion-toggle.entry.js +9 -9
  30. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  31. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  32. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  33. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  34. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  35. package/dist/html.html-data.json +6 -6
  36. package/dist/ionic/ionic.esm.js +1 -1
  37. package/dist/ionic/p-42b70cc3.system.entry.js +4 -0
  38. package/dist/ionic/p-4559c9cd.entry.js +4 -0
  39. package/dist/ionic/p-491deb33.entry.js +4 -0
  40. package/dist/ionic/p-50c38a28.system.entry.js +4 -0
  41. package/dist/ionic/p-5749f245.system.entry.js +4 -0
  42. package/dist/ionic/p-76256933.system.entry.js +4 -0
  43. package/dist/ionic/p-89611183.system.js +1 -1
  44. package/dist/ionic/p-9a64afc9.entry.js +4 -0
  45. package/dist/ionic/p-b6fbbe81.system.entry.js +4 -0
  46. package/dist/ionic/p-cc35239f.entry.js +4 -0
  47. package/dist/ionic/p-ccfe13f3.entry.js +4 -0
  48. package/dist/types/components/checkbox/checkbox.d.ts +4 -2
  49. package/dist/types/components/radio/radio.d.ts +4 -2
  50. package/dist/types/components/select/select.d.ts +1 -1
  51. package/dist/types/components/toggle/toggle.d.ts +4 -2
  52. package/dist/types/components.d.ts +19 -19
  53. package/hydrate/index.js +45 -35
  54. package/hydrate/index.mjs +45 -35
  55. package/package.json +1 -1
  56. package/dist/ionic/p-13265275.system.entry.js +0 -4
  57. package/dist/ionic/p-1979e535.system.entry.js +0 -4
  58. package/dist/ionic/p-1e423a83.entry.js +0 -4
  59. package/dist/ionic/p-2bb4b550.system.entry.js +0 -4
  60. package/dist/ionic/p-49682936.entry.js +0 -4
  61. package/dist/ionic/p-5ed06a13.system.entry.js +0 -4
  62. package/dist/ionic/p-afc9f5ed.system.entry.js +0 -4
  63. package/dist/ionic/p-e98d4eb6.entry.js +0 -4
  64. package/dist/ionic/p-eb43e72a.entry.js +0 -4
  65. package/dist/ionic/p-fa0d9805.entry.js +0 -4
@@ -56,8 +56,8 @@ export class Checkbox {
56
56
  this.disabled = false;
57
57
  this.value = 'on';
58
58
  this.labelPlacement = 'start';
59
- this.justify = 'space-between';
60
- this.alignment = 'center';
59
+ this.justify = undefined;
60
+ this.alignment = undefined;
61
61
  }
62
62
  componentWillLoad() {
63
63
  this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
@@ -72,20 +72,20 @@ export class Checkbox {
72
72
  const mode = getIonMode(this);
73
73
  const path = getSVGPath(mode, indeterminate);
74
74
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
75
- return (h(Host, { key: '0ac95890562c7f035704c40959c69f8c8ca4bc9f', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses(color, {
75
+ return (h(Host, { key: 'd7a07fbf130413eaa4622c07786e8a00723113eb', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses(color, {
76
76
  [mode]: true,
77
77
  'in-item': hostContext('ion-item', el),
78
78
  'checkbox-checked': checked,
79
79
  'checkbox-disabled': disabled,
80
80
  'checkbox-indeterminate': indeterminate,
81
81
  interactive: true,
82
- [`checkbox-justify-${justify}`]: true,
83
- [`checkbox-alignment-${alignment}`]: true,
82
+ [`checkbox-justify-${justify}`]: justify !== undefined,
83
+ [`checkbox-alignment-${alignment}`]: alignment !== undefined,
84
84
  [`checkbox-label-placement-${labelPlacement}`]: true,
85
- }), onClick: this.onClick }, h("label", { key: '3f9f7c8383dded8f7997086b25399d052df76b5c', class: "checkbox-wrapper" }, h("input", Object.assign({ key: '6fb11d06c424c289357d5d7c1a4d1b967be231d0', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, inheritedAttributes)), h("div", { key: 'f577a272e5e3f9f1852fc95e40466c80b76309c7', class: {
85
+ }), onClick: this.onClick }, h("label", { key: '99797589ed4ea7cbac53531c85b2d4a2dcd568c4', class: "checkbox-wrapper" }, h("input", Object.assign({ key: 'cc12fe7920ab23c6f21546f7b312b8f1f5671349', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, inheritedAttributes)), h("div", { key: '1b087f061da5abca6129d372503d8882b77e24be', class: {
86
86
  'label-text-wrapper': true,
87
87
  'label-text-wrapper-hidden': el.textContent === '',
88
- }, part: "label" }, h("slot", { key: '7c9b0b4513e797a1acdf55a5f286563e5f397e9c' })), h("div", { key: 'e47c50a078b8d761ddc5efcb9a9635281b5818f6', class: "native-wrapper" }, h("svg", { key: '4dca47179ae15e9094e01c799ef4ed25fbb0d840', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
88
+ }, part: "label" }, h("slot", { key: 'bc84274c826fa1db1207230aa03bf5790afe2992' })), h("div", { key: '89e9396dc9215804bd8ac42e943a292d050ef8c5', class: "native-wrapper" }, h("svg", { key: '2aafac248c639074faaf17044d8d9204474a9b7b', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
89
89
  }
90
90
  getSVGPath(mode, indeterminate) {
91
91
  let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
@@ -246,36 +246,34 @@ export class Checkbox {
246
246
  "mutable": false,
247
247
  "complexType": {
248
248
  "original": "'start' | 'end' | 'space-between'",
249
- "resolved": "\"end\" | \"space-between\" | \"start\"",
249
+ "resolved": "\"end\" | \"space-between\" | \"start\" | undefined",
250
250
  "references": {}
251
251
  },
252
252
  "required": false,
253
- "optional": false,
253
+ "optional": true,
254
254
  "docs": {
255
255
  "tags": [],
256
- "text": "How to pack the label and checkbox within a line.\n`\"start\"`: The label and checkbox will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and checkbox will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and checkbox will appear on opposite\nends of the line with space between the two elements."
256
+ "text": "How to pack the label and checkbox within a line.\n`\"start\"`: The label and checkbox will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and checkbox will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and checkbox will appear on opposite\nends of the line with space between the two elements.\nSetting this property will change the checkbox `display` to `block`."
257
257
  },
258
258
  "attribute": "justify",
259
- "reflect": false,
260
- "defaultValue": "'space-between'"
259
+ "reflect": false
261
260
  },
262
261
  "alignment": {
263
262
  "type": "string",
264
263
  "mutable": false,
265
264
  "complexType": {
266
265
  "original": "'start' | 'center'",
267
- "resolved": "\"center\" | \"start\"",
266
+ "resolved": "\"center\" | \"start\" | undefined",
268
267
  "references": {}
269
268
  },
270
269
  "required": false,
271
- "optional": false,
270
+ "optional": true,
272
271
  "docs": {
273
272
  "tags": [],
274
- "text": "How to control the alignment of the checkbox and label on the cross axis.\n`\"start\"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.\n`\"center\"`: The label and control will appear at the center of the cross axis in both LTR and RTL."
273
+ "text": "How to control the alignment of the checkbox and label on the cross axis.\n`\"start\"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.\n`\"center\"`: The label and control will appear at the center of the cross axis in both LTR and RTL.\nSetting this property will change the checkbox `display` to `block`."
275
274
  },
276
275
  "attribute": "alignment",
277
- "reflect": false,
278
- "defaultValue": "'center'"
276
+ "reflect": false
279
277
  }
280
278
  };
281
279
  }
@@ -110,6 +110,7 @@
110
110
  display: flex;
111
111
  flex-grow: 1;
112
112
  align-items: center;
113
+ justify-content: space-between;
113
114
  height: inherit;
114
115
  cursor: inherit;
115
116
  }
@@ -207,6 +208,14 @@ input {
207
208
  align-items: center;
208
209
  }
209
210
 
211
+ :host(.checkbox-justify-space-between),
212
+ :host(.checkbox-justify-start),
213
+ :host(.checkbox-justify-end),
214
+ :host(.checkbox-alignment-start),
215
+ :host(.checkbox-alignment-center) {
216
+ display: block;
217
+ }
218
+
210
219
  /**
211
220
  * Label is on the left of the checkbox in LTR and
212
221
  * on the right in RTL.
@@ -135,6 +135,7 @@ input {
135
135
  position: relative;
136
136
  flex-grow: 1;
137
137
  align-items: center;
138
+ justify-content: space-between;
138
139
  height: inherit;
139
140
  min-height: inherit;
140
141
  cursor: inherit;
@@ -194,6 +195,14 @@ input {
194
195
  align-items: center;
195
196
  }
196
197
 
198
+ :host(.radio-justify-space-between),
199
+ :host(.radio-justify-start),
200
+ :host(.radio-justify-end),
201
+ :host(.radio-alignment-start),
202
+ :host(.radio-alignment-center) {
203
+ display: block;
204
+ }
205
+
197
206
  /**
198
207
  * Label is on the left of the radio in LTR and
199
208
  * on the right in RTL.
@@ -59,8 +59,8 @@ export class Radio {
59
59
  this.disabled = false;
60
60
  this.value = undefined;
61
61
  this.labelPlacement = 'start';
62
- this.justify = 'space-between';
63
- this.alignment = 'center';
62
+ this.justify = undefined;
63
+ this.alignment = undefined;
64
64
  }
65
65
  valueChanged() {
66
66
  /**
@@ -118,21 +118,21 @@ export class Radio {
118
118
  const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
119
119
  const mode = getIonMode(this);
120
120
  const inItem = hostContext('ion-item', el);
121
- return (h(Host, { key: '43c95effb6acb119733270e8a5e02fe18b47ee4b', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
121
+ return (h(Host, { key: 'd6d9525eea9dadc3ea7060eb9b8cbb919e1d7091', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
122
122
  [mode]: true,
123
123
  'in-item': inItem,
124
124
  'radio-checked': checked,
125
125
  'radio-disabled': disabled,
126
- [`radio-justify-${justify}`]: true,
127
- [`radio-alignment-${alignment}`]: true,
126
+ [`radio-justify-${justify}`]: justify !== undefined,
127
+ [`radio-alignment-${alignment}`]: alignment !== undefined,
128
128
  [`radio-label-placement-${labelPlacement}`]: true,
129
129
  // Focus and active styling should not apply when the radio is in an item
130
130
  'ion-activatable': !inItem,
131
131
  'ion-focusable': !inItem,
132
- }), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, h("label", { key: '168ea77c08fde9832077d617662b93dc9986b544', class: "radio-wrapper" }, h("div", { key: 'ce1e6eee63fbab1e5a66b18f767f4eecc2a227f1', class: {
132
+ }), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, h("label", { key: '3ec73512bac8feb651c66e544899c6a4330d504c', class: "radio-wrapper" }, h("div", { key: '9ae7ecb19c7bafe0ce3d0f717af0338251964ebf', class: {
133
133
  'label-text-wrapper': true,
134
134
  'label-text-wrapper-hidden': !hasLabel,
135
- }, part: "label" }, h("slot", { key: '7d849e43d4356b5c3978c2bba9a6fba5d21ca69d' })), h("div", { key: 'e741f7822364958b050a232bdfccdc413095c244', class: "native-wrapper" }, this.renderRadioControl()))));
135
+ }, part: "label" }, h("slot", { key: '2950f1579a22d4a06f9c903fd462c2b46f43bfd7' })), h("div", { key: '8b19ce30b39066744108a6de2da42a7ce8ffdbec', class: "native-wrapper" }, this.renderRadioControl()))));
136
136
  }
137
137
  static get is() { return "ion-radio"; }
138
138
  static get encapsulation() { return "shadow"; }
@@ -249,36 +249,34 @@ export class Radio {
249
249
  "mutable": false,
250
250
  "complexType": {
251
251
  "original": "'start' | 'end' | 'space-between'",
252
- "resolved": "\"end\" | \"space-between\" | \"start\"",
252
+ "resolved": "\"end\" | \"space-between\" | \"start\" | undefined",
253
253
  "references": {}
254
254
  },
255
255
  "required": false,
256
- "optional": false,
256
+ "optional": true,
257
257
  "docs": {
258
258
  "tags": [],
259
- "text": "How to pack the label and radio within a line.\n`\"start\"`: The label and radio will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and radio will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and radio will appear on opposite\nends of the line with space between the two elements."
259
+ "text": "How to pack the label and radio within a line.\n`\"start\"`: The label and radio will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and radio will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and radio will appear on opposite\nends of the line with space between the two elements.\nSetting this property will change the radio `display` to `block`."
260
260
  },
261
261
  "attribute": "justify",
262
- "reflect": false,
263
- "defaultValue": "'space-between'"
262
+ "reflect": false
264
263
  },
265
264
  "alignment": {
266
265
  "type": "string",
267
266
  "mutable": false,
268
267
  "complexType": {
269
268
  "original": "'start' | 'center'",
270
- "resolved": "\"center\" | \"start\"",
269
+ "resolved": "\"center\" | \"start\" | undefined",
271
270
  "references": {}
272
271
  },
273
272
  "required": false,
274
- "optional": false,
273
+ "optional": true,
275
274
  "docs": {
276
275
  "tags": [],
277
- "text": "How to control the alignment of the radio and label on the cross axis.\n`\"start\"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.\n`\"center\"`: The label and control will appear at the center of the cross axis in both LTR and RTL."
276
+ "text": "How to control the alignment of the radio and label on the cross axis.\n`\"start\"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.\n`\"center\"`: The label and control will appear at the center of the cross axis in both LTR and RTL.\nSetting this property will change the radio `display` to `block`."
278
277
  },
279
278
  "attribute": "alignment",
280
- "reflect": false,
281
- "defaultValue": "'center'"
279
+ "reflect": false
282
280
  }
283
281
  };
284
282
  }
@@ -135,6 +135,7 @@ input {
135
135
  position: relative;
136
136
  flex-grow: 1;
137
137
  align-items: center;
138
+ justify-content: space-between;
138
139
  height: inherit;
139
140
  min-height: inherit;
140
141
  cursor: inherit;
@@ -194,6 +195,14 @@ input {
194
195
  align-items: center;
195
196
  }
196
197
 
198
+ :host(.radio-justify-space-between),
199
+ :host(.radio-justify-start),
200
+ :host(.radio-justify-end),
201
+ :host(.radio-alignment-start),
202
+ :host(.radio-alignment-center) {
203
+ display: block;
204
+ }
205
+
197
206
  /**
198
207
  * Label is on the left of the radio in LTR and
199
208
  * on the right in RTL.
@@ -239,6 +239,7 @@ button {
239
239
  position: relative;
240
240
  flex-grow: 1;
241
241
  align-items: center;
242
+ justify-content: space-between;
242
243
  height: inherit;
243
244
  /**
244
245
  * This allows developers to set the height
@@ -79,7 +79,7 @@ export class Select {
79
79
  this.fill = undefined;
80
80
  this.interface = 'alert';
81
81
  this.interfaceOptions = {};
82
- this.justify = 'space-between';
82
+ this.justify = undefined;
83
83
  this.label = undefined;
84
84
  this.labelPlacement = 'start';
85
85
  this.multiple = false;
@@ -598,7 +598,7 @@ export class Select {
598
598
  const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
599
599
  const mode = getIonMode(this);
600
600
  const hasFloatingOrStackedLabel = labelPlacement === 'floating' || labelPlacement === 'stacked';
601
- const justifyEnabled = !hasFloatingOrStackedLabel;
601
+ const justifyEnabled = !hasFloatingOrStackedLabel && justify !== undefined;
602
602
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
603
603
  const inItem = hostContext('ion-item', this.el);
604
604
  const shouldRenderHighlight = mode === 'md' && fill !== 'outline' && !inItem;
@@ -623,7 +623,7 @@ export class Select {
623
623
  * TODO(FW-5592): Remove hasStartEndSlots condition
624
624
  */
625
625
  const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
626
- return (h(Host, { key: 'e14586e887c0b73457b9f1e8f0585dfc7d590051', onClick: this.onClick, class: createColorClasses(this.color, {
626
+ return (h(Host, { key: '73c571c1f8468e1c3f4fe02fbbb33ba9cbc8e989', onClick: this.onClick, class: createColorClasses(this.color, {
627
627
  [mode]: true,
628
628
  'in-item': inItem,
629
629
  'in-item-color': hostContext('ion-item.ion-color', el),
@@ -639,7 +639,7 @@ export class Select {
639
639
  [`select-justify-${justify}`]: justifyEnabled,
640
640
  [`select-shape-${shape}`]: shape !== undefined,
641
641
  [`select-label-placement-${labelPlacement}`]: true,
642
- }) }, h("label", { key: 'b44929542c809f2dca25afc588701762a083edd1', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '195e3fad9cea0363ff00bf257ec2975fe5aa6887', class: "select-wrapper-inner" }, h("slot", { key: '9da7161a69b92d6fd124a478348d3fa420092f26', name: "start" }), h("div", { key: '49c589c164d167de0ba5741a0c80fba58ea0bec6', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: 'de1536d910fceb8e2dbdda13abcf88ee969888b8', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'e821b7b32cd1996eaa6d471df9b531ad0d491098', class: "select-highlight" }))));
642
+ }) }, h("label", { key: '2b08538cba0b9f747541d57ac18fb6a1ea658878', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '33f54373bcb02c72a9d0af2efffebc27ee2c69fe', class: "select-wrapper-inner" }, h("slot", { key: 'd1c93aec99dc1cd6410f93309cef615fe04b541b', name: "start" }), h("div", { key: '493d1a3cad9565516f855bef75685b020785ffd3', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '353a3ee5635f8a8f3be411efd6caef6c2ad74a89', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'fd5f85555db02affe954f9f4f2876ac8fe676234', class: "select-highlight" }))));
643
643
  }
644
644
  static get is() { return "ion-select"; }
645
645
  static get encapsulation() { return "shadow"; }
@@ -803,18 +803,17 @@ export class Select {
803
803
  "mutable": false,
804
804
  "complexType": {
805
805
  "original": "'start' | 'end' | 'space-between'",
806
- "resolved": "\"end\" | \"space-between\" | \"start\"",
806
+ "resolved": "\"end\" | \"space-between\" | \"start\" | undefined",
807
807
  "references": {}
808
808
  },
809
809
  "required": false,
810
- "optional": false,
810
+ "optional": true,
811
811
  "docs": {
812
812
  "tags": [],
813
813
  "text": "How to pack the label and select within a line.\n`justify` does not apply when the label and select\nare on different lines when `labelPlacement` is set to\n`\"floating\"` or `\"stacked\"`.\n`\"start\"`: The label and select will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and select will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and select will appear on opposite\nends of the line with space between the two elements."
814
814
  },
815
815
  "attribute": "justify",
816
- "reflect": false,
817
- "defaultValue": "'space-between'"
816
+ "reflect": false
818
817
  },
819
818
  "label": {
820
819
  "type": "string",
@@ -239,6 +239,7 @@ button {
239
239
  position: relative;
240
240
  flex-grow: 1;
241
241
  align-items: center;
242
+ justify-content: space-between;
242
243
  height: inherit;
243
244
  /**
244
245
  * This allows developers to set the height
@@ -27,7 +27,17 @@ export class Tabs {
27
27
  }
28
28
  async componentWillLoad() {
29
29
  if (!this.useRouter) {
30
- this.useRouter = !!document.querySelector('ion-router') && !this.el.closest('[no-router]');
30
+ /**
31
+ * JavaScript and StencilJS use `ion-router`, while
32
+ * the other frameworks use `ion-router-outlet`.
33
+ *
34
+ * If either component is present then tabs will not use
35
+ * a basic tab-based navigation. It will use the history
36
+ * stack or URL updates associated with the router.
37
+ */
38
+ this.useRouter =
39
+ (!!this.el.querySelector('ion-router-outlet') || !!document.querySelector('ion-router')) &&
40
+ !this.el.closest('[no-router]');
31
41
  }
32
42
  if (!this.useRouter) {
33
43
  const tabs = this.tabs;
@@ -135,7 +145,7 @@ export class Tabs {
135
145
  return Array.from(this.el.querySelectorAll('ion-tab'));
136
146
  }
137
147
  render() {
138
- return (h(Host, { key: '239bdb2ff2ec5cfcc74c51812cf6240f48acc617', onIonTabButtonClick: this.onTabClicked }, h("slot", { key: '2b266d0f87c7c82e992fe0d9b5c8f25569b118e3', name: "top" }), h("div", { key: '4cbbd010f0b0b1cd82714db7d098d28fab6d5218', class: "tabs-inner" }, h("slot", { key: '72b2a02cd29d5b30e47758f3d6daaa1021916256' })), h("slot", { key: '25494076dbbf7606d477b44f1b969719e7b4a805', name: "bottom" })));
148
+ return (h(Host, { key: 'eb094c9bd15b7777c53bd0bd6d225784fa472849', onIonTabButtonClick: this.onTabClicked }, h("slot", { key: 'a516ca6915bf26e77eeeb0ff684c4fcc7d4420a7', name: "top" }), h("div", { key: 'dd2a32a072d77afe216abc4958c1d686405fb780', class: "tabs-inner" }, h("slot", { key: '222c20ba862068f5c78e7bbef4fa213499fb2fa5' })), h("slot", { key: '3e76dcb1b21873aa137d095c56131514054ead3a', name: "bottom" })));
139
149
  }
140
150
  static get is() { return "ion-tabs"; }
141
151
  static get encapsulation() { return "shadow"; }
@@ -130,6 +130,8 @@ input {
130
130
  display: flex;
131
131
  position: relative;
132
132
  flex-grow: 1;
133
+ align-items: center;
134
+ justify-content: space-between;
133
135
  height: inherit;
134
136
  transition: background-color 15ms linear;
135
137
  cursor: inherit;
@@ -189,6 +191,14 @@ input {
189
191
  align-items: center;
190
192
  }
191
193
 
194
+ :host(.toggle-justify-space-between),
195
+ :host(.toggle-justify-start),
196
+ :host(.toggle-justify-end),
197
+ :host(.toggle-alignment-start),
198
+ :host(.toggle-alignment-center) {
199
+ display: block;
200
+ }
201
+
192
202
  /**
193
203
  * Label is on the left of the input in LTR and
194
204
  * on the right in RTL.
@@ -69,8 +69,8 @@ export class Toggle {
69
69
  this.value = 'on';
70
70
  this.enableOnOffLabels = config.get('toggleOnOffLabels');
71
71
  this.labelPlacement = 'start';
72
- this.justify = 'space-between';
73
- this.alignment = 'center';
72
+ this.justify = undefined;
73
+ this.alignment = undefined;
74
74
  }
75
75
  disabledChanged() {
76
76
  if (this.gesture) {
@@ -157,20 +157,20 @@ export class Toggle {
157
157
  const value = this.getValue();
158
158
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
159
159
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
160
- return (h(Host, { key: 'b0d648e071bc8095998b519ce4dcdd0ea91575c0', onClick: this.onClick, class: createColorClasses(color, {
160
+ return (h(Host, { key: '8f024fb0fbc2d4442be0574b03450426e8e4fc9e', onClick: this.onClick, class: createColorClasses(color, {
161
161
  [mode]: true,
162
162
  'in-item': hostContext('ion-item', el),
163
163
  'toggle-activated': activated,
164
164
  'toggle-checked': checked,
165
165
  'toggle-disabled': disabled,
166
- [`toggle-justify-${justify}`]: true,
167
- [`toggle-alignment-${alignment}`]: true,
166
+ [`toggle-justify-${justify}`]: justify !== undefined,
167
+ [`toggle-alignment-${alignment}`]: alignment !== undefined,
168
168
  [`toggle-label-placement-${labelPlacement}`]: true,
169
169
  [`toggle-${rtl}`]: true,
170
- }) }, h("label", { key: '9a2fe1d16dba66a9dfef450efebf2e5cbe3dcd00', class: "toggle-wrapper" }, h("input", Object.assign({ key: '4358d18cb86da768155c17f9da3aac641296c256', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: '0ec99e452164d7059cc4f93d09e5b918f82c022a', class: {
170
+ }) }, h("label", { key: '0492f009cd89755adf41f60925028002df0e67b1', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'fd98b23e8adfa2630878eddc30607a0b1bf9e798', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: 'bcbde055ad9450319ae41e8956a1e8cc0a7796a4', class: {
171
171
  'label-text-wrapper': true,
172
172
  'label-text-wrapper-hidden': !this.hasLabel,
173
- }, part: "label" }, h("slot", { key: '1c5cbc99905a79e842e9487eb3ca654e1bab3c66' })), h("div", { key: 'ca8196423b429899febd11c7337d768ff05df6f4', class: "native-wrapper" }, this.renderToggleControl()))));
173
+ }, part: "label" }, h("slot", { key: '7a6ea9515d454d80615f0622f361c5f91b41345c' })), h("div", { key: '6d3670b81b8f809092c98b3f3b8e483ddf6a7cac', class: "native-wrapper" }, this.renderToggleControl()))));
174
174
  }
175
175
  static get is() { return "ion-toggle"; }
176
176
  static get encapsulation() { return "shadow"; }
@@ -324,36 +324,34 @@ export class Toggle {
324
324
  "mutable": false,
325
325
  "complexType": {
326
326
  "original": "'start' | 'end' | 'space-between'",
327
- "resolved": "\"end\" | \"space-between\" | \"start\"",
327
+ "resolved": "\"end\" | \"space-between\" | \"start\" | undefined",
328
328
  "references": {}
329
329
  },
330
330
  "required": false,
331
- "optional": false,
331
+ "optional": true,
332
332
  "docs": {
333
333
  "tags": [],
334
- "text": "How to pack the label and toggle within a line.\n`\"start\"`: The label and toggle will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and toggle will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and toggle will appear on opposite\nends of the line with space between the two elements."
334
+ "text": "How to pack the label and toggle within a line.\n`\"start\"`: The label and toggle will appear on the left in LTR and\non the right in RTL.\n`\"end\"`: The label and toggle will appear on the right in LTR and\non the left in RTL.\n`\"space-between\"`: The label and toggle will appear on opposite\nends of the line with space between the two elements.\nSetting this property will change the toggle `display` to `block`."
335
335
  },
336
336
  "attribute": "justify",
337
- "reflect": false,
338
- "defaultValue": "'space-between'"
337
+ "reflect": false
339
338
  },
340
339
  "alignment": {
341
340
  "type": "string",
342
341
  "mutable": false,
343
342
  "complexType": {
344
343
  "original": "'start' | 'center'",
345
- "resolved": "\"center\" | \"start\"",
344
+ "resolved": "\"center\" | \"start\" | undefined",
346
345
  "references": {}
347
346
  },
348
347
  "required": false,
349
- "optional": false,
348
+ "optional": true,
350
349
  "docs": {
351
350
  "tags": [],
352
- "text": "How to control the alignment of the toggle and label on the cross axis.\n`\"start\"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.\n`\"center\"`: The label and control will appear at the center of the cross axis in both LTR and RTL."
351
+ "text": "How to control the alignment of the toggle and label on the cross axis.\n`\"start\"`: The label and control will appear on the left of the cross axis in LTR, and on the right side in RTL.\n`\"center\"`: The label and control will appear at the center of the cross axis in both LTR and RTL.\nSetting this property will change the toggle `display` to `block`."
353
352
  },
354
353
  "attribute": "alignment",
355
- "reflect": false,
356
- "defaultValue": "'center'"
354
+ "reflect": false
357
355
  }
358
356
  };
359
357
  }
@@ -130,6 +130,8 @@ input {
130
130
  display: flex;
131
131
  position: relative;
132
132
  flex-grow: 1;
133
+ align-items: center;
134
+ justify-content: space-between;
133
135
  height: inherit;
134
136
  transition: background-color 15ms linear;
135
137
  cursor: inherit;
@@ -189,6 +191,14 @@ input {
189
191
  align-items: center;
190
192
  }
191
193
 
194
+ :host(.toggle-justify-space-between),
195
+ :host(.toggle-justify-start),
196
+ :host(.toggle-justify-end),
197
+ :host(.toggle-alignment-start),
198
+ :host(.toggle-alignment-center) {
199
+ display: block;
200
+ }
201
+
192
202
  /**
193
203
  * Label is on the left of the input in LTR and
194
204
  * on the right in RTL.