@ionic/core 8.7.8-dev.11761832341.1f46802b → 8.7.8-dev.11761837190.1db6c2b6
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-accordion.js +33 -4
- package/dist/cjs/ion-accordion_2.cjs.entry.js +33 -4
- package/dist/collection/components/accordion/accordion.js +33 -4
- package/dist/docs.json +1 -1
- package/dist/esm/ion-accordion_2.entry.js +33 -4
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-b331b4e6.entry.js +4 -0
- package/dist/types/components/accordion/accordion.d.ts +5 -0
- package/hydrate/index.js +33 -4
- package/hydrate/index.mjs +33 -4
- package/package.json +1 -1
- package/dist/ionic/p-0374e021.entry.js +0 -4
|
@@ -22,12 +22,14 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class Accordion extends HTMLE
|
|
|
22
22
|
this.updateListener = (ev) => {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
|
|
25
|
+
console.log('[Accordion]', this.value, 'updateListener - initial:', initialUpdate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
25
26
|
/**
|
|
26
27
|
* If this is not an initial update (meaning it's from a user interaction
|
|
27
28
|
* or programmatic call after load), mark that we've had an interaction.
|
|
28
29
|
* This enables animations for this and future updates.
|
|
29
30
|
*/
|
|
30
31
|
if (!initialUpdate) {
|
|
32
|
+
console.log('[Accordion]', this.value, 'Setting hasInteracted to true');
|
|
31
33
|
this.hasInteracted = true;
|
|
32
34
|
}
|
|
33
35
|
this.updateState(initialUpdate);
|
|
@@ -42,6 +44,11 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class Accordion extends HTMLE
|
|
|
42
44
|
* set to an expanded or collapsed state on initial load.
|
|
43
45
|
*/
|
|
44
46
|
this.hasInteracted = false;
|
|
47
|
+
/**
|
|
48
|
+
* Tracks if this accordion has ever been expanded.
|
|
49
|
+
* Used to prevent the first expansion from animating.
|
|
50
|
+
*/
|
|
51
|
+
this.hasEverBeenExpanded = false;
|
|
45
52
|
/**
|
|
46
53
|
* The value of the accordion. Defaults to an autogenerated
|
|
47
54
|
* value.
|
|
@@ -147,18 +154,33 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class Accordion extends HTMLE
|
|
|
147
154
|
ionItem.appendChild(iconEl);
|
|
148
155
|
};
|
|
149
156
|
this.expandAccordion = (initialUpdate = false) => {
|
|
157
|
+
console.log('[Accordion]', this.value, 'expandAccordion - initialUpdate:', initialUpdate, 'state:', this.state);
|
|
150
158
|
const { contentEl, contentElWrapper } = this;
|
|
151
159
|
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
|
152
160
|
this.state = 4 /* AccordionState.Expanded */;
|
|
161
|
+
/**
|
|
162
|
+
* Mark that this accordion has been expanded at least once.
|
|
163
|
+
* Do this even on initial expansion so future interactions animate.
|
|
164
|
+
*/
|
|
165
|
+
this.hasEverBeenExpanded = true;
|
|
166
|
+
console.log('[Accordion]', this.value, 'expandAccordion early return - hasEverBeenExpanded set to true');
|
|
153
167
|
return;
|
|
154
168
|
}
|
|
155
169
|
if (this.state === 4 /* AccordionState.Expanded */) {
|
|
170
|
+
console.log('[Accordion]', this.value, 'expandAccordion - already expanded, returning');
|
|
156
171
|
return;
|
|
157
172
|
}
|
|
158
173
|
if (this.currentRaf !== undefined) {
|
|
159
174
|
cancelAnimationFrame(this.currentRaf);
|
|
160
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Mark that this accordion has been expanded at least once.
|
|
178
|
+
* This allows subsequent expansions to animate.
|
|
179
|
+
*/
|
|
180
|
+
this.hasEverBeenExpanded = true;
|
|
181
|
+
console.log('[Accordion]', this.value, 'expandAccordion - hasEverBeenExpanded set to true');
|
|
161
182
|
if (this.shouldAnimate()) {
|
|
183
|
+
console.log('[Accordion]', this.value, 'expandAccordion - will animate');
|
|
162
184
|
raf(() => {
|
|
163
185
|
this.state = 8 /* AccordionState.Expanding */;
|
|
164
186
|
this.currentRaf = raf(async () => {
|
|
@@ -216,8 +238,13 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class Accordion extends HTMLE
|
|
|
216
238
|
* Don't animate until after the first user interaction.
|
|
217
239
|
* This prevents animations on initial load when accordions
|
|
218
240
|
* start in an expanded or collapsed state programmatically.
|
|
241
|
+
*
|
|
242
|
+
* Additionally, don't animate the very first expansion even if
|
|
243
|
+
* hasInteracted is true. This handles edge cases like React StrictMode
|
|
244
|
+
* where effects run twice and might incorrectly mark as interacted.
|
|
219
245
|
*/
|
|
220
|
-
if (!this.hasInteracted) {
|
|
246
|
+
if (!this.hasInteracted || !this.hasEverBeenExpanded) {
|
|
247
|
+
console.log('[Accordion]', this.value, 'shouldAnimate: false - hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
221
248
|
return false;
|
|
222
249
|
}
|
|
223
250
|
if (typeof window === 'undefined') {
|
|
@@ -352,8 +379,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class Accordion extends HTMLE
|
|
|
352
379
|
const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
|
|
353
380
|
const headerPart = expanded ? 'header expanded' : 'header';
|
|
354
381
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
382
|
+
const shouldAnimate = this.shouldAnimate();
|
|
383
|
+
console.log('[Accordion]', this.value, 'render - state:', this.state, 'shouldAnimate:', shouldAnimate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
355
384
|
this.setAria(expanded);
|
|
356
|
-
return (h(Host, { key: '
|
|
385
|
+
return (h(Host, { key: '9f73d0ed2ced6269234bdade7c0b95ec1bc697de', class: {
|
|
357
386
|
[mode]: true,
|
|
358
387
|
'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
|
|
359
388
|
'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
|
|
@@ -363,8 +392,8 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class Accordion extends HTMLE
|
|
|
363
392
|
'accordion-previous': this.isPrevious,
|
|
364
393
|
'accordion-disabled': disabled,
|
|
365
394
|
'accordion-readonly': readonly,
|
|
366
|
-
'accordion-animated':
|
|
367
|
-
} }, h("div", { key: '
|
|
395
|
+
'accordion-animated': shouldAnimate,
|
|
396
|
+
} }, h("div", { key: 'a58ed92158e49220057517759084d81d69f64cf9', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, h("slot", { key: '0d7fb864762d109ffee42e1d64f3dfc08986fa63', name: "header" })), h("div", { key: 'b506df416bcdbd5a0a1bb28017eac44806bba6f0', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, h("div", { key: '304e77c2605f2c947afd9f97f608ef0ab11def03', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, h("slot", { key: 'df5490817fd493ed807d0666d872850612ff986c', name: "content" })))));
|
|
368
397
|
}
|
|
369
398
|
static get delegatesFocus() { return true; }
|
|
370
399
|
get el() { return this; }
|
|
@@ -18,12 +18,14 @@ const Accordion = class {
|
|
|
18
18
|
this.updateListener = (ev) => {
|
|
19
19
|
var _a, _b;
|
|
20
20
|
const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
|
|
21
|
+
console.log('[Accordion]', this.value, 'updateListener - initial:', initialUpdate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
21
22
|
/**
|
|
22
23
|
* If this is not an initial update (meaning it's from a user interaction
|
|
23
24
|
* or programmatic call after load), mark that we've had an interaction.
|
|
24
25
|
* This enables animations for this and future updates.
|
|
25
26
|
*/
|
|
26
27
|
if (!initialUpdate) {
|
|
28
|
+
console.log('[Accordion]', this.value, 'Setting hasInteracted to true');
|
|
27
29
|
this.hasInteracted = true;
|
|
28
30
|
}
|
|
29
31
|
this.updateState(initialUpdate);
|
|
@@ -38,6 +40,11 @@ const Accordion = class {
|
|
|
38
40
|
* set to an expanded or collapsed state on initial load.
|
|
39
41
|
*/
|
|
40
42
|
this.hasInteracted = false;
|
|
43
|
+
/**
|
|
44
|
+
* Tracks if this accordion has ever been expanded.
|
|
45
|
+
* Used to prevent the first expansion from animating.
|
|
46
|
+
*/
|
|
47
|
+
this.hasEverBeenExpanded = false;
|
|
41
48
|
/**
|
|
42
49
|
* The value of the accordion. Defaults to an autogenerated
|
|
43
50
|
* value.
|
|
@@ -143,18 +150,33 @@ const Accordion = class {
|
|
|
143
150
|
ionItem.appendChild(iconEl);
|
|
144
151
|
};
|
|
145
152
|
this.expandAccordion = (initialUpdate = false) => {
|
|
153
|
+
console.log('[Accordion]', this.value, 'expandAccordion - initialUpdate:', initialUpdate, 'state:', this.state);
|
|
146
154
|
const { contentEl, contentElWrapper } = this;
|
|
147
155
|
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
|
148
156
|
this.state = 4 /* AccordionState.Expanded */;
|
|
157
|
+
/**
|
|
158
|
+
* Mark that this accordion has been expanded at least once.
|
|
159
|
+
* Do this even on initial expansion so future interactions animate.
|
|
160
|
+
*/
|
|
161
|
+
this.hasEverBeenExpanded = true;
|
|
162
|
+
console.log('[Accordion]', this.value, 'expandAccordion early return - hasEverBeenExpanded set to true');
|
|
149
163
|
return;
|
|
150
164
|
}
|
|
151
165
|
if (this.state === 4 /* AccordionState.Expanded */) {
|
|
166
|
+
console.log('[Accordion]', this.value, 'expandAccordion - already expanded, returning');
|
|
152
167
|
return;
|
|
153
168
|
}
|
|
154
169
|
if (this.currentRaf !== undefined) {
|
|
155
170
|
cancelAnimationFrame(this.currentRaf);
|
|
156
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Mark that this accordion has been expanded at least once.
|
|
174
|
+
* This allows subsequent expansions to animate.
|
|
175
|
+
*/
|
|
176
|
+
this.hasEverBeenExpanded = true;
|
|
177
|
+
console.log('[Accordion]', this.value, 'expandAccordion - hasEverBeenExpanded set to true');
|
|
157
178
|
if (this.shouldAnimate()) {
|
|
179
|
+
console.log('[Accordion]', this.value, 'expandAccordion - will animate');
|
|
158
180
|
helpers.raf(() => {
|
|
159
181
|
this.state = 8 /* AccordionState.Expanding */;
|
|
160
182
|
this.currentRaf = helpers.raf(async () => {
|
|
@@ -212,8 +234,13 @@ const Accordion = class {
|
|
|
212
234
|
* Don't animate until after the first user interaction.
|
|
213
235
|
* This prevents animations on initial load when accordions
|
|
214
236
|
* start in an expanded or collapsed state programmatically.
|
|
237
|
+
*
|
|
238
|
+
* Additionally, don't animate the very first expansion even if
|
|
239
|
+
* hasInteracted is true. This handles edge cases like React StrictMode
|
|
240
|
+
* where effects run twice and might incorrectly mark as interacted.
|
|
215
241
|
*/
|
|
216
|
-
if (!this.hasInteracted) {
|
|
242
|
+
if (!this.hasInteracted || !this.hasEverBeenExpanded) {
|
|
243
|
+
console.log('[Accordion]', this.value, 'shouldAnimate: false - hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
217
244
|
return false;
|
|
218
245
|
}
|
|
219
246
|
if (typeof window === 'undefined') {
|
|
@@ -348,8 +375,10 @@ const Accordion = class {
|
|
|
348
375
|
const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
|
|
349
376
|
const headerPart = expanded ? 'header expanded' : 'header';
|
|
350
377
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
378
|
+
const shouldAnimate = this.shouldAnimate();
|
|
379
|
+
console.log('[Accordion]', this.value, 'render - state:', this.state, 'shouldAnimate:', shouldAnimate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
351
380
|
this.setAria(expanded);
|
|
352
|
-
return (index.h(index.Host, { key: '
|
|
381
|
+
return (index.h(index.Host, { key: '9f73d0ed2ced6269234bdade7c0b95ec1bc697de', class: {
|
|
353
382
|
[mode]: true,
|
|
354
383
|
'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
|
|
355
384
|
'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
|
|
@@ -359,8 +388,8 @@ const Accordion = class {
|
|
|
359
388
|
'accordion-previous': this.isPrevious,
|
|
360
389
|
'accordion-disabled': disabled,
|
|
361
390
|
'accordion-readonly': readonly,
|
|
362
|
-
'accordion-animated':
|
|
363
|
-
} }, index.h("div", { key: '
|
|
391
|
+
'accordion-animated': shouldAnimate,
|
|
392
|
+
} }, index.h("div", { key: 'a58ed92158e49220057517759084d81d69f64cf9', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, index.h("slot", { key: '0d7fb864762d109ffee42e1d64f3dfc08986fa63', name: "header" })), index.h("div", { key: 'b506df416bcdbd5a0a1bb28017eac44806bba6f0', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, index.h("div", { key: '304e77c2605f2c947afd9f97f608ef0ab11def03', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, index.h("slot", { key: 'df5490817fd493ed807d0666d872850612ff986c', name: "content" })))));
|
|
364
393
|
}
|
|
365
394
|
static get delegatesFocus() { return true; }
|
|
366
395
|
get el() { return index.getElement(this); }
|
|
@@ -24,12 +24,14 @@ export class Accordion {
|
|
|
24
24
|
this.updateListener = (ev) => {
|
|
25
25
|
var _a, _b;
|
|
26
26
|
const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
|
|
27
|
+
console.log('[Accordion]', this.value, 'updateListener - initial:', initialUpdate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
27
28
|
/**
|
|
28
29
|
* If this is not an initial update (meaning it's from a user interaction
|
|
29
30
|
* or programmatic call after load), mark that we've had an interaction.
|
|
30
31
|
* This enables animations for this and future updates.
|
|
31
32
|
*/
|
|
32
33
|
if (!initialUpdate) {
|
|
34
|
+
console.log('[Accordion]', this.value, 'Setting hasInteracted to true');
|
|
33
35
|
this.hasInteracted = true;
|
|
34
36
|
}
|
|
35
37
|
this.updateState(initialUpdate);
|
|
@@ -44,6 +46,11 @@ export class Accordion {
|
|
|
44
46
|
* set to an expanded or collapsed state on initial load.
|
|
45
47
|
*/
|
|
46
48
|
this.hasInteracted = false;
|
|
49
|
+
/**
|
|
50
|
+
* Tracks if this accordion has ever been expanded.
|
|
51
|
+
* Used to prevent the first expansion from animating.
|
|
52
|
+
*/
|
|
53
|
+
this.hasEverBeenExpanded = false;
|
|
47
54
|
/**
|
|
48
55
|
* The value of the accordion. Defaults to an autogenerated
|
|
49
56
|
* value.
|
|
@@ -149,18 +156,33 @@ export class Accordion {
|
|
|
149
156
|
ionItem.appendChild(iconEl);
|
|
150
157
|
};
|
|
151
158
|
this.expandAccordion = (initialUpdate = false) => {
|
|
159
|
+
console.log('[Accordion]', this.value, 'expandAccordion - initialUpdate:', initialUpdate, 'state:', this.state);
|
|
152
160
|
const { contentEl, contentElWrapper } = this;
|
|
153
161
|
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
|
154
162
|
this.state = 4 /* AccordionState.Expanded */;
|
|
163
|
+
/**
|
|
164
|
+
* Mark that this accordion has been expanded at least once.
|
|
165
|
+
* Do this even on initial expansion so future interactions animate.
|
|
166
|
+
*/
|
|
167
|
+
this.hasEverBeenExpanded = true;
|
|
168
|
+
console.log('[Accordion]', this.value, 'expandAccordion early return - hasEverBeenExpanded set to true');
|
|
155
169
|
return;
|
|
156
170
|
}
|
|
157
171
|
if (this.state === 4 /* AccordionState.Expanded */) {
|
|
172
|
+
console.log('[Accordion]', this.value, 'expandAccordion - already expanded, returning');
|
|
158
173
|
return;
|
|
159
174
|
}
|
|
160
175
|
if (this.currentRaf !== undefined) {
|
|
161
176
|
cancelAnimationFrame(this.currentRaf);
|
|
162
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Mark that this accordion has been expanded at least once.
|
|
180
|
+
* This allows subsequent expansions to animate.
|
|
181
|
+
*/
|
|
182
|
+
this.hasEverBeenExpanded = true;
|
|
183
|
+
console.log('[Accordion]', this.value, 'expandAccordion - hasEverBeenExpanded set to true');
|
|
163
184
|
if (this.shouldAnimate()) {
|
|
185
|
+
console.log('[Accordion]', this.value, 'expandAccordion - will animate');
|
|
164
186
|
raf(() => {
|
|
165
187
|
this.state = 8 /* AccordionState.Expanding */;
|
|
166
188
|
this.currentRaf = raf(async () => {
|
|
@@ -218,8 +240,13 @@ export class Accordion {
|
|
|
218
240
|
* Don't animate until after the first user interaction.
|
|
219
241
|
* This prevents animations on initial load when accordions
|
|
220
242
|
* start in an expanded or collapsed state programmatically.
|
|
243
|
+
*
|
|
244
|
+
* Additionally, don't animate the very first expansion even if
|
|
245
|
+
* hasInteracted is true. This handles edge cases like React StrictMode
|
|
246
|
+
* where effects run twice and might incorrectly mark as interacted.
|
|
221
247
|
*/
|
|
222
|
-
if (!this.hasInteracted) {
|
|
248
|
+
if (!this.hasInteracted || !this.hasEverBeenExpanded) {
|
|
249
|
+
console.log('[Accordion]', this.value, 'shouldAnimate: false - hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
223
250
|
return false;
|
|
224
251
|
}
|
|
225
252
|
if (typeof window === 'undefined') {
|
|
@@ -354,8 +381,10 @@ export class Accordion {
|
|
|
354
381
|
const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
|
|
355
382
|
const headerPart = expanded ? 'header expanded' : 'header';
|
|
356
383
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
384
|
+
const shouldAnimate = this.shouldAnimate();
|
|
385
|
+
console.log('[Accordion]', this.value, 'render - state:', this.state, 'shouldAnimate:', shouldAnimate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
357
386
|
this.setAria(expanded);
|
|
358
|
-
return (h(Host, { key: '
|
|
387
|
+
return (h(Host, { key: '9f73d0ed2ced6269234bdade7c0b95ec1bc697de', class: {
|
|
359
388
|
[mode]: true,
|
|
360
389
|
'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
|
|
361
390
|
'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
|
|
@@ -365,8 +394,8 @@ export class Accordion {
|
|
|
365
394
|
'accordion-previous': this.isPrevious,
|
|
366
395
|
'accordion-disabled': disabled,
|
|
367
396
|
'accordion-readonly': readonly,
|
|
368
|
-
'accordion-animated':
|
|
369
|
-
} }, h("div", { key: '
|
|
397
|
+
'accordion-animated': shouldAnimate,
|
|
398
|
+
} }, h("div", { key: 'a58ed92158e49220057517759084d81d69f64cf9', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, h("slot", { key: '0d7fb864762d109ffee42e1d64f3dfc08986fa63', name: "header" })), h("div", { key: 'b506df416bcdbd5a0a1bb28017eac44806bba6f0', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, h("div", { key: '304e77c2605f2c947afd9f97f608ef0ab11def03', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, h("slot", { key: 'df5490817fd493ed807d0666d872850612ff986c', name: "content" })))));
|
|
370
399
|
}
|
|
371
400
|
static get is() { return "ion-accordion"; }
|
|
372
401
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs.json
CHANGED
|
@@ -16,12 +16,14 @@ const Accordion = class {
|
|
|
16
16
|
this.updateListener = (ev) => {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
|
|
19
|
+
console.log('[Accordion]', this.value, 'updateListener - initial:', initialUpdate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
19
20
|
/**
|
|
20
21
|
* If this is not an initial update (meaning it's from a user interaction
|
|
21
22
|
* or programmatic call after load), mark that we've had an interaction.
|
|
22
23
|
* This enables animations for this and future updates.
|
|
23
24
|
*/
|
|
24
25
|
if (!initialUpdate) {
|
|
26
|
+
console.log('[Accordion]', this.value, 'Setting hasInteracted to true');
|
|
25
27
|
this.hasInteracted = true;
|
|
26
28
|
}
|
|
27
29
|
this.updateState(initialUpdate);
|
|
@@ -36,6 +38,11 @@ const Accordion = class {
|
|
|
36
38
|
* set to an expanded or collapsed state on initial load.
|
|
37
39
|
*/
|
|
38
40
|
this.hasInteracted = false;
|
|
41
|
+
/**
|
|
42
|
+
* Tracks if this accordion has ever been expanded.
|
|
43
|
+
* Used to prevent the first expansion from animating.
|
|
44
|
+
*/
|
|
45
|
+
this.hasEverBeenExpanded = false;
|
|
39
46
|
/**
|
|
40
47
|
* The value of the accordion. Defaults to an autogenerated
|
|
41
48
|
* value.
|
|
@@ -141,18 +148,33 @@ const Accordion = class {
|
|
|
141
148
|
ionItem.appendChild(iconEl);
|
|
142
149
|
};
|
|
143
150
|
this.expandAccordion = (initialUpdate = false) => {
|
|
151
|
+
console.log('[Accordion]', this.value, 'expandAccordion - initialUpdate:', initialUpdate, 'state:', this.state);
|
|
144
152
|
const { contentEl, contentElWrapper } = this;
|
|
145
153
|
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
|
146
154
|
this.state = 4 /* AccordionState.Expanded */;
|
|
155
|
+
/**
|
|
156
|
+
* Mark that this accordion has been expanded at least once.
|
|
157
|
+
* Do this even on initial expansion so future interactions animate.
|
|
158
|
+
*/
|
|
159
|
+
this.hasEverBeenExpanded = true;
|
|
160
|
+
console.log('[Accordion]', this.value, 'expandAccordion early return - hasEverBeenExpanded set to true');
|
|
147
161
|
return;
|
|
148
162
|
}
|
|
149
163
|
if (this.state === 4 /* AccordionState.Expanded */) {
|
|
164
|
+
console.log('[Accordion]', this.value, 'expandAccordion - already expanded, returning');
|
|
150
165
|
return;
|
|
151
166
|
}
|
|
152
167
|
if (this.currentRaf !== undefined) {
|
|
153
168
|
cancelAnimationFrame(this.currentRaf);
|
|
154
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Mark that this accordion has been expanded at least once.
|
|
172
|
+
* This allows subsequent expansions to animate.
|
|
173
|
+
*/
|
|
174
|
+
this.hasEverBeenExpanded = true;
|
|
175
|
+
console.log('[Accordion]', this.value, 'expandAccordion - hasEverBeenExpanded set to true');
|
|
155
176
|
if (this.shouldAnimate()) {
|
|
177
|
+
console.log('[Accordion]', this.value, 'expandAccordion - will animate');
|
|
156
178
|
raf(() => {
|
|
157
179
|
this.state = 8 /* AccordionState.Expanding */;
|
|
158
180
|
this.currentRaf = raf(async () => {
|
|
@@ -210,8 +232,13 @@ const Accordion = class {
|
|
|
210
232
|
* Don't animate until after the first user interaction.
|
|
211
233
|
* This prevents animations on initial load when accordions
|
|
212
234
|
* start in an expanded or collapsed state programmatically.
|
|
235
|
+
*
|
|
236
|
+
* Additionally, don't animate the very first expansion even if
|
|
237
|
+
* hasInteracted is true. This handles edge cases like React StrictMode
|
|
238
|
+
* where effects run twice and might incorrectly mark as interacted.
|
|
213
239
|
*/
|
|
214
|
-
if (!this.hasInteracted) {
|
|
240
|
+
if (!this.hasInteracted || !this.hasEverBeenExpanded) {
|
|
241
|
+
console.log('[Accordion]', this.value, 'shouldAnimate: false - hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
215
242
|
return false;
|
|
216
243
|
}
|
|
217
244
|
if (typeof window === 'undefined') {
|
|
@@ -346,8 +373,10 @@ const Accordion = class {
|
|
|
346
373
|
const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
|
|
347
374
|
const headerPart = expanded ? 'header expanded' : 'header';
|
|
348
375
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
376
|
+
const shouldAnimate = this.shouldAnimate();
|
|
377
|
+
console.log('[Accordion]', this.value, 'render - state:', this.state, 'shouldAnimate:', shouldAnimate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
349
378
|
this.setAria(expanded);
|
|
350
|
-
return (h(Host, { key: '
|
|
379
|
+
return (h(Host, { key: '9f73d0ed2ced6269234bdade7c0b95ec1bc697de', class: {
|
|
351
380
|
[mode]: true,
|
|
352
381
|
'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
|
|
353
382
|
'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
|
|
@@ -357,8 +386,8 @@ const Accordion = class {
|
|
|
357
386
|
'accordion-previous': this.isPrevious,
|
|
358
387
|
'accordion-disabled': disabled,
|
|
359
388
|
'accordion-readonly': readonly,
|
|
360
|
-
'accordion-animated':
|
|
361
|
-
} }, h("div", { key: '
|
|
389
|
+
'accordion-animated': shouldAnimate,
|
|
390
|
+
} }, h("div", { key: 'a58ed92158e49220057517759084d81d69f64cf9', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, h("slot", { key: '0d7fb864762d109ffee42e1d64f3dfc08986fa63', name: "header" })), h("div", { key: 'b506df416bcdbd5a0a1bb28017eac44806bba6f0', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, h("div", { key: '304e77c2605f2c947afd9f97f608ef0ab11def03', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, h("slot", { key: 'df5490817fd493ed807d0666d872850612ff986c', name: "content" })))));
|
|
362
391
|
}
|
|
363
392
|
static get delegatesFocus() { return true; }
|
|
364
393
|
get el() { return getElement(this); }
|
package/dist/ionic/ionic.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,H as o,b as t}from"./p-C8IsBmNU.js";export{s as setNonce}from"./p-C8IsBmNU.js";import{g as n}from"./p-CJxh_yLS.js";import"./p-BFvmZNyx.js";var a=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const t=o.call(this,!1),n=this.childNodes;if(e)for(let e=0;e<n.length;e++)2!==n[e].nodeType&&t.appendChild(n[e].cloneNode(!0));return t}};(()=>{a(o.prototype);const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t(JSON.parse('[["p-83be404e",[[289,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[289,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]],{"type":["typeChanged"],"disabled":["disabledChanged"],"side":["sideChanged"],"swipeGesture":["swipeGestureChanged"]}],[257,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-b57c6d3e",[[289,"ion-input-password-toggle",{"color":[513],"showIcon":[1,"show-icon"],"hideIcon":[1,"hide-icon"],"type":[1025]},null,{"type":["onTypeChange"]}]]],["p-6444c606",[[289,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[257,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]},null,{"activated":["activatedChanged"]}],[257,"ion-fab-list",{"activated":[4],"side":[1]},null,{"activated":["activatedChanged"]}]]],["p-639dd543",[[256,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[288,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]},null,{"disabled":["disabledChanged"]}]]],["p-49d06882",[[289,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["p-15193d01",[[289,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"positionAnchor":[1,"position-anchor"],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"swipeGesture":[1,"swipe-gesture"],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"swipeGesture":["swipeGestureChanged"],"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-79bd78f9",[[289,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[288,"ion-card-content"],[289,"ion-card-header",{"color":[513],"translucent":[4]}],[289,"ion-card-subtitle",{"color":[513]}],[289,"ion-card-title",{"color":[513]}]]],["p-316c0420",[[289,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[288,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[256,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]},null,{"disabled":["disabledChanged"]}]]],["p-0374e021",[[305,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32],"hasInteracted":[32]},null,{"value":["valueChanged"]}],[289,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]],{"value":["valueChanged"],"disabled":["disabledChanged"],"readonly":["readonlyChanged"]}]]],["p-cc45bcbc",[[288,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[256,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]},null,{"threshold":["thresholdChanged"],"disabled":["disabledChanged"]}]]],["p-2a939845",[[289,"ion-reorder",null,[[2,"click","onClick"]]],[256,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]},null,{"disabled":["disabledChanged"]}]]],["p-0dfa5a37",[[289,"ion-segment-button",{"contentId":[513,"content-id"],"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]},null,{"value":["valueChanged"]}],[289,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[16,"ionSegmentViewScroll","handleSegmentViewScroll"],[0,"keydown","onKeyDown"]],{"color":["colorChanged"],"swipeGesture":["swipeGestureChanged"],"value":["valueChanged"],"disabled":["disabledChanged"]}]]],["p-b0a7585c",[[289,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-8bdfc8f6",[[294,"ion-input",{"color":[513],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearInputIcon":[1,"clear-input-icon"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16],"debounce":[2],"disabled":[516],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"type":[1],"value":[1032],"hasFocus":[32],"isInvalid":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"type":["onTypeChange"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-074839fc",[[290,"ion-searchbar",{"color":[513],"animated":[4],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]},null,{"lang":["onLangChanged"],"dir":["onDirChanged"],"debounce":["debounceChanged"],"value":["valueChanged"],"showCancelButton":["showCancelButtonChanged"]}]]],["p-c17c0a01",[[289,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"activated":[32]},null,{"disabled":["disabledChanged"]}]]],["p-dbbe606a",[[257,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64],"getLength":[64]},null,{"swipeGesture":["swipeGestureChanged"],"root":["rootChanged"]}],[256,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-a127bee2",[[257,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]},null,{"active":["changeActive"]}],[257,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-4cc26913",[[294,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[514],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"shape":[1],"hasFocus":[32],"isInvalid":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-582824c5",[[289,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-98fc09eb",[[290,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-da7d04cc",[[289,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}],[289,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]],{"maxItems":["maxItemsChanged"],"itemsBeforeCollapse":["maxItemsChanged"],"itemsAfterCollapse":["maxItemsChanged"]}]]],["p-7268efa5",[[289,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[289,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},null,{"selectedTab":["selectedTabChanged"]}]]],["p-ac4eb91d",[[289,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-31f7095f",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]},null,{"url":["onUpdate"],"component":["onUpdate"],"componentProps":["onComponentProps"]}],[0,"ion-route-redirect",{"from":[1],"to":[1]},null,{"from":["propDidChange"],"to":["propDidChange"]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[257,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-d126e8d3",[[289,"ion-avatar"],[289,"ion-badge",{"color":[513]}],[257,"ion-thumbnail"]]],["p-72c38b88",[[257,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[257,"ion-grid",{"fixed":[4]}],[257,"ion-row"]]],["p-46d74291",[[257,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]},null,{"src":["srcChanged"]}]]],["p-11518b31",[[294,"ion-input-otp",{"autocapitalize":[1],"color":[513],"disabled":[516],"fill":[1],"inputmode":[1],"length":[2],"pattern":[1],"readonly":[516],"separators":[1],"shape":[1],"size":[1],"type":[1],"value":[1032],"inputValues":[32],"hasFocus":[32],"previousInputValues":[32],"setFocus":[64]},null,{"value":["valueChanged"],"separators":["processSeparators"],"length":["processSeparators"]}]]],["p-86f53961",[[289,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-1647c46c",[[289,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]},null,{"debounce":["debounceChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"],"activeBarStart":["activeBarStartChanged"],"disabled":["disabledChanged"],"value":["valueChanged"]}]]],["p-94de5cfa",[[257,"ion-segment-content"]]],["p-020af078",[[289,"ion-segment-view",{"disabled":[4],"isManualScroll":[32],"setContent":[64]},[[1,"scroll","handleScroll"],[1,"touchstart","handleScrollStart"],[1,"touchend","handleTouchEnd"]]]]],["p-3a6caca9",[[289,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32],"isVisible":[64]},null,{"visible":["visibleChanged"],"disabled":["updateState"],"when":["updateState"]}]]],["p-51a60e0f",[[257,"ion-text",{"color":[513]}]]],["p-0b80d700",[[290,"ion-select-modal",{"header":[1],"multiple":[4],"options":[16]}]]],["p-4efea47a",[[289,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"formatOptions":[16],"readonly":[4],"isDateEnabled":[16],"showAdjacentDays":[4,"show-adjacent-days"],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16],"multiple":[4],"highlightedDates":[16],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isTimePopoverOpen":[32],"forceRenderDate":[32],"confirm":[64],"reset":[64],"cancel":[64]},null,{"formatOptions":["formatOptionsChanged"],"disabled":["disabledChanged"],"min":["minChanged"],"max":["maxChanged"],"presentation":["presentationChanged"],"yearValues":["yearValuesChanged"],"monthValues":["monthValuesChanged"],"dayValues":["dayValuesChanged"],"hourValues":["hourValuesChanged"],"minuteValues":["minuteValuesChanged"],"value":["valueChanged"]}],[290,"ion-picker-legacy",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}],[288,"ion-picker-legacy-column",{"col":[16]},null,{"col":["colChanged"]}]]],["p-510d86e1",[[290,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-7da39a4d",[[290,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"],"buttons":["buttonsChanged"],"inputs":["inputsChanged"]}]]],["p-a80f1b04",[[289,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"expandToScroll":[4,"expand-to-scroll"],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"focusTrap":[4,"focus-trap"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]},[[9,"resize","onWindowResize"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-9575b654",[[289,"ion-picker",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]],["p-675b1a31",[[257,"ion-picker-column",{"disabled":[4],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"ariaLabel":[32],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64],"setFocus":[64]},null,{"aria-label":["ariaLabelChanged"],"value":["valueChange"]}]]],["p-6d070558",[[289,"ion-picker-column-option",{"disabled":[4],"value":[8],"color":[513],"ariaLabel":[32]},null,{"aria-label":["onAriaLabelChange"]}]]],["p-e16b69e1",[[289,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"focusTrap":[4,"focus-trap"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"isOpen":["onIsOpenChange"]}]]],["p-83fc84e7",[[289,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"setFocus":[64]}]]],["p-6241ce47",[[289,"ion-item-divider",{"color":[513],"sticky":[4]}],[288,"ion-item-group"],[289,"ion-note",{"color":[513]}],[257,"ion-skeleton-text",{"animated":[4]}],[294,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]},null,{"color":["colorChanged"],"position":["positionChanged"]}],[289,"ion-list-header",{"color":[513],"lines":[1]}],[289,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[516],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32],"focusable":[32],"isInteractive":[32]},[[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]],{"button":["buttonChanged"]}],[288,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}]]],["p-4c85d268",[[256,"ion-app",{"setFocus":[64]}],[292,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[257,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]},null,{"swipeHandler":["swipeHandlerChanged"]}],[257,"ion-content",{"color":[513],"fullscreen":[4],"fixedSlotPlacement":[1,"fixed-slot-placement"],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[9,"resize","onResize"]]],[292,"ion-header",{"collapse":[1],"translucent":[4]}],[289,"ion-title",{"color":[513],"size":[1]},null,{"size":["sizeChanged"]}],[289,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[294,"ion-buttons",{"collapse":[4]}]]],["p-f65f9308",[[289,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"required":[4],"isExpanded":[32],"hasFocus":[32],"isInvalid":[32],"hintTextID":[32],"open":[64]},null,{"disabled":["styleChanged"],"isExpanded":["styleChanged"],"placeholder":["styleChanged"],"value":["styleChanged"]}],[257,"ion-select-option",{"disabled":[4],"value":[8]}],[290,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}]]],["p-f8f22cc0",[[257,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["p-7bcfc421",[[289,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]},null,{"value":["valueChanged"]}],[292,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"compareWith":[1,"compare-with"],"name":[1],"value":[1032],"helperText":[1,"helper-text"],"errorText":[1,"error-text"],"setFocus":[64]},[[4,"keydown","onKeydown"]],{"value":["valueChanged"]}]]],["p-370e4237",[[257,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-43ed1ef5",[[289,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1],"isCircle":[32]},null,{"disabled":["disabledChanged"],"aria-checked":["onAriaChanged"],"aria-label":["onAriaChanged"]}],[257,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"],"ios":["loadIcon"],"md":["loadIcon"]}]]]]'),e))));
|
|
4
|
+
import{p as e,H as o,b as t}from"./p-C8IsBmNU.js";export{s as setNonce}from"./p-C8IsBmNU.js";import{g as n}from"./p-CJxh_yLS.js";import"./p-BFvmZNyx.js";var a=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const t=o.call(this,!1),n=this.childNodes;if(e)for(let e=0;e<n.length;e++)2!==n[e].nodeType&&t.appendChild(n[e].cloneNode(!0));return t}};(()=>{a(o.prototype);const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t(JSON.parse('[["p-83be404e",[[289,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[289,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"]],{"type":["typeChanged"],"disabled":["disabledChanged"],"side":["sideChanged"],"swipeGesture":["swipeGestureChanged"]}],[257,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-b57c6d3e",[[289,"ion-input-password-toggle",{"color":[513],"showIcon":[1,"show-icon"],"hideIcon":[1,"hide-icon"],"type":[1025]},null,{"type":["onTypeChange"]}]]],["p-6444c606",[[289,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[257,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]},null,{"activated":["activatedChanged"]}],[257,"ion-fab-list",{"activated":[4],"side":[1]},null,{"activated":["activatedChanged"]}]]],["p-639dd543",[[256,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[288,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]},null,{"disabled":["disabledChanged"]}]]],["p-49d06882",[[289,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["p-15193d01",[[289,"ion-toast",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"layout":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"positionAnchor":[1,"position-anchor"],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"swipeGesture":[1,"swipe-gesture"],"isOpen":[4,"is-open"],"trigger":[1],"revealContentToScreenReader":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"swipeGesture":["swipeGestureChanged"],"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-79bd78f9",[[289,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[288,"ion-card-content"],[289,"ion-card-header",{"color":[513],"translucent":[4]}],[289,"ion-card-subtitle",{"color":[513]}],[289,"ion-card-title",{"color":[513]}]]],["p-316c0420",[[289,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[288,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[256,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]},null,{"disabled":["disabledChanged"]}]]],["p-b331b4e6",[[305,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32],"hasInteracted":[32]},null,{"value":["valueChanged"]}],[289,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]],{"value":["valueChanged"],"disabled":["disabledChanged"],"readonly":["readonlyChanged"]}]]],["p-cc45bcbc",[[288,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[256,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]},null,{"threshold":["thresholdChanged"],"disabled":["disabledChanged"]}]]],["p-2a939845",[[289,"ion-reorder",null,[[2,"click","onClick"]]],[256,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]},null,{"disabled":["disabledChanged"]}]]],["p-0dfa5a37",[[289,"ion-segment-button",{"contentId":[513,"content-id"],"disabled":[1028],"layout":[1],"type":[1],"value":[8],"checked":[32],"setFocus":[64]},null,{"value":["valueChanged"]}],[289,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1032],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[16,"ionSegmentViewScroll","handleSegmentViewScroll"],[0,"keydown","onKeyDown"]],{"color":["colorChanged"],"swipeGesture":["swipeGestureChanged"],"value":["valueChanged"],"disabled":["disabledChanged"]}]]],["p-b0a7585c",[[289,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-8bdfc8f6",[[294,"ion-input",{"color":[513],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearInputIcon":[1,"clear-input-icon"],"clearOnEdit":[4,"clear-on-edit"],"counter":[4],"counterFormatter":[16],"debounce":[2],"disabled":[516],"enterkeyhint":[1],"errorText":[1,"error-text"],"fill":[1],"inputmode":[1],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"shape":[1],"spellcheck":[4],"step":[1],"type":[1],"value":[1032],"hasFocus":[32],"isInvalid":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"type":["onTypeChange"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-074839fc",[[290,"ion-searchbar",{"color":[513],"animated":[4],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]},null,{"lang":["onLangChanged"],"dir":["onDirChanged"],"debounce":["debounceChanged"],"value":["valueChanged"],"showCancelButton":["showCancelButtonChanged"]}]]],["p-c17c0a01",[[289,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"activated":[32]},null,{"disabled":["disabledChanged"]}]]],["p-dbbe606a",[[257,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64],"getLength":[64]},null,{"swipeGesture":["swipeGestureChanged"],"root":["rootChanged"]}],[256,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-a127bee2",[[257,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]},null,{"active":["changeActive"]}],[257,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-4cc26913",[[294,"ion-textarea",{"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"fill":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[514],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"counter":[4],"counterFormatter":[16],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"label":[1],"labelPlacement":[1,"label-placement"],"shape":[1],"hasFocus":[32],"isInvalid":[32],"setFocus":[64],"getInputElement":[64]},[[2,"click","onClickCapture"]],{"debounce":["debounceChanged"],"value":["valueChanged"],"dir":["onDirChanged"]}]]],["p-582824c5",[[289,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-98fc09eb",[[290,"ion-loading",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-da7d04cc",[[289,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}],[289,"ion-breadcrumbs",{"color":[513],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]],{"maxItems":["maxItemsChanged"],"itemsBeforeCollapse":["maxItemsChanged"],"itemsAfterCollapse":["maxItemsChanged"]}]]],["p-7268efa5",[[289,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[289,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]},null,{"selectedTab":["selectedTabChanged"]}]]],["p-ac4eb91d",[[289,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-31f7095f",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]},null,{"url":["onUpdate"],"component":["onUpdate"],"componentProps":["onComponentProps"]}],[0,"ion-route-redirect",{"from":[1],"to":[1]},null,{"from":["propDidChange"],"to":["propDidChange"]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[257,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-d126e8d3",[[289,"ion-avatar"],[289,"ion-badge",{"color":[513]}],[257,"ion-thumbnail"]]],["p-72c38b88",[[257,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[257,"ion-grid",{"fixed":[4]}],[257,"ion-row"]]],["p-46d74291",[[257,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]},null,{"src":["srcChanged"]}]]],["p-11518b31",[[294,"ion-input-otp",{"autocapitalize":[1],"color":[513],"disabled":[516],"fill":[1],"inputmode":[1],"length":[2],"pattern":[1],"readonly":[516],"separators":[1],"shape":[1],"size":[1],"type":[1],"value":[1032],"inputValues":[32],"hasFocus":[32],"previousInputValues":[32],"setFocus":[64]},null,{"value":["valueChanged"],"separators":["processSeparators"],"length":["processSeparators"]}]]],["p-86f53961",[[289,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-1647c46c",[[289,"ion-range",{"color":[513],"debounce":[2],"name":[1],"label":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"labelPlacement":[1,"label-placement"],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]},null,{"debounce":["debounceChanged"],"min":["minChanged"],"max":["maxChanged"],"step":["stepChanged"],"activeBarStart":["activeBarStartChanged"],"disabled":["disabledChanged"],"value":["valueChanged"]}]]],["p-94de5cfa",[[257,"ion-segment-content"]]],["p-020af078",[[289,"ion-segment-view",{"disabled":[4],"isManualScroll":[32],"setContent":[64]},[[1,"scroll","handleScroll"],[1,"touchstart","handleScrollStart"],[1,"touchend","handleTouchEnd"]]]]],["p-3a6caca9",[[289,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32],"isVisible":[64]},null,{"visible":["visibleChanged"],"disabled":["updateState"],"when":["updateState"]}]]],["p-51a60e0f",[[257,"ion-text",{"color":[513]}]]],["p-0b80d700",[[290,"ion-select-modal",{"header":[1],"multiple":[4],"options":[16]}]]],["p-4efea47a",[[289,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"formatOptions":[16],"readonly":[4],"isDateEnabled":[16],"showAdjacentDays":[4,"show-adjacent-days"],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"titleSelectedDatesFormatter":[16],"multiple":[4],"highlightedDates":[16],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isTimePopoverOpen":[32],"forceRenderDate":[32],"confirm":[64],"reset":[64],"cancel":[64]},null,{"formatOptions":["formatOptionsChanged"],"disabled":["disabledChanged"],"min":["minChanged"],"max":["maxChanged"],"presentation":["presentationChanged"],"yearValues":["yearValuesChanged"],"monthValues":["monthValuesChanged"],"dayValues":["dayValuesChanged"],"hourValues":["hourValuesChanged"],"minuteValues":["minuteValuesChanged"],"value":["valueChanged"]}],[290,"ion-picker-legacy",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}],[288,"ion-picker-legacy-column",{"col":[16]},null,{"col":["colChanged"]}]]],["p-510d86e1",[[290,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-7da39a4d",[[290,"ion-alert",{"overlayIndex":[2,"overlay-index"],"delegate":[16],"hasController":[4,"has-controller"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"],"buttons":["buttonsChanged"],"inputs":["inputsChanged"]}]]],["p-a80f1b04",[[289,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"expandToScroll":[4,"expand-to-scroll"],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"focusTrap":[4,"focus-trap"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]},[[9,"resize","onWindowResize"]],{"isOpen":["onIsOpenChange"],"trigger":["triggerChanged"]}]]],["p-9575b654",[[289,"ion-picker",{"exitInputMode":[64]},[[1,"touchstart","preventTouchStartPropagation"]]]]],["p-675b1a31",[[257,"ion-picker-column",{"disabled":[4],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"ariaLabel":[32],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64],"setFocus":[64]},null,{"aria-label":["ariaLabelChanged"],"value":["valueChange"]}]]],["p-6d070558",[[289,"ion-picker-column-option",{"disabled":[4],"value":[8],"color":[513],"ariaLabel":[32]},null,{"aria-label":["onAriaLabelChange"]}]]],["p-e16b69e1",[[289,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"focusTrap":[4,"focus-trap"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]},null,{"trigger":["onTriggerChange"],"triggerAction":["onTriggerChange"],"isOpen":["onIsOpenChange"]}]]],["p-83fc84e7",[[289,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"required":[4],"setFocus":[64]}]]],["p-6241ce47",[[289,"ion-item-divider",{"color":[513],"sticky":[4]}],[288,"ion-item-group"],[289,"ion-note",{"color":[513]}],[257,"ion-skeleton-text",{"animated":[4]}],[294,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]},null,{"color":["colorChanged"],"position":["positionChanged"]}],[289,"ion-list-header",{"color":[513],"lines":[1]}],[289,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[516],"download":[1],"href":[1],"rel":[1],"lines":[1],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"multipleInputs":[32],"focusable":[32],"isInteractive":[32]},[[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]],{"button":["buttonChanged"]}],[288,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}]]],["p-4c85d268",[[256,"ion-app",{"setFocus":[64]}],[292,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[257,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]},null,{"swipeHandler":["swipeHandlerChanged"]}],[257,"ion-content",{"color":[513],"fullscreen":[4],"fixedSlotPlacement":[1,"fixed-slot-placement"],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[9,"resize","onResize"]]],[292,"ion-header",{"collapse":[1],"translucent":[4]}],[289,"ion-title",{"color":[513],"size":[1]},null,{"size":["sizeChanged"]}],[289,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[294,"ion-buttons",{"collapse":[4]}]]],["p-f65f9308",[[289,"ion-select",{"cancelText":[1,"cancel-text"],"color":[513],"compareWith":[1,"compare-with"],"disabled":[4],"fill":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"interface":[1],"interfaceOptions":[8,"interface-options"],"justify":[1],"label":[1],"labelPlacement":[1,"label-placement"],"multiple":[4],"name":[1],"okText":[1,"ok-text"],"placeholder":[1],"selectedText":[1,"selected-text"],"toggleIcon":[1,"toggle-icon"],"expandedIcon":[1,"expanded-icon"],"shape":[1],"value":[1032],"required":[4],"isExpanded":[32],"hasFocus":[32],"isInvalid":[32],"hintTextID":[32],"open":[64]},null,{"disabled":["styleChanged"],"isExpanded":["styleChanged"],"placeholder":["styleChanged"],"value":["styleChanged"]}],[257,"ion-select-option",{"disabled":[4],"value":[8]}],[290,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]}]]],["p-f8f22cc0",[[257,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["p-7bcfc421",[[289,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"labelPlacement":[1,"label-placement"],"justify":[1],"alignment":[1],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]},null,{"value":["valueChanged"]}],[292,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"compareWith":[1,"compare-with"],"name":[1],"value":[1032],"helperText":[1,"helper-text"],"errorText":[1,"error-text"],"setFocus":[64]},[[4,"keydown","onKeydown"]],{"value":["valueChanged"]}]]],["p-370e4237",[[257,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-43ed1ef5",[[289,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1],"form":[1],"isCircle":[32]},null,{"disabled":["disabledChanged"],"aria-checked":["onAriaChanged"],"aria-label":["onAriaChanged"]}],[257,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"],"ios":["loadIcon"],"md":["loadIcon"]}]]]]'),e))));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as o,e as t,h as i,d as n,g as e,c as s,f as a}from"./p-C8IsBmNU.js";import{g as r,r as d,f as c,m as h,t as l}from"./p-CTfR9YZG.js";import{l as p}from"./p-DV3sJJW8.js";import{b as u}from"./p-BFvmZNyx.js";const g=class{constructor(i){o(this,i),this.updateListener=o=>{var t,i;const n=null!==(i=null===(t=o.detail)||void 0===t?void 0:t.initial)&&void 0!==i&&i;console.log("[Accordion]",this.value,"updateListener - initial:",n,"hasInteracted:",this.hasInteracted,"hasEverBeenExpanded:",this.hasEverBeenExpanded),n||(console.log("[Accordion]",this.value,"Setting hasInteracted to true"),this.hasInteracted=!0),this.updateState(n)},this.state=1,this.isNext=!1,this.isPrevious=!1,this.hasInteracted=!1,this.hasEverBeenExpanded=!1,this.value="ion-accordion-"+x++,this.disabled=!1,this.readonly=!1,this.toggleIcon=p,this.toggleIconSlot="end",this.setItemDefaults=()=>{const o=this.getSlottedHeaderIonItem();o&&(o.button=!0,o.detail=!1,void 0===o.lines&&(o.lines="full"))},this.getSlottedHeaderIonItem=()=>{const{headerEl:o}=this;if(!o)return;const t=o.querySelector("slot");return t&&void 0!==t.assignedElements?t.assignedElements().find((o=>"ION-ITEM"===o.tagName)):void 0},this.setAria=(o=!1)=>{const t=this.getSlottedHeaderIonItem();if(!t)return;const i=r(t).querySelector("button");i&&i.setAttribute("aria-expanded",`${o}`)},this.slotToggleIcon=()=>{const o=this.getSlottedHeaderIonItem();if(!o)return;const{toggleIconSlot:t,toggleIcon:i}=this;if(o.querySelector(".ion-accordion-toggle-icon"))return;const n=document.createElement("ion-icon");n.slot=t,n.lazy=!1,n.classList.add("ion-accordion-toggle-icon"),n.icon=i,n.setAttribute("aria-hidden","true"),o.appendChild(n)},this.expandAccordion=(o=!1)=>{console.log("[Accordion]",this.value,"expandAccordion - initialUpdate:",o,"state:",this.state);const{contentEl:t,contentElWrapper:i}=this;if(o||void 0===t||void 0===i)return this.state=4,this.hasEverBeenExpanded=!0,void console.log("[Accordion]",this.value,"expandAccordion early return - hasEverBeenExpanded set to true");4!==this.state?(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.hasEverBeenExpanded=!0,console.log("[Accordion]",this.value,"expandAccordion - hasEverBeenExpanded set to true"),this.shouldAnimate()?(console.log("[Accordion]",this.value,"expandAccordion - will animate"),d((()=>{this.state=8,this.currentRaf=d((async()=>{const o=i.offsetHeight,n=l(t,2e3);t.style.setProperty("max-height",`${o}px`),await n,this.state=4,t.style.removeProperty("max-height")}))}))):this.state=4):console.log("[Accordion]",this.value,"expandAccordion - already expanded, returning")},this.collapseAccordion=(o=!1)=>{const{contentEl:t}=this;o||void 0===t?this.state=1:1!==this.state&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?this.currentRaf=d((async()=>{t.style.setProperty("max-height",`${t.offsetHeight}px`),d((async()=>{const o=l(t,2e3);this.state=2,await o,this.state=1,t.style.removeProperty("max-height")}))})):this.state=1)},this.shouldAnimate=()=>this.hasInteracted&&this.hasEverBeenExpanded?"undefined"!=typeof window&&(!matchMedia("(prefers-reduced-motion: reduce)").matches&&!(!t.get("animated",!0)||this.accordionGroupEl&&!this.accordionGroupEl.animated)):(console.log("[Accordion]",this.value,"shouldAnimate: false - hasInteracted:",this.hasInteracted,"hasEverBeenExpanded:",this.hasEverBeenExpanded),!1),this.updateState=async(o=!1)=>{const t=this.accordionGroupEl,i=this.value;if(!t)return;const n=t.value;if(Array.isArray(n)?n.includes(i):n===i)this.expandAccordion(o),this.isNext=this.isPrevious=!1;else{this.collapseAccordion(o);const t=this.getNextSibling(),i=null==t?void 0:t.value;void 0!==i&&(this.isPrevious=Array.isArray(n)?n.includes(i):n===i);const e=this.getPreviousSibling(),s=null==e?void 0:e.value;void 0!==s&&(this.isNext=Array.isArray(n)?n.includes(s):n===s)}},this.getNextSibling=()=>{if(!this.el)return;const o=this.el.nextElementSibling;return"ION-ACCORDION"===(null==o?void 0:o.tagName)?o:void 0},this.getPreviousSibling=()=>{if(!this.el)return;const o=this.el.previousElementSibling;return"ION-ACCORDION"===(null==o?void 0:o.tagName)?o:void 0}}valueChanged(){this.updateState()}connectedCallback(){var o;const t=this.accordionGroupEl=null===(o=this.el)||void 0===o?void 0:o.closest("ion-accordion-group");t&&(this.updateState(!0),c(t,"ionValueChange",this.updateListener))}disconnectedCallback(){const o=this.accordionGroupEl;o&&h(o,"ionValueChange",this.updateListener)}componentDidLoad(){this.setItemDefaults(),this.slotToggleIcon(),d((()=>{this.setAria(4===this.state||8===this.state)}))}toggleExpanded(){const{accordionGroupEl:o,disabled:t,readonly:i,value:n,state:e}=this;t||i||(this.hasInteracted=!0,!o)||o.requestAccordionToggle(n,1===e||2===e)}render(){const{disabled:o,readonly:t}=this,e=u(this),s=4===this.state||8===this.state,a=s?"header expanded":"header",r=s?"content expanded":"content",d=this.shouldAnimate();return console.log("[Accordion]",this.value,"render - state:",this.state,"shouldAnimate:",d,"hasInteracted:",this.hasInteracted,"hasEverBeenExpanded:",this.hasEverBeenExpanded),this.setAria(s),i(n,{key:"9f73d0ed2ced6269234bdade7c0b95ec1bc697de",class:{[e]:!0,"accordion-expanding":8===this.state,"accordion-expanded":4===this.state,"accordion-collapsing":2===this.state,"accordion-collapsed":1===this.state,"accordion-next":this.isNext,"accordion-previous":this.isPrevious,"accordion-disabled":o,"accordion-readonly":t,"accordion-animated":d}},i("div",{key:"a58ed92158e49220057517759084d81d69f64cf9",onClick:()=>this.toggleExpanded(),id:"header",part:a,"aria-controls":"content",ref:o=>this.headerEl=o},i("slot",{key:"0d7fb864762d109ffee42e1d64f3dfc08986fa63",name:"header"})),i("div",{key:"b506df416bcdbd5a0a1bb28017eac44806bba6f0",id:"content",part:r,role:"region","aria-labelledby":"header",ref:o=>this.contentEl=o},i("div",{key:"304e77c2605f2c947afd9f97f608ef0ab11def03",id:"content-wrapper",ref:o=>this.contentElWrapper=o},i("slot",{key:"df5490817fd493ed807d0666d872850612ff986c",name:"content"}))))}static get delegatesFocus(){return!0}get el(){return e(this)}static get watchers(){return{value:["valueChanged"]}}};let x=0;g.style={ios:":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}",md:":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}"};const m=class{constructor(t){o(this,t),this.ionChange=s(this,"ionChange",7),this.ionValueChange=s(this,"ionValueChange",7),this.animated=!0,this.disabled=!1,this.readonly=!1,this.expand="compact",this.hasEmittedInitialValue=!1,this.isUserInitiatedChange=!1}valueChanged(){this.emitValueChange(!1,this.isUserInitiatedChange),this.isUserInitiatedChange=!1}async disabledChanged(){const{disabled:o}=this,t=await this.getAccordions();for(const i of t)i.disabled=o}async readonlyChanged(){const{readonly:o}=this,t=await this.getAccordions();for(const i of t)i.readonly=o}async onKeydown(o){const t=document.activeElement;if(!t)return;if(!t.closest('ion-accordion [slot="header"]'))return;const i="ION-ACCORDION"===t.tagName?t:t.closest("ion-accordion");if(!i)return;if(i.closest("ion-accordion-group")!==this.el)return;const n=await this.getAccordions(),e=n.findIndex((o=>o===i));if(-1===e)return;let s;"ArrowDown"===o.key?s=this.findNextAccordion(n,e):"ArrowUp"===o.key?s=this.findPreviousAccordion(n,e):"Home"===o.key?s=n[0]:"End"===o.key&&(s=n[n.length-1]),void 0!==s&&s!==t&&s.focus()}async componentDidLoad(){this.disabled&&this.disabledChanged(),this.readonly&&this.readonlyChanged(),this.hasEmittedInitialValue||this.emitValueChange(!0)}setValue(o){this.isUserInitiatedChange=!0;const t=this.value=o;this.ionChange.emit({value:t})}async requestAccordionToggle(o,t){const{multiple:i,value:n,readonly:e,disabled:s}=this;if(!e&&!s)if(t)if(i){const t=null!=n?n:[],i=Array.isArray(t)?t:[t];void 0===i.find((t=>t===o))&&void 0!==o&&this.setValue([...i,o])}else this.setValue(o);else if(i){const t=null!=n?n:[],i=Array.isArray(t)?t:[t];this.setValue(i.filter((t=>t!==o)))}else this.setValue(void 0)}findNextAccordion(o,t){const i=o[t+1];return void 0===i?o[0]:i}findPreviousAccordion(o,t){const i=o[t-1];return void 0===i?o[o.length-1]:i}async getAccordions(){return Array.from(this.el.querySelectorAll(":scope > ion-accordion"))}emitValueChange(o,t=!1){const{value:i,multiple:n}=this;!n&&Array.isArray(i)&&a(`[ion-accordion-group] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${i.map((o=>`'${o}'`)).join(", ")}]\n`,this.el),this.ionValueChange.emit({value:i,initial:o||!this.hasEmittedInitialValue&&void 0!==i&&!t}),void 0!==i&&(this.hasEmittedInitialValue=!0)}render(){const{disabled:o,readonly:t,expand:e}=this,s=u(this);return i(n,{key:"fd64cd203e2c8acdfc266005f372e26c29853847",class:{[s]:!0,"accordion-group-disabled":o,"accordion-group-readonly":t,[`accordion-group-expand-${e}`]:!0},role:"presentation"},i("slot",{key:"bdd9f419fc6e20f5de6f0f52ac93af7ec9a380ef"}))}get el(){return e(this)}static get watchers(){return{value:["valueChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"]}}};m.style={ios:":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){border-bottom:none}",md:":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion){-webkit-box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;border-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous){border-end-end-radius:6px;border-end-start-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next){border-start-start-radius:6px;border-start-end-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion):first-of-type{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}"};export{g as ion_accordion,m as ion_accordion_group}
|
|
@@ -36,6 +36,11 @@ export declare class Accordion implements ComponentInterface {
|
|
|
36
36
|
* set to an expanded or collapsed state on initial load.
|
|
37
37
|
*/
|
|
38
38
|
hasInteracted: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Tracks if this accordion has ever been expanded.
|
|
41
|
+
* Used to prevent the first expansion from animating.
|
|
42
|
+
*/
|
|
43
|
+
private hasEverBeenExpanded;
|
|
39
44
|
/**
|
|
40
45
|
* The value of the accordion. Defaults to an autogenerated
|
|
41
46
|
* value.
|
package/hydrate/index.js
CHANGED
|
@@ -4045,12 +4045,14 @@ class Accordion {
|
|
|
4045
4045
|
this.updateListener = (ev) => {
|
|
4046
4046
|
var _a, _b;
|
|
4047
4047
|
const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
|
|
4048
|
+
console.log('[Accordion]', this.value, 'updateListener - initial:', initialUpdate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
4048
4049
|
/**
|
|
4049
4050
|
* If this is not an initial update (meaning it's from a user interaction
|
|
4050
4051
|
* or programmatic call after load), mark that we've had an interaction.
|
|
4051
4052
|
* This enables animations for this and future updates.
|
|
4052
4053
|
*/
|
|
4053
4054
|
if (!initialUpdate) {
|
|
4055
|
+
console.log('[Accordion]', this.value, 'Setting hasInteracted to true');
|
|
4054
4056
|
this.hasInteracted = true;
|
|
4055
4057
|
}
|
|
4056
4058
|
this.updateState(initialUpdate);
|
|
@@ -4065,6 +4067,11 @@ class Accordion {
|
|
|
4065
4067
|
* set to an expanded or collapsed state on initial load.
|
|
4066
4068
|
*/
|
|
4067
4069
|
this.hasInteracted = false;
|
|
4070
|
+
/**
|
|
4071
|
+
* Tracks if this accordion has ever been expanded.
|
|
4072
|
+
* Used to prevent the first expansion from animating.
|
|
4073
|
+
*/
|
|
4074
|
+
this.hasEverBeenExpanded = false;
|
|
4068
4075
|
/**
|
|
4069
4076
|
* The value of the accordion. Defaults to an autogenerated
|
|
4070
4077
|
* value.
|
|
@@ -4170,18 +4177,33 @@ class Accordion {
|
|
|
4170
4177
|
ionItem.appendChild(iconEl);
|
|
4171
4178
|
};
|
|
4172
4179
|
this.expandAccordion = (initialUpdate = false) => {
|
|
4180
|
+
console.log('[Accordion]', this.value, 'expandAccordion - initialUpdate:', initialUpdate, 'state:', this.state);
|
|
4173
4181
|
const { contentEl, contentElWrapper } = this;
|
|
4174
4182
|
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
|
4175
4183
|
this.state = 4 /* AccordionState.Expanded */;
|
|
4184
|
+
/**
|
|
4185
|
+
* Mark that this accordion has been expanded at least once.
|
|
4186
|
+
* Do this even on initial expansion so future interactions animate.
|
|
4187
|
+
*/
|
|
4188
|
+
this.hasEverBeenExpanded = true;
|
|
4189
|
+
console.log('[Accordion]', this.value, 'expandAccordion early return - hasEverBeenExpanded set to true');
|
|
4176
4190
|
return;
|
|
4177
4191
|
}
|
|
4178
4192
|
if (this.state === 4 /* AccordionState.Expanded */) {
|
|
4193
|
+
console.log('[Accordion]', this.value, 'expandAccordion - already expanded, returning');
|
|
4179
4194
|
return;
|
|
4180
4195
|
}
|
|
4181
4196
|
if (this.currentRaf !== undefined) {
|
|
4182
4197
|
cancelAnimationFrame(this.currentRaf);
|
|
4183
4198
|
}
|
|
4199
|
+
/**
|
|
4200
|
+
* Mark that this accordion has been expanded at least once.
|
|
4201
|
+
* This allows subsequent expansions to animate.
|
|
4202
|
+
*/
|
|
4203
|
+
this.hasEverBeenExpanded = true;
|
|
4204
|
+
console.log('[Accordion]', this.value, 'expandAccordion - hasEverBeenExpanded set to true');
|
|
4184
4205
|
if (this.shouldAnimate()) {
|
|
4206
|
+
console.log('[Accordion]', this.value, 'expandAccordion - will animate');
|
|
4185
4207
|
raf(() => {
|
|
4186
4208
|
this.state = 8 /* AccordionState.Expanding */;
|
|
4187
4209
|
this.currentRaf = raf(async () => {
|
|
@@ -4239,8 +4261,13 @@ class Accordion {
|
|
|
4239
4261
|
* Don't animate until after the first user interaction.
|
|
4240
4262
|
* This prevents animations on initial load when accordions
|
|
4241
4263
|
* start in an expanded or collapsed state programmatically.
|
|
4264
|
+
*
|
|
4265
|
+
* Additionally, don't animate the very first expansion even if
|
|
4266
|
+
* hasInteracted is true. This handles edge cases like React StrictMode
|
|
4267
|
+
* where effects run twice and might incorrectly mark as interacted.
|
|
4242
4268
|
*/
|
|
4243
|
-
if (!this.hasInteracted) {
|
|
4269
|
+
if (!this.hasInteracted || !this.hasEverBeenExpanded) {
|
|
4270
|
+
console.log('[Accordion]', this.value, 'shouldAnimate: false - hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
4244
4271
|
return false;
|
|
4245
4272
|
}
|
|
4246
4273
|
if (typeof window === 'undefined') {
|
|
@@ -4375,8 +4402,10 @@ class Accordion {
|
|
|
4375
4402
|
const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
|
|
4376
4403
|
const headerPart = expanded ? 'header expanded' : 'header';
|
|
4377
4404
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
4405
|
+
const shouldAnimate = this.shouldAnimate();
|
|
4406
|
+
console.log('[Accordion]', this.value, 'render - state:', this.state, 'shouldAnimate:', shouldAnimate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
4378
4407
|
this.setAria(expanded);
|
|
4379
|
-
return (hAsync(Host, { key: '
|
|
4408
|
+
return (hAsync(Host, { key: '9f73d0ed2ced6269234bdade7c0b95ec1bc697de', class: {
|
|
4380
4409
|
[mode]: true,
|
|
4381
4410
|
'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
|
|
4382
4411
|
'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
|
|
@@ -4386,8 +4415,8 @@ class Accordion {
|
|
|
4386
4415
|
'accordion-previous': this.isPrevious,
|
|
4387
4416
|
'accordion-disabled': disabled,
|
|
4388
4417
|
'accordion-readonly': readonly,
|
|
4389
|
-
'accordion-animated':
|
|
4390
|
-
} }, hAsync("div", { key: '
|
|
4418
|
+
'accordion-animated': shouldAnimate,
|
|
4419
|
+
} }, hAsync("div", { key: 'a58ed92158e49220057517759084d81d69f64cf9', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, hAsync("slot", { key: '0d7fb864762d109ffee42e1d64f3dfc08986fa63', name: "header" })), hAsync("div", { key: 'b506df416bcdbd5a0a1bb28017eac44806bba6f0', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, hAsync("div", { key: '304e77c2605f2c947afd9f97f608ef0ab11def03', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, hAsync("slot", { key: 'df5490817fd493ed807d0666d872850612ff986c', name: "content" })))));
|
|
4391
4420
|
}
|
|
4392
4421
|
static get delegatesFocus() { return true; }
|
|
4393
4422
|
get el() { return getElement(this); }
|
package/hydrate/index.mjs
CHANGED
|
@@ -4043,12 +4043,14 @@ class Accordion {
|
|
|
4043
4043
|
this.updateListener = (ev) => {
|
|
4044
4044
|
var _a, _b;
|
|
4045
4045
|
const initialUpdate = (_b = (_a = ev.detail) === null || _a === void 0 ? void 0 : _a.initial) !== null && _b !== void 0 ? _b : false;
|
|
4046
|
+
console.log('[Accordion]', this.value, 'updateListener - initial:', initialUpdate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
4046
4047
|
/**
|
|
4047
4048
|
* If this is not an initial update (meaning it's from a user interaction
|
|
4048
4049
|
* or programmatic call after load), mark that we've had an interaction.
|
|
4049
4050
|
* This enables animations for this and future updates.
|
|
4050
4051
|
*/
|
|
4051
4052
|
if (!initialUpdate) {
|
|
4053
|
+
console.log('[Accordion]', this.value, 'Setting hasInteracted to true');
|
|
4052
4054
|
this.hasInteracted = true;
|
|
4053
4055
|
}
|
|
4054
4056
|
this.updateState(initialUpdate);
|
|
@@ -4063,6 +4065,11 @@ class Accordion {
|
|
|
4063
4065
|
* set to an expanded or collapsed state on initial load.
|
|
4064
4066
|
*/
|
|
4065
4067
|
this.hasInteracted = false;
|
|
4068
|
+
/**
|
|
4069
|
+
* Tracks if this accordion has ever been expanded.
|
|
4070
|
+
* Used to prevent the first expansion from animating.
|
|
4071
|
+
*/
|
|
4072
|
+
this.hasEverBeenExpanded = false;
|
|
4066
4073
|
/**
|
|
4067
4074
|
* The value of the accordion. Defaults to an autogenerated
|
|
4068
4075
|
* value.
|
|
@@ -4168,18 +4175,33 @@ class Accordion {
|
|
|
4168
4175
|
ionItem.appendChild(iconEl);
|
|
4169
4176
|
};
|
|
4170
4177
|
this.expandAccordion = (initialUpdate = false) => {
|
|
4178
|
+
console.log('[Accordion]', this.value, 'expandAccordion - initialUpdate:', initialUpdate, 'state:', this.state);
|
|
4171
4179
|
const { contentEl, contentElWrapper } = this;
|
|
4172
4180
|
if (initialUpdate || contentEl === undefined || contentElWrapper === undefined) {
|
|
4173
4181
|
this.state = 4 /* AccordionState.Expanded */;
|
|
4182
|
+
/**
|
|
4183
|
+
* Mark that this accordion has been expanded at least once.
|
|
4184
|
+
* Do this even on initial expansion so future interactions animate.
|
|
4185
|
+
*/
|
|
4186
|
+
this.hasEverBeenExpanded = true;
|
|
4187
|
+
console.log('[Accordion]', this.value, 'expandAccordion early return - hasEverBeenExpanded set to true');
|
|
4174
4188
|
return;
|
|
4175
4189
|
}
|
|
4176
4190
|
if (this.state === 4 /* AccordionState.Expanded */) {
|
|
4191
|
+
console.log('[Accordion]', this.value, 'expandAccordion - already expanded, returning');
|
|
4177
4192
|
return;
|
|
4178
4193
|
}
|
|
4179
4194
|
if (this.currentRaf !== undefined) {
|
|
4180
4195
|
cancelAnimationFrame(this.currentRaf);
|
|
4181
4196
|
}
|
|
4197
|
+
/**
|
|
4198
|
+
* Mark that this accordion has been expanded at least once.
|
|
4199
|
+
* This allows subsequent expansions to animate.
|
|
4200
|
+
*/
|
|
4201
|
+
this.hasEverBeenExpanded = true;
|
|
4202
|
+
console.log('[Accordion]', this.value, 'expandAccordion - hasEverBeenExpanded set to true');
|
|
4182
4203
|
if (this.shouldAnimate()) {
|
|
4204
|
+
console.log('[Accordion]', this.value, 'expandAccordion - will animate');
|
|
4183
4205
|
raf(() => {
|
|
4184
4206
|
this.state = 8 /* AccordionState.Expanding */;
|
|
4185
4207
|
this.currentRaf = raf(async () => {
|
|
@@ -4237,8 +4259,13 @@ class Accordion {
|
|
|
4237
4259
|
* Don't animate until after the first user interaction.
|
|
4238
4260
|
* This prevents animations on initial load when accordions
|
|
4239
4261
|
* start in an expanded or collapsed state programmatically.
|
|
4262
|
+
*
|
|
4263
|
+
* Additionally, don't animate the very first expansion even if
|
|
4264
|
+
* hasInteracted is true. This handles edge cases like React StrictMode
|
|
4265
|
+
* where effects run twice and might incorrectly mark as interacted.
|
|
4240
4266
|
*/
|
|
4241
|
-
if (!this.hasInteracted) {
|
|
4267
|
+
if (!this.hasInteracted || !this.hasEverBeenExpanded) {
|
|
4268
|
+
console.log('[Accordion]', this.value, 'shouldAnimate: false - hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
4242
4269
|
return false;
|
|
4243
4270
|
}
|
|
4244
4271
|
if (typeof window === 'undefined') {
|
|
@@ -4373,8 +4400,10 @@ class Accordion {
|
|
|
4373
4400
|
const expanded = this.state === 4 /* AccordionState.Expanded */ || this.state === 8 /* AccordionState.Expanding */;
|
|
4374
4401
|
const headerPart = expanded ? 'header expanded' : 'header';
|
|
4375
4402
|
const contentPart = expanded ? 'content expanded' : 'content';
|
|
4403
|
+
const shouldAnimate = this.shouldAnimate();
|
|
4404
|
+
console.log('[Accordion]', this.value, 'render - state:', this.state, 'shouldAnimate:', shouldAnimate, 'hasInteracted:', this.hasInteracted, 'hasEverBeenExpanded:', this.hasEverBeenExpanded);
|
|
4376
4405
|
this.setAria(expanded);
|
|
4377
|
-
return (hAsync(Host, { key: '
|
|
4406
|
+
return (hAsync(Host, { key: '9f73d0ed2ced6269234bdade7c0b95ec1bc697de', class: {
|
|
4378
4407
|
[mode]: true,
|
|
4379
4408
|
'accordion-expanding': this.state === 8 /* AccordionState.Expanding */,
|
|
4380
4409
|
'accordion-expanded': this.state === 4 /* AccordionState.Expanded */,
|
|
@@ -4384,8 +4413,8 @@ class Accordion {
|
|
|
4384
4413
|
'accordion-previous': this.isPrevious,
|
|
4385
4414
|
'accordion-disabled': disabled,
|
|
4386
4415
|
'accordion-readonly': readonly,
|
|
4387
|
-
'accordion-animated':
|
|
4388
|
-
} }, hAsync("div", { key: '
|
|
4416
|
+
'accordion-animated': shouldAnimate,
|
|
4417
|
+
} }, hAsync("div", { key: 'a58ed92158e49220057517759084d81d69f64cf9', onClick: () => this.toggleExpanded(), id: "header", part: headerPart, "aria-controls": "content", ref: (headerEl) => (this.headerEl = headerEl) }, hAsync("slot", { key: '0d7fb864762d109ffee42e1d64f3dfc08986fa63', name: "header" })), hAsync("div", { key: 'b506df416bcdbd5a0a1bb28017eac44806bba6f0', id: "content", part: contentPart, role: "region", "aria-labelledby": "header", ref: (contentEl) => (this.contentEl = contentEl) }, hAsync("div", { key: '304e77c2605f2c947afd9f97f608ef0ab11def03', id: "content-wrapper", ref: (contentElWrapper) => (this.contentElWrapper = contentElWrapper) }, hAsync("slot", { key: 'df5490817fd493ed807d0666d872850612ff986c', name: "content" })))));
|
|
4389
4418
|
}
|
|
4390
4419
|
static get delegatesFocus() { return true; }
|
|
4391
4420
|
get el() { return getElement(this); }
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as o,e as t,h as i,d as n,g as e,c as a,f as s}from"./p-C8IsBmNU.js";import{g as r,r as d,f as c,m as h,t as l}from"./p-CTfR9YZG.js";import{l as p}from"./p-DV3sJJW8.js";import{b as u}from"./p-BFvmZNyx.js";const g=class{constructor(i){o(this,i),this.updateListener=o=>{var t,i;const n=null!==(i=null===(t=o.detail)||void 0===t?void 0:t.initial)&&void 0!==i&&i;n||(this.hasInteracted=!0),this.updateState(n)},this.state=1,this.isNext=!1,this.isPrevious=!1,this.hasInteracted=!1,this.value="ion-accordion-"+x++,this.disabled=!1,this.readonly=!1,this.toggleIcon=p,this.toggleIconSlot="end",this.setItemDefaults=()=>{const o=this.getSlottedHeaderIonItem();o&&(o.button=!0,o.detail=!1,void 0===o.lines&&(o.lines="full"))},this.getSlottedHeaderIonItem=()=>{const{headerEl:o}=this;if(!o)return;const t=o.querySelector("slot");return t&&void 0!==t.assignedElements?t.assignedElements().find((o=>"ION-ITEM"===o.tagName)):void 0},this.setAria=(o=!1)=>{const t=this.getSlottedHeaderIonItem();if(!t)return;const i=r(t).querySelector("button");i&&i.setAttribute("aria-expanded",`${o}`)},this.slotToggleIcon=()=>{const o=this.getSlottedHeaderIonItem();if(!o)return;const{toggleIconSlot:t,toggleIcon:i}=this;if(o.querySelector(".ion-accordion-toggle-icon"))return;const n=document.createElement("ion-icon");n.slot=t,n.lazy=!1,n.classList.add("ion-accordion-toggle-icon"),n.icon=i,n.setAttribute("aria-hidden","true"),o.appendChild(n)},this.expandAccordion=(o=!1)=>{const{contentEl:t,contentElWrapper:i}=this;o||void 0===t||void 0===i?this.state=4:4!==this.state&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?d((()=>{this.state=8,this.currentRaf=d((async()=>{const o=i.offsetHeight,n=l(t,2e3);t.style.setProperty("max-height",`${o}px`),await n,this.state=4,t.style.removeProperty("max-height")}))})):this.state=4)},this.collapseAccordion=(o=!1)=>{const{contentEl:t}=this;o||void 0===t?this.state=1:1!==this.state&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?this.currentRaf=d((async()=>{t.style.setProperty("max-height",`${t.offsetHeight}px`),d((async()=>{const o=l(t,2e3);this.state=2,await o,this.state=1,t.style.removeProperty("max-height")}))})):this.state=1)},this.shouldAnimate=()=>!!this.hasInteracted&&("undefined"!=typeof window&&(!matchMedia("(prefers-reduced-motion: reduce)").matches&&!(!t.get("animated",!0)||this.accordionGroupEl&&!this.accordionGroupEl.animated))),this.updateState=async(o=!1)=>{const t=this.accordionGroupEl,i=this.value;if(!t)return;const n=t.value;if(Array.isArray(n)?n.includes(i):n===i)this.expandAccordion(o),this.isNext=this.isPrevious=!1;else{this.collapseAccordion(o);const t=this.getNextSibling(),i=null==t?void 0:t.value;void 0!==i&&(this.isPrevious=Array.isArray(n)?n.includes(i):n===i);const e=this.getPreviousSibling(),a=null==e?void 0:e.value;void 0!==a&&(this.isNext=Array.isArray(n)?n.includes(a):n===a)}},this.getNextSibling=()=>{if(!this.el)return;const o=this.el.nextElementSibling;return"ION-ACCORDION"===(null==o?void 0:o.tagName)?o:void 0},this.getPreviousSibling=()=>{if(!this.el)return;const o=this.el.previousElementSibling;return"ION-ACCORDION"===(null==o?void 0:o.tagName)?o:void 0}}valueChanged(){this.updateState()}connectedCallback(){var o;const t=this.accordionGroupEl=null===(o=this.el)||void 0===o?void 0:o.closest("ion-accordion-group");t&&(this.updateState(!0),c(t,"ionValueChange",this.updateListener))}disconnectedCallback(){const o=this.accordionGroupEl;o&&h(o,"ionValueChange",this.updateListener)}componentDidLoad(){this.setItemDefaults(),this.slotToggleIcon(),d((()=>{this.setAria(4===this.state||8===this.state)}))}toggleExpanded(){const{accordionGroupEl:o,disabled:t,readonly:i,value:n,state:e}=this;t||i||(this.hasInteracted=!0,!o)||o.requestAccordionToggle(n,1===e||2===e)}render(){const{disabled:o,readonly:t}=this,e=u(this),a=4===this.state||8===this.state,s=a?"header expanded":"header",r=a?"content expanded":"content";return this.setAria(a),i(n,{key:"c8280b871eea1335aa18ba7eae14f628ef18b582",class:{[e]:!0,"accordion-expanding":8===this.state,"accordion-expanded":4===this.state,"accordion-collapsing":2===this.state,"accordion-collapsed":1===this.state,"accordion-next":this.isNext,"accordion-previous":this.isPrevious,"accordion-disabled":o,"accordion-readonly":t,"accordion-animated":this.shouldAnimate()}},i("div",{key:"58019e35314843e0c4f75f9a133cb3363a936072",onClick:()=>this.toggleExpanded(),id:"header",part:s,"aria-controls":"content",ref:o=>this.headerEl=o},i("slot",{key:"22033a83daaf9759865aa9c448da83cfb1e031de",name:"header"})),i("div",{key:"fd4fd72662822ff024d9ed633981333503bd111a",id:"content",part:r,role:"region","aria-labelledby":"header",ref:o=>this.contentEl=o},i("div",{key:"bcbb9848eaf3e4a11265f904a52a443a4e1c6c36",id:"content-wrapper",ref:o=>this.contentElWrapper=o},i("slot",{key:"1d1f8b04898ee2fe8c3d7ff4a7e0a940476f25c4",name:"content"}))))}static get delegatesFocus(){return!0}get el(){return e(this)}static get watchers(){return{value:["valueChanged"]}}};let x=0;g.style={ios:":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}",md:":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}"};const m=class{constructor(t){o(this,t),this.ionChange=a(this,"ionChange",7),this.ionValueChange=a(this,"ionValueChange",7),this.animated=!0,this.disabled=!1,this.readonly=!1,this.expand="compact",this.hasEmittedInitialValue=!1,this.isUserInitiatedChange=!1}valueChanged(){this.emitValueChange(!1,this.isUserInitiatedChange),this.isUserInitiatedChange=!1}async disabledChanged(){const{disabled:o}=this,t=await this.getAccordions();for(const i of t)i.disabled=o}async readonlyChanged(){const{readonly:o}=this,t=await this.getAccordions();for(const i of t)i.readonly=o}async onKeydown(o){const t=document.activeElement;if(!t)return;if(!t.closest('ion-accordion [slot="header"]'))return;const i="ION-ACCORDION"===t.tagName?t:t.closest("ion-accordion");if(!i)return;if(i.closest("ion-accordion-group")!==this.el)return;const n=await this.getAccordions(),e=n.findIndex((o=>o===i));if(-1===e)return;let a;"ArrowDown"===o.key?a=this.findNextAccordion(n,e):"ArrowUp"===o.key?a=this.findPreviousAccordion(n,e):"Home"===o.key?a=n[0]:"End"===o.key&&(a=n[n.length-1]),void 0!==a&&a!==t&&a.focus()}async componentDidLoad(){this.disabled&&this.disabledChanged(),this.readonly&&this.readonlyChanged(),this.hasEmittedInitialValue||this.emitValueChange(!0)}setValue(o){this.isUserInitiatedChange=!0;const t=this.value=o;this.ionChange.emit({value:t})}async requestAccordionToggle(o,t){const{multiple:i,value:n,readonly:e,disabled:a}=this;if(!e&&!a)if(t)if(i){const t=null!=n?n:[],i=Array.isArray(t)?t:[t];void 0===i.find((t=>t===o))&&void 0!==o&&this.setValue([...i,o])}else this.setValue(o);else if(i){const t=null!=n?n:[],i=Array.isArray(t)?t:[t];this.setValue(i.filter((t=>t!==o)))}else this.setValue(void 0)}findNextAccordion(o,t){const i=o[t+1];return void 0===i?o[0]:i}findPreviousAccordion(o,t){const i=o[t-1];return void 0===i?o[o.length-1]:i}async getAccordions(){return Array.from(this.el.querySelectorAll(":scope > ion-accordion"))}emitValueChange(o,t=!1){const{value:i,multiple:n}=this;!n&&Array.isArray(i)&&s(`[ion-accordion-group] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${i.map((o=>`'${o}'`)).join(", ")}]\n`,this.el),this.ionValueChange.emit({value:i,initial:o||!this.hasEmittedInitialValue&&void 0!==i&&!t}),void 0!==i&&(this.hasEmittedInitialValue=!0)}render(){const{disabled:o,readonly:t,expand:e}=this,a=u(this);return i(n,{key:"fd64cd203e2c8acdfc266005f372e26c29853847",class:{[a]:!0,"accordion-group-disabled":o,"accordion-group-readonly":t,[`accordion-group-expand-${e}`]:!0},role:"presentation"},i("slot",{key:"bdd9f419fc6e20f5de6f0f52ac93af7ec9a380ef"}))}get el(){return e(this)}static get watchers(){return{value:["valueChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"]}}};m.style={ios:":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){border-bottom:none}",md:":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion){-webkit-box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;border-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous){border-end-end-radius:6px;border-end-start-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next){border-start-start-radius:6px;border-start-end-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion):first-of-type{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}"};export{g as ion_accordion,m as ion_accordion_group}
|