@ionic/core 9.0.12-dev.11794925657.15984d14 → 9.0.12-dev.11795023599.110c163a
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/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-picker-column.js +1 -1
- package/components/ion-range.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-reorder-group.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/{p-Bl36leJI.js → p-BeEHsJM3.js} +1 -1
- package/components/p-CXQ6JEmL.js +4 -0
- package/components/{p-fCziDtBc.js → p-DUJ2gcEe.js} +1 -1
- package/components/{p-C6Eoe8TE.js → p-DfrQs1O0.js} +1 -1
- package/components/{p-DSGxE4YQ.js → p-yyRjU9O9.js} +1 -1
- package/dist/cjs/{button-active-B9Tkc4mf.js → button-active-D5wEis5p.js} +1 -1
- package/dist/cjs/{haptic-CRRCyhfL.js → haptic-CqVhfNKl.js} +6 -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-fab_3.cjs.entry.js +12 -5
- package/dist/cjs/ion-picker-column.cjs.entry.js +1 -1
- package/dist/cjs/ion-range.cjs.entry.js +61 -37
- package/dist/cjs/ion-refresher_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toggle.cjs.entry.js +15 -7
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/fab-button/fab-button.ios.css +32 -6
- package/dist/collection/components/fab-button/fab-button.js +32 -3
- package/dist/collection/components/fab-button/fab-button.md.css +24 -5
- package/dist/collection/components/range/range.js +61 -37
- package/dist/collection/components/toggle/toggle.ios.css +11 -1
- package/dist/collection/components/toggle/toggle.js +51 -5
- package/dist/collection/utils/native/haptic.js +6 -2
- package/dist/docs.json +92 -3
- package/dist/esm/{button-active-C2jz6R8a.js → button-active-DuvOEEsE.js} +1 -1
- package/dist/esm/{haptic-ChR8my2M.js → haptic-C9ma6MwT.js} +6 -2
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +2 -2
- package/dist/esm/ion-fab_3.entry.js +13 -6
- package/dist/esm/ion-picker-column.entry.js +1 -1
- package/dist/esm/ion-range.entry.js +61 -37
- package/dist/esm/ion-refresher_2.entry.js +1 -1
- package/dist/esm/ion-reorder_2.entry.js +1 -1
- package/dist/esm/ion-toggle.entry.js +15 -7
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +12 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-6e7d46fa.entry.js → p-498073c0.entry.js} +1 -1
- package/dist/ionic/{p-1ae4b282.entry.js → p-6c854d4a.entry.js} +1 -1
- package/dist/ionic/{p-d7749f70.entry.js → p-7f3c7fec.entry.js} +1 -1
- package/dist/ionic/p-99fd4028.entry.js +4 -0
- package/dist/ionic/{p-RJtRqfIz.js → p-BaU5Mt_n.js} +1 -1
- package/dist/ionic/p-CdqNYSOD.js +4 -0
- package/dist/ionic/{p-2f68b3c0.entry.js → p-c118ade8.entry.js} +1 -1
- package/dist/ionic/p-d0d4482d.entry.js +4 -0
- package/dist/ionic/{p-52186d6b.entry.js → p-d3b2bd6a.entry.js} +1 -1
- package/dist/ionic/p-e892e218.entry.js +4 -0
- package/dist/types/components/fab-button/fab-button.d.ts +6 -0
- package/dist/types/components/range/range-interface.d.ts +2 -30
- package/dist/types/components/range/range.d.ts +12 -5
- package/dist/types/components/toggle/toggle.d.ts +16 -1
- package/dist/types/components.d.ts +29 -0
- package/dist/types/interface.d.ts +1 -8
- package/dist/types/utils/config.d.ts +16 -0
- package/dist/types/utils/native/haptic.d.ts +2 -2
- package/hydrate/index.js +96 -50
- package/hydrate/index.mjs +96 -50
- package/package.json +1 -1
- package/components/p-CEW4RXZO.js +0 -4
- package/dist/ionic/p-74dda4e5.entry.js +0 -4
- package/dist/ionic/p-9a2b5db2.entry.js +0 -4
- package/dist/ionic/p-C_0lvVN_.js +0 -4
- package/dist/ionic/p-fcc5b886.entry.js +0 -4
|
@@ -141,7 +141,6 @@
|
|
|
141
141
|
width: 100%;
|
|
142
142
|
height: 100%;
|
|
143
143
|
transform: var(--transform);
|
|
144
|
-
transition: var(--transition);
|
|
145
144
|
border-width: var(--border-width);
|
|
146
145
|
border-style: var(--border-style);
|
|
147
146
|
border-color: var(--border-color);
|
|
@@ -183,8 +182,6 @@
|
|
|
183
182
|
align-items: center;
|
|
184
183
|
justify-content: center;
|
|
185
184
|
height: 100%;
|
|
186
|
-
transition: all ease-in-out 300ms;
|
|
187
|
-
transition-property: transform, opacity;
|
|
188
185
|
z-index: 1;
|
|
189
186
|
}
|
|
190
187
|
|
|
@@ -247,8 +244,6 @@
|
|
|
247
244
|
position: absolute;
|
|
248
245
|
height: 100%;
|
|
249
246
|
transform: scale(0.4) rotateZ(-45deg);
|
|
250
|
-
transition: all ease-in-out 300ms;
|
|
251
|
-
transition-property: transform, opacity;
|
|
252
247
|
font-size: var(--close-icon-font-size);
|
|
253
248
|
opacity: 0;
|
|
254
249
|
z-index: 1;
|
|
@@ -268,6 +263,30 @@ ion-ripple-effect {
|
|
|
268
263
|
color: var(--ripple-color);
|
|
269
264
|
}
|
|
270
265
|
|
|
266
|
+
:host(.fab-button-animated) .button-native {
|
|
267
|
+
transition: var(--transition);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
:host(.fab-button-animated) .button-inner,
|
|
271
|
+
:host(.fab-button-animated) .close-icon {
|
|
272
|
+
transition: all ease-in-out 300ms;
|
|
273
|
+
transition-property: transform, opacity;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@media (prefers-reduced-motion: reduce) {
|
|
277
|
+
:host(.fab-button-animated) .button-native {
|
|
278
|
+
transform: none;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Fade the content and close icon instead
|
|
282
|
+
* of rotating and scaling them.
|
|
283
|
+
*/
|
|
284
|
+
:host(.fab-button-animated) .button-inner,
|
|
285
|
+
:host(.fab-button-animated) .close-icon {
|
|
286
|
+
transform: none;
|
|
287
|
+
transition-property: opacity;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
271
290
|
@supports (backdrop-filter: blur(0)) {
|
|
272
291
|
:host(.fab-button-translucent) .button-native {
|
|
273
292
|
backdrop-filter: var(--backdrop-filter);
|
|
@@ -161,7 +161,7 @@ export class Range {
|
|
|
161
161
|
* should not move.
|
|
162
162
|
*/
|
|
163
163
|
threshold: 10,
|
|
164
|
-
onStart: (
|
|
164
|
+
onStart: () => this.onStart(),
|
|
165
165
|
onMove: (ev) => this.onMove(ev),
|
|
166
166
|
onEnd: (ev) => this.onEnd(ev),
|
|
167
167
|
});
|
|
@@ -194,22 +194,23 @@ export class Range {
|
|
|
194
194
|
syncActivated();
|
|
195
195
|
};
|
|
196
196
|
this.handleKeyboard = (knob, isIncrease) => {
|
|
197
|
+
const { ensureValueInBounds } = this;
|
|
197
198
|
let step = this.step;
|
|
198
199
|
step = step > 0 ? step : 1;
|
|
199
200
|
step = step / (this.max - this.min);
|
|
200
201
|
if (!isIncrease) {
|
|
201
202
|
step *= -1;
|
|
202
203
|
}
|
|
203
|
-
this.ionKnobMoveStart.emit(this.getKnobMoveDetail(knob));
|
|
204
204
|
if (knob === 'A') {
|
|
205
205
|
this.ratioA = clamp(0, this.ratioA + step, 1);
|
|
206
206
|
}
|
|
207
207
|
else {
|
|
208
208
|
this.ratioB = clamp(0, this.ratioB + step, 1);
|
|
209
209
|
}
|
|
210
|
+
this.ionKnobMoveStart.emit({ value: ensureValueInBounds(this.value) });
|
|
210
211
|
this.updateValue();
|
|
211
212
|
this.emitValueChange();
|
|
212
|
-
this.ionKnobMoveEnd.emit(this.
|
|
213
|
+
this.ionKnobMoveEnd.emit({ value: ensureValueInBounds(this.value) });
|
|
213
214
|
};
|
|
214
215
|
this.onBlur = () => {
|
|
215
216
|
if (this.hasFocus) {
|
|
@@ -402,32 +403,55 @@ export class Range {
|
|
|
402
403
|
this.ionChange.emit({ value: this.value });
|
|
403
404
|
}
|
|
404
405
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
406
|
+
* The value should be updated on touch end or
|
|
407
|
+
* when the component is being dragged.
|
|
408
|
+
* This follows the native behavior of mobile devices.
|
|
408
409
|
*
|
|
409
|
-
*
|
|
410
|
+
* For example: When the user lifts their finger from the
|
|
411
|
+
* screen after tapping the bar or dragging the bar or knob.
|
|
410
412
|
*/
|
|
411
|
-
onStart(
|
|
412
|
-
|
|
413
|
-
if (contentEl) {
|
|
414
|
-
this.initialContentScrollY = disableContentScrollY(contentEl);
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Pick the knob before emitting so the start event can
|
|
418
|
-
* report it. It stays the same for the rest of the drag.
|
|
419
|
-
*/
|
|
420
|
-
const knob = this.setPressedKnob(startX);
|
|
421
|
-
this.ionKnobMoveStart.emit(this.getKnobMoveDetail(knob));
|
|
413
|
+
onStart() {
|
|
414
|
+
this.ionKnobMoveStart.emit({ value: this.ensureValueInBounds(this.value) });
|
|
422
415
|
}
|
|
423
416
|
/**
|
|
424
417
|
* The value should be updated while dragging the
|
|
425
418
|
* bar or knob.
|
|
426
419
|
*
|
|
420
|
+
* While the user is dragging, the view
|
|
421
|
+
* should not scroll. This is to prevent the user from
|
|
422
|
+
* feeling disoriented while dragging.
|
|
423
|
+
*
|
|
424
|
+
* The user can scroll on the view if the knob or
|
|
425
|
+
* bar is not being dragged.
|
|
426
|
+
*
|
|
427
427
|
* @param detail The details of the gesture event.
|
|
428
428
|
*/
|
|
429
429
|
onMove(detail) {
|
|
430
|
-
this
|
|
430
|
+
const { contentEl, pressedKnob } = this;
|
|
431
|
+
const currentX = detail.currentX;
|
|
432
|
+
/**
|
|
433
|
+
* Since the user is dragging on the bar or knob, the view should not scroll.
|
|
434
|
+
*
|
|
435
|
+
* This only needs to be done once.
|
|
436
|
+
*/
|
|
437
|
+
if (contentEl && this.pressedKnob === undefined) {
|
|
438
|
+
this.initialContentScrollY = disableContentScrollY(contentEl);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* The `pressedKnob` can be undefined if the user just
|
|
442
|
+
* started dragging the knob.
|
|
443
|
+
*
|
|
444
|
+
* This is necessary to determine which knob the user is dragging,
|
|
445
|
+
* especially when using dual knobs.
|
|
446
|
+
* Plus, it determines when to apply certain styles.
|
|
447
|
+
*
|
|
448
|
+
* This only needs to be done once since the knob won't change
|
|
449
|
+
* while the user is dragging.
|
|
450
|
+
*/
|
|
451
|
+
if (pressedKnob === undefined) {
|
|
452
|
+
this.setPressedKnob(currentX);
|
|
453
|
+
}
|
|
454
|
+
this.update(currentX);
|
|
431
455
|
}
|
|
432
456
|
/**
|
|
433
457
|
* The value should be updated on touch end:
|
|
@@ -439,26 +463,35 @@ export class Range {
|
|
|
439
463
|
onEnd(detail) {
|
|
440
464
|
const { contentEl, initialContentScrollY } = this;
|
|
441
465
|
const currentX = detail.currentX ?? detail.clientX;
|
|
466
|
+
/**
|
|
467
|
+
* The `pressedKnob` can be undefined if the user never
|
|
468
|
+
* dragged the knob. They just tapped on the bar.
|
|
469
|
+
*
|
|
470
|
+
* This is necessary to determine which knob the user is changing,
|
|
471
|
+
* especially when using dual knobs.
|
|
472
|
+
* Plus, it determines when to apply certain styles.
|
|
473
|
+
*/
|
|
474
|
+
if (this.pressedKnob === undefined) {
|
|
475
|
+
this.setPressedKnob(currentX);
|
|
476
|
+
}
|
|
442
477
|
/**
|
|
443
478
|
* The user is no longer dragging the bar or
|
|
444
479
|
* knob (if they were dragging it).
|
|
445
480
|
*
|
|
446
481
|
* The user can now scroll on the view in the next gesture event.
|
|
447
482
|
*/
|
|
448
|
-
if (contentEl) {
|
|
483
|
+
if (contentEl && this.pressedKnob !== undefined) {
|
|
449
484
|
resetContentScrollY(contentEl, initialContentScrollY);
|
|
450
485
|
}
|
|
451
486
|
// update the active knob's position
|
|
452
487
|
this.update(currentX);
|
|
453
|
-
// The pressed knob is always set because `onStart` runs first.
|
|
454
|
-
const knob = this.pressedKnob;
|
|
455
488
|
/**
|
|
456
489
|
* Reset the pressed knob to undefined since the user
|
|
457
490
|
* may start dragging a different knob in the next gesture event.
|
|
458
491
|
*/
|
|
459
492
|
this.pressedKnob = undefined;
|
|
460
493
|
this.emitValueChange();
|
|
461
|
-
this.ionKnobMoveEnd.emit(this.
|
|
494
|
+
this.ionKnobMoveEnd.emit({ value: this.ensureValueInBounds(this.value) });
|
|
462
495
|
}
|
|
463
496
|
update(currentX) {
|
|
464
497
|
// figure out where the pointer is currently at
|
|
@@ -482,13 +515,6 @@ export class Range {
|
|
|
482
515
|
// Update input value
|
|
483
516
|
this.updateValue();
|
|
484
517
|
}
|
|
485
|
-
getKnobMoveDetail(knob) {
|
|
486
|
-
return {
|
|
487
|
-
value: this.ensureValueInBounds(this.value),
|
|
488
|
-
knob,
|
|
489
|
-
position: getKnobPosition(knob, this.ratioA, this.ratioB, this.dualKnobs),
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
518
|
setPressedKnob(currentX) {
|
|
493
519
|
const rect = (this.rect = this.rangeSlider.getBoundingClientRect());
|
|
494
520
|
// figure out which knob they started closer to
|
|
@@ -496,9 +522,7 @@ export class Range {
|
|
|
496
522
|
if (isRTL(this.el)) {
|
|
497
523
|
ratio = 1 - ratio;
|
|
498
524
|
}
|
|
499
|
-
|
|
500
|
-
this.pressedKnob = knob;
|
|
501
|
-
return knob;
|
|
525
|
+
this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
|
|
502
526
|
}
|
|
503
527
|
get valA() {
|
|
504
528
|
return ratioToValue(this.ratioA, this.min, this.max, this.step);
|
|
@@ -663,7 +687,7 @@ export class Range {
|
|
|
663
687
|
* dragged, the pressedKnob will be defined.
|
|
664
688
|
*/
|
|
665
689
|
if (this.pressedKnob === undefined) {
|
|
666
|
-
this.onStart(
|
|
690
|
+
this.onStart();
|
|
667
691
|
this.onEnd(ev);
|
|
668
692
|
}
|
|
669
693
|
} }, ticks.map((tick) => (h("div", { style: tickStyle(tick), role: "presentation", class: {
|
|
@@ -747,7 +771,7 @@ export class Range {
|
|
|
747
771
|
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
748
772
|
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
749
773
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
750
|
-
return (h(Host, { key: '
|
|
774
|
+
return (h(Host, { key: '72f253ee1514b4c5874a6720c2f954fae7a7c4d4', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
|
|
751
775
|
[mode]: true,
|
|
752
776
|
'in-item': inItem,
|
|
753
777
|
'range-disabled': disabled,
|
|
@@ -761,10 +785,10 @@ export class Range {
|
|
|
761
785
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
762
786
|
'range-value-min': valueAtMin,
|
|
763
787
|
'range-value-max': valueAtMax,
|
|
764
|
-
}) }, h("label", { key: '
|
|
788
|
+
}) }, h("label", { key: '9b96b83a6118ee2a79d8adbb0a58197470308179', class: "range-wrapper", id: "range-label" }, h("div", { key: 'c7b31a7c87c20857a26624bd94501df6420fceec', class: {
|
|
765
789
|
'label-text-wrapper': true,
|
|
766
790
|
'label-text-wrapper-hidden': !hasLabel,
|
|
767
|
-
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '
|
|
791
|
+
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '4ca15b9370097e140550489ff24979f3a959e65b', class: "native-wrapper" }, h("slot", { key: 'f110896c68741bad92239f98b6028cbe0ad5122f', name: "start" }), this.renderRangeSlider(), h("slot", { key: '5c4031c4403fa643ee2e11637b2420ddd8cbc4ce', name: "end" })))));
|
|
768
792
|
}
|
|
769
793
|
static get is() { return "ion-range"; }
|
|
770
794
|
static get encapsulation() { return "shadow"; }
|
|
@@ -593,7 +593,7 @@ input {
|
|
|
593
593
|
opacity: 0;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
.toggle-switch-icon-checked {
|
|
596
|
+
.toggle-switch-icon-checked:not(.toggle-switch-icon-custom) {
|
|
597
597
|
position: absolute;
|
|
598
598
|
width: 15px;
|
|
599
599
|
height: 15px;
|
|
@@ -612,6 +612,16 @@ input {
|
|
|
612
612
|
right: 4px;
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
+
:host(.toggle-ltr) .toggle-switch-icon-checked.toggle-switch-icon-custom {
|
|
616
|
+
/* stylelint-disable-next-line property-disallowed-list */
|
|
617
|
+
left: 6px;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
:host(.toggle-rtl) .toggle-switch-icon-checked.toggle-switch-icon-custom {
|
|
621
|
+
/* stylelint-disable-next-line property-disallowed-list */
|
|
622
|
+
right: 6px;
|
|
623
|
+
}
|
|
624
|
+
|
|
615
625
|
:host(.toggle-activated) .toggle-icon::before,
|
|
616
626
|
:host(.toggle-checked) .toggle-icon::before {
|
|
617
627
|
transform: scale3d(0, 0, 0);
|
|
@@ -128,7 +128,13 @@ export class Toggle {
|
|
|
128
128
|
this.onBlur = () => {
|
|
129
129
|
this.ionBlur.emit();
|
|
130
130
|
};
|
|
131
|
-
this.
|
|
131
|
+
this.getCustomSwitchLabelIcon = (checked) => {
|
|
132
|
+
const { checkedIcon, uncheckedIcon } = this;
|
|
133
|
+
return checked
|
|
134
|
+
? checkedIcon ?? config.get('toggleCheckedIcon')
|
|
135
|
+
: uncheckedIcon ?? config.get('toggleUncheckedIcon');
|
|
136
|
+
};
|
|
137
|
+
this.getDefaultSwitchLabelIcon = (mode, checked) => {
|
|
132
138
|
if (mode === 'md') {
|
|
133
139
|
return checked ? checkmarkOutline : removeOutline;
|
|
134
140
|
}
|
|
@@ -250,10 +256,12 @@ export class Toggle {
|
|
|
250
256
|
this.el.focus();
|
|
251
257
|
}
|
|
252
258
|
renderOnOffSwitchLabels(mode, checked) {
|
|
253
|
-
const
|
|
259
|
+
const customIcon = this.getCustomSwitchLabelIcon(checked);
|
|
260
|
+
const icon = customIcon ?? this.getDefaultSwitchLabelIcon(mode, checked);
|
|
254
261
|
return (h("ion-icon", { class: {
|
|
255
262
|
'toggle-switch-icon': true,
|
|
256
263
|
'toggle-switch-icon-checked': checked,
|
|
264
|
+
'toggle-switch-icon-custom': customIcon != null,
|
|
257
265
|
}, icon: icon, "aria-hidden": "true" }));
|
|
258
266
|
}
|
|
259
267
|
renderToggleControl() {
|
|
@@ -303,7 +311,7 @@ export class Toggle {
|
|
|
303
311
|
// The attributes are matched too because the class needs the item to render.
|
|
304
312
|
const inClickableItem = hostContext('ion-item.ion-activatable, ion-item[button], ion-item[href]', el);
|
|
305
313
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
306
|
-
return (h(Host, { key: '
|
|
314
|
+
return (h(Host, { key: '8c7da2d3478830d1f599f602c80c71c0dee6e068', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
|
|
307
315
|
[mode]: true,
|
|
308
316
|
'in-item': inItem,
|
|
309
317
|
// `ion-focusable` has to stay on because it is what makes the item focusable.
|
|
@@ -317,10 +325,10 @@ export class Toggle {
|
|
|
317
325
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
318
326
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
319
327
|
[`toggle-${rtl}`]: true,
|
|
320
|
-
}) }, h("label", { key: '
|
|
328
|
+
}) }, h("label", { key: 'f49a869a6008ad626fa7bbdc927cba6c4e780581', class: "toggle-wrapper", htmlFor: inputId }, h("input", { key: '5c478d219f89caa1f0b0b116773ddfaf008309c6', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required, ...inheritedAttributes }), h("div", { key: '4f2baf8a21b0498f89b7ce003943e5005b585a35', class: {
|
|
321
329
|
'label-text-wrapper': true,
|
|
322
330
|
'label-text-wrapper-hidden': !hasLabel,
|
|
323
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
331
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '6f6d915fe534addbb59671452272a1924603798b' }), this.renderHintText()), h("div", { key: 'e455a0cab17a24ba514946bc2537eaf63c668d3e', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
324
332
|
}
|
|
325
333
|
static get is() { return "ion-toggle"; }
|
|
326
334
|
static get encapsulation() { return "shadow"; }
|
|
@@ -502,6 +510,44 @@ export class Toggle {
|
|
|
502
510
|
"attribute": "enable-on-off-labels",
|
|
503
511
|
"defaultValue": "config.get('toggleOnOffLabels')"
|
|
504
512
|
},
|
|
513
|
+
"checkedIcon": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"mutable": false,
|
|
516
|
+
"complexType": {
|
|
517
|
+
"original": "string",
|
|
518
|
+
"resolved": "string | undefined",
|
|
519
|
+
"references": {}
|
|
520
|
+
},
|
|
521
|
+
"required": false,
|
|
522
|
+
"optional": true,
|
|
523
|
+
"docs": {
|
|
524
|
+
"tags": [],
|
|
525
|
+
"text": "The built-in named SVG icon name or the exact `src` of an SVG file\nto use when the toggle is checked. Only shown when\n`enableOnOffLabels` is `true`. Defaults to `checkmark-outline` in\n`md` mode and a vertical line in `ios` mode."
|
|
526
|
+
},
|
|
527
|
+
"getter": false,
|
|
528
|
+
"setter": false,
|
|
529
|
+
"reflect": false,
|
|
530
|
+
"attribute": "checked-icon"
|
|
531
|
+
},
|
|
532
|
+
"uncheckedIcon": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"mutable": false,
|
|
535
|
+
"complexType": {
|
|
536
|
+
"original": "string",
|
|
537
|
+
"resolved": "string | undefined",
|
|
538
|
+
"references": {}
|
|
539
|
+
},
|
|
540
|
+
"required": false,
|
|
541
|
+
"optional": true,
|
|
542
|
+
"docs": {
|
|
543
|
+
"tags": [],
|
|
544
|
+
"text": "The built-in named SVG icon name or the exact `src` of an SVG file\nto use when the toggle is unchecked. Only shown when\n`enableOnOffLabels` is `true`. Defaults to `remove-outline` in\n`md` mode and `ellipse-outline` in `ios` mode."
|
|
545
|
+
},
|
|
546
|
+
"getter": false,
|
|
547
|
+
"setter": false,
|
|
548
|
+
"reflect": false,
|
|
549
|
+
"attribute": "unchecked-icon"
|
|
550
|
+
},
|
|
505
551
|
"labelPlacement": {
|
|
506
552
|
"type": "string",
|
|
507
553
|
"mutable": false,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
+
import { config } from "../../global/config";
|
|
4
5
|
import { getCapacitor } from "./capacitor";
|
|
5
6
|
export var ImpactStyle;
|
|
6
7
|
(function (ImpactStyle) {
|
|
@@ -113,10 +114,13 @@ const HapticEngine = {
|
|
|
113
114
|
},
|
|
114
115
|
};
|
|
115
116
|
/**
|
|
116
|
-
* Check to see if the Haptic Plugin is available
|
|
117
|
-
* @return Returns `true`
|
|
117
|
+
* Check to see if haptics are enabled and the Haptic Plugin is available
|
|
118
|
+
* @return Returns `true` if haptics can be triggered
|
|
118
119
|
*/
|
|
119
120
|
export const hapticAvailable = () => {
|
|
121
|
+
if (!config.getBoolean('haptics', true)) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
120
124
|
return HapticEngine.available();
|
|
121
125
|
};
|
|
122
126
|
/**
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-18T17:42:14",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.3",
|
|
@@ -10437,6 +10437,10 @@
|
|
|
10437
10437
|
{
|
|
10438
10438
|
"name": "part",
|
|
10439
10439
|
"text": "close-icon - The close icon that is displayed when a fab list opens (uses ion-icon)."
|
|
10440
|
+
},
|
|
10441
|
+
{
|
|
10442
|
+
"name": "part",
|
|
10443
|
+
"text": "inner - The wrapper around the button's content, hidden when a fab list opens."
|
|
10440
10444
|
}
|
|
10441
10445
|
],
|
|
10442
10446
|
"usage": {},
|
|
@@ -10470,6 +10474,35 @@
|
|
|
10470
10474
|
"getter": false,
|
|
10471
10475
|
"setter": false
|
|
10472
10476
|
},
|
|
10477
|
+
{
|
|
10478
|
+
"name": "animated",
|
|
10479
|
+
"type": "boolean",
|
|
10480
|
+
"complexType": {
|
|
10481
|
+
"original": "boolean",
|
|
10482
|
+
"resolved": "boolean",
|
|
10483
|
+
"references": {}
|
|
10484
|
+
},
|
|
10485
|
+
"mutable": false,
|
|
10486
|
+
"attr": "animated",
|
|
10487
|
+
"reflectToAttr": false,
|
|
10488
|
+
"docs": "If `true`, the fab button will animate between states, such as\nswapping its content for the close icon.",
|
|
10489
|
+
"docsTags": [
|
|
10490
|
+
{
|
|
10491
|
+
"name": "default",
|
|
10492
|
+
"text": "true"
|
|
10493
|
+
}
|
|
10494
|
+
],
|
|
10495
|
+
"default": "true",
|
|
10496
|
+
"values": [
|
|
10497
|
+
{
|
|
10498
|
+
"type": "boolean"
|
|
10499
|
+
}
|
|
10500
|
+
],
|
|
10501
|
+
"optional": false,
|
|
10502
|
+
"required": false,
|
|
10503
|
+
"getter": false,
|
|
10504
|
+
"setter": false
|
|
10505
|
+
},
|
|
10473
10506
|
{
|
|
10474
10507
|
"name": "closeIcon",
|
|
10475
10508
|
"type": "string",
|
|
@@ -11278,6 +11311,10 @@
|
|
|
11278
11311
|
"name": "close-icon",
|
|
11279
11312
|
"docs": "The close icon that is displayed when a fab list opens (uses ion-icon)."
|
|
11280
11313
|
},
|
|
11314
|
+
{
|
|
11315
|
+
"name": "inner",
|
|
11316
|
+
"docs": "The wrapper around the button's content, hidden when a fab list opens."
|
|
11317
|
+
},
|
|
11281
11318
|
{
|
|
11282
11319
|
"name": "native",
|
|
11283
11320
|
"docs": "The native HTML button or anchor element that wraps all child elements."
|
|
@@ -36755,6 +36792,32 @@
|
|
|
36755
36792
|
"getter": false,
|
|
36756
36793
|
"setter": false
|
|
36757
36794
|
},
|
|
36795
|
+
{
|
|
36796
|
+
"name": "checkedIcon",
|
|
36797
|
+
"type": "string | undefined",
|
|
36798
|
+
"complexType": {
|
|
36799
|
+
"original": "string",
|
|
36800
|
+
"resolved": "string | undefined",
|
|
36801
|
+
"references": {}
|
|
36802
|
+
},
|
|
36803
|
+
"mutable": false,
|
|
36804
|
+
"attr": "checked-icon",
|
|
36805
|
+
"reflectToAttr": false,
|
|
36806
|
+
"docs": "The built-in named SVG icon name or the exact `src` of an SVG file\nto use when the toggle is checked. Only shown when\n`enableOnOffLabels` is `true`. Defaults to `checkmark-outline` in\n`md` mode and a vertical line in `ios` mode.",
|
|
36807
|
+
"docsTags": [],
|
|
36808
|
+
"values": [
|
|
36809
|
+
{
|
|
36810
|
+
"type": "string"
|
|
36811
|
+
},
|
|
36812
|
+
{
|
|
36813
|
+
"type": "undefined"
|
|
36814
|
+
}
|
|
36815
|
+
],
|
|
36816
|
+
"optional": true,
|
|
36817
|
+
"required": false,
|
|
36818
|
+
"getter": false,
|
|
36819
|
+
"setter": false
|
|
36820
|
+
},
|
|
36758
36821
|
{
|
|
36759
36822
|
"name": "color",
|
|
36760
36823
|
"type": "\"danger\" | \"dark\" | \"light\" | \"medium\" | \"primary\" | \"secondary\" | \"success\" | \"tertiary\" | \"warning\" | string & Record<never, never> | undefined",
|
|
@@ -37093,6 +37156,32 @@
|
|
|
37093
37156
|
"getter": false,
|
|
37094
37157
|
"setter": false
|
|
37095
37158
|
},
|
|
37159
|
+
{
|
|
37160
|
+
"name": "uncheckedIcon",
|
|
37161
|
+
"type": "string | undefined",
|
|
37162
|
+
"complexType": {
|
|
37163
|
+
"original": "string",
|
|
37164
|
+
"resolved": "string | undefined",
|
|
37165
|
+
"references": {}
|
|
37166
|
+
},
|
|
37167
|
+
"mutable": false,
|
|
37168
|
+
"attr": "unchecked-icon",
|
|
37169
|
+
"reflectToAttr": false,
|
|
37170
|
+
"docs": "The built-in named SVG icon name or the exact `src` of an SVG file\nto use when the toggle is unchecked. Only shown when\n`enableOnOffLabels` is `true`. Defaults to `remove-outline` in\n`md` mode and `ellipse-outline` in `ios` mode.",
|
|
37171
|
+
"docsTags": [],
|
|
37172
|
+
"values": [
|
|
37173
|
+
{
|
|
37174
|
+
"type": "string"
|
|
37175
|
+
},
|
|
37176
|
+
{
|
|
37177
|
+
"type": "undefined"
|
|
37178
|
+
}
|
|
37179
|
+
],
|
|
37180
|
+
"optional": true,
|
|
37181
|
+
"required": false,
|
|
37182
|
+
"getter": false,
|
|
37183
|
+
"setter": false
|
|
37184
|
+
},
|
|
37096
37185
|
{
|
|
37097
37186
|
"name": "value",
|
|
37098
37187
|
"type": "null | string | undefined",
|
|
@@ -38000,12 +38089,12 @@
|
|
|
38000
38089
|
"path": "src/components/range/range-interface.ts"
|
|
38001
38090
|
},
|
|
38002
38091
|
"src/components/range/range-interface.ts::RangeKnobMoveStartEventDetail": {
|
|
38003
|
-
"declaration": "export interface RangeKnobMoveStartEventDetail {\n value: RangeValue;\n
|
|
38092
|
+
"declaration": "export interface RangeKnobMoveStartEventDetail {\n value: RangeValue;\n}",
|
|
38004
38093
|
"docstring": "",
|
|
38005
38094
|
"path": "src/components/range/range-interface.ts"
|
|
38006
38095
|
},
|
|
38007
38096
|
"src/components/range/range-interface.ts::RangeKnobMoveEndEventDetail": {
|
|
38008
|
-
"declaration": "export interface RangeKnobMoveEndEventDetail {\n value: RangeValue;\n
|
|
38097
|
+
"declaration": "export interface RangeKnobMoveEndEventDetail {\n value: RangeValue;\n}",
|
|
38009
38098
|
"docstring": "",
|
|
38010
38099
|
"path": "src/components/range/range-interface.ts"
|
|
38011
38100
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { w as writeTask } from './index-BGtO2Fhf.js';
|
|
5
|
-
import { h as hapticSelectionEnd, a as hapticSelectionChanged, b as hapticSelectionStart } from './haptic-
|
|
5
|
+
import { h as hapticSelectionEnd, a as hapticSelectionChanged, b as hapticSelectionStart } from './haptic-C9ma6MwT.js';
|
|
6
6
|
import { createGesture } from './index-BmLuEdV7.js';
|
|
7
7
|
|
|
8
8
|
const createButtonActiveGesture = (el, isButton) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
+
import { i as config } from './index-BGtO2Fhf.js';
|
|
4
5
|
import { g as getCapacitor } from './capacitor-Bt0eJ0hM.js';
|
|
5
6
|
|
|
6
7
|
var ImpactStyle;
|
|
@@ -114,10 +115,13 @@ const HapticEngine = {
|
|
|
114
115
|
},
|
|
115
116
|
};
|
|
116
117
|
/**
|
|
117
|
-
* Check to see if the Haptic Plugin is available
|
|
118
|
-
* @return Returns `true`
|
|
118
|
+
* Check to see if haptics are enabled and the Haptic Plugin is available
|
|
119
|
+
* @return Returns `true` if haptics can be triggered
|
|
119
120
|
*/
|
|
120
121
|
const hapticAvailable = () => {
|
|
122
|
+
if (!config.getBoolean('haptics', true)) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
121
125
|
return HapticEngine.available();
|
|
122
126
|
};
|
|
123
127
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, e as readTask, h, f as Host, g as getElement } from './index-BGtO2Fhf.js';
|
|
5
|
-
import { c as createButtonActiveGesture } from './button-active-
|
|
5
|
+
import { c as createButtonActiveGesture } from './button-active-DuvOEEsE.js';
|
|
6
6
|
import { r as raf } from './helpers-BvbUHGGm.js';
|
|
7
7
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
8
8
|
import { c as createDelegateController, d as createTriggerController, B as BACKDROP, i as isCancel, e as present, f as dismiss, g as eventMethod, s as safeCall, h as prepareOverlay, r as restoreRootFocusTrapAccessibility, j as cleanupRootFocusTrapAccessibility, k as setOverlayId } from './overlays-DR4E-YYD.js';
|
|
@@ -10,7 +10,7 @@ import { r as renderOptionLabel } from './select-option-render-BUBAvw2_.js';
|
|
|
10
10
|
import { g as getClassMap } from './theme-byZM6qHV.js';
|
|
11
11
|
import { b as getIonMode } from './ionic-global-BDyJ_8I-.js';
|
|
12
12
|
import { c as createAnimation } from './animation-DC5AcIYI.js';
|
|
13
|
-
import './haptic-
|
|
13
|
+
import './haptic-C9ma6MwT.js';
|
|
14
14
|
import './capacitor-Bt0eJ0hM.js';
|
|
15
15
|
import './index-BmLuEdV7.js';
|
|
16
16
|
import './gesture-controller-B_gJaBk0.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, i as config, a as printIonWarning, j as forceUpdate, h, f as Host, g as getElement } from './index-BGtO2Fhf.js';
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT } from './config-DWCzVL3Y.js';
|
|
6
|
-
import { c as createButtonActiveGesture } from './button-active-
|
|
6
|
+
import { c as createButtonActiveGesture } from './button-active-DuvOEEsE.js';
|
|
7
7
|
import { r as raf } from './helpers-BvbUHGGm.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-B-hirT0v.js';
|
|
9
9
|
import { g as getOverlayLabelJustify, a as getOverlayLabelPlacement } from './overlay-control-label-BSQPZ79H.js';
|
|
@@ -13,7 +13,7 @@ import { r as renderOptionLabel } from './select-option-render-BUBAvw2_.js';
|
|
|
13
13
|
import { g as getClassMap } from './theme-byZM6qHV.js';
|
|
14
14
|
import { b as getIonMode } from './ionic-global-BDyJ_8I-.js';
|
|
15
15
|
import { c as createAnimation } from './animation-DC5AcIYI.js';
|
|
16
|
-
import './haptic-
|
|
16
|
+
import './haptic-C9ma6MwT.js';
|
|
17
17
|
import './capacitor-Bt0eJ0hM.js';
|
|
18
18
|
import './index-BmLuEdV7.js';
|
|
19
19
|
import './gesture-controller-B_gJaBk0.js';
|