@loomui-ng/ui 0.0.0-stage → 0.1.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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -2
  3. package/accordion/README.md +38 -0
  4. package/alert/README.md +32 -0
  5. package/alert-dialog/README.md +37 -0
  6. package/aspect-ratio/README.md +24 -0
  7. package/attachment/README.md +40 -0
  8. package/avatar/README.md +34 -0
  9. package/badge/README.md +29 -0
  10. package/breadcrumb/README.md +33 -0
  11. package/bubble/README.md +32 -0
  12. package/button/README.md +31 -0
  13. package/button-group/README.md +30 -0
  14. package/calendar/README.md +35 -0
  15. package/card/README.md +41 -0
  16. package/carousel/README.md +41 -0
  17. package/chart/README.md +25 -0
  18. package/checkbox/README.md +31 -0
  19. package/collapsible/README.md +31 -0
  20. package/combobox/README.md +47 -0
  21. package/command/README.md +44 -0
  22. package/context-menu/README.md +36 -0
  23. package/data-table/README.md +39 -0
  24. package/date-picker/README.md +23 -0
  25. package/dialog/README.md +52 -0
  26. package/direction/README.md +19 -0
  27. package/drawer/README.md +37 -0
  28. package/dropdown-menu/README.md +46 -0
  29. package/empty/README.md +38 -0
  30. package/fesm2022/loomui-ng-ui-accordion.mjs +555 -0
  31. package/fesm2022/loomui-ng-ui-accordion.mjs.map +1 -0
  32. package/fesm2022/loomui-ng-ui-alert-dialog.mjs +652 -0
  33. package/fesm2022/loomui-ng-ui-alert-dialog.mjs.map +1 -0
  34. package/fesm2022/loomui-ng-ui-alert.mjs +286 -0
  35. package/fesm2022/loomui-ng-ui-alert.mjs.map +1 -0
  36. package/fesm2022/loomui-ng-ui-aspect-ratio.mjs +97 -0
  37. package/fesm2022/loomui-ng-ui-aspect-ratio.mjs.map +1 -0
  38. package/fesm2022/loomui-ng-ui-attachment.mjs +713 -0
  39. package/fesm2022/loomui-ng-ui-attachment.mjs.map +1 -0
  40. package/fesm2022/loomui-ng-ui-avatar.mjs +561 -0
  41. package/fesm2022/loomui-ng-ui-avatar.mjs.map +1 -0
  42. package/fesm2022/loomui-ng-ui-badge.mjs +102 -0
  43. package/fesm2022/loomui-ng-ui-badge.mjs.map +1 -0
  44. package/fesm2022/loomui-ng-ui-breadcrumb.mjs +520 -0
  45. package/fesm2022/loomui-ng-ui-breadcrumb.mjs.map +1 -0
  46. package/fesm2022/loomui-ng-ui-bubble.mjs +386 -0
  47. package/fesm2022/loomui-ng-ui-bubble.mjs.map +1 -0
  48. package/fesm2022/loomui-ng-ui-button-group.mjs +193 -0
  49. package/fesm2022/loomui-ng-ui-button-group.mjs.map +1 -0
  50. package/fesm2022/loomui-ng-ui-button.mjs +162 -0
  51. package/fesm2022/loomui-ng-ui-button.mjs.map +1 -0
  52. package/fesm2022/loomui-ng-ui-calendar.mjs +681 -0
  53. package/fesm2022/loomui-ng-ui-calendar.mjs.map +1 -0
  54. package/fesm2022/loomui-ng-ui-card.mjs +461 -0
  55. package/fesm2022/loomui-ng-ui-card.mjs.map +1 -0
  56. package/fesm2022/loomui-ng-ui-carousel.mjs +532 -0
  57. package/fesm2022/loomui-ng-ui-carousel.mjs.map +1 -0
  58. package/fesm2022/loomui-ng-ui-chart.mjs +373 -0
  59. package/fesm2022/loomui-ng-ui-chart.mjs.map +1 -0
  60. package/fesm2022/loomui-ng-ui-checkbox.mjs +265 -0
  61. package/fesm2022/loomui-ng-ui-checkbox.mjs.map +1 -0
  62. package/fesm2022/loomui-ng-ui-collapsible.mjs +274 -0
  63. package/fesm2022/loomui-ng-ui-collapsible.mjs.map +1 -0
  64. package/fesm2022/loomui-ng-ui-combobox.mjs +971 -0
  65. package/fesm2022/loomui-ng-ui-combobox.mjs.map +1 -0
  66. package/fesm2022/loomui-ng-ui-command.mjs +982 -0
  67. package/fesm2022/loomui-ng-ui-command.mjs.map +1 -0
  68. package/fesm2022/loomui-ng-ui-context-menu.mjs +1359 -0
  69. package/fesm2022/loomui-ng-ui-context-menu.mjs.map +1 -0
  70. package/fesm2022/loomui-ng-ui-data-table.mjs +535 -0
  71. package/fesm2022/loomui-ng-ui-data-table.mjs.map +1 -0
  72. package/fesm2022/loomui-ng-ui-date-picker.mjs +312 -0
  73. package/fesm2022/loomui-ng-ui-date-picker.mjs.map +1 -0
  74. package/fesm2022/loomui-ng-ui-dialog.mjs +508 -0
  75. package/fesm2022/loomui-ng-ui-dialog.mjs.map +1 -0
  76. package/fesm2022/loomui-ng-ui-direction.mjs +112 -0
  77. package/fesm2022/loomui-ng-ui-direction.mjs.map +1 -0
  78. package/fesm2022/loomui-ng-ui-drawer.mjs +590 -0
  79. package/fesm2022/loomui-ng-ui-drawer.mjs.map +1 -0
  80. package/fesm2022/loomui-ng-ui-dropdown-menu.mjs +1322 -0
  81. package/fesm2022/loomui-ng-ui-dropdown-menu.mjs.map +1 -0
  82. package/fesm2022/loomui-ng-ui-empty.mjs +408 -0
  83. package/fesm2022/loomui-ng-ui-empty.mjs.map +1 -0
  84. package/fesm2022/loomui-ng-ui-field.mjs +630 -0
  85. package/fesm2022/loomui-ng-ui-field.mjs.map +1 -0
  86. package/fesm2022/loomui-ng-ui-hover-card.mjs +230 -0
  87. package/fesm2022/loomui-ng-ui-hover-card.mjs.map +1 -0
  88. package/fesm2022/loomui-ng-ui-icon.mjs +498 -0
  89. package/fesm2022/loomui-ng-ui-icon.mjs.map +1 -0
  90. package/fesm2022/loomui-ng-ui-input-group.mjs +463 -0
  91. package/fesm2022/loomui-ng-ui-input-group.mjs.map +1 -0
  92. package/fesm2022/loomui-ng-ui-input-otp.mjs +586 -0
  93. package/fesm2022/loomui-ng-ui-input-otp.mjs.map +1 -0
  94. package/fesm2022/loomui-ng-ui-input.mjs +289 -0
  95. package/fesm2022/loomui-ng-ui-input.mjs.map +1 -0
  96. package/fesm2022/loomui-ng-ui-item.mjs +598 -0
  97. package/fesm2022/loomui-ng-ui-item.mjs.map +1 -0
  98. package/fesm2022/loomui-ng-ui-kbd.mjs +129 -0
  99. package/fesm2022/loomui-ng-ui-kbd.mjs.map +1 -0
  100. package/fesm2022/loomui-ng-ui-label.mjs +68 -0
  101. package/fesm2022/loomui-ng-ui-label.mjs.map +1 -0
  102. package/fesm2022/loomui-ng-ui-marker.mjs +234 -0
  103. package/fesm2022/loomui-ng-ui-marker.mjs.map +1 -0
  104. package/fesm2022/loomui-ng-ui-menubar.mjs +1523 -0
  105. package/fesm2022/loomui-ng-ui-menubar.mjs.map +1 -0
  106. package/fesm2022/loomui-ng-ui-message-scroller.mjs +519 -0
  107. package/fesm2022/loomui-ng-ui-message-scroller.mjs.map +1 -0
  108. package/fesm2022/loomui-ng-ui-message.mjs +408 -0
  109. package/fesm2022/loomui-ng-ui-message.mjs.map +1 -0
  110. package/fesm2022/loomui-ng-ui-native-select.mjs +389 -0
  111. package/fesm2022/loomui-ng-ui-native-select.mjs.map +1 -0
  112. package/fesm2022/loomui-ng-ui-navigation-menu.mjs +609 -0
  113. package/fesm2022/loomui-ng-ui-navigation-menu.mjs.map +1 -0
  114. package/fesm2022/loomui-ng-ui-pagination.mjs +611 -0
  115. package/fesm2022/loomui-ng-ui-pagination.mjs.map +1 -0
  116. package/fesm2022/loomui-ng-ui-popover.mjs +358 -0
  117. package/fesm2022/loomui-ng-ui-popover.mjs.map +1 -0
  118. package/fesm2022/loomui-ng-ui-progress.mjs +159 -0
  119. package/fesm2022/loomui-ng-ui-progress.mjs.map +1 -0
  120. package/fesm2022/loomui-ng-ui-questionnaire.mjs +1012 -0
  121. package/fesm2022/loomui-ng-ui-questionnaire.mjs.map +1 -0
  122. package/fesm2022/loomui-ng-ui-radio-group.mjs +399 -0
  123. package/fesm2022/loomui-ng-ui-radio-group.mjs.map +1 -0
  124. package/fesm2022/loomui-ng-ui-resizable.mjs +518 -0
  125. package/fesm2022/loomui-ng-ui-resizable.mjs.map +1 -0
  126. package/fesm2022/loomui-ng-ui-scroll-area.mjs +135 -0
  127. package/fesm2022/loomui-ng-ui-scroll-area.mjs.map +1 -0
  128. package/fesm2022/loomui-ng-ui-select.mjs +863 -0
  129. package/fesm2022/loomui-ng-ui-select.mjs.map +1 -0
  130. package/fesm2022/loomui-ng-ui-separator.mjs +114 -0
  131. package/fesm2022/loomui-ng-ui-separator.mjs.map +1 -0
  132. package/fesm2022/loomui-ng-ui-sheet.mjs +530 -0
  133. package/fesm2022/loomui-ng-ui-sheet.mjs.map +1 -0
  134. package/fesm2022/loomui-ng-ui-sidebar.mjs +1918 -0
  135. package/fesm2022/loomui-ng-ui-sidebar.mjs.map +1 -0
  136. package/fesm2022/loomui-ng-ui-skeleton.mjs +69 -0
  137. package/fesm2022/loomui-ng-ui-skeleton.mjs.map +1 -0
  138. package/fesm2022/loomui-ng-ui-slider.mjs +390 -0
  139. package/fesm2022/loomui-ng-ui-slider.mjs.map +1 -0
  140. package/fesm2022/loomui-ng-ui-spinner.mjs +85 -0
  141. package/fesm2022/loomui-ng-ui-spinner.mjs.map +1 -0
  142. package/fesm2022/loomui-ng-ui-switch.mjs +212 -0
  143. package/fesm2022/loomui-ng-ui-switch.mjs.map +1 -0
  144. package/fesm2022/loomui-ng-ui-table.mjs +559 -0
  145. package/fesm2022/loomui-ng-ui-table.mjs.map +1 -0
  146. package/fesm2022/loomui-ng-ui-tabs.mjs +544 -0
  147. package/fesm2022/loomui-ng-ui-tabs.mjs.map +1 -0
  148. package/fesm2022/loomui-ng-ui-textarea.mjs +206 -0
  149. package/fesm2022/loomui-ng-ui-textarea.mjs.map +1 -0
  150. package/fesm2022/loomui-ng-ui-toast.mjs +432 -0
  151. package/fesm2022/loomui-ng-ui-toast.mjs.map +1 -0
  152. package/fesm2022/loomui-ng-ui-toggle-group.mjs +477 -0
  153. package/fesm2022/loomui-ng-ui-toggle-group.mjs.map +1 -0
  154. package/fesm2022/loomui-ng-ui-toggle.mjs +219 -0
  155. package/fesm2022/loomui-ng-ui-toggle.mjs.map +1 -0
  156. package/fesm2022/loomui-ng-ui-tooltip.mjs +240 -0
  157. package/fesm2022/loomui-ng-ui-tooltip.mjs.map +1 -0
  158. package/fesm2022/loomui-ng-ui-typography.mjs +129 -0
  159. package/fesm2022/loomui-ng-ui-typography.mjs.map +1 -0
  160. package/fesm2022/loomui-ng-ui-utils.mjs +1533 -0
  161. package/fesm2022/loomui-ng-ui-utils.mjs.map +1 -0
  162. package/fesm2022/loomui-ng-ui.mjs +4 -0
  163. package/fesm2022/loomui-ng-ui.mjs.map +1 -0
  164. package/field/README.md +43 -0
  165. package/hover-card/README.md +31 -0
  166. package/icon/README.md +42 -0
  167. package/input/README.md +26 -0
  168. package/input-group/README.md +40 -0
  169. package/input-otp/README.md +35 -0
  170. package/item/README.md +33 -0
  171. package/kbd/README.md +21 -0
  172. package/label/README.md +24 -0
  173. package/marker/README.md +24 -0
  174. package/menubar/README.md +40 -0
  175. package/message/README.md +32 -0
  176. package/message-scroller/README.md +40 -0
  177. package/native-select/README.md +26 -0
  178. package/navigation-menu/README.md +39 -0
  179. package/package.json +325 -3
  180. package/pagination/README.md +37 -0
  181. package/popover/README.md +37 -0
  182. package/progress/README.md +25 -0
  183. package/questionnaire/README.md +52 -0
  184. package/radio-group/README.md +33 -0
  185. package/resizable/README.md +37 -0
  186. package/scroll-area/README.md +25 -0
  187. package/select/README.md +45 -0
  188. package/separator/README.md +28 -0
  189. package/sheet/README.md +38 -0
  190. package/sidebar/README.md +60 -0
  191. package/skeleton/README.md +21 -0
  192. package/slider/README.md +29 -0
  193. package/spinner/README.md +15 -0
  194. package/styles/loomui.css +330 -0
  195. package/switch/README.md +29 -0
  196. package/table/README.md +31 -0
  197. package/tabs/README.md +42 -0
  198. package/textarea/README.md +28 -0
  199. package/toast/README.md +27 -0
  200. package/toggle/README.md +27 -0
  201. package/toggle-group/README.md +37 -0
  202. package/tooltip/README.md +31 -0
  203. package/types/loomui-ng-ui-accordion.d.ts +141 -0
  204. package/types/loomui-ng-ui-alert-dialog.d.ts +175 -0
  205. package/types/loomui-ng-ui-alert.d.ts +77 -0
  206. package/types/loomui-ng-ui-aspect-ratio.d.ts +31 -0
  207. package/types/loomui-ng-ui-attachment.d.ts +192 -0
  208. package/types/loomui-ng-ui-avatar.d.ts +147 -0
  209. package/types/loomui-ng-ui-badge.d.ts +32 -0
  210. package/types/loomui-ng-ui-breadcrumb.d.ts +118 -0
  211. package/types/loomui-ng-ui-bubble.d.ts +100 -0
  212. package/types/loomui-ng-ui-button-group.d.ts +51 -0
  213. package/types/loomui-ng-ui-button.d.ts +57 -0
  214. package/types/loomui-ng-ui-calendar.d.ts +171 -0
  215. package/types/loomui-ng-ui-card.d.ts +123 -0
  216. package/types/loomui-ng-ui-carousel.d.ts +140 -0
  217. package/types/loomui-ng-ui-chart.d.ts +95 -0
  218. package/types/loomui-ng-ui-checkbox.d.ts +62 -0
  219. package/types/loomui-ng-ui-collapsible.d.ts +74 -0
  220. package/types/loomui-ng-ui-combobox.d.ts +229 -0
  221. package/types/loomui-ng-ui-command.d.ts +231 -0
  222. package/types/loomui-ng-ui-context-menu.d.ts +288 -0
  223. package/types/loomui-ng-ui-data-table.d.ts +111 -0
  224. package/types/loomui-ng-ui-date-picker.d.ts +63 -0
  225. package/types/loomui-ng-ui-dialog.d.ts +127 -0
  226. package/types/loomui-ng-ui-direction.d.ts +42 -0
  227. package/types/loomui-ng-ui-drawer.d.ts +149 -0
  228. package/types/loomui-ng-ui-dropdown-menu.d.ts +258 -0
  229. package/types/loomui-ng-ui-empty.d.ts +109 -0
  230. package/types/loomui-ng-ui-field.d.ts +169 -0
  231. package/types/loomui-ng-ui-hover-card.d.ts +62 -0
  232. package/types/loomui-ng-ui-icon.d.ts +156 -0
  233. package/types/loomui-ng-ui-input-group.d.ts +130 -0
  234. package/types/loomui-ng-ui-input-otp.d.ts +149 -0
  235. package/types/loomui-ng-ui-input.d.ts +89 -0
  236. package/types/loomui-ng-ui-item.d.ts +157 -0
  237. package/types/loomui-ng-ui-kbd.d.ts +36 -0
  238. package/types/loomui-ng-ui-label.d.ts +19 -0
  239. package/types/loomui-ng-ui-marker.d.ts +61 -0
  240. package/types/loomui-ng-ui-menubar.d.ts +321 -0
  241. package/types/loomui-ng-ui-message-scroller.d.ts +138 -0
  242. package/types/loomui-ng-ui-message.d.ts +109 -0
  243. package/types/loomui-ng-ui-native-select.d.ts +84 -0
  244. package/types/loomui-ng-ui-navigation-menu.d.ts +160 -0
  245. package/types/loomui-ng-ui-pagination.d.ts +130 -0
  246. package/types/loomui-ng-ui-popover.d.ts +90 -0
  247. package/types/loomui-ng-ui-progress.d.ts +39 -0
  248. package/types/loomui-ng-ui-questionnaire.d.ts +274 -0
  249. package/types/loomui-ng-ui-radio-group.d.ts +109 -0
  250. package/types/loomui-ng-ui-resizable.d.ts +121 -0
  251. package/types/loomui-ng-ui-scroll-area.d.ts +44 -0
  252. package/types/loomui-ng-ui-select.d.ts +204 -0
  253. package/types/loomui-ng-ui-separator.d.ts +35 -0
  254. package/types/loomui-ng-ui-sheet.d.ts +124 -0
  255. package/types/loomui-ng-ui-sidebar.d.ts +485 -0
  256. package/types/loomui-ng-ui-skeleton.d.ts +20 -0
  257. package/types/loomui-ng-ui-slider.d.ts +103 -0
  258. package/types/loomui-ng-ui-spinner.d.ts +19 -0
  259. package/types/loomui-ng-ui-switch.d.ts +56 -0
  260. package/types/loomui-ng-ui-table.d.ts +148 -0
  261. package/types/loomui-ng-ui-tabs.d.ts +148 -0
  262. package/types/loomui-ng-ui-textarea.d.ts +52 -0
  263. package/types/loomui-ng-ui-toast.d.ts +97 -0
  264. package/types/loomui-ng-ui-toggle-group.d.ts +138 -0
  265. package/types/loomui-ng-ui-toggle.d.ts +63 -0
  266. package/types/loomui-ng-ui-tooltip.d.ts +63 -0
  267. package/types/loomui-ng-ui-typography.d.ts +42 -0
  268. package/types/loomui-ng-ui-utils.d.ts +392 -0
  269. package/types/loomui-ng-ui.d.ts +5 -0
  270. package/typography/README.md +29 -0
@@ -0,0 +1,982 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, booleanAttribute, computed, contentChildren, forwardRef, inject, input, output, signal } from "@angular/core";
3
+ import * as i1 from "@loomui-ng/ui/utils";
4
+ import { UiElementHost, cn, nextId } from "@loomui-ng/ui/utils";
5
+ import { UiIconSvg } from "@loomui-ng/ui/icon";
6
+ var UiCommand = class UiCommand {
7
+ userClass = input("", {
8
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
9
+ alias: "class"
10
+ });
11
+ search = signal("", ...ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []);
12
+ listId = nextId("ui-command-list");
13
+ items = contentChildren(forwardRef(() => UiCommandItem), {
14
+ ...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
15
+ descendants: true
16
+ });
17
+ selectedId = signal(null, ...ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []);
18
+ classes = computed(() => cn("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
19
+ visibleItems = computed(() => this.items().filter((i) => i.visible()), ...ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []);
20
+ hasResults = computed(() => this.visibleItems().length > 0, ...ngDevMode ? [{ debugName: "hasResults" }] : /* istanbul ignore next */ []);
21
+ constructor() {
22
+ queueMicrotask(() => this.ensureSelection(true));
23
+ }
24
+ matches(value, keywords) {
25
+ const q = this.search().trim().toLowerCase();
26
+ if (!q) return true;
27
+ return [value, ...keywords].some((s) => s.toLowerCase().includes(q));
28
+ }
29
+ ensureSelection(reset = false) {
30
+ const enabled = this.visibleItems().filter((i) => !i.disabled);
31
+ const current = enabled.find((i) => i.id === this.selectedId());
32
+ if (reset || !current) this.selectedId.set(enabled[0]?.id ?? null);
33
+ }
34
+ move(delta) {
35
+ const enabled = this.visibleItems().filter((i) => !i.disabled);
36
+ if (!enabled.length) return;
37
+ let idx = enabled.findIndex((i) => i.id === this.selectedId());
38
+ if (delta === "first") idx = 0;
39
+ else if (delta === "last") idx = enabled.length - 1;
40
+ else idx = (idx + delta + enabled.length) % enabled.length;
41
+ this.selectedId.set(enabled[idx].id);
42
+ enabled[idx].scrollIntoView();
43
+ }
44
+ activateSelected() {
45
+ this.items().find((i) => i.id === this.selectedId())?.activate();
46
+ }
47
+ static ɵfac = i0.ɵɵngDeclareFactory({
48
+ minVersion: "12.0.0",
49
+ version: "22.2.2",
50
+ ngImport: i0,
51
+ type: UiCommand,
52
+ deps: [],
53
+ target: i0.ɵɵFactoryTarget.Directive
54
+ });
55
+ static ɵdir = i0.ɵɵngDeclareDirective({
56
+ minVersion: "17.2.0",
57
+ version: "22.2.2",
58
+ type: UiCommand,
59
+ isStandalone: true,
60
+ selector: "[uiCommand], ui-command",
61
+ inputs: { userClass: {
62
+ classPropertyName: "userClass",
63
+ publicName: "class",
64
+ isSignal: true,
65
+ isRequired: false,
66
+ transformFunction: null
67
+ } },
68
+ host: {
69
+ attributes: {
70
+ "tabindex": "-1",
71
+ "data-slot": "command"
72
+ },
73
+ properties: { "attr.class": "classes()" }
74
+ },
75
+ queries: [{
76
+ propertyName: "items",
77
+ predicate: i0.forwardRef(() => UiCommandItem),
78
+ descendants: true,
79
+ isSignal: true
80
+ }],
81
+ exportAs: ["uiCommand"],
82
+ hostDirectives: [{ directive: i1.UiElementHost }],
83
+ ngImport: i0
84
+ });
85
+ };
86
+ i0.ɵɵngDeclareClassMetadata({
87
+ minVersion: "12.0.0",
88
+ version: "22.2.2",
89
+ ngImport: i0,
90
+ type: UiCommand,
91
+ decorators: [{
92
+ type: Directive,
93
+ args: [{
94
+ selector: "[uiCommand], ui-command",
95
+ hostDirectives: [UiElementHost],
96
+ exportAs: "uiCommand",
97
+ host: {
98
+ tabindex: "-1",
99
+ "data-slot": "command",
100
+ "[attr.class]": "classes()"
101
+ }
102
+ }]
103
+ }],
104
+ ctorParameters: () => [],
105
+ propDecorators: {
106
+ userClass: [{
107
+ type: i0.Input,
108
+ args: [{
109
+ isSignal: true,
110
+ alias: "class",
111
+ required: false
112
+ }]
113
+ }],
114
+ items: [{
115
+ type: i0.ContentChildren,
116
+ args: [forwardRef(() => UiCommandItem), {
117
+ descendants: true,
118
+ isSignal: true
119
+ }]
120
+ }]
121
+ }
122
+ });
123
+ var UiCommandInput = class UiCommandInput {
124
+ cmd = inject(UiCommand);
125
+ userClass = input("", {
126
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
127
+ alias: "class"
128
+ });
129
+ classes = computed(() => cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
130
+ onInput(e) {
131
+ this.cmd.search.set(e.target.value);
132
+ queueMicrotask(() => this.cmd.ensureSelection(true));
133
+ }
134
+ onKeydown(e) {
135
+ const ctrl = e.ctrlKey && !e.altKey && !e.metaKey;
136
+ switch (true) {
137
+ case e.key === "ArrowDown" || ctrl && (e.key === "n" || e.key === "j"):
138
+ e.preventDefault();
139
+ return this.cmd.move(1);
140
+ case e.key === "ArrowUp" || ctrl && (e.key === "p" || e.key === "k"):
141
+ e.preventDefault();
142
+ return this.cmd.move(-1);
143
+ case e.key === "Home":
144
+ e.preventDefault();
145
+ return this.cmd.move("first");
146
+ case e.key === "End":
147
+ e.preventDefault();
148
+ return this.cmd.move("last");
149
+ case e.key === "Enter" && !e.isComposing:
150
+ e.preventDefault();
151
+ return this.cmd.activateSelected();
152
+ }
153
+ }
154
+ static ɵfac = i0.ɵɵngDeclareFactory({
155
+ minVersion: "12.0.0",
156
+ version: "22.2.2",
157
+ ngImport: i0,
158
+ type: UiCommandInput,
159
+ deps: [],
160
+ target: i0.ɵɵFactoryTarget.Directive
161
+ });
162
+ static ɵdir = i0.ɵɵngDeclareDirective({
163
+ minVersion: "17.1.0",
164
+ version: "22.2.2",
165
+ type: UiCommandInput,
166
+ isStandalone: true,
167
+ selector: "input[uiCommandInput]",
168
+ inputs: { userClass: {
169
+ classPropertyName: "userClass",
170
+ publicName: "class",
171
+ isSignal: true,
172
+ isRequired: false,
173
+ transformFunction: null
174
+ } },
175
+ host: {
176
+ attributes: {
177
+ "data-slot": "command-input",
178
+ "type": "text",
179
+ "role": "combobox",
180
+ "autocomplete": "off",
181
+ "autocorrect": "off",
182
+ "spellcheck": "false",
183
+ "aria-autocomplete": "list",
184
+ "aria-expanded": "true"
185
+ },
186
+ listeners: {
187
+ "input": "onInput($event)",
188
+ "keydown": "onKeydown($event)"
189
+ },
190
+ properties: {
191
+ "attr.aria-controls": "cmd.listId",
192
+ "attr.aria-activedescendant": "cmd.selectedId()",
193
+ "attr.class": "classes()"
194
+ }
195
+ },
196
+ ngImport: i0
197
+ });
198
+ };
199
+ i0.ɵɵngDeclareClassMetadata({
200
+ minVersion: "12.0.0",
201
+ version: "22.2.2",
202
+ ngImport: i0,
203
+ type: UiCommandInput,
204
+ decorators: [{
205
+ type: Directive,
206
+ args: [{
207
+ selector: "input[uiCommandInput]",
208
+ host: {
209
+ "data-slot": "command-input",
210
+ type: "text",
211
+ role: "combobox",
212
+ autocomplete: "off",
213
+ autocorrect: "off",
214
+ spellcheck: "false",
215
+ "aria-autocomplete": "list",
216
+ "aria-expanded": "true",
217
+ "[attr.aria-controls]": "cmd.listId",
218
+ "[attr.aria-activedescendant]": "cmd.selectedId()",
219
+ "[attr.class]": "classes()",
220
+ "(input)": "onInput($event)",
221
+ "(keydown)": "onKeydown($event)"
222
+ }
223
+ }]
224
+ }],
225
+ propDecorators: { userClass: [{
226
+ type: i0.Input,
227
+ args: [{
228
+ isSignal: true,
229
+ alias: "class",
230
+ required: false
231
+ }]
232
+ }] }
233
+ });
234
+ var UiCommandInputWrapper = class UiCommandInputWrapper {
235
+ static ɵfac = i0.ɵɵngDeclareFactory({
236
+ minVersion: "12.0.0",
237
+ version: "22.2.2",
238
+ ngImport: i0,
239
+ type: UiCommandInputWrapper,
240
+ deps: [],
241
+ target: i0.ɵɵFactoryTarget.Component
242
+ });
243
+ static ɵcmp = i0.ɵɵngDeclareComponent({
244
+ minVersion: "14.0.0",
245
+ version: "22.2.2",
246
+ type: UiCommandInputWrapper,
247
+ isStandalone: true,
248
+ selector: "[uiCommandInputWrapper], ui-command-input-wrapper",
249
+ host: {
250
+ attributes: { "data-slot": "command-input-wrapper" },
251
+ classAttribute: "p-1 pb-0"
252
+ },
253
+ hostDirectives: [{ directive: i1.UiElementHost }],
254
+ ngImport: i0,
255
+ template: `
256
+ <div class="flex h-8 items-center gap-2 rounded-lg border border-input bg-input/30 px-2.5">
257
+ <svg uiIcon="search" class="size-4 shrink-0 opacity-50"></svg>
258
+ <ng-content />
259
+ </div>
260
+ `,
261
+ isInline: true,
262
+ dependencies: [{
263
+ kind: "directive",
264
+ type: UiIconSvg,
265
+ selector: "svg[uiIcon]",
266
+ inputs: [
267
+ "uiIcon",
268
+ "icon",
269
+ "size",
270
+ "strokeWidth",
271
+ "absoluteStrokeWidth",
272
+ "color",
273
+ "label",
274
+ "class"
275
+ ]
276
+ }],
277
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
278
+ });
279
+ };
280
+ i0.ɵɵngDeclareClassMetadata({
281
+ minVersion: "12.0.0",
282
+ version: "22.2.2",
283
+ ngImport: i0,
284
+ type: UiCommandInputWrapper,
285
+ decorators: [{
286
+ type: Component,
287
+ args: [{
288
+ selector: "[uiCommandInputWrapper], ui-command-input-wrapper",
289
+ hostDirectives: [UiElementHost],
290
+ imports: [UiIconSvg],
291
+ changeDetection: ChangeDetectionStrategy.OnPush,
292
+ host: {
293
+ "data-slot": "command-input-wrapper",
294
+ class: "p-1 pb-0"
295
+ },
296
+ template: `
297
+ <div class="flex h-8 items-center gap-2 rounded-lg border border-input bg-input/30 px-2.5">
298
+ <svg uiIcon="search" class="size-4 shrink-0 opacity-50"></svg>
299
+ <ng-content />
300
+ </div>
301
+ `
302
+ }]
303
+ }]
304
+ });
305
+ var UiCommandList = class UiCommandList {
306
+ cmd = inject(UiCommand);
307
+ userClass = input("", {
308
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
309
+ alias: "class"
310
+ });
311
+ classes = computed(() => cn("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
312
+ static ɵfac = i0.ɵɵngDeclareFactory({
313
+ minVersion: "12.0.0",
314
+ version: "22.2.2",
315
+ ngImport: i0,
316
+ type: UiCommandList,
317
+ deps: [],
318
+ target: i0.ɵɵFactoryTarget.Directive
319
+ });
320
+ static ɵdir = i0.ɵɵngDeclareDirective({
321
+ minVersion: "17.1.0",
322
+ version: "22.2.2",
323
+ type: UiCommandList,
324
+ isStandalone: true,
325
+ selector: "[uiCommandList], ui-command-list",
326
+ inputs: { userClass: {
327
+ classPropertyName: "userClass",
328
+ publicName: "class",
329
+ isSignal: true,
330
+ isRequired: false,
331
+ transformFunction: null
332
+ } },
333
+ host: {
334
+ attributes: {
335
+ "role": "listbox",
336
+ "tabindex": "-1",
337
+ "aria-label": "Suggestions",
338
+ "data-slot": "command-list"
339
+ },
340
+ properties: {
341
+ "id": "cmd.listId",
342
+ "attr.class": "classes()"
343
+ }
344
+ },
345
+ hostDirectives: [{ directive: i1.UiElementHost }],
346
+ ngImport: i0
347
+ });
348
+ };
349
+ i0.ɵɵngDeclareClassMetadata({
350
+ minVersion: "12.0.0",
351
+ version: "22.2.2",
352
+ ngImport: i0,
353
+ type: UiCommandList,
354
+ decorators: [{
355
+ type: Directive,
356
+ args: [{
357
+ selector: "[uiCommandList], ui-command-list",
358
+ hostDirectives: [UiElementHost],
359
+ host: {
360
+ role: "listbox",
361
+ tabindex: "-1",
362
+ "aria-label": "Suggestions",
363
+ "data-slot": "command-list",
364
+ "[id]": "cmd.listId",
365
+ "[attr.class]": "classes()"
366
+ }
367
+ }]
368
+ }],
369
+ propDecorators: { userClass: [{
370
+ type: i0.Input,
371
+ args: [{
372
+ isSignal: true,
373
+ alias: "class",
374
+ required: false
375
+ }]
376
+ }] }
377
+ });
378
+ var UiCommandEmpty = class UiCommandEmpty {
379
+ cmd = inject(UiCommand);
380
+ userClass = input("", {
381
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
382
+ alias: "class"
383
+ });
384
+ classes = computed(() => cn("py-6 text-center text-sm", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
385
+ static ɵfac = i0.ɵɵngDeclareFactory({
386
+ minVersion: "12.0.0",
387
+ version: "22.2.2",
388
+ ngImport: i0,
389
+ type: UiCommandEmpty,
390
+ deps: [],
391
+ target: i0.ɵɵFactoryTarget.Directive
392
+ });
393
+ static ɵdir = i0.ɵɵngDeclareDirective({
394
+ minVersion: "17.1.0",
395
+ version: "22.2.2",
396
+ type: UiCommandEmpty,
397
+ isStandalone: true,
398
+ selector: "[uiCommandEmpty], ui-command-empty",
399
+ inputs: { userClass: {
400
+ classPropertyName: "userClass",
401
+ publicName: "class",
402
+ isSignal: true,
403
+ isRequired: false,
404
+ transformFunction: null
405
+ } },
406
+ host: {
407
+ attributes: {
408
+ "role": "presentation",
409
+ "data-slot": "command-empty"
410
+ },
411
+ properties: {
412
+ "hidden": "cmd.hasResults()",
413
+ "attr.class": "classes()"
414
+ }
415
+ },
416
+ hostDirectives: [{ directive: i1.UiElementHost }],
417
+ ngImport: i0
418
+ });
419
+ };
420
+ i0.ɵɵngDeclareClassMetadata({
421
+ minVersion: "12.0.0",
422
+ version: "22.2.2",
423
+ ngImport: i0,
424
+ type: UiCommandEmpty,
425
+ decorators: [{
426
+ type: Directive,
427
+ args: [{
428
+ selector: "[uiCommandEmpty], ui-command-empty",
429
+ hostDirectives: [UiElementHost],
430
+ host: {
431
+ role: "presentation",
432
+ "data-slot": "command-empty",
433
+ "[hidden]": "cmd.hasResults()",
434
+ "[attr.class]": "classes()"
435
+ }
436
+ }]
437
+ }],
438
+ propDecorators: { userClass: [{
439
+ type: i0.Input,
440
+ args: [{
441
+ isSignal: true,
442
+ alias: "class",
443
+ required: false
444
+ }]
445
+ }] }
446
+ });
447
+ var UiCommandGroup = class UiCommandGroup {
448
+ cmd = inject(UiCommand);
449
+ heading = input("", ...ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []);
450
+ userClass = input("", {
451
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
452
+ alias: "class"
453
+ });
454
+ items = contentChildren(forwardRef(() => UiCommandItem), {
455
+ ...ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {},
456
+ descendants: true
457
+ });
458
+ hasVisible = computed(() => this.items().some((i) => i.visible()), ...ngDevMode ? [{ debugName: "hasVisible" }] : /* istanbul ignore next */ []);
459
+ classes = computed(() => cn("overflow-hidden p-1 text-foreground", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
460
+ static ɵfac = i0.ɵɵngDeclareFactory({
461
+ minVersion: "12.0.0",
462
+ version: "22.2.2",
463
+ ngImport: i0,
464
+ type: UiCommandGroup,
465
+ deps: [],
466
+ target: i0.ɵɵFactoryTarget.Component
467
+ });
468
+ static ɵcmp = i0.ɵɵngDeclareComponent({
469
+ minVersion: "17.0.0",
470
+ version: "22.2.2",
471
+ type: UiCommandGroup,
472
+ isStandalone: true,
473
+ selector: "[uiCommandGroup], ui-command-group",
474
+ inputs: {
475
+ heading: {
476
+ classPropertyName: "heading",
477
+ publicName: "heading",
478
+ isSignal: true,
479
+ isRequired: false,
480
+ transformFunction: null
481
+ },
482
+ userClass: {
483
+ classPropertyName: "userClass",
484
+ publicName: "class",
485
+ isSignal: true,
486
+ isRequired: false,
487
+ transformFunction: null
488
+ }
489
+ },
490
+ host: {
491
+ attributes: {
492
+ "role": "presentation",
493
+ "data-slot": "command-group"
494
+ },
495
+ properties: {
496
+ "attr.data-value": "heading()",
497
+ "hidden": "!hasVisible()",
498
+ "attr.class": "classes()"
499
+ }
500
+ },
501
+ queries: [{
502
+ propertyName: "items",
503
+ predicate: i0.forwardRef(() => UiCommandItem),
504
+ descendants: true,
505
+ isSignal: true
506
+ }],
507
+ hostDirectives: [{ directive: i1.UiElementHost }],
508
+ ngImport: i0,
509
+ template: `
510
+ @if (heading()) {
511
+ <div cmdk-group-heading aria-hidden="true" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
512
+ }
513
+ <div role="group" cmdk-group-items [attr.aria-label]="heading() || null"><ng-content /></div>
514
+ `,
515
+ isInline: true,
516
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
517
+ });
518
+ };
519
+ i0.ɵɵngDeclareClassMetadata({
520
+ minVersion: "12.0.0",
521
+ version: "22.2.2",
522
+ ngImport: i0,
523
+ type: UiCommandGroup,
524
+ decorators: [{
525
+ type: Component,
526
+ args: [{
527
+ selector: "[uiCommandGroup], ui-command-group",
528
+ hostDirectives: [UiElementHost],
529
+ changeDetection: ChangeDetectionStrategy.OnPush,
530
+ host: {
531
+ role: "presentation",
532
+ "data-slot": "command-group",
533
+ "[attr.data-value]": "heading()",
534
+ "[hidden]": "!hasVisible()",
535
+ "[attr.class]": "classes()"
536
+ },
537
+ template: `
538
+ @if (heading()) {
539
+ <div cmdk-group-heading aria-hidden="true" class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
540
+ }
541
+ <div role="group" cmdk-group-items [attr.aria-label]="heading() || null"><ng-content /></div>
542
+ `
543
+ }]
544
+ }],
545
+ propDecorators: {
546
+ heading: [{
547
+ type: i0.Input,
548
+ args: [{
549
+ isSignal: true,
550
+ alias: "heading",
551
+ required: false
552
+ }]
553
+ }],
554
+ userClass: [{
555
+ type: i0.Input,
556
+ args: [{
557
+ isSignal: true,
558
+ alias: "class",
559
+ required: false
560
+ }]
561
+ }],
562
+ items: [{
563
+ type: i0.ContentChildren,
564
+ args: [forwardRef(() => UiCommandItem), {
565
+ descendants: true,
566
+ isSignal: true
567
+ }]
568
+ }]
569
+ }
570
+ });
571
+ var UiCommandSeparator = class UiCommandSeparator {
572
+ cmd = inject(UiCommand);
573
+ userClass = input("", {
574
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
575
+ alias: "class"
576
+ });
577
+ classes = computed(() => cn("-mx-1 h-px bg-border", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
578
+ static ɵfac = i0.ɵɵngDeclareFactory({
579
+ minVersion: "12.0.0",
580
+ version: "22.2.2",
581
+ ngImport: i0,
582
+ type: UiCommandSeparator,
583
+ deps: [],
584
+ target: i0.ɵɵFactoryTarget.Directive
585
+ });
586
+ static ɵdir = i0.ɵɵngDeclareDirective({
587
+ minVersion: "17.1.0",
588
+ version: "22.2.2",
589
+ type: UiCommandSeparator,
590
+ isStandalone: true,
591
+ selector: "[uiCommandSeparator], ui-command-separator",
592
+ inputs: { userClass: {
593
+ classPropertyName: "userClass",
594
+ publicName: "class",
595
+ isSignal: true,
596
+ isRequired: false,
597
+ transformFunction: null
598
+ } },
599
+ host: {
600
+ attributes: {
601
+ "role": "separator",
602
+ "data-slot": "command-separator"
603
+ },
604
+ properties: {
605
+ "hidden": "cmd.search().trim() !== \"\"",
606
+ "attr.class": "classes()"
607
+ }
608
+ },
609
+ hostDirectives: [{ directive: i1.UiElementHost }],
610
+ ngImport: i0
611
+ });
612
+ };
613
+ i0.ɵɵngDeclareClassMetadata({
614
+ minVersion: "12.0.0",
615
+ version: "22.2.2",
616
+ ngImport: i0,
617
+ type: UiCommandSeparator,
618
+ decorators: [{
619
+ type: Directive,
620
+ args: [{
621
+ selector: "[uiCommandSeparator], ui-command-separator",
622
+ hostDirectives: [UiElementHost],
623
+ host: {
624
+ role: "separator",
625
+ "data-slot": "command-separator",
626
+ "[hidden]": "cmd.search().trim() !== \"\"",
627
+ "[attr.class]": "classes()"
628
+ }
629
+ }]
630
+ }],
631
+ propDecorators: { userClass: [{
632
+ type: i0.Input,
633
+ args: [{
634
+ isSignal: true,
635
+ alias: "class",
636
+ required: false
637
+ }]
638
+ }] }
639
+ });
640
+ var UiCommandItem = class UiCommandItem {
641
+ cmd = inject(UiCommand);
642
+ el = inject(ElementRef).nativeElement;
643
+ id = nextId("ui-command-item");
644
+ value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
645
+ keywords = input([], ...ngDevMode ? [{ debugName: "keywords" }] : /* istanbul ignore next */ []);
646
+ disabledInput = input(false, {
647
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
648
+ alias: "disabled",
649
+ transform: booleanAttribute
650
+ });
651
+ userClass = input("", {
652
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
653
+ alias: "class"
654
+ });
655
+ select = output();
656
+ get disabled() {
657
+ return this.disabledInput();
658
+ }
659
+ resolvedValue = computed(() => this.value() || (this.el.textContent ?? "").trim(), ...ngDevMode ? [{ debugName: "resolvedValue" }] : /* istanbul ignore next */ []);
660
+ visible = computed(() => this.cmd.matches(this.resolvedValue(), this.keywords()), ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
661
+ selected = computed(() => this.cmd.selectedId() === this.id, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
662
+ classes = computed(() => cn("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
663
+ activate() {
664
+ if (!this.disabled) this.select.emit();
665
+ }
666
+ scrollIntoView() {
667
+ this.el.scrollIntoView({ block: "nearest" });
668
+ }
669
+ onPointerMove() {
670
+ if (!this.disabled && this.cmd.selectedId() !== this.id) this.cmd.selectedId.set(this.id);
671
+ }
672
+ static ɵfac = i0.ɵɵngDeclareFactory({
673
+ minVersion: "12.0.0",
674
+ version: "22.2.2",
675
+ ngImport: i0,
676
+ type: UiCommandItem,
677
+ deps: [],
678
+ target: i0.ɵɵFactoryTarget.Directive
679
+ });
680
+ static ɵdir = i0.ɵɵngDeclareDirective({
681
+ minVersion: "17.1.0",
682
+ version: "22.2.2",
683
+ type: UiCommandItem,
684
+ isStandalone: true,
685
+ selector: "[uiCommandItem], ui-command-item",
686
+ inputs: {
687
+ value: {
688
+ classPropertyName: "value",
689
+ publicName: "value",
690
+ isSignal: true,
691
+ isRequired: false,
692
+ transformFunction: null
693
+ },
694
+ keywords: {
695
+ classPropertyName: "keywords",
696
+ publicName: "keywords",
697
+ isSignal: true,
698
+ isRequired: false,
699
+ transformFunction: null
700
+ },
701
+ disabledInput: {
702
+ classPropertyName: "disabledInput",
703
+ publicName: "disabled",
704
+ isSignal: true,
705
+ isRequired: false,
706
+ transformFunction: null
707
+ },
708
+ userClass: {
709
+ classPropertyName: "userClass",
710
+ publicName: "class",
711
+ isSignal: true,
712
+ isRequired: false,
713
+ transformFunction: null
714
+ }
715
+ },
716
+ outputs: { select: "select" },
717
+ host: {
718
+ attributes: {
719
+ "role": "option",
720
+ "data-slot": "command-item"
721
+ },
722
+ listeners: {
723
+ "click": "activate()",
724
+ "pointermove": "onPointerMove()"
725
+ },
726
+ properties: {
727
+ "id": "id",
728
+ "attr.aria-selected": "selected()",
729
+ "attr.aria-disabled": "disabled",
730
+ "attr.data-disabled": "disabled",
731
+ "attr.data-selected": "selected()",
732
+ "attr.data-value": "resolvedValue()",
733
+ "hidden": "!visible()",
734
+ "attr.class": "classes()"
735
+ }
736
+ },
737
+ hostDirectives: [{ directive: i1.UiElementHost }],
738
+ ngImport: i0
739
+ });
740
+ };
741
+ i0.ɵɵngDeclareClassMetadata({
742
+ minVersion: "12.0.0",
743
+ version: "22.2.2",
744
+ ngImport: i0,
745
+ type: UiCommandItem,
746
+ decorators: [{
747
+ type: Directive,
748
+ args: [{
749
+ selector: "[uiCommandItem], ui-command-item",
750
+ hostDirectives: [UiElementHost],
751
+ host: {
752
+ role: "option",
753
+ "data-slot": "command-item",
754
+ "[id]": "id",
755
+ "[attr.aria-selected]": "selected()",
756
+ "[attr.aria-disabled]": "disabled",
757
+ "[attr.data-disabled]": "disabled",
758
+ "[attr.data-selected]": "selected()",
759
+ "[attr.data-value]": "resolvedValue()",
760
+ "[hidden]": "!visible()",
761
+ "[attr.class]": "classes()",
762
+ "(click)": "activate()",
763
+ "(pointermove)": "onPointerMove()"
764
+ }
765
+ }]
766
+ }],
767
+ propDecorators: {
768
+ value: [{
769
+ type: i0.Input,
770
+ args: [{
771
+ isSignal: true,
772
+ alias: "value",
773
+ required: false
774
+ }]
775
+ }],
776
+ keywords: [{
777
+ type: i0.Input,
778
+ args: [{
779
+ isSignal: true,
780
+ alias: "keywords",
781
+ required: false
782
+ }]
783
+ }],
784
+ disabledInput: [{
785
+ type: i0.Input,
786
+ args: [{
787
+ isSignal: true,
788
+ alias: "disabled",
789
+ required: false
790
+ }]
791
+ }],
792
+ userClass: [{
793
+ type: i0.Input,
794
+ args: [{
795
+ isSignal: true,
796
+ alias: "class",
797
+ required: false
798
+ }]
799
+ }],
800
+ select: [{
801
+ type: i0.Output,
802
+ args: ["select"]
803
+ }]
804
+ }
805
+ });
806
+ var UiCommandShortcut = class UiCommandShortcut {
807
+ userClass = input("", {
808
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
809
+ alias: "class"
810
+ });
811
+ classes = computed(() => cn("ms-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
812
+ static ɵfac = i0.ɵɵngDeclareFactory({
813
+ minVersion: "12.0.0",
814
+ version: "22.2.2",
815
+ ngImport: i0,
816
+ type: UiCommandShortcut,
817
+ deps: [],
818
+ target: i0.ɵɵFactoryTarget.Directive
819
+ });
820
+ static ɵdir = i0.ɵɵngDeclareDirective({
821
+ minVersion: "17.1.0",
822
+ version: "22.2.2",
823
+ type: UiCommandShortcut,
824
+ isStandalone: true,
825
+ selector: "[uiCommandShortcut], ui-command-shortcut",
826
+ inputs: { userClass: {
827
+ classPropertyName: "userClass",
828
+ publicName: "class",
829
+ isSignal: true,
830
+ isRequired: false,
831
+ transformFunction: null
832
+ } },
833
+ host: {
834
+ attributes: { "data-slot": "command-shortcut" },
835
+ properties: { "attr.class": "classes()" }
836
+ },
837
+ hostDirectives: [{ directive: i1.UiElementHost }],
838
+ ngImport: i0
839
+ });
840
+ };
841
+ i0.ɵɵngDeclareClassMetadata({
842
+ minVersion: "12.0.0",
843
+ version: "22.2.2",
844
+ ngImport: i0,
845
+ type: UiCommandShortcut,
846
+ decorators: [{
847
+ type: Directive,
848
+ args: [{
849
+ selector: "[uiCommandShortcut], ui-command-shortcut",
850
+ hostDirectives: [UiElementHost],
851
+ host: {
852
+ "data-slot": "command-shortcut",
853
+ "[attr.class]": "classes()"
854
+ }
855
+ }]
856
+ }],
857
+ propDecorators: { userClass: [{
858
+ type: i0.Input,
859
+ args: [{
860
+ isSignal: true,
861
+ alias: "class",
862
+ required: false
863
+ }]
864
+ }] }
865
+ });
866
+ var UiCommandInputElement = class UiCommandInputElement {
867
+ placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
868
+ ariaLabel = input("", {
869
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
870
+ alias: "aria-label"
871
+ });
872
+ userClass = input("", {
873
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
874
+ alias: "class"
875
+ });
876
+ static ɵfac = i0.ɵɵngDeclareFactory({
877
+ minVersion: "12.0.0",
878
+ version: "22.2.2",
879
+ ngImport: i0,
880
+ type: UiCommandInputElement,
881
+ deps: [],
882
+ target: i0.ɵɵFactoryTarget.Component
883
+ });
884
+ static ɵcmp = i0.ɵɵngDeclareComponent({
885
+ minVersion: "17.1.0",
886
+ version: "22.2.2",
887
+ type: UiCommandInputElement,
888
+ isStandalone: true,
889
+ selector: "ui-command-input",
890
+ inputs: {
891
+ placeholder: {
892
+ classPropertyName: "placeholder",
893
+ publicName: "placeholder",
894
+ isSignal: true,
895
+ isRequired: false,
896
+ transformFunction: null
897
+ },
898
+ ariaLabel: {
899
+ classPropertyName: "ariaLabel",
900
+ publicName: "aria-label",
901
+ isSignal: true,
902
+ isRequired: false,
903
+ transformFunction: null
904
+ },
905
+ userClass: {
906
+ classPropertyName: "userClass",
907
+ publicName: "class",
908
+ isSignal: true,
909
+ isRequired: false,
910
+ transformFunction: null
911
+ }
912
+ },
913
+ host: { classAttribute: "contents" },
914
+ ngImport: i0,
915
+ template: `<input uiCommandInput [class]="userClass()" [attr.placeholder]="placeholder() || null" [attr.aria-label]="ariaLabel() || null" />`,
916
+ isInline: true,
917
+ dependencies: [{
918
+ kind: "directive",
919
+ type: UiCommandInput,
920
+ selector: "input[uiCommandInput]",
921
+ inputs: ["class"]
922
+ }],
923
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
924
+ });
925
+ };
926
+ i0.ɵɵngDeclareClassMetadata({
927
+ minVersion: "12.0.0",
928
+ version: "22.2.2",
929
+ ngImport: i0,
930
+ type: UiCommandInputElement,
931
+ decorators: [{
932
+ type: Component,
933
+ args: [{
934
+ selector: "ui-command-input",
935
+ imports: [UiCommandInput],
936
+ changeDetection: ChangeDetectionStrategy.OnPush,
937
+ host: { class: "contents" },
938
+ template: `<input uiCommandInput [class]="userClass()" [attr.placeholder]="placeholder() || null" [attr.aria-label]="ariaLabel() || null" />`
939
+ }]
940
+ }],
941
+ propDecorators: {
942
+ placeholder: [{
943
+ type: i0.Input,
944
+ args: [{
945
+ isSignal: true,
946
+ alias: "placeholder",
947
+ required: false
948
+ }]
949
+ }],
950
+ ariaLabel: [{
951
+ type: i0.Input,
952
+ args: [{
953
+ isSignal: true,
954
+ alias: "aria-label",
955
+ required: false
956
+ }]
957
+ }],
958
+ userClass: [{
959
+ type: i0.Input,
960
+ args: [{
961
+ isSignal: true,
962
+ alias: "class",
963
+ required: false
964
+ }]
965
+ }]
966
+ }
967
+ });
968
+ const UI_COMMAND = [
969
+ UiCommand,
970
+ UiCommandInput,
971
+ UiCommandInputWrapper,
972
+ UiCommandList,
973
+ UiCommandEmpty,
974
+ UiCommandGroup,
975
+ UiCommandSeparator,
976
+ UiCommandItem,
977
+ UiCommandShortcut,
978
+ UiCommandInputElement
979
+ ];
980
+ export { UI_COMMAND, UiCommand, UiCommandEmpty, UiCommandGroup, UiCommandInput, UiCommandInputElement, UiCommandInputWrapper, UiCommandItem, UiCommandList, UiCommandSeparator, UiCommandShortcut };
981
+
982
+ //# sourceMappingURL=loomui-ng-ui-command.mjs.map