@watermarkinsights/ripple 5.3.0-8 → 5.3.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 (53) hide show
  1. package/dist/cjs/{app-globals-9af59462.js → app-globals-7e0e393a.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/priv-calendar.cjs.entry.js +23 -23
  4. package/dist/cjs/priv-chart-popover.cjs.entry.js +14 -12
  5. package/dist/cjs/ripple.cjs.js +1 -1
  6. package/dist/cjs/wm-date-range.cjs.entry.js +8 -9
  7. package/dist/cjs/wm-snackbar.cjs.entry.js +37 -28
  8. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +14 -12
  9. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +23 -17
  10. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +22 -22
  11. package/dist/collection/components/datepickers/wm-date-range.js +8 -9
  12. package/dist/collection/components/wm-snackbar/wm-snackbar.css +34 -19
  13. package/dist/collection/components/wm-snackbar/wm-snackbar.js +36 -27
  14. package/dist/esm/{app-globals-9d1a5fa5.js → app-globals-4021eaa9.js} +1 -1
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/priv-calendar.entry.js +23 -23
  17. package/dist/esm/priv-chart-popover.entry.js +14 -12
  18. package/dist/esm/ripple.js +1 -1
  19. package/dist/esm/wm-date-range.entry.js +8 -9
  20. package/dist/esm/wm-snackbar.entry.js +37 -28
  21. package/dist/esm-es5/app-globals-4021eaa9.js +1 -0
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  24. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  25. package/dist/esm-es5/ripple.js +1 -1
  26. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  27. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  28. package/dist/ripple/p-2d619f83.entry.js +1 -0
  29. package/dist/ripple/{p-35f209d9.system.entry.js → p-3423a9b6.system.entry.js} +1 -1
  30. package/dist/ripple/p-8af06db6.system.entry.js +1 -0
  31. package/dist/ripple/p-a70a261c.entry.js +1 -0
  32. package/dist/ripple/p-ad4529d2.entry.js +1 -0
  33. package/dist/ripple/p-bafefea3.js +1 -0
  34. package/dist/ripple/p-ca35a8b7.system.entry.js +1 -0
  35. package/dist/ripple/{p-9a89a13c.system.js → p-cb33f410.system.js} +1 -1
  36. package/dist/ripple/p-d5d04b09.system.js +1 -0
  37. package/dist/ripple/p-de0e138f.system.entry.js +1 -0
  38. package/dist/ripple/p-f836a5e8.entry.js +1 -0
  39. package/dist/ripple/ripple.esm.js +1 -1
  40. package/dist/ripple/ripple.js +1 -1
  41. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +1 -2
  42. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +2 -2
  43. package/package.json +1 -1
  44. package/dist/esm-es5/app-globals-9d1a5fa5.js +0 -1
  45. package/dist/ripple/p-0abc9300.entry.js +0 -1
  46. package/dist/ripple/p-399fbd0c.system.entry.js +0 -1
  47. package/dist/ripple/p-45530460.js +0 -1
  48. package/dist/ripple/p-4978eebe.entry.js +0 -1
  49. package/dist/ripple/p-71a18f64.entry.js +0 -1
  50. package/dist/ripple/p-799d06ad.system.entry.js +0 -1
  51. package/dist/ripple/p-8c20ad8e.entry.js +0 -1
  52. package/dist/ripple/p-a2b807ba.system.entry.js +0 -1
  53. package/dist/ripple/p-ec5319e9.system.js +0 -1
@@ -351,12 +351,16 @@
351
351
  .popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end, .popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start {
352
352
  background-image: radial-gradient(var(--wmcolor-datepicker-range-background-hover) 17px, var(--wmcolor-calendar-day-border-hover) 18px, var(--wmcolor-calendar-day-border-hover) 20px, transparent 21px), var(--range-background-hover);
353
353
  }
354
- .popup-wrapper .day-view .date-grid .date-cell.in-range:first-of-type:not(.preview-start, .preview-end, .range-start, .range-end), .popup-wrapper .day-view .date-grid .date-cell.in-range:first-child:not(.preview-start, .preview-end, .range-start, .range-end) {
354
+ .popup-wrapper .day-view .date-grid .date-cell.in-range.preview-end:focus-visible, .popup-wrapper .day-view .date-grid .date-cell.in-range.preview-start:focus-visible {
355
+ outline: none;
356
+ border: none;
357
+ }
358
+ .popup-wrapper .day-view .date-grid .date-cell.in-range:first-of-type:not(.preview-start, .preview-end, .range-start, .range-end), .popup-wrapper .day-view .date-grid .date-cell.in-range:first-child:not(.preview-start, .preview-end, .range-start, .range-end), .popup-wrapper .day-view .date-grid .date-cell.in-range.first-of-month:not(.preview-start, .preview-end, .range-start, .range-end) {
355
359
  background-image: radial-gradient(var(--wmcolor-datepicker-range-background-selected) 16px, transparent 17px), var(--range-background-selected);
356
360
  background-position: -5px center, center left 17px;
357
361
  background-repeat: no-repeat;
358
362
  }
359
- .popup-wrapper .day-view .date-grid .date-cell.in-range:first-of-type:not(.preview-start, .preview-end, .range-start, .range-end):hover, .popup-wrapper .day-view .date-grid .date-cell.in-range:first-child:not(.preview-start, .preview-end, .range-start, .range-end):hover {
363
+ .popup-wrapper .day-view .date-grid .date-cell.in-range:first-of-type:not(.preview-start, .preview-end, .range-start, .range-end):hover, .popup-wrapper .day-view .date-grid .date-cell.in-range:first-child:not(.preview-start, .preview-end, .range-start, .range-end):hover, .popup-wrapper .day-view .date-grid .date-cell.in-range.first-of-month:not(.preview-start, .preview-end, .range-start, .range-end):hover {
360
364
  background-image: radial-gradient(#dbd9ef 20px, transparent 21px), radial-gradient(var(--wmcolor-datepicker-range-background-selected) 16px, transparent 17px), var(--range-background-selected);
361
365
  background-position: center, -5px center, center left 17px;
362
366
  background-repeat: no-repeat;
@@ -394,6 +398,15 @@
394
398
  font-weight: 600;
395
399
  color: var(--wmcolor-datepicker-day-text-selected);
396
400
  }
401
+ .popup-wrapper .day-view .date-grid .date-cell.range-start:focus-visible, .popup-wrapper .day-view .date-grid .date-cell.range-end:focus-visible {
402
+ outline: 3px solid var(--wmcolor-interactive-focus);
403
+ outline-offset: -2px;
404
+ border: none;
405
+ z-index: 11;
406
+ }
407
+ .popup-wrapper .day-view .date-grid .date-cell.range-start:focus-visible[aria-selected=true], .popup-wrapper .day-view .date-grid .date-cell.range-end:focus-visible[aria-selected=true] {
408
+ outline-offset: 2px;
409
+ }
397
410
  .popup-wrapper .day-view .date-grid .date-cell.range-start {
398
411
  background-image: var(--range-start-svg);
399
412
  padding-inline-end: 2px;
@@ -470,26 +483,19 @@
470
483
  background-color: var(--wmcolor-datepicker-month-background-selected);
471
484
  color: var(--wmcolor-datepicker-month-text-selected);
472
485
  }
473
- .popup-wrapper .month.focused:focus-visible {
474
- outline: 3px solid var(--wmcolor-interactive-focus);
475
- outline-offset: -2px;
476
- border: none;
477
- z-index: 11;
478
- }
479
- .popup-wrapper .month.focused:focus-visible[aria-selected=true] {
480
- outline-offset: 2px;
481
- }
482
- .popup-wrapper button:focus-visible,
483
- .popup-wrapper .title-box:focus-visible,
484
- .popup-wrapper .date-cell:focus-visible {
486
+ .popup-wrapper button:focus-visible:not(.preview-start, .preview-end),
487
+ .popup-wrapper .title-box:focus-visible:not(.preview-start, .preview-end),
488
+ .popup-wrapper .month.focused:focus-visible:not(.preview-start, .preview-end),
489
+ .popup-wrapper .date-cell:focus-visible:not(.preview-start, .preview-end) {
485
490
  outline: 3px solid var(--wmcolor-interactive-focus);
486
491
  outline-offset: -2px;
487
492
  border: none;
488
493
  z-index: 11;
489
494
  }
490
- .popup-wrapper button:focus-visible[aria-selected=true],
491
- .popup-wrapper .title-box:focus-visible[aria-selected=true],
492
- .popup-wrapper .date-cell:focus-visible[aria-selected=true] {
495
+ .popup-wrapper button:focus-visible:not(.preview-start, .preview-end)[aria-selected=true],
496
+ .popup-wrapper .title-box:focus-visible:not(.preview-start, .preview-end)[aria-selected=true],
497
+ .popup-wrapper .month.focused:focus-visible:not(.preview-start, .preview-end)[aria-selected=true],
498
+ .popup-wrapper .date-cell:focus-visible:not(.preview-start, .preview-end)[aria-selected=true] {
493
499
  outline-offset: 2px;
494
500
  }
495
501
 
@@ -111,7 +111,7 @@ export class PrivCalendar {
111
111
  const monthOfDate = dateFind.month.asInt(date);
112
112
  const dayOfDate = dateFind.day.asInt(date);
113
113
  const yearOfDate = dateFind.year.asInt(date);
114
- const isStartDate = this.startDate && this.startDate === date;
114
+ const isStartDate = eitherStart && eitherStart === date;
115
115
  let selected = isStartDate ? "true" : "false";
116
116
  const classesArr = ["date-cell"];
117
117
  const isFocused = date === this.focusDate;
@@ -119,7 +119,7 @@ export class PrivCalendar {
119
119
  if (isToday)
120
120
  classesArr.push("today");
121
121
  if (this.calType === "range") {
122
- const isEndDate = eitherStart && this.endDate && this.endDate === date && eitherStart < this.endDate;
122
+ const isEndDate = eitherStart && eitherEnd && eitherEnd === date && eitherStart < eitherEnd;
123
123
  selected = isEndDate ? "true" : selected;
124
124
  const isFirstOfMonth = dayOfDate === 1;
125
125
  const isLastOfMonth = dayOfDate === getMonthLength(monthOfDate, yearOfDate);
@@ -133,7 +133,7 @@ export class PrivCalendar {
133
133
  if (isLastOfMonth)
134
134
  classesArr.push("last-of-month");
135
135
  if (isStartDate) {
136
- if (isInRangePreview && !isEndDate && this.hoverDate && this.hoverDate < this.startDate) {
136
+ if (isInRangePreview && !isEndDate && this.hoverDate && this.hoverDate < eitherStart) {
137
137
  // invert the arrow direction if user mouses over a prior date
138
138
  classesArr.push("range-end");
139
139
  }
@@ -360,42 +360,42 @@ export class PrivCalendar {
360
360
  }
361
361
  isInRange(date) {
362
362
  if (this.otherCalEl) {
363
- const _startDate = this.startDate || this.otherCalEl.startDate;
364
- const _endDate = this.endDate || this.otherCalEl.endDate;
365
- if (_startDate && _endDate) {
363
+ const eitherStart = this.startDate || this.otherCalEl.startDate;
364
+ const eitherEnd = this.endDate || this.otherCalEl.endDate;
365
+ if (eitherStart && eitherEnd) {
366
366
  // if both dates exist the range is shown
367
- return _startDate <= date && date <= _endDate;
367
+ return eitherStart <= date && date <= eitherEnd;
368
368
  }
369
369
  }
370
370
  return false;
371
371
  }
372
372
  isInRangePreview(date) {
373
373
  if (this.otherCalEl) {
374
- const _startDate = this.startDate || this.otherCalEl.startDate;
375
- const _endDate = this.endDate || this.otherCalEl.endDate;
374
+ const eitherStart = this.startDate || this.otherCalEl.startDate;
375
+ const eitherEnd = this.endDate || this.otherCalEl.endDate;
376
376
  // no preview if there's an existing range
377
- if (_startDate && _endDate)
377
+ if (eitherStart && eitherEnd)
378
378
  return false;
379
- if (_startDate && this.hoverDate) {
379
+ if (eitherStart && this.hoverDate) {
380
380
  // if only startDate exists, the hovered date functions as the other end of the range
381
- if (this.hoverDate > _startDate) {
382
- return _startDate <= date && date <= this.hoverDate;
381
+ if (this.hoverDate > eitherStart) {
382
+ return eitherStart <= date && date <= this.hoverDate;
383
383
  }
384
- else if (this.hoverDate < _startDate) {
384
+ else if (this.hoverDate < eitherStart) {
385
385
  // user is mousing over a date prior to the start date
386
386
  // start date considered as end of range
387
- return this.hoverDate <= date && date <= _startDate;
387
+ return this.hoverDate <= date && date <= eitherStart;
388
388
  } // if neither < or > then it's the same date and should return false
389
389
  }
390
- else if (_endDate && this.hoverDate) {
390
+ else if (eitherEnd && this.hoverDate) {
391
391
  // if only endDate exists, the hovered date functions as the other end of the range
392
- if (this.hoverDate < _endDate) {
393
- return this.hoverDate <= date && date <= _endDate;
392
+ if (this.hoverDate < eitherEnd) {
393
+ return this.hoverDate <= date && date <= eitherEnd;
394
394
  }
395
- else if (this.hoverDate > _endDate) {
395
+ else if (this.hoverDate > eitherEnd) {
396
396
  // user is mousing over a date later than the end date
397
397
  // end date considered as beggining of range
398
- return _endDate <= date && date <= this.hoverDate;
398
+ return eitherEnd <= date && date <= this.hoverDate;
399
399
  }
400
400
  }
401
401
  }
@@ -540,11 +540,11 @@ export class PrivCalendar {
540
540
  }), class: "header-btn arw-btn" }, h("span", { class: "mdi" }, "\uF142"))), h("div", { "aria-labelledby": "popup-title-year", role: "grid", class: "months" }, h("div", { role: "row", class: "month-row" }, calendar_months.slice(0, 3).map((month, index) => this.renderMonth(month, index))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(3, 6).map((month, index) => this.renderMonth(month, index + 3))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(6, 9).map((month, index) => this.renderMonth(month, index + 6))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(9).map((month, index) => this.renderMonth(month, index + 9))))));
541
541
  }
542
542
  render() {
543
- return (h(Host, { key: 'e1269b7069d6b870cd9e873a046b24ddff6ac6cb', onMouseOut: (ev) => {
543
+ return (h(Host, { key: '14af9cecf405ac061fd2345488fda226bb068a40', onMouseOut: (ev) => {
544
544
  // @ts-ignore
545
545
  if (!this.el.parentElement.contains(ev.toElement))
546
546
  this.outOfCal.emit();
547
- }, role: "application", "aria-describedby": "application" }, this.view === "day" ? this.renderDayView() : this.renderMonthView(), h("div", { key: '3cf3a1b225b865ae1f02367ac318fb29b70a3acd', id: "application", class: "sr-only" }, this.calName, this.calInstructions)));
547
+ }, role: "application", "aria-describedby": "application" }, this.view === "day" ? this.renderDayView() : this.renderMonthView(), h("div", { key: 'dd1583339054b245d006f4ea3caa7efab5f31e4a', id: "application", class: "sr-only" }, this.calName, this.calInstructions)));
548
548
  }
549
549
  static get is() { return "priv-calendar"; }
550
550
  static get originalStyleUrls() {
@@ -68,11 +68,10 @@ export class DateRange {
68
68
  }
69
69
  return [startFocusDate, endFocusDate];
70
70
  }
71
+ // same month of the same year
71
72
  isSameMonth(date1, date2) {
72
73
  if (date1 && date2) {
73
- let month1 = parseInt(date1.split("-")[1]);
74
- let month2 = parseInt(date2.split("-")[1]);
75
- return month1 == month2;
74
+ return date1.slice(0, -3) === date2.slice(0, -3);
76
75
  }
77
76
  else {
78
77
  return false;
@@ -138,11 +137,11 @@ export class DateRange {
138
137
  // display stuff
139
138
  this.openUp = shouldOpenUp(this.el, this.popupEl.clientHeight, this.labelEl.clientHeight);
140
139
  const { spaceLeft, spaceRight } = getContextMeasurements(this.el);
141
- if (spaceRight >= this.popupEl.clientWidth - this.el.clientWidth) {
140
+ if (spaceRight >= this.calWidth - this.el.clientWidth) {
142
141
  this.popupEl.style.left = "0";
143
142
  this.popupEl.style.right = "auto";
144
143
  }
145
- else if (spaceLeft >= this.popupEl.clientWidth - this.el.clientWidth) {
144
+ else if (spaceLeft >= this.calWidth - this.el.clientWidth) {
146
145
  this.popupEl.style.right = "0";
147
146
  this.popupEl.style.left = "auto";
148
147
  }
@@ -430,19 +429,19 @@ export class DateRange {
430
429
  }
431
430
  }
432
431
  render() {
433
- return (h(Host, { key: 'c7af63a346dc1d32969c347cfba0a083d1057455', "aria-busy": "false" }, h("div", { key: '4c94fb6bee095610ce439ab4a680deae0f0d0b0f', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: 'f3d15a578a419d48c505d4a59e9cce52efd119ec', class: `range-wrapper ${this.calWidth <= this.availSpace ? "cal" : ""}` }, h("div", { key: 'f89695595a095b1010a5a5c930b25e26f7b3442b', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: 'b43c28307754b469b2835b5273470802634b9d75', ref: (e) => (this.labelEl = e), id: "startlabel", htmlFor: "start-date-input", class: "label", title: `${this.labelStart} (${this.dateFormat})` }, this.labelStart, this.requiredField && (h("span", { key: '531662c73b075b965c02ecd8d37c44009b68958c', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: 'd0b2b3e6dc27581bdd8a05a077bb780dd1aebc8f', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: '9e82dfe7ae0203910e923862ae77278305070627', id: "endlabel", htmlFor: "end-date-input", class: "label", title: `${this.labelEnd} (${this.dateFormat})` }, this.labelEnd, this.requiredField && (h("span", { key: 'f650a0049cc8a5a0f35a2021f3981163632d7577', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: '05894877bb679ecad21ba8aa9b4bee267e49a3bf', 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: '59d2df6558db691cb81581211d333f21c3833e15', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: '4332148a32b11391608b254d4c59695c2530644f', 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: 'ac92e1e274c39b2cb08f5113a34c030668a76cee', class: "toggle-wrapper", id: "toggle-wrapper" }, this.calWidth <= this.availSpace && (h("button", { key: 'b736ea24b8c58e21e1f47e3954a37dcfb30f9b3d', disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-describedby": "date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { key: '9266e378ca6c58f5a2b37212998660efe732754e', class: "calendar", title: intl.formatMessage({
432
+ return (h(Host, { key: 'e8d0c88743871493bcaeec068d48ed08f62dbf8c', "aria-busy": "false" }, h("div", { key: '012aa6b6f18636b2a55d4ecc6b7e2bd307b04fd0', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: 'f68a445295c7814e5fb115173be6eded33abefc5', class: `range-wrapper ${this.calWidth <= this.availSpace ? "cal" : ""}` }, h("div", { key: 'fd65dbfd86ac7f806113326ce94f49c6bae21691', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: 'f51549404052afb0dd1544357ed2f944483c3af7', ref: (e) => (this.labelEl = e), id: "startlabel", htmlFor: "start-date-input", class: "label", title: `${this.labelStart} (${this.dateFormat})` }, this.labelStart, this.requiredField && (h("span", { key: 'd282d9ba284721c504b317acb8ce37e2de076c8f', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: 'cbaf22798e7cf3acaf94a4f67177afa7197ca77f', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: 'fc357775e90200781de3e686eba882c9a66fdb00', id: "endlabel", htmlFor: "end-date-input", class: "label", title: `${this.labelEnd} (${this.dateFormat})` }, this.labelEnd, this.requiredField && (h("span", { key: '5783a070decbfb54d88faff089735ca423d74ef6', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: '7f870e1939e080424fb4ebbf0f01f85f2d4a307b', 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: 'f5e41de3464ae45a9d8566d8b02e9d917ced63c2', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: '65d107a3e0133ee4fe9bbfcbd26c36c75959b026', 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: 'aee8fbed7434ab65b2f3a2bb8a7e227691f722ae', class: "toggle-wrapper", id: "toggle-wrapper" }, this.calWidth <= this.availSpace && (h("button", { key: '42575a1737f65a4d01e12e6403175afad1f39fa0', disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-describedby": "date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { key: '7267cb592ea8959f1823b6ed6c2656213bf3ba76', class: "calendar", title: intl.formatMessage({
434
433
  id: "date.calendarView",
435
434
  defaultMessage: "Calendar View",
436
435
  description: "Calendar button",
437
- }) })))), this.renderCalendars()), h("div", { key: 'db9a70dc7930280e91939854ee213a4f803616c8' }, h("div", { key: '6d56c83befef125ee334a7abb7a9078314b5aa9c', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: 'c56f9f6ca31b225e4e18ceae776a87f11a33006e', id: "month-title", class: "sr-only" }, intl.formatMessage({
436
+ }) })))), this.renderCalendars()), h("div", { key: 'b4ed550eb26261f2a140998229dc902e72eb8642' }, h("div", { key: '98a4a27732bd274be45d451487f1e11ccced0008', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: 'f9749b90e500acf87127d4310f9312023f6982dc', id: "month-title", class: "sr-only" }, intl.formatMessage({
438
437
  id: "date.selectMonth",
439
438
  defaultMessage: "Activate to select a month.",
440
439
  description: "Calendar button",
441
- })), h("div", { key: '22cfb5941e704d48a35238928c7104cc871f23e8', id: "year-title", class: "sr-only" }, intl.formatMessage({
440
+ })), h("div", { key: 'bc2e1261fed2cf3a3a294d19354eb9bf4c627e46', id: "year-title", class: "sr-only" }, intl.formatMessage({
442
441
  id: "date.selectYear",
443
442
  defaultMessage: "Activate to select a year.",
444
443
  description: "Calendar button",
445
- }))), h("div", { key: '3727f6bb9cda7b16f25366804c265627e54677b7', id: "error", class: "error" }, this.errorMessage), h("div", { key: 'ba95d9bcccadd5b37b140e4de1204f2ad54c757c', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
444
+ }))), h("div", { key: 'f82463f10d1a9fb7a4474149c65d535bf4e8b963', id: "error", class: "error" }, this.errorMessage), h("div", { key: '7500d9fd2ebb57e01629e4abc8913c5f3766ed60', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
446
445
  }
447
446
  static get is() { return "wm-date-range"; }
448
447
  static get encapsulation() { return "shadow"; }
@@ -38,7 +38,7 @@
38
38
  --wmcolor-snackbar-text: var(--wmcolor-text-ondark);
39
39
  position: fixed;
40
40
  bottom: 0;
41
- left: 1.25rem;
41
+ left: 0;
42
42
  right: 1.25rem;
43
43
  z-index: 2001;
44
44
  }
@@ -51,9 +51,9 @@
51
51
  max-width: 35.5rem;
52
52
  max-height: 17.5rem;
53
53
  overflow: auto;
54
- padding: 0.25rem 0.625rem 1.875rem;
54
+ padding: 1.875rem;
55
55
  display: flex;
56
- flex-direction: column-reverse;
56
+ flex-direction: column;
57
57
  gap: 1.25rem;
58
58
  }
59
59
  :host .wm-snack-wrapper {
@@ -101,6 +101,21 @@
101
101
  transform: scale(1);
102
102
  }
103
103
  }
104
+ :host .wm-snack-wrapper .wm-snackbar.shrink {
105
+ animation: shrink 0.25s;
106
+ animation-fill-mode: forwards;
107
+ animation-timing-function: ease-in-out;
108
+ }
109
+ @keyframes shrink {
110
+ 0% {
111
+ opacity: 1;
112
+ transform: scale(1);
113
+ }
114
+ 100% {
115
+ opacity: 0;
116
+ transform: scale(0.9);
117
+ }
118
+ }
104
119
  :host .wm-snack-wrapper .wm-snackbar .link {
105
120
  letter-spacing: 0;
106
121
  text-transform: none;
@@ -145,7 +160,7 @@
145
160
  :host .wm-snack-wrapper .wm-snackbar.active:not(button) {
146
161
  opacity: 1;
147
162
  }
148
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg {
163
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper {
149
164
  display: -webkit-box;
150
165
  display: -webkit-flex;
151
166
  display: -ms-flexbox;
@@ -162,31 +177,31 @@
162
177
  position: relative;
163
178
  padding: 0;
164
179
  }
165
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext {
180
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .msg-wrapper {
166
181
  display: flex;
167
182
  flex-wrap: wrap;
168
183
  gap: 12px;
169
184
  width: 100%;
170
185
  align-items: center;
171
186
  }
172
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext .msg {
187
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .msg-wrapper .msg {
173
188
  display: block;
174
189
  flex: 0 0 0;
175
190
  min-width: fit-content;
176
191
  }
177
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext .msg.long {
192
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .msg-wrapper .msg.long {
178
193
  min-width: 216px;
179
194
  flex: 1 0 0;
180
195
  }
181
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext .link {
196
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .msg-wrapper .link {
182
197
  display: flex;
183
198
  flex: 0 0 auto;
184
199
  }
185
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext .link span {
200
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .msg-wrapper .link span {
186
201
  display: block;
187
202
  white-space: nowrap;
188
203
  }
189
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack {
204
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack {
190
205
  -webkit-box-shadow: none;
191
206
  -moz-box-shadow: none;
192
207
  box-shadow: none;
@@ -207,7 +222,7 @@
207
222
  text-align: center;
208
223
  letter-spacing: normal;
209
224
  }
210
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before {
225
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:before {
211
226
  display: inline-block;
212
227
  font: normal normal normal 24px/1 "Material Design Icons";
213
228
  font-size: inherit;
@@ -218,18 +233,18 @@
218
233
  content: "\f156";
219
234
  font-size: 1.12rem;
220
235
  }
221
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover {
236
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:hover {
222
237
  background-color: var(--wmcolor-snackbar-close-background-hover);
223
238
  color: var(--wmcolor-snackbar-close-icon-hover);
224
239
  }
225
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus {
240
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:focus {
226
241
  outline: none;
227
242
  }
228
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner {
243
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack::-moz-focus-inner {
229
244
  border: 0;
230
245
  outline: none;
231
246
  }
232
- :host .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active {
247
+ :host .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:active {
233
248
  -ms-transform: scale(0.9, 0.9);
234
249
  -webkit-transform: scale(0.9, 0.9);
235
250
  -moz-transform: scale(0.9, 0.9);
@@ -264,11 +279,11 @@
264
279
  left: 0;
265
280
  }
266
281
 
267
- .user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active) {
282
+ .user-is-tabbing .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:focus:not(:active) {
268
283
  outline: 3px solid var(--wmcolor-interactive-focus);
269
284
  outline-offset: 0;
270
285
  }
271
- .user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active) > .tooltip {
286
+ .user-is-tabbing .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:focus:not(:active) > .tooltip {
272
287
  clip: auto;
273
288
  width: auto;
274
289
  height: auto;
@@ -281,13 +296,13 @@
281
296
  transform: translateX(-50%);
282
297
  }
283
298
  @media screen and (min-width: 48rem) {
284
- .user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active) > .tooltip {
299
+ .user-is-tabbing .wm-snack-wrapper .wm-snackbar .content-wrapper .closesnack:focus:not(:active) > .tooltip {
285
300
  top: 2.0625rem;
286
301
  left: auto;
287
302
  }
288
303
  }
289
304
 
290
- .user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active) {
305
+ .user-is-tabbing .wm-snack-wrapper .wm-snackbar .content-wrapper .link:focus:not(:active) {
291
306
  outline: 3px solid var(--wmcolor-interactive-focus);
292
307
  outline-offset: 2px;
293
308
  }
@@ -25,11 +25,13 @@ export class Snackbar {
25
25
  updateSnacks(newValue) {
26
26
  const prevParsedNotifications = [...this.parsedNotifications];
27
27
  this.parsedNotifications = [...JSON.parse(newValue)];
28
- this.refreshUpdatedNotifications(prevParsedNotifications);
28
+ this.resetUpdatedNotifications(prevParsedNotifications);
29
29
  if (prevParsedNotifications.length < this.parsedNotifications.length) {
30
30
  const latestNotification = this.parsedNotifications[0];
31
- const newTimer = window.setTimeout(() => this.snackExpired(latestNotification.id), 6000);
32
- this.timers = Object.assign({ [latestNotification.id]: newTimer }, this.timers);
31
+ if (!latestNotification.link) {
32
+ const newTimer = window.setTimeout(() => this.snackExpired(latestNotification.id), 6000);
33
+ this.timers = Object.assign({ [latestNotification.id]: newTimer }, this.timers);
34
+ }
33
35
  // don't announce link if user is tabbing because link is focused after announcement
34
36
  this.announce(`${latestNotification.message} ${this.isTabbing ? "" : latestNotification.link}`);
35
37
  if (this.isTabbing && latestNotification.link) {
@@ -44,7 +46,19 @@ export class Snackbar {
44
46
  }
45
47
  this.setMinWidths();
46
48
  }
47
- refreshUpdatedNotifications(prevNotifications) {
49
+ setMinWidths() {
50
+ // wait for render to get updated scrollWidth
51
+ requestAnimationFrame(() => {
52
+ const msgEls = this.el.shadowRoot.querySelectorAll(".msg");
53
+ msgEls.forEach((msgEl) => {
54
+ msgEl.classList.remove("long");
55
+ if (msgEl.scrollWidth > 216) {
56
+ msgEl.classList.add("long");
57
+ }
58
+ });
59
+ });
60
+ }
61
+ resetUpdatedNotifications(prevNotifications) {
48
62
  let updatedNotifications = [];
49
63
  prevNotifications.forEach((prevNotification) => {
50
64
  this.parsedNotifications.forEach((newNotification) => {
@@ -60,8 +74,10 @@ export class Snackbar {
60
74
  window.requestAnimationFrame(() => notifEl.classList.add("grow"));
61
75
  }
62
76
  this.stopTimer(updatedNotification);
63
- const newTimer = window.setTimeout(() => this.snackExpired(updatedNotification.id), 6000);
64
- this.timers = Object.assign({ [updatedNotification.id]: newTimer }, this.timers);
77
+ if (!updatedNotification.link) {
78
+ const newTimer = window.setTimeout(() => this.snackExpired(updatedNotification.id), 6000);
79
+ this.timers = Object.assign({ [updatedNotification.id]: newTimer }, this.timers);
80
+ }
65
81
  this.announce(`${updatedNotification.message} ${this.isTabbing ? "" : updatedNotification.link}`);
66
82
  });
67
83
  }
@@ -93,12 +109,17 @@ export class Snackbar {
93
109
  endSnack(notification) {
94
110
  //App listens for wmSnackbarSnackFinished event and deletes the emitted notification.
95
111
  this.stopTimer(notification);
96
- this.wmSnackbarSnackFinished.emit({
97
- id: notification.id,
98
- message: notification.message,
99
- link: notification.link,
100
- newWindow: notification.newWindow,
101
- });
112
+ const notifEl = this.el.shadowRoot.querySelector(`#snack-${notification.id}`);
113
+ notifEl.classList.add("shrink");
114
+ setTimeout(() => {
115
+ // wait for animation to complete, then emit event for removal
116
+ this.wmSnackbarSnackFinished.emit({
117
+ id: notification.id,
118
+ message: notification.message,
119
+ link: notification.link,
120
+ newWindow: notification.newWindow,
121
+ });
122
+ }, 250);
102
123
  }
103
124
  snackLinkClicked(notification) {
104
125
  //App listens for wmSnackbarActionTriggered event, deletes emitted notification, and takes over focus.
@@ -117,18 +138,6 @@ export class Snackbar {
117
138
  delete this.timers[notification.id];
118
139
  }
119
140
  }
120
- setMinWidths() {
121
- // wait for render to get updated scrollWidth
122
- requestAnimationFrame(() => {
123
- const msgEls = this.el.shadowRoot.querySelectorAll(".msg");
124
- msgEls.forEach((msgEl) => {
125
- msgEl.classList.remove("long");
126
- if (msgEl.scrollWidth > 216) {
127
- msgEl.classList.add("long");
128
- }
129
- });
130
- });
131
- }
132
141
  announce(message) {
133
142
  if (this.liveRegionEl.textContent === message) {
134
143
  message += "\u00A0";
@@ -136,15 +145,15 @@ export class Snackbar {
136
145
  this.announcement = message;
137
146
  }
138
147
  renderSnackbars() {
139
- return [...this.parsedNotifications].reverse().map((notification) => (h("div", { class: "wm-snack-wrapper" }, h("div", { id: `snack-${notification.id}`, class: "wm-snackbar active neutral" }, h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) }), h("div", { class: "wm-snackbarmsg" }, h("div", { class: "msgtext" }, h("span", { class: "msg" }, notification.message), notification.link && (h("a", { id: `action-${notification.id}`, class: `link ${notification.newWindow ? "new-window" : ""}`, "aria-label": `Click to ${notification.link}...${notification.newWindow ? " " + globalMessages.newWindow : ""}`, tabindex: 0, onClick: () => {
148
+ return this.parsedNotifications.map((notification) => (h("div", { class: "wm-snack-wrapper", key: `snack-${notification.id}` }, h("div", { id: `snack-${notification.id}`, class: "wm-snackbar active neutral" }, h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) }), h("div", { class: "content-wrapper" }, h("div", { class: "msg-wrapper" }, h("span", { class: "msg" }, notification.message), notification.link && (h("a", { id: `action-${notification.id}`, class: `link ${notification.newWindow ? "new-window" : ""}`, "aria-label": `Click to ${notification.link}...${notification.newWindow ? " " + globalMessages.newWindow : ""}`, tabindex: 0, onClick: () => {
140
149
  this.snackLinkClicked(notification);
141
150
  }, onKeyDown: (ev) => ev.key === "Enter" && this.snackLinkClicked(notification) }, h("span", { "aria-hidden": "true" }, notification.link)))), h("button", { id: `close-button-${notification.id}`, "aria-label": "Close this notification", class: "closesnack", tabindex: notification.link ? 0 : -1, onClick: () => this.snackDismissed(notification), onMouseEnter: (ev) => showTooltip("bottom", ev.target, globalMessages.close), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.isTabbing && showTooltip("bottom", ev.target, globalMessages.close), onBlur: () => hideTooltip() })), h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) })))));
142
151
  }
143
152
  render() {
144
- return (h(Host, { key: '67f36569152cc7f7df8e17a48b72737cf06b2249' }, h("div", { key: '2646611246f9ab87624bb1ad2bad217c364d89e7', ref: (el) => (this.snackAreaEl = el), class: {
153
+ return (h(Host, { key: '55f568def0428fb9d6fe5864415e2adafadc06c0' }, h("div", { key: '388c19a486841d23408bcf24340a07238c834cc7', ref: (el) => (this.snackAreaEl = el), class: {
145
154
  "list-wrapper": true,
146
155
  "user-is-tabbing": this.isTabbing,
147
- } }, this.renderSnackbars()), h("div", { key: '26284c415d2be1b8e944d7c2830c8eada5030fe3', class: "sr-only", "aria-live": "polite", "aria-atomic": "false", id: `wm-live-region-${this.uid}`, ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
156
+ } }, this.renderSnackbars()), h("div", { key: '512e8c965a31cb73e95eb7a09a4ac6a9d50bc932', class: "sr-only", "aria-live": "polite", "aria-atomic": "false", id: `wm-live-region-${this.uid}`, ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
148
157
  }
149
158
  static get is() { return "wm-snackbar"; }
150
159
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,6 @@
1
1
  import './index-130e07bb.js';
2
2
 
3
- const version = "5.3.0-8";
3
+ const version = "5.3.0";
4
4
 
5
5
  // PRINT RIPPLE VERSION IN CONSOLE
6
6
  // test envs return 0 for plugin.length
@@ -1,6 +1,6 @@
1
1
  import { b as bootstrapLazy } from './index-130e07bb.js';
2
2
  export { s as setNonce } from './index-130e07bb.js';
3
- import { g as globalScripts } from './app-globals-9d1a5fa5.js';
3
+ import { g as globalScripts } from './app-globals-4021eaa9.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;