@ionic/core 8.3.4-dev.11730315987.18af6259 → 8.3.4-dev.11730395663.1a0f4848
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-segment-button.js +24 -5
- package/components/ion-segment-content.d.ts +11 -0
- package/components/ion-segment-content.js +37 -0
- package/components/ion-segment-view.d.ts +11 -0
- package/components/ion-segment-view.js +140 -0
- package/components/ion-segment.js +110 -15
- package/components/ion-select-option.js +1 -1
- package/components/ion-select.js +2 -2
- package/components/ion-skeleton-text.js +2 -2
- package/components/ion-split-pane.js +2 -2
- package/components/ion-tab-bar.js +2 -2
- package/components/ion-tab-button.js +2 -2
- package/components/ion-tab.js +2 -2
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +2 -2
- package/components/ion-textarea.js +2 -2
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +3 -3
- package/components/select-modal.js +1 -1
- package/components/select-popover.js +1 -1
- package/components/spinner.js +1 -1
- package/components/title.js +2 -2
- package/components/toolbar.js +2 -2
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment-content.cjs.entry.js +23 -0
- package/dist/cjs/ion-segment-view.cjs.entry.js +122 -0
- package/dist/cjs/ion-segment_2.cjs.entry.js +132 -19
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/segment/segment.js +115 -14
- package/dist/collection/components/segment-button/segment-button.js +40 -5
- package/dist/collection/components/segment-content/segment-content.css +6 -0
- package/dist/collection/components/segment-content/segment-content.js +21 -0
- package/dist/collection/components/segment-view/segment-view-interface.js +1 -0
- package/dist/collection/components/segment-view/segment-view.ios.css +83 -0
- package/dist/collection/components/segment-view/segment-view.js +227 -0
- package/dist/collection/components/segment-view/segment-view.md.css +83 -0
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/select-modal/select-modal.js +1 -1
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/select-popover/select-popover.js +1 -1
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/docs.json +132 -1
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +1 -1
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-segment-content.entry.js +19 -0
- package/dist/esm/ion-segment-view.entry.js +118 -0
- package/dist/esm/ion-segment_2.entry.js +132 -19
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +4 -4
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-segment-content.entry.js +4 -0
- package/dist/esm-es5/ion-segment-view.entry.js +4 -0
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select-modal.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/html.html-data.json +37 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-14be4015.entry.js +4 -0
- package/dist/ionic/{p-8c357539.entry.js → p-16188af7.entry.js} +1 -1
- package/dist/ionic/p-16799667.system.entry.js +4 -0
- package/dist/ionic/p-16bfb979.system.entry.js +4 -0
- package/dist/ionic/{p-da6ce51b.system.entry.js → p-2172893e.system.entry.js} +2 -2
- package/dist/ionic/{p-5e890005.system.entry.js → p-2abae1cc.system.entry.js} +1 -1
- package/dist/ionic/{p-2407875c.system.entry.js → p-2b838f86.system.entry.js} +1 -1
- package/dist/ionic/{p-249b6d9d.entry.js → p-312d16df.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/p-424eb140.system.entry.js +4 -0
- package/dist/ionic/p-49a0e74c.entry.js +4 -0
- package/dist/ionic/{p-aa5f43c1.entry.js → p-4ec778aa.entry.js} +1 -1
- package/dist/ionic/{p-d8097686.entry.js → p-52f9cf4b.entry.js} +1 -1
- package/dist/ionic/{p-540db186.system.entry.js → p-5972efea.system.entry.js} +1 -1
- package/dist/ionic/{p-f1b9c92a.entry.js → p-5ab1b709.entry.js} +1 -1
- package/dist/ionic/{p-0de13e8e.entry.js → p-5b932840.entry.js} +1 -1
- package/dist/ionic/{p-a6827f02.entry.js → p-62af944c.entry.js} +1 -1
- package/dist/ionic/{p-cca6e227.system.entry.js → p-6a901f69.system.entry.js} +1 -1
- package/dist/ionic/p-73dc4950.entry.js +4 -0
- package/dist/ionic/{p-5e9a7134.system.entry.js → p-797eeea8.system.entry.js} +1 -1
- package/dist/ionic/{p-90d1e6e2.entry.js → p-845f8376.entry.js} +1 -1
- package/dist/ionic/{p-430f30e8.entry.js → p-95775830.entry.js} +1 -1
- package/dist/ionic/{p-e629a9fb.system.entry.js → p-975fc268.system.entry.js} +1 -1
- package/dist/ionic/{p-5663547d.entry.js → p-98ff6b32.entry.js} +1 -1
- package/dist/ionic/p-adbc4bdf.entry.js +4 -0
- package/dist/ionic/{p-9cb9edb5.system.entry.js → p-b1e1364f.system.entry.js} +1 -1
- package/dist/ionic/p-c2b74d92.system.entry.js +4 -0
- package/dist/ionic/{p-08f910f4.entry.js → p-e9a173ed.entry.js} +1 -1
- package/dist/ionic/{p-3ef0ebd1.system.entry.js → p-ebf042e0.system.entry.js} +1 -1
- package/dist/ionic/{p-471b5a49.system.entry.js → p-ed75fcfb.system.entry.js} +1 -1
- package/dist/ionic/{p-d3eaac24.entry.js → p-eedf2757.entry.js} +1 -1
- package/dist/ionic/{p-c25cf9e8.system.entry.js → p-f4bc18a1.system.entry.js} +1 -1
- package/dist/ionic/{p-2e1c94d5.system.entry.js → p-fca6ef5f.system.entry.js} +1 -1
- package/dist/types/components/segment/segment.d.ts +21 -1
- package/dist/types/components/segment-button/segment-button.d.ts +4 -0
- package/dist/types/components/segment-content/segment-content.d.ts +4 -0
- package/dist/types/components/segment-view/segment-view-interface.d.ts +4 -0
- package/dist/types/components/segment-view/segment-view.d.ts +55 -0
- package/dist/types/components.d.ts +68 -0
- package/hydrate/index.js +312 -51
- package/hydrate/index.mjs +312 -51
- package/package.json +1 -1
- package/dist/ionic/p-3254d107.entry.js +0 -4
- package/dist/ionic/p-457998b5.entry.js +0 -4
- package/dist/ionic/p-a62911e6.system.entry.js +0 -4
- package/dist/ionic/p-adcb6def.system.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -28586,6 +28586,7 @@ class Segment {
|
|
|
28586
28586
|
this.ionChange = createEvent(this, "ionChange", 7);
|
|
28587
28587
|
this.ionSelect = createEvent(this, "ionSelect", 7);
|
|
28588
28588
|
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
28589
|
+
this.segmentViewEl = null;
|
|
28589
28590
|
this.onClick = (ev) => {
|
|
28590
28591
|
const current = ev.target;
|
|
28591
28592
|
const previous = this.checked;
|
|
@@ -28600,7 +28601,13 @@ class Segment {
|
|
|
28600
28601
|
if (current !== previous) {
|
|
28601
28602
|
this.emitValueChange();
|
|
28602
28603
|
}
|
|
28603
|
-
if (this.
|
|
28604
|
+
if (this.segmentViewEl) {
|
|
28605
|
+
this.updateSegmentView();
|
|
28606
|
+
if (this.scrollable && previous) {
|
|
28607
|
+
this.checkButton(previous, current);
|
|
28608
|
+
}
|
|
28609
|
+
}
|
|
28610
|
+
else if (this.scrollable || !this.swipeGesture) {
|
|
28604
28611
|
if (previous) {
|
|
28605
28612
|
this.checkButton(previous, current);
|
|
28606
28613
|
}
|
|
@@ -28656,19 +28663,49 @@ class Segment {
|
|
|
28656
28663
|
swipeGestureChanged() {
|
|
28657
28664
|
this.gestureChanged();
|
|
28658
28665
|
}
|
|
28659
|
-
valueChanged(value) {
|
|
28666
|
+
valueChanged(value, oldValue) {
|
|
28667
|
+
// Force a value to exist if we're using a segment view
|
|
28668
|
+
if (this.segmentViewEl && value === undefined) {
|
|
28669
|
+
this.value = this.getButtons()[0].value;
|
|
28670
|
+
return;
|
|
28671
|
+
}
|
|
28672
|
+
if (oldValue !== undefined && value !== undefined) {
|
|
28673
|
+
const buttons = this.getButtons();
|
|
28674
|
+
const previous = buttons.find((button) => button.value === oldValue);
|
|
28675
|
+
const current = buttons.find((button) => button.value === value);
|
|
28676
|
+
if (previous && current) {
|
|
28677
|
+
if (!this.segmentViewEl) {
|
|
28678
|
+
this.checkButton(previous, current);
|
|
28679
|
+
}
|
|
28680
|
+
else if (this.triggerScrollOnValueChange !== false) {
|
|
28681
|
+
this.updateSegmentView();
|
|
28682
|
+
}
|
|
28683
|
+
}
|
|
28684
|
+
}
|
|
28685
|
+
else if (value !== undefined && oldValue === undefined && this.segmentViewEl) {
|
|
28686
|
+
this.updateSegmentView();
|
|
28687
|
+
}
|
|
28660
28688
|
/**
|
|
28661
28689
|
* `ionSelect` is emitted every time the value changes (internal or external changes).
|
|
28662
28690
|
* Used by `ion-segment-button` to determine if the button should be checked.
|
|
28663
28691
|
*/
|
|
28664
28692
|
this.ionSelect.emit({ value });
|
|
28665
|
-
|
|
28693
|
+
// The scroll listener should handle scrolling the active button into view as needed
|
|
28694
|
+
if (!this.segmentViewEl) {
|
|
28695
|
+
this.scrollActiveButtonIntoView();
|
|
28696
|
+
}
|
|
28697
|
+
this.triggerScrollOnValueChange = undefined;
|
|
28666
28698
|
}
|
|
28667
28699
|
disabledChanged() {
|
|
28668
28700
|
this.gestureChanged();
|
|
28669
|
-
|
|
28670
|
-
|
|
28671
|
-
button
|
|
28701
|
+
if (!this.segmentViewEl) {
|
|
28702
|
+
const buttons = this.getButtons();
|
|
28703
|
+
for (const button of buttons) {
|
|
28704
|
+
button.disabled = this.disabled;
|
|
28705
|
+
}
|
|
28706
|
+
}
|
|
28707
|
+
else {
|
|
28708
|
+
this.segmentViewEl.disabled = this.disabled;
|
|
28672
28709
|
}
|
|
28673
28710
|
}
|
|
28674
28711
|
gestureChanged() {
|
|
@@ -28678,6 +28715,10 @@ class Segment {
|
|
|
28678
28715
|
}
|
|
28679
28716
|
connectedCallback() {
|
|
28680
28717
|
this.emitStyle();
|
|
28718
|
+
this.segmentViewEl = this.getSegmentView();
|
|
28719
|
+
}
|
|
28720
|
+
disconnectedCallback() {
|
|
28721
|
+
this.segmentViewEl = null;
|
|
28681
28722
|
}
|
|
28682
28723
|
componentWillLoad() {
|
|
28683
28724
|
this.emitStyle();
|
|
@@ -28711,6 +28752,9 @@ class Segment {
|
|
|
28711
28752
|
if (this.disabled) {
|
|
28712
28753
|
this.disabledChanged();
|
|
28713
28754
|
}
|
|
28755
|
+
// Update segment view based on the initial value,
|
|
28756
|
+
// but do not animate the scroll
|
|
28757
|
+
this.updateSegmentView(false);
|
|
28714
28758
|
}
|
|
28715
28759
|
onStart(detail) {
|
|
28716
28760
|
this.valueBeforeGesture = this.value;
|
|
@@ -28727,6 +28771,7 @@ class Segment {
|
|
|
28727
28771
|
if (value !== undefined) {
|
|
28728
28772
|
if (this.valueBeforeGesture !== value) {
|
|
28729
28773
|
this.emitValueChange();
|
|
28774
|
+
this.updateSegmentView();
|
|
28730
28775
|
}
|
|
28731
28776
|
}
|
|
28732
28777
|
this.valueBeforeGesture = undefined;
|
|
@@ -28754,12 +28799,7 @@ class Segment {
|
|
|
28754
28799
|
setActivated(activated) {
|
|
28755
28800
|
const buttons = this.getButtons();
|
|
28756
28801
|
buttons.forEach((button) => {
|
|
28757
|
-
|
|
28758
|
-
button.classList.add('segment-button-activated');
|
|
28759
|
-
}
|
|
28760
|
-
else {
|
|
28761
|
-
button.classList.remove('segment-button-activated');
|
|
28762
|
-
}
|
|
28802
|
+
button.classList.toggle('segment-button-activated', activated);
|
|
28763
28803
|
});
|
|
28764
28804
|
this.activated = activated;
|
|
28765
28805
|
}
|
|
@@ -28810,6 +28850,7 @@ class Segment {
|
|
|
28810
28850
|
currentIndicator.classList.add('segment-button-indicator-animated');
|
|
28811
28851
|
// Remove the transform to slide the indicator back to the button clicked
|
|
28812
28852
|
currentIndicator.style.setProperty('transform', '');
|
|
28853
|
+
this.scrollActiveButtonIntoView(true);
|
|
28813
28854
|
});
|
|
28814
28855
|
this.value = current.value;
|
|
28815
28856
|
this.setCheckedClasses();
|
|
@@ -28825,6 +28866,60 @@ class Segment {
|
|
|
28825
28866
|
buttons[next].classList.add('segment-button-after-checked');
|
|
28826
28867
|
}
|
|
28827
28868
|
}
|
|
28869
|
+
getSegmentView() {
|
|
28870
|
+
const buttons = this.getButtons();
|
|
28871
|
+
// Get the first button with a contentId
|
|
28872
|
+
const firstContentId = buttons.find((button) => button.contentId);
|
|
28873
|
+
// Get the segment content with an id matching the button's contentId
|
|
28874
|
+
const segmentContent = document.querySelector(`ion-segment-content[id="${firstContentId === null || firstContentId === void 0 ? void 0 : firstContentId.contentId}"]`);
|
|
28875
|
+
// Return the segment view for that matching segment content
|
|
28876
|
+
return segmentContent === null || segmentContent === void 0 ? void 0 : segmentContent.closest('ion-segment-view');
|
|
28877
|
+
}
|
|
28878
|
+
handleSegmentViewScroll(ev) {
|
|
28879
|
+
const { scrollRatio, isManualScroll } = ev.detail;
|
|
28880
|
+
if (!isManualScroll) {
|
|
28881
|
+
return;
|
|
28882
|
+
}
|
|
28883
|
+
const dispatchedFrom = ev.target;
|
|
28884
|
+
const segmentViewEl = this.segmentViewEl;
|
|
28885
|
+
const segmentEl = this.el;
|
|
28886
|
+
// Only update the indicator if the event was dispatched from the correct segment view
|
|
28887
|
+
if (ev.composedPath().includes(segmentViewEl) || (dispatchedFrom === null || dispatchedFrom === void 0 ? void 0 : dispatchedFrom.contains(segmentEl))) {
|
|
28888
|
+
const buttons = this.getButtons();
|
|
28889
|
+
// If no buttons are found or there is no value set then do nothing
|
|
28890
|
+
if (!buttons.length)
|
|
28891
|
+
return;
|
|
28892
|
+
const index = buttons.findIndex((button) => button.value === this.value);
|
|
28893
|
+
const current = buttons[index];
|
|
28894
|
+
const nextIndex = Math.round(scrollRatio * (buttons.length - 1));
|
|
28895
|
+
if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
|
|
28896
|
+
this.lastNextIndex = nextIndex;
|
|
28897
|
+
this.triggerScrollOnValueChange = false;
|
|
28898
|
+
this.checkButton(current, buttons[nextIndex]);
|
|
28899
|
+
this.emitValueChange();
|
|
28900
|
+
}
|
|
28901
|
+
}
|
|
28902
|
+
}
|
|
28903
|
+
/**
|
|
28904
|
+
* Finds the related segment view and sets its current content
|
|
28905
|
+
* based on the selected segment button. This method
|
|
28906
|
+
* should be called on initial load of the segment,
|
|
28907
|
+
* after the gesture is completed (if dragging between segments)
|
|
28908
|
+
* and when a segment button is clicked directly.
|
|
28909
|
+
*/
|
|
28910
|
+
updateSegmentView(smoothScroll = true) {
|
|
28911
|
+
const buttons = this.getButtons();
|
|
28912
|
+
const button = buttons.find((btn) => btn.value === this.value);
|
|
28913
|
+
// If the button does not have a contentId then there is
|
|
28914
|
+
// no associated segment view to update
|
|
28915
|
+
if (!(button === null || button === void 0 ? void 0 : button.contentId)) {
|
|
28916
|
+
return;
|
|
28917
|
+
}
|
|
28918
|
+
const segmentView = this.segmentViewEl;
|
|
28919
|
+
if (segmentView) {
|
|
28920
|
+
segmentView.setContent(button.contentId, smoothScroll);
|
|
28921
|
+
}
|
|
28922
|
+
}
|
|
28828
28923
|
scrollActiveButtonIntoView(smoothScroll = true) {
|
|
28829
28924
|
const { scrollable, value, el } = this;
|
|
28830
28925
|
if (scrollable) {
|
|
@@ -29007,14 +29102,14 @@ class Segment {
|
|
|
29007
29102
|
}
|
|
29008
29103
|
render() {
|
|
29009
29104
|
const mode = getIonMode$1(this);
|
|
29010
|
-
return (hAsync(Host, { key: '
|
|
29105
|
+
return (hAsync(Host, { key: '66bd7a565ba73540b3bbe56dd23b95e59bcef9bc', role: "tablist", onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
29011
29106
|
[mode]: true,
|
|
29012
29107
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
29013
29108
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
29014
29109
|
'segment-activated': this.activated,
|
|
29015
29110
|
'segment-disabled': this.disabled,
|
|
29016
29111
|
'segment-scrollable': this.scrollable,
|
|
29017
|
-
}) }, hAsync("slot", { key: '
|
|
29112
|
+
}) }, hAsync("slot", { key: '782c521b1a33729b8eab1c4b879bc3f2ff48ae1b', onSlotchange: this.onSlottedItemsChange })));
|
|
29018
29113
|
}
|
|
29019
29114
|
get el() { return getElement(this); }
|
|
29020
29115
|
static get watchers() { return {
|
|
@@ -29039,7 +29134,7 @@ class Segment {
|
|
|
29039
29134
|
"selectOnFocus": [4, "select-on-focus"],
|
|
29040
29135
|
"activated": [32]
|
|
29041
29136
|
},
|
|
29042
|
-
"$listeners$": [[0, "keydown", "onKeyDown"]],
|
|
29137
|
+
"$listeners$": [[16, "ionSegmentViewScroll", "handleSegmentViewScroll"], [0, "keydown", "onKeyDown"]],
|
|
29043
29138
|
"$lazyBundleId$": "-",
|
|
29044
29139
|
"$attrsToReflect$": [["color", "color"]]
|
|
29045
29140
|
}; }
|
|
@@ -29076,6 +29171,7 @@ class SegmentButton {
|
|
|
29076
29171
|
}
|
|
29077
29172
|
};
|
|
29078
29173
|
this.checked = false;
|
|
29174
|
+
this.contentId = undefined;
|
|
29079
29175
|
this.disabled = false;
|
|
29080
29176
|
this.layout = 'icon-top';
|
|
29081
29177
|
this.type = 'button';
|
|
@@ -29091,6 +29187,26 @@ class SegmentButton {
|
|
|
29091
29187
|
addEventListener$1(segmentEl, 'ionSelect', this.updateState);
|
|
29092
29188
|
addEventListener$1(segmentEl, 'ionStyle', this.updateStyle);
|
|
29093
29189
|
}
|
|
29190
|
+
// Return if there is no contentId defined
|
|
29191
|
+
if (!this.contentId)
|
|
29192
|
+
return;
|
|
29193
|
+
// Attempt to find the Segment Content by its contentId
|
|
29194
|
+
const segmentContent = document.getElementById(this.contentId);
|
|
29195
|
+
// If no associated Segment Content exists, log an error and return
|
|
29196
|
+
if (!segmentContent) {
|
|
29197
|
+
console.error(`Segment Button: Unable to find Segment Content with id="${this.contentId}".`);
|
|
29198
|
+
return;
|
|
29199
|
+
}
|
|
29200
|
+
// Ensure the found element is a valid ION-SEGMENT-CONTENT
|
|
29201
|
+
if (segmentContent.tagName !== 'ION-SEGMENT-CONTENT') {
|
|
29202
|
+
console.error(`Segment Button: Element with id="${this.contentId}" is not an <ion-segment-content> element.`);
|
|
29203
|
+
return;
|
|
29204
|
+
}
|
|
29205
|
+
// Prevent buttons from being disabled when associated with segment content
|
|
29206
|
+
if (this.disabled) {
|
|
29207
|
+
console.warn(`Segment Button: Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
|
|
29208
|
+
this.disabled = false;
|
|
29209
|
+
}
|
|
29094
29210
|
}
|
|
29095
29211
|
disconnectedCallback() {
|
|
29096
29212
|
const segmentEl = this.segmentEl;
|
|
@@ -29124,7 +29240,7 @@ class SegmentButton {
|
|
|
29124
29240
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
29125
29241
|
const mode = getIonMode$1(this);
|
|
29126
29242
|
const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
|
|
29127
|
-
return (hAsync(Host, { key: '
|
|
29243
|
+
return (hAsync(Host, { key: 'd50a5d5e2f6206e8523598f258d8217d2903f69b', class: {
|
|
29128
29244
|
[mode]: true,
|
|
29129
29245
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
29130
29246
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -29140,10 +29256,7 @@ class SegmentButton {
|
|
|
29140
29256
|
'ion-activatable': true,
|
|
29141
29257
|
'ion-activatable-instant': true,
|
|
29142
29258
|
'ion-focusable': true,
|
|
29143
|
-
} }, hAsync("button", Object.assign({ key: '
|
|
29144
|
-
'segment-button-indicator': true,
|
|
29145
|
-
'segment-button-indicator-animated': true,
|
|
29146
|
-
} }, hAsync("div", { key: 'b43124415ebd77c87285791522c5afc26a137f96', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
29259
|
+
} }, hAsync("button", Object.assign({ key: 'b4f6f145286ba8ab79669e11035b906daa85ae7e', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), hAsync("span", { key: '67965996c9ffe70553875e00d3da0ae5b2b1d814', class: "button-inner" }, hAsync("slot", { key: '5087988fe45a8fdf388ec44c395d0b745b207806' })), mode === 'md' && hAsync("ion-ripple-effect", { key: 'b24858de0750bbc769b3183fac0077dfe817ba27' })), hAsync("div", { key: '97b4359432acd1c9da0816360cd1df9472e183f7', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, hAsync("div", { key: '0561738ea15b0986f4ed3d8276d5e6f2d13f7e51', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
29147
29260
|
}
|
|
29148
29261
|
get el() { return getElement(this); }
|
|
29149
29262
|
static get watchers() { return {
|
|
@@ -29157,6 +29270,7 @@ class SegmentButton {
|
|
|
29157
29270
|
"$flags$": 41,
|
|
29158
29271
|
"$tagName$": "ion-segment-button",
|
|
29159
29272
|
"$members$": {
|
|
29273
|
+
"contentId": [513, "content-id"],
|
|
29160
29274
|
"disabled": [1028],
|
|
29161
29275
|
"layout": [1],
|
|
29162
29276
|
"type": [1],
|
|
@@ -29166,6 +29280,151 @@ class SegmentButton {
|
|
|
29166
29280
|
},
|
|
29167
29281
|
"$listeners$": undefined,
|
|
29168
29282
|
"$lazyBundleId$": "-",
|
|
29283
|
+
"$attrsToReflect$": [["contentId", "content-id"]]
|
|
29284
|
+
}; }
|
|
29285
|
+
}
|
|
29286
|
+
|
|
29287
|
+
const segmentContentCss = ":host{scroll-snap-align:center;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}";
|
|
29288
|
+
var IonSegmentContentStyle0 = segmentContentCss;
|
|
29289
|
+
|
|
29290
|
+
class SegmentContent {
|
|
29291
|
+
constructor(hostRef) {
|
|
29292
|
+
registerInstance(this, hostRef);
|
|
29293
|
+
}
|
|
29294
|
+
render() {
|
|
29295
|
+
return (hAsync(Host, { key: '03684b2999ac64fe13e376fd7e7f279976e9d4f2' }, hAsync("slot", { key: '143031075bf33ca19e7cfd76fc8a67b83ccaf11c' })));
|
|
29296
|
+
}
|
|
29297
|
+
static get style() { return IonSegmentContentStyle0; }
|
|
29298
|
+
static get cmpMeta() { return {
|
|
29299
|
+
"$flags$": 9,
|
|
29300
|
+
"$tagName$": "ion-segment-content",
|
|
29301
|
+
"$members$": undefined,
|
|
29302
|
+
"$listeners$": undefined,
|
|
29303
|
+
"$lazyBundleId$": "-",
|
|
29304
|
+
"$attrsToReflect$": []
|
|
29305
|
+
}; }
|
|
29306
|
+
}
|
|
29307
|
+
|
|
29308
|
+
const segmentViewIosCss = ":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}";
|
|
29309
|
+
var IonSegmentViewIosStyle0 = segmentViewIosCss;
|
|
29310
|
+
|
|
29311
|
+
const segmentViewMdCss = ":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}";
|
|
29312
|
+
var IonSegmentViewMdStyle0 = segmentViewMdCss;
|
|
29313
|
+
|
|
29314
|
+
class SegmentView {
|
|
29315
|
+
constructor(hostRef) {
|
|
29316
|
+
registerInstance(this, hostRef);
|
|
29317
|
+
this.ionSegmentViewScroll = createEvent(this, "ionSegmentViewScroll", 7);
|
|
29318
|
+
this.scrollEndTimeout = null;
|
|
29319
|
+
this.isTouching = false;
|
|
29320
|
+
this.disabled = false;
|
|
29321
|
+
this.isManualScroll = undefined;
|
|
29322
|
+
}
|
|
29323
|
+
handleScroll(ev) {
|
|
29324
|
+
var _a;
|
|
29325
|
+
const { scrollLeft, scrollWidth, clientWidth } = ev.target;
|
|
29326
|
+
const scrollRatio = scrollLeft / (scrollWidth - clientWidth);
|
|
29327
|
+
this.ionSegmentViewScroll.emit({
|
|
29328
|
+
scrollRatio,
|
|
29329
|
+
isManualScroll: (_a = this.isManualScroll) !== null && _a !== void 0 ? _a : true,
|
|
29330
|
+
});
|
|
29331
|
+
// Reset the timeout to check for scroll end
|
|
29332
|
+
this.resetScrollEndTimeout();
|
|
29333
|
+
}
|
|
29334
|
+
/**
|
|
29335
|
+
* Handle touch start event to know when the user is actively dragging the segment view.
|
|
29336
|
+
*/
|
|
29337
|
+
handleScrollStart() {
|
|
29338
|
+
if (this.scrollEndTimeout) {
|
|
29339
|
+
clearTimeout(this.scrollEndTimeout);
|
|
29340
|
+
this.scrollEndTimeout = null;
|
|
29341
|
+
}
|
|
29342
|
+
this.isTouching = true;
|
|
29343
|
+
}
|
|
29344
|
+
/**
|
|
29345
|
+
* Handle touch end event to know when the user is no longer dragging the segment view.
|
|
29346
|
+
*/
|
|
29347
|
+
handleTouchEnd() {
|
|
29348
|
+
this.isTouching = false;
|
|
29349
|
+
}
|
|
29350
|
+
/**
|
|
29351
|
+
* Reset the scroll end detection timer. This is called on every scroll event.
|
|
29352
|
+
*/
|
|
29353
|
+
resetScrollEndTimeout() {
|
|
29354
|
+
if (this.scrollEndTimeout) {
|
|
29355
|
+
clearTimeout(this.scrollEndTimeout);
|
|
29356
|
+
this.scrollEndTimeout = null;
|
|
29357
|
+
}
|
|
29358
|
+
this.scrollEndTimeout = setTimeout(() => {
|
|
29359
|
+
this.checkForScrollEnd();
|
|
29360
|
+
},
|
|
29361
|
+
// Setting this to a lower value may result in inconsistencies in behavior
|
|
29362
|
+
// across browsers (particularly Firefox).
|
|
29363
|
+
// Ideally, all of this logic is removed once the scroll end event is
|
|
29364
|
+
// supported on all browsers (https://caniuse.com/?search=scrollend)
|
|
29365
|
+
100);
|
|
29366
|
+
}
|
|
29367
|
+
/**
|
|
29368
|
+
* Check if the scroll has ended and the user is not actively touching.
|
|
29369
|
+
* If the conditions are met (active content is enabled and no active touch),
|
|
29370
|
+
* reset the scroll position and emit the scroll end event.
|
|
29371
|
+
*/
|
|
29372
|
+
checkForScrollEnd() {
|
|
29373
|
+
// Only emit scroll end event if the active content is not disabled and
|
|
29374
|
+
// the user is not touching the segment view
|
|
29375
|
+
if (!this.isTouching) {
|
|
29376
|
+
this.isManualScroll = undefined;
|
|
29377
|
+
}
|
|
29378
|
+
}
|
|
29379
|
+
/**
|
|
29380
|
+
* @internal
|
|
29381
|
+
*
|
|
29382
|
+
* This method is used to programmatically set the displayed segment content
|
|
29383
|
+
* in the segment view. Calling this method will update the `value` of the
|
|
29384
|
+
* corresponding segment button.
|
|
29385
|
+
*
|
|
29386
|
+
* @param id: The id of the segment content to display.
|
|
29387
|
+
* @param smoothScroll: Whether to animate the scroll transition.
|
|
29388
|
+
*/
|
|
29389
|
+
async setContent(id, smoothScroll = true) {
|
|
29390
|
+
const contents = this.getSegmentContents();
|
|
29391
|
+
const index = contents.findIndex((content) => content.id === id);
|
|
29392
|
+
if (index === -1)
|
|
29393
|
+
return;
|
|
29394
|
+
this.isManualScroll = false;
|
|
29395
|
+
this.resetScrollEndTimeout();
|
|
29396
|
+
const contentWidth = this.el.offsetWidth;
|
|
29397
|
+
this.el.scrollTo({
|
|
29398
|
+
top: 0,
|
|
29399
|
+
left: index * contentWidth,
|
|
29400
|
+
behavior: smoothScroll ? 'smooth' : 'instant',
|
|
29401
|
+
});
|
|
29402
|
+
}
|
|
29403
|
+
getSegmentContents() {
|
|
29404
|
+
return Array.from(this.el.querySelectorAll('ion-segment-content'));
|
|
29405
|
+
}
|
|
29406
|
+
render() {
|
|
29407
|
+
const { disabled, isManualScroll } = this;
|
|
29408
|
+
return (hAsync(Host, { key: '9f4f11d31c4db776f077e59ae895b35dd4454717', class: {
|
|
29409
|
+
'segment-view-disabled': disabled,
|
|
29410
|
+
'segment-view-scroll-disabled': isManualScroll === false,
|
|
29411
|
+
} }, hAsync("slot", { key: 'ea58b21f031cee2ab2b70580f336deaefa364538' })));
|
|
29412
|
+
}
|
|
29413
|
+
get el() { return getElement(this); }
|
|
29414
|
+
static get style() { return {
|
|
29415
|
+
ios: IonSegmentViewIosStyle0,
|
|
29416
|
+
md: IonSegmentViewMdStyle0
|
|
29417
|
+
}; }
|
|
29418
|
+
static get cmpMeta() { return {
|
|
29419
|
+
"$flags$": 41,
|
|
29420
|
+
"$tagName$": "ion-segment-view",
|
|
29421
|
+
"$members$": {
|
|
29422
|
+
"disabled": [4],
|
|
29423
|
+
"isManualScroll": [32],
|
|
29424
|
+
"setContent": [64]
|
|
29425
|
+
},
|
|
29426
|
+
"$listeners$": [[1, "scroll", "handleScroll"], [1, "touchstart", "handleScrollStart"], [1, "touchend", "handleTouchEnd"]],
|
|
29427
|
+
"$lazyBundleId$": "-",
|
|
29169
29428
|
"$attrsToReflect$": []
|
|
29170
29429
|
}; }
|
|
29171
29430
|
}
|
|
@@ -29780,7 +30039,7 @@ class Select {
|
|
|
29780
30039
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
29781
30040
|
*/
|
|
29782
30041
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
29783
|
-
return (hAsync(Host, { key: '
|
|
30042
|
+
return (hAsync(Host, { key: '144dfa5c49549a74fe516c65b9b8104a477ac789', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
29784
30043
|
[mode]: true,
|
|
29785
30044
|
'in-item': inItem,
|
|
29786
30045
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -29796,7 +30055,7 @@ class Select {
|
|
|
29796
30055
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
29797
30056
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
29798
30057
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
29799
|
-
}) }, hAsync("label", { key: '
|
|
30058
|
+
}) }, hAsync("label", { key: '0edcfcbac575a9dccc77991531b6980d1caebf42', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), hAsync("div", { key: '348151d90cb093f5d21c7d4a834264ac4a312c40', class: "select-wrapper-inner" }, hAsync("slot", { key: '8b7708c7f81217435c58276da0c08bba766d9500', name: "start" }), hAsync("div", { key: '10c520a335da0a0d1cf40f9365597beb244d3b48', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: '0f15c40a5495e98e29d2a21ba21e0bc6f1c0125a', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: 'c87faad2e5ebf7f9453397d7ede43abd64d21294', class: "select-highlight" }))));
|
|
29800
30059
|
}
|
|
29801
30060
|
get el() { return getElement(this); }
|
|
29802
30061
|
static get watchers() { return {
|
|
@@ -29956,7 +30215,7 @@ class SelectModal {
|
|
|
29956
30215
|
} }, option.text))));
|
|
29957
30216
|
}
|
|
29958
30217
|
render() {
|
|
29959
|
-
return (hAsync(Host, { key: '
|
|
30218
|
+
return (hAsync(Host, { key: 'f4b92f4fc3d646f9a327e43a9622abaf69659c28', class: getIonMode$1(this) }, hAsync("ion-header", { key: '11232ef496e7abd69e55cef988963a4869a7b01e' }, hAsync("ion-toolbar", { key: 'e7c41878691a504d44c658db02807867df542588' }, this.header !== undefined && hAsync("ion-title", { key: 'fcf9d33e0f3e0076ff14805de68848f9ef199cca' }, this.header), hAsync("ion-buttons", { key: '748a967ae0ce68bc2fd018a6b9ebe0e4b810f6ac', slot: "end" }, hAsync("ion-button", { key: 'f5e60791870b5085a31b7af70ed4bb3fb83eb185', onClick: () => this.closeModal() }, "Close")))), hAsync("ion-content", { key: '159797957b6f788a9b393d91864c18db34481c68' }, hAsync("ion-list", { key: '4124554fe8b2411637cbf02f08e50e0d8f804175' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
29960
30219
|
}
|
|
29961
30220
|
get el() { return getElement(this); }
|
|
29962
30221
|
static get style() { return {
|
|
@@ -29989,7 +30248,7 @@ class SelectOption {
|
|
|
29989
30248
|
this.value = undefined;
|
|
29990
30249
|
}
|
|
29991
30250
|
render() {
|
|
29992
|
-
return hAsync(Host, { key: '
|
|
30251
|
+
return hAsync(Host, { key: '2e6fa159464f04f6d8720f960141f67918bc7534', role: "option", id: this.inputId, class: getIonMode$1(this) });
|
|
29993
30252
|
}
|
|
29994
30253
|
get el() { return getElement(this); }
|
|
29995
30254
|
static get style() { return IonSelectOptionStyle0; }
|
|
@@ -30109,7 +30368,7 @@ class SelectPopover {
|
|
|
30109
30368
|
render() {
|
|
30110
30369
|
const { header, message, options, subHeader } = this;
|
|
30111
30370
|
const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
|
|
30112
|
-
return (hAsync(Host, { key: '
|
|
30371
|
+
return (hAsync(Host, { key: 'dd0990db4de4f175b176b27f35501dd1604ca400', class: getIonMode$1(this) }, hAsync("ion-list", { key: 'cea2bc3687b8b2490a2a9ff4a1e16cd34169558e' }, header !== undefined && hAsync("ion-list-header", { key: '194aebb53453c43f913daae45a1a3066a1708c4c' }, header), hasSubHeaderOrMessage && (hAsync("ion-item", { key: 'b706b07a3c63ad8104d2db413e210c735ec1bec9' }, hAsync("ion-label", { key: '6e52b5b4cf6b04ff3dd5671d64264233de4190d5', class: "ion-text-wrap" }, subHeader !== undefined && hAsync("h3", { key: '6ef4440d17f5db8c96c63b9aa5073f4fe4b8ad62' }, subHeader), message !== undefined && hAsync("p", { key: 'c7b3b76c30ecd606c0e985a0258c13d3a75756e7' }, message)))), this.renderOptions(options))));
|
|
30113
30372
|
}
|
|
30114
30373
|
get el() { return getElement(this); }
|
|
30115
30374
|
static get style() { return {
|
|
@@ -30157,11 +30416,11 @@ class SkeletonText {
|
|
|
30157
30416
|
const animated = this.animated && config.getBoolean('animated', true);
|
|
30158
30417
|
const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
|
|
30159
30418
|
const mode = getIonMode$1(this);
|
|
30160
|
-
return (hAsync(Host, { key: '
|
|
30419
|
+
return (hAsync(Host, { key: 'fdfabf9364caf507450239b62be24f08873bd650', class: {
|
|
30161
30420
|
[mode]: true,
|
|
30162
30421
|
'skeleton-text-animated': animated,
|
|
30163
30422
|
'in-media': inMedia,
|
|
30164
|
-
} }, hAsync("span", { key: '
|
|
30423
|
+
} }, hAsync("span", { key: '3482c88dcc177547185ce87972afa064a542367d' }, "\u00A0")));
|
|
30165
30424
|
}
|
|
30166
30425
|
get el() { return getElement(this); }
|
|
30167
30426
|
static get style() { return IonSkeletonTextStyle0; }
|
|
@@ -30214,7 +30473,7 @@ class Spinner {
|
|
|
30214
30473
|
svgs.push(buildLine(spinner, duration, i, spinner.lines));
|
|
30215
30474
|
}
|
|
30216
30475
|
}
|
|
30217
|
-
return (hAsync(Host, { key: '
|
|
30476
|
+
return (hAsync(Host, { key: '9d30ee9f5aa0dd0e220da07e75d05b8b2435224d', class: createColorClasses$1(self.color, {
|
|
30218
30477
|
[mode]: true,
|
|
30219
30478
|
[`spinner-${spinnerName}`]: true,
|
|
30220
30479
|
'spinner-paused': self.paused || config.getBoolean('_testing'),
|
|
@@ -30314,12 +30573,12 @@ class SplitPane {
|
|
|
30314
30573
|
}
|
|
30315
30574
|
render() {
|
|
30316
30575
|
const mode = getIonMode$1(this);
|
|
30317
|
-
return (hAsync(Host, { key: '
|
|
30576
|
+
return (hAsync(Host, { key: '1ca0b0299d03605bb358112ca56cbafbe58f00f5', class: {
|
|
30318
30577
|
[mode]: true,
|
|
30319
30578
|
// Used internally for styling
|
|
30320
30579
|
[`split-pane-${mode}`]: true,
|
|
30321
30580
|
'split-pane-visible': this.visible,
|
|
30322
|
-
} }, hAsync("slot", { key: '
|
|
30581
|
+
} }, hAsync("slot", { key: 'abe231361727ae7fc63edd592a4490caac1909fb' })));
|
|
30323
30582
|
}
|
|
30324
30583
|
get el() { return getElement(this); }
|
|
30325
30584
|
static get watchers() { return {
|
|
@@ -30388,10 +30647,10 @@ class Tab {
|
|
|
30388
30647
|
}
|
|
30389
30648
|
render() {
|
|
30390
30649
|
const { tab, active, component } = this;
|
|
30391
|
-
return (hAsync(Host, { key: '
|
|
30650
|
+
return (hAsync(Host, { key: 'cb75d0877979b3b8df8f7e1952bfa9677da1eaa5', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
30392
30651
|
'ion-page': component === undefined,
|
|
30393
30652
|
'tab-hidden': !active,
|
|
30394
|
-
} }, hAsync("slot", { key: '
|
|
30653
|
+
} }, hAsync("slot", { key: '37fbb7b7a6b03eb93b1dacd2dc1025b78eb2aa6b' })));
|
|
30395
30654
|
}
|
|
30396
30655
|
get el() { return getElement(this); }
|
|
30397
30656
|
static get watchers() { return {
|
|
@@ -30469,11 +30728,11 @@ class TabBar {
|
|
|
30469
30728
|
const { color, translucent, keyboardVisible } = this;
|
|
30470
30729
|
const mode = getIonMode$1(this);
|
|
30471
30730
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
30472
|
-
return (hAsync(Host, { key: '
|
|
30731
|
+
return (hAsync(Host, { key: 'a87fd2ea5df053705a37ea7ffec043e75c4a9907', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
|
|
30473
30732
|
[mode]: true,
|
|
30474
30733
|
'tab-bar-translucent': translucent,
|
|
30475
30734
|
'tab-bar-hidden': shouldHide,
|
|
30476
|
-
}) }, hAsync("slot", { key: '
|
|
30735
|
+
}) }, hAsync("slot", { key: '81a6223299b6cab29d7ddced590e9152e2b3ded0' })));
|
|
30477
30736
|
}
|
|
30478
30737
|
get el() { return getElement(this); }
|
|
30479
30738
|
static get watchers() { return {
|
|
@@ -30571,7 +30830,7 @@ class TabButton {
|
|
|
30571
30830
|
rel,
|
|
30572
30831
|
target,
|
|
30573
30832
|
};
|
|
30574
|
-
return (hAsync(Host, { key: '
|
|
30833
|
+
return (hAsync(Host, { key: '5976c45943ea7ea8e7c1a85fc9996de421439f08', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
30575
30834
|
[mode]: true,
|
|
30576
30835
|
'tab-selected': selected,
|
|
30577
30836
|
'tab-disabled': disabled,
|
|
@@ -30583,7 +30842,7 @@ class TabButton {
|
|
|
30583
30842
|
'ion-activatable': true,
|
|
30584
30843
|
'ion-selectable': true,
|
|
30585
30844
|
'ion-focusable': true,
|
|
30586
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
30845
|
+
} }, hAsync("a", Object.assign({ key: '1db09d861b67ff292018fb4b0dc7b85bd4677eb8' }, attrs, { class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : undefined }, inheritedAttributes), hAsync("span", { key: '4381eafcb27e8c7bb0d86d4f115ceb0caf03b9b4', class: "button-inner" }, hAsync("slot", { key: '1981135f6fbb88376c1bd923c55c70fe8b5c5159' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '0509bc7155d055d1ed710600e9cf4df135881491', type: "unbounded" }))));
|
|
30587
30846
|
}
|
|
30588
30847
|
get el() { return getElement(this); }
|
|
30589
30848
|
static get style() { return {
|
|
@@ -30759,7 +31018,7 @@ class Tabs {
|
|
|
30759
31018
|
return Array.from(this.el.querySelectorAll('ion-tab'));
|
|
30760
31019
|
}
|
|
30761
31020
|
render() {
|
|
30762
|
-
return (hAsync(Host, { key: '
|
|
31021
|
+
return (hAsync(Host, { key: 'e01ccf6bfaccad094515be50e407399c733fc226', onIonTabButtonClick: this.onTabClicked }, hAsync("slot", { key: '38d2d01dbfd8a08f01e6f0e27274b21d75424e37', name: "top" }), hAsync("div", { key: '7e894f0f423e2d43e1c68daff5f9f6c442fad237', class: "tabs-inner" }, hAsync("slot", { key: 'df16be529a0370a26d0adf850530b31607507c23' })), hAsync("slot", { key: '44642e1cb24c3281c43db75fd69a32fe0defe40a', name: "bottom" })));
|
|
30763
31022
|
}
|
|
30764
31023
|
get el() { return getElement(this); }
|
|
30765
31024
|
static get style() { return IonTabsStyle0; }
|
|
@@ -30801,9 +31060,9 @@ class Text {
|
|
|
30801
31060
|
}
|
|
30802
31061
|
render() {
|
|
30803
31062
|
const mode = getIonMode$1(this);
|
|
30804
|
-
return (hAsync(Host, { key: '
|
|
31063
|
+
return (hAsync(Host, { key: 'e134d70c04344b708a2ecf6253722781ad2ca826', class: createColorClasses$1(this.color, {
|
|
30805
31064
|
[mode]: true,
|
|
30806
|
-
}) }, hAsync("slot", { key: '
|
|
31065
|
+
}) }, hAsync("slot", { key: 'da79c760f7ebbcd007ce110439f05a62cb22eac8' })));
|
|
30807
31066
|
}
|
|
30808
31067
|
static get style() { return IonTextStyle0; }
|
|
30809
31068
|
static get cmpMeta() { return {
|
|
@@ -31170,7 +31429,7 @@ class Textarea {
|
|
|
31170
31429
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
31171
31430
|
*/
|
|
31172
31431
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
31173
|
-
return (hAsync(Host, { key: '
|
|
31432
|
+
return (hAsync(Host, { key: '8ce5e2f5ba3ac645f95f9b95922cfc2a7d3da459', class: createColorClasses$1(this.color, {
|
|
31174
31433
|
[mode]: true,
|
|
31175
31434
|
'has-value': hasValue,
|
|
31176
31435
|
'has-focus': hasFocus,
|
|
@@ -31179,7 +31438,7 @@ class Textarea {
|
|
|
31179
31438
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
31180
31439
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
31181
31440
|
'textarea-disabled': disabled,
|
|
31182
|
-
}) }, hAsync("label", { key: '
|
|
31441
|
+
}) }, hAsync("label", { key: '746c40872c085d064f8f1e51580281c692626d5d', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), hAsync("div", { key: '603f5e72ff1ee1deeaab7103f76cbc913663b4b4', class: "textarea-wrapper-inner" }, hAsync("div", { key: '6185ed2a5ef3a5ea318a9fea16d38a24d522cb19', class: "start-slot-wrapper" }, hAsync("slot", { key: '7376b204ca49c1468df12363298c449adcb149f1', name: "start" })), hAsync("div", { key: '429183415690d7390acfaea6344e7b69c948f749', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, hAsync("textarea", Object.assign({ key: 'e7f00f1c2e5706832a80eb0a73e5b28eec428943', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value)), hAsync("div", { key: '6a82280cfbd2856a64b1078dd3ad94a62066494e', class: "end-slot-wrapper" }, hAsync("slot", { key: '0a9543f5751e4fbf1039b247dfe0d437c3f9beed', name: "end" }))), shouldRenderHighlight && hAsync("div", { key: 'b34296c968af3cdf46115ea7776af3a359c74734', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
31183
31442
|
}
|
|
31184
31443
|
get el() { return getElement(this); }
|
|
31185
31444
|
static get watchers() { return {
|
|
@@ -31241,7 +31500,7 @@ class Thumbnail {
|
|
|
31241
31500
|
registerInstance(this, hostRef);
|
|
31242
31501
|
}
|
|
31243
31502
|
render() {
|
|
31244
|
-
return (hAsync(Host, { key: '
|
|
31503
|
+
return (hAsync(Host, { key: 'cfa9aeb1d4fd624a9732c5230d29dd887e4b7771', class: getIonMode$1(this) }, hAsync("slot", { key: '29bc6e64063cba44e2643228df54394883933918' })));
|
|
31245
31504
|
}
|
|
31246
31505
|
static get style() { return IonThumbnailStyle0; }
|
|
31247
31506
|
static get cmpMeta() { return {
|
|
@@ -32077,9 +32336,9 @@ class Toast {
|
|
|
32077
32336
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
32078
32337
|
printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
32079
32338
|
}
|
|
32080
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
32339
|
+
return (hAsync(Host, Object.assign({ key: 'c05655ff06af8d0e48c2a85396b07ad942fa81b4', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
32081
32340
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
32082
|
-
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '
|
|
32341
|
+
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '9393ead4de1bf28529661d6f64049d34e18d725c', class: wrapperClass }, hAsync("div", { key: '3e9dd73c17c337849c3f26e8d0f395b3e5ee20a7', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { key: '5d15b18364301ad55e44e9f601014ac33181590b', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: 'f6dd164502637a882c5caf18445d8509b85ad6f9', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
32083
32342
|
}
|
|
32084
32343
|
get el() { return getElement(this); }
|
|
32085
32344
|
static get watchers() { return {
|
|
@@ -32299,7 +32558,7 @@ class Toggle {
|
|
|
32299
32558
|
const value = this.getValue();
|
|
32300
32559
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
32301
32560
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
32302
|
-
return (hAsync(Host, { key: '
|
|
32561
|
+
return (hAsync(Host, { key: 'f52195ec3bc14c024647cb41319c32a4cd330e19', onClick: this.onClick, class: createColorClasses$1(color, {
|
|
32303
32562
|
[mode]: true,
|
|
32304
32563
|
'in-item': hostContext('ion-item', el),
|
|
32305
32564
|
'toggle-activated': activated,
|
|
@@ -32309,10 +32568,10 @@ class Toggle {
|
|
|
32309
32568
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
32310
32569
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
32311
32570
|
[`toggle-${rtl}`]: true,
|
|
32312
|
-
}) }, hAsync("label", { key: '
|
|
32571
|
+
}) }, hAsync("label", { key: 'f8b3a215ad85b2cee611ad63449b584e1640f27f', class: "toggle-wrapper" }, hAsync("input", Object.assign({ key: 'f387b1ea840737a9737917e516834c887be99c09', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), hAsync("div", { key: '936af880db59fe377cd2de9101eb28a1c4fb8914', class: {
|
|
32313
32572
|
'label-text-wrapper': true,
|
|
32314
32573
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
32315
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
32574
|
+
}, part: "label" }, hAsync("slot", { key: '80a6672e2e792c15011a9496dcd75363cdba31c6' })), hAsync("div", { key: '2b2b318b38ab27b194c0dab4cecd77d9d780f2ca', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
32316
32575
|
}
|
|
32317
32576
|
get el() { return getElement(this); }
|
|
32318
32577
|
static get watchers() { return {
|
|
@@ -32416,10 +32675,10 @@ class Toolbar {
|
|
|
32416
32675
|
this.childrenStyles.forEach((value) => {
|
|
32417
32676
|
Object.assign(childStyles, value);
|
|
32418
32677
|
});
|
|
32419
|
-
return (hAsync(Host, { key: '
|
|
32678
|
+
return (hAsync(Host, { key: '462538a5ecd01baf3cde116c9f029aeda26c81be', class: Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color, {
|
|
32420
32679
|
[mode]: true,
|
|
32421
32680
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
32422
|
-
})) }, hAsync("div", { key: '
|
|
32681
|
+
})) }, hAsync("div", { key: 'c0b4415d3b2472de643a9be7cb3b13b3b628621b', class: "toolbar-background" }), hAsync("div", { key: '0ccb8a2dbeaa28d8f9bed87629c0c097446690c2', class: "toolbar-container" }, hAsync("slot", { key: '3e726dac359e923df21d80301651f16063a3de20', name: "start" }), hAsync("slot", { key: 'cd799330b56a7f8833bc61bb2807aafb21846f71', name: "secondary" }), hAsync("div", { key: '395282e6ac8c53576922dcdb5f08c25d34638c86', class: "toolbar-content" }, hAsync("slot", { key: 'a437c60e4ba5aae65e55169ae82a6f379868ec1d' })), hAsync("slot", { key: '711af9b9d321a7b31ede924c9bdcad767aa9a1ca', name: "primary" }), hAsync("slot", { key: 'ecc02edeaf80a837890bcb08d5096df1e22a0b9a', name: "end" }))));
|
|
32423
32682
|
}
|
|
32424
32683
|
get el() { return getElement(this); }
|
|
32425
32684
|
static get style() { return {
|
|
@@ -32469,11 +32728,11 @@ class ToolbarTitle {
|
|
|
32469
32728
|
render() {
|
|
32470
32729
|
const mode = getIonMode$1(this);
|
|
32471
32730
|
const size = this.getSize();
|
|
32472
|
-
return (hAsync(Host, { key: '
|
|
32731
|
+
return (hAsync(Host, { key: '7293d2ecd6262feb0d8d769effbb208230baed89', class: createColorClasses$1(this.color, {
|
|
32473
32732
|
[mode]: true,
|
|
32474
32733
|
[`title-${size}`]: true,
|
|
32475
32734
|
'title-rtl': document.dir === 'rtl',
|
|
32476
|
-
}) }, hAsync("div", { key: '
|
|
32735
|
+
}) }, hAsync("div", { key: '086ec3a361ebdf6506846a8704b457cda3a6f897', class: "toolbar-title" }, hAsync("slot", { key: '59add7eb92b82d6832a8f0894f897c51fdf4f214' }))));
|
|
32477
32736
|
}
|
|
32478
32737
|
get el() { return getElement(this); }
|
|
32479
32738
|
static get watchers() { return {
|
|
@@ -32574,6 +32833,8 @@ registerComponents([
|
|
|
32574
32833
|
Searchbar,
|
|
32575
32834
|
Segment,
|
|
32576
32835
|
SegmentButton,
|
|
32836
|
+
SegmentContent,
|
|
32837
|
+
SegmentView,
|
|
32577
32838
|
Select,
|
|
32578
32839
|
SelectModal,
|
|
32579
32840
|
SelectOption,
|