@mintplayer/web-components 2.2.0 → 2.4.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 (115) hide show
  1. package/a11y/index.mjs +26 -2
  2. package/a11y/src/dismiss-stack.d.ts +25 -0
  3. package/a11y/src/error-text.d.ts +41 -0
  4. package/a11y/src/focus-restore.d.ts +116 -0
  5. package/a11y/src/focus-trap.d.ts +69 -0
  6. package/a11y/src/form-associated.d.ts +48 -0
  7. package/a11y/src/host-aria.d.ts +154 -0
  8. package/a11y/src/index.d.ts +16 -0
  9. package/a11y/src/inert-regions.d.ts +52 -0
  10. package/a11y/src/live-announcer.d.ts +8 -0
  11. package/a11y/src/roving-focus.d.ts +118 -0
  12. package/a11y/src/testing/expect-idref-resolves.d.ts +31 -0
  13. package/a11y/src/testing/index.d.ts +1 -0
  14. package/accordion/index.mjs +180 -174
  15. package/accordion/src/components/mp-accordion.d.ts +18 -13
  16. package/calendar/index.mjs +1 -1
  17. package/calendar/src/mp-calendar.element.d.ts +2 -0
  18. package/carousel/index.mjs +211 -164
  19. package/carousel/src/components/mp-carousel.d.ts +1 -0
  20. package/checkbox/index.mjs +1 -1
  21. package/checkbox/src/components/mp-checkbox.d.ts +59 -1
  22. package/chunks/color-CpFtrIoX.mjs +899 -0
  23. package/chunks/focus-restore-DxuP1Oe2.mjs +94 -0
  24. package/chunks/focus-trap-DTOLJ5bb.mjs +121 -0
  25. package/chunks/form-associated-axmc5sY0.mjs +58 -0
  26. package/chunks/host-aria-WSGs7SPQ.mjs +152 -0
  27. package/chunks/inert-regions-DXCnn1LN.mjs +48 -0
  28. package/chunks/invalid-feedback.styles-he0JYrJm.mjs +11 -0
  29. package/chunks/{live-announcer-CZDTKulf.mjs → live-announcer-Bi0orG4n.mjs} +9 -9
  30. package/chunks/{mp-calendar.element-UC68iDbi.mjs → mp-calendar.element-u6uS31_j.mjs} +136 -105
  31. package/chunks/mp-checkbox-Ph2mMRGz.mjs +312 -0
  32. package/chunks/{mp-datatable-Bfw0KGkV.mjs → mp-datatable-BwTlh9A_.mjs} +265 -103
  33. package/chunks/{mp-pagination-BGxsawFL.mjs → mp-pagination-Dea75mD4.mjs} +25 -22
  34. package/chunks/mp-radio-BjW1HNSc.mjs +300 -0
  35. package/chunks/{mp-select-BDS1-YGn.mjs → mp-select-Ctu-v1-p.mjs} +163 -40
  36. package/chunks/{mp-splitter-C8cGCmac.mjs → mp-splitter-LszuRDbR.mjs} +53 -46
  37. package/chunks/{mp-tab-page-D1b4x-y2.mjs → mp-tab-page-CaCzX1ym.mjs} +46 -45
  38. package/chunks/{mp-timepicker.element-BwEiwX92.mjs → mp-timepicker.element-Bz393NDQ.mjs} +93 -86
  39. package/chunks/{mp-toggle-button-dLZNDUVz.mjs → mp-toggle-button-Kz6sIgBJ.mjs} +131 -37
  40. package/chunks/{mp-treeview-C48F63xb.mjs → mp-treeview-tkWu28iF.mjs} +67 -43
  41. package/chunks/overlay-controller-DPt13i8p.mjs +314 -0
  42. package/chunks/roving-focus-CrL9982a.mjs +129 -0
  43. package/code-snippet/index.mjs +21 -13
  44. package/code-snippet/src/mp-code-snippet.element.d.ts +6 -0
  45. package/datatable/index.mjs +1 -1
  46. package/datatable/src/components/mp-datatable.d.ts +50 -0
  47. package/datatable/src/types/index.d.ts +2 -0
  48. package/datatable/src/types/labels.d.ts +30 -0
  49. package/datepicker/index.mjs +45 -22
  50. package/datepicker/src/mp-datepicker.element.d.ts +30 -0
  51. package/datetime-picker/index.mjs +15 -9
  52. package/dock/index.mjs +365 -209
  53. package/dock/src/components/mint-dock-manager.element.d.ts +63 -3
  54. package/dropdown-menu/index.mjs +135 -90
  55. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +12 -3
  56. package/file-manager/index.mjs +279 -214
  57. package/file-manager/src/components/mp-file-manager.d.ts +22 -0
  58. package/file-manager/src/types/messages.d.ts +9 -0
  59. package/multi-range/index.mjs +26 -10
  60. package/multi-range/src/mint-multi-range.element.d.ts +7 -0
  61. package/navbar/index.mjs +53 -39
  62. package/navbar/src/components/mp-navbar.d.ts +1 -0
  63. package/otp-input/index.mjs +82 -48
  64. package/otp-input/src/mint-otp-input.element.d.ts +31 -3
  65. package/overlay/index.mjs +2 -258
  66. package/overlay/src/overlay-controller.d.ts +64 -4
  67. package/package.json +9 -1
  68. package/pagination/index.mjs +1 -1
  69. package/query-builder/index.mjs +117 -87
  70. package/query-builder/src/model/messages.d.ts +9 -0
  71. package/radio/index.mjs +2 -160
  72. package/radio/src/components/mp-radio.d.ts +58 -3
  73. package/radio-group/index.d.ts +1 -0
  74. package/radio-group/index.mjs +145 -0
  75. package/radio-group/src/components/mp-radio-group.d.ts +52 -0
  76. package/radio-group/src/index.d.ts +1 -0
  77. package/radio-group/src/styles/radio-group.styles.d.ts +2 -0
  78. package/ribbon/index.mjs +316 -304
  79. package/ribbon/src/mp-ribbon.element.d.ts +16 -0
  80. package/scheduler/index.mjs +892 -493
  81. package/scheduler/src/components/mp-scheduler.d.ts +30 -0
  82. package/scheduler/src/input/input-handler.d.ts +2 -0
  83. package/scheduler/src/views/base-view.d.ts +43 -6
  84. package/scheduler/src/views/timeline-view.d.ts +6 -0
  85. package/scheduler-core/index.mjs +73 -70
  86. package/scheduler-core/src/models/index.d.ts +1 -0
  87. package/scheduler-core/src/models/messages.d.ts +69 -0
  88. package/scheduler-core/src/models/options.d.ts +4 -0
  89. package/select/index.mjs +1 -1
  90. package/select/src/components/mp-select.d.ts +60 -3
  91. package/shell/index.mjs +142 -31
  92. package/shell/src/components/mp-shell.d.ts +1 -0
  93. package/signature-pad/index.d.ts +1 -0
  94. package/signature-pad/index.mjs +230 -0
  95. package/signature-pad/src/index.d.ts +2 -0
  96. package/signature-pad/src/mp-signature-pad.element.d.ts +143 -0
  97. package/signature-pad/src/mp-signature-pad.element.template.d.ts +2 -0
  98. package/signature-pad/src/types/signature.d.ts +12 -0
  99. package/splitter/index.mjs +1 -1
  100. package/splitter/src/components/mp-splitter.d.ts +7 -0
  101. package/tab-control/index.mjs +1 -1
  102. package/tile-manager/index.mjs +110 -93
  103. package/timeline/index.mjs +138 -54
  104. package/timeline/src/components/mp-timeline.d.ts +15 -0
  105. package/timepicker/index.mjs +1 -1
  106. package/timepicker/src/mp-time-list.element.d.ts +13 -4
  107. package/timepicker/src/mp-timepicker.element.d.ts +29 -0
  108. package/toggle-button/index.mjs +1 -1
  109. package/toggle-button/src/components/mp-toggle-button.d.ts +32 -1
  110. package/tree-select/index.mjs +233 -121
  111. package/tree-select/src/components/mp-tree-select.d.ts +37 -0
  112. package/treeview/index.mjs +1 -1
  113. package/treeview/src/components/mp-treeview.d.ts +10 -1
  114. package/chunks/color-CyamnJnn.mjs +0 -847
  115. package/chunks/mp-checkbox-BokLL7BS.mjs +0 -211
@@ -37,6 +37,7 @@ export declare class MpCarousel extends LitElement {
37
37
  connectedCallback(): void;
38
38
  disconnectedCallback(): void;
39
39
  protected firstUpdated(): void;
40
+ protected updated(): void;
40
41
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
41
42
  /** Committed slide index. Setting it jumps without animation. */
42
43
  get index(): number;
@@ -1,4 +1,4 @@
1
- import { M as p } from "../chunks/mp-checkbox-BokLL7BS.mjs";
1
+ import { M as p } from "../chunks/mp-checkbox-Ph2mMRGz.mjs";
2
2
  export {
3
3
  p as MpCheckbox
4
4
  };
@@ -6,6 +6,7 @@ export interface CheckboxChangeEventDetail {
6
6
  indeterminate: boolean;
7
7
  value: string | null;
8
8
  }
9
+ declare const MpCheckbox_base: typeof LitElement & (new (...args: any[]) => import('@mintplayer/web-components/a11y').FormAssociatedElement);
9
10
  /**
10
11
  * `<mp-checkbox>` — a Bootstrap-styled checkbox with three visual variants
11
12
  * via the `type` attribute:
@@ -25,7 +26,14 @@ export interface CheckboxChangeEventDetail {
25
26
  *
26
27
  * Emits `change` with `detail: { checked, indeterminate, value }`.
27
28
  */
28
- export declare class MpCheckbox extends LitElement {
29
+ /**
30
+ * Form association (Phase F, decision D5): the mixin owns the internals
31
+ * plumbing; this class supplies the checkbox value shape. This is what makes
32
+ * the previously-dead `name` attribute actually submit, and what lets a
33
+ * `<fieldset disabled>` disable the control without a defeatable attribute
34
+ * (spike 0.3a).
35
+ */
36
+ export declare class MpCheckbox extends MpCheckbox_base {
29
37
  static styles: import('lit').CSSResult[];
30
38
  static shadowRootOptions: {
31
39
  delegatesFocus: boolean;
@@ -43,8 +51,52 @@ export declare class MpCheckbox extends LitElement {
43
51
  private _name;
44
52
  private _value;
45
53
  private _color;
54
+ private _inputLabel;
55
+ private _errorText;
56
+ /**
57
+ * Tier-2 naming. No `role` is passed: the inner <input> is the real control and
58
+ * already carries one, so a role on the host would announce the checkbox twice.
59
+ * References therefore target that <input> rather than the host's internals.
60
+ */
61
+ private readonly hostAria;
46
62
  private readonly _inputId;
63
+ private readonly _errorId;
47
64
  private readonly _inputRef;
65
+ /**
66
+ * Optional override for the inner `<input>`'s accessible name, as
67
+ * `inputLabel` / `input-label`. Standardised on this name across the library
68
+ * rather than `label`, because the value lands on the control *inside* the shadow
69
+ * root.
70
+ *
71
+ * **Usually unnecessary — do not reach for it by default.** The shadow `<label>`
72
+ * wraps the `<input>` and contains the `<slot>`, and accessible-name computation
73
+ * walks the *flat* tree, so slotted light-DOM text already names the control:
74
+ * `<mp-checkbox>Accept terms</mp-checkbox>` computes the name "Accept terms" with
75
+ * nothing else passed. Verified against Chromium's real accessibility tree in
76
+ * the slotted-label spike (verdict in docs/prd/screen-reader-accessibility-plan.md) — an earlier version of this comment claimed the
77
+ * opposite, on the assumption that the slot boundary broke the association. It
78
+ * does not.
79
+ *
80
+ * So this exists for the two cases that genuinely need it: a checkbox with **no**
81
+ * visible text, and a name that must differ from the visible text. When both are
82
+ * present this wins, which is the right precedence for an override.
83
+ */
84
+ get inputLabel(): string | null;
85
+ set inputLabel(value: string | null);
86
+ /**
87
+ * Validation message, as `errorText` / `error-text`. Rendered as a
88
+ * `.invalid-feedback` node inside the shadow root and referenced from the inner
89
+ * `<input>` by `aria-errormessage` **and** `aria-describedby` — but only while
90
+ * `invalid` is set, because `aria-errormessage` means nothing on a control that
91
+ * is not `aria-invalid`.
92
+ *
93
+ * Text rather than a node because the alternative does not work: a consumer's
94
+ * own `<small id="…">` lives outside this shadow root, and an IDREF from the
95
+ * inner input cannot reach it. On the Angular side `BsControlValidityDirective`
96
+ * fills this in from `NgControl.errors`.
97
+ */
98
+ get errorText(): string | null;
99
+ set errorText(value: string | null);
48
100
  get type(): MpCheckboxType;
49
101
  set type(value: MpCheckboxType);
50
102
  get checked(): boolean;
@@ -63,7 +115,13 @@ export declare class MpCheckbox extends LitElement {
63
115
  render(): TemplateResult;
64
116
  protected updated(): void;
65
117
  private renderCheckOrSwitch;
118
+ private errorFeedback;
66
119
  private renderToggleButton;
67
120
  private reflectBoolean;
121
+ formValue(): string | null;
122
+ formReset(): void;
123
+ formRestore(state: string | FormData | File | null): void;
124
+ formValidityAnchor(): HTMLElement | null;
68
125
  private onInputChange;
69
126
  }
127
+ export {};