@ionic/core 7.4.3-dev.11696264821.1755dd6a → 7.4.3-dev.11696355648.1f181be0
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/animation.js +1 -60
- package/components/ion-menu.js +19 -51
- package/components/ion-segment.js +35 -23
- package/dist/cjs/{animation-c8bdd3c7.js → animation-2bb33618.js} +1 -60
- package/dist/cjs/{index-e50a18ba.js → index-5121bb90.js} +1 -1
- package/dist/cjs/{index-c388851f.js → index-b183138a.js} +2 -2
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +21 -53
- package/dist/cjs/ion-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +35 -24
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{ios.transition-fd592869.js → ios.transition-4b93903d.js} +2 -2
- package/dist/cjs/{md.transition-a6040d41.js → md.transition-79f3a215.js} +2 -2
- package/dist/collection/components/menu/menu.js +19 -51
- package/dist/collection/components/segment/segment.js +35 -23
- package/dist/collection/components/segment/test/scrollable/segment.e2e.js +55 -1
- package/dist/collection/utils/animation/animation.js +1 -60
- package/dist/docs.json +1 -1
- package/dist/esm/{animation-92066c62.js → animation-a1d9e088.js} +1 -60
- package/dist/esm/{index-9b1940b1.js → index-61bddc90.js} +1 -1
- package/dist/esm/{index-ca26aea8.js → index-87684bba.js} +2 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +21 -53
- package/dist/esm/ion-modal.entry.js +2 -2
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +35 -24
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{ios.transition-d4be3bd5.js → ios.transition-81e1aed6.js} +2 -2
- package/dist/esm/{md.transition-ae47f354.js → md.transition-5becd8b5.js} +2 -2
- package/dist/esm-es5/animation-a1d9e088.js +4 -0
- package/dist/esm-es5/{index-9b1940b1.js → index-61bddc90.js} +1 -1
- package/dist/esm-es5/{index-ca26aea8.js → index-87684bba.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/{ios.transition-d4be3bd5.js → ios.transition-81e1aed6.js} +1 -1
- package/dist/esm-es5/{md.transition-ae47f354.js → md.transition-5becd8b5.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-17f69cbc.system.entry.js → p-048d7153.system.entry.js} +1 -1
- package/dist/ionic/{p-eac9308b.system.entry.js → p-08c5b9f4.system.entry.js} +1 -1
- package/dist/ionic/{p-9f758520.entry.js → p-13a91505.entry.js} +1 -1
- package/dist/ionic/p-155dfdda.entry.js +4 -0
- package/dist/ionic/{p-4d2c9270.system.entry.js → p-1a36bf45.system.entry.js} +1 -1
- package/dist/ionic/{p-b0c3f506.entry.js → p-27614d55.entry.js} +1 -1
- package/dist/ionic/{p-2624b777.system.entry.js → p-37456282.system.entry.js} +1 -1
- package/dist/ionic/p-40e16caa.system.entry.js +4 -0
- package/dist/ionic/{p-0505bc05.system.entry.js → p-4616f20a.system.entry.js} +1 -1
- package/dist/ionic/{p-f70372cf.js → p-5e2dc8e0.js} +1 -1
- package/dist/ionic/{p-9eea70fb.system.entry.js → p-65a4c12f.system.entry.js} +1 -1
- package/dist/ionic/p-6b2641f6.system.js +4 -0
- package/dist/ionic/{p-dcdc16e8.system.entry.js → p-6bc9c436.system.entry.js} +1 -1
- package/dist/ionic/p-6edbc09b.system.js +1 -1
- package/dist/ionic/p-72a1cbc7.js +4 -0
- package/dist/ionic/{p-f2bc4fc0.system.js → p-73f50e29.system.js} +1 -1
- package/dist/ionic/p-78a293a5.js +4 -0
- package/dist/ionic/{p-5c9f38bf.entry.js → p-7e46b6ab.entry.js} +1 -1
- package/dist/ionic/{p-0fb0904b.system.js → p-8fdd4a2f.system.js} +1 -1
- package/dist/ionic/{p-24ebc805.entry.js → p-90d892fd.entry.js} +1 -1
- package/dist/ionic/{p-51163f34.system.js → p-918d5f19.system.js} +1 -1
- package/dist/ionic/p-94a4ce40.js +4 -0
- package/dist/ionic/{p-06a68207.system.entry.js → p-a6d8476b.system.entry.js} +1 -1
- package/dist/ionic/{p-003dbb0e.entry.js → p-a720dc73.entry.js} +1 -1
- package/dist/ionic/{p-2a13187a.system.js → p-b098f738.system.js} +1 -1
- package/dist/ionic/p-b95fd3c6.entry.js +4 -0
- package/dist/ionic/{p-d4f02009.entry.js → p-bf9b1560.entry.js} +1 -1
- package/dist/ionic/{p-26a785e9.system.entry.js → p-c5729044.system.entry.js} +1 -1
- package/dist/ionic/{p-d6e93d49.entry.js → p-c7fca267.entry.js} +1 -1
- package/dist/ionic/{p-c6221536.system.js → p-d4cea1ba.system.js} +1 -1
- package/dist/ionic/{p-40ffdeb5.system.entry.js → p-de676d36.system.entry.js} +1 -1
- package/dist/ionic/{p-a42bbc51.entry.js → p-ee6d9730.entry.js} +1 -1
- package/dist/ionic/p-f1a71e75.system.entry.js +4 -0
- package/dist/ionic/{p-b1a04d35.entry.js → p-f547e62f.entry.js} +1 -1
- package/dist/ionic/{p-4df178d7.entry.js → p-f920f5ca.entry.js} +1 -1
- package/dist/ionic/p-f978ccd1.js +4 -0
- package/dist/types/components/menu/menu.d.ts +1 -8
- package/dist/types/components/segment/segment.d.ts +1 -0
- package/hydrate/index.js +54 -134
- package/package.json +1 -1
- package/dist/collection/components/menu/test/disable/menu.e2e.js +0 -55
- package/dist/esm-es5/animation-92066c62.js +0 -4
- package/dist/ionic/p-015187e5.system.js +0 -4
- package/dist/ionic/p-0a39673e.js +0 -4
- package/dist/ionic/p-12b13ed4.entry.js +0 -4
- package/dist/ionic/p-1a6c0442.js +0 -4
- package/dist/ionic/p-37a0b769.js +0 -4
- package/dist/ionic/p-446230d7.js +0 -4
- package/dist/ionic/p-55b99166.entry.js +0 -4
- package/dist/ionic/p-b5637aeb.system.entry.js +0 -4
- package/dist/ionic/p-bff7659e.system.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -9032,7 +9032,6 @@ const createAnimation = (animationId) => {
|
|
|
9032
9032
|
const id = animationId;
|
|
9033
9033
|
const onFinishCallbacks = [];
|
|
9034
9034
|
const onFinishOneTimeCallbacks = [];
|
|
9035
|
-
const onStopOneTimeCallbacks = [];
|
|
9036
9035
|
const elements = [];
|
|
9037
9036
|
const childAnimations = [];
|
|
9038
9037
|
const stylesheets = [];
|
|
@@ -9090,28 +9089,6 @@ const createAnimation = (animationId) => {
|
|
|
9090
9089
|
const isRunning = () => {
|
|
9091
9090
|
return numAnimationsRunning !== 0 && !paused;
|
|
9092
9091
|
};
|
|
9093
|
-
/**
|
|
9094
|
-
* @internal
|
|
9095
|
-
* Remove a callback from a chosen callback array
|
|
9096
|
-
* @param callbackToRemove: A reference to the callback that should be removed
|
|
9097
|
-
* @param callbackObjects: An array of callbacks that callbackToRemove should be removed from.
|
|
9098
|
-
*/
|
|
9099
|
-
const clearCallback = (callbackToRemove, callbackObjects) => {
|
|
9100
|
-
const index = callbackObjects.findIndex((callbackObject) => callbackObject.c === callbackToRemove);
|
|
9101
|
-
if (index > -1) {
|
|
9102
|
-
callbackObjects.splice(index, 1);
|
|
9103
|
-
}
|
|
9104
|
-
};
|
|
9105
|
-
/**
|
|
9106
|
-
* @internal
|
|
9107
|
-
* Add a callback to be fired when an animation is stopped/cancelled.
|
|
9108
|
-
* @param callback: A reference to the callback that should be fired
|
|
9109
|
-
* @param opts: Any options associated with this particular callback
|
|
9110
|
-
*/
|
|
9111
|
-
const onStop = (callback, opts) => {
|
|
9112
|
-
onStopOneTimeCallbacks.push({ c: callback, o: opts });
|
|
9113
|
-
return ani;
|
|
9114
|
-
};
|
|
9115
9092
|
const onFinish = (callback, opts) => {
|
|
9116
9093
|
const callbacks = (opts === null || opts === void 0 ? void 0 : opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
|
|
9117
9094
|
callbacks.push({ c: callback, o: opts });
|
|
@@ -9780,33 +9757,7 @@ const createAnimation = (animationId) => {
|
|
|
9780
9757
|
numAnimationsRunning = childAnimations.length + 1;
|
|
9781
9758
|
shouldCalculateNumAnimations = false;
|
|
9782
9759
|
}
|
|
9783
|
-
|
|
9784
|
-
* When one of these callbacks fires we
|
|
9785
|
-
* need to clear the other's callback otherwise
|
|
9786
|
-
* you can potentially get these callbacks
|
|
9787
|
-
* firing multiple times if the play method
|
|
9788
|
-
* is subsequently called.
|
|
9789
|
-
* Example:
|
|
9790
|
-
* animation.play() (onStop and onFinish callbacks are registered)
|
|
9791
|
-
* animation.stop() (onStop callback is fired, onFinish is not)
|
|
9792
|
-
* animation.play() (onStop and onFinish callbacks are registered)
|
|
9793
|
-
* Total onStop callbacks: 1
|
|
9794
|
-
* Total onFinish callbacks: 2
|
|
9795
|
-
*/
|
|
9796
|
-
const onStopCallback = () => {
|
|
9797
|
-
clearCallback(onFinishCallback, onFinishOneTimeCallbacks);
|
|
9798
|
-
resolve();
|
|
9799
|
-
};
|
|
9800
|
-
const onFinishCallback = () => {
|
|
9801
|
-
clearCallback(onStopCallback, onStopOneTimeCallbacks);
|
|
9802
|
-
resolve();
|
|
9803
|
-
};
|
|
9804
|
-
/**
|
|
9805
|
-
* The play method resolves when an animation
|
|
9806
|
-
* run either finishes or is cancelled.
|
|
9807
|
-
*/
|
|
9808
|
-
onFinish(onFinishCallback, { oneTimeCallback: true });
|
|
9809
|
-
onStop(onStopCallback, { oneTimeCallback: true });
|
|
9760
|
+
onFinish(() => resolve(), { oneTimeCallback: true });
|
|
9810
9761
|
childAnimations.forEach((animation) => {
|
|
9811
9762
|
animation.play();
|
|
9812
9763
|
});
|
|
@@ -9819,14 +9770,6 @@ const createAnimation = (animationId) => {
|
|
|
9819
9770
|
paused = false;
|
|
9820
9771
|
});
|
|
9821
9772
|
};
|
|
9822
|
-
/**
|
|
9823
|
-
* Stops an animation and resets it state to the
|
|
9824
|
-
* beginning. This does not fire any onFinish
|
|
9825
|
-
* callbacks because the animation did not finish.
|
|
9826
|
-
* However, since the animation was not destroyed
|
|
9827
|
-
* (i.e. the animation could run again) we do not
|
|
9828
|
-
* clear the onFinish callbacks.
|
|
9829
|
-
*/
|
|
9830
9773
|
const stop = () => {
|
|
9831
9774
|
childAnimations.forEach((animation) => {
|
|
9832
9775
|
animation.stop();
|
|
@@ -9836,8 +9779,6 @@ const createAnimation = (animationId) => {
|
|
|
9836
9779
|
initialized = false;
|
|
9837
9780
|
}
|
|
9838
9781
|
resetFlags();
|
|
9839
|
-
onStopOneTimeCallbacks.forEach((onStopCallback) => onStopCallback.c(0, ani));
|
|
9840
|
-
onStopOneTimeCallbacks.length = 0;
|
|
9841
9782
|
};
|
|
9842
9783
|
const from = (property, value) => {
|
|
9843
9784
|
const firstFrame = _keyframes[0];
|
|
@@ -20595,14 +20536,6 @@ class Menu {
|
|
|
20595
20536
|
this.lastOnEnd = 0;
|
|
20596
20537
|
this.blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
|
|
20597
20538
|
this.didLoad = false;
|
|
20598
|
-
/**
|
|
20599
|
-
* Flag used to determine if an open/close
|
|
20600
|
-
* operation was cancelled. For example, if
|
|
20601
|
-
* an app calls "menu.open" then disables the menu
|
|
20602
|
-
* part way through the animation, then this would
|
|
20603
|
-
* be considered a cancelled operation.
|
|
20604
|
-
*/
|
|
20605
|
-
this.operationCancelled = false;
|
|
20606
20539
|
this.isAnimating = false;
|
|
20607
20540
|
this._isOpen = false;
|
|
20608
20541
|
this.inheritedAttributes = {};
|
|
@@ -20842,15 +20775,6 @@ class Menu {
|
|
|
20842
20775
|
this.beforeAnimation(shouldOpen);
|
|
20843
20776
|
await this.loadAnimation();
|
|
20844
20777
|
await this.startAnimation(shouldOpen, animated);
|
|
20845
|
-
/**
|
|
20846
|
-
* If the animation was cancelled then
|
|
20847
|
-
* return false because the operation
|
|
20848
|
-
* did not succeed.
|
|
20849
|
-
*/
|
|
20850
|
-
if (this.operationCancelled) {
|
|
20851
|
-
this.operationCancelled = false;
|
|
20852
|
-
return false;
|
|
20853
|
-
}
|
|
20854
20778
|
this.afterAnimation(shouldOpen);
|
|
20855
20779
|
return true;
|
|
20856
20780
|
}
|
|
@@ -20887,23 +20811,18 @@ class Menu {
|
|
|
20887
20811
|
const easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;
|
|
20888
20812
|
const ani = this.animation
|
|
20889
20813
|
.direction(isReversed ? 'reverse' : 'normal')
|
|
20890
|
-
.easing(isReversed ? easingReverse : easing)
|
|
20814
|
+
.easing(isReversed ? easingReverse : easing)
|
|
20815
|
+
.onFinish(() => {
|
|
20816
|
+
if (ani.getDirection() === 'reverse') {
|
|
20817
|
+
ani.direction('normal');
|
|
20818
|
+
}
|
|
20819
|
+
});
|
|
20891
20820
|
if (animated) {
|
|
20892
20821
|
await ani.play();
|
|
20893
20822
|
}
|
|
20894
20823
|
else {
|
|
20895
20824
|
ani.play({ sync: true });
|
|
20896
20825
|
}
|
|
20897
|
-
/**
|
|
20898
|
-
* We run this after the play invocation
|
|
20899
|
-
* instead of using ani.onFinish so that
|
|
20900
|
-
* multiple onFinish callbacks do not get
|
|
20901
|
-
* run if an animation is played, stopped,
|
|
20902
|
-
* and then played again.
|
|
20903
|
-
*/
|
|
20904
|
-
if (ani.getDirection() === 'reverse') {
|
|
20905
|
-
ani.direction('normal');
|
|
20906
|
-
}
|
|
20907
20826
|
}
|
|
20908
20827
|
_isActive() {
|
|
20909
20828
|
return !this.disabled && !this.isPaneVisible;
|
|
@@ -21040,6 +20959,7 @@ class Menu {
|
|
|
21040
20959
|
}
|
|
21041
20960
|
afterAnimation(isOpen) {
|
|
21042
20961
|
var _a;
|
|
20962
|
+
assert(this.isAnimating, '_before() should be called while animating');
|
|
21043
20963
|
// keep opening/closing the menu disabled for a touch more yet
|
|
21044
20964
|
// only add listeners/css if it's enabled and isOpen
|
|
21045
20965
|
// and only remove listeners/css if it's not open
|
|
@@ -21098,29 +21018,10 @@ class Menu {
|
|
|
21098
21018
|
if (this.gesture) {
|
|
21099
21019
|
this.gesture.enable(isActive && this.swipeGesture);
|
|
21100
21020
|
}
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
* of animating {open, close} and the menu is disabled
|
|
21106
|
-
* then it should still be closed immediately.
|
|
21107
|
-
*/
|
|
21108
|
-
if (!isActive) {
|
|
21109
|
-
/**
|
|
21110
|
-
* It is possible to disable the menu while
|
|
21111
|
-
* it is mid-animation. When this happens, we
|
|
21112
|
-
* need to set the operationCancelled flag
|
|
21113
|
-
* so that this._setOpen knows to return false
|
|
21114
|
-
* and not run the "afterAnimation" callback.
|
|
21115
|
-
*/
|
|
21116
|
-
if (this.isAnimating) {
|
|
21117
|
-
this.operationCancelled = true;
|
|
21118
|
-
}
|
|
21119
|
-
/**
|
|
21120
|
-
* If the menu is disabled then we should
|
|
21121
|
-
* forcibly close the menu even if it is open.
|
|
21122
|
-
*/
|
|
21123
|
-
this.afterAnimation(false);
|
|
21021
|
+
// Close menu immediately
|
|
21022
|
+
if (!isActive && this._isOpen) {
|
|
21023
|
+
// close if this menu is open, and should not be enabled
|
|
21024
|
+
this.forceClosing();
|
|
21124
21025
|
}
|
|
21125
21026
|
if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
|
|
21126
21027
|
/**
|
|
@@ -21133,6 +21034,14 @@ class Menu {
|
|
|
21133
21034
|
menuController._setActiveMenu(this);
|
|
21134
21035
|
}
|
|
21135
21036
|
}
|
|
21037
|
+
assert(!this.isAnimating, 'can not be animating');
|
|
21038
|
+
}
|
|
21039
|
+
forceClosing() {
|
|
21040
|
+
assert(this._isOpen, 'menu cannot be closed');
|
|
21041
|
+
this.isAnimating = true;
|
|
21042
|
+
const ani = this.animation.direction('reverse');
|
|
21043
|
+
ani.play({ sync: true });
|
|
21044
|
+
this.afterAnimation(false);
|
|
21136
21045
|
}
|
|
21137
21046
|
render() {
|
|
21138
21047
|
const { type, disabled, isPaneVisible, inheritedAttributes, side } = this;
|
|
@@ -31221,29 +31130,7 @@ class Segment {
|
|
|
31221
31130
|
* Used by `ion-segment-button` to determine if the button should be checked.
|
|
31222
31131
|
*/
|
|
31223
31132
|
this.ionSelect.emit({ value });
|
|
31224
|
-
|
|
31225
|
-
const buttons = this.getButtons();
|
|
31226
|
-
const activeButton = buttons.find((button) => button.value === value);
|
|
31227
|
-
if (activeButton !== undefined) {
|
|
31228
|
-
/**
|
|
31229
|
-
* Scrollable segment buttons should be
|
|
31230
|
-
* centered within the view including
|
|
31231
|
-
* buttons that are partially offscreen.
|
|
31232
|
-
*/
|
|
31233
|
-
activeButton.scrollIntoView({
|
|
31234
|
-
behavior: 'smooth',
|
|
31235
|
-
inline: 'center',
|
|
31236
|
-
/**
|
|
31237
|
-
* Segment should scroll on the
|
|
31238
|
-
* horizontal axis. `block: 'nearest'`
|
|
31239
|
-
* ensures that the vertical axis
|
|
31240
|
-
* does not scroll if the segment
|
|
31241
|
-
* as a whole is already in view.
|
|
31242
|
-
*/
|
|
31243
|
-
block: 'nearest',
|
|
31244
|
-
});
|
|
31245
|
-
}
|
|
31246
|
-
}
|
|
31133
|
+
this.scrollActiveButtonIntoView();
|
|
31247
31134
|
}
|
|
31248
31135
|
disabledChanged() {
|
|
31249
31136
|
this.gestureChanged();
|
|
@@ -31265,6 +31152,13 @@ class Segment {
|
|
|
31265
31152
|
}
|
|
31266
31153
|
async componentDidLoad() {
|
|
31267
31154
|
this.setCheckedClasses();
|
|
31155
|
+
/**
|
|
31156
|
+
* We need to wait for the buttons to all be rendered
|
|
31157
|
+
* before we can scroll.
|
|
31158
|
+
*/
|
|
31159
|
+
raf(() => {
|
|
31160
|
+
this.scrollActiveButtonIntoView();
|
|
31161
|
+
});
|
|
31268
31162
|
this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
|
|
31269
31163
|
el: this.el,
|
|
31270
31164
|
gestureName: 'segment',
|
|
@@ -31393,6 +31287,32 @@ class Segment {
|
|
|
31393
31287
|
buttons[next].classList.add('segment-button-after-checked');
|
|
31394
31288
|
}
|
|
31395
31289
|
}
|
|
31290
|
+
scrollActiveButtonIntoView() {
|
|
31291
|
+
const { scrollable, value } = this;
|
|
31292
|
+
if (scrollable) {
|
|
31293
|
+
const buttons = this.getButtons();
|
|
31294
|
+
const activeButton = buttons.find((button) => button.value === value);
|
|
31295
|
+
if (activeButton !== undefined) {
|
|
31296
|
+
/**
|
|
31297
|
+
* Scrollable segment buttons should be
|
|
31298
|
+
* centered within the view including
|
|
31299
|
+
* buttons that are partially offscreen.
|
|
31300
|
+
*/
|
|
31301
|
+
activeButton.scrollIntoView({
|
|
31302
|
+
behavior: 'smooth',
|
|
31303
|
+
inline: 'center',
|
|
31304
|
+
/**
|
|
31305
|
+
* Segment should scroll on the
|
|
31306
|
+
* horizontal axis. `block: 'nearest'`
|
|
31307
|
+
* ensures that the vertical axis
|
|
31308
|
+
* does not scroll if the segment
|
|
31309
|
+
* as a whole is already in view.
|
|
31310
|
+
*/
|
|
31311
|
+
block: 'nearest',
|
|
31312
|
+
});
|
|
31313
|
+
}
|
|
31314
|
+
}
|
|
31315
|
+
}
|
|
31396
31316
|
setNextIndex(detail, isEnd = false) {
|
|
31397
31317
|
const rtl = isRTL$1(this.el);
|
|
31398
31318
|
const activated = this.activated;
|
package/package.json
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import { expect } from "@playwright/test";
|
|
5
|
-
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
-
/**
|
|
7
|
-
* This behavior does not vary across modes/directions
|
|
8
|
-
*/
|
|
9
|
-
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
10
|
-
test.describe(title('menu: disable'), () => {
|
|
11
|
-
test.beforeEach(async ({ page }) => {
|
|
12
|
-
await page.goto(`/src/components/menu/test/disable`, config);
|
|
13
|
-
});
|
|
14
|
-
test('should disable when menu is fully open', async ({ page }) => {
|
|
15
|
-
const logs = [];
|
|
16
|
-
page.on('console', (msg) => {
|
|
17
|
-
if (msg.type() === 'error') {
|
|
18
|
-
logs.push(msg.text());
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
const menu = page.locator('ion-menu');
|
|
22
|
-
// Should be visible on initial presentation
|
|
23
|
-
await menu.evaluate((el) => el.open());
|
|
24
|
-
await expect(menu).toBeVisible();
|
|
25
|
-
// Disabling menu should hide it
|
|
26
|
-
await menu.evaluate((el) => (el.disabled = true));
|
|
27
|
-
await expect(menu).toBeHidden();
|
|
28
|
-
// Re-enabling menu and opening it show make it visible
|
|
29
|
-
await menu.evaluate((el) => (el.disabled = false));
|
|
30
|
-
await menu.evaluate((el) => el.open());
|
|
31
|
-
await expect(menu).toBeVisible();
|
|
32
|
-
expect(logs.length).toBe(0);
|
|
33
|
-
});
|
|
34
|
-
test.only('should disable when menu is animating', async ({ page }) => {
|
|
35
|
-
const logs = [];
|
|
36
|
-
page.on('console', (msg) => {
|
|
37
|
-
if (msg.type() === 'error') {
|
|
38
|
-
logs.push(msg.text());
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const menu = page.locator('ion-menu');
|
|
42
|
-
// Opening and quickly disabling menu should hide it
|
|
43
|
-
menu.evaluate((el) => {
|
|
44
|
-
el.open();
|
|
45
|
-
setTimeout(() => (el.disabled = true), 0);
|
|
46
|
-
});
|
|
47
|
-
await expect(menu).toBeHidden();
|
|
48
|
-
// Re-enabling menu and opening it show make it visible
|
|
49
|
-
await menu.evaluate((el) => (el.disabled = false));
|
|
50
|
-
await menu.evaluate((el) => el.open());
|
|
51
|
-
await expect(menu).toBeVisible();
|
|
52
|
-
expect(logs.length).toBe(0);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{w as win}from"./index-7a14ecec.js";import{r as raf}from"./helpers-3379ba19.js";var animationPrefix;var processKeyframes=function(e){e.forEach((function(e){for(var n in e){if(e.hasOwnProperty(n)){var r=e[n];if(n==="easing"){var t="animation-timing-function";e[t]=r;delete e[n]}else{var t=convertCamelCaseToHypen(n);if(t!==n){e[t]=r;delete e[n]}}}}}));return e};var convertCamelCaseToHypen=function(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()};var getAnimationPrefix=function(e){if(animationPrefix===undefined){var n=e.style.animationName!==undefined;var r=e.style.webkitAnimationName!==undefined;animationPrefix=!n&&r?"-webkit-":""}return animationPrefix};var setStyleProperty=function(e,n,r){var t=n.startsWith("animation")?getAnimationPrefix(e):"";e.style.setProperty(t+n,r)};var removeStyleProperty=function(e,n){var r=n.startsWith("animation")?getAnimationPrefix(e):"";e.style.removeProperty(r+n)};var animationEnd=function(e,n){var r;var t={passive:true};var a=function(){if(r){r()}};var i=function(r){if(e===r.target){a();n(r)}};if(e){e.addEventListener("webkitAnimationEnd",i,t);e.addEventListener("animationend",i,t);r=function(){e.removeEventListener("webkitAnimationEnd",i,t);e.removeEventListener("animationend",i,t)}}return a};var generateKeyframeRules=function(e){if(e===void 0){e=[]}return e.map((function(e){var n=e.offset;var r=[];for(var t in e){if(e.hasOwnProperty(t)&&t!=="offset"){r.push("".concat(t,": ").concat(e[t],";"))}}return"".concat(n*100,"% { ").concat(r.join(" ")," }")})).join(" ")};var keyframeIds=[];var generateKeyframeName=function(e){var n=keyframeIds.indexOf(e);if(n<0){n=keyframeIds.push(e)-1}return"ion-animation-".concat(n)};var getStyleContainer=function(e){var n=e.getRootNode!==undefined?e.getRootNode():e;return n.head||n};var createKeyframeStylesheet=function(e,n,r){var t;var a=getStyleContainer(r);var i=getAnimationPrefix(r);var o=a.querySelector("#"+e);if(o){return o}var f=((t=r.ownerDocument)!==null&&t!==void 0?t:document).createElement("style");f.id=e;f.textContent="@".concat(i,"keyframes ").concat(e," { ").concat(n," } @").concat(i,"keyframes ").concat(e,"-alt { ").concat(n," }");a.appendChild(f);return f};var addClassToArray=function(e,n){if(e===void 0){e=[]}if(n!==undefined){var r=Array.isArray(n)?n:[n];return __spreadArray(__spreadArray([],e,true),r,true)}return e};var createAnimation=function(e){var n;var r;var t;var a;var i;var o;var f=[];var u=[];var c=[];var s=false;var v;var l={};var d=[];var m=[];var y={};var p=0;var h=false;var g=false;var E;var P;var S;var A;var C=true;var T=false;var b=true;var w;var k;var x=false;var K=e;var _=[];var I=[];var R=[];var N=[];var D=[];var L=[];var F=[];var O=[];var W=[];var j=[];var H=[];var M=typeof AnimationEffect==="function"||win!==undefined&&typeof win.AnimationEffect==="function";var $=typeof Element==="function"&&typeof Element.prototype.animate==="function"&&M;var q=100;var z=function(){return H};var Z=function(e){D.forEach((function(n){n.destroy(e)}));B(e);N.length=0;D.length=0;f.length=0;X();s=false;b=true;return k};var B=function(e){Y();if(e){ee()}};var G=function(){h=false;g=false;b=true;P=undefined;S=undefined;A=undefined;p=0;T=false;C=true;x=false};var J=function(){return p!==0&&!x};var Q=function(e,n){var r=n.findIndex((function(n){return n.c===e}));if(r>-1){n.splice(r,1)}};var U=function(e,n){R.push({c:e,o:n});return k};var V=function(e,n){var r=(n===null||n===void 0?void 0:n.oneTimeCallback)?I:_;r.push({c:e,o:n});return k};var X=function(){_.length=0;I.length=0;return k};var Y=function(){if($){H.forEach((function(e){e.cancel()}));H.length=0}else{var e=N.slice();raf((function(){e.forEach((function(e){removeStyleProperty(e,"animation-name");removeStyleProperty(e,"animation-duration");removeStyleProperty(e,"animation-timing-function");removeStyleProperty(e,"animation-iteration-count");removeStyleProperty(e,"animation-delay");removeStyleProperty(e,"animation-play-state");removeStyleProperty(e,"animation-fill-mode");removeStyleProperty(e,"animation-direction")}))}))}};var ee=function(){L.forEach((function(e){if(e===null||e===void 0?void 0:e.parentNode){e.parentNode.removeChild(e)}}));L.length=0};var ne=function(e){F.push(e);return k};var re=function(e){O.push(e);return k};var te=function(e){W.push(e);return k};var ae=function(e){j.push(e);return k};var ie=function(e){u=addClassToArray(u,e);return k};var oe=function(e){c=addClassToArray(c,e);return k};var fe=function(e){if(e===void 0){e={}}l=e;return k};var ue=function(e){if(e===void 0){e=[]}for(var n=0,r=e;n<r.length;n++){var t=r[n];l[t]=""}return k};var ce=function(e){d=addClassToArray(d,e);return k};var se=function(e){m=addClassToArray(m,e);return k};var ve=function(e){if(e===void 0){e={}}y=e;return k};var le=function(e){if(e===void 0){e=[]}for(var n=0,r=e;n<r.length;n++){var t=r[n];y[t]=""}return k};var de=function(){if(i!==undefined){return i}if(v){return v.getFill()}return"both"};var me=function(){if(P!==undefined){return P}if(o!==undefined){return o}if(v){return v.getDirection()}return"normal"};var ye=function(){if(h){return"linear"}if(t!==undefined){return t}if(v){return v.getEasing()}return"linear"};var pe=function(){if(g){return 0}if(S!==undefined){return S}if(r!==undefined){return r}if(v){return v.getDuration()}return 0};var he=function(){if(a!==undefined){return a}if(v){return v.getIterations()}return 1};var ge=function(){if(A!==undefined){return A}if(n!==undefined){return n}if(v){return v.getDelay()}return 0};var Ee=function(){return f};var Pe=function(e){o=e;He(true);return k};var Se=function(e){i=e;He(true);return k};var Ae=function(e){n=e;He(true);return k};var Ce=function(e){t=e;He(true);return k};var Te=function(e){if(!$&&e===0){e=1}r=e;He(true);return k};var be=function(e){a=e;He(true);return k};var we=function(e){v=e;return k};var ke=function(e){if(e!=null){if(e.nodeType===1){N.push(e)}else if(e.length>=0){for(var n=0;n<e.length;n++){N.push(e[n])}}else{console.error("Invalid addElement value")}}return k};var xe=function(e){if(e!=null){if(Array.isArray(e)){for(var n=0,r=e;n<r.length;n++){var t=r[n];t.parent(k);D.push(t)}}else{e.parent(k);D.push(e)}}return k};var Ke=function(e){var n=f!==e;f=e;if(n){_e(f)}return k};var _e=function(e){if($){z().forEach((function(n){if(n.effect.setKeyframes){n.effect.setKeyframes(e)}else{var r=new KeyframeEffect(n.effect.target,e,n.effect.getTiming());n.effect=r}}))}else{De()}};var Ie=function(){F.forEach((function(e){return e()}));O.forEach((function(e){return e()}));var e=u;var n=c;var r=l;N.forEach((function(t){var a=t.classList;e.forEach((function(e){return a.add(e)}));n.forEach((function(e){return a.remove(e)}));for(var i in r){if(r.hasOwnProperty(i)){setStyleProperty(t,i,r[i])}}}))};var Re=function(){Ge();W.forEach((function(e){return e()}));j.forEach((function(e){return e()}));var e=C?1:0;var n=d;var r=m;var t=y;N.forEach((function(e){var a=e.classList;n.forEach((function(e){return a.add(e)}));r.forEach((function(e){return a.remove(e)}));for(var i in t){if(t.hasOwnProperty(i)){setStyleProperty(e,i,t[i])}}}));_.forEach((function(n){return n.c(e,k)}));I.forEach((function(n){return n.c(e,k)}));I.length=0;b=true;if(C){T=true}C=true};var Ne=function(){if(p===0){return}p--;if(p===0){Re();if(v){v.animationFinish()}}};var De=function(n){if(n===void 0){n=true}ee();var r=processKeyframes(f);N.forEach((function(t){if(r.length>0){var a=generateKeyframeRules(r);w=e!==undefined?e:generateKeyframeName(a);var i=createKeyframeStylesheet(w,a,t);L.push(i);setStyleProperty(t,"animation-duration","".concat(pe(),"ms"));setStyleProperty(t,"animation-timing-function",ye());setStyleProperty(t,"animation-delay","".concat(ge(),"ms"));setStyleProperty(t,"animation-fill-mode",de());setStyleProperty(t,"animation-direction",me());var o=he()===Infinity?"infinite":he().toString();setStyleProperty(t,"animation-iteration-count",o);setStyleProperty(t,"animation-play-state","paused");if(n){setStyleProperty(t,"animation-name","".concat(i.id,"-alt"))}raf((function(){setStyleProperty(t,"animation-name",i.id||null)}))}}))};var Le=function(){N.forEach((function(e){var n=e.animate(f,{id:K,delay:ge(),duration:pe(),easing:ye(),iterations:he(),fill:de(),direction:me()});n.pause();H.push(n)}));if(H.length>0){H[0].onfinish=function(){Ne()}}};var Fe=function(e){if(e===void 0){e=true}Ie();if(f.length>0){if($){Le()}else{De(e)}}s=true};var Oe=function(e){e=Math.min(Math.max(e,0),.9999);if($){H.forEach((function(n){n.currentTime=n.effect.getComputedTiming().delay+pe()*e;n.pause()}))}else{var n="-".concat(pe()*e,"ms");N.forEach((function(e){if(f.length>0){setStyleProperty(e,"animation-delay",n);setStyleProperty(e,"animation-play-state","paused")}}))}};var We=function(e){H.forEach((function(e){e.effect.updateTiming({delay:ge(),duration:pe(),easing:ye(),iterations:he(),fill:de(),direction:me()})}));if(e!==undefined){Oe(e)}};var je=function(e,n){if(e===void 0){e=true}raf((function(){N.forEach((function(r){setStyleProperty(r,"animation-name",w||null);setStyleProperty(r,"animation-duration","".concat(pe(),"ms"));setStyleProperty(r,"animation-timing-function",ye());setStyleProperty(r,"animation-delay",n!==undefined?"-".concat(n*pe(),"ms"):"".concat(ge(),"ms"));setStyleProperty(r,"animation-fill-mode",de()||null);setStyleProperty(r,"animation-direction",me()||null);var t=he()===Infinity?"infinite":he().toString();setStyleProperty(r,"animation-iteration-count",t);if(e){setStyleProperty(r,"animation-name","".concat(w,"-alt"))}raf((function(){setStyleProperty(r,"animation-name",w||null)}))}))}))};var He=function(e,n,r){if(e===void 0){e=false}if(n===void 0){n=true}if(e){D.forEach((function(t){t.update(e,n,r)}))}if($){We(r)}else{je(n,r)}return k};var Me=function(e,n){if(e===void 0){e=false}D.forEach((function(r){r.progressStart(e,n)}));ze();h=e;if(!s){Fe()}He(false,true,n);return k};var $e=function(e){D.forEach((function(n){n.progressStep(e)}));Oe(e);return k};var qe=function(e,n,r){h=false;D.forEach((function(t){t.progressEnd(e,n,r)}));if(r!==undefined){S=r}T=false;C=true;if(e===0){P=me()==="reverse"?"normal":"reverse";if(P==="reverse"){C=false}if($){He();Oe(1-n)}else{A=(1-n)*pe()*-1;He(false,false)}}else if(e===1){if($){He();Oe(n)}else{A=n*pe()*-1;He(false,false)}}if(e!==undefined){V((function(){S=undefined;P=undefined;A=undefined}),{oneTimeCallback:true});if(!v){Xe()}}return k};var ze=function(){if(s){if($){H.forEach((function(e){e.pause()}))}else{N.forEach((function(e){setStyleProperty(e,"animation-play-state","paused")}))}x=true}};var Ze=function(){D.forEach((function(e){e.pause()}));ze();return k};var Be=function(){E=undefined;Ne()};var Ge=function(){if(E){clearTimeout(E)}};var Je=function(){Ge();raf((function(){N.forEach((function(e){if(f.length>0){setStyleProperty(e,"animation-play-state","running")}}))}));if(f.length===0||N.length===0){Ne()}else{var e=ge()||0;var n=pe()||0;var r=he()||1;if(isFinite(r)){E=setTimeout(Be,e+n*r+q)}animationEnd(N[0],(function(){Ge();raf((function(){Qe();raf(Ne)}))}))}};var Qe=function(){N.forEach((function(e){removeStyleProperty(e,"animation-duration");removeStyleProperty(e,"animation-delay");removeStyleProperty(e,"animation-play-state")}))};var Ue=function(){H.forEach((function(e){e.play()}));if(f.length===0||N.length===0){Ne()}};var Ve=function(){if($){Oe(0);We()}else{je()}};var Xe=function(e){return new Promise((function(n){if(e===null||e===void 0?void 0:e.sync){g=true;V((function(){return g=false}),{oneTimeCallback:true})}if(!s){Fe()}if(T){Ve();T=false}if(b){p=D.length+1;b=false}var r=function(){Q(t,I);n()};var t=function(){Q(r,R);n()};V(t,{oneTimeCallback:true});U(r,{oneTimeCallback:true});D.forEach((function(e){e.play()}));if($){Ue()}else{Je()}x=false}))};var Ye=function(){D.forEach((function(e){e.stop()}));if(s){Y();s=false}G();R.forEach((function(e){return e.c(0,k)}));R.length=0};var en=function(e,n){var r;var t=f[0];if(t!==undefined&&(t.offset===undefined||t.offset===0)){t[e]=n}else{f=__spreadArray([(r={offset:0},r[e]=n,r)],f,true)}return k};var nn=function(e,n){var r;var t=f[f.length-1];if(t!==undefined&&(t.offset===undefined||t.offset===1)){t[e]=n}else{f=__spreadArray(__spreadArray([],f,true),[(r={offset:1},r[e]=n,r)],false)}return k};var rn=function(e,n,r){return en(e,n).to(e,r)};return k={parentAnimation:v,elements:N,childAnimations:D,id:K,animationFinish:Ne,from:en,to:nn,fromTo:rn,parent:we,play:Xe,pause:Ze,stop:Ye,destroy:Z,keyframes:Ke,addAnimation:xe,addElement:ke,update:He,fill:Se,direction:Pe,iterations:be,duration:Te,easing:Ce,delay:Ae,getWebAnimations:z,getKeyframes:Ee,getFill:de,getDirection:me,getDelay:ge,getIterations:he,getEasing:ye,getDuration:pe,afterAddRead:te,afterAddWrite:ae,afterClearStyles:le,afterStyles:ve,afterRemoveClass:se,afterAddClass:ce,beforeAddRead:ne,beforeAddWrite:re,beforeClearStyles:ue,beforeStyles:fe,beforeRemoveClass:oe,beforeAddClass:ie,onFinish:V,isRunning:J,progressStart:Me,progressStep:$e,progressEnd:qe}};export{createAnimation as c};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(n,r,e){if(e||arguments.length===2)for(var t=0,i=r.length,a;t<i;t++){if(a||!(t in r)){if(!a)a=Array.prototype.slice.call(r,0,t);a[t]=r[t]}}return n.concat(a||Array.prototype.slice.call(r))};
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/System.register(["./p-0e94957a.system.js","./p-815c2fba.system.js"],(function(n){"use strict";var r,e;return{setters:[function(n){r=n.w},function(n){e=n.r}],execute:function(){var t;var i=function(n){n.forEach((function(n){for(var r in n){if(n.hasOwnProperty(r)){var e=n[r];if(r==="easing"){var t="animation-timing-function";n[t]=e;delete n[r]}else{var t=a(r);if(t!==r){n[t]=e;delete n[r]}}}}}));return n};var a=function(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()};var f=function(n){if(t===undefined){var r=n.style.animationName!==undefined;var e=n.style.webkitAnimationName!==undefined;t=!r&&e?"-webkit-":""}return t};var o=function(n,r,e){var t=r.startsWith("animation")?f(n):"";n.style.setProperty(t+r,e)};var u=function(n,r){var e=r.startsWith("animation")?f(n):"";n.style.removeProperty(e+r)};var c=function(n,r){var e;var t={passive:true};var i=function(){if(e){e()}};var a=function(e){if(n===e.target){i();r(e)}};if(n){n.addEventListener("webkitAnimationEnd",a,t);n.addEventListener("animationend",a,t);e=function(){n.removeEventListener("webkitAnimationEnd",a,t);n.removeEventListener("animationend",a,t)}}return i};var v=function(n){if(n===void 0){n=[]}return n.map((function(n){var r=n.offset;var e=[];for(var t in n){if(n.hasOwnProperty(t)&&t!=="offset"){e.push("".concat(t,": ").concat(n[t],";"))}}return"".concat(r*100,"% { ").concat(e.join(" ")," }")})).join(" ")};var s=[];var l=function(n){var r=s.indexOf(n);if(r<0){r=s.push(n)-1}return"ion-animation-".concat(r)};var d=function(n){var r=n.getRootNode!==undefined?n.getRootNode():n;return r.head||r};var m=function(n,r,e){var t;var i=d(e);var a=f(e);var o=i.querySelector("#"+n);if(o){return o}var u=((t=e.ownerDocument)!==null&&t!==void 0?t:document).createElement("style");u.id=n;u.textContent="@".concat(a,"keyframes ").concat(n," { ").concat(r," } @").concat(a,"keyframes ").concat(n,"-alt { ").concat(r," }");i.appendChild(u);return u};var h=function(n,r){if(n===void 0){n=[]}if(r!==undefined){var e=Array.isArray(r)?r:[r];return __spreadArray(__spreadArray([],n,true),e,true)}return n};var p=n("c",(function(n){var t;var a;var f;var s;var d;var p;var g=[];var y=[];var E=[];var A=false;var b;var C={};var _=[];var w=[];var T={};var k=0;var S=false;var D=false;var L;var P;var R;var F;var I=true;var N=false;var x=true;var O;var W;var j=false;var K=n;var M=[];var $=[];var q=[];var z=[];var Z=[];var B=[];var G=[];var H=[];var J=[];var Q=[];var U=[];var V=typeof AnimationEffect==="function"||r!==undefined&&typeof r.AnimationEffect==="function";var X=typeof Element==="function"&&typeof Element.prototype.animate==="function"&&V;var Y=100;var nn=function(){return U};var rn=function(n){Z.forEach((function(r){r.destroy(n)}));en(n);z.length=0;Z.length=0;g.length=0;cn();A=false;x=true;return W};var en=function(n){vn();if(n){sn()}};var tn=function(){S=false;D=false;x=true;P=undefined;R=undefined;F=undefined;k=0;N=false;I=true;j=false};var an=function(){return k!==0&&!j};var fn=function(n,r){var e=r.findIndex((function(r){return r.c===n}));if(e>-1){r.splice(e,1)}};var on=function(n,r){q.push({c:n,o:r});return W};var un=function(n,r){var e=(r===null||r===void 0?void 0:r.oneTimeCallback)?$:M;e.push({c:n,o:r});return W};var cn=function(){M.length=0;$.length=0;return W};var vn=function(){if(X){U.forEach((function(n){n.cancel()}));U.length=0}else{var n=z.slice();e((function(){n.forEach((function(n){u(n,"animation-name");u(n,"animation-duration");u(n,"animation-timing-function");u(n,"animation-iteration-count");u(n,"animation-delay");u(n,"animation-play-state");u(n,"animation-fill-mode");u(n,"animation-direction")}))}))}};var sn=function(){B.forEach((function(n){if(n===null||n===void 0?void 0:n.parentNode){n.parentNode.removeChild(n)}}));B.length=0};var ln=function(n){G.push(n);return W};var dn=function(n){H.push(n);return W};var mn=function(n){J.push(n);return W};var hn=function(n){Q.push(n);return W};var pn=function(n){y=h(y,n);return W};var gn=function(n){E=h(E,n);return W};var yn=function(n){if(n===void 0){n={}}C=n;return W};var En=function(n){if(n===void 0){n=[]}for(var r=0,e=n;r<e.length;r++){var t=e[r];C[t]=""}return W};var An=function(n){_=h(_,n);return W};var bn=function(n){w=h(w,n);return W};var Cn=function(n){if(n===void 0){n={}}T=n;return W};var _n=function(n){if(n===void 0){n=[]}for(var r=0,e=n;r<e.length;r++){var t=e[r];T[t]=""}return W};var wn=function(){if(d!==undefined){return d}if(b){return b.getFill()}return"both"};var Tn=function(){if(P!==undefined){return P}if(p!==undefined){return p}if(b){return b.getDirection()}return"normal"};var kn=function(){if(S){return"linear"}if(f!==undefined){return f}if(b){return b.getEasing()}return"linear"};var Sn=function(){if(D){return 0}if(R!==undefined){return R}if(a!==undefined){return a}if(b){return b.getDuration()}return 0};var Dn=function(){if(s!==undefined){return s}if(b){return b.getIterations()}return 1};var Ln=function(){if(F!==undefined){return F}if(t!==undefined){return t}if(b){return b.getDelay()}return 0};var Pn=function(){return g};var Rn=function(n){p=n;Vn(true);return W};var Fn=function(n){d=n;Vn(true);return W};var In=function(n){t=n;Vn(true);return W};var Nn=function(n){f=n;Vn(true);return W};var xn=function(n){if(!X&&n===0){n=1}a=n;Vn(true);return W};var On=function(n){s=n;Vn(true);return W};var Wn=function(n){b=n;return W};var jn=function(n){if(n!=null){if(n.nodeType===1){z.push(n)}else if(n.length>=0){for(var r=0;r<n.length;r++){z.push(n[r])}}else{console.error("Invalid addElement value")}}return W};var Kn=function(n){if(n!=null){if(Array.isArray(n)){for(var r=0,e=n;r<e.length;r++){var t=e[r];t.parent(W);Z.push(t)}}else{n.parent(W);Z.push(n)}}return W};var Mn=function(n){var r=g!==n;g=n;if(r){$n(g)}return W};var $n=function(n){if(X){nn().forEach((function(r){if(r.effect.setKeyframes){r.effect.setKeyframes(n)}else{var e=new KeyframeEffect(r.effect.target,n,r.effect.getTiming());r.effect=e}}))}else{Bn()}};var qn=function(){G.forEach((function(n){return n()}));H.forEach((function(n){return n()}));var n=y;var r=E;var e=C;z.forEach((function(t){var i=t.classList;n.forEach((function(n){return i.add(n)}));r.forEach((function(n){return i.remove(n)}));for(var a in e){if(e.hasOwnProperty(a)){o(t,a,e[a])}}}))};var zn=function(){ir();J.forEach((function(n){return n()}));Q.forEach((function(n){return n()}));var n=I?1:0;var r=_;var e=w;var t=T;z.forEach((function(n){var i=n.classList;r.forEach((function(n){return i.add(n)}));e.forEach((function(n){return i.remove(n)}));for(var a in t){if(t.hasOwnProperty(a)){o(n,a,t[a])}}}));M.forEach((function(r){return r.c(n,W)}));$.forEach((function(r){return r.c(n,W)}));$.length=0;x=true;if(I){N=true}I=true};var Zn=function(){if(k===0){return}k--;if(k===0){zn();if(b){b.animationFinish()}}};var Bn=function(r){if(r===void 0){r=true}sn();var t=i(g);z.forEach((function(i){if(t.length>0){var a=v(t);O=n!==undefined?n:l(a);var f=m(O,a,i);B.push(f);o(i,"animation-duration","".concat(Sn(),"ms"));o(i,"animation-timing-function",kn());o(i,"animation-delay","".concat(Ln(),"ms"));o(i,"animation-fill-mode",wn());o(i,"animation-direction",Tn());var u=Dn()===Infinity?"infinite":Dn().toString();o(i,"animation-iteration-count",u);o(i,"animation-play-state","paused");if(r){o(i,"animation-name","".concat(f.id,"-alt"))}e((function(){o(i,"animation-name",f.id||null)}))}}))};var Gn=function(){z.forEach((function(n){var r=n.animate(g,{id:K,delay:Ln(),duration:Sn(),easing:kn(),iterations:Dn(),fill:wn(),direction:Tn()});r.pause();U.push(r)}));if(U.length>0){U[0].onfinish=function(){Zn()}}};var Hn=function(n){if(n===void 0){n=true}qn();if(g.length>0){if(X){Gn()}else{Bn(n)}}A=true};var Jn=function(n){n=Math.min(Math.max(n,0),.9999);if(X){U.forEach((function(r){r.currentTime=r.effect.getComputedTiming().delay+Sn()*n;r.pause()}))}else{var r="-".concat(Sn()*n,"ms");z.forEach((function(n){if(g.length>0){o(n,"animation-delay",r);o(n,"animation-play-state","paused")}}))}};var Qn=function(n){U.forEach((function(n){n.effect.updateTiming({delay:Ln(),duration:Sn(),easing:kn(),iterations:Dn(),fill:wn(),direction:Tn()})}));if(n!==undefined){Jn(n)}};var Un=function(n,r){if(n===void 0){n=true}e((function(){z.forEach((function(t){o(t,"animation-name",O||null);o(t,"animation-duration","".concat(Sn(),"ms"));o(t,"animation-timing-function",kn());o(t,"animation-delay",r!==undefined?"-".concat(r*Sn(),"ms"):"".concat(Ln(),"ms"));o(t,"animation-fill-mode",wn()||null);o(t,"animation-direction",Tn()||null);var i=Dn()===Infinity?"infinite":Dn().toString();o(t,"animation-iteration-count",i);if(n){o(t,"animation-name","".concat(O,"-alt"))}e((function(){o(t,"animation-name",O||null)}))}))}))};var Vn=function(n,r,e){if(n===void 0){n=false}if(r===void 0){r=true}if(n){Z.forEach((function(t){t.update(n,r,e)}))}if(X){Qn(e)}else{Un(r,e)}return W};var Xn=function(n,r){if(n===void 0){n=false}Z.forEach((function(e){e.progressStart(n,r)}));rr();S=n;if(!A){Hn()}Vn(false,true,r);return W};var Yn=function(n){Z.forEach((function(r){r.progressStep(n)}));Jn(n);return W};var nr=function(n,r,e){S=false;Z.forEach((function(t){t.progressEnd(n,r,e)}));if(e!==undefined){R=e}N=false;I=true;if(n===0){P=Tn()==="reverse"?"normal":"reverse";if(P==="reverse"){I=false}if(X){Vn();Jn(1-r)}else{F=(1-r)*Sn()*-1;Vn(false,false)}}else if(n===1){if(X){Vn();Jn(r)}else{F=r*Sn()*-1;Vn(false,false)}}if(n!==undefined){un((function(){R=undefined;P=undefined;F=undefined}),{oneTimeCallback:true});if(!b){cr()}}return W};var rr=function(){if(A){if(X){U.forEach((function(n){n.pause()}))}else{z.forEach((function(n){o(n,"animation-play-state","paused")}))}j=true}};var er=function(){Z.forEach((function(n){n.pause()}));rr();return W};var tr=function(){L=undefined;Zn()};var ir=function(){if(L){clearTimeout(L)}};var ar=function(){ir();e((function(){z.forEach((function(n){if(g.length>0){o(n,"animation-play-state","running")}}))}));if(g.length===0||z.length===0){Zn()}else{var n=Ln()||0;var r=Sn()||0;var t=Dn()||1;if(isFinite(t)){L=setTimeout(tr,n+r*t+Y)}c(z[0],(function(){ir();e((function(){fr();e(Zn)}))}))}};var fr=function(){z.forEach((function(n){u(n,"animation-duration");u(n,"animation-delay");u(n,"animation-play-state")}))};var or=function(){U.forEach((function(n){n.play()}));if(g.length===0||z.length===0){Zn()}};var ur=function(){if(X){Jn(0);Qn()}else{Un()}};var cr=function(n){return new Promise((function(r){if(n===null||n===void 0?void 0:n.sync){D=true;un((function(){return D=false}),{oneTimeCallback:true})}if(!A){Hn()}if(N){ur();N=false}if(x){k=Z.length+1;x=false}var e=function(){fn(t,$);r()};var t=function(){fn(e,q);r()};un(t,{oneTimeCallback:true});on(e,{oneTimeCallback:true});Z.forEach((function(n){n.play()}));if(X){or()}else{ar()}j=false}))};var vr=function(){Z.forEach((function(n){n.stop()}));if(A){vn();A=false}tn();q.forEach((function(n){return n.c(0,W)}));q.length=0};var sr=function(n,r){var e;var t=g[0];if(t!==undefined&&(t.offset===undefined||t.offset===0)){t[n]=r}else{g=__spreadArray([(e={offset:0},e[n]=r,e)],g,true)}return W};var lr=function(n,r){var e;var t=g[g.length-1];if(t!==undefined&&(t.offset===undefined||t.offset===1)){t[n]=r}else{g=__spreadArray(__spreadArray([],g,true),[(e={offset:1},e[n]=r,e)],false)}return W};var dr=function(n,r,e){return sr(n,r).to(n,e)};return W={parentAnimation:b,elements:z,childAnimations:Z,id:K,animationFinish:Zn,from:sr,to:lr,fromTo:dr,parent:Wn,play:cr,pause:er,stop:vr,destroy:rn,keyframes:Mn,addAnimation:Kn,addElement:jn,update:Vn,fill:Fn,direction:Rn,iterations:On,duration:xn,easing:Nn,delay:In,getWebAnimations:nn,getKeyframes:Pn,getFill:wn,getDirection:Tn,getDelay:Ln,getIterations:Dn,getEasing:kn,getDuration:Sn,afterAddRead:mn,afterAddWrite:hn,afterClearStyles:_n,afterStyles:Cn,afterRemoveClass:bn,afterAddClass:An,beforeAddRead:ln,beforeAddWrite:dn,beforeClearStyles:En,beforeStyles:yn,beforeRemoveClass:gn,beforeAddClass:pn,onFinish:un,isRunning:an,progressStart:Xn,progressStep:Yn,progressEnd:nr}}))}}}));
|
package/dist/ionic/p-0a39673e.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{MENU_BACK_BUTTON_PRIORITY as t}from"./p-185e427e.js";import{c as n}from"./p-63eb0acd.js";import{b as r}from"./p-6b7e74ba.js";import{c as e}from"./p-446230d7.js";const a=t=>e().duration(t?400:300),s=t=>{let n,s;const o=t.width+8,i=e(),c=e();t.isEndSide?(n=o+"px",s="0px"):(n=-o+"px",s="0px"),i.addElement(t.menuInnerEl).fromTo("transform",`translateX(${n})`,`translateX(${s})`);const p="ios"===r(t),u=p?.2:.25;return c.addElement(t.backdropEl).fromTo("opacity",.01,u),a(p).addAnimation([i,c])},o=t=>{let n,s;const o=r(t),i=t.width;t.isEndSide?(n=-i+"px",s=i+"px"):(n=i+"px",s=-i+"px");const c=e().addElement(t.menuInnerEl).fromTo("transform",`translateX(${s})`,"translateX(0px)"),p=e().addElement(t.contentEl).fromTo("transform","translateX(0px)",`translateX(${n})`),u=e().addElement(t.backdropEl).fromTo("opacity",.01,.32);return a("ios"===o).addAnimation([c,p,u])},i=t=>{const n=r(t),s=t.width*(t.isEndSide?-1:1)+"px",o=e().addElement(t.contentEl).fromTo("transform","translateX(0px)",`translateX(${s})`);return a("ios"===n).addAnimation(o)},c=(()=>{const r=new Map,e=[],a=async t=>{if(await y(),"start"===t||"end"===t){return w((n=>n.side===t&&!n.disabled))||w((n=>n.side===t))}if(null!=t)return w((n=>n.menuId===t));return w((t=>!t.disabled))||(e.length>0?e[0].el:void 0)},c=async()=>(await y(),m()),p=(t,n)=>{r.set(t,n)},u=t=>{const n=t.side;e.filter((r=>r.side===n&&r!==t)).forEach((t=>t.disabled=!0))},m=()=>w((t=>t._isOpen)),l=()=>e.some((t=>t.isAnimating)),w=t=>{const n=e.find(t);if(void 0!==n)return n.el},y=()=>Promise.all(Array.from(document.querySelectorAll("ion-menu")).map((t=>new Promise((r=>n(t,r))))));return p("reveal",i),p("push",o),p("overlay",s),"undefined"!=typeof document&&document.addEventListener("ionBackButton",(n=>{const r=m();r&&n.detail.register(t,(()=>r.close()))})),{registerAnimation:p,get:a,getMenus:async()=>(await y(),e.map((t=>t.el))),getOpen:c,isEnabled:async t=>{const n=await a(t);return!!n&&!n.disabled},swipeGesture:async(t,n)=>{const r=await a(n);return r&&(r.swipeGesture=t),r},isAnimating:async()=>(await y(),l()),isOpen:async t=>{if(null!=t){const n=await a(t);return void 0!==n&&n.isOpen()}return void 0!==await c()},enable:async(t,n)=>{const r=await a(n);return r&&(r.disabled=!t),r},toggle:async t=>{const n=await a(t);return!!n&&n.toggle()},close:async t=>{const n=await(void 0!==t?a(t):c());return void 0!==n&&n.close()},open:async t=>{const n=await a(t);return!!n&&n.open()},_getOpenSync:m,_createAnimation:(t,n)=>{const e=r.get(t);if(!e)throw new Error("animation not registered");return e(n)},_register:t=>{e.indexOf(t)<0&&(t.disabled||u(t),e.push(t))},_unregister:t=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},_setOpen:async(t,n,r)=>{if(l())return!1;if(n){const n=await c();n&&t.el!==n&&await n.setOpen(!1,!1)}return t._setOpen(n,r)},_setActiveMenu:u}})();export{c as m}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,d as e,h as i,H as n,f as o}from"./p-70ab8b73.js";import{g as s}from"./p-7c2bac85.js";import{d as r}from"./p-b347cfd1.js";import{G as a}from"./p-e0b06b65.js";import{p as h,i as d,o as l,l as u}from"./p-63eb0acd.js";import{m as c}from"./p-0a39673e.js";import{q as m}from"./p-f9015336.js";import{c as p,b}from"./p-6b7e74ba.js";import{c as f,h as g}from"./p-1d072d3d.js";import{u as v,v as x}from"./p-0a87858b.js";import"./p-185e427e.js";import"./p-446230d7.js";import"./p-b287ab05.js";import"./p-1b8e1d03.js";const w='[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])',y=class{constructor(i){t(this,i),this.ionWillOpen=e(this,"ionWillOpen",7),this.ionWillClose=e(this,"ionWillClose",7),this.ionDidOpen=e(this,"ionDidOpen",7),this.ionDidClose=e(this,"ionDidClose",7),this.ionMenuChange=e(this,"ionMenuChange",7),this.lastOnEnd=0,this.blocker=a.createBlocker({disableScroll:!0}),this.didLoad=!1,this.operationCancelled=!1,this.isAnimating=!1,this._isOpen=!1,this.inheritedAttributes={},this.handleFocus=t=>{const e=m(document);e&&!e.contains(this.el)||this.trapKeyboardFocus(t,document)},this.isPaneVisible=!1,this.isEndSide=!1,this.contentId=void 0,this.menuId=void 0,this.type=void 0,this.disabled=!1,this.side="start",this.swipeGesture=!0,this.maxEdgeStart=50}typeChanged(t,e){const i=this.contentEl;i&&(void 0!==e&&i.classList.remove(`menu-content-${e}`),i.classList.add(`menu-content-${t}`),i.removeAttribute("style")),this.menuInnerEl&&this.menuInnerEl.removeAttribute("style"),this.animation=void 0}disabledChanged(){this.updateState(),this.ionMenuChange.emit({disabled:this.disabled,open:this._isOpen})}sideChanged(){this.isEndSide=h(this.side),this.animation=void 0}swipeGestureChanged(){this.updateState()}async connectedCallback(){"undefined"!=typeof customElements&&null!=customElements&&await customElements.whenDefined("ion-menu"),void 0===this.type&&(this.type=p.get("menuType","overlay"));const t=void 0!==this.contentId?document.getElementById(this.contentId):null;null!==t?(this.el.contains(t)&&console.error('Menu: "contentId" should refer to the main view\'s ion-content, not the ion-content inside of the ion-menu.'),this.contentEl=t,t.classList.add("menu-content"),this.typeChanged(this.type,void 0),this.sideChanged(),c._register(this),this.menuChanged(),this.gesture=(await import("./p-8b1be026.js")).createGesture({el:document,gestureName:"menu-swipe",gesturePriority:30,threshold:10,blurOnStart:!0,canStart:t=>this.canStart(t),onWillStart:()=>this.onWillStart(),onStart:()=>this.onStart(),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.updateState()):console.error('Menu: must have a "content" element to listen for drag events on.')}componentWillLoad(){this.inheritedAttributes=d(this.el)}async componentDidLoad(){this.didLoad=!0,this.menuChanged(),this.updateState()}menuChanged(){this.didLoad&&this.ionMenuChange.emit({disabled:this.disabled,open:this._isOpen})}async disconnectedCallback(){await this.close(!1),this.blocker.destroy(),c._unregister(this),this.animation&&this.animation.destroy(),this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation=void 0,this.contentEl=void 0}onSplitPaneChanged(t){this.isPaneVisible=t.detail.isPane(this.el),this.updateState()}onBackdropClick(t){this._isOpen&&this.lastOnEnd<t.timeStamp-100&&t.composedPath&&!t.composedPath().includes(this.menuInnerEl)&&(t.preventDefault(),t.stopPropagation(),this.close())}onKeydown(t){"Escape"===t.key&&this.close()}isOpen(){return Promise.resolve(this._isOpen)}isActive(){return Promise.resolve(this._isActive())}open(t=!0){return this.setOpen(!0,t)}close(t=!0){return this.setOpen(!1,t)}toggle(t=!0){return this.setOpen(!this._isOpen,t)}setOpen(t,e=!0){return c._setOpen(this,t,e)}focusFirstDescendant(){const{el:t}=this,e=t.querySelector(w);e?e.focus():t.focus()}focusLastDescendant(){const{el:t}=this,e=Array.from(t.querySelectorAll(w)),i=e.length>0?e[e.length-1]:null;i?i.focus():t.focus()}trapKeyboardFocus(t,e){const i=t.target;i&&(this.el.contains(i)?this.lastFocus=i:(this.focusFirstDescendant(),this.lastFocus===e.activeElement&&this.focusLastDescendant()))}async _setOpen(t,e=!0){return!(!this._isActive()||this.isAnimating||t===this._isOpen||(this.beforeAnimation(t),await this.loadAnimation(),await this.startAnimation(t,e),this.operationCancelled?(this.operationCancelled=!1,1):(this.afterAnimation(t),0)))}async loadAnimation(){const t=this.menuInnerEl.offsetWidth,e=h(this.side);t===this.width&&void 0!==this.animation&&e===this.isEndSide||(this.width=t,this.isEndSide=e,this.animation&&(this.animation.destroy(),this.animation=void 0),this.animation=await c._createAnimation(this.type,this),p.getBoolean("animated",!0)||this.animation.duration(0),this.animation.fill("both"))}async startAnimation(t,e){const i=!t,n=b(this),o="ios"===n?"cubic-bezier(0.32,0.72,0,1)":"cubic-bezier(0.0,0.0,0.2,1)",s="ios"===n?"cubic-bezier(1, 0, 0.68, 0.28)":"cubic-bezier(0.4, 0, 0.6, 1)",r=this.animation.direction(i?"reverse":"normal").easing(i?s:o);e?await r.play():r.play({sync:!0}),"reverse"===r.getDirection()&&r.direction("normal")}_isActive(){return!this.disabled&&!this.isPaneVisible}canSwipe(){return this.swipeGesture&&!this.isAnimating&&this._isActive()}canStart(t){return!(document.querySelector("ion-modal.show-modal")||!this.canSwipe())&&(!!this._isOpen||!c._getOpenSync()&&z(window,t.currentX,this.isEndSide,this.maxEdgeStart))}onWillStart(){return this.beforeAnimation(!this._isOpen),this.loadAnimation()}onStart(){this.isAnimating&&this.animation?this.animation.progressStart(!0,this._isOpen?1:0):l(!1,"isAnimating has to be true")}onMove(t){if(!this.isAnimating||!this.animation)return void l(!1,"isAnimating has to be true");const e=k(t.deltaX,this._isOpen,this.isEndSide)/this.width;this.animation.progressStep(this._isOpen?1-e:e)}onEnd(t){if(!this.isAnimating||!this.animation)return void l(!1,"isAnimating has to be true");const e=this._isOpen,i=this.isEndSide,n=k(t.deltaX,e,i),o=this.width,r=n/o,a=t.velocityX,h=o/2,d=a>=0&&(a>.2||t.deltaX>h),c=a<=0&&(a<-.2||t.deltaX<-h),m=e?i?d:c:i?c:d;let p=!e&&m;e&&!m&&(p=!0),this.lastOnEnd=t.currentTime;let b=m?.001:-.001;b+=s([0,0],[.4,0],[.6,1],[1,1],u(0,r<0?.01:r,.9999))[0]||0;const f=this._isOpen?!m:m;this.animation.easing("cubic-bezier(0.4, 0.0, 0.6, 1)").onFinish((()=>this.afterAnimation(p)),{oneTimeCallback:!0}).progressEnd(f?1:0,this._isOpen?1-b:b,300)}beforeAnimation(t){l(!this.isAnimating,"_before() should not be called while animating"),this.el.classList.add(C),this.el.setAttribute("tabindex","0"),this.backdropEl&&this.backdropEl.classList.add(j),this.contentEl&&(this.contentEl.classList.add(A),this.contentEl.setAttribute("aria-hidden","true")),this.blocker.block(),this.isAnimating=!0,t?this.ionWillOpen.emit():this.ionWillClose.emit()}afterAnimation(t){var e;this._isOpen=t,this.isAnimating=!1,this._isOpen||this.blocker.unblock(),t?(this.ionDidOpen.emit(),(null===(e=document.activeElement)||void 0===e?void 0:e.closest("ion-menu"))!==this.el&&this.el.focus(),document.addEventListener("focus",this.handleFocus,!0)):(this.el.classList.remove(C),this.el.removeAttribute("tabindex"),this.contentEl&&(this.contentEl.classList.remove(A),this.contentEl.removeAttribute("aria-hidden")),this.backdropEl&&this.backdropEl.classList.remove(j),this.animation&&this.animation.stop(),this.ionDidClose.emit(),document.removeEventListener("focus",this.handleFocus,!0))}updateState(){const t=this._isActive();this.gesture&&this.gesture.enable(t&&this.swipeGesture),t||(this.isAnimating&&(this.operationCancelled=!0),this.afterAnimation(!1)),(null==r?void 0:r.contains(this.el))&&(this.disabled||c._setActiveMenu(this))}render(){const{type:t,disabled:e,isPaneVisible:o,inheritedAttributes:s,side:r}=this,a=b(this);return i(n,{role:"navigation","aria-label":s["aria-label"]||"menu",class:{[a]:!0,[`menu-type-${t}`]:!0,"menu-enabled":!e,[`menu-side-${r}`]:!0,"menu-pane-visible":o}},i("div",{class:"menu-inner",part:"container",ref:t=>this.menuInnerEl=t},i("slot",null)),i("ion-backdrop",{ref:t=>this.backdropEl=t,class:"menu-backdrop",tappable:!1,stopPropagation:!1,part:"backdrop"}))}get el(){return o(this)}static get watchers(){return{type:["typeChanged"],disabled:["disabledChanged"],side:["sideChanged"],swipeGesture:["swipeGestureChanged"]}}},k=(t,e,i)=>Math.max(0,e!==i?-t:t),z=(t,e,i,n)=>i?e>=t.innerWidth-n:e<=n,C="show-menu",j="show-backdrop",A="menu-content-open";y.style={ios:":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}",md:":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-overlay) .menu-inner{-webkit-box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18);box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}"};const S=async t=>{const e=await c.get(t);return!(!e||!await e.isActive())},_=class{constructor(e){t(this,e),this.inheritedAttributes={},this.onClick=async()=>c.toggle(this.menu),this.visible=!1,this.color=void 0,this.disabled=!1,this.menu=void 0,this.autoHide=!0,this.type="button"}componentWillLoad(){this.inheritedAttributes=d(this.el)}componentDidLoad(){this.visibilityChanged()}async visibilityChanged(){this.visible=await S(this.menu)}render(){const{color:t,disabled:e,inheritedAttributes:o}=this,s=b(this),r=p.get("menuIcon","ios"===s?v:x),a=this.autoHide&&!this.visible,h={type:this.type},d=o["aria-label"]||"menu";return i(n,{onClick:this.onClick,"aria-disabled":e?"true":null,"aria-hidden":a?"true":null,class:f(t,{[s]:!0,button:!0,"menu-button-hidden":a,"menu-button-disabled":e,"in-toolbar":g("ion-toolbar",this.el),"in-toolbar-color":g("ion-toolbar[color]",this.el),"ion-activatable":!0,"ion-focusable":!0})},i("button",Object.assign({},h,{disabled:e,class:"button-native",part:"native","aria-label":d}),i("span",{class:"button-inner"},i("slot",null,i("ion-icon",{part:"icon",icon:r,mode:s,lazy:!1,"aria-hidden":"true"}))),"md"===s&&i("ion-ripple-effect",{type:"unbounded"})))}get el(){return o(this)}};_.style={ios:':host{--background:transparent;--color-focused:currentColor;--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);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;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-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);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-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;width:100%;height:100%;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-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;width:100%;height:100%;z-index:1}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}@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, 0)}}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-focused:currentColor;--background-focused-opacity:.1;--border-radius:4px;--color:var(--ion-color-primary, #3880ff);--padding-start:5px;--padding-end:5px;height:32px;font-size:31px}:host(.ion-activated){opacity:0.4}@media (any-hover: hover){:host(:hover){opacity:0.6}}',md:':host{--background:transparent;--color-focused:currentColor;--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);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;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-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);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-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;width:100%;height:100%;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-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;width:100%;height:100%;z-index:1}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}@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, 0)}}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-focused:currentColor;--background-focused-opacity:.12;--background-hover:currentColor;--background-hover-opacity:.04;--border-radius:50%;--color:initial;--padding-start:8px;--padding-end:8px;width:48px;height:48px;font-size:24px}:host(.ion-color.ion-focused)::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}'};const O=class{constructor(e){t(this,e),this.onClick=()=>c.toggle(this.menu),this.visible=!1,this.menu=void 0,this.autoHide=!0}connectedCallback(){this.visibilityChanged()}async visibilityChanged(){this.visible=await S(this.menu)}render(){const t=b(this),e=this.autoHide&&!this.visible;return i(n,{onClick:this.onClick,"aria-hidden":e?"true":null,class:{[t]:!0,"menu-toggle-hidden":e}},i("slot",null))}};O.style=":host(.menu-toggle-hidden){display:none}";export{y as ion_menu,_ as ion_menu_button,O as ion_menu_toggle}
|
package/dist/ionic/p-1a6c0442.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{c as o}from"./p-446230d7.js";import{g as t}from"./p-37a0b769.js";import"./p-b347cfd1.js";import"./p-63eb0acd.js";import"./p-70ab8b73.js";const i=(i,r)=>{var a,n,s;const p="40px",c="back"===r.direction,e=r.leavingEl,b=t(r.enteringEl),l=b.querySelector("ion-toolbar"),m=o();if(m.addElement(b).fill("both").beforeRemoveClass("ion-page-invisible"),c?m.duration((null!==(a=r.duration)&&void 0!==a?a:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):m.duration((null!==(n=r.duration)&&void 0!==n?n:0)||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform",`translateY(${p})`,"translateY(0px)").fromTo("opacity",.01,1),l){const t=o();t.addElement(l),m.addAnimation(t)}if(e&&c){m.duration((null!==(s=r.duration)&&void 0!==s?s:0)||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const i=o();i.addElement(t(e)).onFinish((o=>{1===o&&i.elements.length>0&&i.elements[0].style.setProperty("display","none")})).fromTo("transform","translateY(0px)",`translateY(${p})`).fromTo("opacity",1,0),m.addAnimation(i)}return m};export{i as mdTransitionAnimation}
|
package/dist/ionic/p-37a0b769.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{w as i,B as a}from"./p-70ab8b73.js";import{r as n}from"./p-63eb0acd.js";const e="ionViewWillEnter",o="ionViewDidEnter",s="ionViewWillLeave",t="ionViewDidLeave",r="ionViewWillUnload",c=a=>new Promise(((n,e)=>{i((()=>{p(a),w(a).then((i=>{i.animation&&i.animation.destroy(),l(a),n(i)}),(i=>{l(a),e(i)}))}))})),p=i=>{const a=i.enteringEl,n=i.leavingEl;k(a,n,i.direction),i.showGoBack?a.classList.add("can-go-back"):a.classList.remove("can-go-back"),j(a,!1),a.style.setProperty("pointer-events","none"),n&&(j(n,!1),n.style.setProperty("pointer-events","none"))},w=async i=>{const n=await d(i);return n&&a.isBrowser?m(n,i):v(i)},l=i=>{const a=i.enteringEl,n=i.leavingEl;a.classList.remove("ion-page-invisible"),a.style.removeProperty("pointer-events"),void 0!==n&&(n.classList.remove("ion-page-invisible"),n.style.removeProperty("pointer-events"))},d=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await import("./p-f70372cf.js")).iosTransitionAnimation:(await import("./p-1a6c0442.js")).mdTransitionAnimation},m=async(i,a)=>{await u(a,!0);const n=i(a.baseEl,a);g(a.enteringEl,a.leavingEl);const e=await f(n,a);return a.progressCallback&&a.progressCallback(void 0),e&&y(a.enteringEl,a.leavingEl),{hasCompleted:e,animation:n}},v=async i=>{const a=i.enteringEl,n=i.leavingEl;return await u(i,!1),g(a,n),y(a,n),{hasCompleted:!0}},u=async(i,a)=>{(void 0!==i.deepWait?i.deepWait:a)&&await Promise.all([V(i.enteringEl),V(i.leavingEl)]),await b(i.viewIsReady,i.enteringEl)},b=async(i,a)=>{i&&await i(a)},f=(i,a)=>{const n=a.progressCallback,e=new Promise((a=>{i.onFinish((i=>a(1===i)))}));return n?(i.progressStart(!0),n(i)):i.play(),e},g=(i,a)=>{h(a,s),h(i,e)},y=(i,a)=>{h(i,o),h(a,t)},h=(i,a)=>{if(i){const n=new CustomEvent(a,{bubbles:!1,cancelable:!1});i.dispatchEvent(n)}},P=()=>new Promise((i=>n((()=>n((()=>i())))))),V=async i=>{const a=i;if(a){if(null!=a.componentOnReady){if(null!=await a.componentOnReady())return}else if(null!=a.__registerHost){const i=new Promise((i=>n(i)));return void await i}await Promise.all(Array.from(a.children).map(V))}},j=(i,a)=>{a?(i.setAttribute("aria-hidden","true"),i.classList.add("ion-page-hidden")):(i.hidden=!1,i.removeAttribute("aria-hidden"),i.classList.remove("ion-page-hidden"))},k=(i,a,n)=>{void 0!==i&&(i.style.zIndex="back"===n?"99":"101"),void 0!==a&&(a.style.zIndex="100")},C=i=>{if(i.classList.contains("ion-page"))return i;return i.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||i};export{e as L,o as a,s as b,t as c,r as d,V as e,C as g,h as l,j as s,c as t,P as w}
|
package/dist/ionic/p-446230d7.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{w as n}from"./p-b347cfd1.js";import{r as i}from"./p-63eb0acd.js";let t;const o=n=>(void 0===t&&(t=void 0===n.style.animationName&&void 0!==n.style.webkitAnimationName?"-webkit-":""),t),e=(n,i,t)=>{const e=i.startsWith("animation")?o(n):"";n.style.setProperty(e+i,t)},a=(n,i)=>{const t=i.startsWith("animation")?o(n):"";n.style.removeProperty(t+i)},s=[],r=(n=[],i)=>{if(void 0!==i){const t=Array.isArray(i)?i:[i];return[...n,...t]}return n},l=t=>{let l,d,m,f,c,u,v,y,p,g,$,b,A,k=[],C=[],E=[],T=!1,h={},w=[],S=[],R={},F=0,D=!1,W=!1,j=!0,I=!1,K=!0,M=!1;const x=t,z=[],P=[],Z=[],q=[],B=[],G=[],H=[],J=[],L=[],N=[],O=[],Q="function"==typeof AnimationEffect||void 0!==n&&"function"==typeof n.AnimationEffect,U="function"==typeof Element&&"function"==typeof Element.prototype.animate&&Q,V=()=>O,X=(n,i)=>{const t=i.findIndex((i=>i.c===n));t>-1&&i.splice(t,1)},Y=(n,i)=>(((null==i?void 0:i.oneTimeCallback)?P:z).push({c:n,o:i}),A),_=()=>{if(U)O.forEach((n=>{n.cancel()})),O.length=0;else{const n=q.slice();i((()=>{n.forEach((n=>{a(n,"animation-name"),a(n,"animation-duration"),a(n,"animation-timing-function"),a(n,"animation-iteration-count"),a(n,"animation-delay"),a(n,"animation-play-state"),a(n,"animation-fill-mode"),a(n,"animation-direction")}))}))}},nn=()=>{G.forEach((n=>{(null==n?void 0:n.parentNode)&&n.parentNode.removeChild(n)})),G.length=0},tn=()=>void 0!==c?c:v?v.getFill():"both",on=()=>void 0!==p?p:void 0!==u?u:v?v.getDirection():"normal",en=()=>D?"linear":void 0!==m?m:v?v.getEasing():"linear",an=()=>W?0:void 0!==g?g:void 0!==d?d:v?v.getDuration():0,sn=()=>void 0!==f?f:v?v.getIterations():1,rn=()=>void 0!==$?$:void 0!==l?l:v?v.getDelay():0,ln=()=>{0!==F&&(F--,0===F&&((()=>{gn(),L.forEach((n=>n())),N.forEach((n=>n()));const n=j?1:0,i=w,t=S,o=R;q.forEach((n=>{const a=n.classList;i.forEach((n=>a.add(n))),t.forEach((n=>a.remove(n)));for(const i in o)o.hasOwnProperty(i)&&e(n,i,o[i])})),z.forEach((i=>i.c(n,A))),P.forEach((i=>i.c(n,A))),P.length=0,K=!0,j&&(I=!0),j=!0})(),v&&v.animationFinish()))},dn=(n=!0)=>{nn();const a=((r=k).forEach((n=>{for(const i in n)if(n.hasOwnProperty(i)){const t=n[i];if("easing"===i)n["animation-timing-function"]=t,delete n[i];else{const o=i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();o!==i&&(n[o]=t,delete n[i])}}})),r);var r;q.forEach((r=>{if(a.length>0){const l=((n=[])=>n.map((n=>{const i=n.offset,t=[];for(const i in n)n.hasOwnProperty(i)&&"offset"!==i&&t.push(`${i}: ${n[i]};`);return`${100*i}% { ${t.join(" ")} }`})).join(" "))(a);b=void 0!==t?t:(n=>{let i=s.indexOf(n);return i<0&&(i=s.push(n)-1),`ion-animation-${i}`})(l);const d=((n,i,t)=>{var e;const a=(n=>{const i=void 0!==n.getRootNode?n.getRootNode():n;return i.head||i})(t),s=o(t),r=a.querySelector("#"+n);if(r)return r;const l=(null!==(e=t.ownerDocument)&&void 0!==e?e:document).createElement("style");return l.id=n,l.textContent=`@${s}keyframes ${n} { ${i} } @${s}keyframes ${n}-alt { ${i} }`,a.appendChild(l),l})(b,l,r);G.push(d),e(r,"animation-duration",`${an()}ms`),e(r,"animation-timing-function",en()),e(r,"animation-delay",`${rn()}ms`),e(r,"animation-fill-mode",tn()),e(r,"animation-direction",on());const m=sn()===1/0?"infinite":sn().toString();e(r,"animation-iteration-count",m),e(r,"animation-play-state","paused"),n&&e(r,"animation-name",`${d.id}-alt`),i((()=>{e(r,"animation-name",d.id||null)}))}}))},mn=(n=!0)=>{(()=>{H.forEach((n=>n())),J.forEach((n=>n()));const n=C,i=E,t=h;q.forEach((o=>{const a=o.classList;n.forEach((n=>a.add(n))),i.forEach((n=>a.remove(n)));for(const n in t)t.hasOwnProperty(n)&&e(o,n,t[n])}))})(),k.length>0&&(U?(q.forEach((n=>{const i=n.animate(k,{id:x,delay:rn(),duration:an(),easing:en(),iterations:sn(),fill:tn(),direction:on()});i.pause(),O.push(i)})),O.length>0&&(O[0].onfinish=()=>{ln()})):dn(n)),T=!0},fn=n=>{if(n=Math.min(Math.max(n,0),.9999),U)O.forEach((i=>{i.currentTime=i.effect.getComputedTiming().delay+an()*n,i.pause()}));else{const i=`-${an()*n}ms`;q.forEach((n=>{k.length>0&&(e(n,"animation-delay",i),e(n,"animation-play-state","paused"))}))}},cn=n=>{O.forEach((n=>{n.effect.updateTiming({delay:rn(),duration:an(),easing:en(),iterations:sn(),fill:tn(),direction:on()})})),void 0!==n&&fn(n)},un=(n=!0,t)=>{i((()=>{q.forEach((o=>{e(o,"animation-name",b||null),e(o,"animation-duration",`${an()}ms`),e(o,"animation-timing-function",en()),e(o,"animation-delay",void 0!==t?`-${t*an()}ms`:`${rn()}ms`),e(o,"animation-fill-mode",tn()||null),e(o,"animation-direction",on()||null);const a=sn()===1/0?"infinite":sn().toString();e(o,"animation-iteration-count",a),n&&e(o,"animation-name",`${b}-alt`),i((()=>{e(o,"animation-name",b||null)}))}))}))},vn=(n=!1,i=!0,t)=>(n&&B.forEach((o=>{o.update(n,i,t)})),U?cn(t):un(i,t),A),yn=()=>{T&&(U?O.forEach((n=>{n.pause()})):q.forEach((n=>{e(n,"animation-play-state","paused")})),M=!0)},pn=()=>{y=void 0,ln()},gn=()=>{y&&clearTimeout(y)},$n=n=>new Promise((t=>{(null==n?void 0:n.sync)&&(W=!0,Y((()=>W=!1),{oneTimeCallback:!0})),T||mn(),I&&(U?(fn(0),cn()):un(),I=!1),K&&(F=B.length+1,K=!1);const o=()=>{X(s,P),t()},s=()=>{X(o,Z),t()};Y(s,{oneTimeCallback:!0}),Z.push({c:o,o:{oneTimeCallback:!0}}),B.forEach((n=>{n.play()})),U?(O.forEach((n=>{n.play()})),0!==k.length&&0!==q.length||ln()):(()=>{if(gn(),i((()=>{q.forEach((n=>{k.length>0&&e(n,"animation-play-state","running")}))})),0===k.length||0===q.length)ln();else{const n=rn()||0,t=an()||0,o=sn()||1;isFinite(o)&&(y=setTimeout(pn,n+t*o+100)),(n=>{let t;const o={passive:!0},e=o=>{n===o.target&&(t&&t(),gn(),i((()=>{q.forEach((n=>{a(n,"animation-duration"),a(n,"animation-delay"),a(n,"animation-play-state")})),i(ln)})))};n&&(n.addEventListener("webkitAnimationEnd",e,o),n.addEventListener("animationend",e,o),t=()=>{n.removeEventListener("webkitAnimationEnd",e,o),n.removeEventListener("animationend",e,o)})})(q[0])}})(),M=!1})),bn=(n,i)=>{const t=k[0];return void 0===t||void 0!==t.offset&&0!==t.offset?k=[{offset:0,[n]:i},...k]:t[n]=i,A};return A={parentAnimation:v,elements:q,childAnimations:B,id:x,animationFinish:ln,from:bn,to:(n,i)=>{const t=k[k.length-1];return void 0===t||void 0!==t.offset&&1!==t.offset?k=[...k,{offset:1,[n]:i}]:t[n]=i,A},fromTo:(n,i,t)=>bn(n,i).to(n,t),parent:n=>(v=n,A),play:$n,pause:()=>(B.forEach((n=>{n.pause()})),yn(),A),stop:()=>{B.forEach((n=>{n.stop()})),T&&(_(),T=!1),D=!1,W=!1,K=!0,p=void 0,g=void 0,$=void 0,F=0,I=!1,j=!0,M=!1,Z.forEach((n=>n.c(0,A))),Z.length=0},destroy:n=>(B.forEach((i=>{i.destroy(n)})),(n=>{_(),n&&nn()})(n),q.length=0,B.length=0,k.length=0,z.length=0,P.length=0,T=!1,K=!0,A),keyframes:n=>{const i=k!==n;return k=n,i&&(n=>{U?V().forEach((i=>{if(i.effect.setKeyframes)i.effect.setKeyframes(n);else{const t=new KeyframeEffect(i.effect.target,n,i.effect.getTiming());i.effect=t}})):dn()})(k),A},addAnimation:n=>{if(null!=n)if(Array.isArray(n))for(const i of n)i.parent(A),B.push(i);else n.parent(A),B.push(n);return A},addElement:n=>{if(null!=n)if(1===n.nodeType)q.push(n);else if(n.length>=0)for(let i=0;i<n.length;i++)q.push(n[i]);else console.error("Invalid addElement value");return A},update:vn,fill:n=>(c=n,vn(!0),A),direction:n=>(u=n,vn(!0),A),iterations:n=>(f=n,vn(!0),A),duration:n=>(U||0!==n||(n=1),d=n,vn(!0),A),easing:n=>(m=n,vn(!0),A),delay:n=>(l=n,vn(!0),A),getWebAnimations:V,getKeyframes:()=>k,getFill:tn,getDirection:on,getDelay:rn,getIterations:sn,getEasing:en,getDuration:an,afterAddRead:n=>(L.push(n),A),afterAddWrite:n=>(N.push(n),A),afterClearStyles:(n=[])=>{for(const i of n)R[i]="";return A},afterStyles:(n={})=>(R=n,A),afterRemoveClass:n=>(S=r(S,n),A),afterAddClass:n=>(w=r(w,n),A),beforeAddRead:n=>(H.push(n),A),beforeAddWrite:n=>(J.push(n),A),beforeClearStyles:(n=[])=>{for(const i of n)h[i]="";return A},beforeStyles:(n={})=>(h=n,A),beforeRemoveClass:n=>(E=r(E,n),A),beforeAddClass:n=>(C=r(C,n),A),onFinish:Y,isRunning:()=>0!==F&&!M,progressStart:(n=!1,i)=>(B.forEach((t=>{t.progressStart(n,i)})),yn(),D=n,T||mn(),vn(!1,!0,i),A),progressStep:n=>(B.forEach((i=>{i.progressStep(n)})),fn(n),A),progressEnd:(n,i,t)=>(D=!1,B.forEach((o=>{o.progressEnd(n,i,t)})),void 0!==t&&(g=t),I=!1,j=!0,0===n?(p="reverse"===on()?"normal":"reverse","reverse"===p&&(j=!1),U?(vn(),fn(1-i)):($=(1-i)*an()*-1,vn(!1,!1))):1===n&&(U?(vn(),fn(i)):($=i*an()*-1,vn(!1,!1))),void 0!==n&&(Y((()=>{g=void 0,p=void 0,$=void 0}),{oneTimeCallback:!0}),v||$n()),A)}};export{l as c}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,d as o,w as n,h as e,H as i,f as r,i as a}from"./p-70ab8b73.js";import{i as s}from"./p-6dbfe5d4.js";import{c,h as l}from"./p-1d072d3d.js";import{b as d}from"./p-6b7e74ba.js";import{a as h,b,k as g}from"./p-63eb0acd.js";const m=class{constructor(n){t(this,n),this.ionChange=o(this,"ionChange",7),this.ionSelect=o(this,"ionSelect",7),this.ionStyle=o(this,"ionStyle",7),this.onClick=t=>{const o=t.target,n=this.checked;"ION-SEGMENT"!==o.tagName&&(this.value=o.value,o!==n&&this.emitValueChange(),!this.scrollable&&this.swipeGesture||(n?this.checkButton(n,o):this.setCheckedClasses()))},this.getSegmentButton=t=>{var o,n;const e=this.getButtons().filter((t=>!t.disabled)),i=e.findIndex((t=>t===document.activeElement));switch(t){case"first":return e[0];case"last":return e[e.length-1];case"next":return null!==(o=e[i+1])&&void 0!==o?o:e[0];case"previous":return null!==(n=e[i-1])&&void 0!==n?n:e[e.length-1];default:return null}},this.activated=!1,this.color=void 0,this.disabled=!1,this.scrollable=!1,this.swipeGesture=!0,this.value=void 0,this.selectOnFocus=!1}colorChanged(t,o){(void 0===o&&void 0!==t||void 0!==o&&void 0===t)&&this.emitStyle()}swipeGestureChanged(){this.gestureChanged()}valueChanged(t){if(this.ionSelect.emit({value:t}),this.scrollable){const o=this.getButtons().find((o=>o.value===t));void 0!==o&&o.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})}}disabledChanged(){this.gestureChanged();const t=this.getButtons();for(const o of t)o.disabled=this.disabled}gestureChanged(){this.gesture&&this.gesture.enable(!this.scrollable&&!this.disabled&&this.swipeGesture)}connectedCallback(){this.emitStyle()}componentWillLoad(){this.emitStyle()}async componentDidLoad(){this.setCheckedClasses(),this.gesture=(await import("./p-8b1be026.js")).createGesture({el:this.el,gestureName:"segment",gesturePriority:100,threshold:0,passive:!1,onStart:t=>this.onStart(t),onMove:t=>this.onMove(t),onEnd:t=>this.onEnd(t)}),this.gestureChanged(),this.disabled&&this.disabledChanged()}onStart(t){this.valueBeforeGesture=this.value,this.activate(t)}onMove(t){this.setNextIndex(t)}onEnd(t){this.setActivated(!1),this.setNextIndex(t,!0),t.event.stopImmediatePropagation();const o=this.value;void 0!==o&&this.valueBeforeGesture!==o&&this.emitValueChange(),this.valueBeforeGesture=void 0}emitValueChange(){const{value:t}=this;this.ionChange.emit({value:t})}getButtons(){return Array.from(this.el.querySelectorAll("ion-segment-button"))}get checked(){return this.getButtons().find((t=>t.value===this.value))}setActivated(t){this.getButtons().forEach((o=>{t?o.classList.add("segment-button-activated"):o.classList.remove("segment-button-activated")})),this.activated=t}activate(t){const o=t.event.target,n=this.getButtons().find((t=>t.value===this.value));"ION-SEGMENT-BUTTON"===o.tagName&&(n||(this.value=o.value,this.setCheckedClasses()),this.value===o.value&&this.setActivated(!0))}getIndicator(t){return(t.shadowRoot||t).querySelector(".segment-button-indicator")}checkButton(t,o){const e=this.getIndicator(t),i=this.getIndicator(o);if(null===e||null===i)return;const r=e.getBoundingClientRect(),a=i.getBoundingClientRect(),s=`translate3d(${r.left-a.left}px, 0, 0) scaleX(${r.width/a.width})`;n((()=>{i.classList.remove("segment-button-indicator-animated"),i.style.setProperty("transform",s),i.getBoundingClientRect(),i.classList.add("segment-button-indicator-animated"),i.style.setProperty("transform","")})),this.value=o.value,this.setCheckedClasses()}setCheckedClasses(){const t=this.getButtons(),o=t.findIndex((t=>t.value===this.value))+1;for(const o of t)o.classList.remove("segment-button-after-checked");o<t.length&&t[o].classList.add("segment-button-after-checked")}setNextIndex(t,o=!1){const n=s(this.el),e=this.activated,i=this.getButtons(),r=i.findIndex((t=>t.value===this.value)),a=i[r];let c,l;if(-1===r)return;const d=a.getBoundingClientRect(),h=d.left,b=d.width,g=t.currentX,m=d.top+d.height/2,u=this.el.getRootNode().elementFromPoint(g,m);if(e&&!o){if(n?g>h+b:g<h){const t=r-1;t>=0&&(l=t)}else if((n?g<h:g>h+b)&&e&&!o){const t=r+1;t<i.length&&(l=t)}void 0===l||i[l].disabled||(c=i[l])}if(!e&&o&&(c=u),null!=c){if("ION-SEGMENT"===c.tagName)return!1;a!==c&&this.checkButton(a,c)}return!0}emitStyle(){this.ionStyle.emit({segment:!0})}onKeyDown(t){const o=s(this.el);let n,e=this.selectOnFocus;switch(t.key){case"ArrowRight":t.preventDefault(),n=this.getSegmentButton(o?"previous":"next");break;case"ArrowLeft":t.preventDefault(),n=this.getSegmentButton(o?"next":"previous");break;case"Home":t.preventDefault(),n=this.getSegmentButton("first");break;case"End":t.preventDefault(),n=this.getSegmentButton("last");break;case" ":case"Enter":t.preventDefault(),n=document.activeElement,e=!0}if(n){if(e){const t=this.checked;this.checkButton(t||n,n),n!==t&&this.emitValueChange()}n.setFocus()}}render(){const t=d(this);return e(i,{role:"tablist",onClick:this.onClick,class:c(this.color,{[t]:!0,"in-toolbar":l("ion-toolbar",this.el),"in-toolbar-color":l("ion-toolbar[color]",this.el),"segment-activated":this.activated,"segment-disabled":this.disabled,"segment-scrollable":this.scrollable})},e("slot",null))}get el(){return r(this)}static get watchers(){return{color:["colorChanged"],swipeGesture:["swipeGestureChanged"],value:["valueChanged"],disabled:["disabledChanged"]}}};m.style={ios:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:grid;grid-auto-columns:1fr;position:relative;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:center;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.segment-scrollable){-ms-flex-pack:start;justify-content:start;width:auto;overflow-x:auto;grid-auto-columns:minmax(-webkit-min-content, 1fr);grid-auto-columns:minmax(min-content, 1fr)}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:auto}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}",md:":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:grid;grid-auto-columns:1fr;position:relative;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:center;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.segment-scrollable){-ms-flex-pack:start;justify-content:start;width:auto;overflow-x:auto;grid-auto-columns:minmax(-webkit-min-content, 1fr);grid-auto-columns:minmax(min-content, 1fr)}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:transparent;grid-auto-columns:minmax(auto, 360px)}:host(.in-toolbar){min-height:var(--min-height)}:host(.segment-scrollable) ::slotted(ion-segment-button){min-width:auto}"};let u=0;const v=class{constructor(o){t(this,o),this.segmentEl=null,this.inheritedAttributes={},this.updateStyle=()=>{a(this)},this.updateState=()=>{const{segmentEl:t}=this;t&&(this.checked=t.value===this.value,t.disabled&&(this.disabled=!0))},this.checked=!1,this.disabled=!1,this.layout="icon-top",this.type="button",this.value="ion-sb-"+u++}valueChanged(){this.updateState()}connectedCallback(){const t=this.segmentEl=this.el.closest("ion-segment");t&&(this.updateState(),h(t,"ionSelect",this.updateState),h(t,"ionStyle",this.updateStyle))}disconnectedCallback(){const t=this.segmentEl;t&&(b(t,"ionSelect",this.updateState),b(t,"ionStyle",this.updateStyle),this.segmentEl=null)}componentWillLoad(){this.inheritedAttributes=Object.assign({},g(this.el,["aria-label"]))}get hasLabel(){return!!this.el.querySelector("ion-label")}get hasIcon(){return!!this.el.querySelector("ion-icon")}async setFocus(){const{nativeEl:t}=this;void 0!==t&&t.focus()}render(){const{checked:t,type:o,disabled:n,hasIcon:r,hasLabel:a,layout:s,segmentEl:c}=this,h=d(this);return e(i,{class:{[h]:!0,"in-toolbar":l("ion-toolbar",this.el),"in-toolbar-color":l("ion-toolbar[color]",this.el),"in-segment":l("ion-segment",this.el),"in-segment-color":void 0!==(null==c?void 0:c.color),"segment-button-has-label":a,"segment-button-has-icon":r,"segment-button-has-label-only":a&&!r,"segment-button-has-icon-only":r&&!a,"segment-button-disabled":n,"segment-button-checked":t,[`segment-button-layout-${s}`]:!0,"ion-activatable":!0,"ion-activatable-instant":!0,"ion-focusable":!0}},e("button",Object.assign({"aria-selected":t?"true":"false",role:"tab",ref:t=>this.nativeEl=t,type:o,class:"button-native",part:"native",disabled:n},this.inheritedAttributes),e("span",{class:"button-inner"},e("slot",null)),"md"===h&&e("ion-ripple-effect",null)),e("div",{part:"indicator",class:{"segment-button-indicator":!0,"segment-button-indicator-animated":!0}},e("div",{part:"indicator-background",class:"segment-button-indicator-background"})))}get el(){return r(this)}static get watchers(){return{value:["valueChanged"]}}};v.style={ios:':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:column;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;grid-row:1;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:0;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;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-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);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:inherit;flex-direction:inherit;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}: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(:focus){outline: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(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:-1;order:-1;pointer-events:none}::slotted(ion-label){display:block;-ms-flex-item-align:center;align-self:center;max-width:100%;line-height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{-ms-flex-direction:column;flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{-ms-flex-direction:row;flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);-webkit-transform:var(--indicator-transform);transform:var(--indicator-transform);-webkit-box-shadow:var(--indicator-box-shadow);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{-webkit-transition:var(--indicator-transition);transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{-webkit-transform:none;transform:none}.segment-button-indicator-animated{-webkit-transition:none;transition:none}}:host{--background:none;--background-checked:none;--background-hover:none;--background-hover-opacity:0;--background-focused:none;--background-focused-opacity:0;--border-radius:7px;--border-width:1px;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--border-style:solid;--indicator-box-shadow:0 0 5px rgba(0, 0, 0, 0.16);--indicator-color:var(--ion-color-step-350, var(--ion-background-color, #fff));--indicator-height:100%;--indicator-transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--transition:100ms all linear;--padding-top:0;--padding-end:13px;--padding-bottom:0;--padding-start:13px;margin-top:2px;margin-bottom:2px;position:relative;-ms-flex-direction:row;flex-direction:row;min-width:70px;min-height:28px;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);font-size:13px;font-weight:450;line-height:37px}:host::before{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;-webkit-transition:160ms opacity ease-in-out;transition:160ms opacity ease-in-out;-webkit-transition-delay:100ms;transition-delay:100ms;border-left:var(--border-width) var(--border-style) var(--border-color);content:"";opacity:1;will-change:opacity}:host(:first-of-type)::before{border-left-color:transparent}:host(.segment-button-disabled){opacity:0.3}::slotted(ion-icon){font-size:24px}:host(.segment-button-layout-icon-start) ::slotted(ion-label){-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:0;margin-inline-end:0}:host(.segment-button-layout-icon-end) ::slotted(ion-label){-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:2px;margin-inline-end:2px}.segment-button-indicator{-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:2px;padding-inline-end:2px;left:0;right:0;top:0;bottom:0}.segment-button-indicator-background{border-radius:var(--border-radius);background:var(--indicator-color)}.segment-button-indicator-background{-webkit-transition:var(--indicator-transition);transition:var(--indicator-transition)}:host(.segment-button-checked)::before,:host(.segment-button-after-checked)::before{opacity:0}:host(.segment-button-checked){z-index:-1}:host(.segment-button-activated){--indicator-transform:scale(0.95)}:host(.ion-focused) .button-native{opacity:0.7}@media (any-hover: hover){:host(:hover) .button-native{opacity:0.5}:host(.segment-button-checked:hover) .button-native{opacity:1}}:host(.in-segment-color){background:none;color:var(--ion-text-color, #000)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-step-350, var(--ion-background-color, #fff))}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native,:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-text-color, #000)}}:host(.in-toolbar:not(.in-segment-color)){--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, var(--ion-toolbar-color), initial);--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-toolbar-color), initial);--indicator-color:var(--ion-toolbar-segment-indicator-color, var(--ion-color-step-350, var(--ion-background-color, #fff)))}:host(.in-toolbar-color) .segment-button-indicator-background{background:var(--ion-color-contrast)}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color):hover) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color):hover) .button-native{color:var(--ion-color-base)}}',md:':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:column;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;grid-row:1;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:0;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;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-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);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:inherit;flex-direction:inherit;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}: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(:focus){outline: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(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:-1;order:-1;pointer-events:none}::slotted(ion-label){display:block;-ms-flex-item-align:center;align-self:center;max-width:100%;line-height:22px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{-ms-flex-direction:column;flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{-ms-flex-direction:row;flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);-webkit-transform:var(--indicator-transform);transform:var(--indicator-transform);-webkit-box-shadow:var(--indicator-box-shadow);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{-webkit-transition:var(--indicator-transition);transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{-webkit-transform:none;transform:none}.segment-button-indicator-animated{-webkit-transition:none;transition:none}}:host{--background:none;--background-checked:none;--background-hover:var(--color-checked);--background-focused:var(--color-checked);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04;--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--indicator-box-shadow:none;--indicator-color:var(--color-checked);--indicator-height:2px;--indicator-transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--padding-top:0;--padding-end:16px;--padding-bottom:0;--padding-start:16px;--transition:color 0.15s linear 0s, opacity 0.15s linear 0s;min-width:90px;min-height:48px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);font-size:14px;font-weight:500;letter-spacing:0.06em;line-height:40px;text-transform:uppercase}:host(.segment-button-disabled){opacity:0.3}:host(.in-segment-color){background:none;color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color) ion-ripple-effect{color:var(--ion-color-base)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked) .button-native{color:var(--ion-color-base)}:host(.in-segment-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color:hover) .button-native::after{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-segment-color)){--background:var(--ion-toolbar-segment-background, none);--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6));--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-color-primary, #3880ff));--indicator-color:var(--ion-toolbar-segment-color-checked, var(--color-checked))}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:rgba(var(--ion-color-contrast-rgb), 0.6)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color)) .button-native::after{background:var(--ion-color-contrast)}}::slotted(ion-icon){margin-top:12px;margin-bottom:12px;font-size:24px}::slotted(ion-label){margin-top:12px;margin-bottom:12px}:host(.segment-button-layout-icon-top) ::slotted(ion-label),:host(.segment-button-layout-icon-bottom) ::slotted(ion-icon){margin-top:0}:host(.segment-button-layout-icon-top) ::slotted(ion-icon),:host(.segment-button-layout-icon-bottom) ::slotted(ion-label){margin-bottom:0}:host(.segment-button-layout-icon-start) ::slotted(ion-label){-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:0;margin-inline-end:0}:host(.segment-button-layout-icon-end) ::slotted(ion-label){-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}:host(.segment-button-has-icon-only) ::slotted(ion-icon){margin-top:12px;margin-bottom:12px}:host(.segment-button-has-label-only) ::slotted(ion-label){margin-top:12px;margin-bottom:12px}.segment-button-indicator{left:0;right:0;bottom:0}.segment-button-indicator-background{background:var(--indicator-color)}:host(.in-toolbar:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-toolbar-segment-indicator-color, var(--indicator-color))}:host(.in-toolbar-color:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-color-contrast)}'};export{m as ion_segment,v as ion_segment_button}
|