@ionic/core 8.4.4-dev.11741298262.12200f27 → 8.4.4-dev.11741357957.1558bd4c

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 (38) hide show
  1. package/components/ion-toggle.js +5 -37
  2. package/components/radio.js +37 -5
  3. package/dist/cjs/ion-radio_2.cjs.entry.js +35 -5
  4. package/dist/cjs/ion-toggle.cjs.entry.js +5 -35
  5. package/dist/cjs/ionic.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/radio/radio.ios.css +52 -15
  8. package/dist/collection/components/radio/radio.js +70 -3
  9. package/dist/collection/components/radio/radio.md.css +52 -15
  10. package/dist/collection/components/toggle/toggle.ios.css +15 -52
  11. package/dist/collection/components/toggle/toggle.js +3 -70
  12. package/dist/collection/components/toggle/toggle.md.css +15 -52
  13. package/dist/docs.json +73 -73
  14. package/dist/esm/ion-radio_2.entry.js +35 -5
  15. package/dist/esm/ion-toggle.entry.js +5 -35
  16. package/dist/esm/ionic.js +1 -1
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  19. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  20. package/dist/esm-es5/ionic.js +1 -1
  21. package/dist/esm-es5/loader.js +1 -1
  22. package/dist/html.html-data.json +8 -8
  23. package/dist/ionic/ionic.esm.js +1 -1
  24. package/dist/ionic/p-0bfffa34.system.entry.js +4 -0
  25. package/dist/ionic/p-322c5fb4.system.js +1 -1
  26. package/dist/ionic/p-5375091b.system.entry.js +4 -0
  27. package/dist/ionic/p-8f51281f.entry.js +4 -0
  28. package/dist/ionic/p-a18470c6.entry.js +4 -0
  29. package/dist/types/components/radio/radio.d.ts +19 -0
  30. package/dist/types/components/toggle/toggle.d.ts +0 -19
  31. package/dist/types/components.d.ts +16 -16
  32. package/hydrate/index.js +45 -45
  33. package/hydrate/index.mjs +45 -45
  34. package/package.json +1 -1
  35. package/dist/ionic/p-0f5d878e.system.entry.js +0 -4
  36. package/dist/ionic/p-3990c92b.entry.js +0 -4
  37. package/dist/ionic/p-6190d0d6.entry.js +0 -4
  38. package/dist/ionic/p-70ccc275.system.entry.js +0 -4
@@ -175,32 +175,39 @@ input {
175
175
  align-items: center;
176
176
  }
177
177
 
178
- :host(.radio-justify-space-between) .radio-wrapper {
178
+ .radio-bottom {
179
+ padding-top: 4px;
180
+ display: flex;
179
181
  justify-content: space-between;
182
+ font-size: 0.75rem;
183
+ white-space: normal;
180
184
  }
181
185
 
182
- :host(.radio-justify-start) .radio-wrapper {
183
- justify-content: start;
186
+ :host(.radio-label-placement-stacked) .radio-bottom {
187
+ font-size: 1rem;
184
188
  }
185
189
 
186
- :host(.radio-justify-end) .radio-wrapper {
187
- justify-content: end;
190
+ /**
191
+ * Error text should only be shown when .ion-invalid is
192
+ * present on the radio. Otherwise the helper text should
193
+ * be shown.
194
+ */
195
+ .radio-bottom .error-text {
196
+ display: none;
197
+ color: var(--ion-color-danger, #c5000f);
188
198
  }
189
199
 
190
- :host(.radio-alignment-start) .radio-wrapper {
191
- align-items: start;
200
+ .radio-bottom .helper-text {
201
+ display: block;
202
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
192
203
  }
193
204
 
194
- :host(.radio-alignment-center) .radio-wrapper {
195
- align-items: center;
205
+ :host(.ion-touched.ion-invalid) .radio-bottom .error-text {
206
+ display: block;
196
207
  }
197
208
 
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;
209
+ :host(.ion-touched.ion-invalid) .radio-bottom .helper-text {
210
+ display: none;
204
211
  }
205
212
 
206
213
  /**
@@ -229,6 +236,7 @@ input {
229
236
  */
230
237
  :host(.radio-label-placement-end) .radio-wrapper {
231
238
  flex-direction: row-reverse;
239
+ justify-content: start;
232
240
  }
233
241
 
234
242
  /**
@@ -270,6 +278,7 @@ input {
270
278
  */
271
279
  :host(.radio-label-placement-stacked) .radio-wrapper {
272
280
  flex-direction: column;
281
+ text-align: center;
273
282
  }
274
283
 
275
284
  :host(.radio-label-placement-stacked) .label-text-wrapper {
@@ -315,6 +324,34 @@ input {
315
324
  }
316
325
  }
317
326
 
327
+ :host(.radio-justify-space-between) .radio-wrapper {
328
+ justify-content: space-between;
329
+ }
330
+
331
+ :host(.radio-justify-start) .radio-wrapper {
332
+ justify-content: start;
333
+ }
334
+
335
+ :host(.radio-justify-end) .radio-wrapper {
336
+ justify-content: end;
337
+ }
338
+
339
+ :host(.radio-alignment-start) .radio-wrapper {
340
+ align-items: start;
341
+ }
342
+
343
+ :host(.radio-alignment-center) .radio-wrapper {
344
+ align-items: center;
345
+ }
346
+
347
+ :host(.radio-justify-space-between),
348
+ :host(.radio-justify-start),
349
+ :host(.radio-justify-end),
350
+ :host(.radio-alignment-start),
351
+ :host(.radio-alignment-center) {
352
+ display: block;
353
+ }
354
+
318
355
  /**
319
356
  * Convert a font size to a dynamic font size.
320
357
  * Fonts that participate in Dynamic Type should use
@@ -14,10 +14,15 @@ import { getIonMode } from "../../global/ionic-global";
14
14
  * @part container - The container for the radio mark.
15
15
  * @part label - The label text describing the radio.
16
16
  * @part mark - The checkmark or dot used to indicate the checked state.
17
+ * @part supporting-text - Supporting text displayed beneath the radio label.
18
+ * @part helper-text - Supporting text displayed beneath the radio label when the radio is valid.
19
+ * @part error-text - Supporting text displayed beneath the radio label when the radio is invalid and touched.
17
20
  */
18
21
  export class Radio {
19
22
  constructor() {
20
23
  this.inputId = `ion-rb-${radioButtonIds++}`;
24
+ this.helperTextId = `${this.inputId}-helper-text`;
25
+ this.errorTextId = `${this.inputId}-error-text`;
21
26
  this.radioGroup = null;
22
27
  this.updateState = () => {
23
28
  if (this.radioGroup) {
@@ -57,6 +62,8 @@ export class Radio {
57
62
  this.color = undefined;
58
63
  this.name = this.inputId;
59
64
  this.disabled = false;
65
+ this.errorText = undefined;
66
+ this.helperText = undefined;
60
67
  this.value = undefined;
61
68
  this.labelPlacement = 'start';
62
69
  this.justify = undefined;
@@ -116,11 +123,37 @@ export class Radio {
116
123
  renderRadioControl() {
117
124
  return (h("div", { class: "radio-icon", part: "container" }, h("div", { class: "radio-inner", part: "mark" }), h("div", { class: "radio-ripple" })));
118
125
  }
126
+ getHintTextID() {
127
+ const { el, helperText, errorText, helperTextId, errorTextId } = this;
128
+ if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
129
+ return errorTextId;
130
+ }
131
+ if (helperText) {
132
+ return helperTextId;
133
+ }
134
+ return undefined;
135
+ }
136
+ /**
137
+ * Responsible for rendering helper text and error text.
138
+ * This element should only be rendered if hint text is set.
139
+ */
140
+ renderHintText() {
141
+ const { helperText, errorText, helperTextId, errorTextId } = this;
142
+ /**
143
+ * undefined and empty string values should
144
+ * be treated as not having helper/error text.
145
+ */
146
+ const hasHintText = !!helperText || !!errorText;
147
+ if (!hasHintText) {
148
+ return;
149
+ }
150
+ return (h("div", { class: "radio-bottom" }, h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText), h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText)));
151
+ }
119
152
  render() {
120
153
  const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
121
154
  const mode = getIonMode(this);
122
155
  const inItem = hostContext('ion-item', el);
123
- return (h(Host, { key: '5a0adab55ad009305de4856fa1b9f93f2279a734', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
156
+ return (h(Host, { key: '4f01024a74c1846438372c40519df1044f5b12b9', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
124
157
  [mode]: true,
125
158
  'in-item': inItem,
126
159
  'radio-checked': checked,
@@ -131,10 +164,10 @@ export class Radio {
131
164
  // Focus and active styling should not apply when the radio is in an item
132
165
  'ion-activatable': !inItem,
133
166
  'ion-focusable': !inItem,
134
- }), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, h("label", { key: 'f5673a798e6d87868339f046445f707e1d93b7b6', class: "radio-wrapper" }, h("div", { key: 'e9190c06f75a171cab63e3f74ccf771c3ed87005', class: {
167
+ }), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, tabindex: buttonTabindex }, h("label", { key: '59dc0343534e626692f3b71b32204c1b2b25d40a', class: "radio-wrapper" }, h("div", { key: '26d7d3faf1b02bb138fb2c46f83e824962b6b92e', class: {
135
168
  'label-text-wrapper': true,
136
169
  'label-text-wrapper-hidden': !hasLabel,
137
- }, part: "label" }, h("slot", { key: '6cedf4e7b3bd03e4a635727dd7b6094bab64af64' })), h("div", { key: '26dd48d9d2848b7f100b732abdc4a3171adde483', class: "native-wrapper" }, this.renderRadioControl()))));
170
+ }, part: "label" }, h("slot", { key: '9c3d8bb0c5cd3ce94d1e661d89587cf67c522bc0' }), this.renderHintText()), h("div", { key: '3183f79e2977ee001e69c23f73073555744281d8', class: "native-wrapper" }, this.renderRadioControl()))));
138
171
  }
139
172
  static get is() { return "ion-radio"; }
140
173
  static get encapsulation() { return "shadow"; }
@@ -211,6 +244,40 @@ export class Radio {
211
244
  "reflect": false,
212
245
  "defaultValue": "false"
213
246
  },
247
+ "errorText": {
248
+ "type": "string",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "string",
252
+ "resolved": "string | undefined",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": true,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Text that is placed under the radio label and displayed when an error is detected."
260
+ },
261
+ "attribute": "error-text",
262
+ "reflect": false
263
+ },
264
+ "helperText": {
265
+ "type": "string",
266
+ "mutable": false,
267
+ "complexType": {
268
+ "original": "string",
269
+ "resolved": "string | undefined",
270
+ "references": {}
271
+ },
272
+ "required": false,
273
+ "optional": true,
274
+ "docs": {
275
+ "tags": [],
276
+ "text": "Text that is placed under the radio label and displayed when no error is detected."
277
+ },
278
+ "attribute": "helper-text",
279
+ "reflect": false
280
+ },
214
281
  "value": {
215
282
  "type": "any",
216
283
  "mutable": false,
@@ -175,32 +175,39 @@ input {
175
175
  align-items: center;
176
176
  }
177
177
 
178
- :host(.radio-justify-space-between) .radio-wrapper {
178
+ .radio-bottom {
179
+ padding-top: 4px;
180
+ display: flex;
179
181
  justify-content: space-between;
182
+ font-size: 0.75rem;
183
+ white-space: normal;
180
184
  }
181
185
 
182
- :host(.radio-justify-start) .radio-wrapper {
183
- justify-content: start;
186
+ :host(.radio-label-placement-stacked) .radio-bottom {
187
+ font-size: 1rem;
184
188
  }
185
189
 
186
- :host(.radio-justify-end) .radio-wrapper {
187
- justify-content: end;
190
+ /**
191
+ * Error text should only be shown when .ion-invalid is
192
+ * present on the radio. Otherwise the helper text should
193
+ * be shown.
194
+ */
195
+ .radio-bottom .error-text {
196
+ display: none;
197
+ color: var(--ion-color-danger, #c5000f);
188
198
  }
189
199
 
190
- :host(.radio-alignment-start) .radio-wrapper {
191
- align-items: start;
200
+ .radio-bottom .helper-text {
201
+ display: block;
202
+ color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
192
203
  }
193
204
 
194
- :host(.radio-alignment-center) .radio-wrapper {
195
- align-items: center;
205
+ :host(.ion-touched.ion-invalid) .radio-bottom .error-text {
206
+ display: block;
196
207
  }
197
208
 
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;
209
+ :host(.ion-touched.ion-invalid) .radio-bottom .helper-text {
210
+ display: none;
204
211
  }
205
212
 
206
213
  /**
@@ -229,6 +236,7 @@ input {
229
236
  */
230
237
  :host(.radio-label-placement-end) .radio-wrapper {
231
238
  flex-direction: row-reverse;
239
+ justify-content: start;
232
240
  }
233
241
 
234
242
  /**
@@ -270,6 +278,7 @@ input {
270
278
  */
271
279
  :host(.radio-label-placement-stacked) .radio-wrapper {
272
280
  flex-direction: column;
281
+ text-align: center;
273
282
  }
274
283
 
275
284
  :host(.radio-label-placement-stacked) .label-text-wrapper {
@@ -315,6 +324,34 @@ input {
315
324
  }
316
325
  }
317
326
 
327
+ :host(.radio-justify-space-between) .radio-wrapper {
328
+ justify-content: space-between;
329
+ }
330
+
331
+ :host(.radio-justify-start) .radio-wrapper {
332
+ justify-content: start;
333
+ }
334
+
335
+ :host(.radio-justify-end) .radio-wrapper {
336
+ justify-content: end;
337
+ }
338
+
339
+ :host(.radio-alignment-start) .radio-wrapper {
340
+ align-items: start;
341
+ }
342
+
343
+ :host(.radio-alignment-center) .radio-wrapper {
344
+ align-items: center;
345
+ }
346
+
347
+ :host(.radio-justify-space-between),
348
+ :host(.radio-justify-start),
349
+ :host(.radio-justify-end),
350
+ :host(.radio-alignment-start),
351
+ :host(.radio-alignment-center) {
352
+ display: block;
353
+ }
354
+
318
355
  /**
319
356
  * Convert a font size to a dynamic font size.
320
357
  * Fonts that participate in Dynamic Type should use
@@ -171,39 +171,32 @@ input {
171
171
  align-items: center;
172
172
  }
173
173
 
174
- .toggle-bottom {
175
- padding-top: 4px;
176
- display: flex;
174
+ :host(.toggle-justify-space-between) .toggle-wrapper {
177
175
  justify-content: space-between;
178
- font-size: 0.75rem;
179
- white-space: normal;
180
176
  }
181
177
 
182
- :host(.toggle-label-placement-stacked) .toggle-bottom {
183
- font-size: 1rem;
178
+ :host(.toggle-justify-start) .toggle-wrapper {
179
+ justify-content: start;
184
180
  }
185
181
 
186
- /**
187
- * Error text should only be shown when .ion-invalid is
188
- * present on the checkbox. Otherwise the helper text should
189
- * be shown.
190
- */
191
- .toggle-bottom .error-text {
192
- display: none;
193
- color: var(--ion-color-danger, #c5000f);
182
+ :host(.toggle-justify-end) .toggle-wrapper {
183
+ justify-content: end;
194
184
  }
195
185
 
196
- .toggle-bottom .helper-text {
197
- display: block;
198
- color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
186
+ :host(.toggle-alignment-start) .toggle-wrapper {
187
+ align-items: start;
199
188
  }
200
189
 
201
- :host(.ion-touched.ion-invalid) .toggle-bottom .error-text {
202
- display: block;
190
+ :host(.toggle-alignment-center) .toggle-wrapper {
191
+ align-items: center;
203
192
  }
204
193
 
205
- :host(.ion-touched.ion-invalid) .toggle-bottom .helper-text {
206
- display: none;
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;
207
200
  }
208
201
 
209
202
  /**
@@ -232,7 +225,6 @@ input {
232
225
  */
233
226
  :host(.toggle-label-placement-end) .toggle-wrapper {
234
227
  flex-direction: row-reverse;
235
- justify-content: start;
236
228
  }
237
229
 
238
230
  /**
@@ -275,7 +267,6 @@ input {
275
267
  */
276
268
  :host(.toggle-label-placement-stacked) .toggle-wrapper {
277
269
  flex-direction: column;
278
- text-align: center;
279
270
  }
280
271
 
281
272
  :host(.toggle-label-placement-stacked) .label-text-wrapper {
@@ -321,34 +312,6 @@ input {
321
312
  }
322
313
  }
323
314
 
324
- :host(.toggle-justify-space-between) .toggle-wrapper {
325
- justify-content: space-between;
326
- }
327
-
328
- :host(.toggle-justify-start) .toggle-wrapper {
329
- justify-content: start;
330
- }
331
-
332
- :host(.toggle-justify-end) .toggle-wrapper {
333
- justify-content: end;
334
- }
335
-
336
- :host(.toggle-alignment-start) .toggle-wrapper {
337
- align-items: start;
338
- }
339
-
340
- :host(.toggle-alignment-center) .toggle-wrapper {
341
- align-items: center;
342
- }
343
-
344
- :host(.toggle-justify-space-between),
345
- :host(.toggle-justify-start),
346
- :host(.toggle-justify-end),
347
- :host(.toggle-alignment-start),
348
- :host(.toggle-alignment-center) {
349
- display: block;
350
- }
351
-
352
315
  .toggle-icon-wrapper {
353
316
  display: flex;
354
317
  position: relative;
@@ -17,15 +17,10 @@ import { getIonMode } from "../../global/ionic-global";
17
17
  * @part track - The background track of the toggle.
18
18
  * @part handle - The toggle handle, or knob, used to change the checked state.
19
19
  * @part label - The label text describing the toggle.
20
- * @part supporting-text - Supporting text displayed beneath the toggle label.
21
- * @part helper-text - Supporting text displayed beneath the toggle label when the toggle is valid.
22
- * @part error-text - Supporting text displayed beneath the toggle label when the toggle is invalid and touched.
23
20
  */
24
21
  export class Toggle {
25
22
  constructor() {
26
23
  this.inputId = `ion-tg-${toggleIds++}`;
27
- this.helperTextId = `${this.inputId}-helper-text`;
28
- this.errorTextId = `${this.inputId}-error-text`;
29
24
  this.lastDrag = 0;
30
25
  this.inheritedAttributes = {};
31
26
  this.didLoad = false;
@@ -71,8 +66,6 @@ export class Toggle {
71
66
  this.name = this.inputId;
72
67
  this.checked = false;
73
68
  this.disabled = false;
74
- this.errorText = undefined;
75
- this.helperText = undefined;
76
69
  this.value = 'on';
77
70
  this.enableOnOffLabels = config.get('toggleOnOffLabels');
78
71
  this.labelPlacement = 'start';
@@ -159,39 +152,13 @@ export class Toggle {
159
152
  get hasLabel() {
160
153
  return this.el.textContent !== '';
161
154
  }
162
- getHintTextID() {
163
- const { el, helperText, errorText, helperTextId, errorTextId } = this;
164
- if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) {
165
- return errorTextId;
166
- }
167
- if (helperText) {
168
- return helperTextId;
169
- }
170
- return undefined;
171
- }
172
- /**
173
- * Responsible for rendering helper text and error text.
174
- * This element should only be rendered if hint text is set.
175
- */
176
- renderHintText() {
177
- const { helperText, errorText, helperTextId, errorTextId } = this;
178
- /**
179
- * undefined and empty string values should
180
- * be treated as not having helper/error text.
181
- */
182
- const hasHintText = !!helperText || !!errorText;
183
- if (!hasHintText) {
184
- return;
185
- }
186
- return (h("div", { class: "toggle-bottom" }, h("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText), h("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText)));
187
- }
188
155
  render() {
189
156
  const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
190
157
  const mode = getIonMode(this);
191
158
  const value = this.getValue();
192
159
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
193
160
  renderHiddenInput(true, el, name, checked ? value : '', disabled);
194
- return (h(Host, { key: '6a03757dc962cda1c8f986e84d8545875de8e5fa', "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, onClick: this.onClick, class: createColorClasses(color, {
161
+ return (h(Host, { key: 'ed75573caa6e37011f1453dd7f723fb9bd8a3656', onClick: this.onClick, class: createColorClasses(color, {
195
162
  [mode]: true,
196
163
  'in-item': hostContext('ion-item', el),
197
164
  'toggle-activated': activated,
@@ -201,10 +168,10 @@ export class Toggle {
201
168
  [`toggle-alignment-${alignment}`]: alignment !== undefined,
202
169
  [`toggle-label-placement-${labelPlacement}`]: true,
203
170
  [`toggle-${rtl}`]: true,
204
- }) }, h("label", { key: '842e00a34befece9ea84a9e28dd62d49104de681', class: "toggle-wrapper" }, h("input", Object.assign({ key: 'eb889c180b3f6efab26f31669aa6adc23d866eb1', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, this.inheritedAttributes)), h("div", { key: 'fe57b4a97a0ddabf99995f1def5cd432b7ea591d', class: {
171
+ }) }, h("label", { key: '484860e2a33f4d123904edb96159f0e1972d3add', class: "toggle-wrapper" }, h("input", Object.assign({ key: '360b53080aacfd99a9ff60ffb5219816bd4163ee', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, this.inheritedAttributes)), h("div", { key: 'f7239fa668fe11257239ea30cf0198e4f3274f6b', class: {
205
172
  'label-text-wrapper': true,
206
173
  'label-text-wrapper-hidden': !this.hasLabel,
207
- }, part: "label" }, h("slot", { key: '4ae52733af284130dfb2e2c3b476e0516e0be147' }), this.renderHintText()), h("div", { key: 'ffee5416e2ab4b8d286d2790490255bb45346ce0', class: "native-wrapper" }, this.renderToggleControl()))));
174
+ }, part: "label" }, h("slot", { key: '9495a4a39889822ee68e0d89dc5a2f863d1feb3c' })), h("div", { key: '55f1eb08c4b705e94fbcf02220bbe1d292f06155', class: "native-wrapper" }, this.renderToggleControl()))));
208
175
  }
209
176
  static get is() { return "ion-toggle"; }
210
177
  static get encapsulation() { return "shadow"; }
@@ -299,40 +266,6 @@ export class Toggle {
299
266
  "reflect": false,
300
267
  "defaultValue": "false"
301
268
  },
302
- "errorText": {
303
- "type": "string",
304
- "mutable": false,
305
- "complexType": {
306
- "original": "string",
307
- "resolved": "string | undefined",
308
- "references": {}
309
- },
310
- "required": false,
311
- "optional": true,
312
- "docs": {
313
- "tags": [],
314
- "text": "Text that is placed under the toggle label and displayed when an error is detected."
315
- },
316
- "attribute": "error-text",
317
- "reflect": false
318
- },
319
- "helperText": {
320
- "type": "string",
321
- "mutable": false,
322
- "complexType": {
323
- "original": "string",
324
- "resolved": "string | undefined",
325
- "references": {}
326
- },
327
- "required": false,
328
- "optional": true,
329
- "docs": {
330
- "tags": [],
331
- "text": "Text that is placed under the toggle label and displayed when no error is detected."
332
- },
333
- "attribute": "helper-text",
334
- "reflect": false
335
- },
336
269
  "value": {
337
270
  "type": "string",
338
271
  "mutable": false,
@@ -171,39 +171,32 @@ input {
171
171
  align-items: center;
172
172
  }
173
173
 
174
- .toggle-bottom {
175
- padding-top: 4px;
176
- display: flex;
174
+ :host(.toggle-justify-space-between) .toggle-wrapper {
177
175
  justify-content: space-between;
178
- font-size: 0.75rem;
179
- white-space: normal;
180
176
  }
181
177
 
182
- :host(.toggle-label-placement-stacked) .toggle-bottom {
183
- font-size: 1rem;
178
+ :host(.toggle-justify-start) .toggle-wrapper {
179
+ justify-content: start;
184
180
  }
185
181
 
186
- /**
187
- * Error text should only be shown when .ion-invalid is
188
- * present on the checkbox. Otherwise the helper text should
189
- * be shown.
190
- */
191
- .toggle-bottom .error-text {
192
- display: none;
193
- color: var(--ion-color-danger, #c5000f);
182
+ :host(.toggle-justify-end) .toggle-wrapper {
183
+ justify-content: end;
194
184
  }
195
185
 
196
- .toggle-bottom .helper-text {
197
- display: block;
198
- color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
186
+ :host(.toggle-alignment-start) .toggle-wrapper {
187
+ align-items: start;
199
188
  }
200
189
 
201
- :host(.ion-touched.ion-invalid) .toggle-bottom .error-text {
202
- display: block;
190
+ :host(.toggle-alignment-center) .toggle-wrapper {
191
+ align-items: center;
203
192
  }
204
193
 
205
- :host(.ion-touched.ion-invalid) .toggle-bottom .helper-text {
206
- display: none;
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;
207
200
  }
208
201
 
209
202
  /**
@@ -232,7 +225,6 @@ input {
232
225
  */
233
226
  :host(.toggle-label-placement-end) .toggle-wrapper {
234
227
  flex-direction: row-reverse;
235
- justify-content: start;
236
228
  }
237
229
 
238
230
  /**
@@ -275,7 +267,6 @@ input {
275
267
  */
276
268
  :host(.toggle-label-placement-stacked) .toggle-wrapper {
277
269
  flex-direction: column;
278
- text-align: center;
279
270
  }
280
271
 
281
272
  :host(.toggle-label-placement-stacked) .label-text-wrapper {
@@ -321,34 +312,6 @@ input {
321
312
  }
322
313
  }
323
314
 
324
- :host(.toggle-justify-space-between) .toggle-wrapper {
325
- justify-content: space-between;
326
- }
327
-
328
- :host(.toggle-justify-start) .toggle-wrapper {
329
- justify-content: start;
330
- }
331
-
332
- :host(.toggle-justify-end) .toggle-wrapper {
333
- justify-content: end;
334
- }
335
-
336
- :host(.toggle-alignment-start) .toggle-wrapper {
337
- align-items: start;
338
- }
339
-
340
- :host(.toggle-alignment-center) .toggle-wrapper {
341
- align-items: center;
342
- }
343
-
344
- :host(.toggle-justify-space-between),
345
- :host(.toggle-justify-start),
346
- :host(.toggle-justify-end),
347
- :host(.toggle-alignment-start),
348
- :host(.toggle-alignment-center) {
349
- display: block;
350
- }
351
-
352
315
  .toggle-icon-wrapper {
353
316
  display: flex;
354
317
  position: relative;