@ionic/core 7.3.5-dev.11694621267.1e5f63c2 → 7.4.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 (159) hide show
  1. package/components/button-active.js +1 -1
  2. package/components/checkbox.js +6 -3
  3. package/components/data.js +31 -7
  4. package/components/index.js +2 -2
  5. package/components/index2.js +203 -429
  6. package/components/index3.js +429 -203
  7. package/components/ion-datetime-button.js +3 -0
  8. package/components/ion-datetime.js +132 -92
  9. package/components/ion-item-sliding.js +1 -1
  10. package/components/ion-menu.js +1 -1
  11. package/components/ion-modal.js +2 -2
  12. package/components/ion-nav.js +1 -1
  13. package/components/ion-range.js +3 -3
  14. package/components/ion-refresher.js +3 -3
  15. package/components/ion-reorder-group.js +1 -1
  16. package/components/ion-router-outlet.js +1 -1
  17. package/components/ion-segment.js +1 -1
  18. package/components/ion-toggle.js +7 -4
  19. package/components/ios.transition.js +1 -1
  20. package/components/md.transition.js +1 -1
  21. package/components/notch-controller.js +1 -1
  22. package/components/picker-column.js +1 -1
  23. package/components/popover.js +1 -1
  24. package/components/radio.js +6 -3
  25. package/components/swipe-back.js +1 -1
  26. package/css/core.css.map +1 -1
  27. package/css/ionic.bundle.css.map +1 -1
  28. package/dist/cjs/{data-967b9c15.js → data-db832785.js} +31 -7
  29. package/dist/cjs/index.cjs.js +10 -9
  30. package/dist/cjs/ion-checkbox.cjs.entry.js +5 -3
  31. package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -1
  32. package/dist/cjs/ion-datetime_3.cjs.entry.js +132 -93
  33. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  34. package/dist/cjs/ion-radio_2.cjs.entry.js +5 -3
  35. package/dist/cjs/ion-range.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-textarea.cjs.entry.js +1 -1
  38. package/dist/cjs/ion-toggle.cjs.entry.js +5 -3
  39. package/dist/cjs/ionic.cjs.js +1 -1
  40. package/dist/cjs/loader.cjs.js +1 -1
  41. package/dist/cjs/{notch-controller-c27fe0b7.js → notch-controller-f4f6af5d.js} +1 -1
  42. package/dist/collection/components/checkbox/checkbox.ios.css +67 -0
  43. package/dist/collection/components/checkbox/checkbox.js +24 -4
  44. package/dist/collection/components/checkbox/checkbox.md.css +67 -0
  45. package/dist/collection/components/checkbox/test/item/checkbox.e2e.js +13 -0
  46. package/dist/collection/components/checkbox/test/label/checkbox.e2e.js +27 -0
  47. package/dist/collection/components/datetime/datetime.ios.css +32 -29
  48. package/dist/collection/components/datetime/datetime.js +137 -93
  49. package/dist/collection/components/datetime/datetime.md.css +20 -28
  50. package/dist/collection/components/datetime/test/basic/datetime.e2e.js +25 -0
  51. package/dist/collection/components/datetime/test/color/datetime.e2e.js +1 -1
  52. package/dist/collection/components/datetime/test/custom/datetime.e2e.js +27 -1
  53. package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +15 -0
  54. package/dist/collection/components/datetime/test/set-value/datetime.e2e.js +9 -12
  55. package/dist/collection/components/datetime/utils/data.js +14 -6
  56. package/dist/collection/components/datetime/utils/parse.js +18 -1
  57. package/dist/collection/components/datetime-button/datetime-button.js +3 -0
  58. package/dist/collection/components/radio/radio.ios.css +67 -0
  59. package/dist/collection/components/radio/radio.js +24 -4
  60. package/dist/collection/components/radio/radio.md.css +67 -0
  61. package/dist/collection/components/radio/test/item/radio.e2e.js +15 -0
  62. package/dist/collection/components/radio/test/label-placement/radio.e2e.js +31 -0
  63. package/dist/collection/components/range/range.ios.css +66 -1
  64. package/dist/collection/components/range/range.js +3 -3
  65. package/dist/collection/components/range/range.md.css +66 -1
  66. package/dist/collection/components/range/test/item/range.e2e.js +15 -0
  67. package/dist/collection/components/range/test/label/range.e2e.js +59 -0
  68. package/dist/collection/components/toggle/test/item/toggle.e2e.js +15 -0
  69. package/dist/collection/components/toggle/test/label/toggle.e2e.js +27 -0
  70. package/dist/collection/components/toggle/toggle.ios.css +67 -1
  71. package/dist/collection/components/toggle/toggle.js +24 -4
  72. package/dist/collection/components/toggle/toggle.md.css +67 -1
  73. package/dist/collection/index.js +1 -0
  74. package/dist/collection/utils/forms/notch-controller.js +1 -1
  75. package/dist/docs.json +147 -18
  76. package/dist/esm/{data-4b448e3a.js → data-009dbf15.js} +31 -7
  77. package/dist/esm/index.js +2 -2
  78. package/dist/esm/ion-checkbox.entry.js +5 -3
  79. package/dist/esm/ion-datetime-button.entry.js +4 -1
  80. package/dist/esm/ion-datetime_3.entry.js +132 -93
  81. package/dist/esm/ion-input.entry.js +1 -1
  82. package/dist/esm/ion-radio_2.entry.js +5 -3
  83. package/dist/esm/ion-range.entry.js +2 -2
  84. package/dist/esm/ion-select_3.entry.js +1 -1
  85. package/dist/esm/ion-textarea.entry.js +1 -1
  86. package/dist/esm/ion-toggle.entry.js +5 -3
  87. package/dist/esm/ionic.js +1 -1
  88. package/dist/esm/loader.js +1 -1
  89. package/dist/esm/{notch-controller-cb5bbe6a.js → notch-controller-8c9c0e54.js} +1 -1
  90. package/dist/esm-es5/data-009dbf15.js +4 -0
  91. package/dist/esm-es5/index.js +1 -1
  92. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  93. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  94. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  95. package/dist/esm-es5/ion-input.entry.js +1 -1
  96. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  97. package/dist/esm-es5/ion-range.entry.js +1 -1
  98. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  99. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  100. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  101. package/dist/esm-es5/ionic.js +1 -1
  102. package/dist/esm-es5/loader.js +1 -1
  103. package/dist/html.html-data.json +52 -4
  104. package/dist/ionic/index.esm.js +1 -1
  105. package/dist/ionic/ionic.esm.js +1 -1
  106. package/dist/ionic/{p-dc4c9086.system.entry.js → p-264b5dd9.system.entry.js} +1 -1
  107. package/dist/ionic/{p-4d2807fa.entry.js → p-37c9e295.entry.js} +1 -1
  108. package/dist/ionic/p-3d575698.system.entry.js +4 -0
  109. package/dist/ionic/p-44ef7224.system.js +4 -0
  110. package/dist/ionic/{p-1c236453.system.entry.js → p-46058a1e.system.entry.js} +1 -1
  111. package/dist/ionic/{p-68deb933.entry.js → p-52edd6b0.entry.js} +1 -1
  112. package/dist/ionic/p-60f22efc.system.entry.js +4 -0
  113. package/dist/ionic/p-6d640b2b.entry.js +4 -0
  114. package/dist/ionic/p-74ef17ea.system.entry.js +4 -0
  115. package/dist/ionic/p-7cfd253c.js +4 -0
  116. package/dist/ionic/p-9fccec52.system.js +4 -0
  117. package/dist/ionic/p-aa702daf.entry.js +4 -0
  118. package/dist/ionic/p-ab051966.entry.js +4 -0
  119. package/dist/ionic/p-c005eb67.system.entry.js +4 -0
  120. package/dist/ionic/p-c68a8814.system.js +1 -1
  121. package/dist/ionic/p-cc758251.system.entry.js +4 -0
  122. package/dist/ionic/{p-0ce43a8f.system.entry.js → p-d0d09178.system.entry.js} +1 -1
  123. package/dist/ionic/p-dfee12f6.entry.js +4 -0
  124. package/dist/ionic/{p-8db97b90.entry.js → p-e3ca182a.entry.js} +1 -1
  125. package/dist/ionic/p-f0c28fbd.entry.js +4 -0
  126. package/dist/ionic/p-fdfc7b98.entry.js +4 -0
  127. package/dist/ionic/p-ff0611e6.system.entry.js +4 -0
  128. package/dist/types/components/checkbox/checkbox.d.ts +8 -1
  129. package/dist/types/components/datetime/datetime.d.ts +23 -10
  130. package/dist/types/components/datetime/utils/data.d.ts +1 -1
  131. package/dist/types/components/datetime/utils/parse.d.ts +3 -3
  132. package/dist/types/components/radio/radio.d.ts +8 -1
  133. package/dist/types/components/range/range.d.ts +2 -1
  134. package/dist/types/components/toast/toast-interface.d.ts +3 -0
  135. package/dist/types/components/toggle/toggle.d.ts +8 -1
  136. package/dist/types/components.d.ts +40 -16
  137. package/dist/types/index.d.ts +1 -0
  138. package/dist/types/interface.d.ts +1 -0
  139. package/hydrate/index.js +193 -111
  140. package/package.json +1 -1
  141. package/dist/esm-es5/data-4b448e3a.js +0 -4
  142. package/dist/ionic/p-17e961cf.entry.js +0 -4
  143. package/dist/ionic/p-1b533a76.system.entry.js +0 -4
  144. package/dist/ionic/p-44a6f15d.system.entry.js +0 -4
  145. package/dist/ionic/p-4f7109fa.entry.js +0 -4
  146. package/dist/ionic/p-601fd53c.js +0 -4
  147. package/dist/ionic/p-7106c152.system.js +0 -4
  148. package/dist/ionic/p-9eaaa910.entry.js +0 -4
  149. package/dist/ionic/p-af6125d1.system.entry.js +0 -4
  150. package/dist/ionic/p-b8d7f0eb.system.entry.js +0 -4
  151. package/dist/ionic/p-b9179eab.entry.js +0 -4
  152. package/dist/ionic/p-cc8910e7.system.js +0 -4
  153. package/dist/ionic/p-dc7d392d.entry.js +0 -4
  154. package/dist/ionic/p-e65aed58.system.entry.js +0 -4
  155. package/dist/ionic/p-f3ec1f2b.entry.js +0 -4
  156. package/dist/ionic/p-fb26fa56.system.entry.js +0 -4
  157. /package/dist/esm-es5/{notch-controller-cb5bbe6a.js → notch-controller-8c9c0e54.js} +0 -0
  158. /package/dist/ionic/{p-4b37d92d.js → p-3bad5c1a.js} +0 -0
  159. /package/dist/ionic/{p-46b2991d.system.js → p-ab4cff27.system.js} +0 -0
@@ -58,4 +58,19 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
58
58
  await expect(list).toHaveScreenshot(screenshot(`toggle-long-label-in-item`));
59
59
  });
60
60
  });
61
+ test.describe(title('toggle: stacked label in item'), () => {
62
+ test('should render margins correctly when using stacked label in item', async ({ page }) => {
63
+ await page.setContent(`
64
+ <ion-list>
65
+ <ion-radio-group>
66
+ <ion-item>
67
+ <ion-toggle label-placement="stacked">Enable Notifications</ion-toggle>
68
+ </ion-item>
69
+ </ion-radio-group>
70
+ </ion-list>
71
+ `, config);
72
+ const list = page.locator('ion-list');
73
+ await expect(list).toHaveScreenshot(screenshot(`toggle-stacked-label-in-item`));
74
+ });
75
+ });
61
76
  });
@@ -90,4 +90,31 @@ configs().forEach(({ title, screenshot, config }) => {
90
90
  await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-fixed-justify-space-between`));
91
91
  });
92
92
  });
93
+ test.describe(title('toggle: stacked placement'), () => {
94
+ test('should align the label to the start of the container in the stacked position', async ({ page }) => {
95
+ await page.setContent(`
96
+ <ion-toggle label-placement="stacked" alignment="start" style="width: 200px">This is a long label</ion-toggle>
97
+ `, config);
98
+ const toggle = page.locator('ion-toggle');
99
+ await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-stacked-align-start`));
100
+ });
101
+ test('should align the label to the center of the container in the stacked position', async ({ page }) => {
102
+ await page.setContent(`
103
+ <ion-toggle label-placement="stacked" alignment="center" style="width: 200px">This is a long label</ion-toggle>
104
+ `, config);
105
+ const toggle = page.locator('ion-toggle');
106
+ await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-stacked-align-center`));
107
+ });
108
+ });
109
+ });
110
+ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config, screenshot }) => {
111
+ test.describe(title('toggle: stacked long label'), () => {
112
+ test('long label should truncate', async ({ page }) => {
113
+ await page.setContent(`
114
+ <ion-toggle label-placement="stacked" alignment="start" style="width: 200px">Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications</ion-toggle>
115
+ `, config);
116
+ const toggle = page.locator('ion-toggle');
117
+ await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-stacked-long-label`));
118
+ });
119
+ });
93
120
  });
@@ -123,7 +123,6 @@ input {
123
123
  display: flex;
124
124
  position: relative;
125
125
  flex-grow: 1;
126
- align-items: center;
127
126
  height: inherit;
128
127
  transition: background-color 15ms linear;
129
128
  cursor: inherit;
@@ -146,6 +145,15 @@ input {
146
145
  margin-bottom: 10px;
147
146
  }
148
147
 
148
+ :host(.in-item.toggle-label-placement-stacked) .label-text-wrapper {
149
+ margin-top: 10px;
150
+ margin-bottom: 16px;
151
+ }
152
+
153
+ :host(.in-item.toggle-label-placement-stacked) .native-wrapper {
154
+ margin-bottom: 10px;
155
+ }
156
+
149
157
  /**
150
158
  * If no label text is placed into the slot
151
159
  * then the element should be hidden otherwise
@@ -172,6 +180,14 @@ input {
172
180
  justify-content: end;
173
181
  }
174
182
 
183
+ :host(.toggle-alignment-start) .toggle-wrapper {
184
+ align-items: start;
185
+ }
186
+
187
+ :host(.toggle-alignment-center) .toggle-wrapper {
188
+ align-items: center;
189
+ }
190
+
175
191
  /**
176
192
  * Label is on the left of the input in LTR and
177
193
  * on the right in RTL.
@@ -235,6 +251,56 @@ input {
235
251
  max-width: 200px;
236
252
  }
237
253
 
254
+ /**
255
+ * Label is on top of the toggle.
256
+ */
257
+ :host(.toggle-label-placement-stacked) .toggle-wrapper {
258
+ flex-direction: column;
259
+ }
260
+
261
+ :host(.toggle-label-placement-stacked) .label-text-wrapper {
262
+ transform: scale(0.75);
263
+ /**
264
+ * The margin between the label and
265
+ * the toggle should be on the bottom
266
+ * when the label sits on top.
267
+ */
268
+ margin-left: 0;
269
+ margin-right: 0;
270
+ margin-bottom: 16px;
271
+ /**
272
+ * Label text should not extend
273
+ * beyond the bounds of the toggle.
274
+ */
275
+ max-width: calc(100% / 0.75);
276
+ }
277
+
278
+ :host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper {
279
+ transform-origin: left top;
280
+ }
281
+ :host-context([dir=rtl]):host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper, :host-context([dir=rtl]).toggle-label-placement-stacked.toggle-alignment-start .label-text-wrapper {
282
+ transform-origin: right top;
283
+ }
284
+
285
+ @supports selector(:dir(rtl)) {
286
+ :host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper:dir(rtl) {
287
+ transform-origin: right top;
288
+ }
289
+ }
290
+
291
+ :host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper {
292
+ transform-origin: center top;
293
+ }
294
+ :host-context([dir=rtl]):host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper, :host-context([dir=rtl]).toggle-label-placement-stacked.toggle-alignment-center .label-text-wrapper {
295
+ transform-origin: calc(100% - center) top;
296
+ }
297
+
298
+ @supports selector(:dir(rtl)) {
299
+ :host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper:dir(rtl) {
300
+ transform-origin: calc(100% - center) top;
301
+ }
302
+ }
303
+
238
304
  .toggle-icon-wrapper {
239
305
  display: flex;
240
306
  position: relative;
@@ -71,6 +71,7 @@ export class Toggle {
71
71
  this.labelPlacement = 'start';
72
72
  this.legacy = undefined;
73
73
  this.justify = 'space-between';
74
+ this.alignment = 'center';
74
75
  }
75
76
  disabledChanged() {
76
77
  this.emitStyle();
@@ -168,7 +169,7 @@ export class Toggle {
168
169
  return legacyFormController.hasLegacyControl() ? this.renderLegacyToggle() : this.renderToggle();
169
170
  }
170
171
  renderToggle() {
171
- const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name } = this;
172
+ const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
172
173
  const mode = getIonMode(this);
173
174
  const value = this.getValue();
174
175
  const rtl = isRTL(el) ? 'rtl' : 'ltr';
@@ -180,6 +181,7 @@ export class Toggle {
180
181
  'toggle-checked': checked,
181
182
  'toggle-disabled': disabled,
182
183
  [`toggle-justify-${justify}`]: true,
184
+ [`toggle-alignment-${alignment}`]: true,
183
185
  [`toggle-label-placement-${labelPlacement}`]: true,
184
186
  [`toggle-${rtl}`]: true,
185
187
  }) }, h("label", { class: "toggle-wrapper" }, h("input", Object.assign({ 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", { class: {
@@ -352,15 +354,15 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
352
354
  "type": "string",
353
355
  "mutable": false,
354
356
  "complexType": {
355
- "original": "'start' | 'end' | 'fixed'",
356
- "resolved": "\"end\" | \"fixed\" | \"start\"",
357
+ "original": "'start' | 'end' | 'fixed' | 'stacked'",
358
+ "resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
357
359
  "references": {}
358
360
  },
359
361
  "required": false,
360
362
  "optional": false,
361
363
  "docs": {
362
364
  "tags": [],
363
- "text": "Where to place the label relative to the input.\n`\"start\"`: The label will appear to the left of the toggle in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the toggle in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\")."
365
+ "text": "Where to place the label relative to the input.\n`\"start\"`: The label will appear to the left of the toggle in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the toggle in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").\n`\"stacked\"`: The label will appear above the toggle regardless of the direction. The alignment of the label can be controlled with the `alignment` property."
364
366
  },
365
367
  "attribute": "label-placement",
366
368
  "reflect": false,
@@ -400,6 +402,24 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
400
402
  "attribute": "justify",
401
403
  "reflect": false,
402
404
  "defaultValue": "'space-between'"
405
+ },
406
+ "alignment": {
407
+ "type": "string",
408
+ "mutable": false,
409
+ "complexType": {
410
+ "original": "'start' | 'center'",
411
+ "resolved": "\"center\" | \"start\"",
412
+ "references": {}
413
+ },
414
+ "required": false,
415
+ "optional": false,
416
+ "docs": {
417
+ "tags": [],
418
+ "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."
419
+ },
420
+ "attribute": "alignment",
421
+ "reflect": false,
422
+ "defaultValue": "'center'"
403
423
  }
404
424
  };
405
425
  }
@@ -123,7 +123,6 @@ input {
123
123
  display: flex;
124
124
  position: relative;
125
125
  flex-grow: 1;
126
- align-items: center;
127
126
  height: inherit;
128
127
  transition: background-color 15ms linear;
129
128
  cursor: inherit;
@@ -146,6 +145,15 @@ input {
146
145
  margin-bottom: 10px;
147
146
  }
148
147
 
148
+ :host(.in-item.toggle-label-placement-stacked) .label-text-wrapper {
149
+ margin-top: 10px;
150
+ margin-bottom: 16px;
151
+ }
152
+
153
+ :host(.in-item.toggle-label-placement-stacked) .native-wrapper {
154
+ margin-bottom: 10px;
155
+ }
156
+
149
157
  /**
150
158
  * If no label text is placed into the slot
151
159
  * then the element should be hidden otherwise
@@ -172,6 +180,14 @@ input {
172
180
  justify-content: end;
173
181
  }
174
182
 
183
+ :host(.toggle-alignment-start) .toggle-wrapper {
184
+ align-items: start;
185
+ }
186
+
187
+ :host(.toggle-alignment-center) .toggle-wrapper {
188
+ align-items: center;
189
+ }
190
+
175
191
  /**
176
192
  * Label is on the left of the input in LTR and
177
193
  * on the right in RTL.
@@ -235,6 +251,56 @@ input {
235
251
  max-width: 200px;
236
252
  }
237
253
 
254
+ /**
255
+ * Label is on top of the toggle.
256
+ */
257
+ :host(.toggle-label-placement-stacked) .toggle-wrapper {
258
+ flex-direction: column;
259
+ }
260
+
261
+ :host(.toggle-label-placement-stacked) .label-text-wrapper {
262
+ transform: scale(0.75);
263
+ /**
264
+ * The margin between the label and
265
+ * the toggle should be on the bottom
266
+ * when the label sits on top.
267
+ */
268
+ margin-left: 0;
269
+ margin-right: 0;
270
+ margin-bottom: 16px;
271
+ /**
272
+ * Label text should not extend
273
+ * beyond the bounds of the toggle.
274
+ */
275
+ max-width: calc(100% / 0.75);
276
+ }
277
+
278
+ :host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper {
279
+ transform-origin: left top;
280
+ }
281
+ :host-context([dir=rtl]):host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper, :host-context([dir=rtl]).toggle-label-placement-stacked.toggle-alignment-start .label-text-wrapper {
282
+ transform-origin: right top;
283
+ }
284
+
285
+ @supports selector(:dir(rtl)) {
286
+ :host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper:dir(rtl) {
287
+ transform-origin: right top;
288
+ }
289
+ }
290
+
291
+ :host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper {
292
+ transform-origin: center top;
293
+ }
294
+ :host-context([dir=rtl]):host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper, :host-context([dir=rtl]).toggle-label-placement-stacked.toggle-alignment-center .label-text-wrapper {
295
+ transform-origin: calc(100% - center) top;
296
+ }
297
+
298
+ @supports selector(:dir(rtl)) {
299
+ :host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper:dir(rtl) {
300
+ transform-origin: calc(100% - center) top;
301
+ }
302
+ }
303
+
238
304
  .toggle-icon-wrapper {
239
305
  display: flex;
240
306
  position: relative;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import "ionicons";
5
5
  export { createAnimation } from './utils/animation/animation';
6
+ export { getIonPageElement } from './utils/transition';
6
7
  export { iosTransitionAnimation } from './utils/transition/ios.transition';
7
8
  export { mdTransitionAnimation } from './utils/transition/md.transition';
8
9
  export { getTimeGivenProgression } from './utils/animation/cubic-bezier';
@@ -133,7 +133,7 @@ export const createNotchController = (el, getNotchSpacerEl, getLabelSlot) => {
133
133
  * The notch is only visible when the label is scaled,
134
134
  * which is why we multiply the width by 0.75 as this is
135
135
  * the same amount the label element is scaled by in the host CSS.
136
- * (For ion-select, see $select-floating-label-scale in select.vars.scss).
136
+ * (See $form-control-label-stacked-scale in ionic.globals.scss).
137
137
  */
138
138
  notchSpacerEl.style.setProperty('width', `${width * 0.75}px`);
139
139
  };
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-09-13T16:10:05",
2
+ "timestamp": "2023-09-14T13:02:02",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.2.1",
@@ -4959,6 +4959,33 @@
4959
4959
  ],
4960
4960
  "usage": {},
4961
4961
  "props": [
4962
+ {
4963
+ "name": "alignment",
4964
+ "type": "\"center\" | \"start\"",
4965
+ "complexType": {
4966
+ "original": "'start' | 'center'",
4967
+ "resolved": "\"center\" | \"start\"",
4968
+ "references": {}
4969
+ },
4970
+ "mutable": false,
4971
+ "attr": "alignment",
4972
+ "reflectToAttr": false,
4973
+ "docs": "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.",
4974
+ "docsTags": [],
4975
+ "default": "'center'",
4976
+ "values": [
4977
+ {
4978
+ "value": "center",
4979
+ "type": "string"
4980
+ },
4981
+ {
4982
+ "value": "start",
4983
+ "type": "string"
4984
+ }
4985
+ ],
4986
+ "optional": false,
4987
+ "required": false
4988
+ },
4962
4989
  {
4963
4990
  "name": "checked",
4964
4991
  "type": "boolean",
@@ -5124,16 +5151,16 @@
5124
5151
  },
5125
5152
  {
5126
5153
  "name": "labelPlacement",
5127
- "type": "\"end\" | \"fixed\" | \"start\"",
5154
+ "type": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
5128
5155
  "complexType": {
5129
- "original": "'start' | 'end' | 'fixed'",
5130
- "resolved": "\"end\" | \"fixed\" | \"start\"",
5156
+ "original": "'start' | 'end' | 'fixed' | 'stacked'",
5157
+ "resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
5131
5158
  "references": {}
5132
5159
  },
5133
5160
  "mutable": false,
5134
5161
  "attr": "label-placement",
5135
5162
  "reflectToAttr": false,
5136
- "docs": "Where to place the label relative to the checkbox.\n`\"start\"`: The label will appear to the left of the checkbox in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the checkbox in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").",
5163
+ "docs": "Where to place the label relative to the checkbox.\n`\"start\"`: The label will appear to the left of the checkbox in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the checkbox in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").\n`\"stacked\"`: The label will appear above the checkbox regardless of the direction. The alignment of the label can be controlled with the `alignment` property.",
5137
5164
  "docsTags": [],
5138
5165
  "default": "'start'",
5139
5166
  "values": [
@@ -5145,6 +5172,10 @@
5145
5172
  "value": "fixed",
5146
5173
  "type": "string"
5147
5174
  },
5175
+ {
5176
+ "value": "stacked",
5177
+ "type": "string"
5178
+ },
5148
5179
  {
5149
5180
  "value": "start",
5150
5181
  "type": "string"
@@ -6808,6 +6839,22 @@
6808
6839
  {
6809
6840
  "name": "part",
6810
6841
  "text": "month-year-button - The button that opens the month/year picker when\nusing a grid style layout."
6842
+ },
6843
+ {
6844
+ "name": "part",
6845
+ "text": "calendar-day - The individual buttons that display a day inside of the datetime\ncalendar."
6846
+ },
6847
+ {
6848
+ "name": "part",
6849
+ "text": "calendar-day active - The currently selected calendar day."
6850
+ },
6851
+ {
6852
+ "name": "part",
6853
+ "text": "calendar-day today - The calendar day that contains the current day."
6854
+ },
6855
+ {
6856
+ "name": "part",
6857
+ "text": "calendar-day disabled - The calendar day that is disabled."
6811
6858
  }
6812
6859
  ],
6813
6860
  "usage": {},
@@ -7828,6 +7875,22 @@
7828
7875
  }
7829
7876
  ],
7830
7877
  "parts": [
7878
+ {
7879
+ "name": "calendar-day",
7880
+ "docs": "The individual buttons that display a day inside of the datetime\ncalendar."
7881
+ },
7882
+ {
7883
+ "name": "calendar-day active",
7884
+ "docs": "The currently selected calendar day."
7885
+ },
7886
+ {
7887
+ "name": "calendar-day disabled",
7888
+ "docs": "The calendar day that is disabled."
7889
+ },
7890
+ {
7891
+ "name": "calendar-day today",
7892
+ "docs": "The calendar day that contains the current day."
7893
+ },
7831
7894
  {
7832
7895
  "name": "month-year-button",
7833
7896
  "docs": "The button that opens the month/year picker when\nusing a grid style layout."
@@ -19254,6 +19317,33 @@
19254
19317
  ],
19255
19318
  "usage": {},
19256
19319
  "props": [
19320
+ {
19321
+ "name": "alignment",
19322
+ "type": "\"center\" | \"start\"",
19323
+ "complexType": {
19324
+ "original": "'start' | 'center'",
19325
+ "resolved": "\"center\" | \"start\"",
19326
+ "references": {}
19327
+ },
19328
+ "mutable": false,
19329
+ "attr": "alignment",
19330
+ "reflectToAttr": false,
19331
+ "docs": "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.",
19332
+ "docsTags": [],
19333
+ "default": "'center'",
19334
+ "values": [
19335
+ {
19336
+ "value": "center",
19337
+ "type": "string"
19338
+ },
19339
+ {
19340
+ "value": "start",
19341
+ "type": "string"
19342
+ }
19343
+ ],
19344
+ "optional": false,
19345
+ "required": false
19346
+ },
19257
19347
  {
19258
19348
  "name": "color",
19259
19349
  "type": "\"danger\" | \"dark\" | \"light\" | \"medium\" | \"primary\" | \"secondary\" | \"success\" | \"tertiary\" | \"warning\" | string & Record<never, never> | undefined",
@@ -19375,16 +19465,16 @@
19375
19465
  },
19376
19466
  {
19377
19467
  "name": "labelPlacement",
19378
- "type": "\"end\" | \"fixed\" | \"start\"",
19468
+ "type": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
19379
19469
  "complexType": {
19380
- "original": "'start' | 'end' | 'fixed'",
19381
- "resolved": "\"end\" | \"fixed\" | \"start\"",
19470
+ "original": "'start' | 'end' | 'fixed' | 'stacked'",
19471
+ "resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
19382
19472
  "references": {}
19383
19473
  },
19384
19474
  "mutable": false,
19385
19475
  "attr": "label-placement",
19386
19476
  "reflectToAttr": false,
19387
- "docs": "Where to place the label relative to the radio.\n`\"start\"`: The label will appear to the left of the radio in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the radio in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").",
19477
+ "docs": "Where to place the label relative to the radio.\n`\"start\"`: The label will appear to the left of the radio in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the radio in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").\n`\"stacked\"`: The label will appear above the radio regardless of the direction. The alignment of the label can be controlled with the `alignment` property.",
19388
19478
  "docsTags": [],
19389
19479
  "default": "'start'",
19390
19480
  "values": [
@@ -19396,6 +19486,10 @@
19396
19486
  "value": "fixed",
19397
19487
  "type": "string"
19398
19488
  },
19489
+ {
19490
+ "value": "stacked",
19491
+ "type": "string"
19492
+ },
19399
19493
  {
19400
19494
  "value": "start",
19401
19495
  "type": "string"
@@ -19924,16 +20018,16 @@
19924
20018
  },
19925
20019
  {
19926
20020
  "name": "labelPlacement",
19927
- "type": "\"end\" | \"fixed\" | \"start\"",
20021
+ "type": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
19928
20022
  "complexType": {
19929
- "original": "'start' | 'end' | 'fixed'",
19930
- "resolved": "\"end\" | \"fixed\" | \"start\"",
20023
+ "original": "'start' | 'end' | 'fixed' | 'stacked'",
20024
+ "resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
19931
20025
  "references": {}
19932
20026
  },
19933
20027
  "mutable": false,
19934
20028
  "attr": "label-placement",
19935
20029
  "reflectToAttr": false,
19936
- "docs": "Where to place the label relative to the range.\n`\"start\"`: The label will appear to the left of the range in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the range in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").",
20030
+ "docs": "Where to place the label relative to the range.\n`\"start\"`: The label will appear to the left of the range in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the range in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").\n`\"stacked\"`: The label will appear above the range regardless of the direction.",
19937
20031
  "docsTags": [],
19938
20032
  "default": "'start'",
19939
20033
  "values": [
@@ -19945,6 +20039,10 @@
19945
20039
  "value": "fixed",
19946
20040
  "type": "string"
19947
20041
  },
20042
+ {
20043
+ "value": "stacked",
20044
+ "type": "string"
20045
+ },
19948
20046
  {
19949
20047
  "value": "start",
19950
20048
  "type": "string"
@@ -28122,6 +28220,33 @@
28122
28220
  ],
28123
28221
  "usage": {},
28124
28222
  "props": [
28223
+ {
28224
+ "name": "alignment",
28225
+ "type": "\"center\" | \"start\"",
28226
+ "complexType": {
28227
+ "original": "'start' | 'center'",
28228
+ "resolved": "\"center\" | \"start\"",
28229
+ "references": {}
28230
+ },
28231
+ "mutable": false,
28232
+ "attr": "alignment",
28233
+ "reflectToAttr": false,
28234
+ "docs": "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.",
28235
+ "docsTags": [],
28236
+ "default": "'center'",
28237
+ "values": [
28238
+ {
28239
+ "value": "center",
28240
+ "type": "string"
28241
+ },
28242
+ {
28243
+ "value": "start",
28244
+ "type": "string"
28245
+ }
28246
+ ],
28247
+ "optional": false,
28248
+ "required": false
28249
+ },
28125
28250
  {
28126
28251
  "name": "checked",
28127
28252
  "type": "boolean",
@@ -28290,16 +28415,16 @@
28290
28415
  },
28291
28416
  {
28292
28417
  "name": "labelPlacement",
28293
- "type": "\"end\" | \"fixed\" | \"start\"",
28418
+ "type": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
28294
28419
  "complexType": {
28295
- "original": "'start' | 'end' | 'fixed'",
28296
- "resolved": "\"end\" | \"fixed\" | \"start\"",
28420
+ "original": "'start' | 'end' | 'fixed' | 'stacked'",
28421
+ "resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
28297
28422
  "references": {}
28298
28423
  },
28299
28424
  "mutable": false,
28300
28425
  "attr": "label-placement",
28301
28426
  "reflectToAttr": false,
28302
- "docs": "Where to place the label relative to the input.\n`\"start\"`: The label will appear to the left of the toggle in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the toggle in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").",
28427
+ "docs": "Where to place the label relative to the input.\n`\"start\"`: The label will appear to the left of the toggle in LTR and to the right in RTL.\n`\"end\"`: The label will appear to the right of the toggle in LTR and to the left in RTL.\n`\"fixed\"`: The label has the same behavior as `\"start\"` except it also has a fixed width. Long text will be truncated with ellipses (\"...\").\n`\"stacked\"`: The label will appear above the toggle regardless of the direction. The alignment of the label can be controlled with the `alignment` property.",
28303
28428
  "docsTags": [],
28304
28429
  "default": "'start'",
28305
28430
  "values": [
@@ -28311,6 +28436,10 @@
28311
28436
  "value": "fixed",
28312
28437
  "type": "string"
28313
28438
  },
28439
+ {
28440
+ "value": "stacked",
28441
+ "type": "string"
28442
+ },
28314
28443
  {
28315
28444
  "value": "start",
28316
28445
  "type": "string"
@@ -29157,7 +29286,7 @@
29157
29286
  "path": "src/components/toast/toast-interface.ts"
29158
29287
  },
29159
29288
  "src/components/toast/toast-interface.ts::ToastButton": {
29160
- "declaration": "export interface ToastButton {\n text?: string;\n icon?: string;\n side?: 'start' | 'end';\n role?: 'cancel' | string;\n cssClass?: string | string[];\n htmlAttributes?: { [key: string]: any };\n handler?: () => boolean | void | Promise<boolean | void>;\n}",
29289
+ "declaration": "export interface ToastButton {\n text?: string;\n icon?: string;\n side?: 'start' | 'end';\n role?: 'cancel' | string;\n\n /**\n * @deprecated Use the toast button's CSS Shadow Parts instead.\n */\n cssClass?: string | string[];\n htmlAttributes?: { [key: string]: any };\n handler?: () => boolean | void | Promise<boolean | void>;\n}",
29161
29290
  "docstring": "",
29162
29291
  "path": "src/components/toast/toast-interface.ts"
29163
29292
  },