@ojiepermana/angular 22.1.13 → 22.2.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 +8 -6
  2. package/SUPPORT.md +3 -3
  3. package/chart/README.md +1 -1
  4. package/component/README.md +2 -2
  5. package/component/calendar/README.md +3 -15
  6. package/component/drawer/README.md +1 -2
  7. package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
  8. package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
  9. package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
  10. package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
  11. package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
  12. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
  13. package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
  14. package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
  15. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
  16. package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
  17. package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
  18. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
  19. package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
  20. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
  21. package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
  22. package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
  23. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
  24. package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
  25. package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
  26. package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
  27. package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
  28. package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
  29. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
  30. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
  31. package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
  32. package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
  33. package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
  34. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
  35. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
  36. package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
  37. package/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -5
  38. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
  39. package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
  40. package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
  41. package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
  42. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
  43. package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
  44. package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
  45. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
  46. package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
  47. package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
  48. package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
  49. package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
  50. package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
  51. package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
  52. package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
  53. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
  54. package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
  55. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
  56. package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
  57. package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
  58. package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
  59. package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
  60. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
  61. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
  62. package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
  63. package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
  64. package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
  65. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
  66. package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
  67. package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
  68. package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
  69. package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
  70. package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
  71. package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
  72. package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
  73. package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
  74. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
  75. package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
  76. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
  77. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
  78. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
  79. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
  80. package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
  81. package/fesm2022/ojiepermana-angular-component.mjs +0 -10
  82. package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
  83. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
  84. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs +129 -0
  85. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
  86. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
  87. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
  88. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
  89. package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
  90. package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
  91. package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
  92. package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
  93. package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
  94. package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
  95. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -737
  96. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
  97. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
  98. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1719 -552
  99. package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -491
  100. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
  101. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
  102. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
  103. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
  104. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
  105. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
  106. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
  107. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
  108. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
  109. package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
  110. package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
  111. package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
  112. package/fesm2022/ojiepermana-angular.mjs +5 -24
  113. package/navigation/README.md +1 -1
  114. package/package.json +16 -12
  115. package/sdk/README.md +1 -1
  116. package/sdk/src/writer/index.js +2 -2
  117. package/theme/README.md +1 -1
  118. package/theme/layout/README.md +2 -4
  119. package/theme/page/README.md +50 -0
  120. package/theme/styles/README.md +10 -10
  121. package/theme/styles/css/base/prefers-dark.css +1 -1
  122. package/theme/styles/css/base/status.css +1 -1
  123. package/theme/styles/css/color/amber.css +1 -1
  124. package/theme/styles/css/color/blue.css +1 -1
  125. package/theme/styles/css/color/cyan.css +1 -1
  126. package/theme/styles/css/color/emerald.css +1 -1
  127. package/theme/styles/css/color/fuchsia.css +1 -1
  128. package/theme/styles/css/color/green.css +1 -1
  129. package/theme/styles/css/color/indigo.css +1 -1
  130. package/theme/styles/css/color/lime.css +1 -1
  131. package/theme/styles/css/color/orange.css +1 -1
  132. package/theme/styles/css/color/pink.css +1 -1
  133. package/theme/styles/css/color/purple.css +1 -1
  134. package/theme/styles/css/color/red.css +1 -1
  135. package/theme/styles/css/color/rose.css +1 -1
  136. package/theme/styles/css/color/sky.css +1 -1
  137. package/theme/styles/css/color/teal.css +1 -1
  138. package/theme/styles/css/color/violet.css +1 -1
  139. package/theme/styles/css/color/yellow.css +1 -1
  140. package/theme/styles/css/neutral/gray.css +1 -1
  141. package/theme/styles/css/neutral/mauve.css +1 -1
  142. package/theme/styles/css/neutral/mist.css +1 -1
  143. package/theme/styles/css/neutral/neutral.css +1 -1
  144. package/theme/styles/css/neutral/olive.css +1 -1
  145. package/theme/styles/css/neutral/slate.css +1 -1
  146. package/theme/styles/css/neutral/stone.css +1 -1
  147. package/theme/styles/css/neutral/taupe.css +1 -1
  148. package/theme/styles/css/neutral/zinc.css +1 -1
  149. package/types/ojiepermana-angular-chart-area.d.ts +126 -63
  150. package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
  151. package/types/ojiepermana-angular-chart-core.d.ts +409 -398
  152. package/types/ojiepermana-angular-chart-line.d.ts +141 -68
  153. package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
  154. package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
  155. package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
  156. package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
  157. package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
  158. package/types/ojiepermana-angular-chart.d.ts +3 -2
  159. package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
  160. package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
  161. package/types/ojiepermana-angular-component-alert.d.ts +69 -39
  162. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
  163. package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
  164. package/types/ojiepermana-angular-component-badge.d.ts +36 -24
  165. package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
  166. package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
  167. package/types/ojiepermana-angular-component-button.d.ts +44 -27
  168. package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
  169. package/types/ojiepermana-angular-component-card.d.ts +112 -63
  170. package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
  171. package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
  172. package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
  173. package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
  174. package/types/ojiepermana-angular-component-command.d.ts +206 -121
  175. package/types/ojiepermana-angular-component-composer.d.ts +184 -84
  176. package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
  177. package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
  178. package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
  179. package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
  180. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
  181. package/types/ojiepermana-angular-component-editor.d.ts +215 -117
  182. package/types/ojiepermana-angular-component-empty.d.ts +80 -45
  183. package/types/ojiepermana-angular-component-form.d.ts +185 -121
  184. package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
  185. package/types/ojiepermana-angular-component-icon.d.ts +87 -57
  186. package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
  187. package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
  188. package/types/ojiepermana-angular-component-input.d.ts +27 -17
  189. package/types/ojiepermana-angular-component-item.d.ts +160 -84
  190. package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
  191. package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
  192. package/types/ojiepermana-angular-component-label.d.ts +19 -11
  193. package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
  194. package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
  195. package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
  196. package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
  197. package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
  198. package/types/ojiepermana-angular-component-popover.d.ts +94 -64
  199. package/types/ojiepermana-angular-component-progress.d.ts +45 -17
  200. package/types/ojiepermana-angular-component-radio.d.ts +129 -53
  201. package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
  202. package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
  203. package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
  204. package/types/ojiepermana-angular-component-select.d.ts +94 -77
  205. package/types/ojiepermana-angular-component-separator.d.ts +26 -14
  206. package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
  207. package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
  208. package/types/ojiepermana-angular-component-slider.d.ts +140 -75
  209. package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
  210. package/types/ojiepermana-angular-component-switch.d.ts +97 -40
  211. package/types/ojiepermana-angular-component-table.d.ts +102 -50
  212. package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
  213. package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
  214. package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
  215. package/types/ojiepermana-angular-component-toast.d.ts +51 -55
  216. package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
  217. package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
  218. package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
  219. package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
  220. package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
  221. package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
  222. package/types/ojiepermana-angular-component-utils.d.ts +2 -2
  223. package/types/ojiepermana-angular-component.d.ts +1 -2
  224. package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
  225. package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
  226. package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
  227. package/types/ojiepermana-angular-navigation-types.d.ts +121 -125
  228. package/types/ojiepermana-angular-navigation.d.ts +663 -374
  229. package/types/ojiepermana-angular-sdk.d.ts +69 -71
  230. package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
  231. package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
  232. package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
  233. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +399 -187
  234. package/types/ojiepermana-angular-theme-layout.d.ts +201 -112
  235. package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
  236. package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
  237. package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
  238. package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
  239. package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
  240. package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
  241. package/types/ojiepermana-angular-theme-page.d.ts +7 -5
  242. package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
  243. package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
  244. package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
  245. package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
  246. package/types/ojiepermana-angular-theme.d.ts +1 -2
  247. package/types/ojiepermana-angular.d.ts +5 -5
  248. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +0 -91
  249. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +0 -512
  250. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +0 -404
  251. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +0 -466
  252. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +0 -2642
@@ -1,355 +1,815 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive, model, input, output, signal, computed, forwardRef, Component, inject, ElementRef, DestroyRef } from '@angular/core';
3
- import { injectUniqueId, cn } from '@ojiepermana/angular/component/utils/core';
4
-
5
- /** Base class exposed to children for context lookup. */
6
- class CommandContextBase {
7
- /** Shared id linking the combobox input (aria-controls) to the listbox. */
8
- listboxId = injectUniqueId('CommandList');
9
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: CommandContextBase, isStandalone: true, ngImport: i0 });
11
- }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandContextBase, decorators: [{
13
- type: Directive
14
- }] });
15
- class CommandComponent extends CommandContextBase {
16
- query = model('', /* @ts-ignore */
17
- ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
18
- class = input('', /* @ts-ignore */
19
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
20
- /**
21
- * Escape was pressed with nothing left to clear.
22
- *
23
- * A `Command` rendered inside a dialog or a popover does not need this: the
24
- * overlay closes itself on Escape. A standalone one is not inside anything
25
- * that would, so this is how it asks its container to dismiss it.
26
- */
27
- dismissed = output();
28
- items = signal([], /* @ts-ignore */
29
- ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
30
- classes = computed(() => cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', this.class()), /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
32
- matches(text) {
33
- const q = this.query().trim().toLowerCase();
34
- if (!q)
35
- return true;
36
- return text.toLowerCase().includes(q);
37
- }
38
- registerItem(item) {
39
- this.items.update((list) => [...list, item]);
40
- }
41
- unregisterItem(item) {
42
- this.items.update((list) => list.filter((i) => i !== item));
43
- }
44
- /** Items currently visible (not filtered out), disabled ones included. */
45
- visibleItems() {
46
- return this.items().filter((it) => it.visible());
47
- }
48
- // Items the keyboard may land on: visible AND enabled.
49
- //
50
- // A disabled row stays visible, for discoverability, but must never become the
51
- // active descendant. Announcing a row the user cannot choose -- Enter and
52
- // click both refuse it -- is a dead end with no feedback.
53
- navigableItems() {
54
- return this.visibleItems().filter((it) => !it.disabled());
55
- }
56
- focusNext(delta) {
57
- const navigable = this.navigableItems();
58
- if (navigable.length === 0)
59
- return;
60
- const active = navigable.findIndex((i) => i.active());
61
- const idx = active < 0 ? 0 : (active + delta + navigable.length) % navigable.length;
62
- this.setActiveItem(navigable[idx] ?? null);
63
- }
64
- focusFirst() {
65
- this.setActiveItem(this.navigableItems()[0] ?? null);
66
- }
67
- requestDismiss() {
68
- this.dismissed.emit();
69
- }
70
- hasVisibleItems() {
71
- return this.visibleItems().length > 0;
72
- }
73
- activateOnly(item) {
74
- this.setActiveItem(item);
75
- }
76
- activeDescendantId() {
77
- return this.getActive()?.itemId ?? null;
78
- }
79
- /** The row Enter would choose: the active one, else the first one it may land on. */
80
- getActive() {
81
- const navigable = this.navigableItems();
82
- return navigable.find((i) => i.active()) ?? navigable[0] ?? null;
83
- }
84
- setActiveItem(activeItem) {
85
- this.items().forEach((item) => item._setActive(item === activeItem));
86
- }
87
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
88
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandComponent, isStandalone: true, selector: "Command", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { query: "queryChange", dismissed: "dismissed" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true });
89
- }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandComponent, decorators: [{
91
- type: Component,
92
- args: [{
93
- selector: 'Command',
94
- providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }],
95
- host: { '[class]': 'classes()' },
96
- template: `<ng-content />`,
97
- }]
98
- }], propDecorators: { query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
99
- class CommandInputComponent {
100
- ctx = inject(CommandComponent);
101
- placeholder = input('Type a command or search…', /* @ts-ignore */
102
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
103
- class = input('', /* @ts-ignore */
104
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
105
- classes = computed(() => cn('flex h-11 w-full rounded-md bg-transparent px-3 py-3 text-sm outline-none', 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', 'border-b border-border', this.class()), /* @ts-ignore */
106
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
107
- onInput(e) {
108
- this.ctx.query.set(e.target.value);
109
- this.ctx.focusFirst();
110
- }
111
- onArrow(e, delta) {
112
- e.preventDefault();
113
- this.ctx.focusNext(delta);
114
- }
115
- onEnter(e) {
116
- const active = this.ctx.getActive();
117
- if (active) {
118
- e.preventDefault();
119
- active._select(e);
120
- }
121
- }
122
- // Escape clears the query first, and only asks to be dismissed once there is
123
- // nothing left to clear -- the search-field convention, and the one thing a
124
- // standalone Command otherwise had no keyboard route to at all.
125
- //
126
- // Both branches consume the key's default action, so it never also reaches a
127
- // browser-level Escape behaviour. They differ in how far the event travels:
128
- // the clearing keystroke stops here, because overlays read Escape off a
129
- // listener on `body` and letting it carry on would close the dialog or popover
130
- // holding this Command in the same breath as clearing its query. The
131
- // dismissing keystroke does propagate, so a container that closes on Escape
132
- // still closes.
133
- onEscape(e) {
134
- e.preventDefault();
135
- if (this.ctx.query()) {
136
- e.stopPropagation();
137
- this.ctx.query.set('');
138
- this.ctx.focusFirst();
139
- return;
140
- }
141
- this.ctx.requestDismiss();
142
- }
143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
144
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandInputComponent, isStandalone: true, selector: "input[CommandInput]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "text", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "true", "autocomplete": "off" }, listeners: { "input": "onInput($any($event))", "keydown.arrowDown": "onArrow($any($event), 1)", "keydown.arrowUp": "onArrow($any($event), -1)", "keydown.enter": "onEnter($any($event))", "keydown.escape": "onEscape($any($event))" }, properties: { "class": "classes()", "attr.aria-controls": "ctx.listboxId", "attr.aria-activedescendant": "ctx.activeDescendantId()", "value": "ctx.query()", "placeholder": "placeholder()" } }, ngImport: i0, template: ``, isInline: true });
145
- }
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandInputComponent, decorators: [{
147
- type: Component,
148
- args: [{
149
- selector: 'input[CommandInput]',
150
- host: {
151
- '[class]': 'classes()',
152
- type: 'text',
153
- role: 'combobox',
154
- 'aria-autocomplete': 'list',
155
- 'aria-expanded': 'true',
156
- '[attr.aria-controls]': 'ctx.listboxId',
157
- '[attr.aria-activedescendant]': 'ctx.activeDescendantId()',
158
- autocomplete: 'off',
159
- '[value]': 'ctx.query()',
160
- '[placeholder]': 'placeholder()',
161
- '(input)': 'onInput($any($event))',
162
- '(keydown.arrowDown)': 'onArrow($any($event), 1)',
163
- '(keydown.arrowUp)': 'onArrow($any($event), -1)',
164
- '(keydown.enter)': 'onEnter($any($event))',
165
- '(keydown.escape)': 'onEscape($any($event))',
166
- },
167
- template: ``,
168
- }]
169
- }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
170
- class CommandListComponent {
171
- ctx = inject(CommandContextBase);
172
- class = input('', /* @ts-ignore */
173
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
174
- /** Accessible name for the listbox (required on role="listbox"). */
175
- ariaLabel = input('Suggestions', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
176
- classes = computed(() => cn('max-h-75 overflow-y-auto overflow-x-hidden p-1', this.class()), /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
178
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
179
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandListComponent, isStandalone: true, selector: "CommandList", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "class": "classes()", "attr.id": "ctx.listboxId", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
180
- }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandListComponent, decorators: [{
182
- type: Component,
183
- args: [{
184
- selector: 'CommandList',
185
- host: {
186
- '[class]': 'classes()',
187
- role: 'listbox',
188
- '[attr.id]': 'ctx.listboxId',
189
- '[attr.aria-label]': 'ariaLabel()',
190
- },
191
- template: `<ng-content />`,
192
- }]
193
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
194
- class CommandEmptyComponent {
195
- ctx = inject(CommandComponent);
196
- class = input('', /* @ts-ignore */
197
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
198
- classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()), /* @ts-ignore */
199
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
200
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
201
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandEmptyComponent, isStandalone: true, selector: "CommandEmpty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "hidden": "ctx.hasVisibleItems()" } }, ngImport: i0, template: `<ng-content>No results found.</ng-content>`, isInline: true });
202
- }
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandEmptyComponent, decorators: [{
204
- type: Component,
205
- args: [{
206
- selector: 'CommandEmpty',
207
- host: {
208
- '[class]': 'classes()',
209
- '[hidden]': 'ctx.hasVisibleItems()',
210
- },
211
- template: `<ng-content>No results found.</ng-content>`,
212
- }]
213
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
214
- class CommandGroupComponent {
215
- heading = input(null, /* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
217
- class = input('', /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
219
- classes = computed(() => cn('overflow-hidden p-1 text-foreground', this.class()), /* @ts-ignore */
220
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
221
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: CommandGroupComponent, isStandalone: true, selector: "CommandGroup", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { Component, DestroyRef, Directive, ElementRef, computed, forwardRef, inject, input, model, output, signal } from "@angular/core";
3
+ import { cn, injectUniqueId } from "@ojiepermana/angular/component/utils/core";
4
+ var CommandContextBase = class CommandContextBase {
5
+ listboxId = injectUniqueId("CommandList");
6
+ static ɵfac = i0.ɵɵngDeclareFactory({
7
+ minVersion: "12.0.0",
8
+ version: "22.2.0",
9
+ ngImport: i0,
10
+ type: CommandContextBase,
11
+ deps: [],
12
+ target: i0.ɵɵFactoryTarget.Directive
13
+ });
14
+ static ɵdir = i0.ɵɵngDeclareDirective({
15
+ minVersion: "14.0.0",
16
+ version: "22.2.0",
17
+ type: CommandContextBase,
18
+ isStandalone: true,
19
+ ngImport: i0
20
+ });
21
+ };
22
+ i0.ɵɵngDeclareClassMetadata({
23
+ minVersion: "12.0.0",
24
+ version: "22.2.0",
25
+ ngImport: i0,
26
+ type: CommandContextBase,
27
+ decorators: [{ type: Directive }]
28
+ });
29
+ var CommandComponent = class CommandComponent extends CommandContextBase {
30
+ query = model("", ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
31
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
32
+ dismissed = output();
33
+ items = signal([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
34
+ classes = computed(() => cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
35
+ matches(text) {
36
+ const q = this.query().trim().toLowerCase();
37
+ if (!q) return true;
38
+ return text.toLowerCase().includes(q);
39
+ }
40
+ registerItem(item) {
41
+ this.items.update((list) => [...list, item]);
42
+ }
43
+ unregisterItem(item) {
44
+ this.items.update((list) => list.filter((i) => i !== item));
45
+ }
46
+ visibleItems() {
47
+ return this.items().filter((it) => it.visible());
48
+ }
49
+ navigableItems() {
50
+ return this.visibleItems().filter((it) => !it.disabled());
51
+ }
52
+ focusNext(delta) {
53
+ const navigable = this.navigableItems();
54
+ if (navigable.length === 0) return;
55
+ const active = navigable.findIndex((i) => i.active());
56
+ const idx = active < 0 ? 0 : (active + delta + navigable.length) % navigable.length;
57
+ this.setActiveItem(navigable[idx] ?? null);
58
+ }
59
+ focusFirst() {
60
+ this.setActiveItem(this.navigableItems()[0] ?? null);
61
+ }
62
+ requestDismiss() {
63
+ this.dismissed.emit();
64
+ }
65
+ hasVisibleItems() {
66
+ return this.visibleItems().length > 0;
67
+ }
68
+ activateOnly(item) {
69
+ this.setActiveItem(item);
70
+ }
71
+ activeDescendantId() {
72
+ return this.getActive()?.itemId ?? null;
73
+ }
74
+ getActive() {
75
+ const navigable = this.navigableItems();
76
+ return navigable.find((i) => i.active()) ?? navigable[0] ?? null;
77
+ }
78
+ setActiveItem(activeItem) {
79
+ this.items().forEach((item) => item._setActive(item === activeItem));
80
+ }
81
+ static ɵfac = i0.ɵɵngDeclareFactory({
82
+ minVersion: "12.0.0",
83
+ version: "22.2.0",
84
+ ngImport: i0,
85
+ type: CommandComponent,
86
+ deps: null,
87
+ target: i0.ɵɵFactoryTarget.Component
88
+ });
89
+ static ɵcmp = i0.ɵɵngDeclareComponent({
90
+ minVersion: "17.1.0",
91
+ version: "22.2.0",
92
+ type: CommandComponent,
93
+ isStandalone: true,
94
+ selector: "Command",
95
+ inputs: {
96
+ query: {
97
+ classPropertyName: "query",
98
+ publicName: "query",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ class: {
104
+ classPropertyName: "class",
105
+ publicName: "class",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ }
110
+ },
111
+ outputs: {
112
+ query: "queryChange",
113
+ dismissed: "dismissed"
114
+ },
115
+ host: { properties: { "class": "classes()" } },
116
+ providers: [{
117
+ provide: CommandContextBase,
118
+ useExisting: forwardRef(() => CommandComponent)
119
+ }],
120
+ usesInheritance: true,
121
+ ngImport: i0,
122
+ template: `<ng-content />`,
123
+ isInline: true
124
+ });
125
+ };
126
+ i0.ɵɵngDeclareClassMetadata({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.0",
129
+ ngImport: i0,
130
+ type: CommandComponent,
131
+ decorators: [{
132
+ type: Component,
133
+ args: [{
134
+ selector: "Command",
135
+ providers: [{
136
+ provide: CommandContextBase,
137
+ useExisting: forwardRef(() => CommandComponent)
138
+ }],
139
+ host: { "[class]": "classes()" },
140
+ template: `<ng-content />`
141
+ }]
142
+ }],
143
+ propDecorators: {
144
+ query: [{
145
+ type: i0.Input,
146
+ args: [{
147
+ isSignal: true,
148
+ alias: "query",
149
+ required: false
150
+ }]
151
+ }, {
152
+ type: i0.Output,
153
+ args: ["queryChange"]
154
+ }],
155
+ class: [{
156
+ type: i0.Input,
157
+ args: [{
158
+ isSignal: true,
159
+ alias: "class",
160
+ required: false
161
+ }]
162
+ }],
163
+ dismissed: [{
164
+ type: i0.Output,
165
+ args: ["dismissed"]
166
+ }]
167
+ }
168
+ });
169
+ var CommandInputComponent = class CommandInputComponent {
170
+ ctx = inject(CommandComponent);
171
+ placeholder = input("Type a command or search…", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
172
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
173
+ classes = computed(() => cn("flex h-11 w-full rounded-md bg-transparent px-3 py-3 text-sm outline-none", "placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", "border-b border-border", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
174
+ onInput(e) {
175
+ this.ctx.query.set(e.target.value);
176
+ this.ctx.focusFirst();
177
+ }
178
+ onArrow(e, delta) {
179
+ e.preventDefault();
180
+ this.ctx.focusNext(delta);
181
+ }
182
+ onEnter(e) {
183
+ const active = this.ctx.getActive();
184
+ if (active) {
185
+ e.preventDefault();
186
+ active._select(e);
187
+ }
188
+ }
189
+ onEscape(e) {
190
+ e.preventDefault();
191
+ if (this.ctx.query()) {
192
+ e.stopPropagation();
193
+ this.ctx.query.set("");
194
+ this.ctx.focusFirst();
195
+ return;
196
+ }
197
+ this.ctx.requestDismiss();
198
+ }
199
+ static ɵfac = i0.ɵɵngDeclareFactory({
200
+ minVersion: "12.0.0",
201
+ version: "22.2.0",
202
+ ngImport: i0,
203
+ type: CommandInputComponent,
204
+ deps: [],
205
+ target: i0.ɵɵFactoryTarget.Component
206
+ });
207
+ static ɵcmp = i0.ɵɵngDeclareComponent({
208
+ minVersion: "17.1.0",
209
+ version: "22.2.0",
210
+ type: CommandInputComponent,
211
+ isStandalone: true,
212
+ selector: "input[CommandInput]",
213
+ inputs: {
214
+ placeholder: {
215
+ classPropertyName: "placeholder",
216
+ publicName: "placeholder",
217
+ isSignal: true,
218
+ isRequired: false,
219
+ transformFunction: null
220
+ },
221
+ class: {
222
+ classPropertyName: "class",
223
+ publicName: "class",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ }
228
+ },
229
+ host: {
230
+ attributes: {
231
+ "type": "text",
232
+ "role": "combobox",
233
+ "aria-autocomplete": "list",
234
+ "aria-expanded": "true",
235
+ "autocomplete": "off"
236
+ },
237
+ listeners: {
238
+ "input": "onInput($any($event))",
239
+ "keydown.arrowDown": "onArrow($any($event), 1)",
240
+ "keydown.arrowUp": "onArrow($any($event), -1)",
241
+ "keydown.enter": "onEnter($any($event))",
242
+ "keydown.escape": "onEscape($any($event))"
243
+ },
244
+ properties: {
245
+ "class": "classes()",
246
+ "attr.aria-controls": "ctx.listboxId",
247
+ "attr.aria-activedescendant": "ctx.activeDescendantId()",
248
+ "value": "ctx.query()",
249
+ "placeholder": "placeholder()"
250
+ }
251
+ },
252
+ ngImport: i0,
253
+ template: ``,
254
+ isInline: true
255
+ });
256
+ };
257
+ i0.ɵɵngDeclareClassMetadata({
258
+ minVersion: "12.0.0",
259
+ version: "22.2.0",
260
+ ngImport: i0,
261
+ type: CommandInputComponent,
262
+ decorators: [{
263
+ type: Component,
264
+ args: [{
265
+ selector: "input[CommandInput]",
266
+ host: {
267
+ "[class]": "classes()",
268
+ type: "text",
269
+ role: "combobox",
270
+ "aria-autocomplete": "list",
271
+ "aria-expanded": "true",
272
+ "[attr.aria-controls]": "ctx.listboxId",
273
+ "[attr.aria-activedescendant]": "ctx.activeDescendantId()",
274
+ autocomplete: "off",
275
+ "[value]": "ctx.query()",
276
+ "[placeholder]": "placeholder()",
277
+ "(input)": "onInput($any($event))",
278
+ "(keydown.arrowDown)": "onArrow($any($event), 1)",
279
+ "(keydown.arrowUp)": "onArrow($any($event), -1)",
280
+ "(keydown.enter)": "onEnter($any($event))",
281
+ "(keydown.escape)": "onEscape($any($event))"
282
+ },
283
+ template: ``
284
+ }]
285
+ }],
286
+ propDecorators: {
287
+ placeholder: [{
288
+ type: i0.Input,
289
+ args: [{
290
+ isSignal: true,
291
+ alias: "placeholder",
292
+ required: false
293
+ }]
294
+ }],
295
+ class: [{
296
+ type: i0.Input,
297
+ args: [{
298
+ isSignal: true,
299
+ alias: "class",
300
+ required: false
301
+ }]
302
+ }]
303
+ }
304
+ });
305
+ var CommandListComponent = class CommandListComponent {
306
+ ctx = inject(CommandContextBase);
307
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
308
+ ariaLabel = input("Suggestions", {
309
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
310
+ alias: "aria-label"
311
+ });
312
+ classes = computed(() => cn("max-h-75 overflow-y-auto overflow-x-hidden p-1", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
313
+ static ɵfac = i0.ɵɵngDeclareFactory({
314
+ minVersion: "12.0.0",
315
+ version: "22.2.0",
316
+ ngImport: i0,
317
+ type: CommandListComponent,
318
+ deps: [],
319
+ target: i0.ɵɵFactoryTarget.Component
320
+ });
321
+ static ɵcmp = i0.ɵɵngDeclareComponent({
322
+ minVersion: "17.1.0",
323
+ version: "22.2.0",
324
+ type: CommandListComponent,
325
+ isStandalone: true,
326
+ selector: "CommandList",
327
+ inputs: {
328
+ class: {
329
+ classPropertyName: "class",
330
+ publicName: "class",
331
+ isSignal: true,
332
+ isRequired: false,
333
+ transformFunction: null
334
+ },
335
+ ariaLabel: {
336
+ classPropertyName: "ariaLabel",
337
+ publicName: "aria-label",
338
+ isSignal: true,
339
+ isRequired: false,
340
+ transformFunction: null
341
+ }
342
+ },
343
+ host: {
344
+ attributes: { "role": "listbox" },
345
+ properties: {
346
+ "class": "classes()",
347
+ "attr.id": "ctx.listboxId",
348
+ "attr.aria-label": "ariaLabel()"
349
+ }
350
+ },
351
+ ngImport: i0,
352
+ template: `<ng-content />`,
353
+ isInline: true
354
+ });
355
+ };
356
+ i0.ɵɵngDeclareClassMetadata({
357
+ minVersion: "12.0.0",
358
+ version: "22.2.0",
359
+ ngImport: i0,
360
+ type: CommandListComponent,
361
+ decorators: [{
362
+ type: Component,
363
+ args: [{
364
+ selector: "CommandList",
365
+ host: {
366
+ "[class]": "classes()",
367
+ role: "listbox",
368
+ "[attr.id]": "ctx.listboxId",
369
+ "[attr.aria-label]": "ariaLabel()"
370
+ },
371
+ template: `<ng-content />`
372
+ }]
373
+ }],
374
+ propDecorators: {
375
+ class: [{
376
+ type: i0.Input,
377
+ args: [{
378
+ isSignal: true,
379
+ alias: "class",
380
+ required: false
381
+ }]
382
+ }],
383
+ ariaLabel: [{
384
+ type: i0.Input,
385
+ args: [{
386
+ isSignal: true,
387
+ alias: "aria-label",
388
+ required: false
389
+ }]
390
+ }]
391
+ }
392
+ });
393
+ var CommandEmptyComponent = class CommandEmptyComponent {
394
+ ctx = inject(CommandComponent);
395
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
396
+ classes = computed(() => cn("py-6 text-center text-sm text-muted-foreground", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
397
+ static ɵfac = i0.ɵɵngDeclareFactory({
398
+ minVersion: "12.0.0",
399
+ version: "22.2.0",
400
+ ngImport: i0,
401
+ type: CommandEmptyComponent,
402
+ deps: [],
403
+ target: i0.ɵɵFactoryTarget.Component
404
+ });
405
+ static ɵcmp = i0.ɵɵngDeclareComponent({
406
+ minVersion: "17.1.0",
407
+ version: "22.2.0",
408
+ type: CommandEmptyComponent,
409
+ isStandalone: true,
410
+ selector: "CommandEmpty",
411
+ inputs: { class: {
412
+ classPropertyName: "class",
413
+ publicName: "class",
414
+ isSignal: true,
415
+ isRequired: false,
416
+ transformFunction: null
417
+ } },
418
+ host: { properties: {
419
+ "class": "classes()",
420
+ "hidden": "ctx.hasVisibleItems()"
421
+ } },
422
+ ngImport: i0,
423
+ template: `<ng-content>No results found.</ng-content>`,
424
+ isInline: true
425
+ });
426
+ };
427
+ i0.ɵɵngDeclareClassMetadata({
428
+ minVersion: "12.0.0",
429
+ version: "22.2.0",
430
+ ngImport: i0,
431
+ type: CommandEmptyComponent,
432
+ decorators: [{
433
+ type: Component,
434
+ args: [{
435
+ selector: "CommandEmpty",
436
+ host: {
437
+ "[class]": "classes()",
438
+ "[hidden]": "ctx.hasVisibleItems()"
439
+ },
440
+ template: `<ng-content>No results found.</ng-content>`
441
+ }]
442
+ }],
443
+ propDecorators: { class: [{
444
+ type: i0.Input,
445
+ args: [{
446
+ isSignal: true,
447
+ alias: "class",
448
+ required: false
449
+ }]
450
+ }] }
451
+ });
452
+ var CommandGroupComponent = class CommandGroupComponent {
453
+ heading = input(null, ...ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []);
454
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
455
+ classes = computed(() => cn("overflow-hidden p-1 text-foreground", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
456
+ static ɵfac = i0.ɵɵngDeclareFactory({
457
+ minVersion: "12.0.0",
458
+ version: "22.2.0",
459
+ ngImport: i0,
460
+ type: CommandGroupComponent,
461
+ deps: [],
462
+ target: i0.ɵɵFactoryTarget.Component
463
+ });
464
+ static ɵcmp = i0.ɵɵngDeclareComponent({
465
+ minVersion: "17.0.0",
466
+ version: "22.2.0",
467
+ type: CommandGroupComponent,
468
+ isStandalone: true,
469
+ selector: "CommandGroup",
470
+ inputs: {
471
+ heading: {
472
+ classPropertyName: "heading",
473
+ publicName: "heading",
474
+ isSignal: true,
475
+ isRequired: false,
476
+ transformFunction: null
477
+ },
478
+ class: {
479
+ classPropertyName: "class",
480
+ publicName: "class",
481
+ isSignal: true,
482
+ isRequired: false,
483
+ transformFunction: null
484
+ }
485
+ },
486
+ host: {
487
+ attributes: { "role": "group" },
488
+ properties: { "class": "classes()" }
489
+ },
490
+ ngImport: i0,
491
+ template: `
223
492
  @if (heading()) {
224
493
  <div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
225
494
  }
226
495
  <ng-content />
227
- `, isInline: true });
228
- }
229
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandGroupComponent, decorators: [{
230
- type: Component,
231
- args: [{
232
- selector: 'CommandGroup',
233
- host: { '[class]': 'classes()', role: 'group' },
234
- template: `
496
+ `,
497
+ isInline: true
498
+ });
499
+ };
500
+ i0.ɵɵngDeclareClassMetadata({
501
+ minVersion: "12.0.0",
502
+ version: "22.2.0",
503
+ ngImport: i0,
504
+ type: CommandGroupComponent,
505
+ decorators: [{
506
+ type: Component,
507
+ args: [{
508
+ selector: "CommandGroup",
509
+ host: {
510
+ "[class]": "classes()",
511
+ role: "group"
512
+ },
513
+ template: `
235
514
  @if (heading()) {
236
515
  <div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
237
516
  }
238
517
  <ng-content />
239
- `,
240
- }]
241
- }], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
242
- class CommandSeparatorComponent {
243
- class = input('', /* @ts-ignore */
244
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
245
- classes = computed(() => cn('-mx-1 h-px bg-border block', this.class()), /* @ts-ignore */
246
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
247
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
248
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandSeparatorComponent, isStandalone: true, selector: "CommandSeparator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true });
249
- }
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandSeparatorComponent, decorators: [{
251
- type: Component,
252
- args: [{
253
- selector: 'CommandSeparator',
254
- // Decorative divider — a separator is not an allowed child of role="listbox".
255
- host: { '[class]': 'classes()', 'aria-hidden': 'true' },
256
- template: '',
257
- }]
258
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
259
- class CommandItemComponent {
260
- ctx = inject(CommandComponent);
261
- el = inject(ElementRef);
262
- itemId = injectUniqueId('CommandItem');
263
- value = input('', /* @ts-ignore */
264
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
265
- disabled = input(false, /* @ts-ignore */
266
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
267
- class = input('', /* @ts-ignore */
268
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
269
- /**
270
- * Whether this option is the CHOSEN one, which is what `aria-selected`
271
- * reports.
272
- *
273
- * It used to be bound to {@link active}, the highlighted row, which told a
274
- * screen reader the wrong thing: moving the highlight looked like changing the
275
- * selection. The highlighted row is announced through `aria-activedescendant`
276
- * on the input instead, which is the listbox pattern.
277
- */
278
- selectedState = input(false, /* @ts-ignore */
279
- ...(ngDevMode ? [{ debugName: "selectedState" }] : /* istanbul ignore next */ []));
280
- selected = output();
281
- /** The highlighted row. Drives styling and `aria-activedescendant`, not `aria-selected`. */
282
- active = signal(false, /* @ts-ignore */
283
- ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
284
- visible = computed(() => {
285
- const text = this.value() || this.el.nativeElement.textContent || '';
286
- return this.ctx.matches(text);
287
- }, /* @ts-ignore */
288
- ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
289
- classes = computed(() => cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none', 'data-[active=true]:bg-accent data-[active=true]:text-accent-foreground', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', this.class()), /* @ts-ignore */
290
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
291
- constructor() {
292
- this.ctx.registerItem(this);
293
- inject(DestroyRef).onDestroy(() => this.ctx.unregisterItem(this));
294
- }
295
- focus() {
296
- this.el.nativeElement.focus();
297
- }
298
- _setActive(active) {
299
- this.active.set(active);
300
- }
301
- _select(e) {
302
- if (this.disabled())
303
- return;
304
- this.selected.emit(e);
305
- }
306
- onHover() {
307
- if (this.disabled())
308
- return;
309
- this.ctx.activateOnly(this);
310
- }
311
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
312
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandItemComponent, isStandalone: true, selector: "CommandItem, button[CommandItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, selectedState: { classPropertyName: "selectedState", publicName: "selectedState", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "_select($any($event))", "mousemove": "onHover()" }, properties: { "class": "classes()", "attr.id": "itemId", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.aria-selected": "selectedState()", "attr.data-active": "active() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "hidden": "!visible()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
313
- }
314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandItemComponent, decorators: [{
315
- type: Component,
316
- args: [{
317
- selector: 'CommandItem, button[CommandItem]',
318
- host: {
319
- '[class]': 'classes()',
320
- '[attr.id]': 'itemId',
321
- '[attr.role]': '"option"',
322
- '[attr.tabindex]': '-1',
323
- '[attr.aria-selected]': 'selectedState()',
324
- '[attr.data-active]': 'active() ? "true" : null',
325
- '[attr.data-disabled]': 'disabled() ? "true" : null',
326
- '[attr.aria-disabled]': 'disabled() ? "true" : null',
327
- '[hidden]': '!visible()',
328
- '(click)': '_select($any($event))',
329
- '(mousemove)': 'onHover()',
330
- },
331
- template: `<ng-content />`,
332
- }]
333
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], selectedState: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedState", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
334
- class CommandShortcutComponent {
335
- class = input('', /* @ts-ignore */
336
- ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
337
- classes = computed(() => cn('ml-auto text-xs tracking-widest text-muted-foreground', this.class()), /* @ts-ignore */
338
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
339
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
340
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CommandShortcutComponent, isStandalone: true, selector: "span[CommandShortcut]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
341
- }
342
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CommandShortcutComponent, decorators: [{
343
- type: Component,
344
- args: [{
345
- selector: 'span[CommandShortcut]',
346
- host: { '[class]': 'classes()' },
347
- template: `<ng-content />`,
348
- }]
349
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
350
-
351
- /**
352
- * Generated bundle index. Do not edit.
353
- */
354
-
355
- export { CommandComponent, CommandContextBase, CommandEmptyComponent, CommandGroupComponent, CommandInputComponent, CommandItemComponent, CommandListComponent, CommandSeparatorComponent, CommandShortcutComponent };
518
+ `
519
+ }]
520
+ }],
521
+ propDecorators: {
522
+ heading: [{
523
+ type: i0.Input,
524
+ args: [{
525
+ isSignal: true,
526
+ alias: "heading",
527
+ required: false
528
+ }]
529
+ }],
530
+ class: [{
531
+ type: i0.Input,
532
+ args: [{
533
+ isSignal: true,
534
+ alias: "class",
535
+ required: false
536
+ }]
537
+ }]
538
+ }
539
+ });
540
+ var CommandSeparatorComponent = class CommandSeparatorComponent {
541
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
542
+ classes = computed(() => cn("-mx-1 h-px bg-border block", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
543
+ static ɵfac = i0.ɵɵngDeclareFactory({
544
+ minVersion: "12.0.0",
545
+ version: "22.2.0",
546
+ ngImport: i0,
547
+ type: CommandSeparatorComponent,
548
+ deps: [],
549
+ target: i0.ɵɵFactoryTarget.Component
550
+ });
551
+ static ɵcmp = i0.ɵɵngDeclareComponent({
552
+ minVersion: "17.1.0",
553
+ version: "22.2.0",
554
+ type: CommandSeparatorComponent,
555
+ isStandalone: true,
556
+ selector: "CommandSeparator",
557
+ inputs: { class: {
558
+ classPropertyName: "class",
559
+ publicName: "class",
560
+ isSignal: true,
561
+ isRequired: false,
562
+ transformFunction: null
563
+ } },
564
+ host: {
565
+ attributes: { "aria-hidden": "true" },
566
+ properties: { "class": "classes()" }
567
+ },
568
+ ngImport: i0,
569
+ template: "",
570
+ isInline: true
571
+ });
572
+ };
573
+ i0.ɵɵngDeclareClassMetadata({
574
+ minVersion: "12.0.0",
575
+ version: "22.2.0",
576
+ ngImport: i0,
577
+ type: CommandSeparatorComponent,
578
+ decorators: [{
579
+ type: Component,
580
+ args: [{
581
+ selector: "CommandSeparator",
582
+ host: {
583
+ "[class]": "classes()",
584
+ "aria-hidden": "true"
585
+ },
586
+ template: ""
587
+ }]
588
+ }],
589
+ propDecorators: { class: [{
590
+ type: i0.Input,
591
+ args: [{
592
+ isSignal: true,
593
+ alias: "class",
594
+ required: false
595
+ }]
596
+ }] }
597
+ });
598
+ var CommandItemComponent = class CommandItemComponent {
599
+ ctx = inject(CommandComponent);
600
+ el = inject(ElementRef);
601
+ itemId = injectUniqueId("CommandItem");
602
+ value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
603
+ disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
604
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
605
+ selectedState = input(false, ...ngDevMode ? [{ debugName: "selectedState" }] : /* istanbul ignore next */ []);
606
+ selected = output();
607
+ active = signal(false, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
608
+ visible = computed(() => {
609
+ const text = this.value() || this.el.nativeElement.textContent || "";
610
+ return this.ctx.matches(text);
611
+ }, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
612
+ classes = computed(() => cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none", "data-[active=true]:bg-accent data-[active=true]:text-accent-foreground", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
613
+ constructor() {
614
+ this.ctx.registerItem(this);
615
+ inject(DestroyRef).onDestroy(() => this.ctx.unregisterItem(this));
616
+ }
617
+ focus() {
618
+ this.el.nativeElement.focus();
619
+ }
620
+ _setActive(active) {
621
+ this.active.set(active);
622
+ }
623
+ _select(e) {
624
+ if (this.disabled()) return;
625
+ this.selected.emit(e);
626
+ }
627
+ onHover() {
628
+ if (this.disabled()) return;
629
+ this.ctx.activateOnly(this);
630
+ }
631
+ static ɵfac = i0.ɵɵngDeclareFactory({
632
+ minVersion: "12.0.0",
633
+ version: "22.2.0",
634
+ ngImport: i0,
635
+ type: CommandItemComponent,
636
+ deps: [],
637
+ target: i0.ɵɵFactoryTarget.Component
638
+ });
639
+ static ɵcmp = i0.ɵɵngDeclareComponent({
640
+ minVersion: "17.1.0",
641
+ version: "22.2.0",
642
+ type: CommandItemComponent,
643
+ isStandalone: true,
644
+ selector: "CommandItem, button[CommandItem]",
645
+ inputs: {
646
+ value: {
647
+ classPropertyName: "value",
648
+ publicName: "value",
649
+ isSignal: true,
650
+ isRequired: false,
651
+ transformFunction: null
652
+ },
653
+ disabled: {
654
+ classPropertyName: "disabled",
655
+ publicName: "disabled",
656
+ isSignal: true,
657
+ isRequired: false,
658
+ transformFunction: null
659
+ },
660
+ class: {
661
+ classPropertyName: "class",
662
+ publicName: "class",
663
+ isSignal: true,
664
+ isRequired: false,
665
+ transformFunction: null
666
+ },
667
+ selectedState: {
668
+ classPropertyName: "selectedState",
669
+ publicName: "selectedState",
670
+ isSignal: true,
671
+ isRequired: false,
672
+ transformFunction: null
673
+ }
674
+ },
675
+ outputs: { selected: "selected" },
676
+ host: {
677
+ listeners: {
678
+ "click": "_select($any($event))",
679
+ "mousemove": "onHover()"
680
+ },
681
+ properties: {
682
+ "class": "classes()",
683
+ "attr.id": "itemId",
684
+ "attr.role": "\"option\"",
685
+ "attr.tabindex": "-1",
686
+ "attr.aria-selected": "selectedState()",
687
+ "attr.data-active": "active() ? \"true\" : null",
688
+ "attr.data-disabled": "disabled() ? \"true\" : null",
689
+ "attr.aria-disabled": "disabled() ? \"true\" : null",
690
+ "hidden": "!visible()"
691
+ }
692
+ },
693
+ ngImport: i0,
694
+ template: `<ng-content />`,
695
+ isInline: true
696
+ });
697
+ };
698
+ i0.ɵɵngDeclareClassMetadata({
699
+ minVersion: "12.0.0",
700
+ version: "22.2.0",
701
+ ngImport: i0,
702
+ type: CommandItemComponent,
703
+ decorators: [{
704
+ type: Component,
705
+ args: [{
706
+ selector: "CommandItem, button[CommandItem]",
707
+ host: {
708
+ "[class]": "classes()",
709
+ "[attr.id]": "itemId",
710
+ "[attr.role]": "\"option\"",
711
+ "[attr.tabindex]": "-1",
712
+ "[attr.aria-selected]": "selectedState()",
713
+ "[attr.data-active]": "active() ? \"true\" : null",
714
+ "[attr.data-disabled]": "disabled() ? \"true\" : null",
715
+ "[attr.aria-disabled]": "disabled() ? \"true\" : null",
716
+ "[hidden]": "!visible()",
717
+ "(click)": "_select($any($event))",
718
+ "(mousemove)": "onHover()"
719
+ },
720
+ template: `<ng-content />`
721
+ }]
722
+ }],
723
+ ctorParameters: () => [],
724
+ propDecorators: {
725
+ value: [{
726
+ type: i0.Input,
727
+ args: [{
728
+ isSignal: true,
729
+ alias: "value",
730
+ required: false
731
+ }]
732
+ }],
733
+ disabled: [{
734
+ type: i0.Input,
735
+ args: [{
736
+ isSignal: true,
737
+ alias: "disabled",
738
+ required: false
739
+ }]
740
+ }],
741
+ class: [{
742
+ type: i0.Input,
743
+ args: [{
744
+ isSignal: true,
745
+ alias: "class",
746
+ required: false
747
+ }]
748
+ }],
749
+ selectedState: [{
750
+ type: i0.Input,
751
+ args: [{
752
+ isSignal: true,
753
+ alias: "selectedState",
754
+ required: false
755
+ }]
756
+ }],
757
+ selected: [{
758
+ type: i0.Output,
759
+ args: ["selected"]
760
+ }]
761
+ }
762
+ });
763
+ var CommandShortcutComponent = class CommandShortcutComponent {
764
+ class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
765
+ classes = computed(() => cn("ml-auto text-xs tracking-widest text-muted-foreground", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
766
+ static ɵfac = i0.ɵɵngDeclareFactory({
767
+ minVersion: "12.0.0",
768
+ version: "22.2.0",
769
+ ngImport: i0,
770
+ type: CommandShortcutComponent,
771
+ deps: [],
772
+ target: i0.ɵɵFactoryTarget.Component
773
+ });
774
+ static ɵcmp = i0.ɵɵngDeclareComponent({
775
+ minVersion: "17.1.0",
776
+ version: "22.2.0",
777
+ type: CommandShortcutComponent,
778
+ isStandalone: true,
779
+ selector: "span[CommandShortcut]",
780
+ inputs: { class: {
781
+ classPropertyName: "class",
782
+ publicName: "class",
783
+ isSignal: true,
784
+ isRequired: false,
785
+ transformFunction: null
786
+ } },
787
+ host: { properties: { "class": "classes()" } },
788
+ ngImport: i0,
789
+ template: `<ng-content />`,
790
+ isInline: true
791
+ });
792
+ };
793
+ i0.ɵɵngDeclareClassMetadata({
794
+ minVersion: "12.0.0",
795
+ version: "22.2.0",
796
+ ngImport: i0,
797
+ type: CommandShortcutComponent,
798
+ decorators: [{
799
+ type: Component,
800
+ args: [{
801
+ selector: "span[CommandShortcut]",
802
+ host: { "[class]": "classes()" },
803
+ template: `<ng-content />`
804
+ }]
805
+ }],
806
+ propDecorators: { class: [{
807
+ type: i0.Input,
808
+ args: [{
809
+ isSignal: true,
810
+ alias: "class",
811
+ required: false
812
+ }]
813
+ }] }
814
+ });
815
+ export { CommandComponent, CommandContextBase, CommandEmptyComponent, CommandGroupComponent, CommandInputComponent, CommandItemComponent, CommandListComponent, CommandSeparatorComponent, CommandShortcutComponent };