@mintplayer/web-components 2.16.0 → 2.18.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 (120) hide show
  1. package/accordion/index.mjs +5 -5
  2. package/calendar/index.mjs +1 -1
  3. package/carousel/index.mjs +57 -143
  4. package/charts/core/index.mjs +30 -20
  5. package/charts/core/src/attributes.d.ts +18 -0
  6. package/charts/core/src/index.d.ts +2 -0
  7. package/charts/core/src/view-window.d.ts +46 -0
  8. package/charts/hierarchy/index.mjs +245 -256
  9. package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
  10. package/charts/sparkline/index.mjs +27 -26
  11. package/charts/trend/index.mjs +21 -20
  12. package/checkbox/index.mjs +1 -1
  13. package/checkbox/src/components/mp-checkbox.d.ts +1 -0
  14. package/chunks/attributes-L3eKsbdy.mjs +16 -0
  15. package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
  16. package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
  17. package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
  18. package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
  19. package/chunks/{mp-datatable-B7st6G-I.mjs → mp-datatable-CEpSxlkd.mjs} +660 -357
  20. package/chunks/{mp-datetime-picker.element-DsWA1AFs.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
  21. package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
  22. package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
  23. package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
  24. package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
  25. package/chunks/{mp-timepicker.element-CwaAAOcm.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
  26. package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
  27. package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
  28. package/chunks/{overlay-controller-DifgO6jT.mjs → overlay-controller-BHDagokg.mjs} +96 -92
  29. package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
  30. package/chunks/view-window-DGvFiDnW.mjs +263 -0
  31. package/code-snippet/index.mjs +70 -66
  32. package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
  33. package/custom-elements.json +66193 -0
  34. package/datatable/index.mjs +1 -1
  35. package/datatable/src/components/column-resize.d.ts +11 -0
  36. package/datatable/src/components/index.d.ts +1 -1
  37. package/datatable/src/components/mp-datatable.d.ts +264 -20
  38. package/datatable/src/index.d.ts +1 -1
  39. package/datatable/src/types/labels.d.ts +11 -0
  40. package/datepicker/index.mjs +10 -9
  41. package/datetime-picker/index.mjs +1 -1
  42. package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
  43. package/dock/index.mjs +430 -463
  44. package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
  45. package/dock/src/core/resize.d.ts +60 -0
  46. package/dropdown-menu/index.mjs +4 -2
  47. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
  48. package/dropdown-menu/src/index.d.ts +1 -1
  49. package/dropdown-menu/src/types/dropdown.d.ts +14 -1
  50. package/dropdown-menu/src/types/index.d.ts +1 -1
  51. package/file-manager/index.mjs +63 -61
  52. package/file-manager/src/components/mp-file-manager.d.ts +4 -3
  53. package/multi-range/index.mjs +56 -50
  54. package/multi-range/src/mint-multi-range.element.d.ts +4 -10
  55. package/multi-range/src/pointer-geometry.d.ts +31 -0
  56. package/navbar/index.mjs +89 -439
  57. package/overlay/index.mjs +1 -1
  58. package/overlay/src/overlay-controller.d.ts +0 -14
  59. package/overlay/src/placement.d.ts +48 -0
  60. package/package.json +7 -1
  61. package/pagination/index.mjs +1 -1
  62. package/phone-input/index.mjs +44 -40
  63. package/phone-input/src/components/stack.d.ts +8 -0
  64. package/query-builder/index.mjs +418 -466
  65. package/query-builder/src/dnd/drag-controller.d.ts +12 -8
  66. package/query-builder/src/mp-query-builder.element.d.ts +5 -1
  67. package/query-builder/src/mp-query-condition.element.d.ts +1 -0
  68. package/radio/index.mjs +1 -1
  69. package/radio-group/index.mjs +1 -1
  70. package/ribbon/index.mjs +477 -498
  71. package/ribbon/src/core/band-text-color.d.ts +10 -0
  72. package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
  73. package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
  74. package/ribbon/src/mp-ribbon.element.d.ts +0 -27
  75. package/scheduler/index.mjs +726 -711
  76. package/scheduler/src/components/mp-scheduler.d.ts +19 -3
  77. package/scheduler/src/drag/drag-manager.d.ts +1 -9
  78. package/scheduler/src/input/input-handler.d.ts +12 -2
  79. package/scheduler/src/utils/geometry.d.ts +39 -0
  80. package/scheduler/src/views/timeline-view.d.ts +0 -1
  81. package/scheduler-core/index.mjs +84 -71
  82. package/scheduler-core/src/services/resource.service.d.ts +0 -12
  83. package/scheduler-core/src/services/timeline.service.d.ts +0 -9
  84. package/select/index.mjs +1 -1
  85. package/select/src/components/mp-select.d.ts +1 -0
  86. package/signature-pad/index.mjs +21 -23
  87. package/signature-pad/src/canvas-point.d.ts +26 -0
  88. package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
  89. package/splitter/index.mjs +1 -1
  90. package/splitter/src/components/mp-splitter.d.ts +16 -0
  91. package/splitter/src/managers/index.d.ts +1 -0
  92. package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
  93. package/swiper-core/index.mjs +2 -2
  94. package/theming/bs-theme-preboot.js +1 -0
  95. package/theming/color-mode.css +36 -0
  96. package/theming/index.d.ts +1 -0
  97. package/theming/index.mjs +327 -0
  98. package/theming/src/components/mp-theme-toggle.d.ts +71 -0
  99. package/theming/src/cookie.d.ts +31 -0
  100. package/theming/src/index.d.ts +5 -0
  101. package/theming/src/preboot.d.ts +1 -0
  102. package/theming/src/resolve.d.ts +36 -0
  103. package/theming/src/store.d.ts +27 -0
  104. package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
  105. package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
  106. package/theming/src/toggle-modes.d.ts +23 -0
  107. package/tile-manager/index.mjs +252 -211
  108. package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
  109. package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
  110. package/timeline/index.mjs +156 -164
  111. package/timeline/src/components/mp-timeline.d.ts +41 -7
  112. package/timepicker/index.mjs +7 -4
  113. package/timepicker/src/mp-time-list.element.d.ts +26 -0
  114. package/timepicker/src/mp-timepicker.element.d.ts +3 -0
  115. package/toggle-button/index.mjs +1 -1
  116. package/tree-select/index.mjs +21 -9
  117. package/treeview/index.mjs +1 -1
  118. package/treeview/src/components/mp-treeview.d.ts +6 -4
  119. package/chunks/color-DIeST-IS.mjs +0 -224
  120. package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
@@ -2,13 +2,13 @@ import { html as c, unsafeCSS as v, LitElement as y, nothing as b } from "lit";
2
2
  import { query as n } from "lit/decorators.js";
3
3
  import { L as w } from "./live-announcer-Bi0orG4n.mjs";
4
4
  import { e as D } from "./error-text-B45eDAt1.mjs";
5
- import { O as g } from "./overlay-controller-DifgO6jT.mjs";
6
- import "./mp-calendar.element-CJ8-t-Zn.mjs";
7
- import { m as p } from "./mp-timepicker.element-CwaAAOcm.mjs";
8
- import { i as $ } from "./invalid-feedback.styles-he0JYrJm.mjs";
5
+ import { O as g } from "./overlay-controller-BHDagokg.mjs";
6
+ import "./mp-calendar.element-BIHS9SZZ.mjs";
7
+ import { h as $, r as O, m as h } from "./mp-timepicker.element-BiB9lkgc.mjs";
8
+ import { i as C } from "./invalid-feedback.styles-he0JYrJm.mjs";
9
9
  c`<!-- Rendered dynamically by render(). Codegen-wc emits styles from the
10
10
  sibling .scss; the template export is intentionally unused. -->`;
11
- const C = v(`:host {
11
+ const T = v(`:host {
12
12
  display: inline-block;
13
13
  position: relative;
14
14
  box-sizing: border-box;
@@ -151,13 +151,13 @@ button.trigger svg {
151
151
  transition: none !important;
152
152
  }
153
153
  }`);
154
- var O = Object.defineProperty, l = (a, e, t, i) => {
154
+ var x = Object.defineProperty, l = (a, e, t, i) => {
155
155
  for (var r = void 0, u = a.length - 1, d; u >= 0; u--)
156
156
  (d = a[u]) && (r = d(e, t, r) || r);
157
- return r && O(e, t, r), r;
157
+ return r && x(e, t, r), r;
158
158
  };
159
- const T = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1H2zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5z"/></svg>', x = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"/><path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0z"/></svg>', M = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>';
160
- let P = 0;
159
+ const P = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 2a1 1 0 0 0-1 1v1h14V3a1 1 0 0 0-1-1H2zm13 3H1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V5z"/></svg>', k = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"/><path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0z"/></svg>', E = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>';
160
+ let M = 0;
161
161
  function s(a) {
162
162
  return new Date(a.getFullYear(), a.getMonth(), a.getDate()).getTime();
163
163
  }
@@ -166,7 +166,7 @@ function f(a, e) {
166
166
  }
167
167
  class o extends y {
168
168
  constructor() {
169
- super(...arguments), this.value = null, this.min = null, this.max = null, this.disableDateFn = null, this.firstDayOfWeek = 1, this.locale = void 0, this.hour12 = "auto", this.step = 15, this.defaultTime = { hour: 0, minute: 0 }, this.placeholder = "", this.showClear = !1, this.disabled = !1, this.invalid = !1, this.errorText = null, this.inputLabel = "Selected date and time", this.dateButtonLabel = "Choose date", this.timeButtonLabel = "Choose time", this.clearLabel = "Clear", this.todayLabel = "Today", this.nowLabel = "Now", this._openPopup = null, this._calendarMonth = null, this.instanceId = `mp-dtp-${++P}`, this.datePopupId = `${this.instanceId}-popup-date`, this.timePopupId = `${this.instanceId}-popup-time`, this.errorId = `${this.instanceId}-error`, this.dateOverlay = new g(this, {
169
+ super(...arguments), this.value = null, this.min = null, this.max = null, this.disableDateFn = null, this.firstDayOfWeek = 1, this.locale = void 0, this.hour12 = "auto", this.step = 15, this.defaultTime = { hour: 0, minute: 0 }, this.placeholder = "", this.showClear = !1, this.disabled = !1, this.invalid = !1, this.errorText = null, this.inputLabel = "Selected date and time", this.dateButtonLabel = "Choose date", this.timeButtonLabel = "Choose time", this.clearLabel = "Clear", this.todayLabel = "Today", this.nowLabel = "Now", this._openPopup = null, this._calendarMonth = null, this.instanceId = `mp-dtp-${++M}`, this.datePopupId = `${this.instanceId}-popup-date`, this.timePopupId = `${this.instanceId}-popup-time`, this.errorId = `${this.instanceId}-error`, this.dateOverlay = new g(this, {
170
170
  anchor: () => this.inputGroupEl ?? this.dateTriggerEl ?? null,
171
171
  trigger: () => this.dateTriggerEl ?? null,
172
172
  panel: () => this.datePopupEl ?? null,
@@ -214,15 +214,13 @@ class o extends y {
214
214
  this.disabled || (e.stopPropagation(), this.clear());
215
215
  }, this.onCalendarSelectedDateChange = (e) => {
216
216
  const t = e.detail;
217
- if (!(t instanceof Date)) return;
218
- const i = this.value !== null && this.value.getFullYear() === t.getFullYear() && this.value.getMonth() === t.getMonth() && this.value.getDate() === t.getDate();
219
- this.updateDatePart(t), i && this.dateOverlay.close();
217
+ t instanceof Date && (e.stopPropagation(), this.updateDatePart(t), this.dateOverlay.close());
220
218
  }, this.onCalendarCurrentMonthChange = (e) => {
221
219
  const t = e.detail;
222
- t instanceof Date && (this._calendarMonth = t);
220
+ t instanceof Date && (e.stopPropagation(), this._calendarMonth = t);
223
221
  }, this.onTimeListSelectedTimeChange = (e) => {
224
222
  const t = e.detail;
225
- t instanceof Date && (this.updateTimePart(t), this.timeOverlay.close());
223
+ t instanceof Date && (e.stopPropagation(), this.updateTimePart(t), this.timeOverlay.close());
226
224
  }, this.onTodayClick = () => {
227
225
  this.todayOutOfRange() || this.updateDatePart(/* @__PURE__ */ new Date());
228
226
  }, this.onNowClick = () => {
@@ -231,7 +229,7 @@ class o extends y {
231
229
  };
232
230
  }
233
231
  static {
234
- this.styles = [C, $];
232
+ this.styles = [T, C];
235
233
  }
236
234
  static {
237
235
  this.properties = {
@@ -241,7 +239,7 @@ class o extends y {
241
239
  disableDateFn: { attribute: !1 },
242
240
  firstDayOfWeek: { attribute: "first-day-of-week", type: Number, reflect: !0 },
243
241
  locale: { attribute: "locale", type: String, reflect: !0 },
244
- hour12: { attribute: "hour12" },
242
+ hour12: { attribute: "hour12", converter: $ },
245
243
  step: { attribute: "step", type: Number, reflect: !0 },
246
244
  defaultTime: { attribute: !1 },
247
245
  placeholder: { attribute: "placeholder", type: String, reflect: !0 },
@@ -358,8 +356,8 @@ class o extends y {
358
356
  }
359
357
  /** `Now`, snapped down to the nearest step — the value that button writes. */
360
358
  roundedNow() {
361
- const e = /* @__PURE__ */ new Date(), t = Math.floor(e.getMinutes() / this.step) * this.step;
362
- return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), t, 0, 0);
359
+ const e = /* @__PURE__ */ new Date(), t = O(this.step), i = Math.floor(e.getMinutes() / t) * t;
360
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), i, 0, 0);
363
361
  }
364
362
  /**
365
363
  * `Today` and `Now` used to write their value with no bound check at all, so
@@ -377,7 +375,7 @@ class o extends y {
377
375
  * min..max", which would be a different question entirely.
378
376
  */
379
377
  nowOutOfRange() {
380
- const e = p(this.roundedNow()), { minMinutes: t, maxMinutes: i } = this.timeBounds();
378
+ const e = h(this.roundedNow()), { minMinutes: t, maxMinutes: i } = this.timeBounds();
381
379
  return t !== null && e < t || i !== null && e > i;
382
380
  }
383
381
  /**
@@ -397,13 +395,13 @@ class o extends y {
397
395
  timeBounds() {
398
396
  const e = this.value ?? /* @__PURE__ */ new Date();
399
397
  return {
400
- minMinutes: this.min && f(e, this.min) ? p(this.min) : null,
401
- maxMinutes: this.max && f(e, this.max) ? p(this.max) : null
398
+ minMinutes: this.min && f(e, this.min) ? h(this.min) : null,
399
+ maxMinutes: this.max && f(e, this.max) ? h(this.max) : null
402
400
  };
403
401
  }
404
402
  /* ---- Render ---- */
405
403
  render() {
406
- const e = this.formatDisplay(), t = this.value !== null, i = this.showClear && t && !this.disabled, r = this._calendarMonth ?? (this.value ? new Date(this.value.getFullYear(), this.value.getMonth(), 1) : /* @__PURE__ */ new Date()), u = this.value ?? null, d = this.value ?? null, h = D(this.errorId, this.errorText, this.invalid), m = this.timeBounds();
404
+ const e = this.formatDisplay(), t = this.value !== null, i = this.showClear && t && !this.disabled, r = this._calendarMonth ?? (this.value ? new Date(this.value.getFullYear(), this.value.getMonth(), 1) : /* @__PURE__ */ new Date()), u = this.value ?? null, d = this.value ?? null, p = D(this.errorId, this.errorText, this.invalid), m = this.timeBounds();
407
405
  return c`
408
406
  <div class="input-group">
409
407
  <input
@@ -413,8 +411,8 @@ class o extends y {
413
411
  aria-readonly="true"
414
412
  aria-label="${this.inputLabel}"
415
413
  aria-invalid="${this.invalid ? "true" : "false"}"
416
- aria-errormessage="${h.id}"
417
- aria-describedby="${h.id}"
414
+ aria-errormessage="${p.id}"
415
+ aria-describedby="${p.id}"
418
416
  .value="${e}"
419
417
  placeholder="${this.placeholder || b}"
420
418
  ?disabled="${this.disabled}"
@@ -425,7 +423,7 @@ class o extends y {
425
423
  aria-label="${this.clearLabel}"
426
424
  ?disabled="${this.disabled}"
427
425
  @click="${this.onClearClick}"
428
- .innerHTML="${M}"
426
+ .innerHTML="${E}"
429
427
  ></button>` : b}
430
428
  <button
431
429
  class="trigger date"
@@ -437,7 +435,7 @@ class o extends y {
437
435
  ?disabled="${this.disabled}"
438
436
  @click="${this.onDateTriggerClick}"
439
437
  @keydown="${this.onDateTriggerKeyDown}"
440
- .innerHTML="${T}"
438
+ .innerHTML="${P}"
441
439
  ></button>
442
440
  <button
443
441
  class="trigger time"
@@ -449,13 +447,15 @@ class o extends y {
449
447
  ?disabled="${this.disabled}"
450
448
  @click="${this.onTimeTriggerClick}"
451
449
  @keydown="${this.onTimeTriggerKeyDown}"
452
- .innerHTML="${x}"
450
+ .innerHTML="${k}"
453
451
  ></button>
454
452
  </div>
455
- ${h.node}
453
+ ${p.node}
456
454
  ${this.liveAnnouncer.template()}
457
455
 
458
456
  <div class="popup popup-date" id="${this.datePopupId}" role="dialog" aria-label="${this.dateButtonLabel}">
457
+ <!-- One listener per popup, on the slot: it sees both the fallback widget
458
+ (a child of the slot) and a slotted consumer widget. -->
459
459
  <slot name="calendar"
460
460
  @selected-date-change="${this.onCalendarSelectedDateChange}"
461
461
  @current-month-change="${this.onCalendarCurrentMonthChange}"
@@ -468,8 +468,6 @@ class o extends y {
468
468
  .max="${this.max}"
469
469
  .firstDayOfWeek="${this.firstDayOfWeek}"
470
470
  .locale="${this.locale}"
471
- @selected-date-change="${this.onCalendarSelectedDateChange}"
472
- @current-month-change="${this.onCalendarCurrentMonthChange}"
473
471
  ></mp-calendar>
474
472
  </slot>
475
473
  <div class="popup-footer">
@@ -492,7 +490,6 @@ class o extends y {
492
490
  .maxMinutes="${m.maxMinutes}"
493
491
  .hour12="${this.hour12}"
494
492
  .locale="${this.locale}"
495
- @selected-time-change="${this.onTimeListSelectedTimeChange}"
496
493
  ></mp-time-list>
497
494
  </slot>
498
495
  <div class="popup-footer">
@@ -187,16 +187,21 @@ class H extends S {
187
187
  (e === "small" || e === "medium" || e === "large") && this._size !== e && (this._size = e, this.setAttribute("size", e), this.requestUpdate());
188
188
  }
189
189
  attributeChangedCallback(e, r, n) {
190
- if (super.attributeChangedCallback(e, r, n), e === "page-numbers" && n) {
191
- const t = n.split(",").map((i) => Number(i.trim())).filter((i) => Number.isFinite(i));
190
+ if (super.attributeChangedCallback(e, r, n), e === "page-numbers") {
191
+ const t = (n ?? "").split(",").filter((i) => i.trim() !== "").map((i) => Number(i.trim())).filter((i) => Number.isFinite(i));
192
192
  this.pageNumbers = t;
193
193
  } else if (e === "selected-page-number") {
194
- const t = Number(n);
194
+ const t = n === null ? 1 : Number(n);
195
195
  Number.isFinite(t) && (this.selectedPageNumber = t);
196
196
  } else if (e === "number-of-boxes") {
197
197
  const t = Number(n);
198
198
  Number.isFinite(t) && (this.numberOfBoxes = t);
199
- } else e === "show-arrows" ? this.showArrows = n !== "false" && n !== null : e === "size" ? (n === "small" || n === "medium" || n === "large") && (this.size = n) : e === "aria-label" && (this._ariaLabel = n ?? "Pagination", this.requestUpdate());
199
+ } else if (e === "show-arrows")
200
+ this.showArrows = n !== "false";
201
+ else if (e === "size") {
202
+ const t = n ?? "medium";
203
+ (t === "small" || t === "medium" || t === "large") && (this.size = t);
204
+ } else e === "aria-label" && (this._ariaLabel = n ?? "Pagination", this.requestUpdate());
200
205
  }
201
206
  /**
202
207
  * Effective TOTAL budget (boxes including arrows). When `numberOfBoxes`
@@ -1,11 +1,11 @@
1
- import { LitElement as i, nothing as r, html as a } from "lit";
2
- import { createRef as d, ref as n } from "lit/directives/ref.js";
3
- import { t as l } from "./mp-toggle-button-eo_aTQtu.mjs";
4
- import { f as c } from "./form-check.styles-B0pxJ6YC.mjs";
5
- import { i as p } from "./invalid-feedback.styles-he0JYrJm.mjs";
6
- import { H as b } from "./host-aria-WSGs7SPQ.mjs";
7
- import { a as _, e as g } from "./error-text-B45eDAt1.mjs";
8
- const o = /* @__PURE__ */ new Set(["radio", "toggle_button"]), h = /* @__PURE__ */ new Set([
1
+ import { LitElement as a, nothing as r, html as n } from "lit";
2
+ import { createRef as d, ref as o } from "lit/directives/ref.js";
3
+ import { t as c } from "./mp-toggle-button-CaS9uYLE.mjs";
4
+ import { f as p } from "./form-check.styles-DqvBnspm.mjs";
5
+ import { i as b } from "./invalid-feedback.styles-he0JYrJm.mjs";
6
+ import { H as _ } from "./host-aria-WSGs7SPQ.mjs";
7
+ import { a as g, e as m } from "./error-text-B45eDAt1.mjs";
8
+ const h = /* @__PURE__ */ new Set(["radio", "toggle_button"]), u = /* @__PURE__ */ new Set([
9
9
  "primary",
10
10
  "secondary",
11
11
  "success",
@@ -23,13 +23,13 @@ const o = /* @__PURE__ */ new Set(["radio", "toggle_button"]), h = /* @__PURE__
23
23
  "outline-light",
24
24
  "outline-dark"
25
25
  ]);
26
- let u = 0;
27
- class m extends i {
26
+ let l = 0;
27
+ class f extends a {
28
28
  constructor() {
29
- super(...arguments), this._type = "radio", this._checked = !1, this._disabled = !1, this._name = null, this._value = null, this._color = "secondary", this._inputLabel = null, this._errorText = null, this.hostAria = new b(this, {
29
+ super(...arguments), this._type = "radio", this._checked = !1, this._disabled = !1, this._name = null, this._value = null, this._color = "secondary", this._inputLabel = null, this._errorText = null, this.hostAria = new _(this, {
30
30
  referenceTarget: () => this._inputRef.value ?? null,
31
- describedByExtras: () => _(this.renderRoot)
32
- }), this._inputId = `mp-radio-${++u}`, this._errorId = `mp-radio-${u}-error`, this._inputRef = d(), this._groupTabIndex = null, this._groupPosInSet = null, this._groupSetSize = null, this.onInputChange = (e) => {
31
+ describedByExtras: () => g(this.renderRoot)
32
+ }), this._inputId = `mp-radio-${++l}`, this._errorId = `mp-radio-${l}-error`, this._inputRef = d(), this._groupTabIndex = null, this._groupPosInSet = null, this._groupSetSize = null, this.onInputChange = (e) => {
33
33
  const t = e.target.checked;
34
34
  this._checked = t, this.reflectBoolean("checked", t), this.dispatchEvent(
35
35
  new CustomEvent("change", {
@@ -41,11 +41,11 @@ class m extends i {
41
41
  };
42
42
  }
43
43
  static {
44
- this.styles = [c, l, p];
44
+ this.styles = [p, c, b];
45
45
  }
46
46
  static {
47
47
  this.shadowRootOptions = {
48
- ...i.shadowRootOptions,
48
+ ...a.shadowRootOptions,
49
49
  delegatesFocus: !0
50
50
  };
51
51
  }
@@ -110,7 +110,7 @@ class m extends i {
110
110
  return this._type;
111
111
  }
112
112
  set type(e) {
113
- !o.has(e) || this._type === e || (this._type = e, this.requestUpdate());
113
+ !h.has(e) || this._type === e || (this._type = e, this.requestUpdate());
114
114
  }
115
115
  get checked() {
116
116
  return this._checked;
@@ -144,7 +144,7 @@ class m extends i {
144
144
  return this._color;
145
145
  }
146
146
  set color(e) {
147
- !h.has(e) || this._color === e || (this._color = e, this.requestUpdate());
147
+ !u.has(e) || this._color === e || (this._color = e, this.requestUpdate());
148
148
  }
149
149
  /**
150
150
  * Roving tab stop, written by an enclosing `<mp-radio-group>`. With
@@ -192,9 +192,11 @@ class m extends i {
192
192
  case "error-text":
193
193
  this._errorText = s, this.requestUpdate();
194
194
  break;
195
- case "type":
196
- s && o.has(s) && (this._type = s, this.requestUpdate());
195
+ case "type": {
196
+ const i = s ?? "radio";
197
+ h.has(i) && (this._type = i, this.requestUpdate());
197
198
  break;
199
+ }
198
200
  case "checked":
199
201
  this._checked = s !== null, this.requestUpdate();
200
202
  break;
@@ -207,9 +209,11 @@ class m extends i {
207
209
  case "value":
208
210
  this._value = s, this.requestUpdate();
209
211
  break;
210
- case "color":
211
- s && h.has(s) && (this._color = s, this.requestUpdate());
212
+ case "color": {
213
+ const i = s ?? "secondary";
214
+ u.has(i) && (this._color = i, this.requestUpdate());
212
215
  break;
216
+ }
213
217
  case "aria-label":
214
218
  this.requestUpdate();
215
219
  break;
@@ -233,10 +237,10 @@ class m extends i {
233
237
  }
234
238
  renderRadio() {
235
239
  const e = this.errorFeedback();
236
- return a`
240
+ return n`
237
241
  <label class="form-check">
238
242
  <input
239
- ${n(this._inputRef)}
243
+ ${o(this._inputRef)}
240
244
  type="radio"
241
245
  class="form-check-input"
242
246
  id=${this._inputId}
@@ -260,13 +264,13 @@ class m extends i {
260
264
  `;
261
265
  }
262
266
  errorFeedback() {
263
- return g(this._errorId, this._errorText, this.hasAttribute("invalid"));
267
+ return m(this._errorId, this._errorText, this.hasAttribute("invalid"));
264
268
  }
265
269
  renderToggleButton() {
266
270
  const e = this.errorFeedback();
267
- return a`
271
+ return n`
268
272
  <input
269
- ${n(this._inputRef)}
273
+ ${o(this._inputRef)}
270
274
  type="radio"
271
275
  class="btn-check"
272
276
  id=${this._inputId}
@@ -294,7 +298,7 @@ class m extends i {
294
298
  t ? this.setAttribute(e, "") : this.removeAttribute(e);
295
299
  }
296
300
  }
297
- typeof customElements < "u" && !customElements.get("mp-radio") && customElements.define("mp-radio", m);
301
+ typeof customElements < "u" && !customElements.get("mp-radio") && customElements.define("mp-radio", f);
298
302
  export {
299
- m as M
303
+ f as M
300
304
  };
@@ -1,12 +1,13 @@
1
- import { unsafeCSS as h, LitElement as d, nothing as o, html as a } from "lit";
2
- import { ifDefined as p } from "lit/directives/if-defined.js";
1
+ import { unsafeCSS as c, LitElement as d, nothing as o, html as a } from "lit";
2
+ import { ifDefined as b } from "lit/directives/if-defined.js";
3
3
  import { createRef as m, ref as g } from "lit/directives/ref.js";
4
4
  import { unsafeHTML as v } from "lit/directives/unsafe-html.js";
5
- import { i as f } from "./invalid-feedback.styles-he0JYrJm.mjs";
6
- import { H as _ } from "./host-aria-WSGs7SPQ.mjs";
7
- import { a as x, e as y } from "./error-text-B45eDAt1.mjs";
8
- import { F as k } from "./form-associated-BR-fUvZ1.mjs";
9
- const w = h(`.form-select {
5
+ import { w as f } from "./color-mode-warning-71FmlzWX.mjs";
6
+ import { i as _ } from "./invalid-feedback.styles-he0JYrJm.mjs";
7
+ import { H as x } from "./host-aria-WSGs7SPQ.mjs";
8
+ import { a as y, e as k } from "./error-text-B45eDAt1.mjs";
9
+ import { F as w } from "./form-associated-BR-fUvZ1.mjs";
10
+ const q = c(`.form-select {
10
11
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
11
12
  display: block;
12
13
  width: 100%;
@@ -63,10 +64,17 @@ const w = h(`.form-select {
63
64
  border-radius: var(--bs-border-radius-lg);
64
65
  }
65
66
 
66
- [data-bs-theme=dark] .form-select {
67
- --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
67
+ @container style(--mp-color-mode: dark) {
68
+ .form-select {
69
+ --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
70
+ }
71
+ }
72
+ @media (forced-colors: active) {
73
+ .form-select {
74
+ appearance: auto;
75
+ background-image: none;
76
+ }
68
77
  }
69
-
70
78
  :host {
71
79
  display: inline-block;
72
80
  }
@@ -94,7 +102,7 @@ const w = h(`.form-select {
94
102
  border-start-end-radius: var(--mp-group-radius-top-end, var(--mp-group-radius-end, var(--mp-box-radius)));
95
103
  border-end-start-radius: var(--mp-group-radius-bottom-start, var(--mp-group-radius-start, var(--mp-box-radius)));
96
104
  border-end-end-radius: var(--mp-group-radius-bottom-end, var(--mp-group-radius-end, var(--mp-box-radius)));
97
- }`), q = h(`@supports (appearance: base-select) {
105
+ }`), A = c(`@supports (appearance: base-select) {
98
106
  :host([rich]) select.form-select {
99
107
  appearance: base-select;
100
108
  background-image: none;
@@ -171,16 +179,16 @@ const w = h(`.form-select {
171
179
  text-overflow: ellipsis;
172
180
  }
173
181
  }`);
174
- function A(c) {
175
- return Array.isArray(c.options);
182
+ function S(h) {
183
+ return Array.isArray(h.options);
176
184
  }
177
185
  const u = /* @__PURE__ */ new Set(["sm", "md", "lg"]);
178
- let S = 0;
179
- class n extends k(d) {
186
+ let O = 0;
187
+ class n extends w(d) {
180
188
  constructor() {
181
- super(...arguments), this._size = "md", this._multiple = !1, this._numberVisible = null, this._disabled = !1, this._value = null, this._inputLabel = null, this._errorText = null, this._errorId = `mp-select-${++S}-error`, this._values = [], this._options = null, this._optionRenderer = null, this._slotOptions = [], this._selectRef = m(), this._slotObserver = null, this.hostAria = new _(this, {
189
+ super(...arguments), this._size = "md", this._multiple = !1, this._numberVisible = null, this._disabled = !1, this._value = null, this._inputLabel = null, this._errorText = null, this._errorId = `mp-select-${++O}-error`, this._values = [], this._options = null, this._optionRenderer = null, this._slotOptions = [], this._selectRef = m(), this._slotObserver = null, this.hostAria = new x(this, {
182
190
  referenceTarget: () => this._selectRef.value ?? null,
183
- describedByExtras: () => x(this.renderRoot)
191
+ describedByExtras: () => y(this.renderRoot)
184
192
  }), this.onSlotChange = (e) => {
185
193
  const s = e.target.assignedElements({ flatten: !0 });
186
194
  this._slotOptions = this.collectSlotItems(s), this.observeSlottedMutations(s), this.requestUpdate();
@@ -196,7 +204,7 @@ class n extends k(d) {
196
204
  };
197
205
  }
198
206
  static {
199
- this.styles = [w, f, q];
207
+ this.styles = [q, _, A];
200
208
  }
201
209
  static {
202
210
  this.shadowRootOptions = {
@@ -335,15 +343,19 @@ class n extends k(d) {
335
343
  }
336
344
  attributeChangedCallback(e, t, s) {
337
345
  switch (super.attributeChangedCallback(e, t, s), e) {
338
- case "size":
339
- s && u.has(s) && (this._size = s, this.requestUpdate());
346
+ case "size": {
347
+ const r = s ?? "md";
348
+ u.has(r) && (this._size = r, this.requestUpdate());
340
349
  break;
350
+ }
341
351
  case "multiple":
342
352
  this._multiple = s !== null, this.requestUpdate();
343
353
  break;
344
- case "number-visible":
345
- this._numberVisible = s == null ? null : Number(s), this.requestUpdate();
354
+ case "number-visible": {
355
+ const r = s == null ? NaN : Number(s);
356
+ this._numberVisible = Number.isFinite(r) ? r : null, this.requestUpdate();
346
357
  break;
358
+ }
347
359
  case "disabled":
348
360
  this._disabled = s !== null, this.requestUpdate();
349
361
  break;
@@ -369,6 +381,9 @@ class n extends k(d) {
369
381
  break;
370
382
  }
371
383
  }
384
+ connectedCallback() {
385
+ super.connectedCallback(), f();
386
+ }
372
387
  disconnectedCallback() {
373
388
  super.disconnectedCallback(), this._slotObserver?.disconnect(), this._slotObserver = null;
374
389
  }
@@ -392,14 +407,14 @@ class n extends k(d) {
392
407
  }
393
408
  }
394
409
  render() {
395
- const e = this._options ?? this._slotOptions, t = this.richActive, s = this._size === "sm" || this._size === "lg" ? `form-select form-select-${this._size}` : "form-select", r = this.getAttribute("aria-label") ?? this._inputLabel, l = y(this._errorId, this._errorText, this.hasAttribute("invalid"));
410
+ const e = this._options ?? this._slotOptions, t = this.richActive, s = this._size === "sm" || this._size === "lg" ? `form-select form-select-${this._size}` : "form-select", r = this.getAttribute("aria-label") ?? this._inputLabel, l = k(this._errorId, this._errorText, this.hasAttribute("invalid"));
396
411
  return a`
397
412
  <select
398
413
  ${g(this._selectRef)}
399
414
  class=${s}
400
415
  ?multiple=${this._multiple}
401
416
  ?disabled=${this._disabled}
402
- size=${p(this._numberVisible ?? void 0)}
417
+ size=${b(this._numberVisible ?? void 0)}
403
418
  aria-label=${r ?? o}
404
419
  aria-invalid=${this.hasAttribute("invalid") ? "true" : o}
405
420
  aria-required=${this.hasAttribute("required") ? "true" : o}
@@ -409,8 +424,8 @@ class n extends k(d) {
409
424
  >
410
425
  ${t ? a`<button type="button"><selectedcontent></selectedcontent></button>` : o}
411
426
  ${e.map(
412
- (i) => A(i) ? a`<optgroup label=${i.label} ?disabled=${!!i.disabled}>
413
- ${i.options.map((b) => this.renderOption(b, t))}
427
+ (i) => S(i) ? a`<optgroup label=${i.label} ?disabled=${!!i.disabled}>
428
+ ${i.options.map((p) => this.renderOption(p, t))}
414
429
  </optgroup>` : this.renderOption(i, t)
415
430
  )}
416
431
  </select>