@watermarkinsights/ripple 5.29.0-alpha.9 → 5.29.0

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.
Files changed (35) hide show
  1. package/dist/cjs/{app-globals-3f72d25c.js → app-globals-24691a79.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/ripple.cjs.js +2 -2
  4. package/dist/cjs/wm-date-range.cjs.entry.js +35 -30
  5. package/dist/cjs/wm-datepicker.cjs.entry.js +35 -30
  6. package/dist/collection/components/datepickers/wm-date-range.js +47 -30
  7. package/dist/collection/components/datepickers/wm-datepicker.js +47 -30
  8. package/dist/esm/{app-globals-d586ffcf.js → app-globals-930d901f.js} +1 -1
  9. package/dist/esm/loader.js +2 -2
  10. package/dist/esm/ripple.js +2 -2
  11. package/dist/esm/wm-date-range.entry.js +35 -30
  12. package/dist/esm/wm-datepicker.entry.js +35 -30
  13. package/dist/esm-es5/app-globals-930d901f.js +1 -0
  14. package/dist/esm-es5/loader.js +1 -1
  15. package/dist/esm-es5/ripple.js +1 -1
  16. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  17. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  18. package/dist/ripple/{p-a951445f.system.entry.js → p-29aec813.system.entry.js} +1 -1
  19. package/dist/ripple/{p-c106b6cc.system.entry.js → p-5034eb64.system.entry.js} +1 -1
  20. package/dist/ripple/p-64b6f989.entry.js +1 -0
  21. package/dist/ripple/p-8d5cccd1.entry.js +1 -0
  22. package/dist/ripple/p-a23643db.system.js +1 -0
  23. package/dist/ripple/p-c7d2bf2a.js +1 -0
  24. package/dist/ripple/p-ee102ccb.system.js +1 -0
  25. package/dist/ripple/ripple.esm.js +1 -1
  26. package/dist/ripple/ripple.js +1 -1
  27. package/dist/types/components/datepickers/wm-date-range.d.ts +3 -2
  28. package/dist/types/components/datepickers/wm-datepicker.d.ts +3 -2
  29. package/package.json +2 -3
  30. package/dist/esm-es5/app-globals-d586ffcf.js +0 -1
  31. package/dist/ripple/p-5d872c60.system.js +0 -1
  32. package/dist/ripple/p-6711165b.entry.js +0 -1
  33. package/dist/ripple/p-821f2384.entry.js +0 -1
  34. package/dist/ripple/p-abbc4bfe.js +0 -1
  35. package/dist/ripple/p-d7cc59a7.system.js +0 -1
@@ -24,16 +24,6 @@ const DatePicker = class {
24
24
  this.canOpen = this.measureFit() !== null;
25
25
  }, 100);
26
26
  this.pf_repositionRAF = null;
27
- this.pf_reposition = () => {
28
- // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
29
- // without thrashing layout when scroll fires many times per frame.
30
- if (this.pf_repositionRAF !== null)
31
- return;
32
- this.pf_repositionRAF = requestAnimationFrame(() => {
33
- this.pf_repositionRAF = null;
34
- this.pf_positionDropdown();
35
- });
36
- };
37
27
  this.value = "";
38
28
  this.disabled = false;
39
29
  this.dateFormat = "mm/dd/yyyy";
@@ -45,6 +35,18 @@ const DatePicker = class {
45
35
  this.isExpanded = false;
46
36
  this.canOpen = true;
47
37
  }
38
+ pf_reposition() {
39
+ if (this.hasAnchor || !this.isExpanded)
40
+ return;
41
+ // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
42
+ // without thrashing layout when scroll fires many times per frame.
43
+ if (this.pf_repositionRAF !== null)
44
+ return;
45
+ this.pf_repositionRAF = requestAnimationFrame(() => {
46
+ this.pf_repositionRAF = null;
47
+ this.pf_positionDropdown();
48
+ });
49
+ }
48
50
  // Returns the closest scrollable ancestor that can yield at least `neededScroll` of additional scroll.
49
51
  findScrollable(neededScroll) {
50
52
  // Scrolling an ancestor above the positioning boundary (e.g. a scrollable container behind
@@ -85,14 +87,18 @@ const DatePicker = class {
85
87
  return null;
86
88
  const fitsLeftAligned = rect.left + this.calWidth <= vw; // (a) left edge aligns to input's left edge
87
89
  const fitsRightAligned = rect.right - this.calWidth >= 0; // (b) right edge aligns to input's right edge
88
- // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room
90
+ // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room; (d) no placement works → caller hides the toggle
89
91
  const horizontal = fitsLeftAligned
90
92
  ? "left"
91
93
  : fitsRightAligned
92
94
  ? "right"
93
- : rect.left > vw - rect.right
94
- ? "clip-left"
95
- : "clip-right";
95
+ : vw >= this.calWidth
96
+ ? rect.left > vw - rect.right
97
+ ? "clip-left"
98
+ : "clip-right"
99
+ : null;
100
+ if (!horizontal)
101
+ return null;
96
102
  return { vertical, horizontal };
97
103
  }
98
104
  checkCanOpen() {
@@ -175,9 +181,6 @@ const DatePicker = class {
175
181
  }
176
182
  if (!this.hasAnchor) {
177
183
  this.pf_positionDropdown();
178
- // capture: true catches scroll from any ancestor (scroll events don't bubble).
179
- window.addEventListener("scroll", this.pf_reposition, { passive: true, capture: true });
180
- window.addEventListener("resize", this.pf_reposition, { passive: true });
181
184
  }
182
185
  requestAnimationFrame(() => {
183
186
  var _a, _b;
@@ -193,13 +196,9 @@ const DatePicker = class {
193
196
  });
194
197
  }
195
198
  else {
196
- if (!this.hasAnchor) {
197
- window.removeEventListener("scroll", this.pf_reposition, { capture: true });
198
- window.removeEventListener("resize", this.pf_reposition);
199
- if (this.pf_repositionRAF !== null) {
200
- cancelAnimationFrame(this.pf_repositionRAF);
201
- this.pf_repositionRAF = null;
202
- }
199
+ if (this.pf_repositionRAF !== null) {
200
+ cancelAnimationFrame(this.pf_repositionRAF);
201
+ this.pf_repositionRAF = null;
203
202
  }
204
203
  this.fit = null;
205
204
  this.isExpanded = false;
@@ -326,6 +325,12 @@ const DatePicker = class {
326
325
  componentDidLoad() {
327
326
  this.checkCanOpen();
328
327
  }
328
+ disconnectedCallback() {
329
+ if (this.pf_repositionRAF !== null) {
330
+ cancelAnimationFrame(this.pf_repositionRAF);
331
+ this.pf_repositionRAF = null;
332
+ }
333
+ }
329
334
  announce(message) {
330
335
  // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
331
336
  if (this.liveRegionEl.textContent === message) {
@@ -335,25 +340,25 @@ const DatePicker = class {
335
340
  }
336
341
  render() {
337
342
  var _a, _b, _c, _d;
338
- return (index.h(index.Host, { key: '7ffa8d1d3c09bfaebf46a1ab8b130db3e6ebd5d1', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: '036c05d1ae4ee77b517b8d43fe383f7be6825bf6', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: '614c58233013db6f63a556a0b7a33566da3b333e', class: "label-wrapper" }, this.labelPosition !== "none" && (index.h("label", { key: '371f28fdcf49c3e44624a07321506ff53d884b95', id: "datepickerLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})`, onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => functions.hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (index.h("div", { key: 'd2c7877c8fab8db02004f5ba13232cc724f6e010', "aria-hidden": "true", class: "required" }, "*"))), index.h("div", { key: '8ba1157d7c2978f853cc764b3aa848db38eb218d' }, index.h("div", { key: 'af846f4900d77f77d4029dcc9488847ca6768630', class: "single-wrapper input", ref: (el) => (this.anchorEl = el) }, index.h("input", { key: 'a4595b61a3c91d55124c7a1f93b238f78ca515a5', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), index.h("div", { key: 'd796e37f9c7946227b7b9c0cbc7d22515fb3c93a', class: "container", id: "wm-container" }, this.canOpen && (index.h("button", { key: 'e8b8704d0138af2768a83fdbd1915562408cd55e', disabled: this.disabled, "aria-label": functions.intl.formatMessage({
343
+ return (index.h(index.Host, { key: '75edb60af8b727174c9e906ea4fd5655610ddd00', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: '30cf18c6bdd8d2904bac07075eb7f1278a1dfadc', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { key: 'f52d76ff9670902582cff2c266804b138246137a', class: "label-wrapper" }, this.labelPosition !== "none" && (index.h("label", { key: '8eaad53d13c5300efcc5f2a8f0c06fb997ba2f80', id: "datepickerLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})`, onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => functions.hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (index.h("div", { key: 'bd29520e03f51baec0adc4be0a16c2c04651ea4a', "aria-hidden": "true", class: "required" }, "*"))), index.h("div", { key: '997f09274b7f85aa1d2d258e09802fe38c95a062' }, index.h("div", { key: '127816619a523254ccf63c9e3e26b7d3a8929516', class: "single-wrapper input", ref: (el) => (this.anchorEl = el) }, index.h("input", { key: 'b714f2bcb4e4fd8072ed1a61d5c3b9df5cd1de40', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), index.h("div", { key: 'cecb3d7adf4bf0401fce82b131de4767837d52a2', class: "container", id: "wm-container" }, this.canOpen && (index.h("button", { key: '9da230049feebb37f2f087e760c2671669716e92', disabled: this.disabled, "aria-label": functions.intl.formatMessage({
339
344
  id: "date.selectDate",
340
345
  defaultMessage: "Select date",
341
346
  description: "Button text for screen readers.",
342
- }), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, index.h("span", { key: '79b8dda7f1d9aa19d62f50274302d9b4ce169ea5', class: "svg-icon svg-date" }), index.h("span", { key: 'df52b9ca12607162ee448ac19f015627b90afbf6', class: "calendar", title: functions.intl.formatMessage({
347
+ }), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, index.h("span", { key: 'b1c40c5c3e63e1096b9e8bcbac78cc5a2beebfd0', class: "svg-icon svg-date" }), index.h("span", { key: '01675fedff80453c8a8a02360dddf3658fb842c6', class: "calendar", title: functions.intl.formatMessage({
343
348
  id: "date.calendarView",
344
349
  defaultMessage: "Calendar View",
345
350
  description: "Calendar button",
346
- }) }))), index.h("div", { key: 'aba1bef22da9727a29de77aaf8ba4a039a82d793', class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
351
+ }) }))), index.h("div", { key: 'f0fc896b98dbdfb8ec5a9d3783c52ee324847d5e', class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
347
352
  // @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
348
- onToggle: (ev) => this.handleToggle(ev) }, index.h("div", { key: 'a748ed6c4ed43f1bd8475217fee7dba224a661b2', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), index.h("priv-calendar", { key: 'ad1e6c0d9ef1de2a2104de952256e18f7abce6fc', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), index.h("div", { key: '3d27bef5891d01c0c36c8a05510724c78e0340c0', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), index.h("div", { key: '262ea6a8a13ee42d2efb49b642720762dd5bcf08', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), index.h("div", { key: '23b56fdf73f13e0f5ee06c854d7d2541d84a3220', id: "month-title", class: "sr-only" }, functions.intl.formatMessage({
353
+ onToggle: (ev) => this.handleToggle(ev) }, index.h("div", { key: '34543b5a222d7875938fc545751d33cd25ecf2c3', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), index.h("priv-calendar", { key: '7e548bdcc7bccc30dbbc20b32bd594cc0d27128f', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), index.h("div", { key: '07ba79155102bcc5af7a7d3ff8e3252412ea816f', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), index.h("div", { key: '4ff2e5951eabde88a2d2efe46c671e5f87764359', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), index.h("div", { key: '8fd50c0d7b5d7f21aa215e71c41a4d071f76e971', id: "month-title", class: "sr-only" }, functions.intl.formatMessage({
349
354
  id: "date.selectMonth",
350
355
  defaultMessage: "Activate to select a month.",
351
356
  description: "Calendar button",
352
- })), index.h("div", { key: '878bfc3e64c6d49ae178f5e57e5bb802fefd6fb9', id: "year-title", class: "sr-only" }, functions.intl.formatMessage({
357
+ })), index.h("div", { key: 'f82d186d8f2053f13389c9de24a317bd3673a0fc', id: "year-title", class: "sr-only" }, functions.intl.formatMessage({
353
358
  id: "date.selectYear",
354
359
  defaultMessage: "Activate to select a year.",
355
360
  description: "Calendar button",
356
- })))), index.h("div", { key: '809561d58dd226d0bf05a3678a793a4aaa6813a5', id: "error", class: "error" }, this.errorMessage), index.h("div", { key: '252bf955bc3885fece7219dad0b1819a33a29bf7', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
361
+ })))), index.h("div", { key: 'bcf3f6665c8fa0bb4e21b8ba92f756aa8570b5c4', id: "error", class: "error" }, this.errorMessage), index.h("div", { key: '2b249282c6a469e6d91ecae8ac681f4ebc5816b6', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
357
362
  }
358
363
  static get delegatesFocus() { return true; }
359
364
  get el() { return index.getElement(this); }
@@ -13,16 +13,6 @@ export class DateRange {
13
13
  this.canOpen = this.measureFit() !== null;
14
14
  }, 100);
15
15
  this.pf_repositionRAF = null;
16
- this.pf_reposition = () => {
17
- // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
18
- // without thrashing layout when scroll fires many times per frame.
19
- if (this.pf_repositionRAF !== null)
20
- return;
21
- this.pf_repositionRAF = requestAnimationFrame(() => {
22
- this.pf_repositionRAF = null;
23
- this.pf_positionDropdown();
24
- });
25
- };
26
16
  this.formats = { "mm/dd/yyyy": "US", "dd/mm/yyyy": "INT", "yyyy/mm/dd": "ISO" };
27
17
  this.dateFormat = "mm/dd/yyyy";
28
18
  this.disabled = false;
@@ -38,6 +28,18 @@ export class DateRange {
38
28
  this.isExpanded = false;
39
29
  this.canOpen = true;
40
30
  }
31
+ pf_reposition() {
32
+ if (this.hasAnchor || !this.isExpanded)
33
+ return;
34
+ // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
35
+ // without thrashing layout when scroll fires many times per frame.
36
+ if (this.pf_repositionRAF !== null)
37
+ return;
38
+ this.pf_repositionRAF = requestAnimationFrame(() => {
39
+ this.pf_repositionRAF = null;
40
+ this.pf_positionDropdown();
41
+ });
42
+ }
41
43
  // Returns the closest scrollable ancestor that can yield at least `neededScroll` of additional scroll.
42
44
  findScrollable(neededScroll) {
43
45
  // Scrolling an ancestor above the positioning boundary (e.g. a scrollable container behind
@@ -78,14 +80,18 @@ export class DateRange {
78
80
  return null;
79
81
  const fitsLeftAligned = rect.left + this.calWidth <= vw; // (a) left edge aligns to input's left edge
80
82
  const fitsRightAligned = rect.right - this.calWidth >= 0; // (b) right edge aligns to input's right edge
81
- // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room
83
+ // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room; (d) no placement works → caller hides the toggle
82
84
  const horizontal = fitsLeftAligned
83
85
  ? "left"
84
86
  : fitsRightAligned
85
87
  ? "right"
86
- : rect.left > vw - rect.right
87
- ? "clip-left"
88
- : "clip-right";
88
+ : vw >= this.calWidth
89
+ ? rect.left > vw - rect.right
90
+ ? "clip-left"
91
+ : "clip-right"
92
+ : null;
93
+ if (!horizontal)
94
+ return null;
89
95
  return { vertical, horizontal };
90
96
  }
91
97
  checkCanOpen() {
@@ -222,9 +228,6 @@ export class DateRange {
222
228
  }
223
229
  if (!this.hasAnchor) {
224
230
  this.pf_positionDropdown();
225
- // capture: true catches scroll from any ancestor (scroll events don't bubble).
226
- window.addEventListener("scroll", this.pf_reposition, { passive: true, capture: true });
227
- window.addEventListener("resize", this.pf_reposition, { passive: true });
228
231
  }
229
232
  requestAnimationFrame(() => {
230
233
  var _a, _b;
@@ -258,13 +261,9 @@ export class DateRange {
258
261
  });
259
262
  }
260
263
  else {
261
- if (!this.hasAnchor) {
262
- window.removeEventListener("scroll", this.pf_reposition, { capture: true });
263
- window.removeEventListener("resize", this.pf_reposition);
264
- if (this.pf_repositionRAF !== null) {
265
- cancelAnimationFrame(this.pf_repositionRAF);
266
- this.pf_repositionRAF = null;
267
- }
264
+ if (this.pf_repositionRAF !== null) {
265
+ cancelAnimationFrame(this.pf_repositionRAF);
266
+ this.pf_repositionRAF = null;
268
267
  }
269
268
  this.fit = null;
270
269
  // reset
@@ -515,6 +514,12 @@ export class DateRange {
515
514
  componentDidLoad() {
516
515
  this.checkCanOpen();
517
516
  }
517
+ disconnectedCallback() {
518
+ if (this.pf_repositionRAF !== null) {
519
+ cancelAnimationFrame(this.pf_repositionRAF);
520
+ this.pf_repositionRAF = null;
521
+ }
522
+ }
518
523
  announce(message) {
519
524
  // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
520
525
  if (this.liveRegionEl.textContent === message) {
@@ -524,25 +529,25 @@ export class DateRange {
524
529
  }
525
530
  render() {
526
531
  var _a, _b, _c, _d;
527
- return (h(Host, { key: 'f082b7224cab15202ebc1222288eb1c1b054ee26', "aria-busy": "false" }, h("div", { key: '65e1bc3240fa4e9116a7ebfb89d0edbd59966ab2', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: '5736b31108d7cb360035e4a5f03c7a770a45bf14', class: "range-wrapper cal", ref: (el) => (this.anchorEl = el) }, h("div", { key: '1ebfc8b64211589b9726bf015c5a6d919c5049d5', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: '1ba9b573bc1a53132dd75483c9efaa224ca64414', id: "startlabel", htmlFor: "start-date-input", class: "label", title: `${this.labelStart} (${this.dateFormat})` }, this.labelStart, this.requiredField && (h("span", { key: 'c849c11b482192a916815c55df7a7668f0d643e0', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: 'd41334efe0f909cb6c304e21ecf219a1425e49b8', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: 'aa44f11eb5e06244f529c0ca1340e6af4177da82', id: "endlabel", htmlFor: "end-date-input", class: "label", title: `${this.labelEnd} (${this.dateFormat})` }, this.labelEnd, this.requiredField && (h("span", { key: '72f856d870e55929e4651d104b48a2a713e94411', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: '2579fee89010ce00cf2bfc37711939b53b53d027', disabled: this._disabled, type: "text", id: "start-date-input", class: `date-input input ${this.invalidStart ? "invalid" : ""}`, name: "start-date", placeholder: this.dateFormat, value: this.valueStart, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleStartInput(ev), onBlur: () => this.handleStartInputBlur(), ref: (input) => (this.startInputEl = input), "aria-describedby": "error", "aria-label": this.labelStart, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '223b38400c6dfdd3b0d41ce2f90714c499abacc4', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: 'f6ee7e06e6783720a3bb6b9cbc4eda6697ead014', disabled: this._disabled, type: "text", id: "end-date-input", class: `date-input input ${this.invalidEnd ? "invalid" : ""}`, name: "end-date", placeholder: this.dateFormat, value: this.valueEnd, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleEndInput(ev), onBlur: () => this.handleEndInputBlur(), ref: (input) => (this.endInputEl = input), "aria-describedby": "error", "aria-label": this.labelEnd, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '433ae77f3fc4ee804da2c6e29a07ed1a405611f0', class: "toggle-wrapper", id: "toggle-wrapper" }, this.canOpen && (h("button", { key: '7708429eb69ab2653e392ad047583553e223a7f4', disabled: this.disabled, "aria-describedby": "start-date-input end-date-input", "aria-label": intl.formatMessage({
532
+ return (h(Host, { key: '9840d0cb5b3aff858d939fbe2d67dc1d51535c05', "aria-busy": "false" }, h("div", { key: '71e3eb8f71812140abc538cbfec3111c2e2b9cba', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: '094295f1471f1ba0eaea5c65617447efc5dca770', class: "range-wrapper cal", ref: (el) => (this.anchorEl = el) }, h("div", { key: '00bcfac555be41fe8b2f885e2a0335c8d41efd28', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: 'fa7a7f25eb9156ad8de4d3c243f41e974084e35b', id: "startlabel", htmlFor: "start-date-input", class: "label", title: `${this.labelStart} (${this.dateFormat})` }, this.labelStart, this.requiredField && (h("span", { key: '146abd4001789c1020eeb27c154004376a39e4e3', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: 'a112e25addb7a17cf497728a4d4d72018228a706', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: '29834ad29b391967f6313e7a72775f1647f61084', id: "endlabel", htmlFor: "end-date-input", class: "label", title: `${this.labelEnd} (${this.dateFormat})` }, this.labelEnd, this.requiredField && (h("span", { key: 'b3c0b90c040a0552db1e01b8f8aa38725a98357a', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: '1a6b2881f11d9700fd5895ca49b72672d2c903aa', disabled: this._disabled, type: "text", id: "start-date-input", class: `date-input input ${this.invalidStart ? "invalid" : ""}`, name: "start-date", placeholder: this.dateFormat, value: this.valueStart, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleStartInput(ev), onBlur: () => this.handleStartInputBlur(), ref: (input) => (this.startInputEl = input), "aria-describedby": "error", "aria-label": this.labelStart, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '4ab993f81a4af844b51b66acefef64ecbf3c6be3', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: '5ef90c128cc642ad23102f752838b2a2c5d30688', disabled: this._disabled, type: "text", id: "end-date-input", class: `date-input input ${this.invalidEnd ? "invalid" : ""}`, name: "end-date", placeholder: this.dateFormat, value: this.valueEnd, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleEndInput(ev), onBlur: () => this.handleEndInputBlur(), ref: (input) => (this.endInputEl = input), "aria-describedby": "error", "aria-label": this.labelEnd, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '43a4820ce51afc316b96e09aa8581c4791d06aaf', class: "toggle-wrapper", id: "toggle-wrapper" }, this.canOpen && (h("button", { key: '7a39be01375c1406021c8c2015f746710db313b6', disabled: this.disabled, "aria-describedby": "start-date-input end-date-input", "aria-label": intl.formatMessage({
528
533
  id: "date.selectRange",
529
534
  defaultMessage: "Select range",
530
535
  description: "Button text for screen readers.",
531
- }), ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: '0fc1f2ac2c495dcf3beb188c23e1128cbe276c2d', class: "svg-icon svg-date" }), h("span", { key: '443a03b03efdcde3bdbfc20da4f7d43f74fce060', class: "calendar", title: intl.formatMessage({
536
+ }), ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: 'd58a8a11fc19a77da89af41ac82c877acb4a0012', class: "svg-icon svg-date" }), h("span", { key: 'c0c3d305723275782e0e97db7a5feb3777de2c1b', class: "calendar", title: intl.formatMessage({
532
537
  id: "date.calendarView",
533
538
  defaultMessage: "Calendar View",
534
539
  description: "Calendar button",
535
- }) })))), h("div", { key: 'de856abe8acfef402870bc0bee557ad735f70c5c', class: `popup-wrapper popup-range ${this.startCalEl && this.startCalEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
540
+ }) })))), h("div", { key: 'de44f23903d4656c215b10a070dc262057a70a5f', class: `popup-wrapper popup-range ${this.startCalEl && this.startCalEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
536
541
  // @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
537
- onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: 'f09c0cfb16e1d22061ca3b071f3c4c4028c2134c', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.endCalEl.focusLastFocusable() }), h("priv-calendar", { key: 'e597ab635744082d8e1cc995f17388aaa8c32567', ref: (el) => (this.startCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("priv-calendar", { key: '7cc2f6d1e2fd875337d27b14047eecb4c548b10c', ref: (el) => (this.endCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("div", { key: 'fb48a129bb023cc4ee1e7b9ec0118a75c73e9a3b', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.startCalEl.focusFirstFocusable() }))), h("div", { key: 'cbb77ea4a3536636ee81a1c8ef54b258bf7be7fa' }, h("div", { key: '069d6dfb9f05e3098fd877a6497b6c419c39a76d', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: 'e9f3ed922577cfb6fe3ae001589074fcab8edf7a', id: "month-title", class: "sr-only" }, intl.formatMessage({
542
+ onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '0f9e61c2aead0ad0587c99061e43b601b456de51', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.endCalEl.focusLastFocusable() }), h("priv-calendar", { key: 'de148d250b5a9d58eeb186196b8db7ac09e3e111', ref: (el) => (this.startCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("priv-calendar", { key: 'f9522d0f4d4f5a9d6790604aebeba53fc18753e5', ref: (el) => (this.endCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("div", { key: 'ef7e0bd324e44a0fdab74c5ac90c50533c3c6f65', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.startCalEl.focusFirstFocusable() }))), h("div", { key: '02a384909982487064ee8618783ad89f632effae' }, h("div", { key: '4cbd7f056e57b6cc52d70ec998aa9534f0d8e091', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '27d4adf2fb5da73fc1b0bf1da84a941400dfe75a', id: "month-title", class: "sr-only" }, intl.formatMessage({
538
543
  id: "date.selectMonth",
539
544
  defaultMessage: "Activate to select a month.",
540
545
  description: "Calendar button",
541
- })), h("div", { key: 'c62e4d195394da08b91d6358521c2f21b5d3898b', id: "year-title", class: "sr-only" }, intl.formatMessage({
546
+ })), h("div", { key: '15de6f6698170ed70687516e4a15abbca041fde5', id: "year-title", class: "sr-only" }, intl.formatMessage({
542
547
  id: "date.selectYear",
543
548
  defaultMessage: "Activate to select a year.",
544
549
  description: "Calendar button",
545
- }))), h("div", { key: '07743caf440aa658df6d22cdca611c1c73f62351', id: "error", class: "error" }, this.errorMessage), h("div", { key: '85248a82b66f6db0005e27a03a4a7c4d8572a404', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
550
+ }))), h("div", { key: '47f6c2dd3072e95927d32910d1bf30cce0bde3f7', id: "error", class: "error" }, this.errorMessage), h("div", { key: '0cbdb396f7422cd1e47b299c7037f495b28ad317', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
546
551
  }
547
552
  static get is() { return "wm-date-range"; }
548
553
  static get encapsulation() { return "shadow"; }
@@ -883,6 +888,18 @@ export class DateRange {
883
888
  }
884
889
  static get listeners() {
885
890
  return [{
891
+ "name": "scroll",
892
+ "method": "pf_reposition",
893
+ "target": "window",
894
+ "capture": true,
895
+ "passive": true
896
+ }, {
897
+ "name": "resize",
898
+ "method": "pf_reposition",
899
+ "target": "window",
900
+ "capture": false,
901
+ "passive": true
902
+ }, {
886
903
  "name": "resize",
887
904
  "method": "checkCanOpen",
888
905
  "target": "window",
@@ -13,16 +13,6 @@ export class DatePicker {
13
13
  this.canOpen = this.measureFit() !== null;
14
14
  }, 100);
15
15
  this.pf_repositionRAF = null;
16
- this.pf_reposition = () => {
17
- // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
18
- // without thrashing layout when scroll fires many times per frame.
19
- if (this.pf_repositionRAF !== null)
20
- return;
21
- this.pf_repositionRAF = requestAnimationFrame(() => {
22
- this.pf_repositionRAF = null;
23
- this.pf_positionDropdown();
24
- });
25
- };
26
16
  this.value = "";
27
17
  this.disabled = false;
28
18
  this.dateFormat = "mm/dd/yyyy";
@@ -34,6 +24,18 @@ export class DatePicker {
34
24
  this.isExpanded = false;
35
25
  this.canOpen = true;
36
26
  }
27
+ pf_reposition() {
28
+ if (this.hasAnchor || !this.isExpanded)
29
+ return;
30
+ // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
31
+ // without thrashing layout when scroll fires many times per frame.
32
+ if (this.pf_repositionRAF !== null)
33
+ return;
34
+ this.pf_repositionRAF = requestAnimationFrame(() => {
35
+ this.pf_repositionRAF = null;
36
+ this.pf_positionDropdown();
37
+ });
38
+ }
37
39
  // Returns the closest scrollable ancestor that can yield at least `neededScroll` of additional scroll.
38
40
  findScrollable(neededScroll) {
39
41
  // Scrolling an ancestor above the positioning boundary (e.g. a scrollable container behind
@@ -74,14 +76,18 @@ export class DatePicker {
74
76
  return null;
75
77
  const fitsLeftAligned = rect.left + this.calWidth <= vw; // (a) left edge aligns to input's left edge
76
78
  const fitsRightAligned = rect.right - this.calWidth >= 0; // (b) right edge aligns to input's right edge
77
- // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room
79
+ // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room; (d) no placement works → caller hides the toggle
78
80
  const horizontal = fitsLeftAligned
79
81
  ? "left"
80
82
  : fitsRightAligned
81
83
  ? "right"
82
- : rect.left > vw - rect.right
83
- ? "clip-left"
84
- : "clip-right";
84
+ : vw >= this.calWidth
85
+ ? rect.left > vw - rect.right
86
+ ? "clip-left"
87
+ : "clip-right"
88
+ : null;
89
+ if (!horizontal)
90
+ return null;
85
91
  return { vertical, horizontal };
86
92
  }
87
93
  checkCanOpen() {
@@ -164,9 +170,6 @@ export class DatePicker {
164
170
  }
165
171
  if (!this.hasAnchor) {
166
172
  this.pf_positionDropdown();
167
- // capture: true catches scroll from any ancestor (scroll events don't bubble).
168
- window.addEventListener("scroll", this.pf_reposition, { passive: true, capture: true });
169
- window.addEventListener("resize", this.pf_reposition, { passive: true });
170
173
  }
171
174
  requestAnimationFrame(() => {
172
175
  var _a, _b;
@@ -182,13 +185,9 @@ export class DatePicker {
182
185
  });
183
186
  }
184
187
  else {
185
- if (!this.hasAnchor) {
186
- window.removeEventListener("scroll", this.pf_reposition, { capture: true });
187
- window.removeEventListener("resize", this.pf_reposition);
188
- if (this.pf_repositionRAF !== null) {
189
- cancelAnimationFrame(this.pf_repositionRAF);
190
- this.pf_repositionRAF = null;
191
- }
188
+ if (this.pf_repositionRAF !== null) {
189
+ cancelAnimationFrame(this.pf_repositionRAF);
190
+ this.pf_repositionRAF = null;
192
191
  }
193
192
  this.fit = null;
194
193
  this.isExpanded = false;
@@ -315,6 +314,12 @@ export class DatePicker {
315
314
  componentDidLoad() {
316
315
  this.checkCanOpen();
317
316
  }
317
+ disconnectedCallback() {
318
+ if (this.pf_repositionRAF !== null) {
319
+ cancelAnimationFrame(this.pf_repositionRAF);
320
+ this.pf_repositionRAF = null;
321
+ }
322
+ }
318
323
  announce(message) {
319
324
  // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
320
325
  if (this.liveRegionEl.textContent === message) {
@@ -324,25 +329,25 @@ export class DatePicker {
324
329
  }
325
330
  render() {
326
331
  var _a, _b, _c, _d;
327
- return (h(Host, { key: '7ffa8d1d3c09bfaebf46a1ab8b130db3e6ebd5d1', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '036c05d1ae4ee77b517b8d43fe383f7be6825bf6', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '614c58233013db6f63a556a0b7a33566da3b333e', class: "label-wrapper" }, this.labelPosition !== "none" && (h("label", { key: '371f28fdcf49c3e44624a07321506ff53d884b95', id: "datepickerLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})`, onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (h("div", { key: 'd2c7877c8fab8db02004f5ba13232cc724f6e010', "aria-hidden": "true", class: "required" }, "*"))), h("div", { key: '8ba1157d7c2978f853cc764b3aa848db38eb218d' }, h("div", { key: 'af846f4900d77f77d4029dcc9488847ca6768630', class: "single-wrapper input", ref: (el) => (this.anchorEl = el) }, h("input", { key: 'a4595b61a3c91d55124c7a1f93b238f78ca515a5', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), h("div", { key: 'd796e37f9c7946227b7b9c0cbc7d22515fb3c93a', class: "container", id: "wm-container" }, this.canOpen && (h("button", { key: 'e8b8704d0138af2768a83fdbd1915562408cd55e', disabled: this.disabled, "aria-label": intl.formatMessage({
332
+ return (h(Host, { key: '75edb60af8b727174c9e906ea4fd5655610ddd00', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '30cf18c6bdd8d2904bac07075eb7f1278a1dfadc', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'f52d76ff9670902582cff2c266804b138246137a', class: "label-wrapper" }, this.labelPosition !== "none" && (h("label", { key: '8eaad53d13c5300efcc5f2a8f0c06fb997ba2f80', id: "datepickerLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})`, onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (h("div", { key: 'bd29520e03f51baec0adc4be0a16c2c04651ea4a', "aria-hidden": "true", class: "required" }, "*"))), h("div", { key: '997f09274b7f85aa1d2d258e09802fe38c95a062' }, h("div", { key: '127816619a523254ccf63c9e3e26b7d3a8929516', class: "single-wrapper input", ref: (el) => (this.anchorEl = el) }, h("input", { key: 'b714f2bcb4e4fd8072ed1a61d5c3b9df5cd1de40', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), h("div", { key: 'cecb3d7adf4bf0401fce82b131de4767837d52a2', class: "container", id: "wm-container" }, this.canOpen && (h("button", { key: '9da230049feebb37f2f087e760c2671669716e92', disabled: this.disabled, "aria-label": intl.formatMessage({
328
333
  id: "date.selectDate",
329
334
  defaultMessage: "Select date",
330
335
  description: "Button text for screen readers.",
331
- }), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: '79b8dda7f1d9aa19d62f50274302d9b4ce169ea5', class: "svg-icon svg-date" }), h("span", { key: 'df52b9ca12607162ee448ac19f015627b90afbf6', class: "calendar", title: intl.formatMessage({
336
+ }), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: 'b1c40c5c3e63e1096b9e8bcbac78cc5a2beebfd0', class: "svg-icon svg-date" }), h("span", { key: '01675fedff80453c8a8a02360dddf3658fb842c6', class: "calendar", title: intl.formatMessage({
332
337
  id: "date.calendarView",
333
338
  defaultMessage: "Calendar View",
334
339
  description: "Calendar button",
335
- }) }))), h("div", { key: 'aba1bef22da9727a29de77aaf8ba4a039a82d793', class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
340
+ }) }))), h("div", { key: 'f0fc896b98dbdfb8ec5a9d3783c52ee324847d5e', class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
336
341
  // @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
337
- onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: 'a748ed6c4ed43f1bd8475217fee7dba224a661b2', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), h("priv-calendar", { key: 'ad1e6c0d9ef1de2a2104de952256e18f7abce6fc', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), h("div", { key: '3d27bef5891d01c0c36c8a05510724c78e0340c0', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), h("div", { key: '262ea6a8a13ee42d2efb49b642720762dd5bcf08', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '23b56fdf73f13e0f5ee06c854d7d2541d84a3220', id: "month-title", class: "sr-only" }, intl.formatMessage({
342
+ onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '34543b5a222d7875938fc545751d33cd25ecf2c3', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), h("priv-calendar", { key: '7e548bdcc7bccc30dbbc20b32bd594cc0d27128f', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), h("div", { key: '07ba79155102bcc5af7a7d3ff8e3252412ea816f', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), h("div", { key: '4ff2e5951eabde88a2d2efe46c671e5f87764359', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '8fd50c0d7b5d7f21aa215e71c41a4d071f76e971', id: "month-title", class: "sr-only" }, intl.formatMessage({
338
343
  id: "date.selectMonth",
339
344
  defaultMessage: "Activate to select a month.",
340
345
  description: "Calendar button",
341
- })), h("div", { key: '878bfc3e64c6d49ae178f5e57e5bb802fefd6fb9', id: "year-title", class: "sr-only" }, intl.formatMessage({
346
+ })), h("div", { key: 'f82d186d8f2053f13389c9de24a317bd3673a0fc', id: "year-title", class: "sr-only" }, intl.formatMessage({
342
347
  id: "date.selectYear",
343
348
  defaultMessage: "Activate to select a year.",
344
349
  description: "Calendar button",
345
- })))), h("div", { key: '809561d58dd226d0bf05a3678a793a4aaa6813a5', id: "error", class: "error" }, this.errorMessage), h("div", { key: '252bf955bc3885fece7219dad0b1819a33a29bf7', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
350
+ })))), h("div", { key: 'bcf3f6665c8fa0bb4e21b8ba92f756aa8570b5c4', id: "error", class: "error" }, this.errorMessage), h("div", { key: '2b249282c6a469e6d91ecae8ac681f4ebc5816b6', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
346
351
  }
347
352
  static get is() { return "wm-datepicker"; }
348
353
  static get encapsulation() { return "shadow"; }
@@ -611,6 +616,18 @@ export class DatePicker {
611
616
  }
612
617
  static get listeners() {
613
618
  return [{
619
+ "name": "scroll",
620
+ "method": "pf_reposition",
621
+ "target": "window",
622
+ "capture": true,
623
+ "passive": true
624
+ }, {
625
+ "name": "resize",
626
+ "method": "pf_reposition",
627
+ "target": "window",
628
+ "capture": false,
629
+ "passive": true
630
+ }, {
614
631
  "name": "resize",
615
632
  "method": "checkCanOpen",
616
633
  "target": "window",
@@ -1,6 +1,6 @@
1
1
  import './index-3425d80d.js';
2
2
 
3
- const version = "5.29.0-alpha.9";
3
+ const version = "5.29.0";
4
4
 
5
5
  // PRINT RIPPLE VERSION IN CONSOLE
6
6
  // test envs return 0 for plugin.length