@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.mjs
CHANGED
|
@@ -7213,10 +7213,13 @@ const HapticEngine = {
|
|
|
7213
7213
|
},
|
|
7214
7214
|
};
|
|
7215
7215
|
/**
|
|
7216
|
-
* Check to see if the Haptic Plugin is available
|
|
7217
|
-
* @return Returns `true`
|
|
7216
|
+
* Check to see if haptics are enabled and the Haptic Plugin is available
|
|
7217
|
+
* @return Returns `true` if haptics can be triggered
|
|
7218
7218
|
*/
|
|
7219
7219
|
const hapticAvailable = () => {
|
|
7220
|
+
if (!config.getBoolean('haptics', true)) {
|
|
7221
|
+
return false;
|
|
7222
|
+
}
|
|
7220
7223
|
return HapticEngine.available();
|
|
7221
7224
|
};
|
|
7222
7225
|
/**
|
|
@@ -19036,15 +19039,16 @@ class Fab {
|
|
|
19036
19039
|
}; }
|
|
19037
19040
|
}
|
|
19038
19041
|
|
|
19039
|
-
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)
|
|
19042
|
+
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)}}`;
|
|
19040
19043
|
|
|
19041
|
-
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)
|
|
19044
|
+
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)}}`;
|
|
19042
19045
|
|
|
19043
19046
|
/**
|
|
19044
19047
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
19045
19048
|
*
|
|
19046
19049
|
* @part native - The native HTML button or anchor element that wraps all child elements.
|
|
19047
19050
|
* @part close-icon - The close icon that is displayed when a fab list opens (uses ion-icon).
|
|
19051
|
+
* @part inner - The wrapper around the button's content, hidden when a fab list opens.
|
|
19048
19052
|
*/
|
|
19049
19053
|
class FabButton {
|
|
19050
19054
|
constructor(hostRef) {
|
|
@@ -19060,6 +19064,11 @@ class FabButton {
|
|
|
19060
19064
|
* If `true`, the fab button will be show a close icon.
|
|
19061
19065
|
*/
|
|
19062
19066
|
this.activated = false;
|
|
19067
|
+
/**
|
|
19068
|
+
* If `true`, the fab button will animate between states, such as
|
|
19069
|
+
* swapping its content for the close icon.
|
|
19070
|
+
*/
|
|
19071
|
+
this.animated = true;
|
|
19063
19072
|
/**
|
|
19064
19073
|
* If `true`, the user cannot interact with the fab button.
|
|
19065
19074
|
*/
|
|
@@ -19179,9 +19188,10 @@ class FabButton {
|
|
|
19179
19188
|
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
19180
19189
|
}
|
|
19181
19190
|
render() {
|
|
19182
|
-
const { el, disabled, color, href, activated, show, translucent, size, inheritedAttributes, type } = this;
|
|
19191
|
+
const { el, disabled, color, href, activated, animated, show, translucent, size, inheritedAttributes, type } = this;
|
|
19183
19192
|
const inList = hostContext('ion-fab-list', el);
|
|
19184
19193
|
const mode = getIonMode$1(this);
|
|
19194
|
+
const shouldAnimate = animated && config.getBoolean('animated', true);
|
|
19185
19195
|
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
19186
19196
|
const TagType = href === undefined ? 'button' : 'a';
|
|
19187
19197
|
const attrs = TagType === 'button'
|
|
@@ -19199,18 +19209,19 @@ class FabButton {
|
|
|
19199
19209
|
if (type !== 'button') {
|
|
19200
19210
|
this.renderHiddenButton();
|
|
19201
19211
|
}
|
|
19202
|
-
return (hAsync(Host, { key: '
|
|
19212
|
+
return (hAsync(Host, { key: '78e48dd691cd7462ae43fb7d702d3bbd487ea578', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
|
|
19203
19213
|
[mode]: true,
|
|
19204
19214
|
'fab-button-in-list': inList,
|
|
19205
19215
|
'fab-button-translucent-in-list': inList && translucent,
|
|
19206
19216
|
'fab-button-close-active': activated,
|
|
19217
|
+
'fab-button-animated': shouldAnimate,
|
|
19207
19218
|
'fab-button-show': show,
|
|
19208
19219
|
'fab-button-disabled': disabled,
|
|
19209
19220
|
'fab-button-translucent': translucent,
|
|
19210
19221
|
'ion-activatable': true,
|
|
19211
19222
|
'ion-focusable': true,
|
|
19212
19223
|
[`fab-button-${size}`]: size !== undefined,
|
|
19213
|
-
}) }, hAsync(TagType, { key: '
|
|
19224
|
+
}) }, 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' }))));
|
|
19214
19225
|
}
|
|
19215
19226
|
get el() { return getElement(this); }
|
|
19216
19227
|
static get watchers() { return {
|
|
@@ -19228,6 +19239,7 @@ class FabButton {
|
|
|
19228
19239
|
"$members$": {
|
|
19229
19240
|
"color": [513],
|
|
19230
19241
|
"activated": [4],
|
|
19242
|
+
"animated": [4],
|
|
19231
19243
|
"disabled": [4],
|
|
19232
19244
|
"download": [1],
|
|
19233
19245
|
"href": [1],
|
|
@@ -33683,7 +33695,7 @@ class Range {
|
|
|
33683
33695
|
* should not move.
|
|
33684
33696
|
*/
|
|
33685
33697
|
threshold: 10,
|
|
33686
|
-
onStart: (
|
|
33698
|
+
onStart: () => this.onStart(),
|
|
33687
33699
|
onMove: (ev) => this.onMove(ev),
|
|
33688
33700
|
onEnd: (ev) => this.onEnd(ev),
|
|
33689
33701
|
});
|
|
@@ -33708,22 +33720,23 @@ class Range {
|
|
|
33708
33720
|
syncActivated();
|
|
33709
33721
|
};
|
|
33710
33722
|
this.handleKeyboard = (knob, isIncrease) => {
|
|
33723
|
+
const { ensureValueInBounds } = this;
|
|
33711
33724
|
let step = this.step;
|
|
33712
33725
|
step = step > 0 ? step : 1;
|
|
33713
33726
|
step = step / (this.max - this.min);
|
|
33714
33727
|
if (!isIncrease) {
|
|
33715
33728
|
step *= -1;
|
|
33716
33729
|
}
|
|
33717
|
-
this.ionKnobMoveStart.emit(this.getKnobMoveDetail(knob));
|
|
33718
33730
|
if (knob === 'A') {
|
|
33719
33731
|
this.ratioA = clamp(0, this.ratioA + step, 1);
|
|
33720
33732
|
}
|
|
33721
33733
|
else {
|
|
33722
33734
|
this.ratioB = clamp(0, this.ratioB + step, 1);
|
|
33723
33735
|
}
|
|
33736
|
+
this.ionKnobMoveStart.emit({ value: ensureValueInBounds(this.value) });
|
|
33724
33737
|
this.updateValue();
|
|
33725
33738
|
this.emitValueChange();
|
|
33726
|
-
this.ionKnobMoveEnd.emit(this.
|
|
33739
|
+
this.ionKnobMoveEnd.emit({ value: ensureValueInBounds(this.value) });
|
|
33727
33740
|
};
|
|
33728
33741
|
this.onBlur = () => {
|
|
33729
33742
|
if (this.hasFocus) {
|
|
@@ -33916,32 +33929,55 @@ class Range {
|
|
|
33916
33929
|
this.ionChange.emit({ value: this.value });
|
|
33917
33930
|
}
|
|
33918
33931
|
/**
|
|
33919
|
-
*
|
|
33920
|
-
*
|
|
33921
|
-
*
|
|
33932
|
+
* The value should be updated on touch end or
|
|
33933
|
+
* when the component is being dragged.
|
|
33934
|
+
* This follows the native behavior of mobile devices.
|
|
33922
33935
|
*
|
|
33923
|
-
*
|
|
33936
|
+
* For example: When the user lifts their finger from the
|
|
33937
|
+
* screen after tapping the bar or dragging the bar or knob.
|
|
33924
33938
|
*/
|
|
33925
|
-
onStart(
|
|
33926
|
-
|
|
33927
|
-
if (contentEl) {
|
|
33928
|
-
this.initialContentScrollY = disableContentScrollY(contentEl);
|
|
33929
|
-
}
|
|
33930
|
-
/**
|
|
33931
|
-
* Pick the knob before emitting so the start event can
|
|
33932
|
-
* report it. It stays the same for the rest of the drag.
|
|
33933
|
-
*/
|
|
33934
|
-
const knob = this.setPressedKnob(startX);
|
|
33935
|
-
this.ionKnobMoveStart.emit(this.getKnobMoveDetail(knob));
|
|
33939
|
+
onStart() {
|
|
33940
|
+
this.ionKnobMoveStart.emit({ value: this.ensureValueInBounds(this.value) });
|
|
33936
33941
|
}
|
|
33937
33942
|
/**
|
|
33938
33943
|
* The value should be updated while dragging the
|
|
33939
33944
|
* bar or knob.
|
|
33940
33945
|
*
|
|
33946
|
+
* While the user is dragging, the view
|
|
33947
|
+
* should not scroll. This is to prevent the user from
|
|
33948
|
+
* feeling disoriented while dragging.
|
|
33949
|
+
*
|
|
33950
|
+
* The user can scroll on the view if the knob or
|
|
33951
|
+
* bar is not being dragged.
|
|
33952
|
+
*
|
|
33941
33953
|
* @param detail The details of the gesture event.
|
|
33942
33954
|
*/
|
|
33943
33955
|
onMove(detail) {
|
|
33944
|
-
this
|
|
33956
|
+
const { contentEl, pressedKnob } = this;
|
|
33957
|
+
const currentX = detail.currentX;
|
|
33958
|
+
/**
|
|
33959
|
+
* Since the user is dragging on the bar or knob, the view should not scroll.
|
|
33960
|
+
*
|
|
33961
|
+
* This only needs to be done once.
|
|
33962
|
+
*/
|
|
33963
|
+
if (contentEl && this.pressedKnob === undefined) {
|
|
33964
|
+
this.initialContentScrollY = disableContentScrollY(contentEl);
|
|
33965
|
+
}
|
|
33966
|
+
/**
|
|
33967
|
+
* The `pressedKnob` can be undefined if the user just
|
|
33968
|
+
* started dragging the knob.
|
|
33969
|
+
*
|
|
33970
|
+
* This is necessary to determine which knob the user is dragging,
|
|
33971
|
+
* especially when using dual knobs.
|
|
33972
|
+
* Plus, it determines when to apply certain styles.
|
|
33973
|
+
*
|
|
33974
|
+
* This only needs to be done once since the knob won't change
|
|
33975
|
+
* while the user is dragging.
|
|
33976
|
+
*/
|
|
33977
|
+
if (pressedKnob === undefined) {
|
|
33978
|
+
this.setPressedKnob(currentX);
|
|
33979
|
+
}
|
|
33980
|
+
this.update(currentX);
|
|
33945
33981
|
}
|
|
33946
33982
|
/**
|
|
33947
33983
|
* The value should be updated on touch end:
|
|
@@ -33953,26 +33989,35 @@ class Range {
|
|
|
33953
33989
|
onEnd(detail) {
|
|
33954
33990
|
const { contentEl, initialContentScrollY } = this;
|
|
33955
33991
|
const currentX = detail.currentX ?? detail.clientX;
|
|
33992
|
+
/**
|
|
33993
|
+
* The `pressedKnob` can be undefined if the user never
|
|
33994
|
+
* dragged the knob. They just tapped on the bar.
|
|
33995
|
+
*
|
|
33996
|
+
* This is necessary to determine which knob the user is changing,
|
|
33997
|
+
* especially when using dual knobs.
|
|
33998
|
+
* Plus, it determines when to apply certain styles.
|
|
33999
|
+
*/
|
|
34000
|
+
if (this.pressedKnob === undefined) {
|
|
34001
|
+
this.setPressedKnob(currentX);
|
|
34002
|
+
}
|
|
33956
34003
|
/**
|
|
33957
34004
|
* The user is no longer dragging the bar or
|
|
33958
34005
|
* knob (if they were dragging it).
|
|
33959
34006
|
*
|
|
33960
34007
|
* The user can now scroll on the view in the next gesture event.
|
|
33961
34008
|
*/
|
|
33962
|
-
if (contentEl) {
|
|
34009
|
+
if (contentEl && this.pressedKnob !== undefined) {
|
|
33963
34010
|
resetContentScrollY(contentEl, initialContentScrollY);
|
|
33964
34011
|
}
|
|
33965
34012
|
// update the active knob's position
|
|
33966
34013
|
this.update(currentX);
|
|
33967
|
-
// The pressed knob is always set because `onStart` runs first.
|
|
33968
|
-
const knob = this.pressedKnob;
|
|
33969
34014
|
/**
|
|
33970
34015
|
* Reset the pressed knob to undefined since the user
|
|
33971
34016
|
* may start dragging a different knob in the next gesture event.
|
|
33972
34017
|
*/
|
|
33973
34018
|
this.pressedKnob = undefined;
|
|
33974
34019
|
this.emitValueChange();
|
|
33975
|
-
this.ionKnobMoveEnd.emit(this.
|
|
34020
|
+
this.ionKnobMoveEnd.emit({ value: this.ensureValueInBounds(this.value) });
|
|
33976
34021
|
}
|
|
33977
34022
|
update(currentX) {
|
|
33978
34023
|
// figure out where the pointer is currently at
|
|
@@ -33996,13 +34041,6 @@ class Range {
|
|
|
33996
34041
|
// Update input value
|
|
33997
34042
|
this.updateValue();
|
|
33998
34043
|
}
|
|
33999
|
-
getKnobMoveDetail(knob) {
|
|
34000
|
-
return {
|
|
34001
|
-
value: this.ensureValueInBounds(this.value),
|
|
34002
|
-
knob,
|
|
34003
|
-
position: getKnobPosition(knob, this.ratioA, this.ratioB, this.dualKnobs),
|
|
34004
|
-
};
|
|
34005
|
-
}
|
|
34006
34044
|
setPressedKnob(currentX) {
|
|
34007
34045
|
const rect = (this.rect = this.rangeSlider.getBoundingClientRect());
|
|
34008
34046
|
// figure out which knob they started closer to
|
|
@@ -34010,9 +34048,7 @@ class Range {
|
|
|
34010
34048
|
if (isRTL$1(this.el)) {
|
|
34011
34049
|
ratio = 1 - ratio;
|
|
34012
34050
|
}
|
|
34013
|
-
|
|
34014
|
-
this.pressedKnob = knob;
|
|
34015
|
-
return knob;
|
|
34051
|
+
this.pressedKnob = !this.dualKnobs || Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio) ? 'A' : 'B';
|
|
34016
34052
|
}
|
|
34017
34053
|
get valA() {
|
|
34018
34054
|
return ratioToValue(this.ratioA, this.min, this.max, this.step);
|
|
@@ -34177,7 +34213,7 @@ class Range {
|
|
|
34177
34213
|
* dragged, the pressedKnob will be defined.
|
|
34178
34214
|
*/
|
|
34179
34215
|
if (this.pressedKnob === undefined) {
|
|
34180
|
-
this.onStart(
|
|
34216
|
+
this.onStart();
|
|
34181
34217
|
this.onEnd(ev);
|
|
34182
34218
|
}
|
|
34183
34219
|
} }, ticks.map((tick) => (hAsync("div", { style: tickStyle(tick), role: "presentation", class: {
|
|
@@ -34261,7 +34297,7 @@ class Range {
|
|
|
34261
34297
|
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
34262
34298
|
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
34263
34299
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
34264
|
-
return (hAsync(Host, { key: '
|
|
34300
|
+
return (hAsync(Host, { key: '72f253ee1514b4c5874a6720c2f954fae7a7c4d4', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses$1(this.color, {
|
|
34265
34301
|
[mode]: true,
|
|
34266
34302
|
'in-item': inItem,
|
|
34267
34303
|
'range-disabled': disabled,
|
|
@@ -34275,10 +34311,10 @@ class Range {
|
|
|
34275
34311
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
34276
34312
|
'range-value-min': valueAtMin,
|
|
34277
34313
|
'range-value-max': valueAtMax,
|
|
34278
|
-
}) }, hAsync("label", { key: '
|
|
34314
|
+
}) }, hAsync("label", { key: '9b96b83a6118ee2a79d8adbb0a58197470308179', class: "range-wrapper", id: "range-label" }, hAsync("div", { key: 'c7b31a7c87c20857a26624bd94501df6420fceec', class: {
|
|
34279
34315
|
'label-text-wrapper': true,
|
|
34280
34316
|
'label-text-wrapper-hidden': !hasLabel,
|
|
34281
|
-
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '
|
|
34317
|
+
}, 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" })))));
|
|
34282
34318
|
}
|
|
34283
34319
|
get el() { return getElement(this); }
|
|
34284
34320
|
static get watchers() { return {
|
|
@@ -42862,7 +42898,7 @@ const buttonPart = (button) => {
|
|
|
42862
42898
|
return isCancel(button.role) ? 'button cancel' : 'button';
|
|
42863
42899
|
};
|
|
42864
42900
|
|
|
42865
|
-
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)}`;
|
|
42901
|
+
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)}`;
|
|
42866
42902
|
|
|
42867
42903
|
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}`;
|
|
42868
42904
|
|
|
@@ -42988,7 +43024,13 @@ class Toggle {
|
|
|
42988
43024
|
this.onBlur = () => {
|
|
42989
43025
|
this.ionBlur.emit();
|
|
42990
43026
|
};
|
|
42991
|
-
this.
|
|
43027
|
+
this.getCustomSwitchLabelIcon = (checked) => {
|
|
43028
|
+
const { checkedIcon, uncheckedIcon } = this;
|
|
43029
|
+
return checked
|
|
43030
|
+
? checkedIcon ?? config.get('toggleCheckedIcon')
|
|
43031
|
+
: uncheckedIcon ?? config.get('toggleUncheckedIcon');
|
|
43032
|
+
};
|
|
43033
|
+
this.getDefaultSwitchLabelIcon = (mode, checked) => {
|
|
42992
43034
|
if (mode === 'md') {
|
|
42993
43035
|
return checked ? checkmarkOutline : removeOutline;
|
|
42994
43036
|
}
|
|
@@ -43076,10 +43118,12 @@ class Toggle {
|
|
|
43076
43118
|
this.el.focus();
|
|
43077
43119
|
}
|
|
43078
43120
|
renderOnOffSwitchLabels(mode, checked) {
|
|
43079
|
-
const
|
|
43121
|
+
const customIcon = this.getCustomSwitchLabelIcon(checked);
|
|
43122
|
+
const icon = customIcon ?? this.getDefaultSwitchLabelIcon(mode, checked);
|
|
43080
43123
|
return (hAsync("ion-icon", { class: {
|
|
43081
43124
|
'toggle-switch-icon': true,
|
|
43082
43125
|
'toggle-switch-icon-checked': checked,
|
|
43126
|
+
'toggle-switch-icon-custom': customIcon != null,
|
|
43083
43127
|
}, icon: icon, "aria-hidden": "true" }));
|
|
43084
43128
|
}
|
|
43085
43129
|
renderToggleControl() {
|
|
@@ -43129,7 +43173,7 @@ class Toggle {
|
|
|
43129
43173
|
// The attributes are matched too because the class needs the item to render.
|
|
43130
43174
|
const inClickableItem = hostContext('ion-item.ion-activatable, ion-item[button], ion-item[href]', el);
|
|
43131
43175
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
43132
|
-
return (hAsync(Host, { key: '
|
|
43176
|
+
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, {
|
|
43133
43177
|
[mode]: true,
|
|
43134
43178
|
'in-item': inItem,
|
|
43135
43179
|
// `ion-focusable` has to stay on because it is what makes the item focusable.
|
|
@@ -43143,10 +43187,10 @@ class Toggle {
|
|
|
43143
43187
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
43144
43188
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
43145
43189
|
[`toggle-${rtl}`]: true,
|
|
43146
|
-
}) }, hAsync("label", { key: '
|
|
43190
|
+
}) }, 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: {
|
|
43147
43191
|
'label-text-wrapper': true,
|
|
43148
43192
|
'label-text-wrapper-hidden': !hasLabel,
|
|
43149
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '
|
|
43193
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '6f6d915fe534addbb59671452272a1924603798b' }), this.renderHintText()), hAsync("div", { key: 'e455a0cab17a24ba514946bc2537eaf63c668d3e', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
43150
43194
|
}
|
|
43151
43195
|
get el() { return getElement(this); }
|
|
43152
43196
|
static get watchers() { return {
|
|
@@ -43170,6 +43214,8 @@ class Toggle {
|
|
|
43170
43214
|
"helperText": [1, "helper-text"],
|
|
43171
43215
|
"value": [1],
|
|
43172
43216
|
"enableOnOffLabels": [4, "enable-on-off-labels"],
|
|
43217
|
+
"checkedIcon": [1, "checked-icon"],
|
|
43218
|
+
"uncheckedIcon": [1, "unchecked-icon"],
|
|
43173
43219
|
"labelPlacement": [1, "label-placement"],
|
|
43174
43220
|
"justify": [1],
|
|
43175
43221
|
"alignment": [1],
|
package/package.json
CHANGED
package/components/p-CEW4RXZO.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{g as t}from"./p-CIGNaXM1.js";var s,n;!function(t){t.Heavy="HEAVY",t.Medium="MEDIUM",t.Light="LIGHT"}(s||(s={})),function(t){t.Success="SUCCESS",t.Warning="WARNING",t.Error="ERROR"}(n||(n={}));const i={getEngine(){const s=t();if(s?.isPluginAvailable("Haptics"))return s.Plugins.Haptics},available(){if(!this.getEngine())return!1;const s=t();return"web"!==s?.getPlatform()||"undefined"!=typeof navigator&&void 0!==navigator.vibrate},impact(t){const s=this.getEngine();s&&s.impact({style:t.style})},notification(t){const s=this.getEngine();s&&s.notification({type:t.type})},selection(){this.impact({style:s.Light})},selectionStart(){const t=this.getEngine();t&&t.selectionStart()},selectionChanged(){const t=this.getEngine();t&&t.selectionChanged()},selectionEnd(){const t=this.getEngine();t&&t.selectionEnd()}},e=()=>i.available(),o=()=>{e()&&i.selection()},a=()=>{e()&&i.selectionStart()},c=()=>{e()&&i.selectionChanged()},r=()=>{e()&&i.selectionEnd()},h=t=>{e()&&i.impact(t)};export{s as I,c as a,a as b,h as c,o as d,r as h}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,d as e,i as o,h as a,f as r,g as i,j as l}from"./p-BGtO2Fhf.js";import{i as n,a as s}from"./p-de2BC0yO.js";import{i as g}from"./p-Dj4J3LkD.js";import{c}from"./p-7hQRImkK.js";import{c as d}from"./p-DJztqcrH.js";import{c as h}from"./p-C_0lvVN_.js";import{a as p,b}from"./p-CjUT_VTP.js";import{h as m,c as x}from"./p-byZM6qHV.js";import{j as f,r as w,k}from"./p-BvabGprD.js";import"./p-Dqz9qh-H.js";const u=class{constructor(a){new.target===u&&t(this,a),this.ionChange=e(this,"ionChange",7),this.ionFocus=e(this,"ionFocus",7),this.ionBlur=e(this,"ionBlur",7),this.inputId="ion-tg-"+y++,this.inputLabelId=`${this.inputId}-lbl`,this.helperTextId=`${this.inputId}-helper-text`,this.errorTextId=`${this.inputId}-error-text`,this.lastDrag=0,this.inheritedAttributes={},this.didLoad=!1,this.activated=!1,this.isInvalid=!1,this.name=this.inputId,this.checked=!1,this.disabled=!1,this.value="on",this.enableOnOffLabels=o.get("toggleOnOffLabels"),this.labelPlacement="start",this.required=!1,this.setupGesture=async()=>{const{toggleTrack:t}=this;t&&(this.gesture=(await import("./p-D0YpjgON.js")).createGesture({el:t,gestureName:"toggle",gesturePriority:100,threshold:5,passive:!1,onStart:()=>this.onStart(),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.disabledChanged())},this.onKeyDown=t=>{" "===t.key&&(t.preventDefault(),this.disabled||this.toggleChecked())},this.onClick=t=>{const e=p("ios");this.disabled||(t.preventDefault(),this.lastDrag+300<Date.now()&&(this.toggleChecked(),e&&h()))},this.onDivLabelClick=t=>{t.stopPropagation()},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.getSwitchLabelIcon=(t,e)=>"md"===t?e?f:w:e?w:k}disabledChanged(){this.gesture&&this.gesture.enable(!this.disabled)}toggleChecked(){const{checked:t,value:e}=this,o=!t;this.checked=o,this.ionChange.emit({checked:o,value:e})}async connectedCallback(){const{didLoad:t,el:e}=this;t&&this.setupGesture(),"undefined"!=typeof MutationObserver&&(this.validationObserver=new MutationObserver((()=>{const t=d(e);this.isInvalid!==t&&(this.isInvalid=t,Promise.resolve().then((()=>{this.hintTextId=this.getHintTextId()})))})),this.validationObserver.observe(e,{attributes:!0,attributeFilter:["class"]})),this.isInvalid=d(e),this.itemFocusObserver=c(e,(()=>l(this)),["item-multiple-inputs","ion-activatable"])}componentDidLoad(){this.setupGesture(),this.didLoad=!0}disconnectedCallback(){this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.itemFocusObserver&&(this.itemFocusObserver.disconnect(),this.itemFocusObserver=void 0),this.validationObserver&&(this.validationObserver.disconnect(),this.validationObserver=void 0)}componentWillLoad(){this.inheritedAttributes={...n(this.el)},this.hintTextId=this.getHintTextId()}onStart(){this.activated=!0,this.setFocus()}onMove(t){v(g(this.el),this.checked,t.deltaX,-10)&&(this.toggleChecked(),h())}onEnd(t){this.activated=!1,this.lastDrag=Date.now(),t.event.preventDefault(),t.event.stopImmediatePropagation()}getValue(){return this.value||""}setFocus(){this.el.focus()}renderOnOffSwitchLabels(t,e){const o=this.getSwitchLabelIcon(t,e);return a("ion-icon",{class:{"toggle-switch-icon":!0,"toggle-switch-icon-checked":e},icon:o,"aria-hidden":"true"})}renderToggleControl(){const t=b(this),{enableOnOffLabels:e,checked:o}=this;return a("div",{class:"toggle-icon",part:"track",ref:t=>this.toggleTrack=t},e&&"ios"===t&&[this.renderOnOffSwitchLabels(t,!0),this.renderOnOffSwitchLabels(t,!1)],a("div",{class:"toggle-icon-wrapper"},a("div",{class:"toggle-inner",part:"handle"},e&&"md"===t&&this.renderOnOffSwitchLabels(t,o))))}get hasLabel(){return""!==this.el.textContent}getHintTextId(){const{helperText:t,errorText:e,helperTextId:o,errorTextId:a,isInvalid:r}=this;return r&&e?a:t?o:void 0}renderHintText(){const{helperText:t,errorText:e,helperTextId:o,errorTextId:r,isInvalid:i}=this;if(t||e)return a("div",{class:"toggle-bottom"},a("div",{id:o,class:"helper-text",part:"supporting-text helper-text","aria-live":"polite"},i?null:t),a("div",{id:r,class:"error-text",part:"supporting-text error-text",role:"alert"},i?e:null))}render(){const{activated:t,alignment:e,checked:o,color:i,disabled:l,el:n,hasLabel:c,inheritedAttributes:d,inputId:h,inputLabelId:p,justify:f,labelPlacement:w,name:k,required:u}=this,v=b(this),y=this.getValue(),j=g(n)?"rtl":"ltr",z=m("ion-item",n),T=m("ion-item.item-multiple-inputs",n),C=m("ion-item.ion-activatable, ion-item[button], ion-item[href]",n);return s(!0,n,k,o?y:"",l),a(r,{key:"148d15040257b05b3769da5a2439d051e357cbba",role:"switch","aria-checked":`${o}`,"aria-describedby":this.hintTextId,"aria-invalid":this.isInvalid?"true":void 0,onClick:this.onClick,"aria-labelledby":c?p:null,"aria-label":d["aria-label"]||null,"aria-disabled":l?"true":null,"aria-required":u?"true":void 0,tabindex:l?void 0:0,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,class:x(i,{[v]:!0,"in-item":z,"ion-focusable":!0,"toggle-defers-indicator":z&&!T&&!C,"toggle-activated":t,"toggle-checked":o,"toggle-disabled":l,[`toggle-justify-${f}`]:void 0!==f,[`toggle-alignment-${e}`]:void 0!==e,[`toggle-label-placement-${w}`]:!0,[`toggle-${j}`]:!0})},a("label",{key:"0dbc40adc87e2ab4bdcd9a9fef43393484174c18",class:"toggle-wrapper",htmlFor:h},a("input",{key:"92dee565687fc9a883f97091ead1bbb51df43779",type:"checkbox",role:"switch","aria-checked":`${o}`,checked:o,disabled:l,id:h,required:u,...d}),a("div",{key:"f057bc57714b26e84226ee931e09212b86dba69f",class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":!c},part:"label",id:p,onClick:this.onDivLabelClick},a("slot",{key:"345efb5ce20f8124d1e74877b4943edf82fe2f8e"}),this.renderHintText()),a("div",{key:"fc1a7fb6b65064307fbe0a50178559a52d6aedb7",class:"native-wrapper"},this.renderToggleControl())))}get el(){return i(this)}static get watchers(){return{disabled:[{disabledChanged:0}]}}},v=(t,e,o,a)=>e?!t&&a>o||t&&-a<o:!t&&-a<o||t&&a>o;let y=0;u.style={ios:":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)}",md:':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}'};export{u as ion_toggle}
|