@ionic/core 9.0.11-dev.11793792571.1765ff65 → 9.0.11-dev.11793874002.1c88a1d0
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-select-modal.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-CeQm1-3s.js +4 -0
- package/components/{p-py1vB-7U.js → p-DkKuPFGm.js} +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +80 -15
- package/dist/collection/components/toolbar/toolbar.js +80 -15
- package/dist/docs.json +1 -1
- package/dist/esm/ion-app_8.entry.js +80 -15
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-39e3be74.entry.js → p-10dfe93f.entry.js} +1 -1
- package/dist/types/components/toolbar/toolbar.d.ts +27 -1
- package/hydrate/index.js +81 -16
- package/hydrate/index.mjs +81 -16
- package/package.json +1 -1
- package/components/p-DdOVnjsY.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -46763,6 +46763,7 @@ class Toolbar {
|
|
|
46763
46763
|
];
|
|
46764
46764
|
this.showClasses = ['show-start', 'show-end', 'show-primary', 'show-secondary'];
|
|
46765
46765
|
this.slotSizeVars = ['--start-end-size', '--primary-secondary-size'];
|
|
46766
|
+
this.hasLoaded = false;
|
|
46766
46767
|
}
|
|
46767
46768
|
componentWillLoad() {
|
|
46768
46769
|
const buttons = Array.from(this.el.querySelectorAll('ion-buttons'));
|
|
@@ -46781,9 +46782,23 @@ class Toolbar {
|
|
|
46781
46782
|
}
|
|
46782
46783
|
this.updateSlotClasses();
|
|
46783
46784
|
}
|
|
46785
|
+
connectedCallback() {
|
|
46786
|
+
/**
|
|
46787
|
+
* The resize observer is stopped when the toolbar is removed from the DOM.
|
|
46788
|
+
* If the toolbar is added back (for example, when it is moved), start it again.
|
|
46789
|
+
* On the first connection the toolbar has not rendered yet, so this is left
|
|
46790
|
+
* to componentDidLoad.
|
|
46791
|
+
*/
|
|
46792
|
+
if (this.hasLoaded) {
|
|
46793
|
+
this.updateSlotClasses();
|
|
46794
|
+
}
|
|
46795
|
+
}
|
|
46784
46796
|
componentDidLoad() {
|
|
46797
|
+
this.hasLoaded = true;
|
|
46785
46798
|
this.updateSlotClasses();
|
|
46786
|
-
|
|
46799
|
+
}
|
|
46800
|
+
disconnectedCallback() {
|
|
46801
|
+
this.stopObservingSlotSizes();
|
|
46787
46802
|
}
|
|
46788
46803
|
titlePlacementChanged() {
|
|
46789
46804
|
this.updateSlotClasses();
|
|
@@ -46803,26 +46818,67 @@ class Toolbar {
|
|
|
46803
46818
|
* Updates the CSS custom properties for slot widths
|
|
46804
46819
|
* This ensures that slots shown by their met conditions
|
|
46805
46820
|
* have a minimum width matching their required slot
|
|
46806
|
-
|
|
46807
|
-
|
|
46808
|
-
|
|
46809
|
-
|
|
46810
|
-
|
|
46811
|
-
|
|
46812
|
-
|
|
46813
|
-
|
|
46814
|
-
|
|
46815
|
-
|
|
46816
|
-
|
|
46817
|
-
|
|
46821
|
+
*
|
|
46822
|
+
* The slotted content is watched with a ResizeObserver instead of being
|
|
46823
|
+
* measured after a timeout:
|
|
46824
|
+
* - The observer callback runs after layout and before paint, so the slot
|
|
46825
|
+
* widths are set in the same frame the content is first laid out. The
|
|
46826
|
+
* title is already centered when it is first painted and does not move.
|
|
46827
|
+
* - The callback runs again whenever the slotted content changes size,
|
|
46828
|
+
* for example when a button is added or removed, or when a hidden
|
|
46829
|
+
* toolbar becomes visible.
|
|
46830
|
+
*/
|
|
46831
|
+
updateSlotWidths() {
|
|
46832
|
+
// Stop watching the previous content before watching the current one.
|
|
46833
|
+
this.stopObservingSlotSizes();
|
|
46834
|
+
// Browsers without ResizeObserver can only measure once.
|
|
46835
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
46836
|
+
this.measureAndUpdateSlots();
|
|
46837
|
+
return;
|
|
46838
|
+
}
|
|
46839
|
+
const elementsToObserve = [];
|
|
46840
|
+
const slots = ['start', 'end', 'primary', 'secondary'];
|
|
46841
|
+
slots.forEach((slot) => {
|
|
46842
|
+
if (this.el.classList.contains(`has-${slot}-content`)) {
|
|
46843
|
+
elementsToObserve.push(...this.getSlottedElements(slot));
|
|
46818
46844
|
}
|
|
46819
46845
|
});
|
|
46846
|
+
if (elementsToObserve.length === 0) {
|
|
46847
|
+
return;
|
|
46848
|
+
}
|
|
46849
|
+
/**
|
|
46850
|
+
* The observer also calls the callback once right after observing
|
|
46851
|
+
* an element, which takes care of the first measurement.
|
|
46852
|
+
*/
|
|
46853
|
+
const observer = new ResizeObserver(() => this.measureAndUpdateSlots());
|
|
46854
|
+
elementsToObserve.forEach((element) => observer.observe(element));
|
|
46855
|
+
this.slotResizeObserver = observer;
|
|
46856
|
+
}
|
|
46857
|
+
/**
|
|
46858
|
+
* Stops watching the slotted content for size changes.
|
|
46859
|
+
*/
|
|
46860
|
+
stopObservingSlotSizes() {
|
|
46861
|
+
if (this.slotResizeObserver) {
|
|
46862
|
+
this.slotResizeObserver.disconnect();
|
|
46863
|
+
this.slotResizeObserver = undefined;
|
|
46864
|
+
}
|
|
46865
|
+
}
|
|
46866
|
+
/**
|
|
46867
|
+
* Returns the elements assigned to the given slot of the toolbar.
|
|
46868
|
+
*/
|
|
46869
|
+
getSlottedElements(slotName) {
|
|
46870
|
+
const slotElement = this.el.shadowRoot?.querySelector(`slot[name="${slotName}"]`);
|
|
46871
|
+
if (!slotElement) {
|
|
46872
|
+
return [];
|
|
46873
|
+
}
|
|
46874
|
+
return slotElement.assignedElements({ flatten: true });
|
|
46820
46875
|
}
|
|
46821
46876
|
/**
|
|
46822
46877
|
* Measure the widths of the slots and update the CSS custom properties
|
|
46823
46878
|
* for the minimum width of each pair of slots based on the largest width in each pair.
|
|
46824
46879
|
* Returns whether we successfully measured all of the slots we expect to have content.
|
|
46825
|
-
* If not, the content probably hasn't rendered yet and
|
|
46880
|
+
* If not, the content probably hasn't rendered yet, and the ResizeObserver
|
|
46881
|
+
* measures again once it does.
|
|
46826
46882
|
*/
|
|
46827
46883
|
measureAndUpdateSlots() {
|
|
46828
46884
|
// Define the relationship between slots based on the conditions array
|
|
@@ -46831,6 +46887,13 @@ class Toolbar {
|
|
|
46831
46887
|
{ name: 'start-end', slots: ['start', 'end'] },
|
|
46832
46888
|
{ name: 'primary-secondary', slots: ['primary', 'secondary'] },
|
|
46833
46889
|
];
|
|
46890
|
+
/**
|
|
46891
|
+
* Once a size property is set, the slots cannot be narrower than it.
|
|
46892
|
+
* Remove the properties first so each slot is measured at the width of
|
|
46893
|
+
* its content, which lets the slots shrink when their content does.
|
|
46894
|
+
* This runs before paint, so the slots are never painted without a size.
|
|
46895
|
+
*/
|
|
46896
|
+
this.slotSizeVars.forEach((cssVar) => this.el.style.removeProperty(cssVar));
|
|
46834
46897
|
// First, measure all slot widths
|
|
46835
46898
|
const slotWidths = new Map();
|
|
46836
46899
|
let allMeasurementsSuccessful = true;
|
|
@@ -46889,6 +46952,8 @@ class Toolbar {
|
|
|
46889
46952
|
* Removes all slot visibility classes and slot width CSS variables.
|
|
46890
46953
|
*/
|
|
46891
46954
|
removeSlotClasses() {
|
|
46955
|
+
// The slot widths are no longer used, so there is nothing to watch.
|
|
46956
|
+
this.stopObservingSlotSizes();
|
|
46892
46957
|
this.el.classList.remove(...this.slotClasses, ...this.showClasses);
|
|
46893
46958
|
this.slotSizeVars.forEach((cssVar) => this.el.style.removeProperty(cssVar));
|
|
46894
46959
|
}
|
|
@@ -46972,14 +47037,14 @@ class Toolbar {
|
|
|
46972
47037
|
Object.assign(childStyles, style);
|
|
46973
47038
|
});
|
|
46974
47039
|
const titlePlacement = this.getTitlePlacement();
|
|
46975
|
-
return (hAsync(Host, { key: '
|
|
47040
|
+
return (hAsync(Host, { key: '2ee4ee2329ba499bd3fe24eb58f8954c86d39b01', class: {
|
|
46976
47041
|
...createColorClasses$1(this.color, {
|
|
46977
47042
|
[theme]: true,
|
|
46978
47043
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
46979
47044
|
[`toolbar-title-placement-${titlePlacement}`]: true,
|
|
46980
47045
|
}),
|
|
46981
47046
|
...childStyles,
|
|
46982
|
-
} }, hAsync("div", { key: '
|
|
47047
|
+
} }, hAsync("div", { key: '68da02a622db1ed136a31700421c5da005ae3884', class: "toolbar-background", part: "background" }), hAsync("div", { key: 'cefcad22e28e1468de024a0cbe477464a872dc66', class: "toolbar-container", part: "container" }, hAsync("slot", { key: '9ebfc464b5c32c6d2b5c81a0a0c415effa15ce3c', name: "start", onSlotchange: () => this.updateSlotClasses() }), hAsync("slot", { key: '55a07aa0000e1b02814f7a01ad1610d1d723f442', name: "secondary", onSlotchange: () => this.updateSlotClasses() }), hAsync("div", { key: '51d1e06e0463788b5f794831faadd305aa8bca75', class: "toolbar-content", part: "content" }, hAsync("slot", { key: '6982cc6886f76cf43d78e3f0e9243dc05f67d34c' })), hAsync("slot", { key: 'b00b9b9b28c1637a04781ef88b5d9474fb5c0647', name: "primary", onSlotchange: () => this.updateSlotClasses() }), hAsync("slot", { key: '4fce3b9b17f7775d0ba14cd5185e500753b4976e', name: "end", onSlotchange: () => this.updateSlotClasses() }))));
|
|
46983
47048
|
}
|
|
46984
47049
|
get el() { return getElement(this); }
|
|
46985
47050
|
static get watchers() { return {
|
package/hydrate/index.mjs
CHANGED
|
@@ -46761,6 +46761,7 @@ class Toolbar {
|
|
|
46761
46761
|
];
|
|
46762
46762
|
this.showClasses = ['show-start', 'show-end', 'show-primary', 'show-secondary'];
|
|
46763
46763
|
this.slotSizeVars = ['--start-end-size', '--primary-secondary-size'];
|
|
46764
|
+
this.hasLoaded = false;
|
|
46764
46765
|
}
|
|
46765
46766
|
componentWillLoad() {
|
|
46766
46767
|
const buttons = Array.from(this.el.querySelectorAll('ion-buttons'));
|
|
@@ -46779,9 +46780,23 @@ class Toolbar {
|
|
|
46779
46780
|
}
|
|
46780
46781
|
this.updateSlotClasses();
|
|
46781
46782
|
}
|
|
46783
|
+
connectedCallback() {
|
|
46784
|
+
/**
|
|
46785
|
+
* The resize observer is stopped when the toolbar is removed from the DOM.
|
|
46786
|
+
* If the toolbar is added back (for example, when it is moved), start it again.
|
|
46787
|
+
* On the first connection the toolbar has not rendered yet, so this is left
|
|
46788
|
+
* to componentDidLoad.
|
|
46789
|
+
*/
|
|
46790
|
+
if (this.hasLoaded) {
|
|
46791
|
+
this.updateSlotClasses();
|
|
46792
|
+
}
|
|
46793
|
+
}
|
|
46782
46794
|
componentDidLoad() {
|
|
46795
|
+
this.hasLoaded = true;
|
|
46783
46796
|
this.updateSlotClasses();
|
|
46784
|
-
|
|
46797
|
+
}
|
|
46798
|
+
disconnectedCallback() {
|
|
46799
|
+
this.stopObservingSlotSizes();
|
|
46785
46800
|
}
|
|
46786
46801
|
titlePlacementChanged() {
|
|
46787
46802
|
this.updateSlotClasses();
|
|
@@ -46801,26 +46816,67 @@ class Toolbar {
|
|
|
46801
46816
|
* Updates the CSS custom properties for slot widths
|
|
46802
46817
|
* This ensures that slots shown by their met conditions
|
|
46803
46818
|
* have a minimum width matching their required slot
|
|
46804
|
-
|
|
46805
|
-
|
|
46806
|
-
|
|
46807
|
-
|
|
46808
|
-
|
|
46809
|
-
|
|
46810
|
-
|
|
46811
|
-
|
|
46812
|
-
|
|
46813
|
-
|
|
46814
|
-
|
|
46815
|
-
|
|
46819
|
+
*
|
|
46820
|
+
* The slotted content is watched with a ResizeObserver instead of being
|
|
46821
|
+
* measured after a timeout:
|
|
46822
|
+
* - The observer callback runs after layout and before paint, so the slot
|
|
46823
|
+
* widths are set in the same frame the content is first laid out. The
|
|
46824
|
+
* title is already centered when it is first painted and does not move.
|
|
46825
|
+
* - The callback runs again whenever the slotted content changes size,
|
|
46826
|
+
* for example when a button is added or removed, or when a hidden
|
|
46827
|
+
* toolbar becomes visible.
|
|
46828
|
+
*/
|
|
46829
|
+
updateSlotWidths() {
|
|
46830
|
+
// Stop watching the previous content before watching the current one.
|
|
46831
|
+
this.stopObservingSlotSizes();
|
|
46832
|
+
// Browsers without ResizeObserver can only measure once.
|
|
46833
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
46834
|
+
this.measureAndUpdateSlots();
|
|
46835
|
+
return;
|
|
46836
|
+
}
|
|
46837
|
+
const elementsToObserve = [];
|
|
46838
|
+
const slots = ['start', 'end', 'primary', 'secondary'];
|
|
46839
|
+
slots.forEach((slot) => {
|
|
46840
|
+
if (this.el.classList.contains(`has-${slot}-content`)) {
|
|
46841
|
+
elementsToObserve.push(...this.getSlottedElements(slot));
|
|
46816
46842
|
}
|
|
46817
46843
|
});
|
|
46844
|
+
if (elementsToObserve.length === 0) {
|
|
46845
|
+
return;
|
|
46846
|
+
}
|
|
46847
|
+
/**
|
|
46848
|
+
* The observer also calls the callback once right after observing
|
|
46849
|
+
* an element, which takes care of the first measurement.
|
|
46850
|
+
*/
|
|
46851
|
+
const observer = new ResizeObserver(() => this.measureAndUpdateSlots());
|
|
46852
|
+
elementsToObserve.forEach((element) => observer.observe(element));
|
|
46853
|
+
this.slotResizeObserver = observer;
|
|
46854
|
+
}
|
|
46855
|
+
/**
|
|
46856
|
+
* Stops watching the slotted content for size changes.
|
|
46857
|
+
*/
|
|
46858
|
+
stopObservingSlotSizes() {
|
|
46859
|
+
if (this.slotResizeObserver) {
|
|
46860
|
+
this.slotResizeObserver.disconnect();
|
|
46861
|
+
this.slotResizeObserver = undefined;
|
|
46862
|
+
}
|
|
46863
|
+
}
|
|
46864
|
+
/**
|
|
46865
|
+
* Returns the elements assigned to the given slot of the toolbar.
|
|
46866
|
+
*/
|
|
46867
|
+
getSlottedElements(slotName) {
|
|
46868
|
+
const slotElement = this.el.shadowRoot?.querySelector(`slot[name="${slotName}"]`);
|
|
46869
|
+
if (!slotElement) {
|
|
46870
|
+
return [];
|
|
46871
|
+
}
|
|
46872
|
+
return slotElement.assignedElements({ flatten: true });
|
|
46818
46873
|
}
|
|
46819
46874
|
/**
|
|
46820
46875
|
* Measure the widths of the slots and update the CSS custom properties
|
|
46821
46876
|
* for the minimum width of each pair of slots based on the largest width in each pair.
|
|
46822
46877
|
* Returns whether we successfully measured all of the slots we expect to have content.
|
|
46823
|
-
* If not, the content probably hasn't rendered yet and
|
|
46878
|
+
* If not, the content probably hasn't rendered yet, and the ResizeObserver
|
|
46879
|
+
* measures again once it does.
|
|
46824
46880
|
*/
|
|
46825
46881
|
measureAndUpdateSlots() {
|
|
46826
46882
|
// Define the relationship between slots based on the conditions array
|
|
@@ -46829,6 +46885,13 @@ class Toolbar {
|
|
|
46829
46885
|
{ name: 'start-end', slots: ['start', 'end'] },
|
|
46830
46886
|
{ name: 'primary-secondary', slots: ['primary', 'secondary'] },
|
|
46831
46887
|
];
|
|
46888
|
+
/**
|
|
46889
|
+
* Once a size property is set, the slots cannot be narrower than it.
|
|
46890
|
+
* Remove the properties first so each slot is measured at the width of
|
|
46891
|
+
* its content, which lets the slots shrink when their content does.
|
|
46892
|
+
* This runs before paint, so the slots are never painted without a size.
|
|
46893
|
+
*/
|
|
46894
|
+
this.slotSizeVars.forEach((cssVar) => this.el.style.removeProperty(cssVar));
|
|
46832
46895
|
// First, measure all slot widths
|
|
46833
46896
|
const slotWidths = new Map();
|
|
46834
46897
|
let allMeasurementsSuccessful = true;
|
|
@@ -46887,6 +46950,8 @@ class Toolbar {
|
|
|
46887
46950
|
* Removes all slot visibility classes and slot width CSS variables.
|
|
46888
46951
|
*/
|
|
46889
46952
|
removeSlotClasses() {
|
|
46953
|
+
// The slot widths are no longer used, so there is nothing to watch.
|
|
46954
|
+
this.stopObservingSlotSizes();
|
|
46890
46955
|
this.el.classList.remove(...this.slotClasses, ...this.showClasses);
|
|
46891
46956
|
this.slotSizeVars.forEach((cssVar) => this.el.style.removeProperty(cssVar));
|
|
46892
46957
|
}
|
|
@@ -46970,14 +47035,14 @@ class Toolbar {
|
|
|
46970
47035
|
Object.assign(childStyles, style);
|
|
46971
47036
|
});
|
|
46972
47037
|
const titlePlacement = this.getTitlePlacement();
|
|
46973
|
-
return (hAsync(Host, { key: '
|
|
47038
|
+
return (hAsync(Host, { key: '2ee4ee2329ba499bd3fe24eb58f8954c86d39b01', class: {
|
|
46974
47039
|
...createColorClasses$1(this.color, {
|
|
46975
47040
|
[theme]: true,
|
|
46976
47041
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
46977
47042
|
[`toolbar-title-placement-${titlePlacement}`]: true,
|
|
46978
47043
|
}),
|
|
46979
47044
|
...childStyles,
|
|
46980
|
-
} }, hAsync("div", { key: '
|
|
47045
|
+
} }, hAsync("div", { key: '68da02a622db1ed136a31700421c5da005ae3884', class: "toolbar-background", part: "background" }), hAsync("div", { key: 'cefcad22e28e1468de024a0cbe477464a872dc66', class: "toolbar-container", part: "container" }, hAsync("slot", { key: '9ebfc464b5c32c6d2b5c81a0a0c415effa15ce3c', name: "start", onSlotchange: () => this.updateSlotClasses() }), hAsync("slot", { key: '55a07aa0000e1b02814f7a01ad1610d1d723f442', name: "secondary", onSlotchange: () => this.updateSlotClasses() }), hAsync("div", { key: '51d1e06e0463788b5f794831faadd305aa8bca75', class: "toolbar-content", part: "content" }, hAsync("slot", { key: '6982cc6886f76cf43d78e3f0e9243dc05f67d34c' })), hAsync("slot", { key: 'b00b9b9b28c1637a04781ef88b5d9474fb5c0647', name: "primary", onSlotchange: () => this.updateSlotClasses() }), hAsync("slot", { key: '4fce3b9b17f7775d0ba14cd5185e500753b4976e', name: "end", onSlotchange: () => this.updateSlotClasses() }))));
|
|
46981
47046
|
}
|
|
46982
47047
|
get el() { return getElement(this); }
|
|
46983
47048
|
static get watchers() { return {
|
package/package.json
CHANGED
package/components/p-DdOVnjsY.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{d as t,H as o,j as e,h as a,f as r,t as n}from"./p-DFBWAYvo.js";import{c as i,h as s}from"./p-BUF_V-Kg.js";import{b as d}from"./p-C93i7QCU.js";const l=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.childrenStyles=new Map,this.slotClasses=["has-start-content","has-end-content","has-primary-content","has-secondary-content"],this.showClasses=["show-start","show-end","show-primary","show-secondary"],this.slotSizeVars=["--start-end-size","--primary-secondary-size"]}componentWillLoad(){const t=Array.from(this.el.querySelectorAll("ion-buttons")),o=t.find((t=>"start"===t.slot));o&&o.classList.add("buttons-first-slot");const e=t.reverse(),a=e.find((t=>"end"===t.slot))||e.find((t=>"primary"===t.slot))||e.find((t=>"secondary"===t.slot));a&&a.classList.add("buttons-last-slot"),this.updateSlotClasses()}componentDidLoad(){this.updateSlotClasses(),this.updateSlotWidths()}titlePlacementChanged(){this.updateSlotClasses()}getTitlePlacement(){return void 0!==this.titlePlacement?this.titlePlacement:"ionic"===d(this)||"ios"===d(this)?"center":"start"}updateSlotWidths(t=0){setTimeout((()=>{!this.measureAndUpdateSlots()&&t<5&&setTimeout((()=>{this.updateSlotWidths(t+1)}),100)}))}measureAndUpdateSlots(){const t=[{name:"start-end",slots:["start","end"]},{name:"primary-secondary",slots:["primary","secondary"]}],o=new Map;let e=!0;return["start","end","primary","secondary"].forEach((a=>{if(this.el.classList.contains(`has-${a}-content`)){const r=this.el.shadowRoot?.querySelector(`slot[name="${a}"]`);if(r){if(r.assignedElements({flatten:!0}).some((t=>"IMG"===t.tagName||"ION-IMG"===t.tagName||null!==t.querySelector("img, ion-img")))){const{name:o}=t.find((t=>t.slots.includes(a)));this.el.style.setProperty(`--${o}-size`,"auto")}const n=r.offsetWidth;n>0?o.set(a,n):e=!1}}})),t.forEach((({name:t,slots:e})=>{let a=0,r=!1;e.forEach((t=>{o.has(t)&&(r=!0,a=Math.max(a,o.get(t)??0))})),r&&a>0&&this.el.style.setProperty(`--${t}-size`,`${a}px`)})),e}removeSlotClasses(){this.el.classList.remove(...this.slotClasses,...this.showClasses),this.slotSizeVars.forEach((t=>this.el.style.removeProperty(t)))}updateSlotClasses(){if("center"!==this.getTitlePlacement())return void this.removeSlotClasses();const t=[],o=[];["start","end","primary","secondary"].forEach((e=>{const a=`has-${e}-content`;this.hasSlotContent(e)?t.push(a):o.push(a)})),[{name:"end",requiredSlots:["start"],excludeSlots:["end","primary"]},{name:"start",requiredSlots:["end"],excludeSlots:["start","secondary"]},{name:"secondary",requiredSlots:["primary"],excludeSlots:["secondary","start"]},{name:"primary",requiredSlots:["secondary"],excludeSlots:["primary","end"]}].forEach((e=>{const a=e.requiredSlots.every((o=>t.includes(`has-${o}-content`))),r=e.excludeSlots.some((o=>t.includes(`has-${o}-content`))),n=`show-${e.name}`;a&&!r?t.push(n):o.push(n)})),this.el.classList.add(...t),this.el.classList.remove(...o),this.updateSlotWidths()}hasSlotContent(t){const o=this.el.shadowRoot?.querySelector(`slot[name="${t}"]`);return!!o&&o.assignedNodes().length>0}childrenStyle(t){t.stopPropagation();const o=t.target.tagName,a=t.detail,r={},n=this.childrenStyles.get(o)||{};let i=!1;Object.keys(a).forEach((t=>{const o=`toolbar-${t}`,e=a[t];e!==n[o]&&(i=!0),e&&(r[o]=!0)})),i&&(this.childrenStyles.set(o,r),e(this))}render(){const t=d(this),o={};this.childrenStyles.forEach((t=>{Object.assign(o,t)}));const e=this.getTitlePlacement();return a(r,{key:"3b97d3de5b1910257170355995eb7a50a2b6dcc4",class:{...i(this.color,{[t]:!0,"in-toolbar":s("ion-toolbar",this.el),[`toolbar-title-placement-${e}`]:!0}),...o}},a("div",{key:"26f85390aa62f118e585fd8560fba0620b30fd51",class:"toolbar-background",part:"background"}),a("div",{key:"57e32773d5642dde7f5d7cca9aaceb41b4d800bd",class:"toolbar-container",part:"container"},a("slot",{key:"5429b3f898703339749a55af6bb28d7e4d969679",name:"start",onSlotchange:()=>this.updateSlotClasses}),a("slot",{key:"c5565f7020f52a1f075d9c6908ace042d488642f",name:"secondary",onSlotchange:()=>this.updateSlotClasses}),a("div",{key:"2d083bcd57512041321a68b43d6b90144eb20166",class:"toolbar-content",part:"content"},a("slot",{key:"eb8abc0b9b96c699355891fbd0d284094cde7632"})),a("slot",{key:"ca66f2dcce1f5382ed40a120cf32f759597a11ad",name:"primary",onSlotchange:()=>this.updateSlotClasses}),a("slot",{key:"19e3eb792d45c21404fe48f119d68248b5d7dca7",name:"end",onSlotchange:()=>this.updateSlotClasses})))}get el(){return this}static get watchers(){return{titlePlacement:[{titlePlacementChanged:0}]}}static get style(){return{ionic:":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;width:100%;padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);color:var(--color);contain:content;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-container{-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);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-background{right:0;left:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));pointer-events:none}::slotted(ion-progress-bar){right:0;left:0;bottom:0;position:absolute}:host{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--color:var(--token-text-default, var(--token-primitives-neutral-1200, #242528));--border-color:currentColor;--padding-top:var(--token-space-200, var(--token-scale-200, 8px));--padding-bottom:var(--token-space-200, var(--token-scale-200, 8px));--padding-start:var(--token-space-200, var(--token-scale-200, 8px));--padding-end:var(--token-space-200, var(--token-scale-200, 8px));--min-height:var(--token-scale-1400, 56px)}.toolbar-container{gap:var(--token-space-400, var(--token-scale-400, 16px));z-index:10}.toolbar-background{z-index:-1}.toolbar-content{-ms-flex:1 1 auto;flex:1 1 auto;min-width:0}:host(.toolbar-searchbar) ::slotted(ion-searchbar){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}::slotted(ion-buttons){gap:var(--token-space-200, var(--token-scale-200, 8px))}::slotted(ion-title){-webkit-padding-start:var(--token-space-200, var(--token-scale-200, 8px));padding-inline-start:var(--token-space-200, var(--token-scale-200, 8px));-webkit-padding-end:var(--token-space-200, var(--token-scale-200, 8px));padding-inline-end:var(--token-space-200, var(--token-scale-200, 8px))}:host(.toolbar-title-large) ::slotted(ion-title){-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px))}:host(.has-end-content) slot[name=end],:host(.show-end) slot[name=end]{display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--start-end-size, 0);flex:0 0 var(--start-end-size, 0);-ms-flex-pack:end;justify-content:flex-end;text-align:end}:host(.has-start-content) slot[name=start],:host(.show-start) slot[name=start]{display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--start-end-size, 0);flex:0 0 var(--start-end-size, 0)}:host(.has-primary-content) slot[name=primary],:host(.show-primary) slot[name=primary]{display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--primary-secondary-size, 0);flex:0 0 var(--primary-secondary-size, 0);-ms-flex-pack:end;justify-content:flex-end;text-align:end}:host(.has-secondary-content) slot[name=secondary],:host(.show-secondary) slot[name=secondary]{display:-ms-flexbox;display:flex;-ms-flex:0 0 var(--primary-secondary-size, 0);flex:0 0 var(--primary-secondary-size, 0)}:host(.toolbar-title-placement-start) ::slotted(ion-title){text-align:start}:host(.toolbar-title-placement-center) ::slotted(ion-title){text-align:center}:host(.toolbar-title-placement-end) ::slotted(ion-title){text-align:end}",ios:":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;width:100%;padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);color:var(--color);contain:content;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-container{-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);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-background{right:0;left:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));pointer-events:none}::slotted(ion-progress-bar){right:0;left:0;bottom:0;position:absolute}:host{font-family:var(--ion-font-family, inherit);z-index:10}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{z-index:10}.toolbar-background{z-index:-1}:host{--background:var(--ion-toolbar-background, var(--ion-color-step-50, var(--ion-background-color-step-50, #f7f7f7)));--color:var(--ion-toolbar-color, var(--ion-text-color, #000));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.2)))));--padding-top:3px;--padding-bottom:3px;--padding-start:4px;--padding-end:4px;--min-height:44px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:4;order:4;min-width:0}:host(.toolbar-segment) .toolbar-content{display:-ms-inline-flexbox;display:inline-flex}:host(.toolbar-searchbar) .toolbar-container{padding-top:0;padding-bottom:0}:host(.toolbar-searchbar) ::slotted(*){-ms-flex-item-align:start;align-self:start}:host(.toolbar-searchbar) ::slotted(ion-chip){margin-top:3px}::slotted(ion-buttons){min-height:38px}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:3;order:3}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}:host(.toolbar-title-large) .toolbar-container{-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:start;align-items:flex-start}:host(.toolbar-title-large) .toolbar-content ion-title{-ms-flex:1;flex:1;-ms-flex-order:8;order:8;min-width:100%}",md:":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;width:100%;padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);color:var(--color);contain:content;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-container{-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);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-background{right:0;left:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));pointer-events:none}::slotted(ion-progress-bar){right:0;left:0;bottom:0;position:absolute}:host{font-family:var(--ion-font-family, inherit);z-index:10}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{z-index:10}.toolbar-background{z-index:-1}:host{--background:var(--ion-toolbar-background, var(--ion-background-color, #fff));--color:var(--ion-toolbar-color, var(--ion-text-color, #424242));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, #c1c4cd))));--padding-top:0;--padding-bottom:0;--padding-start:0;--padding-end:0;--min-height:56px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:3;order:3;min-width:0;max-width:100%}::slotted(.buttons-first-slot){-webkit-margin-start:4px;margin-inline-start:4px}::slotted(.buttons-last-slot){-webkit-margin-end:4px;margin-inline-end:4px}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:4;order:4}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}"}}},[289,"ion-toolbar",{color:[513],titlePlacement:[1,"title-placement"]},[[0,"ionStyle","childrenStyle"]],{titlePlacement:[{titlePlacementChanged:0}]}]);function c(){"undefined"!=typeof customElements&&["ion-toolbar"].forEach((t=>{"ion-toolbar"===t&&(customElements.get(n(t))||customElements.define(n(t),l))}))}export{l as T,c as d}
|