@ionic/core 7.3.2-dev.11693321763.15a54694 → 7.3.2-dev.11693507138.1f9ed625
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.
- package/components/checkbox.js +6 -3
- package/components/data.js +31 -7
- package/components/framework-delegate.js +2 -21
- package/components/ion-datetime-button.js +3 -0
- package/components/ion-datetime.js +106 -81
- package/components/ion-modal.js +1 -1
- package/components/ion-range.js +2 -2
- package/components/ion-toggle.js +6 -3
- package/components/popover.js +1 -1
- package/components/radio.js +6 -3
- package/dist/cjs/{data-967b9c15.js → data-db832785.js} +31 -7
- package/dist/cjs/{framework-delegate-c0873a6f.js → framework-delegate-e8174951.js} +2 -21
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/ion-alert.cjs.entry.js +2 -2
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-checkbox.cjs.entry.js +5 -3
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +108 -84
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +3 -3
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +5 -3
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +5 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-5c1706ed.js → overlays-0ea06fcb.js} +1 -1
- package/dist/collection/components/checkbox/checkbox.ios.css +35 -0
- package/dist/collection/components/checkbox/checkbox.js +24 -4
- package/dist/collection/components/checkbox/checkbox.md.css +35 -0
- package/dist/collection/components/checkbox/test/item/checkbox.e2e.js +13 -0
- package/dist/collection/components/checkbox/test/label/checkbox.e2e.js +16 -0
- package/dist/collection/components/datetime/datetime.js +107 -84
- package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +15 -0
- package/dist/collection/components/datetime/test/set-value/datetime.e2e.js +9 -12
- package/dist/collection/components/datetime/utils/data.js +14 -6
- package/dist/collection/components/datetime/utils/parse.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +3 -0
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/radio/radio.ios.css +35 -0
- package/dist/collection/components/radio/radio.js +24 -4
- package/dist/collection/components/radio/radio.md.css +35 -0
- package/dist/collection/components/radio/test/item/radio.e2e.js +15 -0
- package/dist/collection/components/radio/test/label-placement/radio.e2e.js +20 -0
- package/dist/collection/components/range/range.ios.css +41 -1
- package/dist/collection/components/range/range.js +3 -3
- package/dist/collection/components/range/range.md.css +41 -1
- package/dist/collection/components/range/test/label/range.e2e.js +48 -0
- package/dist/collection/components/toggle/test/item/toggle.e2e.js +15 -0
- package/dist/collection/components/toggle/test/label/toggle.e2e.js +16 -0
- package/dist/collection/components/toggle/toggle.ios.css +35 -1
- package/dist/collection/components/toggle/toggle.js +24 -4
- package/dist/collection/components/toggle/toggle.md.css +35 -1
- package/dist/collection/utils/framework-delegate.js +2 -21
- package/dist/docs.json +115 -18
- package/dist/esm/{data-4b448e3a.js → data-009dbf15.js} +31 -7
- package/dist/esm/{framework-delegate-aa433dea.js → framework-delegate-2b76c681.js} +2 -21
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +2 -2
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-checkbox.entry.js +5 -3
- package/dist/esm/ion-datetime-button.entry.js +4 -1
- package/dist/esm/ion-datetime_3.entry.js +108 -84
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +3 -3
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +3 -3
- package/dist/esm/ion-radio_2.entry.js +5 -3
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +5 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-e1dadfe6.js → overlays-c3387ec0.js} +1 -1
- package/dist/esm-es5/data-009dbf15.js +4 -0
- package/dist/esm-es5/framework-delegate-2b76c681.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{overlays-e1dadfe6.js → overlays-c3387ec0.js} +1 -1
- package/dist/html.html-data.json +52 -4
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-84a95033.system.entry.js → p-06f1f560.system.entry.js} +1 -1
- package/dist/ionic/p-1f4adf06.system.entry.js +4 -0
- package/dist/ionic/{p-c759a704.entry.js → p-20087c90.entry.js} +1 -1
- package/dist/ionic/{p-98ebc376.entry.js → p-229df0d8.entry.js} +1 -1
- package/dist/ionic/{p-51669f1e.system.entry.js → p-2936ec7f.system.entry.js} +1 -1
- package/dist/ionic/{p-e44233f5.entry.js → p-29b3e70a.entry.js} +1 -1
- package/dist/ionic/{p-2bff71d5.system.entry.js → p-2bc49e5d.system.entry.js} +1 -1
- package/dist/ionic/{p-f2c667c9.system.entry.js → p-2da3e015.system.entry.js} +1 -1
- package/dist/ionic/p-2f8bea16.entry.js +4 -0
- package/dist/ionic/p-40138199.entry.js +4 -0
- package/dist/ionic/{p-7c9dd24d.entry.js → p-423d5a4d.entry.js} +1 -1
- package/dist/ionic/p-44ef7224.system.js +4 -0
- package/dist/ionic/p-4ca1ce6b.system.entry.js +4 -0
- package/dist/ionic/{p-f7faa32d.entry.js → p-5c96dc4e.entry.js} +1 -1
- package/dist/ionic/{p-582dc7c1.js → p-5ef91692.js} +1 -1
- package/dist/ionic/{p-f9708a54.entry.js → p-61769039.entry.js} +1 -1
- package/dist/ionic/{p-d3b8aebf.entry.js → p-67b891af.entry.js} +1 -1
- package/dist/ionic/{p-d1d3b740.system.entry.js → p-6b9bf14c.system.entry.js} +1 -1
- package/dist/ionic/p-6da27ab8.system.entry.js +4 -0
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/dist/ionic/{p-f789b7fa.entry.js → p-74723f41.entry.js} +1 -1
- package/dist/ionic/{p-28f5715a.system.entry.js → p-74bd26b8.system.entry.js} +1 -1
- package/dist/ionic/p-7cfd253c.js +4 -0
- package/dist/ionic/{p-45ee211b.system.entry.js → p-8074bdd7.system.entry.js} +1 -1
- package/dist/ionic/{p-b32742f3.system.js → p-81b46714.system.js} +1 -1
- package/dist/ionic/p-86c5c320.entry.js +4 -0
- package/dist/ionic/{p-613d4042.system.js → p-8d9475b5.system.js} +1 -1
- package/dist/ionic/{p-d693e765.system.entry.js → p-8fa43732.system.entry.js} +1 -1
- package/dist/ionic/p-90ec5785.system.entry.js +4 -0
- package/dist/ionic/{p-091cd81e.entry.js → p-958bde76.entry.js} +1 -1
- package/dist/ionic/{p-b3a58769.entry.js → p-9b3c3564.entry.js} +1 -1
- package/dist/ionic/p-af986299.system.entry.js +4 -0
- package/dist/ionic/p-b321c999.entry.js +4 -0
- package/dist/ionic/p-b34c1ae1.js +4 -0
- package/dist/ionic/{p-5c17f888.entry.js → p-c0d1e5a1.entry.js} +1 -1
- package/dist/ionic/{p-dab7745f.system.entry.js → p-ccea9adc.system.entry.js} +1 -1
- package/dist/ionic/{p-0b68c41d.system.entry.js → p-d1356034.system.entry.js} +1 -1
- package/dist/ionic/{p-d9eb4632.system.entry.js → p-d5db0834.system.entry.js} +1 -1
- package/dist/ionic/{p-79e3f0b6.entry.js → p-d8538837.entry.js} +1 -1
- package/dist/ionic/p-d8a0267b.system.entry.js +4 -0
- package/dist/ionic/{p-8843b046.system.js → p-db46fc66.system.js} +1 -1
- package/dist/ionic/p-f5c19164.entry.js +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +8 -1
- package/dist/types/components/datetime/datetime.d.ts +17 -10
- package/dist/types/components/datetime/utils/data.d.ts +1 -1
- package/dist/types/components/datetime/utils/parse.d.ts +3 -3
- package/dist/types/components/radio/radio.d.ts +8 -1
- package/dist/types/components/range/range.d.ts +2 -1
- package/dist/types/components/toast/toast-interface.d.ts +3 -0
- package/dist/types/components/toggle/toggle.d.ts +8 -1
- package/dist/types/components.d.ts +40 -16
- package/hydrate/index.js +164 -122
- package/package.json +1 -1
- package/dist/collection/components/popover/test/async/popover.e2e.js +0 -20
- package/dist/esm-es5/data-4b448e3a.js +0 -4
- package/dist/esm-es5/framework-delegate-aa433dea.js +0 -4
- package/dist/ionic/p-0053fe81.system.entry.js +0 -4
- package/dist/ionic/p-2cdcd6f2.entry.js +0 -4
- package/dist/ionic/p-3565c8a0.entry.js +0 -4
- package/dist/ionic/p-5b88f780.entry.js +0 -4
- package/dist/ionic/p-601fd53c.js +0 -4
- package/dist/ionic/p-98b618ce.system.entry.js +0 -4
- package/dist/ionic/p-b1e8f045.entry.js +0 -4
- package/dist/ionic/p-b287ab05.js +0 -4
- package/dist/ionic/p-b3cfc6e1.system.entry.js +0 -4
- package/dist/ionic/p-b54a1fcb.system.entry.js +0 -4
- package/dist/ionic/p-cc8910e7.system.js +0 -4
- package/dist/ionic/p-e53b8af4.system.entry.js +0 -4
- package/dist/ionic/p-f78e60a5.entry.js +0 -4
- package/dist/ionic/p-fd42994b.system.entry.js +0 -4
|
@@ -218,12 +218,12 @@ export class Popover {
|
|
|
218
218
|
}
|
|
219
219
|
const { el } = this;
|
|
220
220
|
const { inline, delegate } = this.getDelegate(true);
|
|
221
|
-
this.ionMount.emit();
|
|
222
221
|
this.usersElement = await attachComponent(delegate, el, this.component, ['popover-viewport'], this.componentProps, inline);
|
|
223
222
|
if (!this.keyboardEvents) {
|
|
224
223
|
this.configureKeyboardInteraction();
|
|
225
224
|
}
|
|
226
225
|
this.configureDismissInteraction();
|
|
226
|
+
this.ionMount.emit();
|
|
227
227
|
/**
|
|
228
228
|
* When using the lazy loaded build of Stencil, we need to wait
|
|
229
229
|
* for every Stencil component instance to be ready before presenting
|
|
@@ -147,6 +147,15 @@ input {
|
|
|
147
147
|
margin-bottom: 10px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
:host(.in-item.radio-label-placement-stacked) .label-text-wrapper {
|
|
151
|
+
margin-top: 10px;
|
|
152
|
+
margin-bottom: 16px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host(.in-item.radio-label-placement-stacked) .native-wrapper {
|
|
156
|
+
margin-bottom: 10px;
|
|
157
|
+
}
|
|
158
|
+
|
|
150
159
|
/**
|
|
151
160
|
* If no label text is placed into the slot
|
|
152
161
|
* then the element should be hidden otherwise
|
|
@@ -173,6 +182,14 @@ input {
|
|
|
173
182
|
justify-content: end;
|
|
174
183
|
}
|
|
175
184
|
|
|
185
|
+
:host(.radio-alignment-start) .radio-wrapper {
|
|
186
|
+
align-items: start;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host(.radio-alignment-center) .radio-wrapper {
|
|
190
|
+
align-items: center;
|
|
191
|
+
}
|
|
192
|
+
|
|
176
193
|
/**
|
|
177
194
|
* Label is on the left of the radio in LTR and
|
|
178
195
|
* on the right in RTL.
|
|
@@ -235,6 +252,24 @@ input {
|
|
|
235
252
|
min-width: 100px;
|
|
236
253
|
}
|
|
237
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Label is on top of the radio.
|
|
257
|
+
*/
|
|
258
|
+
:host(.radio-label-placement-stacked) .radio-wrapper {
|
|
259
|
+
flex-direction: column;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host(.radio-label-placement-stacked) .label-text-wrapper {
|
|
263
|
+
/**
|
|
264
|
+
* The margin between the label and
|
|
265
|
+
* the radio 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
|
+
|
|
238
273
|
:host {
|
|
239
274
|
--color-checked: var(--ion-color-primary, #3880ff);
|
|
240
275
|
}
|
|
@@ -70,6 +70,7 @@ export class Radio {
|
|
|
70
70
|
this.labelPlacement = 'start';
|
|
71
71
|
this.legacy = undefined;
|
|
72
72
|
this.justify = 'space-between';
|
|
73
|
+
this.alignment = 'center';
|
|
73
74
|
}
|
|
74
75
|
valueChanged() {
|
|
75
76
|
/**
|
|
@@ -134,7 +135,7 @@ export class Radio {
|
|
|
134
135
|
return legacyFormController.hasLegacyControl() ? this.renderLegacyRadio() : this.renderRadio();
|
|
135
136
|
}
|
|
136
137
|
renderRadio() {
|
|
137
|
-
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex } = this;
|
|
138
|
+
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
|
|
138
139
|
const mode = getIonMode(this);
|
|
139
140
|
const inItem = hostContext('ion-item', el);
|
|
140
141
|
return (h(Host, { onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
@@ -143,6 +144,7 @@ export class Radio {
|
|
|
143
144
|
'radio-checked': checked,
|
|
144
145
|
'radio-disabled': disabled,
|
|
145
146
|
[`radio-justify-${justify}`]: true,
|
|
147
|
+
[`radio-alignment-${alignment}`]: true,
|
|
146
148
|
[`radio-label-placement-${labelPlacement}`]: true,
|
|
147
149
|
// Focus and active styling should not apply when the radio is in an item
|
|
148
150
|
'ion-activatable': !inItem,
|
|
@@ -275,15 +277,15 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
|
|
|
275
277
|
"type": "string",
|
|
276
278
|
"mutable": false,
|
|
277
279
|
"complexType": {
|
|
278
|
-
"original": "'start' | 'end' | 'fixed'",
|
|
279
|
-
"resolved": "\"end\" | \"fixed\" | \"start\"",
|
|
280
|
+
"original": "'start' | 'end' | 'fixed' | 'stacked'",
|
|
281
|
+
"resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
|
|
280
282
|
"references": {}
|
|
281
283
|
},
|
|
282
284
|
"required": false,
|
|
283
285
|
"optional": false,
|
|
284
286
|
"docs": {
|
|
285
287
|
"tags": [],
|
|
286
|
-
"text": "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 (\"...\")."
|
|
288
|
+
"text": "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."
|
|
287
289
|
},
|
|
288
290
|
"attribute": "label-placement",
|
|
289
291
|
"reflect": false,
|
|
@@ -323,6 +325,24 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
|
|
|
323
325
|
"attribute": "justify",
|
|
324
326
|
"reflect": false,
|
|
325
327
|
"defaultValue": "'space-between'"
|
|
328
|
+
},
|
|
329
|
+
"alignment": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "'start' | 'center'",
|
|
334
|
+
"resolved": "\"center\" | \"start\"",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": false,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"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."
|
|
342
|
+
},
|
|
343
|
+
"attribute": "alignment",
|
|
344
|
+
"reflect": false,
|
|
345
|
+
"defaultValue": "'center'"
|
|
326
346
|
}
|
|
327
347
|
};
|
|
328
348
|
}
|
|
@@ -147,6 +147,15 @@ input {
|
|
|
147
147
|
margin-bottom: 10px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
:host(.in-item.radio-label-placement-stacked) .label-text-wrapper {
|
|
151
|
+
margin-top: 10px;
|
|
152
|
+
margin-bottom: 16px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host(.in-item.radio-label-placement-stacked) .native-wrapper {
|
|
156
|
+
margin-bottom: 10px;
|
|
157
|
+
}
|
|
158
|
+
|
|
150
159
|
/**
|
|
151
160
|
* If no label text is placed into the slot
|
|
152
161
|
* then the element should be hidden otherwise
|
|
@@ -173,6 +182,14 @@ input {
|
|
|
173
182
|
justify-content: end;
|
|
174
183
|
}
|
|
175
184
|
|
|
185
|
+
:host(.radio-alignment-start) .radio-wrapper {
|
|
186
|
+
align-items: start;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host(.radio-alignment-center) .radio-wrapper {
|
|
190
|
+
align-items: center;
|
|
191
|
+
}
|
|
192
|
+
|
|
176
193
|
/**
|
|
177
194
|
* Label is on the left of the radio in LTR and
|
|
178
195
|
* on the right in RTL.
|
|
@@ -235,6 +252,24 @@ input {
|
|
|
235
252
|
min-width: 100px;
|
|
236
253
|
}
|
|
237
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Label is on top of the radio.
|
|
257
|
+
*/
|
|
258
|
+
:host(.radio-label-placement-stacked) .radio-wrapper {
|
|
259
|
+
flex-direction: column;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host(.radio-label-placement-stacked) .label-text-wrapper {
|
|
263
|
+
/**
|
|
264
|
+
* The margin between the label and
|
|
265
|
+
* the radio 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
|
+
|
|
238
273
|
:host {
|
|
239
274
|
--color: rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);
|
|
240
275
|
--color-checked: var(--ion-color-primary, #3880ff);
|
|
@@ -51,4 +51,19 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
|
|
|
51
51
|
expect(await list.screenshot()).toMatchSnapshot(screenshot(`radio-long-label-in-item`));
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
|
+
test.describe(title('radio: stacked label in item'), () => {
|
|
55
|
+
test('should render margins correctly when using stacked label in item', async ({ page }) => {
|
|
56
|
+
await page.setContent(`
|
|
57
|
+
<ion-list>
|
|
58
|
+
<ion-radio-group>
|
|
59
|
+
<ion-item>
|
|
60
|
+
<ion-radio label-placement="stacked">Enable Notifications</ion-radio>
|
|
61
|
+
</ion-item>
|
|
62
|
+
</ion-radio-group>
|
|
63
|
+
</ion-list>
|
|
64
|
+
`, config);
|
|
65
|
+
const list = page.locator('ion-list');
|
|
66
|
+
await expect(list).toHaveScreenshot(screenshot(`radio-stacked-label-in-item`));
|
|
67
|
+
});
|
|
68
|
+
});
|
|
54
69
|
});
|
|
@@ -100,5 +100,25 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
100
100
|
expect(await radio.screenshot()).toMatchSnapshot(screenshot(`radio-label-fixed-justify-space-between`));
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
|
+
test.describe('radio: stacked placement', () => {
|
|
104
|
+
test('should align the label to the start of the container in the stacked position', async ({ page }) => {
|
|
105
|
+
await page.setContent(`
|
|
106
|
+
<ion-radio-group value="1">
|
|
107
|
+
<ion-radio label-placement="stacked" alignment="start" style="width: 200px" value="1">This is a long label</ion-radio>
|
|
108
|
+
</ion-radio-group>
|
|
109
|
+
`, config);
|
|
110
|
+
const radio = page.locator('ion-radio');
|
|
111
|
+
await expect(radio).toHaveScreenshot(screenshot(`radio-label-stacked-align-start`));
|
|
112
|
+
});
|
|
113
|
+
test('should align the label to the center of the container in the stacked position', async ({ page }) => {
|
|
114
|
+
await page.setContent(`
|
|
115
|
+
<ion-radio-group value="1">
|
|
116
|
+
<ion-radio label-placement="stacked" alignment="center" style="width: 200px" value="1">This is a long label</ion-radio>
|
|
117
|
+
</ion-radio-group>
|
|
118
|
+
`, config);
|
|
119
|
+
const radio = page.locator('ion-radio');
|
|
120
|
+
await expect(radio).toHaveScreenshot(screenshot(`radio-label-stacked-align-center`));
|
|
121
|
+
});
|
|
122
|
+
});
|
|
103
123
|
});
|
|
104
124
|
});
|
|
@@ -363,6 +363,25 @@
|
|
|
363
363
|
max-width: 200px;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Label is on top of the range.
|
|
368
|
+
*/
|
|
369
|
+
:host(.range-label-placement-stacked) .range-wrapper {
|
|
370
|
+
flex-direction: column;
|
|
371
|
+
align-items: stretch;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
:host(.range-label-placement-stacked) .label-text-wrapper {
|
|
375
|
+
/**
|
|
376
|
+
* The margin between the label and
|
|
377
|
+
* the range should be on the bottom
|
|
378
|
+
* when the label sits on top.
|
|
379
|
+
*/
|
|
380
|
+
margin-left: 0;
|
|
381
|
+
margin-right: 0;
|
|
382
|
+
margin-bottom: 16px;
|
|
383
|
+
}
|
|
384
|
+
|
|
366
385
|
:host {
|
|
367
386
|
--knob-border-radius: 50%;
|
|
368
387
|
--knob-background: #ffffff;
|
|
@@ -407,10 +426,31 @@
|
|
|
407
426
|
margin-bottom: 0;
|
|
408
427
|
}
|
|
409
428
|
|
|
410
|
-
:host(.range-has-pin) {
|
|
429
|
+
:host(.range-has-pin:not(.range-label-placement-stacked)) {
|
|
430
|
+
/**
|
|
431
|
+
* The pin should not overlap any elements that are
|
|
432
|
+
* above the range. By adding padding to the top of the
|
|
433
|
+
* range, it provides a buffer for the pin to move into
|
|
434
|
+
* when it is pressed.
|
|
435
|
+
*
|
|
436
|
+
* The padding is not included when the label is stacked
|
|
437
|
+
* because the pin is below the label.
|
|
438
|
+
* It still requires a buffer to prevent the pin from
|
|
439
|
+
* overlapping the range. The buffer is added to the
|
|
440
|
+
* bottom of the range label instead of the host.
|
|
441
|
+
*/
|
|
411
442
|
padding-top: 20px;
|
|
412
443
|
}
|
|
413
444
|
|
|
445
|
+
:host(.range-has-pin.range-label-placement-stacked) .label-text-wrapper {
|
|
446
|
+
/**
|
|
447
|
+
* The pin should not overlap the stacked label. By adding
|
|
448
|
+
* margin to the bottom of the label, it provides a buffer
|
|
449
|
+
* for the pin to move into when it is pressed.
|
|
450
|
+
*/
|
|
451
|
+
margin-bottom: 20px;
|
|
452
|
+
}
|
|
453
|
+
|
|
414
454
|
.range-bar-active {
|
|
415
455
|
bottom: 0;
|
|
416
456
|
width: auto;
|
|
@@ -808,15 +808,15 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
|
|
|
808
808
|
"type": "string",
|
|
809
809
|
"mutable": false,
|
|
810
810
|
"complexType": {
|
|
811
|
-
"original": "'start' | 'end' | 'fixed'",
|
|
812
|
-
"resolved": "\"end\" | \"fixed\" | \"start\"",
|
|
811
|
+
"original": "'start' | 'end' | 'fixed' | 'stacked'",
|
|
812
|
+
"resolved": "\"end\" | \"fixed\" | \"stacked\" | \"start\"",
|
|
813
813
|
"references": {}
|
|
814
814
|
},
|
|
815
815
|
"required": false,
|
|
816
816
|
"optional": false,
|
|
817
817
|
"docs": {
|
|
818
818
|
"tags": [],
|
|
819
|
-
"text": "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 (\"...\")."
|
|
819
|
+
"text": "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."
|
|
820
820
|
},
|
|
821
821
|
"attribute": "label-placement",
|
|
822
822
|
"reflect": false,
|
|
@@ -363,6 +363,25 @@
|
|
|
363
363
|
max-width: 200px;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Label is on top of the range.
|
|
368
|
+
*/
|
|
369
|
+
:host(.range-label-placement-stacked) .range-wrapper {
|
|
370
|
+
flex-direction: column;
|
|
371
|
+
align-items: stretch;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
:host(.range-label-placement-stacked) .label-text-wrapper {
|
|
375
|
+
/**
|
|
376
|
+
* The margin between the label and
|
|
377
|
+
* the range should be on the bottom
|
|
378
|
+
* when the label sits on top.
|
|
379
|
+
*/
|
|
380
|
+
margin-left: 0;
|
|
381
|
+
margin-right: 0;
|
|
382
|
+
margin-bottom: 16px;
|
|
383
|
+
}
|
|
384
|
+
|
|
366
385
|
:host {
|
|
367
386
|
--knob-border-radius: 50%;
|
|
368
387
|
--knob-background: var(--bar-background-active);
|
|
@@ -423,10 +442,31 @@
|
|
|
423
442
|
margin-bottom: 0;
|
|
424
443
|
}
|
|
425
444
|
|
|
426
|
-
:host(.range-has-pin) {
|
|
445
|
+
:host(.range-has-pin:not(.range-label-placement-stacked)) {
|
|
446
|
+
/**
|
|
447
|
+
* The pin should not overlap any elements that are
|
|
448
|
+
* above the range. By adding padding to the top of the
|
|
449
|
+
* range, it provides a buffer for the pin to move into
|
|
450
|
+
* when it is pressed.
|
|
451
|
+
*
|
|
452
|
+
* The padding is not included when the label is stacked
|
|
453
|
+
* because the pin is below the label.
|
|
454
|
+
* It still requires a buffer to prevent the pin from
|
|
455
|
+
* overlapping the range. The buffer is added to the
|
|
456
|
+
* bottom of the range label instead of the host.
|
|
457
|
+
*/
|
|
427
458
|
padding-top: 28px;
|
|
428
459
|
}
|
|
429
460
|
|
|
461
|
+
:host(.range-has-pin.range-label-placement-stacked) .label-text-wrapper {
|
|
462
|
+
/**
|
|
463
|
+
* The pin should not overlap the stacked label. By adding
|
|
464
|
+
* margin to the bottom of the label, it provides a buffer
|
|
465
|
+
* for the pin to move into when it is pressed.
|
|
466
|
+
*/
|
|
467
|
+
margin-bottom: 28px;
|
|
468
|
+
}
|
|
469
|
+
|
|
430
470
|
.range-bar-active {
|
|
431
471
|
bottom: 0;
|
|
432
472
|
width: auto;
|
|
@@ -40,6 +40,17 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
40
40
|
const range = page.locator('ion-range');
|
|
41
41
|
expect(await range.screenshot()).toMatchSnapshot(screenshot(`range-no-items-fixed`));
|
|
42
42
|
});
|
|
43
|
+
test('should render label above the range slider', async ({ page }) => {
|
|
44
|
+
await page.setContent(`
|
|
45
|
+
<div id="container" style="padding-inline-start: 20px;">
|
|
46
|
+
<ion-range label-placement="stacked">
|
|
47
|
+
<span slot="label">Volume</span>
|
|
48
|
+
</ion-range>
|
|
49
|
+
</div>
|
|
50
|
+
`, config);
|
|
51
|
+
const range = page.locator('#container');
|
|
52
|
+
await expect(range).toHaveScreenshot(screenshot(`range-no-items-stacked`));
|
|
53
|
+
});
|
|
43
54
|
});
|
|
44
55
|
test.describe('range: start and end items', () => {
|
|
45
56
|
test('should render a range with no visible label', async ({ page }) => {
|
|
@@ -85,6 +96,17 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
85
96
|
const range = page.locator('ion-range');
|
|
86
97
|
expect(await range.screenshot()).toMatchSnapshot(screenshot(`range-items-fixed`));
|
|
87
98
|
});
|
|
99
|
+
test('should render label above the range slider', async ({ page }) => {
|
|
100
|
+
await page.setContent(`
|
|
101
|
+
<ion-range label-placement="stacked">
|
|
102
|
+
<ion-icon name="volume-off" slot="start"></ion-icon>
|
|
103
|
+
<ion-icon name="volume-high" slot="end"></ion-icon>
|
|
104
|
+
<span slot="label">Volume</span>
|
|
105
|
+
</ion-range>
|
|
106
|
+
`, config);
|
|
107
|
+
const range = page.locator('ion-range');
|
|
108
|
+
await expect(range).toHaveScreenshot(screenshot(`range-items-stacked`));
|
|
109
|
+
});
|
|
88
110
|
});
|
|
89
111
|
test.describe('range: label prop', () => {
|
|
90
112
|
test('should render label in the start placement', async ({ page }) => {
|
|
@@ -102,6 +124,15 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
102
124
|
const range = page.locator('ion-range');
|
|
103
125
|
expect(await range.screenshot()).toMatchSnapshot(screenshot(`range-label-prop-fixed`));
|
|
104
126
|
});
|
|
127
|
+
test('should render label above the range slider', async ({ page }) => {
|
|
128
|
+
await page.setContent(`
|
|
129
|
+
<div id="container" style="padding-inline-start: 20px;">
|
|
130
|
+
<ion-range label-placement="stacked" label="Volume"></ion-range>
|
|
131
|
+
</div>
|
|
132
|
+
`, config);
|
|
133
|
+
const range = page.locator('#container');
|
|
134
|
+
await expect(range).toHaveScreenshot(screenshot(`range-label-prop-stacked`));
|
|
135
|
+
});
|
|
105
136
|
});
|
|
106
137
|
});
|
|
107
138
|
});
|
|
@@ -117,4 +148,21 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
117
148
|
expect(await range.screenshot()).toMatchSnapshot(screenshot(`range-label-truncate`));
|
|
118
149
|
});
|
|
119
150
|
});
|
|
151
|
+
test.describe(title('range: with pin'), () => {
|
|
152
|
+
test('should render pin below a stacked label', async ({ page }) => {
|
|
153
|
+
await page.setContent(`
|
|
154
|
+
<div id="container" style="padding-inline-start: 20px;">
|
|
155
|
+
<ion-range label-placement="stacked" pin="true">
|
|
156
|
+
<span slot="label">Volume</span>
|
|
157
|
+
</ion-range>
|
|
158
|
+
</div>
|
|
159
|
+
`, config);
|
|
160
|
+
const container = page.locator('#container');
|
|
161
|
+
const range = page.locator('ion-range');
|
|
162
|
+
const knob = range.locator('.range-knob-handle');
|
|
163
|
+
// Force the pin to show
|
|
164
|
+
await knob.evaluate((el) => el.classList.add('ion-focused'));
|
|
165
|
+
await expect(container).toHaveScreenshot(screenshot(`range-stacked-pin`));
|
|
166
|
+
});
|
|
167
|
+
});
|
|
120
168
|
});
|
|
@@ -58,4 +58,19 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
|
|
|
58
58
|
expect(await list.screenshot()).toMatchSnapshot(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,20 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
90
90
|
expect(await toggle.screenshot()).toMatchSnapshot(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
|
+
});
|
|
93
109
|
});
|
|
@@ -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,24 @@ 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
|
+
/**
|
|
263
|
+
* The margin between the label and
|
|
264
|
+
* the toggle should be on the bottom
|
|
265
|
+
* when the label sits on top.
|
|
266
|
+
*/
|
|
267
|
+
margin-left: 0;
|
|
268
|
+
margin-right: 0;
|
|
269
|
+
margin-bottom: 16px;
|
|
270
|
+
}
|
|
271
|
+
|
|
238
272
|
.toggle-icon-wrapper {
|
|
239
273
|
display: flex;
|
|
240
274
|
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
|
}
|