@ionic/core 9.0.11-nightly.20261111 → 9.0.11
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-back-button.js +1 -1
- package/components/ion-breadcrumb.js +1 -1
- package/components/ion-button.js +1 -1
- package/components/ion-card.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-item-option.js +1 -1
- package/components/ion-item.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/p-BLmEEVy_.js +4 -0
- package/components/p-C-Jb89-w.js +4 -0
- package/components/{p-Dy7x-KDF.js → p-DBlNaRT2.js} +1 -1
- package/components/p-DBtEgJe4.js +4 -0
- package/components/{p-C-SO5kIs.js → p-nZiC4mrP.js} +1 -1
- package/dist/cjs/attribute-controller-BRwSyjfI.js +219 -0
- package/dist/cjs/ion-back-button.cjs.entry.js +11 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +26 -4
- package/dist/cjs/ion-button_2.cjs.entry.js +10 -4
- package/dist/cjs/ion-card_5.cjs.entry.js +23 -3
- package/dist/cjs/ion-fab_3.cjs.entry.js +9 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +13 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +19 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +11 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +14 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +7 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +8 -3
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +11 -2
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/back-button/back-button.js +12 -3
- package/dist/collection/components/breadcrumb/breadcrumb.js +28 -5
- package/dist/collection/components/button/button.js +10 -4
- package/dist/collection/components/card/card.js +24 -3
- package/dist/collection/components/fab-button/fab-button.js +10 -3
- package/dist/collection/components/item/item.js +19 -3
- package/dist/collection/components/item-option/item-option.js +14 -3
- package/dist/collection/components/menu-button/menu-button.js +12 -3
- package/dist/collection/components/router-link/router-link.js +15 -3
- package/dist/collection/components/segment-button/segment-button.js +7 -2
- package/dist/collection/components/select/select.js +8 -3
- package/dist/collection/components/tab-button/tab-button.js +12 -3
- package/dist/collection/utils/attribute-controller.js +107 -20
- package/dist/docs.json +1 -1
- package/dist/esm/attribute-controller-BMdZtDiw.js +215 -0
- package/dist/esm/ion-back-button.entry.js +12 -3
- package/dist/esm/ion-breadcrumb_2.entry.js +27 -5
- package/dist/esm/ion-button_2.entry.js +10 -4
- package/dist/esm/ion-card_5.entry.js +23 -3
- package/dist/esm/ion-fab_3.entry.js +10 -3
- package/dist/esm/ion-item-option_3.entry.js +14 -3
- package/dist/esm/ion-item_8.entry.js +19 -3
- package/dist/esm/ion-menu_3.entry.js +12 -3
- package/dist/esm/ion-route_4.entry.js +15 -3
- package/dist/esm/ion-segment_2.entry.js +7 -2
- package/dist/esm/ion-select_3.entry.js +8 -3
- package/dist/esm/ion-tab-bar_2.entry.js +12 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-13cebf9c.entry.js +4 -0
- package/dist/ionic/p-2JXUmy2G.js +4 -0
- package/dist/ionic/p-41e7f290.entry.js +4 -0
- package/dist/ionic/p-498151f8.entry.js +4 -0
- package/dist/ionic/p-499eba5c.entry.js +4 -0
- package/dist/ionic/p-4dd92223.entry.js +4 -0
- package/dist/ionic/p-542337a7.entry.js +4 -0
- package/dist/ionic/p-872ad61b.entry.js +4 -0
- package/dist/ionic/p-a4c1dd02.entry.js +4 -0
- package/dist/ionic/p-a6666b03.entry.js +4 -0
- package/dist/ionic/p-df9b3bc5.entry.js +4 -0
- package/dist/ionic/p-dfc8cf89.entry.js +4 -0
- package/dist/ionic/p-e702cb5c.entry.js +4 -0
- package/dist/types/components/back-button/back-button.d.ts +3 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +8 -0
- package/dist/types/components/button/button.d.ts +1 -0
- package/dist/types/components/card/card.d.ts +6 -0
- package/dist/types/components/fab-button/fab-button.d.ts +2 -0
- package/dist/types/components/item/item.d.ts +6 -0
- package/dist/types/components/item-option/item-option.d.ts +4 -0
- package/dist/types/components/menu-button/menu-button.d.ts +3 -0
- package/dist/types/components/router-link/router-link.d.ts +5 -0
- package/dist/types/components/segment-button/segment-button.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +1 -0
- package/dist/types/components/tab-button/tab-button.d.ts +3 -0
- package/dist/types/utils/attribute-controller.d.ts +28 -6
- package/hydrate/index.js +359 -150
- package/hydrate/index.mjs +359 -150
- package/package.json +1 -1
- package/components/p-C0TdbIVo.js +0 -4
- package/components/p-CCFj0kgH.js +0 -4
- package/components/p-kKGBuIkf.js +0 -4
- package/dist/cjs/attribute-controller-0-lwbVEj.js +0 -131
- package/dist/esm/attribute-controller-ItNOXNp9.js +0 -128
- package/dist/ionic/p-013b9aba.entry.js +0 -4
- package/dist/ionic/p-1252621e.entry.js +0 -4
- package/dist/ionic/p-27960f65.entry.js +0 -4
- package/dist/ionic/p-43729675.entry.js +0 -4
- package/dist/ionic/p-84470714.entry.js +0 -4
- package/dist/ionic/p-8dQB1sG_.js +0 -4
- package/dist/ionic/p-9515f840.entry.js +0 -4
- package/dist/ionic/p-96d040b0.entry.js +0 -4
- package/dist/ionic/p-9d7e5a0b.entry.js +0 -4
- package/dist/ionic/p-a45caa30.entry.js +0 -4
- package/dist/ionic/p-b0faaae2.entry.js +0 -4
- package/dist/ionic/p-c56c23b6.entry.js +0 -4
- package/dist/ionic/p-c7ea2647.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -11941,6 +11941,215 @@ class Avatar {
|
|
|
11941
11941
|
}; }
|
|
11942
11942
|
}
|
|
11943
11943
|
|
|
11944
|
+
/**
|
|
11945
|
+
* Copies a set of attributes off the host element so they can be applied to an element
|
|
11946
|
+
* inside the shadow root, then keeps that copy in sync as the host attributes change.
|
|
11947
|
+
* Using `inheritAttributes` alone copies once at load, so anything written to the host
|
|
11948
|
+
* afterwards never reaches the element the assistive technology reads.
|
|
11949
|
+
*
|
|
11950
|
+
* Create the controller in `componentWillLoad`. It takes the initial copy and starts
|
|
11951
|
+
* watching right away, so `init()` is only needed to resume after a move.
|
|
11952
|
+
*
|
|
11953
|
+
* Two things to know before adopting it. Unless `moveFromHost` says otherwise, only the
|
|
11954
|
+
* initial copy removes the attributes from the host, so a value written after load sits
|
|
11955
|
+
* on the host as well as on the element it is applied to, which matters if the host has
|
|
11956
|
+
* a role of its own. And an attribute moved off the host can never be removed, only
|
|
11957
|
+
* overwritten, since removing it from the host doesn't fire a mutation.
|
|
11958
|
+
* An empty string works for `aria-label` and friends, but a token-valued attribute
|
|
11959
|
+
* has to be set to its default instead, so `aria-pressed="false"` rather than empty.
|
|
11960
|
+
*
|
|
11961
|
+
* @internal
|
|
11962
|
+
* @param el The host element to copy from and watch.
|
|
11963
|
+
* @param attributes The attributes to copy and watch.
|
|
11964
|
+
* @param onChange Called after `attributes` changes, so the component can re-render.
|
|
11965
|
+
* @param hostOwnedAttributes Attributes copied at load but not watched. Use it for
|
|
11966
|
+
* attributes the component renders on its own `<Host>`, since a later change to one of
|
|
11967
|
+
* those is the component's own write, and for attributes that would put a second node in
|
|
11968
|
+
* the accessibility tree if the host kept a copy alongside the one we apply.
|
|
11969
|
+
* @param moveFromHost Called on load, after every write and on `refresh()` to decide whether
|
|
11970
|
+
* a value moves off the host. A rejected value stays on the host and is left out of
|
|
11971
|
+
* `attributes`. It can read component state, as long as the component calls `refresh()`
|
|
11972
|
+
* when that state changes.
|
|
11973
|
+
*/
|
|
11974
|
+
const createAttributeController = (el, attributes, onChange, hostOwnedAttributes = [], moveFromHost) => {
|
|
11975
|
+
let inherited = inheritAttributes$1(el, attributes);
|
|
11976
|
+
let observer;
|
|
11977
|
+
const staysOnHost = (name, value) => moveFromHost !== undefined && value != null && !moveFromHost(name, value);
|
|
11978
|
+
const watchedAttributes = attributes.filter((attr) => !hostOwnedAttributes.includes(attr));
|
|
11979
|
+
/**
|
|
11980
|
+
* The names still on the host, which is everything written after load. The initial
|
|
11981
|
+
* copy removes what it captures, so a missing attribute only counts as a removal
|
|
11982
|
+
* when its name is in here.
|
|
11983
|
+
*/
|
|
11984
|
+
const hostWritten = new Set();
|
|
11985
|
+
const setPresence = (name, value) => {
|
|
11986
|
+
if (value === null) {
|
|
11987
|
+
hostWritten.delete(name);
|
|
11988
|
+
}
|
|
11989
|
+
else {
|
|
11990
|
+
hostWritten.add(name);
|
|
11991
|
+
}
|
|
11992
|
+
};
|
|
11993
|
+
const moveOffHost = (changed) => {
|
|
11994
|
+
if (moveFromHost === undefined) {
|
|
11995
|
+
return;
|
|
11996
|
+
}
|
|
11997
|
+
for (const [name, value] of Object.entries(changed)) {
|
|
11998
|
+
if (value != null && !staysOnHost(name, value)) {
|
|
11999
|
+
el.removeAttribute(name);
|
|
12000
|
+
// Without this, the missing attribute would read as a developer removal later.
|
|
12001
|
+
hostWritten.delete(name);
|
|
12002
|
+
}
|
|
12003
|
+
}
|
|
12004
|
+
};
|
|
12005
|
+
// The initial copy took everything off the host, so put back what has to stay there.
|
|
12006
|
+
for (const [name, value] of Object.entries(inherited)) {
|
|
12007
|
+
if (staysOnHost(name, value)) {
|
|
12008
|
+
el.setAttribute(name, value);
|
|
12009
|
+
hostWritten.add(name);
|
|
12010
|
+
}
|
|
12011
|
+
}
|
|
12012
|
+
/**
|
|
12013
|
+
* Nothing is watching while the host is out of the tree, since `disconnectedCallback`
|
|
12014
|
+
* calls `destroy()`, and `forceUpdate` is a no-op on a disconnected host anyway. So
|
|
12015
|
+
* the host has to be re-read on the way back in.
|
|
12016
|
+
*/
|
|
12017
|
+
const readMissedChanges = () => {
|
|
12018
|
+
const changed = {};
|
|
12019
|
+
for (const name of watchedAttributes) {
|
|
12020
|
+
const value = el.getAttribute(name);
|
|
12021
|
+
const wasOnHost = hostWritten.has(name);
|
|
12022
|
+
setPresence(name, value);
|
|
12023
|
+
/**
|
|
12024
|
+
* An attribute that was never written to the host is missing because the initial
|
|
12025
|
+
* copy took it, not because the developer cleared it.
|
|
12026
|
+
*/
|
|
12027
|
+
if ((value === null && !wasOnHost) || value === inherited[name]) {
|
|
12028
|
+
continue;
|
|
12029
|
+
}
|
|
12030
|
+
changed[name] = value;
|
|
12031
|
+
}
|
|
12032
|
+
moveOffHost(changed);
|
|
12033
|
+
if (Object.keys(changed).length > 0) {
|
|
12034
|
+
inherited = { ...inherited, ...changed };
|
|
12035
|
+
onChange();
|
|
12036
|
+
}
|
|
12037
|
+
};
|
|
12038
|
+
const handleRecords = (mutations) => {
|
|
12039
|
+
const changed = {};
|
|
12040
|
+
for (const mutation of mutations) {
|
|
12041
|
+
const name = mutation.attributeName;
|
|
12042
|
+
// A removed attribute reads back as null, which clears it from the element the
|
|
12043
|
+
// values are spread onto.
|
|
12044
|
+
const value = el.getAttribute(name);
|
|
12045
|
+
setPresence(name, value);
|
|
12046
|
+
changed[name] = value;
|
|
12047
|
+
}
|
|
12048
|
+
moveOffHost(changed);
|
|
12049
|
+
// Drop the removals `moveOffHost` just queued, or they'd read back as the developer
|
|
12050
|
+
// clearing the attribute.
|
|
12051
|
+
observer?.takeRecords();
|
|
12052
|
+
inherited = { ...inherited, ...changed };
|
|
12053
|
+
onChange();
|
|
12054
|
+
};
|
|
12055
|
+
const init = () => {
|
|
12056
|
+
// There is no MutationObserver in SSR or the hydrate build.
|
|
12057
|
+
if (observer !== undefined || watchedAttributes.length === 0 || win$1 === undefined || !('MutationObserver' in win$1)) {
|
|
12058
|
+
return;
|
|
12059
|
+
}
|
|
12060
|
+
readMissedChanges();
|
|
12061
|
+
observer = new MutationObserver(handleRecords);
|
|
12062
|
+
observer.observe(el, { attributeFilter: watchedAttributes });
|
|
12063
|
+
};
|
|
12064
|
+
const destroy = () => {
|
|
12065
|
+
observer?.disconnect();
|
|
12066
|
+
observer = undefined;
|
|
12067
|
+
};
|
|
12068
|
+
const refresh = () => {
|
|
12069
|
+
if (moveFromHost === undefined) {
|
|
12070
|
+
return;
|
|
12071
|
+
}
|
|
12072
|
+
// A write made earlier in the same tick hasn't reached `inherited` yet, so take it in
|
|
12073
|
+
// first, or the loop below would act on the old value and drop the new one.
|
|
12074
|
+
if (observer !== undefined) {
|
|
12075
|
+
const pending = observer.takeRecords();
|
|
12076
|
+
if (pending.length > 0) {
|
|
12077
|
+
handleRecords(pending);
|
|
12078
|
+
}
|
|
12079
|
+
}
|
|
12080
|
+
else {
|
|
12081
|
+
readMissedChanges();
|
|
12082
|
+
}
|
|
12083
|
+
for (const [name, value] of Object.entries(inherited)) {
|
|
12084
|
+
if (value == null) {
|
|
12085
|
+
continue;
|
|
12086
|
+
}
|
|
12087
|
+
const onHost = el.hasAttribute(name);
|
|
12088
|
+
if (staysOnHost(name, value) && !onHost) {
|
|
12089
|
+
el.setAttribute(name, value);
|
|
12090
|
+
hostWritten.add(name);
|
|
12091
|
+
}
|
|
12092
|
+
else if (!staysOnHost(name, value) && onHost) {
|
|
12093
|
+
el.removeAttribute(name);
|
|
12094
|
+
hostWritten.delete(name);
|
|
12095
|
+
}
|
|
12096
|
+
}
|
|
12097
|
+
// Drop our own writes, or they'd read back as the developer's.
|
|
12098
|
+
observer?.takeRecords();
|
|
12099
|
+
};
|
|
12100
|
+
/**
|
|
12101
|
+
* Has to run after the initial copy, because that copy removes the attributes from the
|
|
12102
|
+
* host and an observer armed any earlier would read the removal as a developer clearing
|
|
12103
|
+
* them.
|
|
12104
|
+
*/
|
|
12105
|
+
init();
|
|
12106
|
+
return {
|
|
12107
|
+
get attributes() {
|
|
12108
|
+
if (moveFromHost === undefined) {
|
|
12109
|
+
return inherited;
|
|
12110
|
+
}
|
|
12111
|
+
const moved = {};
|
|
12112
|
+
for (const [name, value] of Object.entries(inherited)) {
|
|
12113
|
+
if (!staysOnHost(name, value)) {
|
|
12114
|
+
moved[name] = value;
|
|
12115
|
+
}
|
|
12116
|
+
}
|
|
12117
|
+
return moved;
|
|
12118
|
+
},
|
|
12119
|
+
init,
|
|
12120
|
+
destroy,
|
|
12121
|
+
refresh,
|
|
12122
|
+
};
|
|
12123
|
+
};
|
|
12124
|
+
/**
|
|
12125
|
+
* The `createAttributeController` equivalent of `inheritAriaAttributes`, which copies and
|
|
12126
|
+
* watches every ARIA attribute plus `role`.
|
|
12127
|
+
*
|
|
12128
|
+
* @internal
|
|
12129
|
+
* @param el The host element to copy from and watch.
|
|
12130
|
+
* @param onChange Called after the attributes change, so the component can re-render.
|
|
12131
|
+
* @param hostOwnedAttributes Attributes copied at load but not watched. See
|
|
12132
|
+
* `createAttributeController`.
|
|
12133
|
+
*/
|
|
12134
|
+
const createAriaAttributeController = (el, onChange, hostOwnedAttributes = []) => {
|
|
12135
|
+
return createAttributeController(el, ariaAttributes, onChange, hostOwnedAttributes);
|
|
12136
|
+
};
|
|
12137
|
+
/**
|
|
12138
|
+
* Moves `tabindex` from the host to the native element in the shadow root, including later
|
|
12139
|
+
* writes, since a host with a `tabindex` is an extra tab stop with no name. A negative
|
|
12140
|
+
* `tabindex` stays on the host, where it already skips the shadow root and the focus
|
|
12141
|
+
* utilities expect to find it.
|
|
12142
|
+
*
|
|
12143
|
+
* @internal
|
|
12144
|
+
* @param el The host element to copy from and watch.
|
|
12145
|
+
* @param onChange Called after `tabindex` changes, so the component can re-render.
|
|
12146
|
+
* @param hasNativeElement Whether the component renders a native element to move `tabindex`
|
|
12147
|
+
* to. Call `refresh()` when the answer changes.
|
|
12148
|
+
*/
|
|
12149
|
+
const createTabindexController = (el, onChange, hasNativeElement = () => true) => {
|
|
12150
|
+
return createAttributeController(el, ['tabindex'], onChange, [], (_, value) => hasNativeElement() && parseInt(value, 10) >= 0);
|
|
12151
|
+
};
|
|
12152
|
+
|
|
11944
12153
|
const backButtonIosCss = () => `:host{--background:transparent;--color-focused:currentColor;--color-hover:currentColor;--icon-margin-top:0;--icon-margin-bottom:0;--icon-padding-top:0;--icon-padding-end:0;--icon-padding-bottom:0;--icon-padding-start:0;--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--min-width:auto;--min-height:auto;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--opacity:1;--ripple-color:currentColor;--transition:background-color, opacity 100ms linear;display:none;min-width:var(--min-width);min-height:var(--min-height);color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-kerning:none;font-kerning:none}ion-ripple-effect{color:var(--ripple-color)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.show-back-button){display:block}:host(.back-button-disabled){cursor:default;opacity:0.5;pointer-events:none}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-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);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;opacity:var(--opacity);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{-webkit-padding-start:var(--icon-padding-start);padding-inline-start:var(--icon-padding-start);-webkit-padding-end:var(--icon-padding-end);padding-inline-end:var(--icon-padding-end);padding-top:var(--icon-padding-top);padding-bottom:var(--icon-padding-bottom);-webkit-margin-start:var(--icon-margin-start);margin-inline-start:var(--icon-margin-start);-webkit-margin-end:var(--icon-margin-end);margin-inline-end:var(--icon-margin-end);margin-top:var(--icon-margin-top);margin-bottom:var(--icon-margin-bottom);display:inherit;font-size:var(--icon-font-size);font-weight:var(--icon-font-weight);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)}}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-hover:transparent;--background-hover-opacity:1;--background-focused:currentColor;--background-focused-opacity:.1;--border-radius:4px;--color:var(--ion-color-primary, #0054e9);--icon-margin-end:1px;--icon-margin-start:-4px;--icon-font-size:1.6em;--min-height:32px;font-size:clamp(17px, 1.0625rem, 21.998px)}.button-native{-webkit-transform:translateZ(0);transform:translateZ(0);overflow:visible;z-index:99}:host(.ion-activated) .button-native{opacity:0.4}@media (any-hover: hover){:host(:hover){opacity:0.6}}`;
|
|
11945
12154
|
|
|
11946
12155
|
const backButtonMdCss = () => `:host{--background:transparent;--color-focused:currentColor;--color-hover:currentColor;--icon-margin-top:0;--icon-margin-bottom:0;--icon-padding-top:0;--icon-padding-end:0;--icon-padding-bottom:0;--icon-padding-start:0;--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--min-width:auto;--min-height:auto;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--opacity:1;--ripple-color:currentColor;--transition:background-color, opacity 100ms linear;display:none;min-width:var(--min-width);min-height:var(--min-height);color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-kerning:none;font-kerning:none}ion-ripple-effect{color:var(--ripple-color)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.show-back-button){display:block}:host(.back-button-disabled){cursor:default;opacity:0.5;pointer-events:none}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-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);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;opacity:var(--opacity);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{-webkit-padding-start:var(--icon-padding-start);padding-inline-start:var(--icon-padding-start);-webkit-padding-end:var(--icon-padding-end);padding-inline-end:var(--icon-padding-end);padding-top:var(--icon-padding-top);padding-bottom:var(--icon-padding-bottom);-webkit-margin-start:var(--icon-margin-start);margin-inline-start:var(--icon-margin-start);-webkit-margin-end:var(--icon-margin-end);margin-inline-end:var(--icon-margin-end);margin-top:var(--icon-margin-top);margin-bottom:var(--icon-margin-bottom);display:inherit;font-size:var(--icon-font-size);font-weight:var(--icon-font-weight);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)}}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--border-radius:4px;--background-focused:currentColor;--background-focused-opacity:.12;--background-hover:currentColor;--background-hover-opacity:0.04;--color:currentColor;--icon-margin-end:0;--icon-margin-start:0;--icon-font-size:1.5rem;--icon-font-weight:normal;--min-height:32px;--min-width:44px;--padding-start:12px;--padding-end:12px;font-size:0.875rem;font-weight:500;text-transform:uppercase}:host(.back-button-has-icon-only){--border-radius:50%;min-width:48px;min-height:48px;aspect-ratio:1/1}.button-native{-webkit-box-shadow:none;box-shadow:none}.button-text{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0}ion-icon{line-height:0.67;text-align:start}@media (any-hover: hover){:host(.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}:host(.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}`;
|
|
@@ -11975,10 +12184,17 @@ class BackButton {
|
|
|
11975
12184
|
}
|
|
11976
12185
|
componentWillLoad() {
|
|
11977
12186
|
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
12187
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
11978
12188
|
if (this.defaultHref === undefined) {
|
|
11979
12189
|
this.defaultHref = config.get('backButtonDefaultHref');
|
|
11980
12190
|
}
|
|
11981
12191
|
}
|
|
12192
|
+
connectedCallback() {
|
|
12193
|
+
this.tabindexController?.init();
|
|
12194
|
+
}
|
|
12195
|
+
disconnectedCallback() {
|
|
12196
|
+
this.tabindexController?.destroy();
|
|
12197
|
+
}
|
|
11982
12198
|
get backButtonIcon() {
|
|
11983
12199
|
const icon = this.icon;
|
|
11984
12200
|
if (icon != null) {
|
|
@@ -12012,7 +12228,8 @@ class BackButton {
|
|
|
12012
12228
|
const showBackButton = defaultHref !== undefined;
|
|
12013
12229
|
const mode = getIonMode$1(this);
|
|
12014
12230
|
const ariaLabel = inheritedAttributes['aria-label'] || backButtonText || 'back';
|
|
12015
|
-
|
|
12231
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
12232
|
+
return (hAsync(Host, { key: '0b7d30b4421e69c01041819a242bb4d57ee08cdd', onClick: this.onClick, class: createColorClasses$1(color, {
|
|
12016
12233
|
[mode]: true,
|
|
12017
12234
|
button: true, // ion-buttons target .button
|
|
12018
12235
|
'back-button-disabled': disabled,
|
|
@@ -12022,7 +12239,7 @@ class BackButton {
|
|
|
12022
12239
|
'ion-activatable': true,
|
|
12023
12240
|
'ion-focusable': true,
|
|
12024
12241
|
'show-back-button': showBackButton,
|
|
12025
|
-
}) }, hAsync("button", { key: '
|
|
12242
|
+
}) }, hAsync("button", { key: '20bf90c1b19af213eb7db6fb105423b1d5552cc7', type: type, disabled: disabled, class: "button-native", part: "native", "aria-label": ariaLabel, ...tabindexAttributes }, hAsync("span", { key: '1472b6bac0ae85a040f8de0a505cc6479e96b672', class: "button-inner" }, backButtonIcon && (hAsync("ion-icon", { key: '223376e1501ca203b9f6d004707dd1d18b5fc076', part: "icon", icon: backButtonIcon, "aria-hidden": "true", lazy: false, "flip-rtl": icon === undefined })), backButtonText && (hAsync("span", { key: '0e94d0b6c930193ed3762946731cf9f4ae626b72', part: "text", "aria-hidden": "true", class: "button-text" }, backButtonText))), mode === 'md' && hAsync("ion-ripple-effect", { key: '7ef5b94fbbca517f333d1ae55198b373d843fec4', type: this.rippleType }))));
|
|
12026
12243
|
}
|
|
12027
12244
|
get el() { return getElement(this); }
|
|
12028
12245
|
static get style() { return {
|
|
@@ -12190,6 +12407,21 @@ class Breadcrumb {
|
|
|
12190
12407
|
}
|
|
12191
12408
|
componentWillLoad() {
|
|
12192
12409
|
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
12410
|
+
// A breadcrumb without an `href` has no native link, so `tabindex` stays on the host.
|
|
12411
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate(), () => this.isClickable());
|
|
12412
|
+
}
|
|
12413
|
+
/**
|
|
12414
|
+
* Adding or removing `href` adds or removes the native link, so `tabindex` has to move
|
|
12415
|
+
* with it.
|
|
12416
|
+
*/
|
|
12417
|
+
hrefChanged() {
|
|
12418
|
+
this.tabindexController?.refresh();
|
|
12419
|
+
}
|
|
12420
|
+
connectedCallback() {
|
|
12421
|
+
this.tabindexController?.init();
|
|
12422
|
+
}
|
|
12423
|
+
disconnectedCallback() {
|
|
12424
|
+
this.tabindexController?.destroy();
|
|
12193
12425
|
}
|
|
12194
12426
|
isClickable() {
|
|
12195
12427
|
return this.href !== undefined;
|
|
@@ -12197,6 +12429,7 @@ class Breadcrumb {
|
|
|
12197
12429
|
render() {
|
|
12198
12430
|
const { color, active, collapsed, disabled, download, el, inheritedAttributes, last, routerAnimation, routerDirection, separator, showCollapsedIndicator, target, } = this;
|
|
12199
12431
|
const clickable = this.isClickable();
|
|
12432
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
12200
12433
|
const TagType = this.href === undefined ? 'span' : 'a';
|
|
12201
12434
|
// Links can still be tabbed to when set to disabled if they have an href
|
|
12202
12435
|
// in order to truly disable them we can keep it as an anchor but remove the href
|
|
@@ -12213,7 +12446,7 @@ class Breadcrumb {
|
|
|
12213
12446
|
// to show the separator as long as it isn't also the last breadcrumb
|
|
12214
12447
|
// otherwise if not collapsed use the value in separator
|
|
12215
12448
|
const showSeparator = last ? false : collapsed ? (showCollapsedIndicator && !last ? true : false) : separator;
|
|
12216
|
-
return (hAsync(Host, { key: '
|
|
12449
|
+
return (hAsync(Host, { key: '6f50e8b42045b81771ffd123a3cb708c603c1541', onClick: (ev) => openURL(href, ev, routerDirection, routerAnimation), "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
|
|
12217
12450
|
[mode]: true,
|
|
12218
12451
|
'breadcrumb-active': active,
|
|
12219
12452
|
'breadcrumb-collapsed': collapsed,
|
|
@@ -12223,17 +12456,22 @@ class Breadcrumb {
|
|
|
12223
12456
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
12224
12457
|
'ion-activatable': clickable,
|
|
12225
12458
|
'ion-focusable': clickable,
|
|
12226
|
-
}) }, hAsync(TagType, { key: '
|
|
12459
|
+
}) }, hAsync(TagType, { key: '4ac14d323e1d35e987862aa9b875d30be2310a71', ...attrs, class: "breadcrumb-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, ...inheritedAttributes, ...tabindexAttributes }, hAsync("slot", { key: 'a3598ed5bc506acc4f5bef525cd2404b00228620', name: "start" }), hAsync("slot", { key: '0696a0ffd1513c1d93deb269fdf600e9ef434f17' }), hAsync("slot", { key: 'bf315bd49788604c27b8ba354796250b56f2fcb0', name: "end" })), showCollapsedIndicator && (hAsync("button", { key: 'b130482d7ed16e3c452fa779b0696d1f8687e379', part: "collapsed-indicator", "aria-label": "Show more breadcrumbs", onClick: () => this.collapsedIndicatorClick(), ref: (collapsedEl) => (this.collapsedRef = collapsedEl), class: {
|
|
12227
12460
|
'breadcrumbs-collapsed-indicator': true,
|
|
12228
|
-
} }, hAsync("ion-icon", { key: '
|
|
12461
|
+
} }, hAsync("ion-icon", { key: 'd5094d69a6477b390afaa230f76011bef97f386f', "aria-hidden": "true", icon: ellipsisHorizontal, lazy: false }))), showSeparator && (
|
|
12229
12462
|
/**
|
|
12230
12463
|
* Separators should not be announced by narrators.
|
|
12231
12464
|
* We add aria-hidden on the span so that this applies
|
|
12232
12465
|
* to any custom separators too.
|
|
12233
12466
|
*/
|
|
12234
|
-
hAsync("span", { key: '
|
|
12467
|
+
hAsync("span", { key: '98421acb32aa73507ea1ab078555c20f4bdef6cd', class: "breadcrumb-separator", part: "separator", "aria-hidden": "true" }, hAsync("slot", { key: '8b37779f2003554631a923a8d7ce2436238d1b05', name: "separator" }, mode === 'ios' ? (hAsync("ion-icon", { icon: chevronForwardOutline, lazy: false, "flip-rtl": true })) : (hAsync("span", null, "/")))))));
|
|
12235
12468
|
}
|
|
12236
12469
|
get el() { return getElement(this); }
|
|
12470
|
+
static get watchers() { return {
|
|
12471
|
+
"href": [{
|
|
12472
|
+
"hrefChanged": 0
|
|
12473
|
+
}]
|
|
12474
|
+
}; }
|
|
12237
12475
|
static get style() { return {
|
|
12238
12476
|
ios: breadcrumbIosCss(),
|
|
12239
12477
|
md: breadcrumbMdCss()
|
|
@@ -12415,128 +12653,6 @@ class Breadcrumbs {
|
|
|
12415
12653
|
}; }
|
|
12416
12654
|
}
|
|
12417
12655
|
|
|
12418
|
-
/**
|
|
12419
|
-
* Copies a set of attributes off the host element so they can be applied to an element
|
|
12420
|
-
* inside the shadow root, then keeps that copy in sync as the host attributes change.
|
|
12421
|
-
* Using `inheritAttributes` alone copies once at load, so anything written to the host
|
|
12422
|
-
* afterwards never reaches the element the assistive technology reads.
|
|
12423
|
-
*
|
|
12424
|
-
* Create the controller in `componentWillLoad`. It takes the initial copy and starts
|
|
12425
|
-
* watching right away, so `init()` is only needed to resume after a move.
|
|
12426
|
-
*
|
|
12427
|
-
* Two things to know before adopting it. Only the initial copy removes the attributes
|
|
12428
|
-
* from the host, so a value written after load sits on the host as well as on the
|
|
12429
|
-
* element it is applied to, which matters if the host has a role of its own. And an
|
|
12430
|
-
* attribute from the initial markup can never be removed, only overwritten, since the
|
|
12431
|
-
* copy already took it off the host and a `removeAttribute` there fires no mutation.
|
|
12432
|
-
* An empty string works for `aria-label` and friends, but a token-valued attribute
|
|
12433
|
-
* has to be set to its default instead, so `aria-pressed="false"` rather than empty.
|
|
12434
|
-
*
|
|
12435
|
-
* @internal
|
|
12436
|
-
* @param el The host element to copy from and watch.
|
|
12437
|
-
* @param attributes The attributes to copy and watch.
|
|
12438
|
-
* @param onChange Called after `attributes` changes, so the component can re-render.
|
|
12439
|
-
* @param hostOwnedAttributes Attributes copied at load but not watched. Use it for
|
|
12440
|
-
* attributes the component renders on its own `<Host>`, since a later change to one of
|
|
12441
|
-
* those is the component's own write, and for attributes that would put a second node in
|
|
12442
|
-
* the accessibility tree if the host kept a copy alongside the one we apply.
|
|
12443
|
-
*/
|
|
12444
|
-
const createAttributeController = (el, attributes, onChange, hostOwnedAttributes = []) => {
|
|
12445
|
-
let inherited = inheritAttributes$1(el, attributes);
|
|
12446
|
-
let observer;
|
|
12447
|
-
const watchedAttributes = attributes.filter((attr) => !hostOwnedAttributes.includes(attr));
|
|
12448
|
-
/**
|
|
12449
|
-
* The names still on the host, which is everything written after load. The initial
|
|
12450
|
-
* copy removes what it captures, so a missing attribute only counts as a removal
|
|
12451
|
-
* when its name is in here.
|
|
12452
|
-
*/
|
|
12453
|
-
const hostWritten = new Set();
|
|
12454
|
-
const setPresence = (name, value) => {
|
|
12455
|
-
if (value === null) {
|
|
12456
|
-
hostWritten.delete(name);
|
|
12457
|
-
}
|
|
12458
|
-
else {
|
|
12459
|
-
hostWritten.add(name);
|
|
12460
|
-
}
|
|
12461
|
-
};
|
|
12462
|
-
/**
|
|
12463
|
-
* Nothing is watching while the host is out of the tree, since `disconnectedCallback`
|
|
12464
|
-
* calls `destroy()`, and `forceUpdate` is a no-op on a disconnected host anyway. So
|
|
12465
|
-
* the host has to be re-read on the way back in.
|
|
12466
|
-
*/
|
|
12467
|
-
const readMissedChanges = () => {
|
|
12468
|
-
const changed = {};
|
|
12469
|
-
for (const name of watchedAttributes) {
|
|
12470
|
-
const value = el.getAttribute(name);
|
|
12471
|
-
const wasOnHost = hostWritten.has(name);
|
|
12472
|
-
setPresence(name, value);
|
|
12473
|
-
/**
|
|
12474
|
-
* An attribute that was never written to the host is missing because the initial
|
|
12475
|
-
* copy took it, not because the developer cleared it.
|
|
12476
|
-
*/
|
|
12477
|
-
if ((value === null && !wasOnHost) || value === inherited[name]) {
|
|
12478
|
-
continue;
|
|
12479
|
-
}
|
|
12480
|
-
changed[name] = value;
|
|
12481
|
-
}
|
|
12482
|
-
if (Object.keys(changed).length > 0) {
|
|
12483
|
-
inherited = { ...inherited, ...changed };
|
|
12484
|
-
onChange();
|
|
12485
|
-
}
|
|
12486
|
-
};
|
|
12487
|
-
const init = () => {
|
|
12488
|
-
// There is no MutationObserver in SSR or the hydrate build.
|
|
12489
|
-
if (observer !== undefined || watchedAttributes.length === 0 || win$1 === undefined || !('MutationObserver' in win$1)) {
|
|
12490
|
-
return;
|
|
12491
|
-
}
|
|
12492
|
-
readMissedChanges();
|
|
12493
|
-
observer = new MutationObserver((mutations) => {
|
|
12494
|
-
const changed = {};
|
|
12495
|
-
for (const mutation of mutations) {
|
|
12496
|
-
const name = mutation.attributeName;
|
|
12497
|
-
// A removed attribute reads back as null, which clears it from the element the
|
|
12498
|
-
// values are spread onto.
|
|
12499
|
-
const value = el.getAttribute(name);
|
|
12500
|
-
setPresence(name, value);
|
|
12501
|
-
changed[name] = value;
|
|
12502
|
-
}
|
|
12503
|
-
inherited = { ...inherited, ...changed };
|
|
12504
|
-
onChange();
|
|
12505
|
-
});
|
|
12506
|
-
observer.observe(el, { attributeFilter: watchedAttributes });
|
|
12507
|
-
};
|
|
12508
|
-
const destroy = () => {
|
|
12509
|
-
observer?.disconnect();
|
|
12510
|
-
observer = undefined;
|
|
12511
|
-
};
|
|
12512
|
-
/**
|
|
12513
|
-
* Has to run after the initial copy, because that copy removes the attributes from the
|
|
12514
|
-
* host and an observer armed any earlier would read the removal as a developer clearing
|
|
12515
|
-
* them.
|
|
12516
|
-
*/
|
|
12517
|
-
init();
|
|
12518
|
-
return {
|
|
12519
|
-
get attributes() {
|
|
12520
|
-
return inherited;
|
|
12521
|
-
},
|
|
12522
|
-
init,
|
|
12523
|
-
destroy,
|
|
12524
|
-
};
|
|
12525
|
-
};
|
|
12526
|
-
/**
|
|
12527
|
-
* The `createAttributeController` equivalent of `inheritAriaAttributes`, which copies and
|
|
12528
|
-
* watches every ARIA attribute plus `role`.
|
|
12529
|
-
*
|
|
12530
|
-
* @internal
|
|
12531
|
-
* @param el The host element to copy from and watch.
|
|
12532
|
-
* @param onChange Called after the attributes change, so the component can re-render.
|
|
12533
|
-
* @param hostOwnedAttributes Attributes copied at load but not watched. See
|
|
12534
|
-
* `createAttributeController`.
|
|
12535
|
-
*/
|
|
12536
|
-
const createAriaAttributeController = (el, onChange, hostOwnedAttributes = []) => {
|
|
12537
|
-
return createAttributeController(el, ariaAttributes, onChange, hostOwnedAttributes);
|
|
12538
|
-
};
|
|
12539
|
-
|
|
12540
12656
|
const buttonIosCss = () => `:host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;white-space:normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #0054e9);--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;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);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.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}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:14px;--padding-top:13px;--padding-bottom:13px;--padding-start:1em;--padding-end:1em;--transition:background-color, opacity 100ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:3.1em;font-size:min(1rem, 48px);font-weight:500;letter-spacing:0}:host(.button-solid){--background-activated:var(--ion-color-primary-shade, #004acd);--background-focused:var(--ion-color-primary-shade, #004acd);--background-hover:var(--ion-color-primary-tint, #1a65eb);--background-activated-opacity:1;--background-focused-opacity:1;--background-hover-opacity:1}:host(.button-outline){--border-radius:14px;--border-width:1px;--border-style:solid;--background-activated:var(--ion-color-primary, #0054e9);--background-focused:var(--ion-color-primary, #0054e9);--background-hover:transparent;--background-focused-opacity:.1;--color-activated:var(--ion-color-primary-contrast, #fff)}:host(.button-clear){--background-activated:transparent;--background-activated-opacity:0;--background-focused:var(--ion-color-primary, #0054e9);--background-hover:transparent;--background-focused-opacity:.1;font-size:min(1.0625rem, 51px);font-weight:normal}:host(.in-buttons){font-size:clamp(17px, 1.0625rem, 21.08px);font-weight:400}:host(.button-large){--border-radius:16px;--padding-top:17px;--padding-start:1em;--padding-end:1em;--padding-bottom:17px;min-height:3.1em;font-size:min(1.25rem, 60px)}:host(.button-small){--border-radius:6px;--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:min(0.8125rem, 39px)}:host(.button-round){--border-radius:999px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-strong){font-weight:600}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:var(--padding-top);--padding-end:var(--padding-top);--padding-start:var(--padding-end);min-width:clamp(30px, 2.125em, 60px);min-height:clamp(30px, 2.125em, 60px)}::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.12px, 1.125em, 43.02px)}:host(.button-small.button-has-icon-only){min-width:clamp(23px, 2.16em, 54px);min-height:clamp(23px, 2.16em, 54px)}:host(.button-small) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(12.1394px, 1.308125em, 40.1856px)}:host(.button-large.button-has-icon-only){min-width:clamp(46px, 2.5em, 78px);min-height:clamp(46px, 2.5em, 78px)}:host(.button-large) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.12px, 0.9em, 43.056px)}:host(.button-outline.ion-focused.ion-color) .button-native,:host(.button-clear.ion-focused.ion-color) .button-native{color:var(--ion-color-base)}:host(.button-outline.ion-focused.ion-color) .button-native::after,:host(.button-clear.ion-focused.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-shade)}@media (any-hover: hover){:host(.button-clear:not(.ion-activated):hover),:host(.button-outline:not(.ion-activated):hover){opacity:0.6}:host(.button-clear.ion-color:hover) .button-native,:host(.button-outline.ion-color:hover) .button-native{color:var(--ion-color-base)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:transparent}:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-tint)}:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated)) .button-native::after{background:#fff;opacity:0.1}}:host(.button-clear.ion-activated){opacity:0.4}:host(.button-outline.ion-activated.ion-color) .button-native{color:var(--ion-color-contrast)}:host(.button-outline.ion-activated.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-activated) .button-native::after{background:var(--ion-color-shade)}:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--color));color:var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff))}`;
|
|
12541
12657
|
|
|
12542
12658
|
const buttonMdCss = () => `:host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;white-space:normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #0054e9);--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #0054e9)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;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);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.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}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:4px;--padding-top:8px;--padding-bottom:8px;--padding-start:1.1em;--padding-end:1.1em;--transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1), background-color 15ms linear, color 15ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:36px;font-size:0.875rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}:host(.button-solid){--background-activated:transparent;--background-hover:var(--ion-color-primary-contrast, #fff);--background-focused:var(--ion-color-primary-contrast, #fff);--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}:host(.button-solid.ion-activated){--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)}:host(.button-outline){--border-width:2px;--border-style:solid;--box-shadow:none;--background-activated:transparent;--background-focused:var(--ion-color-primary, #0054e9);--background-hover:var(--ion-color-primary, #0054e9);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-outline.ion-activated.ion-color) .button-native{background:transparent}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #0054e9);--background-hover:var(--ion-color-primary, #0054e9);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-round){--border-radius:999px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-large){--padding-top:14px;--padding-start:1em;--padding-end:1em;--padding-bottom:14px;min-height:2.8em;font-size:1.25rem}:host(.button-small){--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:0.8125rem}:host(.button-strong){font-weight:bold}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:var(--padding-top);--padding-end:var(--padding-top);--padding-start:var(--padding-end);min-width:clamp(30px, 2.86em, 60px);min-height:clamp(30px, 2.86em, 60px)}::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.104px, 1.6em, 43.008px)}:host(.button-small.button-has-icon-only){min-width:clamp(23px, 2.16em, 54px);min-height:clamp(23px, 2.16em, 54px)}:host(.button-small) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(13.002px, 1.23125em, 40.385px)}:host(.button-large.button-has-icon-only){min-width:clamp(46px, 2.5em, 78px);min-height:clamp(46px, 2.5em, 78px)}:host(.button-large) ::slotted(ion-icon[slot=icon-only]){font-size:clamp(15.008px, 1.4em, 43.008px)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color.ion-focused) .button-native::after,:host(.button-outline.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-background, var(--color));color:var(--ion-toolbar-color, var(--background), var(--ion-color-primary-contrast, #fff))}`;
|
|
@@ -12665,12 +12781,15 @@ class Button {
|
|
|
12665
12781
|
* two elements in the accessibility tree.
|
|
12666
12782
|
*/
|
|
12667
12783
|
this.ariaController = createAriaAttributeController(this.el, () => forceUpdate(), ['aria-disabled', 'role']);
|
|
12784
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
12668
12785
|
}
|
|
12669
12786
|
connectedCallback() {
|
|
12670
12787
|
this.ariaController?.init();
|
|
12788
|
+
this.tabindexController?.init();
|
|
12671
12789
|
}
|
|
12672
12790
|
disconnectedCallback() {
|
|
12673
12791
|
this.ariaController?.destroy();
|
|
12792
|
+
this.tabindexController?.destroy();
|
|
12674
12793
|
}
|
|
12675
12794
|
get hasIconOnly() {
|
|
12676
12795
|
return !!this.el.querySelector('[slot="icon-only"]');
|
|
@@ -12746,7 +12865,10 @@ class Button {
|
|
|
12746
12865
|
render() {
|
|
12747
12866
|
const mode = getIonMode$1(this);
|
|
12748
12867
|
const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong } = this;
|
|
12749
|
-
const inheritedAttributes =
|
|
12868
|
+
const inheritedAttributes = {
|
|
12869
|
+
...this.ariaController?.attributes,
|
|
12870
|
+
...this.tabindexController?.attributes,
|
|
12871
|
+
};
|
|
12750
12872
|
const finalSize = size === undefined && this.inItem ? 'small' : size;
|
|
12751
12873
|
const TagType = href === undefined ? 'button' : 'a';
|
|
12752
12874
|
const attrs = TagType === 'button'
|
|
@@ -12771,7 +12893,7 @@ class Button {
|
|
|
12771
12893
|
{
|
|
12772
12894
|
type !== 'button' && this.renderHiddenButton();
|
|
12773
12895
|
}
|
|
12774
|
-
return (hAsync(Host, { key: '
|
|
12896
|
+
return (hAsync(Host, { key: '9676cd8eb88ff0ff0582eeaa8b87ed4525a4dbee', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
|
|
12775
12897
|
[mode]: true,
|
|
12776
12898
|
[buttonType]: true,
|
|
12777
12899
|
[`${buttonType}-${expand}`]: expand !== undefined,
|
|
@@ -12786,7 +12908,7 @@ class Button {
|
|
|
12786
12908
|
'button-disabled': disabled,
|
|
12787
12909
|
'ion-activatable': true,
|
|
12788
12910
|
'ion-focusable': true,
|
|
12789
|
-
}) }, hAsync(TagType, { key: '
|
|
12911
|
+
}) }, hAsync(TagType, { key: '42609eab7e854c1e1ddf678c7dc83c7ec81e560e', ...attrs, class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, ...inheritedAttributes }, hAsync("span", { key: 'a212acc720c9312b3ac35345333df7a7175ace92', class: "button-inner" }, hAsync("slot", { key: '05986b525272c768a37c274748f15aeb2fce313e', name: "icon-only", onSlotchange: this.slotChanged }), hAsync("slot", { key: '4b6951f7b201c19714e97e2075f517f88642a169', name: "start" }), hAsync("slot", { key: 'fa2d5ca4551a14ebfafe5399683e239566571398' }), hAsync("slot", { key: 'ca8edc225165824f535177b99bb39adc1fea5fd2', name: "end" })), mode === 'md' && hAsync("ion-ripple-effect", { key: '01c38cc6c230bb35861bbcc1472f4a2f18522e93', type: this.rippleType }))));
|
|
12790
12912
|
}
|
|
12791
12913
|
get el() { return getElement(this); }
|
|
12792
12914
|
static get watchers() { return {
|
|
@@ -12907,12 +13029,23 @@ class Card {
|
|
|
12907
13029
|
* the card host renders no role of its own, so nothing reads the leftover copy.
|
|
12908
13030
|
*/
|
|
12909
13031
|
this.ariaController = createAttributeController(this.el, ['aria-label'], () => forceUpdate());
|
|
13032
|
+
// A card that isn't clickable has no native button or link, so `tabindex` stays on the host.
|
|
13033
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate(), () => this.isClickable());
|
|
13034
|
+
}
|
|
13035
|
+
/**
|
|
13036
|
+
* Changing `href` or `button` adds or removes the native element, so `tabindex` has to
|
|
13037
|
+
* move with it.
|
|
13038
|
+
*/
|
|
13039
|
+
clickableChanged() {
|
|
13040
|
+
this.tabindexController?.refresh();
|
|
12910
13041
|
}
|
|
12911
13042
|
connectedCallback() {
|
|
12912
13043
|
this.ariaController?.init();
|
|
13044
|
+
this.tabindexController?.init();
|
|
12913
13045
|
}
|
|
12914
13046
|
disconnectedCallback() {
|
|
12915
13047
|
this.ariaController?.destroy();
|
|
13048
|
+
this.tabindexController?.destroy();
|
|
12916
13049
|
}
|
|
12917
13050
|
isClickable() {
|
|
12918
13051
|
return this.href !== undefined || this.button;
|
|
@@ -12924,6 +13057,7 @@ class Card {
|
|
|
12924
13057
|
}
|
|
12925
13058
|
const { href, routerAnimation, routerDirection } = this;
|
|
12926
13059
|
const inheritedAriaAttributes = this.ariaController?.attributes ?? {};
|
|
13060
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
12927
13061
|
const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div';
|
|
12928
13062
|
const attrs = TagType === 'button'
|
|
12929
13063
|
? { type: this.type }
|
|
@@ -12933,17 +13067,25 @@ class Card {
|
|
|
12933
13067
|
rel: this.rel,
|
|
12934
13068
|
target: this.target,
|
|
12935
13069
|
};
|
|
12936
|
-
return (hAsync(TagType, { ...attrs, ...inheritedAriaAttributes, class: "card-native", part: "native", disabled: this.disabled, onClick: (ev) => openURL(href, ev, routerDirection, routerAnimation) }, hAsync("slot", null), clickable && mode === 'md' && hAsync("ion-ripple-effect", null)));
|
|
13070
|
+
return (hAsync(TagType, { ...attrs, ...inheritedAriaAttributes, ...tabindexAttributes, class: "card-native", part: "native", disabled: this.disabled, onClick: (ev) => openURL(href, ev, routerDirection, routerAnimation) }, hAsync("slot", null), clickable && mode === 'md' && hAsync("ion-ripple-effect", null)));
|
|
12937
13071
|
}
|
|
12938
13072
|
render() {
|
|
12939
13073
|
const mode = getIonMode$1(this);
|
|
12940
|
-
return (hAsync(Host, { key: '
|
|
13074
|
+
return (hAsync(Host, { key: 'a50cd4e11f563acefeadc4c8f67536276593384a', class: createColorClasses$1(this.color, {
|
|
12941
13075
|
[mode]: true,
|
|
12942
13076
|
'card-disabled': this.disabled,
|
|
12943
13077
|
'ion-activatable': this.isClickable(),
|
|
12944
13078
|
}) }, this.renderCard(mode)));
|
|
12945
13079
|
}
|
|
12946
13080
|
get el() { return getElement(this); }
|
|
13081
|
+
static get watchers() { return {
|
|
13082
|
+
"href": [{
|
|
13083
|
+
"clickableChanged": 0
|
|
13084
|
+
}],
|
|
13085
|
+
"button": [{
|
|
13086
|
+
"clickableChanged": 0
|
|
13087
|
+
}]
|
|
13088
|
+
}; }
|
|
12947
13089
|
static get style() { return {
|
|
12948
13090
|
ios: cardIosCss(),
|
|
12949
13091
|
md: cardMdCss()
|
|
@@ -18946,6 +19088,10 @@ class FabButton {
|
|
|
18946
19088
|
}
|
|
18947
19089
|
connectedCallback() {
|
|
18948
19090
|
this.fab = this.el.closest('ion-fab');
|
|
19091
|
+
this.tabindexController?.init();
|
|
19092
|
+
}
|
|
19093
|
+
disconnectedCallback() {
|
|
19094
|
+
this.tabindexController?.destroy();
|
|
18949
19095
|
}
|
|
18950
19096
|
/**
|
|
18951
19097
|
* The native button rendered inside `ion-fab-button` is in the Shadow DOM and
|
|
@@ -19005,11 +19151,13 @@ class FabButton {
|
|
|
19005
19151
|
}
|
|
19006
19152
|
componentWillLoad() {
|
|
19007
19153
|
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
19154
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
19008
19155
|
}
|
|
19009
19156
|
render() {
|
|
19010
19157
|
const { el, disabled, color, href, activated, show, translucent, size, inheritedAttributes, type } = this;
|
|
19011
19158
|
const inList = hostContext('ion-fab-list', el);
|
|
19012
19159
|
const mode = getIonMode$1(this);
|
|
19160
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
19013
19161
|
const TagType = href === undefined ? 'button' : 'a';
|
|
19014
19162
|
const attrs = TagType === 'button'
|
|
19015
19163
|
? { type }
|
|
@@ -19026,7 +19174,7 @@ class FabButton {
|
|
|
19026
19174
|
if (type !== 'button') {
|
|
19027
19175
|
this.renderHiddenButton();
|
|
19028
19176
|
}
|
|
19029
|
-
return (hAsync(Host, { key: '
|
|
19177
|
+
return (hAsync(Host, { key: '95594de6a6509d29799ba4f5b54a14632bca1c83', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses$1(color, {
|
|
19030
19178
|
[mode]: true,
|
|
19031
19179
|
'fab-button-in-list': inList,
|
|
19032
19180
|
'fab-button-translucent-in-list': inList && translucent,
|
|
@@ -19037,7 +19185,7 @@ class FabButton {
|
|
|
19037
19185
|
'ion-activatable': true,
|
|
19038
19186
|
'ion-focusable': true,
|
|
19039
19187
|
[`fab-button-${size}`]: size !== undefined,
|
|
19040
|
-
}) }, hAsync(TagType, { key: '
|
|
19188
|
+
}) }, hAsync(TagType, { key: '0f9dd1984d646dc3784a1c701db068e48c9155e3', ...attrs, class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, onClick: (ev) => type === 'button' && openURL(href, ev, this.routerDirection, this.routerAnimation), ...inheritedAttributes, ...tabindexAttributes }, hAsync("ion-icon", { key: '6ba981ded86087506dfc115124d4f69bb4c8d03c', "aria-hidden": "true", icon: this.closeIcon, part: "close-icon", class: "close-icon", lazy: false }), hAsync("span", { key: '54efdabe98164f3575641c104f8a9e82ec2a42c7', class: "button-inner" }, hAsync("slot", { key: '23c0809c2371454c27cb8dd55d0c81bbf062a238' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '7aacc6325bbc990e496378eef0d5af2697b2edce' }))));
|
|
19041
19189
|
}
|
|
19042
19190
|
get el() { return getElement(this); }
|
|
19043
19191
|
static get watchers() { return {
|
|
@@ -22294,6 +22442,14 @@ class Item {
|
|
|
22294
22442
|
buttonChanged() {
|
|
22295
22443
|
// Update the focusable option when the button option is changed
|
|
22296
22444
|
this.focusable = this.isFocusable();
|
|
22445
|
+
this.tabindexController?.refresh();
|
|
22446
|
+
}
|
|
22447
|
+
/**
|
|
22448
|
+
* Adding or removing `href` adds or removes the native element, so `tabindex` has to move
|
|
22449
|
+
* with it. The same goes for `button` in `buttonChanged`.
|
|
22450
|
+
*/
|
|
22451
|
+
hrefChanged() {
|
|
22452
|
+
this.tabindexController?.refresh();
|
|
22297
22453
|
}
|
|
22298
22454
|
labelColorChanged(ev) {
|
|
22299
22455
|
const { color } = this;
|
|
@@ -22338,6 +22494,7 @@ class Item {
|
|
|
22338
22494
|
this.updateInteractivityOnSlotChange();
|
|
22339
22495
|
}
|
|
22340
22496
|
this.ariaController?.init();
|
|
22497
|
+
this.tabindexController?.init();
|
|
22341
22498
|
}
|
|
22342
22499
|
componentWillLoad() {
|
|
22343
22500
|
/**
|
|
@@ -22347,6 +22504,8 @@ class Item {
|
|
|
22347
22504
|
* reads it twice.
|
|
22348
22505
|
*/
|
|
22349
22506
|
this.ariaController = createAttributeController(this.el, ['aria-label'], () => forceUpdate());
|
|
22507
|
+
// An item that isn't clickable has no native button or link, so `tabindex` stays on the host.
|
|
22508
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate(), () => this.isClickable());
|
|
22350
22509
|
}
|
|
22351
22510
|
componentDidLoad() {
|
|
22352
22511
|
raf(() => {
|
|
@@ -22364,6 +22523,7 @@ class Item {
|
|
|
22364
22523
|
this.indicatorControlObserver = undefined;
|
|
22365
22524
|
}
|
|
22366
22525
|
this.ariaController?.destroy();
|
|
22526
|
+
this.tabindexController?.destroy();
|
|
22367
22527
|
}
|
|
22368
22528
|
totalNestedInputs() {
|
|
22369
22529
|
// The following elements have a clickable cover that is relative to the entire item
|
|
@@ -22467,6 +22627,7 @@ class Item {
|
|
|
22467
22627
|
const clickable = this.isClickable();
|
|
22468
22628
|
const canActivate = this.canActivate();
|
|
22469
22629
|
const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div';
|
|
22630
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
22470
22631
|
const attrs = TagType === 'button'
|
|
22471
22632
|
? { type: this.type }
|
|
22472
22633
|
: {
|
|
@@ -22537,7 +22698,7 @@ class Item {
|
|
|
22537
22698
|
* multi-input item, and in a clickable item, which is a second tab stop.
|
|
22538
22699
|
*/
|
|
22539
22700
|
const slottedIndicatorNeedsRoom = this.hasSlottedIndicatorControl && (multipleInputs || this.isClickable());
|
|
22540
|
-
return (hAsync(Host, { key: '
|
|
22701
|
+
return (hAsync(Host, { key: 'b9de79c9d6fbe11a19c8e507d1c34af9f9068cfa', "aria-disabled": ariaDisabled, class: {
|
|
22541
22702
|
...childStyles,
|
|
22542
22703
|
...labelColorStyles,
|
|
22543
22704
|
...createColorClasses$1(this.color, {
|
|
@@ -22554,12 +22715,15 @@ class Item {
|
|
|
22554
22715
|
'ion-focusable': this.focusable,
|
|
22555
22716
|
'item-rtl': isRTL$1(el),
|
|
22556
22717
|
}),
|
|
22557
|
-
}, role: inList ? 'listitem' : null }, hAsync(TagType, { key: '
|
|
22718
|
+
}, role: inList ? 'listitem' : null }, hAsync(TagType, { key: 'c52faccd0d44784e300e55c90b4456c491513c3c', ...attrs, ...inheritedAriaAttributes, ...tabindexAttributes, class: "item-native", part: "native", disabled: disabled, ...clickFn }, hAsync("slot", { key: '11cc95e796b494cf87db7b810846cb2c18186577', name: "start", onSlotchange: this.updateInteractivityOnSlotChange }), hAsync("div", { key: '6c94a9dd570f4e6e65924fdde6bcbb840c9b424d', class: "item-inner", part: "inner" }, hAsync("div", { key: '06c490d6f3e15fa811c72d5cd2b7936f99dd8430', class: "input-wrapper", part: "container" }, hAsync("slot", { key: '4487a6cf30f3b26455c96726733f57b1dbcab694', onSlotchange: this.updateInteractivityOnSlotChange })), hAsync("slot", { key: '16d6e70fa22f43b11bc63304dae9900f4a41b703', name: "end", onSlotchange: this.updateInteractivityOnSlotChange }), showDetail && (hAsync("ion-icon", { key: 'b24443f5753b67f9021b8127cebf47d329e0b03d', icon: detailIcon, lazy: false, class: "item-detail-icon", part: "detail-icon", "aria-hidden": "true", "flip-rtl": detailIcon === chevronForward }))), canActivate && mode === 'md' && hAsync("ion-ripple-effect", { key: 'a9b081a6ebe870d057b775cfae2e7a4de6679155' }))));
|
|
22558
22719
|
}
|
|
22559
22720
|
get el() { return getElement(this); }
|
|
22560
22721
|
static get watchers() { return {
|
|
22561
22722
|
"button": [{
|
|
22562
22723
|
"buttonChanged": 0
|
|
22724
|
+
}],
|
|
22725
|
+
"href": [{
|
|
22726
|
+
"hrefChanged": 0
|
|
22563
22727
|
}]
|
|
22564
22728
|
}; }
|
|
22565
22729
|
static get style() { return {
|
|
@@ -22717,8 +22881,18 @@ class ItemOption {
|
|
|
22717
22881
|
}
|
|
22718
22882
|
};
|
|
22719
22883
|
}
|
|
22884
|
+
componentWillLoad() {
|
|
22885
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
22886
|
+
}
|
|
22887
|
+
connectedCallback() {
|
|
22888
|
+
this.tabindexController?.init();
|
|
22889
|
+
}
|
|
22890
|
+
disconnectedCallback() {
|
|
22891
|
+
this.tabindexController?.destroy();
|
|
22892
|
+
}
|
|
22720
22893
|
render() {
|
|
22721
22894
|
const { disabled, expandable, href } = this;
|
|
22895
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
22722
22896
|
const TagType = href === undefined ? 'button' : 'a';
|
|
22723
22897
|
const mode = getIonMode$1(this);
|
|
22724
22898
|
const attrs = TagType === 'button'
|
|
@@ -22728,12 +22902,12 @@ class ItemOption {
|
|
|
22728
22902
|
href: this.href,
|
|
22729
22903
|
target: this.target,
|
|
22730
22904
|
};
|
|
22731
|
-
return (hAsync(Host, { key: '
|
|
22905
|
+
return (hAsync(Host, { key: 'b9d323be73e0ac6408aa56a05eeb67076e35daf8', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
22732
22906
|
[mode]: true,
|
|
22733
22907
|
'item-option-disabled': disabled,
|
|
22734
22908
|
'item-option-expandable': expandable,
|
|
22735
22909
|
'ion-activatable': true,
|
|
22736
|
-
}) }, hAsync(TagType, { key: '
|
|
22910
|
+
}) }, hAsync(TagType, { key: '6a59ebaa090613f42fca1fe51eff7863a69526ac', ...attrs, ...tabindexAttributes, class: "button-native", part: "native", disabled: disabled }, hAsync("span", { key: '9a5709f3b6d6bccdf0d60345f6171ca5439d54f4', class: "button-inner", part: "inner" }, hAsync("slot", { key: '9d76f6239d4c50cb785142a89bba26702a79c1f8', name: "top" }), hAsync("div", { key: 'b2aecda5dbfa5e3279d49b6dab6cb14c0b5df697', class: "horizontal-wrapper", part: "container" }, hAsync("slot", { key: '40d56d38d7a73a55f5ea4f6cdd6bc62dcfaa8dae', name: "start" }), hAsync("slot", { key: 'e531ca665546752bde34525cc6630a5ea2ac2575', name: "icon-only" }), hAsync("slot", { key: '2b7a78f6a4776eeb0720f79a81d075f75c63f4ff' }), hAsync("slot", { key: 'b296120a461d3b330ec05a97524b8ce5d3250a07', name: "end" })), hAsync("slot", { key: '5ebdf7af5acb29cc1b728f812d7f0c4d952512cc', name: "bottom" })), mode === 'md' && hAsync("ion-ripple-effect", { key: '538f3e7d90a17ddbcc72ad227a0711573d3f7aac' }))));
|
|
22737
22911
|
}
|
|
22738
22912
|
get el() { return getElement(this); }
|
|
22739
22913
|
static get style() { return {
|
|
@@ -24942,6 +25116,13 @@ class MenuButton {
|
|
|
24942
25116
|
}
|
|
24943
25117
|
componentWillLoad() {
|
|
24944
25118
|
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
25119
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
25120
|
+
}
|
|
25121
|
+
connectedCallback() {
|
|
25122
|
+
this.tabindexController?.init();
|
|
25123
|
+
}
|
|
25124
|
+
disconnectedCallback() {
|
|
25125
|
+
this.tabindexController?.destroy();
|
|
24945
25126
|
}
|
|
24946
25127
|
componentDidLoad() {
|
|
24947
25128
|
this.visibilityChanged();
|
|
@@ -24951,6 +25132,7 @@ class MenuButton {
|
|
|
24951
25132
|
}
|
|
24952
25133
|
render() {
|
|
24953
25134
|
const { color, disabled, inheritedAttributes } = this;
|
|
25135
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
24954
25136
|
const mode = getIonMode$1(this);
|
|
24955
25137
|
const menuIcon = config.get('menuIcon', mode === 'ios' ? menuOutline : menuSharp);
|
|
24956
25138
|
const hidden = this.autoHide && !this.visible;
|
|
@@ -24958,7 +25140,7 @@ class MenuButton {
|
|
|
24958
25140
|
type: this.type,
|
|
24959
25141
|
};
|
|
24960
25142
|
const ariaLabel = inheritedAttributes['aria-label'] || 'menu';
|
|
24961
|
-
return (hAsync(Host, { key: '
|
|
25143
|
+
return (hAsync(Host, { key: 'bccc30d2a1e67e484f493211f950391c82f28b00', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, "aria-hidden": hidden ? 'true' : null, class: createColorClasses$1(color, {
|
|
24962
25144
|
[mode]: true,
|
|
24963
25145
|
button: true, // ion-buttons target .button
|
|
24964
25146
|
'menu-button-hidden': hidden,
|
|
@@ -24967,7 +25149,7 @@ class MenuButton {
|
|
|
24967
25149
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
24968
25150
|
'ion-activatable': true,
|
|
24969
25151
|
'ion-focusable': true,
|
|
24970
|
-
}) }, hAsync("button", { key: '
|
|
25152
|
+
}) }, hAsync("button", { key: 'c2479290c5fee434c12c75fe47b2a10c58908bcb', ...attrs, disabled: disabled, class: "button-native", part: "native", "aria-label": ariaLabel, ...tabindexAttributes }, hAsync("span", { key: 'ab2a5aa0aced1e551f5571dbfd3dabe8b3558370', class: "button-inner" }, hAsync("slot", { key: '7e7f827910287e11ffe716639c069e977df64d6a' }, hAsync("ion-icon", { key: 'ec4677e9b71d4b2167c64aebef269a58994262d1', part: "icon", icon: menuIcon, mode: mode, lazy: false, "aria-hidden": "true" }))), mode === 'md' && hAsync("ion-ripple-effect", { key: '5b88e62b6cb4530f7b63dde0352cb0b7ef73cbff', type: "unbounded" }))));
|
|
24971
25153
|
}
|
|
24972
25154
|
get el() { return getElement(this); }
|
|
24973
25155
|
static get style() { return {
|
|
@@ -36845,18 +37027,29 @@ class RouterLink {
|
|
|
36845
37027
|
openURL(this.href, ev, this.routerDirection, this.routerAnimation);
|
|
36846
37028
|
};
|
|
36847
37029
|
}
|
|
37030
|
+
componentWillLoad() {
|
|
37031
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
37032
|
+
}
|
|
37033
|
+
connectedCallback() {
|
|
37034
|
+
this.tabindexController?.init();
|
|
37035
|
+
}
|
|
37036
|
+
disconnectedCallback() {
|
|
37037
|
+
this.tabindexController?.destroy();
|
|
37038
|
+
}
|
|
36848
37039
|
render() {
|
|
36849
37040
|
const mode = getIonMode$1(this);
|
|
37041
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
36850
37042
|
const attrs = {
|
|
36851
37043
|
href: this.href,
|
|
36852
37044
|
rel: this.rel,
|
|
36853
37045
|
target: this.target,
|
|
36854
37046
|
};
|
|
36855
|
-
return (hAsync(Host, { key: '
|
|
37047
|
+
return (hAsync(Host, { key: '51d8c563858a89c274f4b3778b937e545f4626df', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
36856
37048
|
[mode]: true,
|
|
36857
37049
|
'ion-activatable': true,
|
|
36858
|
-
}) }, hAsync("a", { key: '
|
|
37050
|
+
}) }, hAsync("a", { key: '2f806b3036d648cf01ff69739c7f422c9a554c7d', ...attrs, ...tabindexAttributes }, hAsync("slot", { key: '43a2ee8b80574b120d80a8d65e8615921eb36afb' }))));
|
|
36859
37051
|
}
|
|
37052
|
+
get el() { return getElement(this); }
|
|
36860
37053
|
static get style() { return routerLinkCss(); }
|
|
36861
37054
|
static get cmpMeta() { return {
|
|
36862
37055
|
"$flags$": 265,
|
|
@@ -38335,6 +38528,7 @@ class SegmentButton {
|
|
|
38335
38528
|
this.updateState();
|
|
38336
38529
|
}
|
|
38337
38530
|
connectedCallback() {
|
|
38531
|
+
this.tabindexController?.init();
|
|
38338
38532
|
const segmentEl = (this.segmentEl = this.el.closest('ion-segment'));
|
|
38339
38533
|
if (segmentEl) {
|
|
38340
38534
|
this.updateState();
|
|
@@ -38343,6 +38537,7 @@ class SegmentButton {
|
|
|
38343
38537
|
}
|
|
38344
38538
|
}
|
|
38345
38539
|
disconnectedCallback() {
|
|
38540
|
+
this.tabindexController?.destroy();
|
|
38346
38541
|
const segmentEl = this.segmentEl;
|
|
38347
38542
|
if (segmentEl) {
|
|
38348
38543
|
removeEventListener(segmentEl, 'ionSelect', this.updateState);
|
|
@@ -38354,6 +38549,7 @@ class SegmentButton {
|
|
|
38354
38549
|
this.inheritedAttributes = {
|
|
38355
38550
|
...inheritAttributes$1(this.el, ['aria-label']),
|
|
38356
38551
|
};
|
|
38552
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
38357
38553
|
// Return if there is no contentId defined
|
|
38358
38554
|
if (!this.contentId)
|
|
38359
38555
|
return;
|
|
@@ -38399,8 +38595,9 @@ class SegmentButton {
|
|
|
38399
38595
|
render() {
|
|
38400
38596
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
38401
38597
|
const mode = getIonMode$1(this);
|
|
38598
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
38402
38599
|
const hasSegmentColor = () => segmentEl?.color !== undefined;
|
|
38403
|
-
return (hAsync(Host, { key: '
|
|
38600
|
+
return (hAsync(Host, { key: 'd0d37d00f921193edd3a3670363583d9ee1cfb39', class: {
|
|
38404
38601
|
[mode]: true,
|
|
38405
38602
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
38406
38603
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -38416,7 +38613,7 @@ class SegmentButton {
|
|
|
38416
38613
|
'ion-activatable': true,
|
|
38417
38614
|
'ion-activatable-instant': true,
|
|
38418
38615
|
'ion-focusable': true,
|
|
38419
|
-
} }, hAsync("button", { key: '
|
|
38616
|
+
} }, hAsync("button", { key: '0927611d352e2ed4df5d2a72768d504f5d4c4baf', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled, ...this.inheritedAttributes, ...tabindexAttributes }, hAsync("span", { key: '0fdf337f0ba7fa08143124091a580418f7b94a7c', class: "button-inner" }, hAsync("slot", { key: 'bce39283cdbe68cffbece870296fecff6f214345' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '2653c7c6d50bc00540d249ed98c6c6a5d93672d6' })), hAsync("div", { key: 'de0dbdd9f531158cc77ba04e78f4e96e32b6fb02', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, hAsync("div", { key: '2006cb914692ae1d5659828e36c502f9747adede', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
38420
38617
|
}
|
|
38421
38618
|
get el() { return getElement(this); }
|
|
38422
38619
|
static get watchers() { return {
|
|
@@ -38778,6 +38975,7 @@ class Select {
|
|
|
38778
38975
|
}
|
|
38779
38976
|
async connectedCallback() {
|
|
38780
38977
|
const { el } = this;
|
|
38978
|
+
this.tabindexController?.init();
|
|
38781
38979
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => {
|
|
38782
38980
|
this.startEndContainerController?.calculateContainerWidths();
|
|
38783
38981
|
});
|
|
@@ -38797,6 +38995,7 @@ class Select {
|
|
|
38797
38995
|
}
|
|
38798
38996
|
componentWillLoad() {
|
|
38799
38997
|
this.inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
|
|
38998
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
38800
38999
|
this.hintTextId = this.getHintTextId();
|
|
38801
39000
|
}
|
|
38802
39001
|
componentDidLoad() {
|
|
@@ -38813,6 +39012,7 @@ class Select {
|
|
|
38813
39012
|
this.emitStyle();
|
|
38814
39013
|
}
|
|
38815
39014
|
disconnectedCallback() {
|
|
39015
|
+
this.tabindexController?.destroy();
|
|
38816
39016
|
if (this.mutationO) {
|
|
38817
39017
|
this.mutationO.disconnect();
|
|
38818
39018
|
this.mutationO = undefined;
|
|
@@ -39403,7 +39603,8 @@ class Select {
|
|
|
39403
39603
|
}
|
|
39404
39604
|
renderListbox() {
|
|
39405
39605
|
const { disabled, inputId, isExpanded, required } = this;
|
|
39406
|
-
|
|
39606
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
39607
|
+
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl), ...tabindexAttributes }));
|
|
39407
39608
|
}
|
|
39408
39609
|
getHintTextId() {
|
|
39409
39610
|
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
@@ -39453,7 +39654,7 @@ class Select {
|
|
|
39453
39654
|
const hasOutlineFill = mode === 'md' && fill === 'outline';
|
|
39454
39655
|
renderHiddenInput(true, el, name, parseValue(value), disabled);
|
|
39455
39656
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || isExpanded));
|
|
39456
|
-
return (hAsync(Host, { key: '
|
|
39657
|
+
return (hAsync(Host, { key: '33b9006ae4d0190621c3ec6241db4507ef08e891', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
39457
39658
|
[mode]: true,
|
|
39458
39659
|
'in-item': inItem,
|
|
39459
39660
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -39471,7 +39672,7 @@ class Select {
|
|
|
39471
39672
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
39472
39673
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
39473
39674
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
39474
|
-
}) }, hAsync("label", { key: '
|
|
39675
|
+
}) }, hAsync("label", { key: 'c123702d69e5a7dece801b9765ce52777d4a376c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, hasOutlineFill && this.renderOutlineContainer(), hAsync("div", { key: '9cbac0085afa03e9b5d777b028d7a837ddfc8212', class: "select-start", part: "start", ref: (el) => (this.startContainerEl = el) }, hAsync("slot", { key: '179f1454e56c7dc50637b6149c6916a28fc2cf4a', name: "start" })), hAsync("div", { key: 'bb492a41a762d8fc4199561967f688284e4b6e1f', class: "select-control", part: "control" }, this.renderLabel(), hAsync("div", { key: 'e0f889c0f02e16fe1a47c4ddfeba7a262341a72d', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox(), !hasFloatingOrStackedLabel && this.renderSelectIcon())), hAsync("div", { key: 'bb5e5e117d786e02d6ac9d0514c5f54c240388ab', class: "select-end", part: "end", ref: (el) => (this.endContainerEl = el) }, hasFloatingOrStackedLabel && this.renderSelectIcon(), hAsync("slot", { key: '07df73fde0d7413e7d28af0d0b25a04593ea77dc', name: "end" })), shouldRenderHighlight && hAsync("div", { key: '753762d7c94c48d89e3c727fefbb5c9fdd981ad2', class: "select-highlight" })), this.renderBottomContent()));
|
|
39475
39676
|
}
|
|
39476
39677
|
get el() { return getElement(this); }
|
|
39477
39678
|
static get watchers() { return {
|
|
@@ -40638,10 +40839,17 @@ class TabButton {
|
|
|
40638
40839
|
this.inheritedAttributes = {
|
|
40639
40840
|
...inheritAttributes$1(this.el, ['aria-label']),
|
|
40640
40841
|
};
|
|
40842
|
+
this.tabindexController = createTabindexController(this.el, () => forceUpdate());
|
|
40641
40843
|
if (this.layout === undefined) {
|
|
40642
40844
|
this.layout = config.get('tabButtonLayout', 'icon-top');
|
|
40643
40845
|
}
|
|
40644
40846
|
}
|
|
40847
|
+
connectedCallback() {
|
|
40848
|
+
this.tabindexController?.init();
|
|
40849
|
+
}
|
|
40850
|
+
disconnectedCallback() {
|
|
40851
|
+
this.tabindexController?.destroy();
|
|
40852
|
+
}
|
|
40645
40853
|
selectTab(ev) {
|
|
40646
40854
|
if (this.tab !== undefined) {
|
|
40647
40855
|
if (!this.disabled) {
|
|
@@ -40663,13 +40871,14 @@ class TabButton {
|
|
|
40663
40871
|
render() {
|
|
40664
40872
|
const { disabled, hasIcon, hasLabel, href, rel, target, layout, selected, tab, inheritedAttributes } = this;
|
|
40665
40873
|
const mode = getIonMode$1(this);
|
|
40874
|
+
const tabindex = this.tabindexController?.attributes.tabindex;
|
|
40666
40875
|
const attrs = {
|
|
40667
40876
|
download: this.download,
|
|
40668
40877
|
href,
|
|
40669
40878
|
rel,
|
|
40670
40879
|
target,
|
|
40671
40880
|
};
|
|
40672
|
-
return (hAsync(Host, { key: '
|
|
40881
|
+
return (hAsync(Host, { key: '177c6c12cbee6e5e0b54375edb62d2a05b51b27b', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
40673
40882
|
[mode]: true,
|
|
40674
40883
|
'tab-selected': selected,
|
|
40675
40884
|
'tab-disabled': disabled,
|
|
@@ -40681,7 +40890,7 @@ class TabButton {
|
|
|
40681
40890
|
'ion-activatable': true,
|
|
40682
40891
|
'ion-selectable': true,
|
|
40683
40892
|
'ion-focusable': true,
|
|
40684
|
-
} }, hAsync("a", { key: '
|
|
40893
|
+
} }, hAsync("a", { key: '16289c599d9be6f4c90ddded302c46aa905633e3', ...attrs, class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : tabindex, ...inheritedAttributes }, hAsync("span", { key: 'cef69478ddc3fc9144acab61cb8cc0df1d8ca711', class: "button-inner" }, hAsync("slot", { key: 'e276e619c8062c36f1de0d2a46abba750e8e58d7' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '6f747fd5723d00a1aa034f8d6a97e752f5f3c1c6', type: "unbounded" }))));
|
|
40685
40894
|
}
|
|
40686
40895
|
get el() { return getElement(this); }
|
|
40687
40896
|
static get style() { return {
|