@voidable/ui 0.6.0 → 0.8.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 (252) hide show
  1. package/README.md +168 -9
  2. package/dist/angular/index.d.ts +20 -0
  3. package/dist/angular/index.js +78 -0
  4. package/dist/autoloader-core.d.ts +45 -0
  5. package/dist/autoloader-table.generated.d.ts +5 -0
  6. package/dist/autoloader.d.ts +13 -0
  7. package/dist/autoloader.js +229 -0
  8. package/dist/base.d.ts +173 -2
  9. package/dist/base.js +2 -9
  10. package/dist/chunks/base-CMruMbxC.js +824 -0
  11. package/dist/chunks/{decorate-DKuCkHK4.js → decorate-CaYbmmmm.js} +1 -1
  12. package/dist/chunks/disclosure-Bj_49GcC.js +23 -0
  13. package/dist/chunks/dismiss-Drsy_dE5.js +37 -0
  14. package/dist/chunks/form-control-C0vH6gii.js +300 -0
  15. package/dist/chunks/keyboard-MQpfTX5I.js +46 -0
  16. package/dist/chunks/keyboard-activation-CV0m4hkn.js +29 -0
  17. package/dist/chunks/modal-D_YVy2vg.js +71 -0
  18. package/dist/chunks/overlay-BywGMcDW.js +467 -0
  19. package/dist/chunks/parts-D30c8OoG.js +229 -0
  20. package/dist/chunks/{shape-DmgCwYvY.js → shape-C_LW7EjG.js} +12 -4
  21. package/dist/components/accordion.d.ts +38 -10
  22. package/dist/components/accordion.js +52 -54
  23. package/dist/components/action-input.d.ts +64 -6
  24. package/dist/components/action-input.js +85 -42
  25. package/dist/components/alert.d.ts +24 -10
  26. package/dist/components/alert.js +27 -28
  27. package/dist/components/avatar.d.ts +8 -2
  28. package/dist/components/avatar.js +4 -4
  29. package/dist/components/badge.d.ts +8 -3
  30. package/dist/components/badge.js +3 -3
  31. package/dist/components/banner.d.ts +21 -10
  32. package/dist/components/banner.js +28 -28
  33. package/dist/components/bar-chart.d.ts +30 -6
  34. package/dist/components/bar-chart.js +29 -39
  35. package/dist/components/breadcrumbs.d.ts +19 -6
  36. package/dist/components/breadcrumbs.js +17 -23
  37. package/dist/components/button.d.ts +64 -10
  38. package/dist/components/button.js +71 -27
  39. package/dist/components/calendar.d.ts +65 -10
  40. package/dist/components/calendar.js +158 -107
  41. package/dist/components/card.d.ts +14 -9
  42. package/dist/components/card.js +9 -23
  43. package/dist/components/carousel.d.ts +65 -14
  44. package/dist/components/carousel.js +85 -94
  45. package/dist/components/charts/scale.d.ts +0 -1
  46. package/dist/components/charts/shape.d.ts +0 -1
  47. package/dist/components/checkbox-group.d.ts +38 -5
  48. package/dist/components/checkbox-group.js +61 -20
  49. package/dist/components/checkbox.d.ts +53 -7
  50. package/dist/components/checkbox.js +66 -29
  51. package/dist/components/collapsible.d.ts +29 -9
  52. package/dist/components/collapsible.js +43 -45
  53. package/dist/components/color-picker.d.ts +20 -4
  54. package/dist/components/color-picker.js +36 -30
  55. package/dist/components/combobox.d.ts +84 -10
  56. package/dist/components/combobox.js +142 -45
  57. package/dist/components/compose-input.d.ts +8 -1
  58. package/dist/components/compose-input.js +10 -4
  59. package/dist/components/dialog.d.ts +24 -20
  60. package/dist/components/dialog.js +8 -57
  61. package/dist/components/divider.d.ts +8 -1
  62. package/dist/components/divider.js +4 -4
  63. package/dist/components/donut-chart.d.ts +28 -5
  64. package/dist/components/donut-chart.js +55 -54
  65. package/dist/components/drawer.d.ts +19 -18
  66. package/dist/components/drawer.js +9 -53
  67. package/dist/components/dropdown-menu.d.ts +62 -7
  68. package/dist/components/dropdown-menu.js +125 -34
  69. package/dist/components/editable.d.ts +37 -3
  70. package/dist/components/editable.js +45 -24
  71. package/dist/components/error-fallback.d.ts +36 -5
  72. package/dist/components/error-fallback.js +74 -24
  73. package/dist/components/field.d.ts +38 -4
  74. package/dist/components/field.js +63 -21
  75. package/dist/components/file-upload.d.ts +23 -2
  76. package/dist/components/file-upload.js +48 -25
  77. package/dist/components/gauge.d.ts +48 -9
  78. package/dist/components/gauge.js +57 -55
  79. package/dist/components/hamburger.d.ts +19 -4
  80. package/dist/components/hamburger.js +29 -20
  81. package/dist/components/hover-card.d.ts +40 -14
  82. package/dist/components/hover-card.js +77 -60
  83. package/dist/components/indicator.d.ts +18 -7
  84. package/dist/components/indicator.js +17 -19
  85. package/dist/components/input.d.ts +70 -5
  86. package/dist/components/input.js +84 -21
  87. package/dist/components/line-chart.d.ts +27 -5
  88. package/dist/components/line-chart.js +19 -21
  89. package/dist/components/list.d.ts +10 -1
  90. package/dist/components/list.js +4 -4
  91. package/dist/components/menu.d.ts +67 -21
  92. package/dist/components/menu.js +117 -116
  93. package/dist/components/multiselect.d.ts +108 -13
  94. package/dist/components/multiselect.js +207 -70
  95. package/dist/components/nav-bar.d.ts +12 -7
  96. package/dist/components/nav-bar.js +12 -22
  97. package/dist/components/nav-menu.d.ts +52 -12
  98. package/dist/components/nav-menu.js +69 -71
  99. package/dist/components/number-input.d.ts +76 -8
  100. package/dist/components/number-input.js +117 -51
  101. package/dist/components/pagination.d.ts +19 -1
  102. package/dist/components/pagination.js +69 -8
  103. package/dist/components/panel.d.ts +16 -8
  104. package/dist/components/panel.js +21 -21
  105. package/dist/components/pin-input.d.ts +41 -4
  106. package/dist/components/pin-input.js +45 -27
  107. package/dist/components/popover.d.ts +29 -11
  108. package/dist/components/popover.js +48 -36
  109. package/dist/components/progress.d.ts +7 -3
  110. package/dist/components/progress.js +4 -4
  111. package/dist/components/radio-group.d.ts +30 -5
  112. package/dist/components/radio-group.js +56 -19
  113. package/dist/components/radio.d.ts +47 -7
  114. package/dist/components/radio.js +68 -29
  115. package/dist/components/scroll-area.d.ts +8 -5
  116. package/dist/components/scroll-area.js +19 -20
  117. package/dist/components/segmented-control.d.ts +52 -8
  118. package/dist/components/segmented-control.js +67 -37
  119. package/dist/components/select.d.ts +59 -12
  120. package/dist/components/select.js +97 -47
  121. package/dist/components/sidebar.d.ts +22 -3
  122. package/dist/components/sidebar.js +21 -11
  123. package/dist/components/skeleton.d.ts +5 -2
  124. package/dist/components/skeleton.js +5 -5
  125. package/dist/components/slider.d.ts +27 -5
  126. package/dist/components/slider.js +30 -18
  127. package/dist/components/spinner.d.ts +6 -2
  128. package/dist/components/spinner.js +4 -4
  129. package/dist/components/stat.d.ts +21 -4
  130. package/dist/components/stat.js +8 -4
  131. package/dist/components/status-dot.d.ts +4 -1
  132. package/dist/components/status-dot.js +4 -4
  133. package/dist/components/stepper.d.ts +5 -1
  134. package/dist/components/stepper.js +3 -3
  135. package/dist/components/switch.d.ts +24 -5
  136. package/dist/components/switch.js +38 -20
  137. package/dist/components/table.d.ts +51 -2
  138. package/dist/components/table.js +158 -9
  139. package/dist/components/tabs.d.ts +49 -17
  140. package/dist/components/tabs.js +86 -55
  141. package/dist/components/tag.d.ts +17 -7
  142. package/dist/components/tag.js +19 -21
  143. package/dist/components/tags-input.d.ts +33 -4
  144. package/dist/components/tags-input.js +41 -31
  145. package/dist/components/textarea.d.ts +61 -5
  146. package/dist/components/textarea.js +59 -22
  147. package/dist/components/toast.d.ts +89 -15
  148. package/dist/components/toast.js +106 -31
  149. package/dist/components/toggle-group.d.ts +30 -3
  150. package/dist/components/toggle-group.js +44 -17
  151. package/dist/components/toggle.d.ts +25 -4
  152. package/dist/components/toggle.js +29 -19
  153. package/dist/components/tooltip.d.ts +31 -12
  154. package/dist/components/tooltip.js +63 -29
  155. package/dist/components.json +1518 -0
  156. package/dist/custom-elements.json +31817 -0
  157. package/dist/dev/index.d.ts +40 -0
  158. package/dist/dev/rules.d.ts +46 -0
  159. package/dist/dev/table.generated.d.ts +8 -0
  160. package/dist/dev/types.d.ts +113 -0
  161. package/dist/dev.js +3364 -0
  162. package/dist/disclosure.d.ts +30 -0
  163. package/dist/dismiss.d.ts +20 -0
  164. package/dist/form-control.d.ts +92 -0
  165. package/dist/index.d.ts +5 -4
  166. package/dist/index.js +24 -24
  167. package/dist/keyboard-activation.d.ts +31 -0
  168. package/dist/keyboard.d.ts +32 -0
  169. package/dist/modal.d.ts +44 -0
  170. package/dist/overlay.d.ts +249 -0
  171. package/dist/parts.d.ts +171 -0
  172. package/dist/projection.d.ts +370 -0
  173. package/dist/types/elements.d.ts +648 -0
  174. package/dist/types/react.d.ts +163 -0
  175. package/dist/types/solid.d.ts +164 -0
  176. package/dist/types/solid2.d.ts +161 -0
  177. package/dist/types/svelte.d.ts +154 -0
  178. package/dist/types/vue.d.ts +156 -0
  179. package/dist/vscode.html-custom-data.json +6004 -0
  180. package/dist/web-types.json +8365 -0
  181. package/package.json +113 -25
  182. package/dist/base.d.ts.map +0 -1
  183. package/dist/components/accordion.d.ts.map +0 -1
  184. package/dist/components/action-input.d.ts.map +0 -1
  185. package/dist/components/alert.d.ts.map +0 -1
  186. package/dist/components/avatar.d.ts.map +0 -1
  187. package/dist/components/badge.d.ts.map +0 -1
  188. package/dist/components/banner.d.ts.map +0 -1
  189. package/dist/components/bar-chart.d.ts.map +0 -1
  190. package/dist/components/breadcrumbs.d.ts.map +0 -1
  191. package/dist/components/button.d.ts.map +0 -1
  192. package/dist/components/calendar.d.ts.map +0 -1
  193. package/dist/components/card.d.ts.map +0 -1
  194. package/dist/components/carousel.d.ts.map +0 -1
  195. package/dist/components/charts/scale.d.ts.map +0 -1
  196. package/dist/components/charts/shape.d.ts.map +0 -1
  197. package/dist/components/checkbox-group.d.ts.map +0 -1
  198. package/dist/components/checkbox.d.ts.map +0 -1
  199. package/dist/components/collapsible.d.ts.map +0 -1
  200. package/dist/components/color-picker.d.ts.map +0 -1
  201. package/dist/components/combobox.d.ts.map +0 -1
  202. package/dist/components/compose-input.d.ts.map +0 -1
  203. package/dist/components/dialog.d.ts.map +0 -1
  204. package/dist/components/divider.d.ts.map +0 -1
  205. package/dist/components/donut-chart.d.ts.map +0 -1
  206. package/dist/components/drawer.d.ts.map +0 -1
  207. package/dist/components/dropdown-menu.d.ts.map +0 -1
  208. package/dist/components/editable.d.ts.map +0 -1
  209. package/dist/components/error-fallback.d.ts.map +0 -1
  210. package/dist/components/field.d.ts.map +0 -1
  211. package/dist/components/file-upload.d.ts.map +0 -1
  212. package/dist/components/gauge.d.ts.map +0 -1
  213. package/dist/components/hamburger.d.ts.map +0 -1
  214. package/dist/components/hover-card.d.ts.map +0 -1
  215. package/dist/components/indicator.d.ts.map +0 -1
  216. package/dist/components/input.d.ts.map +0 -1
  217. package/dist/components/line-chart.d.ts.map +0 -1
  218. package/dist/components/list.d.ts.map +0 -1
  219. package/dist/components/menu.d.ts.map +0 -1
  220. package/dist/components/multiselect.d.ts.map +0 -1
  221. package/dist/components/nav-bar.d.ts.map +0 -1
  222. package/dist/components/nav-menu.d.ts.map +0 -1
  223. package/dist/components/number-input.d.ts.map +0 -1
  224. package/dist/components/pagination.d.ts.map +0 -1
  225. package/dist/components/panel.d.ts.map +0 -1
  226. package/dist/components/pin-input.d.ts.map +0 -1
  227. package/dist/components/popover.d.ts.map +0 -1
  228. package/dist/components/progress.d.ts.map +0 -1
  229. package/dist/components/radio-group.d.ts.map +0 -1
  230. package/dist/components/radio.d.ts.map +0 -1
  231. package/dist/components/scroll-area.d.ts.map +0 -1
  232. package/dist/components/segmented-control.d.ts.map +0 -1
  233. package/dist/components/select.d.ts.map +0 -1
  234. package/dist/components/sidebar.d.ts.map +0 -1
  235. package/dist/components/skeleton.d.ts.map +0 -1
  236. package/dist/components/slider.d.ts.map +0 -1
  237. package/dist/components/spinner.d.ts.map +0 -1
  238. package/dist/components/stat.d.ts.map +0 -1
  239. package/dist/components/status-dot.d.ts.map +0 -1
  240. package/dist/components/stepper.d.ts.map +0 -1
  241. package/dist/components/switch.d.ts.map +0 -1
  242. package/dist/components/table.d.ts.map +0 -1
  243. package/dist/components/tabs.d.ts.map +0 -1
  244. package/dist/components/tag.d.ts.map +0 -1
  245. package/dist/components/tags-input.d.ts.map +0 -1
  246. package/dist/components/textarea.d.ts.map +0 -1
  247. package/dist/components/toast.d.ts.map +0 -1
  248. package/dist/components/toggle-group.d.ts.map +0 -1
  249. package/dist/components/toggle.d.ts.map +0 -1
  250. package/dist/components/tooltip.d.ts.map +0 -1
  251. package/dist/index.d.ts.map +0 -1
  252. /package/dist/chunks/{scale-BFZNL3Ss.js → scale-_ccSuoYg.js} +0 -0
@@ -1,56 +1,100 @@
1
- import { VoidElement as e } from "../base.js";
2
- import { t } from "../chunks/decorate-DKuCkHK4.js";
3
- import { property as n } from "lit/decorators.js";
1
+ import { t as e } from "../chunks/base-CMruMbxC.js";
2
+ import { t } from "../chunks/decorate-CaYbmmmm.js";
3
+ import { t as n } from "../chunks/keyboard-activation-CV0m4hkn.js";
4
+ import { i as r, r as i } from "../chunks/form-control-C0vH6gii.js";
5
+ import { property as a } from "lit/decorators.js";
4
6
  //#region src/components/button.ts
5
- var r = class extends e {
6
- static {
7
- this.formAssociated = !0;
8
- }
9
- constructor() {
10
- super(), this.variant = "outline", this.color = "default", this.disabled = !1, this.type = "button", this.size = "md", this._internals = null, this._handleClick = (e) => {
11
- if (this.disabled) {
12
- e.stopImmediatePropagation();
7
+ var o = class extends e {
8
+ constructor(...e) {
9
+ super(...e), this.variant = "outline", this.color = "default", this.disabled = !1, this.type = "button", this.size = "md", this._unwatch = null, this._inert = null, this._observer = null, this._syncQueued = !1, this._activation = new n(this, {
10
+ disabled: () => this.formDisabled,
11
+ enter: () => !this._control,
12
+ space: () => !this._control
13
+ }), this._blockDisabledControl = (e) => {
14
+ e.target === this || !this.formDisabled || !this._control || (e.preventDefault(), e.stopImmediatePropagation());
15
+ }, this._handleClick = (e) => {
16
+ if (this.formDisabled) {
17
+ e.preventDefault(), e.stopImmediatePropagation();
13
18
  return;
14
19
  }
15
20
  this.type === "submit" ? this._form?.requestSubmit() : this.type === "reset" && this._form?.reset(), this.dispatchEvent(new CustomEvent("void-click", {
16
21
  bubbles: !0,
17
22
  composed: !0
18
23
  }));
19
- }, this._handleKeydown = (e) => {
20
- (e.key === "Enter" || e.key === " ") && !this.disabled && (e.preventDefault(), this._handleClick(e));
21
24
  };
22
- try {
23
- this._internals = this.attachInternals();
24
- } catch {}
25
+ }
26
+ get _control() {
27
+ return this.querySelector(":scope > a[href], :scope > button");
25
28
  }
26
29
  get _form() {
27
- return this._internals?.form ?? this.closest("form");
30
+ return this.closest("form");
28
31
  }
29
32
  connectedCallback() {
30
- super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("tabindex", "0"), this.setAttribute("aria-disabled", String(this.disabled)), this.addEventListener("click", this._handleClick), this.addEventListener("keydown", this._handleKeydown);
33
+ super.connectedCallback(), this.addEventListener("click", this._handleClick), this.addEventListener("click", this._blockDisabledControl, !0), this._syncDisabledState(this.formDisabled), this._unwatch = r(this, () => this._syncDisabledState(this.formDisabled)), this._observer ??= new MutationObserver((e) => {
34
+ e.some((e) => e.type === "childList" || e.target !== this) && this._requestSync();
35
+ }), this._observer.observe(this, {
36
+ childList: !0,
37
+ subtree: !0,
38
+ attributes: !0,
39
+ attributeFilter: [
40
+ "href",
41
+ "aria-disabled",
42
+ "tabindex",
43
+ "disabled"
44
+ ]
45
+ });
31
46
  }
32
47
  disconnectedCallback() {
33
- super.disconnectedCallback(), this.removeEventListener("click", this._handleClick), this.removeEventListener("keydown", this._handleKeydown);
48
+ super.disconnectedCallback(), this.removeEventListener("click", this._handleClick), this.removeEventListener("click", this._blockDisabledControl, !0), this._unwatch?.(), this._unwatch = null, this._observer?.disconnect();
34
49
  }
35
50
  updated(e) {
36
- e.has("disabled") && (this.setAttribute("aria-disabled", String(this.disabled)), this.setAttribute("tabindex", this.disabled ? "-1" : "0"));
51
+ e.has("disabled") && this._syncDisabledState(this.formDisabled);
52
+ }
53
+ get formDisabled() {
54
+ return this.disabled || i(this);
55
+ }
56
+ _requestSync() {
57
+ this._syncQueued || (this._syncQueued = !0, queueMicrotask(() => {
58
+ this._syncQueued = !1, this.isConnected && this._syncDisabledState(this.formDisabled);
59
+ }));
60
+ }
61
+ _syncDisabledState(e) {
62
+ let t = this._control;
63
+ if (t) {
64
+ this.setHostAttribute("role", null), this.setHostAttribute("tabindex", null), this.setHostAttribute("aria-disabled", null), (!e || this._inert?.el !== t) && this._release(), e && this._disableControl(t);
65
+ return;
66
+ }
67
+ this._release(), this.setHostAttribute("role", "button"), this.setHostAttribute("aria-disabled", e ? "true" : null), this.setHostAttribute("tabindex", e ? "-1" : "0");
68
+ }
69
+ _disableControl(e) {
70
+ let t = this._inert?.el === e ? this._inert : {
71
+ el: e,
72
+ aria: !1,
73
+ tabindex: !1,
74
+ disabled: !1
75
+ };
76
+ e instanceof HTMLButtonElement ? e.disabled || (e.disabled = !0, t.disabled = !0) : (e.hasAttribute("aria-disabled") || (e.setAttribute("aria-disabled", "true"), t.aria = !0), e.hasAttribute("tabindex") || (e.setAttribute("tabindex", "-1"), t.tabindex = !0)), this._inert = t;
77
+ }
78
+ _release() {
79
+ let e = this._inert;
80
+ e && (this._inert = null, e.el instanceof HTMLButtonElement ? e.disabled && (e.el.disabled = !1) : (e.aria && e.el.removeAttribute("aria-disabled"), e.tabindex && e.el.removeAttribute("tabindex")));
37
81
  }
38
82
  };
39
- t([n({
83
+ t([a({
40
84
  type: String,
41
85
  reflect: !0
42
- })], r.prototype, "variant", void 0), t([n({
86
+ })], o.prototype, "variant", void 0), t([a({
43
87
  type: String,
44
88
  reflect: !0
45
- })], r.prototype, "color", void 0), t([n({
89
+ })], o.prototype, "color", void 0), t([a({
46
90
  type: Boolean,
47
91
  reflect: !0
48
- })], r.prototype, "disabled", void 0), t([n({
92
+ })], o.prototype, "disabled", void 0), t([a({
49
93
  type: String,
50
94
  reflect: !0
51
- })], r.prototype, "type", void 0), t([n({
95
+ })], o.prototype, "type", void 0), t([a({
52
96
  type: String,
53
97
  reflect: !0
54
- })], r.prototype, "size", void 0), customElements.get("void-button") || customElements.define("void-button", r);
98
+ })], o.prototype, "size", void 0), customElements.get("void-button") || customElements.define("void-button", o);
55
99
  //#endregion
56
- export { r as VoidButton };
100
+ export { o as VoidButton };
@@ -1,12 +1,27 @@
1
1
  import { VoidElement } from '../base.js';
2
+ import { OverlayController } from '../overlay.js';
3
+ declare const VoidCalendar_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
2
4
  /** Date selection for booking flows, scheduling UIs, and form fields with locale-aware formatting and min/max constraints. */
3
- export declare class VoidCalendar extends VoidElement {
5
+ export declare class VoidCalendar extends VoidCalendar_base {
6
+ /**
7
+ * Selected date as an ISO `YYYY-MM-DD` string. Empty means no selection. It is what the form submits
8
+ * and the reset target; picking a day updates it and fires `void-change`.
9
+ */
4
10
  value: string;
11
+ /** Earliest selectable date, as `YYYY-MM-DD`. Earlier days are disabled. */
5
12
  min: string;
13
+ /** Latest selectable date, as `YYYY-MM-DD`. Later days are disabled. */
6
14
  max: string;
15
+ /** Stop the calendar reacting and exclude the value from the form submission. */
7
16
  disabled: boolean;
17
+ /** Size step: `sm`, `md` (default) or `lg`. */
8
18
  size: 'sm' | 'md' | 'lg';
19
+ /**
20
+ * BCP 47 language tag for month and weekday names and the long date announced for each day, such as
21
+ * `de-DE`. Defaults to `en-US`.
22
+ */
9
23
  locale: string;
24
+ /** Day the week starts on, as a number from 0 (Sunday, the default) to 6 (Saturday). Use 1 for Monday. */
10
25
  firstDay: number;
11
26
  private _viewYear;
12
27
  private _viewMonth;
@@ -20,6 +35,7 @@ export declare class VoidCalendar extends VoidElement {
20
35
  private _syncViewToValue;
21
36
  render(): import('lit').TemplateResult<1>;
22
37
  private _renderDays;
38
+ private _formatFullDate;
23
39
  private _getDayNames;
24
40
  private _getMonthName;
25
41
  private _buildDayCells;
@@ -35,6 +51,8 @@ export declare class VoidCalendar extends VoidElement {
35
51
  private _showMonths;
36
52
  private _showYears;
37
53
  private _pickMonth;
54
+ /** Move the roving-tabindex day into the visible month, keeping the day-of-month where possible. */
55
+ private _syncFocusToView;
38
56
  private _pickYear;
39
57
  private _selectDate;
40
58
  private _onDayKeydown;
@@ -44,27 +62,64 @@ declare global {
44
62
  'void-calendar': VoidCalendar;
45
63
  }
46
64
  }
47
- /** Input-anchored date picker that combines a text field with a VoidCalendar dropdown for form date selection. */
48
- export declare class VoidDatePicker extends VoidElement {
65
+ declare const VoidDatePicker_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
66
+ /**
67
+ * Input-anchored date picker that combines a text field with a VoidCalendar dropdown for form date selection.
68
+ *
69
+ * The calendar opens in a non-modal popup dialog in the top layer, placed under the input with CSS anchor
70
+ * positioning (flipping above near the bottom of the viewport). A click on the field opens it and leaves focus
71
+ * in the field (ArrowDown then moves into the calendar); the calendar button, Enter, Space or ArrowDown on the
72
+ * field open it with focus on the selected (or current) day. Choosing a day, Escape, or a press outside closes
73
+ * it and focus returns to the input.
74
+ *
75
+ * @fires {CustomEvent<{ reason: 'trigger' | 'focus' | 'keyboard' | 'api' }>} void-open - The calendar popup
76
+ * opened: `trigger` from the calendar button, `focus` from a click on the field, `keyboard` from a key.
77
+ * @fires {CustomEvent<{ reason: 'trigger' | 'select' | 'escape' | 'outside' | 'blur' | 'parent' | 'api' }>} void-close -
78
+ * The calendar popup is closing. Cancelable when the user caused it.
79
+ */
80
+ export declare class VoidDatePicker extends VoidDatePicker_base {
81
+ /** The host's `aria-label` / `aria-labelledby` name the inner control. */
82
+ static labelTarget: string;
83
+ /**
84
+ * Selected date as an ISO `YYYY-MM-DD` string, whatever `format` shows. It is what the form submits
85
+ * and the reset target.
86
+ */
49
87
  value: string;
88
+ /** Earliest selectable date, as `YYYY-MM-DD`. */
50
89
  min: string;
90
+ /** Latest selectable date, as `YYYY-MM-DD`. */
51
91
  max: string;
92
+ /** Stop the field and its calendar reacting and exclude the value from the form submission. */
52
93
  disabled: boolean;
94
+ /** Size step: `sm`, `md` (default) or `lg`. */
53
95
  size: 'sm' | 'md' | 'lg';
96
+ /**
97
+ * BCP 47 language tag for the calendar's month and weekday names, such as `de-DE`. Defaults to
98
+ * `en-US`. It does not change `format`.
99
+ */
54
100
  locale: string;
101
+ /** Day the calendar week starts on, as a number from 0 (Sunday, the default) to 6 (Saturday). */
55
102
  firstDay: number;
103
+ /** Whether the calendar dropdown is showing. Clicking the field or button toggles it; Escape closes it. */
56
104
  open: boolean;
105
+ /** Hint shown in the field while no date is chosen. Defaults to `Select date`. */
57
106
  placeholder: string;
107
+ /**
108
+ * How the chosen date is written in the field, using `YYYY`, `MM` and `DD`. Defaults to `MM/DD/YYYY`.
109
+ * Display only; the value stays `YYYY-MM-DD`.
110
+ */
58
111
  format: string;
59
- color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
60
- connectedCallback(): void;
61
- disconnectedCallback(): void;
62
- updated(changed: Map<string, unknown>): void;
112
+ /** Status colour of the field: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`. */
113
+ color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
114
+ /** The calendar popup, controlled by the input (APG date picker combobox). */
115
+ private readonly _dropdownId;
116
+ protected readonly _overlay: OverlayController;
117
+ /** Focus the calendar's roving day once it has rendered. */
118
+ private _focusDay;
63
119
  render(): import('lit').TemplateResult<1>;
64
120
  private _toggle;
121
+ private _onInputClick;
65
122
  private _onCalendarChange;
66
- private _onDocumentClick;
67
- private _onDocumentKeydown;
68
123
  private _onInputKeydown;
69
124
  }
70
125
  declare global {
@@ -72,4 +127,4 @@ declare global {
72
127
  'void-date-picker': VoidDatePicker;
73
128
  }
74
129
  }
75
- //# sourceMappingURL=calendar.d.ts.map
130
+ export {};