@masmarino/gabarit 2.1.1 → 3.0.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 (240) hide show
  1. package/ACCESSIBILITY.md +4 -0
  2. package/README.md +29 -11
  3. package/accordion/package.json +4 -0
  4. package/alert/package.json +4 -0
  5. package/app-shell/package.json +4 -0
  6. package/auth/package.json +4 -0
  7. package/auth-activate/package.json +4 -0
  8. package/auth-login/package.json +4 -0
  9. package/auth-register/package.json +4 -0
  10. package/auth-reset-password/package.json +4 -0
  11. package/autocomplete/package.json +4 -0
  12. package/avatar/package.json +4 -0
  13. package/avatar-group/package.json +4 -0
  14. package/badge/package.json +4 -0
  15. package/bar-chart/package.json +4 -0
  16. package/breadcrumb/package.json +4 -0
  17. package/button/package.json +4 -0
  18. package/card/README.md +1 -0
  19. package/card/package.json +4 -0
  20. package/chart/package.json +4 -0
  21. package/checkbox/package.json +4 -0
  22. package/checkbox-group/package.json +4 -0
  23. package/command-palette/README.md +65 -0
  24. package/command-palette/package.json +4 -0
  25. package/confirm-danger-modal/package.json +4 -0
  26. package/copy-button/package.json +4 -0
  27. package/copy-field/package.json +4 -0
  28. package/date-picker/package.json +4 -0
  29. package/description-list/package.json +4 -0
  30. package/dimension-card/package.json +4 -0
  31. package/disclosure/package.json +4 -0
  32. package/divider/package.json +4 -0
  33. package/docs/package.json +4 -0
  34. package/drawer/package.json +4 -0
  35. package/empty-state/package.json +4 -0
  36. package/fesm2022/masmarino-gabarit-accordion.mjs +8 -8
  37. package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -1
  38. package/fesm2022/masmarino-gabarit-alert.mjs +5 -5
  39. package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -1
  40. package/fesm2022/masmarino-gabarit-app-shell.mjs +10 -10
  41. package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -1
  42. package/fesm2022/masmarino-gabarit-auth-activate.mjs +3 -3
  43. package/fesm2022/masmarino-gabarit-auth-login.mjs +3 -3
  44. package/fesm2022/masmarino-gabarit-auth-register.mjs +3 -3
  45. package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +3 -3
  46. package/fesm2022/masmarino-gabarit-auth.mjs +12 -12
  47. package/fesm2022/masmarino-gabarit-autocomplete.mjs +5 -5
  48. package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -1
  49. package/fesm2022/masmarino-gabarit-avatar-group.mjs +5 -5
  50. package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -1
  51. package/fesm2022/masmarino-gabarit-avatar.mjs +3 -3
  52. package/fesm2022/masmarino-gabarit-badge.mjs +5 -5
  53. package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -1
  54. package/fesm2022/masmarino-gabarit-bar-chart.mjs +6 -6
  55. package/fesm2022/masmarino-gabarit-breadcrumb.mjs +3 -3
  56. package/fesm2022/masmarino-gabarit-button.mjs +5 -5
  57. package/fesm2022/masmarino-gabarit-button.mjs.map +1 -1
  58. package/fesm2022/masmarino-gabarit-card.mjs +32 -13
  59. package/fesm2022/masmarino-gabarit-card.mjs.map +1 -1
  60. package/fesm2022/masmarino-gabarit-chart.mjs +23 -23
  61. package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -1
  62. package/fesm2022/masmarino-gabarit-checkbox-group.mjs +3 -3
  63. package/fesm2022/masmarino-gabarit-checkbox.mjs +5 -5
  64. package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -1
  65. package/fesm2022/masmarino-gabarit-command-palette.mjs +649 -0
  66. package/fesm2022/masmarino-gabarit-command-palette.mjs.map +1 -0
  67. package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +3 -3
  68. package/fesm2022/masmarino-gabarit-copy-button.mjs +3 -3
  69. package/fesm2022/masmarino-gabarit-copy-field.mjs +3 -3
  70. package/fesm2022/masmarino-gabarit-date-picker.mjs +10 -10
  71. package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -1
  72. package/fesm2022/masmarino-gabarit-description-list.mjs +3 -3
  73. package/fesm2022/masmarino-gabarit-dimension-card.mjs +3 -3
  74. package/fesm2022/masmarino-gabarit-disclosure.mjs +5 -5
  75. package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -1
  76. package/fesm2022/masmarino-gabarit-divider.mjs +3 -3
  77. package/fesm2022/masmarino-gabarit-docs.mjs +26 -25
  78. package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
  79. package/fesm2022/masmarino-gabarit-drawer.mjs +5 -5
  80. package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -1
  81. package/fesm2022/masmarino-gabarit-empty-state.mjs +3 -3
  82. package/fesm2022/masmarino-gabarit-file-upload.mjs +5 -5
  83. package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -1
  84. package/fesm2022/masmarino-gabarit-format.mjs +9 -9
  85. package/fesm2022/masmarino-gabarit-funnel-chart.mjs +3 -3
  86. package/fesm2022/masmarino-gabarit-gauge-bar.mjs +5 -5
  87. package/fesm2022/masmarino-gabarit-gauge-bar.mjs.map +1 -1
  88. package/fesm2022/masmarino-gabarit-git-field.mjs +5 -5
  89. package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -1
  90. package/fesm2022/masmarino-gabarit-icon-marker.mjs +5 -5
  91. package/fesm2022/masmarino-gabarit-icon-marker.mjs.map +1 -1
  92. package/fesm2022/masmarino-gabarit-icon.mjs +6 -6
  93. package/fesm2022/masmarino-gabarit-input.mjs +5 -5
  94. package/fesm2022/masmarino-gabarit-input.mjs.map +1 -1
  95. package/fesm2022/masmarino-gabarit-job-graph.mjs +5 -5
  96. package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -1
  97. package/fesm2022/masmarino-gabarit-job-status.mjs +3 -3
  98. package/fesm2022/masmarino-gabarit-line-chart.mjs +6 -6
  99. package/fesm2022/masmarino-gabarit-list-card.mjs +5 -5
  100. package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -1
  101. package/fesm2022/masmarino-gabarit-list-row.mjs +5 -5
  102. package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -1
  103. package/fesm2022/masmarino-gabarit-list-toolbar.mjs +5 -5
  104. package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -1
  105. package/fesm2022/masmarino-gabarit-menu.mjs +13 -13
  106. package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -1
  107. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +12 -11
  108. package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -1
  109. package/fesm2022/masmarino-gabarit-mfa-settings.mjs +4 -3
  110. package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -1
  111. package/fesm2022/masmarino-gabarit-modal.mjs +5 -5
  112. package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -1
  113. package/fesm2022/masmarino-gabarit-nav-tabs.mjs +8 -8
  114. package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -1
  115. package/fesm2022/masmarino-gabarit-notification-dot.mjs +3 -3
  116. package/fesm2022/masmarino-gabarit-page-header.mjs +3 -3
  117. package/fesm2022/masmarino-gabarit-page-layout.mjs +3 -3
  118. package/fesm2022/masmarino-gabarit-pagination.mjs +5 -5
  119. package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -1
  120. package/fesm2022/masmarino-gabarit-panel.mjs +3 -3
  121. package/fesm2022/masmarino-gabarit-passkey-settings.mjs +4 -3
  122. package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -1
  123. package/fesm2022/masmarino-gabarit-pie-chart.mjs +5 -5
  124. package/fesm2022/masmarino-gabarit-pie-chart.mjs.map +1 -1
  125. package/fesm2022/masmarino-gabarit-popover.mjs +3 -3
  126. package/fesm2022/masmarino-gabarit-radio-group.mjs +5 -5
  127. package/fesm2022/masmarino-gabarit-radio-group.mjs.map +1 -1
  128. package/fesm2022/masmarino-gabarit-save-status.mjs +3 -3
  129. package/fesm2022/masmarino-gabarit-search-bar.mjs +5 -5
  130. package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -1
  131. package/fesm2022/masmarino-gabarit-secret-reveal.mjs +3 -3
  132. package/fesm2022/masmarino-gabarit-segmented-control.mjs +5 -5
  133. package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -1
  134. package/fesm2022/masmarino-gabarit-select.mjs +5 -5
  135. package/fesm2022/masmarino-gabarit-select.mjs.map +1 -1
  136. package/fesm2022/masmarino-gabarit-skeleton-list.mjs +3 -3
  137. package/fesm2022/masmarino-gabarit-skeleton.mjs +3 -3
  138. package/fesm2022/masmarino-gabarit-slider.mjs +5 -5
  139. package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -1
  140. package/fesm2022/masmarino-gabarit-sparkline.mjs +3 -3
  141. package/fesm2022/masmarino-gabarit-spinner.mjs +3 -3
  142. package/fesm2022/masmarino-gabarit-stat-grid.mjs +5 -5
  143. package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -1
  144. package/fesm2022/masmarino-gabarit-stat-tile.mjs +10 -10
  145. package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -1
  146. package/fesm2022/masmarino-gabarit-stepper.mjs +5 -5
  147. package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -1
  148. package/fesm2022/masmarino-gabarit-switch.mjs +5 -5
  149. package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -1
  150. package/fesm2022/masmarino-gabarit-table.mjs +5 -5
  151. package/fesm2022/masmarino-gabarit-table.mjs.map +1 -1
  152. package/fesm2022/masmarino-gabarit-tabs.mjs +8 -8
  153. package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -1
  154. package/fesm2022/masmarino-gabarit-tag-input.mjs +5 -5
  155. package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -1
  156. package/fesm2022/masmarino-gabarit-tag.mjs +5 -5
  157. package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -1
  158. package/fesm2022/masmarino-gabarit-textarea.mjs +5 -5
  159. package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -1
  160. package/fesm2022/masmarino-gabarit-timeline-chart.mjs +6 -6
  161. package/fesm2022/masmarino-gabarit-toaster.mjs +8 -8
  162. package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -1
  163. package/fesm2022/masmarino-gabarit-tooltip.mjs +5 -5
  164. package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -1
  165. package/fesm2022/masmarino-gabarit-tree.mjs +5 -5
  166. package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -1
  167. package/fesm2022/masmarino-gabarit-user-chip.mjs +3 -3
  168. package/fesm2022/masmarino-gabarit.mjs +3 -2
  169. package/fesm2022/masmarino-gabarit.mjs.map +1 -1
  170. package/file-upload/package.json +4 -0
  171. package/floating-panel/package.json +4 -0
  172. package/format/package.json +4 -0
  173. package/funnel-chart/package.json +4 -0
  174. package/gauge-bar/package.json +4 -0
  175. package/git-field/package.json +4 -0
  176. package/icon/package.json +4 -0
  177. package/icon-marker/package.json +4 -0
  178. package/input/package.json +4 -0
  179. package/job-graph/package.json +4 -0
  180. package/job-status/package.json +4 -0
  181. package/line-chart/package.json +4 -0
  182. package/list-card/package.json +4 -0
  183. package/list-row/package.json +4 -0
  184. package/list-toolbar/package.json +4 -0
  185. package/menu/package.json +4 -0
  186. package/mfa-enrollment/package.json +4 -0
  187. package/mfa-settings/package.json +4 -0
  188. package/modal/package.json +4 -0
  189. package/nav-tabs/package.json +4 -0
  190. package/notification-dot/package.json +4 -0
  191. package/package.json +6 -2
  192. package/page-header/package.json +4 -0
  193. package/page-layout/package.json +4 -0
  194. package/pagination/package.json +4 -0
  195. package/panel/package.json +4 -0
  196. package/passkey-settings/package.json +4 -0
  197. package/pie-chart/package.json +4 -0
  198. package/popover/package.json +4 -0
  199. package/radio-group/package.json +4 -0
  200. package/save-status/package.json +4 -0
  201. package/search-bar/package.json +4 -0
  202. package/secret-reveal/package.json +4 -0
  203. package/segmented-control/package.json +4 -0
  204. package/select/package.json +4 -0
  205. package/skeleton/package.json +4 -0
  206. package/skeleton-list/package.json +4 -0
  207. package/slider/package.json +4 -0
  208. package/sparkline/package.json +4 -0
  209. package/spinner/package.json +4 -0
  210. package/src/lib/tokens/_base.scss +4 -0
  211. package/src/lib/tokens/_depth.scss +53 -0
  212. package/src/lib/tokens/_palette.scss +5 -1
  213. package/src/lib/tokens/_semantic.scss +9 -3
  214. package/src/lib/tokens/_themes.scss +79 -4
  215. package/src/lib/tokens/_utilities.scss +25 -2
  216. package/src/lib/tokens/index.scss +1 -0
  217. package/stat-grid/package.json +4 -0
  218. package/stat-tile/package.json +4 -0
  219. package/stepper/package.json +4 -0
  220. package/switch/package.json +4 -0
  221. package/table/package.json +4 -0
  222. package/tabs/package.json +4 -0
  223. package/tag/package.json +4 -0
  224. package/tag-input/package.json +4 -0
  225. package/textarea/package.json +4 -0
  226. package/timeline-chart/package.json +4 -0
  227. package/toaster/package.json +4 -0
  228. package/tooltip/package.json +4 -0
  229. package/tree/package.json +4 -0
  230. package/types/masmarino-gabarit-avatar.d.ts +1 -1
  231. package/types/masmarino-gabarit-card.d.ts +7 -0
  232. package/types/masmarino-gabarit-chart.d.ts +0 -27
  233. package/types/masmarino-gabarit-command-palette.d.ts +218 -0
  234. package/types/masmarino-gabarit-date-picker.d.ts +0 -59
  235. package/types/masmarino-gabarit-line-chart.d.ts +0 -1
  236. package/types/masmarino-gabarit-nav-tabs.d.ts +0 -5
  237. package/types/masmarino-gabarit-pagination.d.ts +0 -1
  238. package/types/masmarino-gabarit-tree.d.ts +0 -1
  239. package/types/masmarino-gabarit.d.ts +3 -2
  240. package/user-chip/package.json +4 -0
@@ -0,0 +1,218 @@
1
+ import * as i0 from "@angular/core";
2
+ /** Something the palette offers: a page to open, an action to run, a search result. */
3
+ interface CommandItem<T = unknown> {
4
+ /** Unique within the palette. */
5
+ id: string;
6
+ label: string;
7
+ /** A second, quieter line: a path, an owner, what the action does. */
8
+ description?: string;
9
+ icon?: string;
10
+ /** More words it answers to, beyond its label and description. */
11
+ keywords?: readonly string[];
12
+ /** Keys shown on the right, for display only, e.g. `['G', 'D']`. */
13
+ shortcut?: readonly string[];
14
+ data?: T;
15
+ }
16
+ interface CommandGroup<T = unknown> {
17
+ label: string;
18
+ items: readonly CommandItem<T>[];
19
+ /**
20
+ * `false` for items that already answer the query, like server search results: shown as given. By default the
21
+ * palette keeps the items that match the query, best first.
22
+ */
23
+ filter?: boolean;
24
+ }
25
+ interface IndexedItem<T> {
26
+ item: CommandItem<T>;
27
+ index: number;
28
+ }
29
+ interface IndexedGroup<T> {
30
+ label: string;
31
+ labelId: string;
32
+ items: IndexedItem<T>[];
33
+ }
34
+ /**
35
+ * A palette to search, jump and act from the keyboard: opened with ⌘K on Apple systems and Ctrl+K elsewhere (or other
36
+ * `shortcuts`), it lists groups of commands, filters them as one types, and runs the one chosen. The application
37
+ * supplies the groups (navigation, actions, its own search results, which it can fetch on `queryChange`) and handles
38
+ * `itemSelected`.
39
+ */
40
+ export declare class CommandPalette<T = unknown> {
41
+ private readonly injector;
42
+ open: import("@angular/core").ModelSignal<boolean>;
43
+ groups: import("@angular/core").InputSignal<readonly CommandGroup<T>[]>;
44
+ /** Global shortcuts that open (and close) the palette. Plain keys like `'/'` are ignored while someone types. */
45
+ shortcuts: import("@angular/core").InputSignal<readonly string[]>;
46
+ /** Items kept per filtered group, so a short query doesn't list everything. */
47
+ maxItemsPerGroup: import("@angular/core").InputSignal<number>;
48
+ placeholder: import("@angular/core").InputSignal<string>;
49
+ ariaLabel: import("@angular/core").InputSignal<string>;
50
+ loading: import("@angular/core").InputSignal<boolean>;
51
+ loadingLabel: import("@angular/core").InputSignal<string>;
52
+ emptyMessage: import("@angular/core").InputSignal<string>;
53
+ navigateHint: import("@angular/core").InputSignal<string>;
54
+ selectHint: import("@angular/core").InputSignal<string>;
55
+ closeHint: import("@angular/core").InputSignal<string>;
56
+ /** Names the close button phones get, having no Escape key. */
57
+ closeLabel: import("@angular/core").InputSignal<string>;
58
+ resultsAnnouncement: import("@angular/core").InputSignal<(count: number) => string>;
59
+ queryChange: import("@angular/core").OutputEmitterRef<string>;
60
+ itemSelected: import("@angular/core").OutputEmitterRef<CommandItem<T>>;
61
+ protected readonly id: string;
62
+ protected readonly listId: string;
63
+ protected readonly query: import("@angular/core").WritableSignal<string>;
64
+ protected readonly activeIndex: import("@angular/core").WritableSignal<number>;
65
+ private readonly input;
66
+ private readonly list;
67
+ private previouslyFocused;
68
+ protected readonly visibleGroups: import("@angular/core").Signal<IndexedGroup<T>[]>;
69
+ private readonly visibleItems;
70
+ protected readonly activeId: import("@angular/core").Signal<string | null>;
71
+ protected readonly announcement: import("@angular/core").Signal<string>;
72
+ constructor();
73
+ /** Opens the palette, e.g. from a button. */
74
+ show(): void;
75
+ close(): void;
76
+ protected onDocumentKeydown(event: KeyboardEvent): void;
77
+ protected optionId(index: number): string;
78
+ protected onInput(event: Event): void;
79
+ protected onKeydown(event: KeyboardEvent): void;
80
+ protected activate(index: number): void;
81
+ protected select(item: CommandItem<T>): void;
82
+ protected onBackdropMousedown(event: MouseEvent): void;
83
+ private setQuery;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommandPalette<any>, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommandPalette<any>, "gbt-command-palette", never, {
86
+ "open": {
87
+ "alias": "open";
88
+ "required": false;
89
+ "isSignal": true;
90
+ };
91
+ "groups": {
92
+ "alias": "groups";
93
+ "required": false;
94
+ "isSignal": true;
95
+ };
96
+ "shortcuts": {
97
+ "alias": "shortcuts";
98
+ "required": false;
99
+ "isSignal": true;
100
+ };
101
+ "maxItemsPerGroup": {
102
+ "alias": "maxItemsPerGroup";
103
+ "required": false;
104
+ "isSignal": true;
105
+ };
106
+ "placeholder": {
107
+ "alias": "placeholder";
108
+ "required": false;
109
+ "isSignal": true;
110
+ };
111
+ "ariaLabel": {
112
+ "alias": "ariaLabel";
113
+ "required": false;
114
+ "isSignal": true;
115
+ };
116
+ "loading": {
117
+ "alias": "loading";
118
+ "required": false;
119
+ "isSignal": true;
120
+ };
121
+ "loadingLabel": {
122
+ "alias": "loadingLabel";
123
+ "required": false;
124
+ "isSignal": true;
125
+ };
126
+ "emptyMessage": {
127
+ "alias": "emptyMessage";
128
+ "required": false;
129
+ "isSignal": true;
130
+ };
131
+ "navigateHint": {
132
+ "alias": "navigateHint";
133
+ "required": false;
134
+ "isSignal": true;
135
+ };
136
+ "selectHint": {
137
+ "alias": "selectHint";
138
+ "required": false;
139
+ "isSignal": true;
140
+ };
141
+ "closeHint": {
142
+ "alias": "closeHint";
143
+ "required": false;
144
+ "isSignal": true;
145
+ };
146
+ "closeLabel": {
147
+ "alias": "closeLabel";
148
+ "required": false;
149
+ "isSignal": true;
150
+ };
151
+ "resultsAnnouncement": {
152
+ "alias": "resultsAnnouncement";
153
+ "required": false;
154
+ "isSignal": true;
155
+ };
156
+ }, {
157
+ "open": "openChange";
158
+ "queryChange": "queryChange";
159
+ "itemSelected": "itemSelected";
160
+ }, never, never, true, never>;
161
+ }
162
+ /**
163
+ * Where a header's search field would be: a button that looks like one, says the shortcut, and opens the palette.
164
+ * Below 600px it folds to its icon, its label kept as its accessible name.
165
+ */
166
+ export declare class CommandPaletteTrigger {
167
+ /** Any palette, whatever its items carry: the button only opens it. */
168
+ palette: import("@angular/core").InputSignal<Pick<CommandPalette<unknown>, "show">>;
169
+ label: import("@angular/core").InputSignal<string>;
170
+ /** The shortcut shown; keep it the palette's first. */
171
+ shortcut: import("@angular/core").InputSignal<string>;
172
+ protected readonly keys: import("@angular/core").Signal<string>;
173
+ protected readonly keyshortcuts: import("@angular/core").Signal<string>;
174
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommandPaletteTrigger, never>;
175
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommandPaletteTrigger, "gbt-command-palette-trigger", never, {
176
+ "palette": {
177
+ "alias": "palette";
178
+ "required": true;
179
+ "isSignal": true;
180
+ };
181
+ "label": {
182
+ "alias": "label";
183
+ "required": false;
184
+ "isSignal": true;
185
+ };
186
+ "shortcut": {
187
+ "alias": "shortcut";
188
+ "required": false;
189
+ "isSignal": true;
190
+ };
191
+ }, {}, never, never, true, never>;
192
+ }
193
+ /** Lower case, accents dropped: "Dépôts" is found by "depots". */
194
+ export declare function normalize(text: string): string;
195
+ /**
196
+ * How well an item answers a query, or `null` when it does not: every word of the query must appear in its label,
197
+ * description or keywords. A label that starts with the query ranks first, then one with a word that does.
198
+ */
199
+ export declare function matchCommand(item: CommandItem<unknown>, query: string): number | null;
200
+ /**
201
+ * Keyboard shortcuts as `'mod+k'` or `'/'`. `mod` is ⌘ on Apple systems and Ctrl elsewhere, which is what people
202
+ * expect from a palette: ⌘K on a Mac, Ctrl+K on Windows and Linux.
203
+ */
204
+ interface ParsedShortcut {
205
+ mod: boolean;
206
+ shift: boolean;
207
+ alt: boolean;
208
+ key: string;
209
+ }
210
+ export declare function parseShortcut(shortcut: string): ParsedShortcut;
211
+ /** Whether this runs on macOS or iOS, where `mod` is ⌘. */
212
+ export declare function isApplePlatform(): boolean;
213
+ export declare function matchesShortcut(event: KeyboardEvent, shortcut: string, apple?: boolean): boolean;
214
+ /** How to write the shortcut for people: `⌘K` on Apple systems, `Ctrl K` elsewhere. */
215
+ export declare function shortcutLabel(shortcut: string, apple?: boolean): string;
216
+ /** The `aria-keyshortcuts` value: `Meta+K` on Apple systems, `Control+K` elsewhere. */
217
+ export declare function ariaKeyshortcuts(shortcut: string, apple?: boolean): string;
218
+ export type { CommandGroup, CommandItem };
@@ -1,76 +1,18 @@
1
1
  import { ControlValueAccessor } from "@angular/forms";
2
2
  import * as i0 from "@angular/core";
3
- import { ElementRef, Injector } from "@angular/core";
4
3
  type WeekStartsOn = 0 | 1;
5
4
  interface CalendarDay {
6
5
  date: Date;
7
6
  inCurrentMonth: boolean;
8
7
  isToday: boolean;
9
8
  }
10
- declare function isSameDay(a: Date, b: Date): boolean;
11
- declare function addMonths(date: Date, delta: number): Date;
12
- declare function addYears(date: Date, delta: number): Date;
13
- declare function shiftDays(date: Date, delta: number): Date;
14
- declare function startOfWeek(date: Date, weekStartsOn: WeekStartsOn): Date;
15
- declare function endOfWeek(date: Date, weekStartsOn: WeekStartsOn): Date;
16
- declare function buildCalendarGrid(year: number, month: number, weekStartsOn: WeekStartsOn): CalendarDay[];
17
- declare function weekdayLabels(locale: string, weekStartsOn: WeekStartsOn): string[];
18
9
  interface CalendarPanelView {
19
10
  year: number;
20
11
  month: number;
21
12
  label: string;
22
13
  weeks: CalendarDay[][];
23
14
  }
24
- interface CalendarPanelDeps {
25
- elementRef: ElementRef<HTMLElement>;
26
- injector: Injector;
27
- triggerSelector: string;
28
- locale: () => string;
29
- weekStartsOn: () => WeekStartsOn;
30
- visibleMonths: () => number;
31
- minYear: () => number;
32
- maxYear: () => number;
33
- onTouched: () => void;
34
- }
35
- type NavigationResult = 'month-changed' | 'day-changed' | 'unhandled';
36
- /** Panel and calendar-grid mechanics shared by `DatePicker` and `DateRangePicker`; one instance per component. */
37
- declare class CalendarPanel {
38
- private readonly deps;
39
- readonly open: import("@angular/core").WritableSignal<boolean>;
40
- readonly anchorDate: import("@angular/core").WritableSignal<Date>;
41
- readonly focusedDate: import("@angular/core").WritableSignal<Date>;
42
- readonly panelStyle: import("@angular/core").WritableSignal<{
43
- top: string;
44
- left: string;
45
- } | null>;
46
- readonly monthViews: import("@angular/core").Signal<CalendarPanelView[]>;
47
- readonly panelLabel: import("@angular/core").Signal<string>;
48
- readonly weekdayLabels: import("@angular/core").Signal<string[]>;
49
- readonly monthOptions: import("@angular/core").Signal<{
50
- value: number;
51
- label: string;
52
- }[]>;
53
- readonly yearOptions: import("@angular/core").Signal<number[]>;
54
- constructor(deps: CalendarPanelDeps);
55
- cellId(date: Date): string;
56
- isFocused(date: Date): boolean;
57
- toggle(onOpen: () => Date): void;
58
- close(returnFocus: boolean): void;
59
- shiftMonth(delta: number): void;
60
- onMonthSelect(value: string): void;
61
- onYearSelect(value: string): void;
62
- private setAnchorMonth;
63
- handleNavigationKeydown(event: KeyboardEvent): NavigationResult;
64
- private nextFocusedDate;
65
- ensureVisible(date: Date): void;
66
- onEscape(event: KeyboardEvent): void;
67
- handleClickOutside(event: MouseEvent): void;
68
- updatePanelPosition(): void;
69
- private trigger;
70
- focusCellAfterRender(): void;
71
- }
72
15
  type DatePickerVisibleMonths = 1 | 2;
73
- type DatePickerMonthView = CalendarPanelView;
74
16
  export declare class DatePicker implements ControlValueAccessor {
75
17
  private readonly elementRef;
76
18
  private readonly injector;
@@ -227,7 +169,6 @@ interface DateRangeValue {
227
169
  start: Date;
228
170
  end: Date | null;
229
171
  }
230
- type DateRangePickerMonthView = CalendarPanelView;
231
172
  export declare class DateRangePicker implements ControlValueAccessor {
232
173
  private readonly elementRef;
233
174
  private readonly injector;
@@ -130,7 +130,6 @@ interface ActiveDot {
130
130
  y: number;
131
131
  colorIndex: number;
132
132
  }
133
- declare const DEFAULT_PATTERNS: NonNullable<ChartSeries<unknown>['pattern']>[];
134
133
  export declare class LineSeries<X> {
135
134
  series: import("@angular/core").InputSignal<ChartSeries<X>[]>;
136
135
  area: import("@angular/core").InputSignal<boolean>;
@@ -1,5 +1,4 @@
1
1
  import * as i0 from "@angular/core";
2
- import { InjectionToken, Signal } from "@angular/core";
3
2
  export declare class NavTab {
4
3
  active: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
5
4
  icon: import("@angular/core").InputSignal<string | null>;
@@ -29,10 +28,6 @@ export declare class NavTab {
29
28
  }, {}, never, ["*"], true, never>;
30
29
  }
31
30
  type NavTabsOrientation = 'horizontal' | 'vertical';
32
- interface NavTabsHost {
33
- readonly orientation: Signal<NavTabsOrientation>;
34
- }
35
- declare const GBT_NAV_TABS: InjectionToken<NavTabsHost>;
36
31
  export declare class NavTabs {
37
32
  ariaLabel: import("@angular/core").InputSignal<string>;
38
33
  orientation: import("@angular/core").InputSignal<NavTabsOrientation>;
@@ -3,7 +3,6 @@ import { SelectOption } from "@masmarino/gabarit/select";
3
3
  import * as i0 from "@angular/core";
4
4
  declare const ELLIPSIS: "…";
5
5
  type PaginationItem = number | typeof ELLIPSIS;
6
- declare function paginationRange(page: number, pageCount: number, siblingCount: number): PaginationItem[];
7
6
  export declare class Pagination {
8
7
  page: import("@angular/core").InputSignal<number>;
9
8
  pageSize: import("@angular/core").InputSignal<number>;
@@ -11,7 +11,6 @@ interface FlatTreeNode {
11
11
  hasChildren: boolean;
12
12
  parentId: string | null;
13
13
  }
14
- declare function flattenTree(nodes: TreeNode[], expandedIds: ReadonlySet<string>, depth?: number, parentId?: string | null): FlatTreeNode[];
15
14
  export declare class Tree {
16
15
  private readonly elementRef;
17
16
  private readonly injector;
@@ -17,6 +17,7 @@ import { Modal } from "@masmarino/gabarit/modal";
17
17
  import { Drawer, DrawerEdge } from "@masmarino/gabarit/drawer";
18
18
  import { Table, TableColumn } from "@masmarino/gabarit/table";
19
19
  import { SearchBar, SearchBarCollapsible, SearchResultCategory } from "@masmarino/gabarit/search-bar";
20
+ import { CommandGroup, CommandItem, CommandPalette, CommandPaletteTrigger, matchCommand, shortcutLabel } from "@masmarino/gabarit/command-palette";
20
21
  import { Tab, Tabs } from "@masmarino/gabarit/tabs";
21
22
  import { Arc, AxisSpec, BandScale, CHART_CONTEXT, ChartAxis, ChartBox, ChartEmpty, ChartFrame, ChartInterval, ChartLegend, ChartMargin, ChartPoint, ChartReader, ChartSeries, ChartTable, ChartTooltip, LegendEntry, LinearAxisSpec, Point, PointValue, Scale, TimeTicks, TimeUnit, TooltipPoint, TooltipRow, arcPath, areaPath, bandScale, linePath, linearScale, nearestIndex, niceTicks, niceXDomain, niceYDomain, timeScale, timeTicks } from "@masmarino/gabarit/chart";
22
23
  import { DateInput, FormatBytesOptions, FormatDurationOptions, FormatRelativeTimeOptions, GbtBytesPipe, GbtBytesPipeOptions, GbtDateTimePipe, GbtDateTimePipeOptions, GbtPipeLocale, GbtRelativeTimePipe, GbtRelativeTimePipeOptions, computeInitials, formatBytes, formatCompact, formatDateTime, formatDuration, formatNumber, formatPercent, formatRelativeTime } from "@masmarino/gabarit/format";
@@ -79,5 +80,5 @@ import { AuthResetPassword } from "@masmarino/gabarit/auth-reset-password";
79
80
  import { MfaSettings } from "@masmarino/gabarit/mfa-settings";
80
81
  import { PasskeySettings } from "@masmarino/gabarit/passkey-settings";
81
82
  import { GitField } from "@masmarino/gabarit/git-field";
82
- export declare const GABARIT_VERSION = "2.1.1";
83
- export { ACTIVATION_TOKEN_SHAPE, AUTH_LABELS, AUTH_PORT, AUTH_PORT_ERROR_BODIES, Accordion, AccordionItem, type AccordionMode, type ActivateFailure, type ActivateLabels, Alert, type AlertAppearance, type AlertIconAlign, type AlertLive, type AlertSize, type AlertVariant, AppShell, AppShellNavGroup, type Arc, AuthActivate, type AuthConfig, AuthFooter, AuthFooterLink, type AuthLabels, AuthLogin, AuthPanel, type AuthPort, type AuthPortError, AuthRegister, AuthResetPassword, Autocomplete, type AutocompleteSearchFn, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarSize, type AxisSpec, BackupCodes, type BackupCodesLabels, type BackupCodesResult, Badge, type BadgeAppearance, type BadgeSize, type BadgeVariant, type BandScale, BarChart, BarSeries, Breadcrumb, Button, type ButtonHaspopup, type ButtonSize, type ButtonVariant, CHART_CONTEXT, COPY_FIELD_WRAP_AT, type CalendarDay, Card, CardHeader, CardLink, type CardTone, type CardVariant, ChartAxis, type ChartBox, ChartEmpty, ChartFrame, type ChartInterval, ChartLegend, type ChartMargin, type ChartPoint, type ChartReader, type ChartSeries, ChartTable, ChartTooltip, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupSection, ClipboardFeedback, ConfirmDangerModal, type ConfirmDangerModalTone, CopyButton, type CopyButtonFeedback, CopyField, type CopyOutcome, type CopyStatus, type CopyValue, DEFAULT_ACTIVATE_LABELS, DEFAULT_BACKUP_CODES_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_MFA_ENROLLMENT_LABELS, DEFAULT_MFA_SETTINGS_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_REGISTER_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEFAULT_TOTP_QR_LABELS, type DateInput, DatePicker, DateRangePicker, type DateRangeValue, DescriptionList, type DescriptionListEntry, type DescriptionListLayout, type DescriptionListResponsive, type DescriptionListValueAlign, DimensionCard, type DimensionRow, Disclosure, type DisclosureAppearance, type DisclosureHeadingLevel, Divider, type DividerOrientation, Drawer, type DrawerEdge, type EmailProblem, EmptyState, type EmptyStateHeadingLevel, type EmptyStateIllustration, type EmptyStateSize, type EmptyStateTone, type EnrolledFactor, FileUpload, type FlatTreeNode, type FormatBytesOptions, type FormatDurationOptions, type FormatRelativeTimeOptions, FunnelChart, type FunnelStep, GaugeBar, GbtBytesPipe, type GbtBytesPipeOptions, GbtDateTimePipe, type GbtDateTimePipeOptions, GbtInput, type GbtPipeLocale, GbtRelativeTimePipe, type GbtRelativeTimePipeOptions, type GbtToastKind, type GbtToastOptions, GbtToastService, GitField, Icon, IconMarker, type IconMarkerAppearance, type IconMarkerShape, type IconMarkerSize, type IconMarkerTone, IconRegistry, type InputCombobox, JobGraph, type JobGraphJob, type JobGraphStage, type JobGraphStatus, JobStatus, type JobStatusValue, type LegendEntry, LineChart, LineSeries, type LinearAxisSpec, ListCard, type ListCardState, ListRow, type ListRowTone, ListToolbar, type ListToolbarAccessors, type ListToolbarDirection, type ListToolbarSortOption, type ListToolbarSortValue, type ListToolbarState, type ListToolbarStateConfig, type LoginLabels, type LoginResponse, MFA_PORT, MIN_PASSWORD_LENGTH, Menu, MenuItem, type MenuItemVariant, MenuTrigger, MfaEnrollment, type MfaEnrollmentLabels, type MfaFailure, type MfaFormOwner, type MfaPort, type MfaProof, MfaSettings, type MfaSettingsLabels, MfaSettingsState, type MfaSetupResult, type MfaStatus, Modal, NavTab, NavTabs, type NavTabsOrientation, NotificationDot, type NotificationDotVariant, PASSKEY_NAME_MAX, PageHeader, type PageHeaderLevel, PageLayout, type PageLayoutAsidePosition, type PageLayoutAsideWidth, type PageLayoutWidth, Pagination, Panel, type PanelHeadingLevel, type Passkey, type PasskeyChallenge, type PasskeyFailure, type PasskeyNameProblem, PasskeySettings, type PasskeySettingsLabels, type PasswordGatedFailure, type PasswordProblem, PieChart, type PieSlice, type Point, type PointValue, Popover, type PopoverAlign, RadioGroup, type RadioOption, type RegisterFailure, type RegisterLabels, type ResetPasswordLabels, SaveStatus, type SaveStatusState, type Scale, SearchBar, type SearchBarCollapsible, type SearchResultCategory, SecretReveal, SegmentedControl, type SegmentedControlOption, type SegmentedControlSize, Select, type SelectOption, Skeleton, SkeletonList, type SkeletonListLeading, type SkeletonVariant, Slider, Sparkline, Spinner, type SpinnerSize, StatGrid, type StatGridColumns, StatTile, StatTileLink, type StatTileTrend, type StatTileTrendTone, Stepper, type StepperOrientation, type StepperStatus, type StepperStep, Switch, TOTP_QR_RENDERER, Tab, Table, type TableColumn, Tabs, Tag, TagInput, Textarea, type TimeTicks, type TimeUnit, TimelineChart, TimelineSeries, type ToastItem, type ToastVariant, Toaster, type ToasterPosition, Tooltip, type TooltipPoint, type TooltipPosition, type TooltipRow, type TotpEnrollment, TotpQr, type TotpQrLabels, type TotpQrRenderOptions, type TotpQrRenderer, Tree, type TreeNode, USERNAME_PATTERN, UserChip, type UserChipSize, type UsernameProblem, type WeekStartsOn, accountName, activationToken, arcPath, areaPath, bandScale, base64UrlToBuffer, bufferToBase64Url, classifyActivateFailure, classifyMfaFailure, classifyPasskeyError, classifyPasswordFailure, classifyRegisterFailure, computeInitials, copyToClipboard, createListToolbarState, createPasskeyCredential, emailProblem, formatBytes, formatCompact, formatDateTime, formatDuration, formatNumber, formatPercent, formatRelativeTime, getPasskeyAssertion, isAuthPortError, isTooManyPasskeys, linePath, linearScale, nearestIndex, niceTicks, niceXDomain, niceYDomain, passkeyNameProblem, passkeysSupported, passwordProblem, portErrorMessage, provideAuthLabels, selectContents, timeScale, timeTicks, usernameProblem };
83
+ export declare const GABARIT_VERSION = "3.0.0";
84
+ export { ACTIVATION_TOKEN_SHAPE, AUTH_LABELS, AUTH_PORT, AUTH_PORT_ERROR_BODIES, Accordion, AccordionItem, type AccordionMode, type ActivateFailure, type ActivateLabels, Alert, type AlertAppearance, type AlertIconAlign, type AlertLive, type AlertSize, type AlertVariant, AppShell, AppShellNavGroup, type Arc, AuthActivate, type AuthConfig, AuthFooter, AuthFooterLink, type AuthLabels, AuthLogin, AuthPanel, type AuthPort, type AuthPortError, AuthRegister, AuthResetPassword, Autocomplete, type AutocompleteSearchFn, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarSize, type AxisSpec, BackupCodes, type BackupCodesLabels, type BackupCodesResult, Badge, type BadgeAppearance, type BadgeSize, type BadgeVariant, type BandScale, BarChart, BarSeries, Breadcrumb, Button, type ButtonHaspopup, type ButtonSize, type ButtonVariant, CHART_CONTEXT, COPY_FIELD_WRAP_AT, type CalendarDay, Card, CardHeader, CardLink, type CardTone, type CardVariant, ChartAxis, type ChartBox, ChartEmpty, ChartFrame, type ChartInterval, ChartLegend, type ChartMargin, type ChartPoint, type ChartReader, type ChartSeries, ChartTable, ChartTooltip, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupSection, ClipboardFeedback, type CommandGroup, type CommandItem, CommandPalette, CommandPaletteTrigger, ConfirmDangerModal, type ConfirmDangerModalTone, CopyButton, type CopyButtonFeedback, CopyField, type CopyOutcome, type CopyStatus, type CopyValue, DEFAULT_ACTIVATE_LABELS, DEFAULT_BACKUP_CODES_LABELS, DEFAULT_LOGIN_LABELS, DEFAULT_MFA_ENROLLMENT_LABELS, DEFAULT_MFA_SETTINGS_LABELS, DEFAULT_PASSKEY_SETTINGS_LABELS, DEFAULT_REGISTER_LABELS, DEFAULT_RESET_PASSWORD_LABELS, DEFAULT_TOTP_QR_LABELS, type DateInput, DatePicker, DateRangePicker, type DateRangeValue, DescriptionList, type DescriptionListEntry, type DescriptionListLayout, type DescriptionListResponsive, type DescriptionListValueAlign, DimensionCard, type DimensionRow, Disclosure, type DisclosureAppearance, type DisclosureHeadingLevel, Divider, type DividerOrientation, Drawer, type DrawerEdge, type EmailProblem, EmptyState, type EmptyStateHeadingLevel, type EmptyStateIllustration, type EmptyStateSize, type EmptyStateTone, type EnrolledFactor, FileUpload, type FlatTreeNode, type FormatBytesOptions, type FormatDurationOptions, type FormatRelativeTimeOptions, FunnelChart, type FunnelStep, GaugeBar, GbtBytesPipe, type GbtBytesPipeOptions, GbtDateTimePipe, type GbtDateTimePipeOptions, GbtInput, type GbtPipeLocale, GbtRelativeTimePipe, type GbtRelativeTimePipeOptions, type GbtToastKind, type GbtToastOptions, GbtToastService, GitField, Icon, IconMarker, type IconMarkerAppearance, type IconMarkerShape, type IconMarkerSize, type IconMarkerTone, IconRegistry, type InputCombobox, JobGraph, type JobGraphJob, type JobGraphStage, type JobGraphStatus, JobStatus, type JobStatusValue, type LegendEntry, LineChart, LineSeries, type LinearAxisSpec, ListCard, type ListCardState, ListRow, type ListRowTone, ListToolbar, type ListToolbarAccessors, type ListToolbarDirection, type ListToolbarSortOption, type ListToolbarSortValue, type ListToolbarState, type ListToolbarStateConfig, type LoginLabels, type LoginResponse, MFA_PORT, MIN_PASSWORD_LENGTH, Menu, MenuItem, type MenuItemVariant, MenuTrigger, MfaEnrollment, type MfaEnrollmentLabels, type MfaFailure, type MfaFormOwner, type MfaPort, type MfaProof, MfaSettings, type MfaSettingsLabels, MfaSettingsState, type MfaSetupResult, type MfaStatus, Modal, NavTab, NavTabs, type NavTabsOrientation, NotificationDot, type NotificationDotVariant, PASSKEY_NAME_MAX, PageHeader, type PageHeaderLevel, PageLayout, type PageLayoutAsidePosition, type PageLayoutAsideWidth, type PageLayoutWidth, Pagination, Panel, type PanelHeadingLevel, type Passkey, type PasskeyChallenge, type PasskeyFailure, type PasskeyNameProblem, PasskeySettings, type PasskeySettingsLabels, type PasswordGatedFailure, type PasswordProblem, PieChart, type PieSlice, type Point, type PointValue, Popover, type PopoverAlign, RadioGroup, type RadioOption, type RegisterFailure, type RegisterLabels, type ResetPasswordLabels, SaveStatus, type SaveStatusState, type Scale, SearchBar, type SearchBarCollapsible, type SearchResultCategory, SecretReveal, SegmentedControl, type SegmentedControlOption, type SegmentedControlSize, Select, type SelectOption, Skeleton, SkeletonList, type SkeletonListLeading, type SkeletonVariant, Slider, Sparkline, Spinner, type SpinnerSize, StatGrid, type StatGridColumns, StatTile, StatTileLink, type StatTileTrend, type StatTileTrendTone, Stepper, type StepperOrientation, type StepperStatus, type StepperStep, Switch, TOTP_QR_RENDERER, Tab, Table, type TableColumn, Tabs, Tag, TagInput, Textarea, type TimeTicks, type TimeUnit, TimelineChart, TimelineSeries, type ToastItem, type ToastVariant, Toaster, type ToasterPosition, Tooltip, type TooltipPoint, type TooltipPosition, type TooltipRow, type TotpEnrollment, TotpQr, type TotpQrLabels, type TotpQrRenderOptions, type TotpQrRenderer, Tree, type TreeNode, USERNAME_PATTERN, UserChip, type UserChipSize, type UsernameProblem, type WeekStartsOn, accountName, activationToken, arcPath, areaPath, bandScale, base64UrlToBuffer, bufferToBase64Url, classifyActivateFailure, classifyMfaFailure, classifyPasskeyError, classifyPasswordFailure, classifyRegisterFailure, computeInitials, copyToClipboard, createListToolbarState, createPasskeyCredential, emailProblem, formatBytes, formatCompact, formatDateTime, formatDuration, formatNumber, formatPercent, formatRelativeTime, getPasskeyAssertion, isAuthPortError, isTooManyPasskeys, linePath, linearScale, matchCommand, nearestIndex, niceTicks, niceXDomain, niceYDomain, passkeyNameProblem, passkeysSupported, passwordProblem, portErrorMessage, provideAuthLabels, selectContents, shortcutLabel, timeScale, timeTicks, usernameProblem };
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/masmarino-gabarit-user-chip.mjs",
3
+ "typings": "../types/masmarino-gabarit-user-chip.d.ts"
4
+ }