@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
package/hydrate/index.js
CHANGED
|
@@ -7215,10 +7215,13 @@ const HapticEngine = {
|
|
|
7215
7215
|
},
|
|
7216
7216
|
};
|
|
7217
7217
|
/**
|
|
7218
|
-
* Check to see if the Haptic Plugin is available
|
|
7219
|
-
* @return Returns `true`
|
|
7218
|
+
* Check to see if haptics are enabled and the Haptic Plugin is available
|
|
7219
|
+
* @return Returns `true` if haptics can be triggered
|
|
7220
7220
|
*/
|
|
7221
7221
|
const hapticAvailable = () => {
|
|
7222
|
+
if (!config.getBoolean('haptics', true)) {
|
|
7223
|
+
return false;
|
|
7224
|
+
}
|
|
7222
7225
|
return HapticEngine.available();
|
|
7223
7226
|
};
|
|
7224
7227
|
/**
|
|
@@ -19038,15 +19041,16 @@ class Fab {
|
|
|
19038
19041
|
}; }
|
|
19039
19042
|
}
|
|
19040
19043
|
|
|
19041
|
-
const fabButtonIosCss = () => `:host{--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--background-hover:var(--ion-color-primary-contrast, #fff);--background-hover-opacity:.08;--transition:background-color, opacity 100ms linear;--ripple-color:currentColor;--border-radius:50%;--border-width:0;--border-style:none;--border-color:initial;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:56px;height:56px;font-size:14px;text-align:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;-webkit-transform:var(--transform);transform:var(--transform)
|
|
19044
|
+
const fabButtonIosCss = () => `:host{--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--background-hover:var(--ion-color-primary-contrast, #fff);--background-hover-opacity:.08;--transition:background-color, opacity 100ms linear;--ripple-color:currentColor;--border-radius:50%;--border-width:0;--border-style:none;--border-color:initial;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:56px;height:56px;font-size:14px;text-align:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;-webkit-transform:var(--transform);transform:var(--transform);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);background-clip:padding-box;color:var(--color);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:strict;cursor:pointer;overflow:hidden;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(ion-icon){line-height:1}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{left:0;right:0;top:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:1}:host(.fab-button-disabled){cursor:default;opacity:0.5;pointer-events:none}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}:host(.ion-activated) .button-native{color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}::slotted(ion-icon){line-height:1}:host(.fab-button-small){-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px;margin-bottom:8px;width:40px;height:40px}.close-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;top:0;position:absolute;height:100%;-webkit-transform:scale(0.4) rotateZ(-45deg);transform:scale(0.4) rotateZ(-45deg);font-size:var(--close-icon-font-size);opacity:0;z-index:1}:host(.fab-button-close-active) .close-icon{-webkit-transform:scale(1) rotateZ(0deg);transform:scale(1) rotateZ(0deg);opacity:1}:host(.fab-button-close-active) .button-inner{-webkit-transform:scale(0.4) rotateZ(45deg);transform:scale(0.4) rotateZ(45deg);opacity:0}ion-ripple-effect{color:var(--ripple-color)}:host(.fab-button-animated) .button-native{-webkit-transition:var(--transition);transition:var(--transition)}:host(.fab-button-animated) .button-inner,:host(.fab-button-animated) .close-icon{-webkit-transition:all ease-in-out 300ms;transition:all ease-in-out 300ms;-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform}@media (prefers-reduced-motion: reduce){:host(.fab-button-animated) .button-native{-webkit-transform:none;transform:none}:host(.fab-button-animated) .button-inner,:host(.fab-button-animated) .close-icon{-webkit-transform:none;transform:none;-webkit-transition-property:opacity;transition-property:opacity}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.fab-button-translucent) .button-native{-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}}:host(.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host{--background:var(--ion-color-primary, #0054e9);--background-activated:var(--ion-color-primary-shade, #004acd);--background-focused:var(--ion-color-primary-shade, #004acd);--background-hover:var(--ion-color-primary-tint, #1a65eb);--background-activated-opacity:1;--background-focused-opacity:1;--background-hover-opacity:1;--color:var(--ion-color-primary-contrast, #fff);--box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);--transition:0.2s transform cubic-bezier(0.25, 1.11, 0.78, 1.59);--close-icon-font-size:28px}:host(.ion-activated){--box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);--transition:0.2s transform ease-out}:host(.fab-button-animated.ion-activated){--transform:scale(1.1)}::slotted(ion-icon){font-size:28px}:host(.fab-button-in-list){--background:var(--ion-color-light, #f4f5f8);--background-activated:var(--ion-color-light-shade, #d7d8da);--background-focused:var(--background-activated);--background-hover:var(--ion-color-light-tint, #f5f6f9);--color:var(--ion-color-light-contrast, #000);--color-activated:var(--ion-color-light-contrast, #000);--color-focused:var(--color-activated);--transition:transform 200ms ease 10ms, opacity 200ms ease 10ms}:host(.fab-button-in-list) ::slotted(ion-icon){font-size:18px}:host(.ion-color.ion-focused) .button-native::after{background:var(--ion-color-shade)}:host(.ion-color.ion-focused) .button-native,:host(.ion-color.ion-activated) .button-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-focused) .button-native::after,:host(.ion-color.ion-activated) .button-native::after{background:var(--ion-color-shade)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-contrast)}:host(.ion-color:hover) .button-native::after{background:var(--ion-color-tint)}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.fab-button-translucent){--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.9);--background-hover:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.8);--background-focused:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.82);--backdrop-filter:saturate(180%) blur(20px)}:host(.fab-button-translucent-in-list){--background:rgba(var(--ion-color-light-rgb, 244, 245, 248), 0.9);--background-hover:rgba(var(--ion-color-light-rgb, 244, 245, 248), 0.8);--background-focused:rgba(var(--ion-color-light-rgb, 244, 245, 248), 0.82)}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){@media (any-hover: hover){:host(.fab-button-translucent.ion-color:hover) .button-native{background:rgba(var(--ion-color-base-rgb), 0.8)}}:host(.ion-color.fab-button-translucent) .button-native{background:rgba(var(--ion-color-base-rgb), 0.9)}:host(.ion-color.ion-focused.fab-button-translucent) .button-native,:host(.ion-color.ion-activated.fab-button-translucent) .button-native{background:var(--ion-color-base)}}`;
|
|
19042
19045
|
|
|
19043
|
-
const fabButtonMdCss = () => `:host{--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--background-hover:var(--ion-color-primary-contrast, #fff);--background-hover-opacity:.08;--transition:background-color, opacity 100ms linear;--ripple-color:currentColor;--border-radius:50%;--border-width:0;--border-style:none;--border-color:initial;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:56px;height:56px;font-size:14px;text-align:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;-webkit-transform:var(--transform);transform:var(--transform)
|
|
19046
|
+
const fabButtonMdCss = () => `:host{--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--background-hover:var(--ion-color-primary-contrast, #fff);--background-hover-opacity:.08;--transition:background-color, opacity 100ms linear;--ripple-color:currentColor;--border-radius:50%;--border-width:0;--border-style:none;--border-color:initial;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:56px;height:56px;font-size:14px;text-align:center;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;-webkit-transform:var(--transform);transform:var(--transform);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);background-clip:padding-box;color:var(--color);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:strict;cursor:pointer;overflow:hidden;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(ion-icon){line-height:1}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{left:0;right:0;top:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:1}:host(.fab-button-disabled){cursor:default;opacity:0.5;pointer-events:none}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}:host(.ion-activated) .button-native{color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}::slotted(ion-icon){line-height:1}:host(.fab-button-small){-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px;margin-bottom:8px;width:40px;height:40px}.close-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;top:0;position:absolute;height:100%;-webkit-transform:scale(0.4) rotateZ(-45deg);transform:scale(0.4) rotateZ(-45deg);font-size:var(--close-icon-font-size);opacity:0;z-index:1}:host(.fab-button-close-active) .close-icon{-webkit-transform:scale(1) rotateZ(0deg);transform:scale(1) rotateZ(0deg);opacity:1}:host(.fab-button-close-active) .button-inner{-webkit-transform:scale(0.4) rotateZ(45deg);transform:scale(0.4) rotateZ(45deg);opacity:0}ion-ripple-effect{color:var(--ripple-color)}:host(.fab-button-animated) .button-native{-webkit-transition:var(--transition);transition:var(--transition)}:host(.fab-button-animated) .button-inner,:host(.fab-button-animated) .close-icon{-webkit-transition:all ease-in-out 300ms;transition:all ease-in-out 300ms;-webkit-transition-property:opacity, -webkit-transform;transition-property:opacity, -webkit-transform;transition-property:transform, opacity;transition-property:transform, opacity, -webkit-transform}@media (prefers-reduced-motion: reduce){:host(.fab-button-animated) .button-native{-webkit-transform:none;transform:none}:host(.fab-button-animated) .button-inner,:host(.fab-button-animated) .close-icon{-webkit-transform:none;transform:none;-webkit-transition-property:opacity;transition-property:opacity}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.fab-button-translucent) .button-native{-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}}:host(.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host{--background:var(--ion-color-primary, #0054e9);--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor;--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--color:var(--ion-color-primary-contrast, #fff);--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), background-color 280ms cubic-bezier(0.4, 0, 0.2, 1), color 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 15ms linear 30ms, transform 270ms cubic-bezier(0, 0, 0.2, 1) 0ms;--close-icon-font-size:24px}:host(.ion-activated){--box-shadow:0 7px 8px -4px rgba(0, 0, 0, 0.2), 0 12px 17px 2px rgba(0, 0, 0, 0.14), 0 5px 22px 4px rgba(0, 0, 0, 0.12)}::slotted(ion-icon){font-size:24px}:host(.fab-button-in-list){--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54);--color-activated:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54);--color-focused:var(--color-activated);--background:var(--ion-color-light, #f4f5f8);--background-activated:transparent;--background-focused:var(--ion-color-light-shade, #d7d8da);--background-hover:var(--ion-color-light-tint, #f5f6f9)}:host(.fab-button-in-list) ::slotted(ion-icon){font-size:18px}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-focused) .button-native::after{background:var(--ion-color-contrast)}:host(.ion-color.ion-activated) .button-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-activated) .button-native::after{background:transparent}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-contrast)}:host(.ion-color:hover) .button-native::after{background:var(--ion-color-contrast)}}`;
|
|
19044
19047
|
|
|
19045
19048
|
/**
|
|
19046
19049
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
19047
19050
|
*
|
|
19048
19051
|
* @part native - The native HTML button or anchor element that wraps all child elements.
|
|
19049
19052
|
* @part close-icon - The close icon that is displayed when a fab list opens (uses ion-icon).
|
|
19053
|
+
* @part inner - The wrapper around the button's content, hidden when a fab list opens.
|
|
19050
19054
|
*/
|
|
19051
19055
|
class FabButton {
|
|
19052
19056
|
constructor(hostRef) {
|
|
@@ -19062,6 +19066,11 @@ class FabButton {
|
|
|
19062
19066
|
* If `true`, the fab button will be show a close icon.
|
|
19063
19067
|
*/
|
|
19064
19068
|
this.activated = false;
|
|
19069
|
+
/**
|
|
19070
|
+
* If `true`, the fab button will animate between states, such as
|
|
19071
|
+
* swapping its content for the close icon.
|
|
19072
|
+
*/
|
|
19073
|
+
this.animated = true;
|
|
19065
19074
|
/**
|
|
19066
19075
|
* If `true`, the user cannot interact with the fab button.
|
|
19067
19076
|
*/
|
|
@@ -19181,9 +19190,10 @@ class FabButton {
|
|
|
19181
19190
|
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
19182
19191
|
}
|
|
19183
19192
|
render() {
|
|
19184
|
-
const { el, disabled, color, href, activated, show, translucent, size, inheritedAttributes, type } = this;
|
|
19193
|
+
const { el, disabled, color, href, activated, animated, show, translucent, size, inheritedAttributes, type } = this;
|
|
19185
19194
|
const inList = hostContext('ion-fab-list', el);
|
|
19186
19195
|
const mode = getIonMode$1(this);
|
|
19196
|
+
const shouldAnimate = animated && config.getBoolean('animated', true);
|
|
19187
19197
|
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
19188
19198
|
const TagType = href === undefined ? 'button' : 'a';
|
|
19189
19199
|
const attrs = TagType === 'button'
|
|
@@ -19201,18 +19211,19 @@ class FabButton {
|
|
|
19201
19211
|
if (type !== 'button') {
|
|
19202
19212
|
this.renderHiddenButton();
|
|
19203
19213
|
}
|
|
19204
|
-
return (hAsync(Host, { key: '
|
|
19214
|
+
return (hAsync(Host, { key: '78e48dd691cd7462ae43fb7d702d3bbd487ea578', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
|
|
19205
19215
|
[mode]: true,
|
|
19206
19216
|
'fab-button-in-list': inList,
|
|
19207
19217
|
'fab-button-translucent-in-list': inList && translucent,
|
|
19208
19218
|
'fab-button-close-active': activated,
|
|
19219
|
+
'fab-button-animated': shouldAnimate,
|
|
19209
19220
|
'fab-button-show': show,
|
|
19210
19221
|
'fab-button-disabled': disabled,
|
|
19211
19222
|
'fab-button-translucent': translucent,
|
|
19212
19223
|
'ion-activatable': true,
|
|
19213
19224
|
'ion-focusable': true,
|
|
19214
19225
|
[`fab-button-${size}`]: size !== undefined,
|
|
19215
|
-
}) }, hAsync(TagType, { key: '
|
|
19226
|
+
}) }, hAsync(TagType, { key: '38959b36a66ab9bf5e4b112db9081392c6b78219', ...attrs, class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, onClick: (ev) => type === 'button' && openURL(href, ev, this.routerDirection, this.routerAnimation), ...inheritedAttributes, ...tabindexAttributes }, hAsync("ion-icon", { key: 'c61e747b33cc1aee9d546a1adf1158374a742cb1', "aria-hidden": "true", icon: this.closeIcon, part: "close-icon", class: "close-icon", lazy: false }), hAsync("span", { key: '3520c1d6cf7de8792e7e689ae5b7bd669adac789', class: "button-inner", part: "inner" }, hAsync("slot", { key: '71b0c63be1461e87ef494eea8085f1be4f8cc4fc' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '4642494db6f0a4e3171e243eea4030c945a1d1c2' }))));
|
|
19216
19227
|
}
|
|
19217
19228
|
get el() { return getElement(this); }
|
|
19218
19229
|
static get watchers() { return {
|
|
@@ -19230,6 +19241,7 @@ class FabButton {
|
|
|
19230
19241
|
"$members$": {
|
|
19231
19242
|
"color": [513],
|
|
19232
19243
|
"activated": [4],
|
|
19244
|
+
"animated": [4],
|
|
19233
19245
|
"disabled": [4],
|
|
19234
19246
|
"download": [1],
|
|
19235
19247
|
"href": [1],
|
|
@@ -33685,7 +33697,7 @@ class Range {
|
|
|
33685
33697
|
* should not move.
|
|
33686
33698
|
*/
|
|
33687
33699
|
threshold: 10,
|
|
33688
|
-
onStart: (
|
|
33700
|
+
onStart: () => this.onStart(),
|
|
33689
33701
|
onMove: (ev) => this.onMove(ev),
|
|
33690
33702
|
onEnd: (ev) => this.onEnd(ev),
|
|
33691
33703
|
});
|
|
@@ -33710,22 +33722,23 @@ class Range {
|
|
|
33710
33722
|
syncActivated();
|
|
33711
33723
|
};
|
|
33712
33724
|
this.handleKeyboard = (knob, isIncrease) => {
|
|
33725
|
+
const { ensureValueInBounds } = this;
|
|
33713
33726
|
let step = this.step;
|
|
33714
33727
|
step = step > 0 ? step : 1;
|
|
33715
33728
|
step = step / (this.max - this.min);
|
|
33716
33729
|
if (!isIncrease) {
|
|
33717
33730
|
step *= -1;
|
|
33718
33731
|
}
|
|
33719
|
-
this.ionKnobMoveStart.emit(this.getKnobMoveDetail(knob));
|
|
33720
33732
|
if (knob === 'A') {
|
|
33721
33733
|
this.ratioA = clamp(0, this.ratioA + step, 1);
|
|
33722
33734
|
}
|
|
33723
33735
|
else {
|
|
33724
33736
|
this.ratioB = clamp(0, this.ratioB + step, 1);
|
|
33725
33737
|
}
|
|
33738
|
+
this.ionKnobMoveStart.emit({ value: ensureValueInBounds(this.value) });
|
|
33726
33739
|
this.updateValue();
|
|
33727
33740
|
this.emitValueChange();
|
|
33728
|
-
this.ionKnobMoveEnd.emit(this.
|
|
33741
|
+
this.ionKnobMoveEnd.emit({ value: ensureValueInBounds(this.value) });
|
|
33729
33742
|
};
|
|
33730
33743
|
this.onBlur = () => {
|
|
33731
33744
|
if (this.hasFocus) {
|
|
@@ -33918,32 +33931,55 @@ class Range {
|
|
|
33918
33931
|
this.ionChange.emit({ value: this.value });
|
|
33919
33932
|
}
|
|
33920
33933
|
/**
|
|
33921
|
-
*
|
|
33922
|
-
*
|
|
33923
|
-
*
|
|
33934
|
+
* The value should be updated on touch end or
|
|
33935
|
+
* when the component is being dragged.
|
|
33936
|
+
* This follows the native behavior of mobile devices.
|
|
33924
33937
|
*
|
|
33925
|
-
*
|
|
33938
|
+
* For example: When the user lifts their finger from the
|
|
33939
|
+
* screen after tapping the bar or dragging the bar or knob.
|
|
33926
33940
|
*/
|
|
33927
|
-
onStart(
|
|
33928
|
-
|
|
33929
|
-
if (contentEl) {
|
|
33930
|
-
this.initialContentScrollY = disableContentScrollY(contentEl);
|
|
33931
|
-
}
|
|
33932
|
-
/**
|
|
33933
|
-
* Pick the knob before emitting so the start event can
|
|
33934
|
-
* report it. It stays the same for the rest of the drag.
|
|
33935
|
-
*/
|
|
33936
|
-
const knob = this.setPressedKnob(startX);
|
|
33937
|
-
this.ionKnobMoveStart.emit(this.getKnobMoveDetail(knob));
|
|
33941
|
+
onStart() {
|
|
33942
|
+
this.ionKnobMoveStart.emit({ value: this.ensureValueInBounds(this.value) });
|
|
33938
33943
|
}
|
|
33939
33944
|
/**
|
|
33940
33945
|
* The value should be updated while dragging the
|
|
33941
33946
|
* bar or knob.
|
|
33942
33947
|
*
|
|
33948
|
+
* While the user is dragging, the view
|
|
33949
|
+
* should not scroll. This is to prevent the user from
|
|
33950
|
+
* feeling disoriented while dragging.
|
|
33951
|
+
*
|
|
33952
|
+
* The user can scroll on the view if the knob or
|
|
33953
|
+
* bar is not being dragged.
|
|
33954
|
+
*
|
|
33943
33955
|
* @param detail The details of the gesture event.
|
|
33944
33956
|
*/
|
|
33945
33957
|
onMove(detail) {
|
|
33946
|
-
this
|
|
33958
|
+
const { contentEl, pressedKnob } = this;
|
|
33959
|
+
const currentX = detail.currentX;
|
|
33960
|
+
/**
|
|
33961
|
+
* Since the user is dragging on the bar or knob, the view should not scroll.
|
|
33962
|
+
*
|
|
33963
|
+
* This only needs to be done once.
|
|
33964
|
+
*/
|
|
33965
|
+
if (contentEl && this.pressedKnob === undefined) {
|
|
33966
|
+
this.initialContentScrollY = disableContentScrollY(contentEl);
|
|
33967
|
+
}
|
|
33968
|
+
/**
|
|
33969
|
+
* The `pressedKnob` can be undefined if the user just
|
|
33970
|
+
* started dragging the knob.
|
|
33971
|
+
*
|
|
33972
|
+
* This is necessary to determine which knob the user is dragging,
|
|
33973
|
+
* especially when using dual knobs.
|
|
33974
|
+
* Plus, it determines when to apply certain styles.
|
|
33975
|
+
*
|
|
33976
|
+
* This only needs to be done once since the knob won't change
|
|
33977
|
+
* while the user is dragging.
|
|
33978
|
+
*/
|
|
33979
|
+
if (pressedKnob === undefined) {
|
|
33980
|
+
this.setPressedKnob(currentX);
|
|
33981
|
+
}
|
|
33982
|
+
this.update(currentX);
|
|
33947
33983
|
}
|
|
33948
33984
|
/**
|
|
33949
33985
|
* The value should be updated on touch end:
|
|
@@ -33955,26 +33991,35 @@ class Range {
|
|
|
33955
33991
|
onEnd(detail) {
|
|
33956
33992
|
const { contentEl, initialContentScrollY } = this;
|
|
33957
33993
|
const currentX = detail.currentX ?? detail.clientX;
|
|
33994
|
+
/**
|
|
33995
|
+
* The `pressedKnob` can be undefined if the user never
|
|
33996
|
+
* dragged the knob. They just tapped on the bar.
|
|
33997
|
+
*
|
|
33998
|
+
* This is necessary to determine which knob the user is changing,
|
|
33999
|
+
* especially when using dual knobs.
|
|
34000
|
+
* Plus, it determines when to apply certain styles.
|
|
34001
|
+
*/
|
|
34002
|
+
if (this.pressedKnob === undefined) {
|
|
34003
|
+
this.setPressedKnob(currentX);
|
|
34004
|
+
}
|
|
33958
34005
|
/**
|
|
33959
34006
|
* The user is no longer dragging the bar or
|
|
33960
34007
|
* knob (if they were dragging it).
|
|
33961
34008
|
*
|
|
33962
34009
|
* The user can now scroll on the view in the next gesture event.
|
|
33963
34010
|
*/
|
|
33964
|
-
if (contentEl) {
|
|
34011
|
+
if (contentEl && this.pressedKnob !== undefined) {
|
|
33965
34012
|
resetContentScrollY(contentEl, initialContentScrollY);
|
|
33966
34013
|
}
|
|
33967
34014
|
// update the active knob's position
|
|
33968
34015
|
this.update(currentX);
|
|
33969
|
-
// The pressed knob is always set because `onStart` runs first.
|
|
33970
|
-
const knob = this.pressedKnob;
|
|
33971
34016
|
/**
|
|
33972
34017
|
* Reset the pressed knob to undefined since the user
|
|
33973
34018
|
* may start dragging a different knob in the next gesture event.
|
|
33974
34019
|
*/
|
|
33975
34020
|
this.pressedKnob = undefined;
|
|
33976
34021
|
this.emitValueChange();
|
|
33977
|
-
this.ionKnobMoveEnd.emit(this.
|
|
34022
|
+
this.ionKnobMoveEnd.emit({ value: this.ensureValueInBounds(this.value) });
|
|
33978
34023
|
}
|
|
33979
34024
|
update(currentX) {
|
|
33980
34025
|
// figure out where the pointer is currently at
|
|
@@ -33998,13 +34043,6 @@ class Range {
|
|
|
33998
34043
|
// Update input value
|
|
33999
34044
|
this.updateValue();
|
|
34000
34045
|
}
|
|
34001
|
-
getKnobMoveDetail(knob) {
|
|
34002
|
-
return {
|
|
34003
|
-
value: this.ensureValueInBounds(this.value),
|
|
34004
|
-
knob,
|
|
34005
|
-
position: getKnobPosition(knob, this.ratioA, this.ratioB, this.dualKnobs),
|
|
34006
|
-
};
|
|
34007
|
-
}
|
|
34008
34046
|
setPressedKnob(currentX) {
|
|
34009
34047
|
const rect = (this.rect = this.rangeSlider.getBoundingClientRect());
|
|
34010
34048
|
// figure out which knob they started closer to
|
|
@@ -34012,9 +34050,7 @@ class Range {
|
|
|
34012
34050
|
if (isRTL$1(this.el)) {
|
|
34013
34051
|
ratio = 1 - ratio;
|
|
34014
34052
|
}
|
|
34015
|
-
|
|
34016
|
-
this.pressedKnob = knob;
|
|
34017
|
-
return knob;
|
|
34053
|
+
this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
|
|
34018
34054
|
}
|
|
34019
34055
|
get valA() {
|
|
34020
34056
|
return ratioToValue(this.ratioA, this.min, this.max, this.step);
|
|
@@ -34179,7 +34215,7 @@ class Range {
|
|
|
34179
34215
|
* dragged, the pressedKnob will be defined.
|
|
34180
34216
|
*/
|
|
34181
34217
|
if (this.pressedKnob === undefined) {
|
|
34182
|
-
this.onStart(
|
|
34218
|
+
this.onStart();
|
|
34183
34219
|
this.onEnd(ev);
|
|
34184
34220
|
}
|
|
34185
34221
|
} }, ticks.map((tick) => (hAsync("div", { style: tickStyle(tick), role: "presentation", class: {
|
|
@@ -34263,7 +34299,7 @@ class Range {
|
|
|
34263
34299
|
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
34264
34300
|
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
34265
34301
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
34266
|
-
return (hAsync(Host, { key: '
|
|
34302
|
+
return (hAsync(Host, { key: '72f253ee1514b4c5874a6720c2f954fae7a7c4d4', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses$1(this.color, {
|
|
34267
34303
|
[mode]: true,
|
|
34268
34304
|
'in-item': inItem,
|
|
34269
34305
|
'range-disabled': disabled,
|
|
@@ -34277,10 +34313,10 @@ class Range {
|
|
|
34277
34313
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
34278
34314
|
'range-value-min': valueAtMin,
|
|
34279
34315
|
'range-value-max': valueAtMax,
|
|
34280
|
-
}) }, hAsync("label", { key: '
|
|
34316
|
+
}) }, hAsync("label", { key: '9b96b83a6118ee2a79d8adbb0a58197470308179', class: "range-wrapper", id: "range-label" }, hAsync("div", { key: 'c7b31a7c87c20857a26624bd94501df6420fceec', class: {
|
|
34281
34317
|
'label-text-wrapper': true,
|
|
34282
34318
|
'label-text-wrapper-hidden': !hasLabel,
|
|
34283
|
-
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '
|
|
34319
|
+
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '4ca15b9370097e140550489ff24979f3a959e65b', class: "native-wrapper" }, hAsync("slot", { key: 'f110896c68741bad92239f98b6028cbe0ad5122f', name: "start" }), this.renderRangeSlider(), hAsync("slot", { key: '5c4031c4403fa643ee2e11637b2420ddd8cbc4ce', name: "end" })))));
|
|
34284
34320
|
}
|
|
34285
34321
|
get el() { return getElement(this); }
|
|
34286
34322
|
static get watchers() { return {
|
|
@@ -42864,7 +42900,7 @@ const buttonPart = (button) => {
|
|
|
42864
42900
|
return isCancel(button.role) ? 'button cancel' : 'button';
|
|
42865
42901
|
};
|
|
42866
42902
|
|
|
42867
|
-
const toggleIosCss = () => `:host{-webkit-box-sizing:content-box !important;box-sizing:content-box !important;display:inline-block;position:relative;max-width:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.toggle-disabled){pointer-events:none}input{display:none}:host(:focus){outline:none}.toggle-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.toggle-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.toggle-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.toggle-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.toggle-label-placement-stacked) .toggle-bottom{font-size:1rem}.toggle-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.toggle-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .toggle-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .toggle-bottom .helper-text{display:none}:host(.toggle-label-placement-start) .toggle-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.toggle-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-end) .toggle-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.toggle-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.toggle-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.toggle-label-placement-stacked) .toggle-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.toggle-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}: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{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}: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{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.toggle-justify-space-between) .toggle-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.toggle-justify-start) .toggle-wrapper{-ms-flex-pack:start;justify-content:start}:host(.toggle-justify-end) .toggle-wrapper{-ms-flex-pack:end;justify-content:end}:host(.toggle-alignment-start) .toggle-wrapper{-ms-flex-align:start;align-items:start}:host(.toggle-alignment-center) .toggle-wrapper{-ms-flex-align:center;align-items:center}:host(.toggle-justify-space-between),:host(.toggle-justify-start),:host(.toggle-justify-end),:host(.toggle-alignment-start),:host(.toggle-alignment-center){display:block}.toggle-icon-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;-webkit-transition:var(--handle-transition);transition:var(--handle-transition);will-change:transform}.toggle-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;background:var(--track-background);overflow:inherit}:host(.toggle-checked) .toggle-icon{background:var(--track-background-checked)}.toggle-inner{border-radius:var(--handle-border-radius);position:absolute;left:var(--handle-spacing);width:var(--handle-width);height:var(--handle-height);max-height:var(--handle-max-height);-webkit-transition:var(--handle-transition);transition:var(--handle-transition);background:var(--handle-background);-webkit-box-shadow:var(--handle-box-shadow);box-shadow:var(--handle-box-shadow);contain:strict}:host(.toggle-ltr) .toggle-inner{left:var(--handle-spacing)}:host(.toggle-rtl) .toggle-inner{right:var(--handle-spacing)}:host(.toggle-ltr.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width)), 0, 0);transform:translate3d(calc(100% - var(--handle-width)), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width)), 0, 0);transform:translate3d(calc(-100% + var(--handle-width)), 0, 0)}:host(.toggle-checked) .toggle-inner{background:var(--handle-background-checked)}:host(.toggle-ltr.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0)}:host{--track-background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.088);--track-background-checked:var(--ion-color-primary, #0054e9);--border-radius:15.5px;--handle-background:#ffffff;--handle-background-checked:#ffffff;--handle-border-radius:25.5px;--handle-box-shadow:0 3px 4px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.06);--handle-height:calc(31px - (2px * 2));--handle-max-height:calc(100% - var(--handle-spacing) * 2);--handle-width:calc(31px - (2px * 2));--handle-spacing:2px;--handle-transition:transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms, right 110ms ease-in-out 80ms}.native-wrapper .toggle-icon{width:51px;height:31px;overflow:hidden}:host(.ion-color.toggle-checked) .toggle-icon{background:var(--ion-color-base)}:host(.toggle-activated) .toggle-switch-icon{opacity:0}.toggle-icon{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:background-color 300ms;transition:background-color 300ms}.toggle-inner{will-change:transform}.toggle-switch-icon{position:absolute;top:50%;width:11px;height:11px;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:opacity 300ms, color 300ms;transition:opacity 300ms, color 300ms}.toggle-switch-icon{position:absolute;color:var(--ion-color-dark, #222428)}:host(.toggle-ltr) .toggle-switch-icon{right:6px}:host(.toggle-rtl) .toggle-switch-icon{right:initial;left:6px;}:host(.toggle-checked) .toggle-switch-icon.toggle-switch-icon-checked{color:var(--ion-color-contrast, #fff)}:host(.toggle-checked) .toggle-switch-icon:not(.toggle-switch-icon-checked){opacity:0}.toggle-switch-icon-checked{position:absolute;width:15px;height:15px;-webkit-transform:translateY(-50%) rotate(90deg);transform:translateY(-50%) rotate(90deg)}:host(.toggle-ltr) .toggle-switch-icon-checked{right:initial;left:4px;}:host(.toggle-rtl) .toggle-switch-icon-checked{right:4px}:host(.toggle-activated) .toggle-icon::before,:host(.toggle-checked) .toggle-icon::before{-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0)}:host(.toggle-activated.toggle-checked) .toggle-inner::before{-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0)}:host(.toggle-activated) .toggle-inner{width:calc(var(--handle-width) + 6px)}:host(.toggle-ltr.toggle-activated.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0);transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0)}:host(.toggle-rtl.toggle-activated.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0);transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0)}:host(.toggle-disabled){opacity:0.3}:host(.ion-focused:not(.toggle-defers-indicator)) .toggle-icon{-webkit-box-shadow:0 0 0 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0 0 0 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color.ion-focused.toggle-checked:not(.toggle-defers-indicator)) .toggle-icon{-webkit-box-shadow:0 0 0 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0 0 0 4px rgba(var(--ion-color-base-rgb), 0.2)}`;
|
|
42903
|
+
const toggleIosCss = () => `:host{-webkit-box-sizing:content-box !important;box-sizing:content-box !important;display:inline-block;position:relative;max-width:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.toggle-disabled){pointer-events:none}input{display:none}:host(:focus){outline:none}.toggle-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.toggle-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.toggle-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.toggle-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.toggle-label-placement-stacked) .toggle-bottom{font-size:1rem}.toggle-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.toggle-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .toggle-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .toggle-bottom .helper-text{display:none}:host(.toggle-label-placement-start) .toggle-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.toggle-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-end) .toggle-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.toggle-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.toggle-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.toggle-label-placement-stacked) .toggle-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.toggle-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}: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{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}: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{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.toggle-justify-space-between) .toggle-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.toggle-justify-start) .toggle-wrapper{-ms-flex-pack:start;justify-content:start}:host(.toggle-justify-end) .toggle-wrapper{-ms-flex-pack:end;justify-content:end}:host(.toggle-alignment-start) .toggle-wrapper{-ms-flex-align:start;align-items:start}:host(.toggle-alignment-center) .toggle-wrapper{-ms-flex-align:center;align-items:center}:host(.toggle-justify-space-between),:host(.toggle-justify-start),:host(.toggle-justify-end),:host(.toggle-alignment-start),:host(.toggle-alignment-center){display:block}.toggle-icon-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;-webkit-transition:var(--handle-transition);transition:var(--handle-transition);will-change:transform}.toggle-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;background:var(--track-background);overflow:inherit}:host(.toggle-checked) .toggle-icon{background:var(--track-background-checked)}.toggle-inner{border-radius:var(--handle-border-radius);position:absolute;left:var(--handle-spacing);width:var(--handle-width);height:var(--handle-height);max-height:var(--handle-max-height);-webkit-transition:var(--handle-transition);transition:var(--handle-transition);background:var(--handle-background);-webkit-box-shadow:var(--handle-box-shadow);box-shadow:var(--handle-box-shadow);contain:strict}:host(.toggle-ltr) .toggle-inner{left:var(--handle-spacing)}:host(.toggle-rtl) .toggle-inner{right:var(--handle-spacing)}:host(.toggle-ltr.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width)), 0, 0);transform:translate3d(calc(100% - var(--handle-width)), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width)), 0, 0);transform:translate3d(calc(-100% + var(--handle-width)), 0, 0)}:host(.toggle-checked) .toggle-inner{background:var(--handle-background-checked)}:host(.toggle-ltr.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0)}:host{--track-background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.088);--track-background-checked:var(--ion-color-primary, #0054e9);--border-radius:15.5px;--handle-background:#ffffff;--handle-background-checked:#ffffff;--handle-border-radius:25.5px;--handle-box-shadow:0 3px 4px rgba(0, 0, 0, 0.06), 0 3px 8px rgba(0, 0, 0, 0.06);--handle-height:calc(31px - (2px * 2));--handle-max-height:calc(100% - var(--handle-spacing) * 2);--handle-width:calc(31px - (2px * 2));--handle-spacing:2px;--handle-transition:transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms, right 110ms ease-in-out 80ms}.native-wrapper .toggle-icon{width:51px;height:31px;overflow:hidden}:host(.ion-color.toggle-checked) .toggle-icon{background:var(--ion-color-base)}:host(.toggle-activated) .toggle-switch-icon{opacity:0}.toggle-icon{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:background-color 300ms;transition:background-color 300ms}.toggle-inner{will-change:transform}.toggle-switch-icon{position:absolute;top:50%;width:11px;height:11px;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:opacity 300ms, color 300ms;transition:opacity 300ms, color 300ms}.toggle-switch-icon{position:absolute;color:var(--ion-color-dark, #222428)}:host(.toggle-ltr) .toggle-switch-icon{right:6px}:host(.toggle-rtl) .toggle-switch-icon{right:initial;left:6px;}:host(.toggle-checked) .toggle-switch-icon.toggle-switch-icon-checked{color:var(--ion-color-contrast, #fff)}:host(.toggle-checked) .toggle-switch-icon:not(.toggle-switch-icon-checked){opacity:0}.toggle-switch-icon-checked:not(.toggle-switch-icon-custom){position:absolute;width:15px;height:15px;-webkit-transform:translateY(-50%) rotate(90deg);transform:translateY(-50%) rotate(90deg)}:host(.toggle-ltr) .toggle-switch-icon-checked{right:initial;left:4px;}:host(.toggle-rtl) .toggle-switch-icon-checked{right:4px}:host(.toggle-ltr) .toggle-switch-icon-checked.toggle-switch-icon-custom{left:6px}:host(.toggle-rtl) .toggle-switch-icon-checked.toggle-switch-icon-custom{right:6px}:host(.toggle-activated) .toggle-icon::before,:host(.toggle-checked) .toggle-icon::before{-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0)}:host(.toggle-activated.toggle-checked) .toggle-inner::before{-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0)}:host(.toggle-activated) .toggle-inner{width:calc(var(--handle-width) + 6px)}:host(.toggle-ltr.toggle-activated.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0);transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0)}:host(.toggle-rtl.toggle-activated.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0);transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0)}:host(.toggle-disabled){opacity:0.3}:host(.ion-focused:not(.toggle-defers-indicator)) .toggle-icon{-webkit-box-shadow:0 0 0 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0 0 0 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color.ion-focused.toggle-checked:not(.toggle-defers-indicator)) .toggle-icon{-webkit-box-shadow:0 0 0 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0 0 0 4px rgba(var(--ion-color-base-rgb), 0.2)}`;
|
|
42868
42904
|
|
|
42869
42905
|
const toggleMdCss = () => `:host{-webkit-box-sizing:content-box !important;box-sizing:content-box !important;display:inline-block;position:relative;max-width:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.toggle-disabled){pointer-events:none}input{display:none}:host(:focus){outline:none}.toggle-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.toggle-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.toggle-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.toggle-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.toggle-label-placement-stacked) .toggle-bottom{font-size:1rem}.toggle-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.toggle-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .toggle-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .toggle-bottom .helper-text{display:none}:host(.toggle-label-placement-start) .toggle-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.toggle-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-end) .toggle-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.toggle-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.toggle-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.toggle-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.toggle-label-placement-stacked) .toggle-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.toggle-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.toggle-label-placement-stacked.toggle-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}: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{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.toggle-label-placement-stacked.toggle-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}: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{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.toggle-label-placement-stacked.toggle-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.toggle-justify-space-between) .toggle-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.toggle-justify-start) .toggle-wrapper{-ms-flex-pack:start;justify-content:start}:host(.toggle-justify-end) .toggle-wrapper{-ms-flex-pack:end;justify-content:end}:host(.toggle-alignment-start) .toggle-wrapper{-ms-flex-align:start;align-items:start}:host(.toggle-alignment-center) .toggle-wrapper{-ms-flex-align:center;align-items:center}:host(.toggle-justify-space-between),:host(.toggle-justify-start),:host(.toggle-justify-end),:host(.toggle-alignment-start),:host(.toggle-alignment-center){display:block}.toggle-icon-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;-webkit-transition:var(--handle-transition);transition:var(--handle-transition);will-change:transform}.toggle-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;background:var(--track-background);overflow:inherit}:host(.toggle-checked) .toggle-icon{background:var(--track-background-checked)}.toggle-inner{border-radius:var(--handle-border-radius);position:absolute;left:var(--handle-spacing);width:var(--handle-width);height:var(--handle-height);max-height:var(--handle-max-height);-webkit-transition:var(--handle-transition);transition:var(--handle-transition);background:var(--handle-background);-webkit-box-shadow:var(--handle-box-shadow);box-shadow:var(--handle-box-shadow);contain:strict}:host(.toggle-ltr) .toggle-inner{left:var(--handle-spacing)}:host(.toggle-rtl) .toggle-inner{right:var(--handle-spacing)}:host(.toggle-ltr.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(100% - var(--handle-width)), 0, 0);transform:translate3d(calc(100% - var(--handle-width)), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-icon-wrapper{-webkit-transform:translate3d(calc(-100% + var(--handle-width)), 0, 0);transform:translate3d(calc(-100% + var(--handle-width)), 0, 0)}:host(.toggle-checked) .toggle-inner{background:var(--handle-background-checked)}:host(.toggle-ltr.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0)}:host(.toggle-rtl.toggle-checked) .toggle-inner{-webkit-transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0);transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0)}:host{--track-background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.39);--track-background-checked:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.5);--border-radius:14px;--handle-background:#ffffff;--handle-background-checked:var(--ion-color-primary, #0054e9);--handle-border-radius:50%;--handle-box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--handle-width:20px;--handle-height:20px;--handle-max-height:calc(100% + 6px);--handle-spacing:0px;--handle-transition:transform 160ms cubic-bezier(0.4, 0, 0.2, 1), background-color 160ms cubic-bezier(0.4, 0, 0.2, 1)}.native-wrapper .toggle-icon{width:36px;height:14px}:host(.ion-color.toggle-checked) .toggle-icon{background:rgba(var(--ion-color-base-rgb), 0.5)}:host(.ion-color.toggle-checked) .toggle-inner{background:var(--ion-color-base)}:host(.toggle-checked) .toggle-inner{color:var(--ion-color-contrast, #fff)}.toggle-icon{-webkit-transition:background-color 160ms;transition:background-color 160ms}.toggle-inner{will-change:background-color, transform;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#000}.toggle-inner .toggle-switch-icon{-webkit-padding-start:1px;padding-inline-start:1px;-webkit-padding-end:1px;padding-inline-end:1px;padding-top:1px;padding-bottom:1px;width:100%;height:100%}:host(.ion-focused:not(.toggle-defers-indicator)) .toggle-icon-wrapper::after{border-radius:50%;display:block;position:absolute;width:36px;height:36px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);content:"";z-index:-1;inset-block-start:50%}:host(.toggle-ltr.ion-focused) .toggle-icon-wrapper::after{left:calc(var(--handle-spacing) + (var(--handle-width) - 36px) / 2)}:host(.toggle-rtl.ion-focused) .toggle-icon-wrapper::after{right:calc(var(--handle-spacing) + (var(--handle-width) - 36px) / 2)}:host(.toggle-ltr.ion-focused.toggle-checked) .toggle-icon-wrapper::after{-webkit-transform:translate(calc(var(--handle-spacing) * -2), -50%);transform:translate(calc(var(--handle-spacing) * -2), -50%)}:host(.toggle-rtl.ion-focused.toggle-checked) .toggle-icon-wrapper::after{-webkit-transform:translate(calc(var(--handle-spacing) * 2), -50%);transform:translate(calc(var(--handle-spacing) * 2), -50%)}:host(.ion-focused.toggle-checked) .toggle-icon-wrapper::after{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color.ion-focused.toggle-checked) .toggle-icon-wrapper::after{background:rgba(var(--ion-color-base-rgb), 0.2)}:host(.toggle-disabled){opacity:0.38}`;
|
|
42870
42906
|
|
|
@@ -42990,7 +43026,13 @@ class Toggle {
|
|
|
42990
43026
|
this.onBlur = () => {
|
|
42991
43027
|
this.ionBlur.emit();
|
|
42992
43028
|
};
|
|
42993
|
-
this.
|
|
43029
|
+
this.getCustomSwitchLabelIcon = (checked) => {
|
|
43030
|
+
const { checkedIcon, uncheckedIcon } = this;
|
|
43031
|
+
return checked
|
|
43032
|
+
? checkedIcon ?? config.get('toggleCheckedIcon')
|
|
43033
|
+
: uncheckedIcon ?? config.get('toggleUncheckedIcon');
|
|
43034
|
+
};
|
|
43035
|
+
this.getDefaultSwitchLabelIcon = (mode, checked) => {
|
|
42994
43036
|
if (mode === 'md') {
|
|
42995
43037
|
return checked ? checkmarkOutline : removeOutline;
|
|
42996
43038
|
}
|
|
@@ -43078,10 +43120,12 @@ class Toggle {
|
|
|
43078
43120
|
this.el.focus();
|
|
43079
43121
|
}
|
|
43080
43122
|
renderOnOffSwitchLabels(mode, checked) {
|
|
43081
|
-
const
|
|
43123
|
+
const customIcon = this.getCustomSwitchLabelIcon(checked);
|
|
43124
|
+
const icon = customIcon ?? this.getDefaultSwitchLabelIcon(mode, checked);
|
|
43082
43125
|
return (hAsync("ion-icon", { class: {
|
|
43083
43126
|
'toggle-switch-icon': true,
|
|
43084
43127
|
'toggle-switch-icon-checked': checked,
|
|
43128
|
+
'toggle-switch-icon-custom': customIcon != null,
|
|
43085
43129
|
}, icon: icon, "aria-hidden": "true" }));
|
|
43086
43130
|
}
|
|
43087
43131
|
renderToggleControl() {
|
|
@@ -43131,7 +43175,7 @@ class Toggle {
|
|
|
43131
43175
|
// The attributes are matched too because the class needs the item to render.
|
|
43132
43176
|
const inClickableItem = hostContext('ion-item.ion-activatable, ion-item[button], ion-item[href]', el);
|
|
43133
43177
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
43134
|
-
return (hAsync(Host, { key: '
|
|
43178
|
+
return (hAsync(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$1(color, {
|
|
43135
43179
|
[mode]: true,
|
|
43136
43180
|
'in-item': inItem,
|
|
43137
43181
|
// `ion-focusable` has to stay on because it is what makes the item focusable.
|
|
@@ -43145,10 +43189,10 @@ class Toggle {
|
|
|
43145
43189
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
43146
43190
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
43147
43191
|
[`toggle-${rtl}`]: true,
|
|
43148
|
-
}) }, hAsync("label", { key: '
|
|
43192
|
+
}) }, hAsync("label", { key: 'f49a869a6008ad626fa7bbdc927cba6c4e780581', class: "toggle-wrapper", htmlFor: inputId }, hAsync("input", { key: '5c478d219f89caa1f0b0b116773ddfaf008309c6', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required, ...inheritedAttributes }), hAsync("div", { key: '4f2baf8a21b0498f89b7ce003943e5005b585a35', class: {
|
|
43149
43193
|
'label-text-wrapper': true,
|
|
43150
43194
|
'label-text-wrapper-hidden': !hasLabel,
|
|
43151
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '
|
|
43195
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '6f6d915fe534addbb59671452272a1924603798b' }), this.renderHintText()), hAsync("div", { key: 'e455a0cab17a24ba514946bc2537eaf63c668d3e', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
43152
43196
|
}
|
|
43153
43197
|
get el() { return getElement(this); }
|
|
43154
43198
|
static get watchers() { return {
|
|
@@ -43172,6 +43216,8 @@ class Toggle {
|
|
|
43172
43216
|
"helperText": [1, "helper-text"],
|
|
43173
43217
|
"value": [1],
|
|
43174
43218
|
"enableOnOffLabels": [4, "enable-on-off-labels"],
|
|
43219
|
+
"checkedIcon": [1, "checked-icon"],
|
|
43220
|
+
"uncheckedIcon": [1, "unchecked-icon"],
|
|
43175
43221
|
"labelPlacement": [1, "label-placement"],
|
|
43176
43222
|
"justify": [1],
|
|
43177
43223
|
"alignment": [1],
|