@ionic/core 9.0.11-nightly.20261110 → 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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
|
-
var attributeController = require('./attribute-controller-
|
|
7
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
8
8
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
9
9
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
10
10
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
@@ -128,12 +128,15 @@ const Button = class {
|
|
|
128
128
|
* two elements in the accessibility tree.
|
|
129
129
|
*/
|
|
130
130
|
this.ariaController = attributeController.createAriaAttributeController(this.el, () => index.forceUpdate(this), ['aria-disabled', 'role']);
|
|
131
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
131
132
|
}
|
|
132
133
|
connectedCallback() {
|
|
133
134
|
this.ariaController?.init();
|
|
135
|
+
this.tabindexController?.init();
|
|
134
136
|
}
|
|
135
137
|
disconnectedCallback() {
|
|
136
138
|
this.ariaController?.destroy();
|
|
139
|
+
this.tabindexController?.destroy();
|
|
137
140
|
}
|
|
138
141
|
get hasIconOnly() {
|
|
139
142
|
return !!this.el.querySelector('[slot="icon-only"]');
|
|
@@ -209,7 +212,10 @@ const Button = class {
|
|
|
209
212
|
render() {
|
|
210
213
|
const mode = ionicGlobal.getIonMode(this);
|
|
211
214
|
const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong } = this;
|
|
212
|
-
const inheritedAttributes =
|
|
215
|
+
const inheritedAttributes = {
|
|
216
|
+
...this.ariaController?.attributes,
|
|
217
|
+
...this.tabindexController?.attributes,
|
|
218
|
+
};
|
|
213
219
|
const finalSize = size === undefined && this.inItem ? 'small' : size;
|
|
214
220
|
const TagType = href === undefined ? 'button' : 'a';
|
|
215
221
|
const attrs = TagType === 'button'
|
|
@@ -234,7 +240,7 @@ const Button = class {
|
|
|
234
240
|
{
|
|
235
241
|
type !== 'button' && this.renderHiddenButton();
|
|
236
242
|
}
|
|
237
|
-
return (index.h(index.Host, { key: '
|
|
243
|
+
return (index.h(index.Host, { key: '9676cd8eb88ff0ff0582eeaa8b87ed4525a4dbee', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: theme.createColorClasses(color, {
|
|
238
244
|
[mode]: true,
|
|
239
245
|
[buttonType]: true,
|
|
240
246
|
[`${buttonType}-${expand}`]: expand !== undefined,
|
|
@@ -249,7 +255,7 @@ const Button = class {
|
|
|
249
255
|
'button-disabled': disabled,
|
|
250
256
|
'ion-activatable': true,
|
|
251
257
|
'ion-focusable': true,
|
|
252
|
-
}) }, index.h(TagType, { key: '
|
|
258
|
+
}) }, index.h(TagType, { key: '42609eab7e854c1e1ddf678c7dc83c7ec81e560e', ...attrs, class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, ...inheritedAttributes }, index.h("span", { key: 'a212acc720c9312b3ac35345333df7a7175ace92', class: "button-inner" }, index.h("slot", { key: '05986b525272c768a37c274748f15aeb2fce313e', name: "icon-only", onSlotchange: this.slotChanged }), index.h("slot", { key: '4b6951f7b201c19714e97e2075f517f88642a169', name: "start" }), index.h("slot", { key: 'fa2d5ca4551a14ebfafe5399683e239566571398' }), index.h("slot", { key: 'ca8edc225165824f535177b99bb39adc1fea5fd2', name: "end" })), mode === 'md' && index.h("ion-ripple-effect", { key: '01c38cc6c230bb35861bbcc1472f4a2f18522e93', type: this.rippleType }))));
|
|
253
259
|
}
|
|
254
260
|
get el() { return index.getElement(this); }
|
|
255
261
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
|
-
var attributeController = require('./attribute-controller-
|
|
7
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
8
8
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
9
9
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
10
10
|
require('./helpers-BrETKUUX.js');
|
|
@@ -42,12 +42,23 @@ const Card = class {
|
|
|
42
42
|
* the card host renders no role of its own, so nothing reads the leftover copy.
|
|
43
43
|
*/
|
|
44
44
|
this.ariaController = attributeController.createAttributeController(this.el, ['aria-label'], () => index.forceUpdate(this));
|
|
45
|
+
// A card that isn't clickable has no native button or link, so `tabindex` stays on the host.
|
|
46
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this), () => this.isClickable());
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Changing `href` or `button` adds or removes the native element, so `tabindex` has to
|
|
50
|
+
* move with it.
|
|
51
|
+
*/
|
|
52
|
+
clickableChanged() {
|
|
53
|
+
this.tabindexController?.refresh();
|
|
45
54
|
}
|
|
46
55
|
connectedCallback() {
|
|
47
56
|
this.ariaController?.init();
|
|
57
|
+
this.tabindexController?.init();
|
|
48
58
|
}
|
|
49
59
|
disconnectedCallback() {
|
|
50
60
|
this.ariaController?.destroy();
|
|
61
|
+
this.tabindexController?.destroy();
|
|
51
62
|
}
|
|
52
63
|
isClickable() {
|
|
53
64
|
return this.href !== undefined || this.button;
|
|
@@ -59,6 +70,7 @@ const Card = class {
|
|
|
59
70
|
}
|
|
60
71
|
const { href, routerAnimation, routerDirection } = this;
|
|
61
72
|
const inheritedAriaAttributes = this.ariaController?.attributes ?? {};
|
|
73
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
62
74
|
const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div';
|
|
63
75
|
const attrs = TagType === 'button'
|
|
64
76
|
? { type: this.type }
|
|
@@ -68,17 +80,25 @@ const Card = class {
|
|
|
68
80
|
rel: this.rel,
|
|
69
81
|
target: this.target,
|
|
70
82
|
};
|
|
71
|
-
return (index.h(TagType, { ...attrs, ...inheritedAriaAttributes, class: "card-native", part: "native", disabled: this.disabled, onClick: (ev) => theme.openURL(href, ev, routerDirection, routerAnimation) }, index.h("slot", null), clickable && mode === 'md' && index.h("ion-ripple-effect", null)));
|
|
83
|
+
return (index.h(TagType, { ...attrs, ...inheritedAriaAttributes, ...tabindexAttributes, class: "card-native", part: "native", disabled: this.disabled, onClick: (ev) => theme.openURL(href, ev, routerDirection, routerAnimation) }, index.h("slot", null), clickable && mode === 'md' && index.h("ion-ripple-effect", null)));
|
|
72
84
|
}
|
|
73
85
|
render() {
|
|
74
86
|
const mode = ionicGlobal.getIonMode(this);
|
|
75
|
-
return (index.h(index.Host, { key: '
|
|
87
|
+
return (index.h(index.Host, { key: 'a50cd4e11f563acefeadc4c8f67536276593384a', class: theme.createColorClasses(this.color, {
|
|
76
88
|
[mode]: true,
|
|
77
89
|
'card-disabled': this.disabled,
|
|
78
90
|
'ion-activatable': this.isClickable(),
|
|
79
91
|
}) }, this.renderCard(mode)));
|
|
80
92
|
}
|
|
81
93
|
get el() { return index.getElement(this); }
|
|
94
|
+
static get watchers() { return {
|
|
95
|
+
"href": [{
|
|
96
|
+
"clickableChanged": 0
|
|
97
|
+
}],
|
|
98
|
+
"button": [{
|
|
99
|
+
"clickableChanged": 0
|
|
100
|
+
}]
|
|
101
|
+
}; }
|
|
82
102
|
};
|
|
83
103
|
Card.style = {
|
|
84
104
|
ios: cardIosCss(),
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
7
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
8
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
8
9
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
9
10
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
10
11
|
var index$1 = require('./index-wOmugbdg.js');
|
|
@@ -150,6 +151,10 @@ const FabButton = class {
|
|
|
150
151
|
}
|
|
151
152
|
connectedCallback() {
|
|
152
153
|
this.fab = this.el.closest('ion-fab');
|
|
154
|
+
this.tabindexController?.init();
|
|
155
|
+
}
|
|
156
|
+
disconnectedCallback() {
|
|
157
|
+
this.tabindexController?.destroy();
|
|
153
158
|
}
|
|
154
159
|
/**
|
|
155
160
|
* The native button rendered inside `ion-fab-button` is in the Shadow DOM and
|
|
@@ -209,11 +214,13 @@ const FabButton = class {
|
|
|
209
214
|
}
|
|
210
215
|
componentWillLoad() {
|
|
211
216
|
this.inheritedAttributes = helpers.inheritAriaAttributes(this.el);
|
|
217
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
212
218
|
}
|
|
213
219
|
render() {
|
|
214
220
|
const { el, disabled, color, href, activated, show, translucent, size, inheritedAttributes, type } = this;
|
|
215
221
|
const inList = theme.hostContext('ion-fab-list', el);
|
|
216
222
|
const mode = ionicGlobal.getIonMode(this);
|
|
223
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
217
224
|
const TagType = href === undefined ? 'button' : 'a';
|
|
218
225
|
const attrs = TagType === 'button'
|
|
219
226
|
? { type }
|
|
@@ -230,7 +237,7 @@ const FabButton = class {
|
|
|
230
237
|
if (type !== 'button') {
|
|
231
238
|
this.renderHiddenButton();
|
|
232
239
|
}
|
|
233
|
-
return (index.h(index.Host, { key: '
|
|
240
|
+
return (index.h(index.Host, { key: '95594de6a6509d29799ba4f5b54a14632bca1c83', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, class: theme.createColorClasses(color, {
|
|
234
241
|
[mode]: true,
|
|
235
242
|
'fab-button-in-list': inList,
|
|
236
243
|
'fab-button-translucent-in-list': inList && translucent,
|
|
@@ -241,7 +248,7 @@ const FabButton = class {
|
|
|
241
248
|
'ion-activatable': true,
|
|
242
249
|
'ion-focusable': true,
|
|
243
250
|
[`fab-button-${size}`]: size !== undefined,
|
|
244
|
-
}) }, index.h(TagType, { key: '
|
|
251
|
+
}) }, index.h(TagType, { key: '0f9dd1984d646dc3784a1c701db068e48c9155e3', ...attrs, class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, onClick: (ev) => type === 'button' && theme.openURL(href, ev, this.routerDirection, this.routerAnimation), ...inheritedAttributes, ...tabindexAttributes }, index.h("ion-icon", { key: '6ba981ded86087506dfc115124d4f69bb4c8d03c', "aria-hidden": "true", icon: this.closeIcon, part: "close-icon", class: "close-icon", lazy: false }), index.h("span", { key: '54efdabe98164f3575641c104f8a9e82ec2a42c7', class: "button-inner" }, index.h("slot", { key: '23c0809c2371454c27cb8dd55d0c81bbf062a238' })), mode === 'md' && index.h("ion-ripple-effect", { key: '7aacc6325bbc990e496378eef0d5af2697b2edce' }))));
|
|
245
252
|
}
|
|
246
253
|
get el() { return index.getElement(this); }
|
|
247
254
|
static get watchers() { return {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
7
8
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
8
9
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
9
10
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
@@ -37,8 +38,18 @@ const ItemOption = class {
|
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
}
|
|
41
|
+
componentWillLoad() {
|
|
42
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
43
|
+
}
|
|
44
|
+
connectedCallback() {
|
|
45
|
+
this.tabindexController?.init();
|
|
46
|
+
}
|
|
47
|
+
disconnectedCallback() {
|
|
48
|
+
this.tabindexController?.destroy();
|
|
49
|
+
}
|
|
40
50
|
render() {
|
|
41
51
|
const { disabled, expandable, href } = this;
|
|
52
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
42
53
|
const TagType = href === undefined ? 'button' : 'a';
|
|
43
54
|
const mode = ionicGlobal.getIonMode(this);
|
|
44
55
|
const attrs = TagType === 'button'
|
|
@@ -48,12 +59,12 @@ const ItemOption = class {
|
|
|
48
59
|
href: this.href,
|
|
49
60
|
target: this.target,
|
|
50
61
|
};
|
|
51
|
-
return (index.h(index.Host, { key: '
|
|
62
|
+
return (index.h(index.Host, { key: 'b9d323be73e0ac6408aa56a05eeb67076e35daf8', onClick: this.onClick, class: theme.createColorClasses(this.color, {
|
|
52
63
|
[mode]: true,
|
|
53
64
|
'item-option-disabled': disabled,
|
|
54
65
|
'item-option-expandable': expandable,
|
|
55
66
|
'ion-activatable': true,
|
|
56
|
-
}) }, index.h(TagType, { key: '
|
|
67
|
+
}) }, index.h(TagType, { key: '6a59ebaa090613f42fca1fe51eff7863a69526ac', ...attrs, ...tabindexAttributes, class: "button-native", part: "native", disabled: disabled }, index.h("span", { key: '9a5709f3b6d6bccdf0d60345f6171ca5439d54f4', class: "button-inner", part: "inner" }, index.h("slot", { key: '9d76f6239d4c50cb785142a89bba26702a79c1f8', name: "top" }), index.h("div", { key: 'b2aecda5dbfa5e3279d49b6dab6cb14c0b5df697', class: "horizontal-wrapper", part: "container" }, index.h("slot", { key: '40d56d38d7a73a55f5ea4f6cdd6bc62dcfaa8dae', name: "start" }), index.h("slot", { key: 'e531ca665546752bde34525cc6630a5ea2ac2575', name: "icon-only" }), index.h("slot", { key: '2b7a78f6a4776eeb0720f79a81d075f75c63f4ff' }), index.h("slot", { key: 'b296120a461d3b330ec05a97524b8ce5d3250a07', name: "end" })), index.h("slot", { key: '5ebdf7af5acb29cc1b728f812d7f0c4d952512cc', name: "bottom" })), mode === 'md' && index.h("ion-ripple-effect", { key: '538f3e7d90a17ddbcc72ad227a0711573d3f7aac' }))));
|
|
57
68
|
}
|
|
58
69
|
get el() { return index.getElement(this); }
|
|
59
70
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
|
-
var attributeController = require('./attribute-controller-
|
|
7
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
8
8
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
9
9
|
var dir = require('./dir-Bma_9Lqh.js');
|
|
10
10
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
@@ -57,6 +57,14 @@ const Item = class {
|
|
|
57
57
|
buttonChanged() {
|
|
58
58
|
// Update the focusable option when the button option is changed
|
|
59
59
|
this.focusable = this.isFocusable();
|
|
60
|
+
this.tabindexController?.refresh();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Adding or removing `href` adds or removes the native element, so `tabindex` has to move
|
|
64
|
+
* with it. The same goes for `button` in `buttonChanged`.
|
|
65
|
+
*/
|
|
66
|
+
hrefChanged() {
|
|
67
|
+
this.tabindexController?.refresh();
|
|
60
68
|
}
|
|
61
69
|
labelColorChanged(ev) {
|
|
62
70
|
const { color } = this;
|
|
@@ -102,6 +110,7 @@ const Item = class {
|
|
|
102
110
|
this.updateInteractivityOnSlotChange();
|
|
103
111
|
}
|
|
104
112
|
this.ariaController?.init();
|
|
113
|
+
this.tabindexController?.init();
|
|
105
114
|
}
|
|
106
115
|
componentWillLoad() {
|
|
107
116
|
/**
|
|
@@ -111,6 +120,8 @@ const Item = class {
|
|
|
111
120
|
* reads it twice.
|
|
112
121
|
*/
|
|
113
122
|
this.ariaController = attributeController.createAttributeController(this.el, ['aria-label'], () => index.forceUpdate(this));
|
|
123
|
+
// An item that isn't clickable has no native button or link, so `tabindex` stays on the host.
|
|
124
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this), () => this.isClickable());
|
|
114
125
|
}
|
|
115
126
|
componentDidLoad() {
|
|
116
127
|
helpers.raf(() => {
|
|
@@ -128,6 +139,7 @@ const Item = class {
|
|
|
128
139
|
this.indicatorControlObserver = undefined;
|
|
129
140
|
}
|
|
130
141
|
this.ariaController?.destroy();
|
|
142
|
+
this.tabindexController?.destroy();
|
|
131
143
|
}
|
|
132
144
|
totalNestedInputs() {
|
|
133
145
|
// The following elements have a clickable cover that is relative to the entire item
|
|
@@ -242,6 +254,7 @@ const Item = class {
|
|
|
242
254
|
const clickable = this.isClickable();
|
|
243
255
|
const canActivate = this.canActivate();
|
|
244
256
|
const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div';
|
|
257
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
245
258
|
const attrs = TagType === 'button'
|
|
246
259
|
? { type: this.type }
|
|
247
260
|
: {
|
|
@@ -312,7 +325,7 @@ const Item = class {
|
|
|
312
325
|
* multi-input item, and in a clickable item, which is a second tab stop.
|
|
313
326
|
*/
|
|
314
327
|
const slottedIndicatorNeedsRoom = this.hasSlottedIndicatorControl && (multipleInputs || this.isClickable());
|
|
315
|
-
return (index.h(index.Host, { key: '
|
|
328
|
+
return (index.h(index.Host, { key: 'b9de79c9d6fbe11a19c8e507d1c34af9f9068cfa', "aria-disabled": ariaDisabled, class: {
|
|
316
329
|
...childStyles,
|
|
317
330
|
...labelColorStyles,
|
|
318
331
|
...theme.createColorClasses(this.color, {
|
|
@@ -329,12 +342,15 @@ const Item = class {
|
|
|
329
342
|
'ion-focusable': this.focusable,
|
|
330
343
|
'item-rtl': dir.isRTL(el),
|
|
331
344
|
}),
|
|
332
|
-
}, role: inList ? 'listitem' : null }, index.h(TagType, { key: '
|
|
345
|
+
}, role: inList ? 'listitem' : null }, index.h(TagType, { key: 'c52faccd0d44784e300e55c90b4456c491513c3c', ...attrs, ...inheritedAriaAttributes, ...tabindexAttributes, class: "item-native", part: "native", disabled: disabled, ...clickFn }, index.h("slot", { key: '11cc95e796b494cf87db7b810846cb2c18186577', name: "start", onSlotchange: this.updateInteractivityOnSlotChange }), index.h("div", { key: '6c94a9dd570f4e6e65924fdde6bcbb840c9b424d', class: "item-inner", part: "inner" }, index.h("div", { key: '06c490d6f3e15fa811c72d5cd2b7936f99dd8430', class: "input-wrapper", part: "container" }, index.h("slot", { key: '4487a6cf30f3b26455c96726733f57b1dbcab694', onSlotchange: this.updateInteractivityOnSlotChange })), index.h("slot", { key: '16d6e70fa22f43b11bc63304dae9900f4a41b703', name: "end", onSlotchange: this.updateInteractivityOnSlotChange }), showDetail && (index.h("ion-icon", { key: 'b24443f5753b67f9021b8127cebf47d329e0b03d', icon: detailIcon, lazy: false, class: "item-detail-icon", part: "detail-icon", "aria-hidden": "true", "flip-rtl": detailIcon === index$1.chevronForward }))), canActivate && mode === 'md' && index.h("ion-ripple-effect", { key: 'a9b081a6ebe870d057b775cfae2e7a4de6679155' }))));
|
|
333
346
|
}
|
|
334
347
|
get el() { return index.getElement(this); }
|
|
335
348
|
static get watchers() { return {
|
|
336
349
|
"button": [{
|
|
337
350
|
"buttonChanged": 0
|
|
351
|
+
}],
|
|
352
|
+
"href": [{
|
|
353
|
+
"hrefChanged": 0
|
|
338
354
|
}]
|
|
339
355
|
}; }
|
|
340
356
|
};
|
|
@@ -10,6 +10,7 @@ var gestureController = require('./gesture-controller-CeJslptU.js');
|
|
|
10
10
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
11
11
|
var index$1 = require('./index-BTc0Jnhx.js');
|
|
12
12
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
13
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
13
14
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
14
15
|
var index$2 = require('./index-wOmugbdg.js');
|
|
15
16
|
require('./framework-delegate-hNMKEiQC.js');
|
|
@@ -757,6 +758,13 @@ const MenuButton = class {
|
|
|
757
758
|
}
|
|
758
759
|
componentWillLoad() {
|
|
759
760
|
this.inheritedAttributes = helpers.inheritAriaAttributes(this.el);
|
|
761
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
762
|
+
}
|
|
763
|
+
connectedCallback() {
|
|
764
|
+
this.tabindexController?.init();
|
|
765
|
+
}
|
|
766
|
+
disconnectedCallback() {
|
|
767
|
+
this.tabindexController?.destroy();
|
|
760
768
|
}
|
|
761
769
|
componentDidLoad() {
|
|
762
770
|
this.visibilityChanged();
|
|
@@ -766,6 +774,7 @@ const MenuButton = class {
|
|
|
766
774
|
}
|
|
767
775
|
render() {
|
|
768
776
|
const { color, disabled, inheritedAttributes } = this;
|
|
777
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
769
778
|
const mode = ionicGlobal.getIonMode(this);
|
|
770
779
|
const menuIcon = index.config.get('menuIcon', mode === 'ios' ? index$2.menuOutline : index$2.menuSharp);
|
|
771
780
|
const hidden = this.autoHide && !this.visible;
|
|
@@ -773,7 +782,7 @@ const MenuButton = class {
|
|
|
773
782
|
type: this.type,
|
|
774
783
|
};
|
|
775
784
|
const ariaLabel = inheritedAttributes['aria-label'] || 'menu';
|
|
776
|
-
return (index.h(index.Host, { key: '
|
|
785
|
+
return (index.h(index.Host, { key: 'bccc30d2a1e67e484f493211f950391c82f28b00', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, "aria-hidden": hidden ? 'true' : null, class: theme.createColorClasses(color, {
|
|
777
786
|
[mode]: true,
|
|
778
787
|
button: true, // ion-buttons target .button
|
|
779
788
|
'menu-button-hidden': hidden,
|
|
@@ -782,7 +791,7 @@ const MenuButton = class {
|
|
|
782
791
|
'in-toolbar-color': theme.hostContext('ion-toolbar[color]', this.el),
|
|
783
792
|
'ion-activatable': true,
|
|
784
793
|
'ion-focusable': true,
|
|
785
|
-
}) }, index.h("button", { key: '
|
|
794
|
+
}) }, index.h("button", { key: 'c2479290c5fee434c12c75fe47b2a10c58908bcb', ...attrs, disabled: disabled, class: "button-native", part: "native", "aria-label": ariaLabel, ...tabindexAttributes }, index.h("span", { key: 'ab2a5aa0aced1e551f5571dbfd3dabe8b3558370', class: "button-inner" }, index.h("slot", { key: '7e7f827910287e11ffe716639c069e977df64d6a' }, index.h("ion-icon", { key: 'ec4677e9b71d4b2167c64aebef269a58994262d1', part: "icon", icon: menuIcon, mode: mode, lazy: false, "aria-hidden": "true" }))), mode === 'md' && index.h("ion-ripple-effect", { key: '5b88e62b6cb4530f7b63dde0352cb0b7ef73cbff', type: "unbounded" }))));
|
|
786
795
|
}
|
|
787
796
|
get el() { return index.getElement(this); }
|
|
788
797
|
};
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
7
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
8
8
|
var index$1 = require('./index-DMz2Eyis.js');
|
|
9
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
9
10
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
10
11
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
11
12
|
require('./dir-Bma_9Lqh.js');
|
|
@@ -1072,18 +1073,29 @@ const RouterLink = class {
|
|
|
1072
1073
|
theme.openURL(this.href, ev, this.routerDirection, this.routerAnimation);
|
|
1073
1074
|
};
|
|
1074
1075
|
}
|
|
1076
|
+
componentWillLoad() {
|
|
1077
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
1078
|
+
}
|
|
1079
|
+
connectedCallback() {
|
|
1080
|
+
this.tabindexController?.init();
|
|
1081
|
+
}
|
|
1082
|
+
disconnectedCallback() {
|
|
1083
|
+
this.tabindexController?.destroy();
|
|
1084
|
+
}
|
|
1075
1085
|
render() {
|
|
1076
1086
|
const mode = ionicGlobal.getIonMode(this);
|
|
1087
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
1077
1088
|
const attrs = {
|
|
1078
1089
|
href: this.href,
|
|
1079
1090
|
rel: this.rel,
|
|
1080
1091
|
target: this.target,
|
|
1081
1092
|
};
|
|
1082
|
-
return (index.h(index.Host, { key: '
|
|
1093
|
+
return (index.h(index.Host, { key: '51d8c563858a89c274f4b3778b937e545f4626df', onClick: this.onClick, class: theme.createColorClasses(this.color, {
|
|
1083
1094
|
[mode]: true,
|
|
1084
1095
|
'ion-activatable': true,
|
|
1085
|
-
}) }, index.h("a", { key: '
|
|
1096
|
+
}) }, index.h("a", { key: '2f806b3036d648cf01ff69739c7f422c9a554c7d', ...attrs, ...tabindexAttributes }, index.h("slot", { key: '43a2ee8b80574b120d80a8d65e8615921eb36afb' }))));
|
|
1086
1097
|
}
|
|
1098
|
+
get el() { return index.getElement(this); }
|
|
1087
1099
|
};
|
|
1088
1100
|
RouterLink.style = routerLinkCss();
|
|
1089
1101
|
|
|
@@ -8,6 +8,7 @@ var helpers = require('./helpers-BrETKUUX.js');
|
|
|
8
8
|
var dir = require('./dir-Bma_9Lqh.js');
|
|
9
9
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
10
10
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
11
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
11
12
|
|
|
12
13
|
const segmentIosCss = () => `:host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:grid;grid-auto-columns:1fr;position:relative;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:center;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.segment-scrollable){-ms-flex-pack:start;justify-content:start;width:auto;overflow-x:auto;grid-auto-columns:minmax(-webkit-min-content, 1fr);grid-auto-columns:minmax(min-content, 1fr)}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:auto}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}`;
|
|
13
14
|
|
|
@@ -625,6 +626,7 @@ const SegmentButton = class {
|
|
|
625
626
|
this.updateState();
|
|
626
627
|
}
|
|
627
628
|
connectedCallback() {
|
|
629
|
+
this.tabindexController?.init();
|
|
628
630
|
const segmentEl = (this.segmentEl = this.el.closest('ion-segment'));
|
|
629
631
|
if (segmentEl) {
|
|
630
632
|
this.updateState();
|
|
@@ -633,6 +635,7 @@ const SegmentButton = class {
|
|
|
633
635
|
}
|
|
634
636
|
}
|
|
635
637
|
disconnectedCallback() {
|
|
638
|
+
this.tabindexController?.destroy();
|
|
636
639
|
const segmentEl = this.segmentEl;
|
|
637
640
|
if (segmentEl) {
|
|
638
641
|
helpers.removeEventListener(segmentEl, 'ionSelect', this.updateState);
|
|
@@ -644,6 +647,7 @@ const SegmentButton = class {
|
|
|
644
647
|
this.inheritedAttributes = {
|
|
645
648
|
...helpers.inheritAttributes(this.el, ['aria-label']),
|
|
646
649
|
};
|
|
650
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
647
651
|
// Return if there is no contentId defined
|
|
648
652
|
if (!this.contentId)
|
|
649
653
|
return;
|
|
@@ -689,8 +693,9 @@ const SegmentButton = class {
|
|
|
689
693
|
render() {
|
|
690
694
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
691
695
|
const mode = ionicGlobal.getIonMode(this);
|
|
696
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
692
697
|
const hasSegmentColor = () => segmentEl?.color !== undefined;
|
|
693
|
-
return (index.h(index.Host, { key: '
|
|
698
|
+
return (index.h(index.Host, { key: 'd0d37d00f921193edd3a3670363583d9ee1cfb39', class: {
|
|
694
699
|
[mode]: true,
|
|
695
700
|
'in-toolbar': theme.hostContext('ion-toolbar', this.el),
|
|
696
701
|
'in-toolbar-color': theme.hostContext('ion-toolbar[color]', this.el),
|
|
@@ -706,7 +711,7 @@ const SegmentButton = class {
|
|
|
706
711
|
'ion-activatable': true,
|
|
707
712
|
'ion-activatable-instant': true,
|
|
708
713
|
'ion-focusable': true,
|
|
709
|
-
} }, index.h("button", { key: '
|
|
714
|
+
} }, index.h("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 }, index.h("span", { key: '0fdf337f0ba7fa08143124091a580418f7b94a7c', class: "button-inner" }, index.h("slot", { key: 'bce39283cdbe68cffbece870296fecff6f214345' })), mode === 'md' && index.h("ion-ripple-effect", { key: '2653c7c6d50bc00540d249ed98c6c6a5d93672d6' })), index.h("div", { key: 'de0dbdd9f531158cc77ba04e78f4e96e32b6fb02', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, index.h("div", { key: '2006cb914692ae1d5659828e36c502f9747adede', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
710
715
|
}
|
|
711
716
|
get el() { return index.getElement(this); }
|
|
712
717
|
static get watchers() { return {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var index = require('./index-BiQyIvoc.js');
|
|
7
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
7
8
|
var config = require('./config-CjUbvdPW.js');
|
|
8
9
|
var slotMutationController = require('./slot-mutation-controller-CRa_cKOh.js');
|
|
9
10
|
var compareWithUtils = require('./compare-with-utils-DSicavqM.js');
|
|
@@ -180,6 +181,7 @@ const Select = class {
|
|
|
180
181
|
}
|
|
181
182
|
async connectedCallback() {
|
|
182
183
|
const { el } = this;
|
|
184
|
+
this.tabindexController?.init();
|
|
183
185
|
this.slotMutationController = slotMutationController.createSlotMutationController(el, ['label', 'start', 'end'], () => {
|
|
184
186
|
this.startEndContainerController?.calculateContainerWidths();
|
|
185
187
|
index.forceUpdate(this);
|
|
@@ -241,6 +243,7 @@ const Select = class {
|
|
|
241
243
|
}
|
|
242
244
|
componentWillLoad() {
|
|
243
245
|
this.inheritedAttributes = helpers.inheritAttributes(this.el, ['aria-label']);
|
|
246
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
244
247
|
this.hintTextId = this.getHintTextId();
|
|
245
248
|
}
|
|
246
249
|
componentDidLoad() {
|
|
@@ -257,6 +260,7 @@ const Select = class {
|
|
|
257
260
|
this.emitStyle();
|
|
258
261
|
}
|
|
259
262
|
disconnectedCallback() {
|
|
263
|
+
this.tabindexController?.destroy();
|
|
260
264
|
if (this.mutationO) {
|
|
261
265
|
this.mutationO.disconnect();
|
|
262
266
|
this.mutationO = undefined;
|
|
@@ -847,7 +851,8 @@ const Select = class {
|
|
|
847
851
|
}
|
|
848
852
|
renderListbox() {
|
|
849
853
|
const { disabled, inputId, isExpanded, required } = this;
|
|
850
|
-
|
|
854
|
+
const tabindexAttributes = this.tabindexController?.attributes ?? {};
|
|
855
|
+
return (index.h("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 }));
|
|
851
856
|
}
|
|
852
857
|
getHintTextId() {
|
|
853
858
|
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
@@ -897,7 +902,7 @@ const Select = class {
|
|
|
897
902
|
const hasOutlineFill = mode === 'md' && fill === 'outline';
|
|
898
903
|
helpers.renderHiddenInput(true, el, name, parseValue(value), disabled);
|
|
899
904
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || isExpanded));
|
|
900
|
-
return (index.h(index.Host, { key: '
|
|
905
|
+
return (index.h(index.Host, { key: '33b9006ae4d0190621c3ec6241db4507ef08e891', onClick: this.onClick, class: theme.createColorClasses(this.color, {
|
|
901
906
|
[mode]: true,
|
|
902
907
|
'in-item': inItem,
|
|
903
908
|
'in-item-color': theme.hostContext('ion-item.ion-color', el),
|
|
@@ -915,7 +920,7 @@ const Select = class {
|
|
|
915
920
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
916
921
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
917
922
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
918
|
-
}) }, index.h("label", { key: '
|
|
923
|
+
}) }, index.h("label", { key: 'c123702d69e5a7dece801b9765ce52777d4a376c', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, hasOutlineFill && this.renderOutlineContainer(), index.h("div", { key: '9cbac0085afa03e9b5d777b028d7a837ddfc8212', class: "select-start", part: "start", ref: (el) => (this.startContainerEl = el) }, index.h("slot", { key: '179f1454e56c7dc50637b6149c6916a28fc2cf4a', name: "start" })), index.h("div", { key: 'bb492a41a762d8fc4199561967f688284e4b6e1f', class: "select-control", part: "control" }, this.renderLabel(), index.h("div", { key: 'e0f889c0f02e16fe1a47c4ddfeba7a262341a72d', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox(), !hasFloatingOrStackedLabel && this.renderSelectIcon())), index.h("div", { key: 'bb5e5e117d786e02d6ac9d0514c5f54c240388ab', class: "select-end", part: "end", ref: (el) => (this.endContainerEl = el) }, hasFloatingOrStackedLabel && this.renderSelectIcon(), index.h("slot", { key: '07df73fde0d7413e7d28af0d0b25a04593ea77dc', name: "end" })), shouldRenderHighlight && index.h("div", { key: '753762d7c94c48d89e3c727fefbb5c9fdd981ad2', class: "select-highlight" })), this.renderBottomContent()));
|
|
919
924
|
}
|
|
920
925
|
get el() { return index.getElement(this); }
|
|
921
926
|
static get watchers() { return {
|
|
@@ -7,6 +7,7 @@ var index = require('./index-BiQyIvoc.js');
|
|
|
7
7
|
var keyboardController = require('./keyboard-controller-DZE97OtR.js');
|
|
8
8
|
var theme = require('./theme-Bw0rpaNN.js');
|
|
9
9
|
var ionicGlobal = require('./ionic-global-48ceLiJ6.js');
|
|
10
|
+
var attributeController = require('./attribute-controller-BRwSyjfI.js');
|
|
10
11
|
var helpers = require('./helpers-BrETKUUX.js');
|
|
11
12
|
require('./keyboard-BMpscicm.js');
|
|
12
13
|
require('./capacitor-BTjfXFlK.js');
|
|
@@ -153,10 +154,17 @@ const TabButton = class {
|
|
|
153
154
|
this.inheritedAttributes = {
|
|
154
155
|
...helpers.inheritAttributes(this.el, ['aria-label']),
|
|
155
156
|
};
|
|
157
|
+
this.tabindexController = attributeController.createTabindexController(this.el, () => index.forceUpdate(this));
|
|
156
158
|
if (this.layout === undefined) {
|
|
157
159
|
this.layout = index.config.get('tabButtonLayout', 'icon-top');
|
|
158
160
|
}
|
|
159
161
|
}
|
|
162
|
+
connectedCallback() {
|
|
163
|
+
this.tabindexController?.init();
|
|
164
|
+
}
|
|
165
|
+
disconnectedCallback() {
|
|
166
|
+
this.tabindexController?.destroy();
|
|
167
|
+
}
|
|
160
168
|
selectTab(ev) {
|
|
161
169
|
if (this.tab !== undefined) {
|
|
162
170
|
if (!this.disabled) {
|
|
@@ -178,13 +186,14 @@ const TabButton = class {
|
|
|
178
186
|
render() {
|
|
179
187
|
const { disabled, hasIcon, hasLabel, href, rel, target, layout, selected, tab, inheritedAttributes } = this;
|
|
180
188
|
const mode = ionicGlobal.getIonMode(this);
|
|
189
|
+
const tabindex = this.tabindexController?.attributes.tabindex;
|
|
181
190
|
const attrs = {
|
|
182
191
|
download: this.download,
|
|
183
192
|
href,
|
|
184
193
|
rel,
|
|
185
194
|
target,
|
|
186
195
|
};
|
|
187
|
-
return (index.h(index.Host, { key: '
|
|
196
|
+
return (index.h(index.Host, { key: '177c6c12cbee6e5e0b54375edb62d2a05b51b27b', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
188
197
|
[mode]: true,
|
|
189
198
|
'tab-selected': selected,
|
|
190
199
|
'tab-disabled': disabled,
|
|
@@ -196,7 +205,7 @@ const TabButton = class {
|
|
|
196
205
|
'ion-activatable': true,
|
|
197
206
|
'ion-selectable': true,
|
|
198
207
|
'ion-focusable': true,
|
|
199
|
-
} }, index.h("a", { key: '
|
|
208
|
+
} }, index.h("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 }, index.h("span", { key: 'cef69478ddc3fc9144acab61cb8cc0df1d8ca711', class: "button-inner" }, index.h("slot", { key: 'e276e619c8062c36f1de0d2a46abba750e8e58d7' })), mode === 'md' && index.h("ion-ripple-effect", { key: '6f747fd5723d00a1aa034f8d6a97e752f5f3c1c6', type: "unbounded" }))));
|
|
200
209
|
}
|
|
201
210
|
get el() { return index.getElement(this); }
|
|
202
211
|
};
|