@voidable/ui 0.11.0 → 0.12.1

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 (152) hide show
  1. package/README.md +1 -1
  2. package/dist/angular/index.d.ts +2 -2
  3. package/dist/angular/index.js +2 -1
  4. package/dist/chunks/activation-B8aBarKd.js +4 -0
  5. package/dist/chunks/carousel-C9u0bg5l.js +10 -0
  6. package/dist/chunks/choice-BTrsi7OW.js +16 -0
  7. package/dist/chunks/data-Baycjoo4.js +96 -0
  8. package/dist/chunks/fields-MEqz-olE.js +21 -0
  9. package/dist/chunks/{form-control-C0vH6gii.js → form-control-fL-Hhy91.js} +49 -48
  10. package/dist/chunks/{keyboard-CEhMSkws.js → keyboard-ChtDvhB_.js} +4 -23
  11. package/dist/chunks/{keyboard-activation-CV0m4hkn.js → keyboard-activation-BfEyoaMT.js} +4 -6
  12. package/dist/chunks/menu-CxRRgkJI.js +21 -0
  13. package/dist/chunks/{modal-DWGkNdNG.js → modal-Cz2-Ov76.js} +23 -15
  14. package/dist/chunks/nav-menu-Bx284Dk6.js +12 -0
  15. package/dist/chunks/{overlay-CH7L4N-h.js → overlay-BuV-4Yvt.js} +75 -68
  16. package/dist/chunks/overlay-K1ilWC1p.js +4 -0
  17. package/dist/chunks/pickers-CjlFgNke.js +36 -0
  18. package/dist/chunks/table-BBpqwWEi.js +4 -0
  19. package/dist/chunks/tabs-Buf3EBWq.js +10 -0
  20. package/dist/components/accordion.d.ts +7 -0
  21. package/dist/components/accordion.js +22 -14
  22. package/dist/components/action-input.d.ts +2 -1
  23. package/dist/components/action-input.js +59 -55
  24. package/dist/components/bar-chart.js +41 -40
  25. package/dist/components/breadcrumbs.d.ts +2 -0
  26. package/dist/components/breadcrumbs.js +15 -11
  27. package/dist/components/button.d.ts +7 -0
  28. package/dist/components/button.js +23 -16
  29. package/dist/components/calendar.d.ts +45 -10
  30. package/dist/components/calendar.js +183 -129
  31. package/dist/components/carousel.d.ts +22 -0
  32. package/dist/components/carousel.js +64 -35
  33. package/dist/components/charts/data.d.ts +2 -2
  34. package/dist/components/checkbox-group.js +22 -21
  35. package/dist/components/checkbox.d.ts +7 -0
  36. package/dist/components/checkbox.js +29 -24
  37. package/dist/components/collapsible.d.ts +7 -0
  38. package/dist/components/collapsible.js +19 -11
  39. package/dist/components/color-picker.js +28 -27
  40. package/dist/components/combobox.d.ts +13 -1
  41. package/dist/components/combobox.js +54 -41
  42. package/dist/components/compose-input.d.ts +9 -1
  43. package/dist/components/compose-input.js +28 -16
  44. package/dist/components/dialog.js +1 -1
  45. package/dist/components/donut-chart.js +57 -56
  46. package/dist/components/drawer.js +1 -1
  47. package/dist/components/dropdown-menu.d.ts +22 -0
  48. package/dist/components/dropdown-menu.js +54 -39
  49. package/dist/components/editable.d.ts +11 -1
  50. package/dist/components/editable.js +35 -22
  51. package/dist/components/error-fallback.d.ts +4 -2
  52. package/dist/components/error-fallback.js +34 -28
  53. package/dist/components/file-upload.d.ts +9 -0
  54. package/dist/components/file-upload.js +54 -28
  55. package/dist/components/gauge.js +108 -107
  56. package/dist/components/hamburger.d.ts +7 -0
  57. package/dist/components/hamburger.js +28 -19
  58. package/dist/components/hover-card.d.ts +7 -0
  59. package/dist/components/hover-card.js +22 -14
  60. package/dist/components/indicator.js +15 -14
  61. package/dist/components/input.js +1 -1
  62. package/dist/components/line-chart.js +43 -42
  63. package/dist/components/menu.d.ts +25 -0
  64. package/dist/components/menu.js +55 -33
  65. package/dist/components/multiselect.d.ts +17 -1
  66. package/dist/components/multiselect.js +96 -74
  67. package/dist/components/nav-menu.d.ts +9 -0
  68. package/dist/components/nav-menu.js +30 -23
  69. package/dist/components/number-input.d.ts +15 -1
  70. package/dist/components/number-input.js +71 -37
  71. package/dist/components/pagination.js +25 -24
  72. package/dist/components/pin-input.d.ts +11 -0
  73. package/dist/components/pin-input.js +46 -32
  74. package/dist/components/popover.d.ts +7 -0
  75. package/dist/components/popover.js +21 -13
  76. package/dist/components/radio-group.js +1 -1
  77. package/dist/components/radio.d.ts +10 -1
  78. package/dist/components/radio.js +37 -32
  79. package/dist/components/segmented-control.d.ts +14 -0
  80. package/dist/components/segmented-control.js +40 -28
  81. package/dist/components/sidebar.d.ts +1 -0
  82. package/dist/components/sidebar.js +14 -10
  83. package/dist/components/slider.js +1 -1
  84. package/dist/components/spinner.d.ts +5 -3
  85. package/dist/components/spinner.js +21 -14
  86. package/dist/components/stat.js +1 -1
  87. package/dist/components/status-dot.d.ts +2 -2
  88. package/dist/components/status-dot.js +12 -14
  89. package/dist/components/stepper.d.ts +2 -0
  90. package/dist/components/stepper.js +20 -13
  91. package/dist/components/switch.d.ts +7 -0
  92. package/dist/components/switch.js +24 -16
  93. package/dist/components/table.d.ts +77 -1
  94. package/dist/components/table.js +562 -73
  95. package/dist/components/tabs.d.ts +11 -0
  96. package/dist/components/tabs.js +42 -33
  97. package/dist/components/tag.js +12 -11
  98. package/dist/components/tags-input.d.ts +10 -1
  99. package/dist/components/tags-input.js +42 -30
  100. package/dist/components/textarea.js +1 -1
  101. package/dist/components/toast.d.ts +2 -0
  102. package/dist/components/toast.js +35 -28
  103. package/dist/components/toggle-group.d.ts +8 -0
  104. package/dist/components/toggle-group.js +24 -17
  105. package/dist/components/toggle.d.ts +7 -0
  106. package/dist/components/toggle.js +23 -15
  107. package/dist/components/tooltip.d.ts +7 -0
  108. package/dist/components/tooltip.js +20 -12
  109. package/dist/components.json +96 -74
  110. package/dist/custom-elements.json +4213 -131
  111. package/dist/dev/rules.d.ts +0 -1
  112. package/dist/dev/types.d.ts +3 -1
  113. package/dist/dev.js +244 -113
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +68 -66
  116. package/dist/keyboard-activation.d.ts +9 -9
  117. package/dist/keyboard.d.ts +2 -10
  118. package/dist/keymaps/activation.d.ts +8 -0
  119. package/dist/keymaps/carousel.d.ts +9 -0
  120. package/dist/keymaps/choice.d.ts +21 -0
  121. package/dist/keymaps/fields.d.ts +31 -0
  122. package/dist/keymaps/index.d.ts +2 -0
  123. package/dist/keymaps/menu.d.ts +36 -0
  124. package/dist/keymaps/nav-menu.d.ts +11 -0
  125. package/dist/keymaps/overlay.d.ts +4 -0
  126. package/dist/keymaps/pickers.d.ts +36 -0
  127. package/dist/keymaps/table.d.ts +8 -0
  128. package/dist/keymaps/tabs.d.ts +7 -0
  129. package/dist/keymaps.js +51 -0
  130. package/dist/keys.d.ts +46 -0
  131. package/dist/keys.js +57 -0
  132. package/dist/llms.txt +11 -3
  133. package/dist/messages/ar.d.ts +1 -0
  134. package/dist/messages/ar.js +130 -0
  135. package/dist/messages/fr.d.ts +1 -0
  136. package/dist/messages/fr.js +109 -0
  137. package/dist/messages.d.ts +213 -0
  138. package/dist/messages.js +190 -0
  139. package/dist/modal.d.ts +7 -0
  140. package/dist/reference.md +817 -17
  141. package/dist/testing/index.d.ts +46 -0
  142. package/dist/testing.js +79 -0
  143. package/dist/types/elements.d.ts +89 -73
  144. package/dist/types/react.d.ts +5 -1
  145. package/dist/types/solid.d.ts +5 -1
  146. package/dist/types/solid2.d.ts +4 -0
  147. package/dist/types/svelte.d.ts +5 -1
  148. package/dist/types/vue.d.ts +5 -1
  149. package/dist/vscode.html-custom-data.json +384 -18
  150. package/dist/web-types.json +830 -69
  151. package/package.json +22 -2
  152. package/dist/chunks/data-BpiiNapL.js +0 -95
@@ -1,9 +1,26 @@
1
1
  import { VoidElement } from '../base.js';
2
2
  import { FormValidityResult } from '../form-control.js';
3
3
  import { OverlayController } from '../overlay.js';
4
+ import { KeyOverrides } from '../keys.js';
4
5
  declare const VoidCalendar_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
5
6
  /** Date selection for booking flows, scheduling UIs, and form fields with locale-aware formatting and min/max constraints. */
6
7
  export declare class VoidCalendar extends VoidCalendar_base {
8
+ /** Key bindings for this element's actions, as JSON (`{"nextWeek":["ArrowDown","j"]}`); `[]` switches an action off. See the keyboard guide. */
9
+ keys: KeyOverrides | null;
10
+ /** @internal The actions of this element and their default keys. */
11
+ static readonly keyMap: {
12
+ previousDay: string[];
13
+ nextDay: string[];
14
+ previousWeek: string[];
15
+ nextWeek: string[];
16
+ startOfWeek: string[];
17
+ endOfWeek: string[];
18
+ previousMonth: string[];
19
+ nextMonth: string[];
20
+ previousYear: string[];
21
+ nextYear: string[];
22
+ activate: string[];
23
+ };
7
24
  /**
8
25
  * Selected date as an ISO `YYYY-MM-DD` string. Empty means no selection. It is what the form submits
9
26
  * and the reset target; picking a day updates it and fires `void-change`.
@@ -18,12 +35,21 @@ export declare class VoidCalendar extends VoidCalendar_base {
18
35
  /** Size step: `sm`, `md` (default) or `lg`. */
19
36
  size: 'sm' | 'md' | 'lg';
20
37
  /**
21
- * BCP 47 language tag for month and weekday names and the long date announced for each day, such as
22
- * `de-DE`. Defaults to `en-US`.
38
+ * BCP 47 language tag for month and weekday names, the numbers and the long date announced for each day, such
39
+ * as `de-DE`. Without it the calendar follows the closest `lang` (the page's included), and `en-US` where there
40
+ * is none. Month and day names are always for the Gregorian calendar.
23
41
  */
24
42
  locale: string;
25
- /** Day the week starts on, as a number from 0 (Sunday, the default) to 6 (Saturday). Use 1 for Monday. */
26
- firstDay: number;
43
+ /**
44
+ * Day the week starts on, as a number from 0 (Sunday) to 6 (Saturday). Use 1 for Monday. Without it the week
45
+ * starts on the day the locale's week information gives (`Intl.Locale`), and on Sunday where the browser
46
+ * does not provide it.
47
+ */
48
+ firstDay: number | null;
49
+ /** The locale the calendar formats in: its `locale`, else the closest `lang`, else `en-US`. */
50
+ private get _locale();
51
+ /** The first day of the week, 0 (Sunday) to 6: `first-day`, else the locale's, else Sunday. */
52
+ private get _week();
27
53
  private _viewYear;
28
54
  private _viewMonth;
29
55
  private _view;
@@ -31,6 +57,7 @@ export declare class VoidCalendar extends VoidCalendar_base {
31
57
  private _yearsPageStart;
32
58
  private _didInit;
33
59
  connectedCallback(): void;
60
+ private _name;
34
61
  updated(changed: Map<string, unknown>): void;
35
62
  private _initView;
36
63
  private _syncViewToValue;
@@ -38,7 +65,6 @@ export declare class VoidCalendar extends VoidCalendar_base {
38
65
  private _renderDays;
39
66
  private _formatFullDate;
40
67
  private _getDayNames;
41
- private _getMonthName;
42
68
  private _buildDayCells;
43
69
  private _isOutOfRange;
44
70
  private _renderMonths;
@@ -85,6 +111,14 @@ declare const VoidDatePicker_base: (new (...args: any[]) => import('../form-cont
85
111
  * The calendar popup is closing. Cancelable when the user caused it.
86
112
  */
87
113
  export declare class VoidDatePicker extends VoidDatePicker_base {
114
+ /** Key bindings for this element's actions, as JSON (`{"close":["Escape"]}`); `[]` switches an action off. See the keyboard guide. */
115
+ keys: KeyOverrides | null;
116
+ /** @internal The actions of this element and their default keys. */
117
+ static readonly keyMap: {
118
+ activate: string[];
119
+ open: string[];
120
+ close: string[];
121
+ };
88
122
  /** The host's `aria-label` / `aria-labelledby` name the inner control. */
89
123
  static labelTarget: string;
90
124
  /**
@@ -101,16 +135,17 @@ export declare class VoidDatePicker extends VoidDatePicker_base {
101
135
  /** Size step: `sm`, `md` (default) or `lg`. */
102
136
  size: 'sm' | 'md' | 'lg';
103
137
  /**
104
- * BCP 47 language tag for the calendar's month and weekday names, such as `de-DE`. Defaults to
105
- * `en-US`. It does not change `format`.
138
+ * BCP 47 language tag for the calendar's month and weekday names and numbers, such as `de-DE`. Without it the
139
+ * calendar follows the closest `lang`, and `en-US` where there is none. It does not change `format`.
106
140
  */
107
141
  locale: string;
108
- /** Day the calendar week starts on, as a number from 0 (Sunday, the default) to 6 (Saturday). */
109
- firstDay: number;
142
+ /** Day the calendar week starts on, as a number from 0 (Sunday) to 6 (Saturday). Without it, the locale's first day of the week, else Sunday. */
143
+ firstDay: number | null;
110
144
  /** Whether the calendar dropdown is showing. Clicking the field or button toggles it; Escape closes it. */
111
145
  open: boolean;
112
- /** Hint shown in the field while no date is chosen. Defaults to `Select date`. */
146
+ /** Hint shown in the field while no date is chosen. Defaults to the `datePicker.placeholder` message (English: `Select date`). */
113
147
  placeholder: string;
148
+ private get _hint();
114
149
  /**
115
150
  * How the date is written in the field, using `YYYY`, `MM` and `DD`. Defaults to `MM/DD/YYYY`. A date
116
151
  * typed into the field is read the same way (and as ISO `YYYY-MM-DD` always); the value stays `YYYY-MM-DD`.