@vadem/ui 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/LICENSE-lucide.txt +43 -0
  2. package/README.md +19 -2
  3. package/fesm2022/vadem-ui-accordion.mjs +139 -0
  4. package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
  5. package/fesm2022/vadem-ui-active-filters.mjs +355 -0
  6. package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
  7. package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
  8. package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
  9. package/fesm2022/vadem-ui-alert.mjs +266 -0
  10. package/fesm2022/vadem-ui-alert.mjs.map +1 -0
  11. package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
  12. package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
  13. package/fesm2022/vadem-ui-avatar.mjs +219 -0
  14. package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
  15. package/fesm2022/vadem-ui-badge.mjs +86 -0
  16. package/fesm2022/vadem-ui-badge.mjs.map +1 -0
  17. package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
  18. package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
  19. package/fesm2022/vadem-ui-button.mjs +220 -0
  20. package/fesm2022/vadem-ui-button.mjs.map +1 -0
  21. package/fesm2022/vadem-ui-calendar.mjs +1314 -0
  22. package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
  23. package/fesm2022/vadem-ui-card.mjs +271 -0
  24. package/fesm2022/vadem-ui-card.mjs.map +1 -0
  25. package/fesm2022/vadem-ui-character-count.mjs +269 -0
  26. package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
  27. package/fesm2022/vadem-ui-chart.mjs +1984 -0
  28. package/fesm2022/vadem-ui-chart.mjs.map +1 -0
  29. package/fesm2022/vadem-ui-checkbox.mjs +67 -0
  30. package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
  31. package/fesm2022/vadem-ui-color-picker.mjs +815 -0
  32. package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
  33. package/fesm2022/vadem-ui-command.mjs +735 -0
  34. package/fesm2022/vadem-ui-command.mjs.map +1 -0
  35. package/fesm2022/vadem-ui-copy-button.mjs +375 -0
  36. package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
  37. package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
  38. package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
  39. package/fesm2022/vadem-ui-description-list.mjs +59 -0
  40. package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
  41. package/fesm2022/vadem-ui-dialog.mjs +587 -0
  42. package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
  43. package/fesm2022/vadem-ui-dropzone.mjs +176 -0
  44. package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
  45. package/fesm2022/vadem-ui-editable-text.mjs +641 -0
  46. package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
  47. package/fesm2022/vadem-ui-empty-state.mjs +175 -0
  48. package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
  49. package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
  50. package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
  51. package/fesm2022/vadem-ui-field.mjs +583 -0
  52. package/fesm2022/vadem-ui-field.mjs.map +1 -0
  53. package/fesm2022/vadem-ui-file-preview.mjs +532 -0
  54. package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
  55. package/fesm2022/vadem-ui-file-size.mjs +83 -0
  56. package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
  57. package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
  58. package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
  59. package/fesm2022/vadem-ui-icon.mjs +303 -0
  60. package/fesm2022/vadem-ui-icon.mjs.map +1 -0
  61. package/fesm2022/vadem-ui-input.mjs +120 -0
  62. package/fesm2022/vadem-ui-input.mjs.map +1 -0
  63. package/fesm2022/vadem-ui-kbd.mjs +286 -0
  64. package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
  65. package/fesm2022/vadem-ui-keyboard.mjs +105 -0
  66. package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
  67. package/fesm2022/vadem-ui-locale.mjs +443 -0
  68. package/fesm2022/vadem-ui-locale.mjs.map +1 -0
  69. package/fesm2022/vadem-ui-menu.mjs +637 -0
  70. package/fesm2022/vadem-ui-menu.mjs.map +1 -0
  71. package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
  72. package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
  73. package/fesm2022/vadem-ui-number-input.mjs +264 -0
  74. package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
  75. package/fesm2022/vadem-ui-otp-input.mjs +86 -0
  76. package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
  77. package/fesm2022/vadem-ui-pagination.mjs +353 -0
  78. package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
  79. package/fesm2022/vadem-ui-password-input.mjs +213 -0
  80. package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
  81. package/fesm2022/vadem-ui-popover.mjs +178 -0
  82. package/fesm2022/vadem-ui-popover.mjs.map +1 -0
  83. package/fesm2022/vadem-ui-progress.mjs +331 -0
  84. package/fesm2022/vadem-ui-progress.mjs.map +1 -0
  85. package/fesm2022/vadem-ui-radio.mjs +39 -0
  86. package/fesm2022/vadem-ui-radio.mjs.map +1 -0
  87. package/fesm2022/vadem-ui-range-slider.mjs +561 -0
  88. package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
  89. package/fesm2022/vadem-ui-rating.mjs +404 -0
  90. package/fesm2022/vadem-ui-rating.mjs.map +1 -0
  91. package/fesm2022/vadem-ui-relative-time.mjs +217 -0
  92. package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
  93. package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
  94. package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
  95. package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
  96. package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
  97. package/fesm2022/vadem-ui-search-input.mjs +307 -0
  98. package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
  99. package/fesm2022/vadem-ui-segmented.mjs +297 -0
  100. package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
  101. package/fesm2022/vadem-ui-select.mjs +1462 -0
  102. package/fesm2022/vadem-ui-select.mjs.map +1 -0
  103. package/fesm2022/vadem-ui-sidebar.mjs +493 -0
  104. package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
  105. package/fesm2022/vadem-ui-skeleton.mjs +106 -0
  106. package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
  107. package/fesm2022/vadem-ui-slider.mjs +60 -0
  108. package/fesm2022/vadem-ui-slider.mjs.map +1 -0
  109. package/fesm2022/vadem-ui-splitter.mjs +438 -0
  110. package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
  111. package/fesm2022/vadem-ui-stat.mjs +369 -0
  112. package/fesm2022/vadem-ui-stat.mjs.map +1 -0
  113. package/fesm2022/vadem-ui-stepper.mjs +483 -0
  114. package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
  115. package/fesm2022/vadem-ui-switch.mjs +45 -0
  116. package/fesm2022/vadem-ui-switch.mjs.map +1 -0
  117. package/fesm2022/vadem-ui-table.mjs +593 -0
  118. package/fesm2022/vadem-ui-table.mjs.map +1 -0
  119. package/fesm2022/vadem-ui-tabs.mjs +405 -0
  120. package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
  121. package/fesm2022/vadem-ui-tag-input.mjs +685 -0
  122. package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
  123. package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
  124. package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
  125. package/fesm2022/vadem-ui-time-input.mjs +430 -0
  126. package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
  127. package/fesm2022/vadem-ui-timeline.mjs +313 -0
  128. package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
  129. package/fesm2022/vadem-ui-toast.mjs +397 -0
  130. package/fesm2022/vadem-ui-toast.mjs.map +1 -0
  131. package/fesm2022/vadem-ui-toolbar.mjs +396 -0
  132. package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
  133. package/fesm2022/vadem-ui-tooltip.mjs +218 -0
  134. package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
  135. package/fesm2022/vadem-ui-tree.mjs +551 -0
  136. package/fesm2022/vadem-ui-tree.mjs.map +1 -0
  137. package/fesm2022/vadem-ui-upload-list.mjs +408 -0
  138. package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
  139. package/fesm2022/vadem-ui.mjs +4 -0
  140. package/fesm2022/vadem-ui.mjs.map +1 -0
  141. package/fonts/jetbrains-mono/OFL.txt +93 -0
  142. package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
  143. package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
  144. package/fonts/manrope/OFL.txt +93 -0
  145. package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
  146. package/fonts/manrope/manrope-latin.woff2 +0 -0
  147. package/package.json +306 -3
  148. package/styles/base.css +160 -0
  149. package/styles/components/accordion.css +130 -0
  150. package/styles/components/active-filters.css +42 -0
  151. package/styles/components/alert-dialog.css +34 -0
  152. package/styles/components/alert.css +159 -0
  153. package/styles/components/autocomplete.css +97 -0
  154. package/styles/components/avatar.css +90 -0
  155. package/styles/components/badge.css +91 -0
  156. package/styles/components/breadcrumbs.css +94 -0
  157. package/styles/components/button.css +174 -0
  158. package/styles/components/calendar.css +186 -0
  159. package/styles/components/card.css +206 -0
  160. package/styles/components/character-count.css +41 -0
  161. package/styles/components/chart.css +308 -0
  162. package/styles/components/checkbox.css +115 -0
  163. package/styles/components/color-picker.css +158 -0
  164. package/styles/components/command.css +175 -0
  165. package/styles/components/copy-button.css +58 -0
  166. package/styles/components/date-range-picker.css +153 -0
  167. package/styles/components/description-list.css +69 -0
  168. package/styles/components/dialog.css +334 -0
  169. package/styles/components/dropzone.css +89 -0
  170. package/styles/components/editable-text.css +58 -0
  171. package/styles/components/empty-state.css +72 -0
  172. package/styles/components/expandable-text.css +24 -0
  173. package/styles/components/field.css +148 -0
  174. package/styles/components/file-preview.css +65 -0
  175. package/styles/components/form-error-summary.css +71 -0
  176. package/styles/components/icon.css +38 -0
  177. package/styles/components/index.css +80 -0
  178. package/styles/components/input.css +171 -0
  179. package/styles/components/kbd.css +42 -0
  180. package/styles/components/menu.css +168 -0
  181. package/styles/components/multi-select.css +156 -0
  182. package/styles/components/navigation-list.css +147 -0
  183. package/styles/components/number-input.css +33 -0
  184. package/styles/components/otp-input.css +26 -0
  185. package/styles/components/pagination.css +127 -0
  186. package/styles/components/password-input.css +20 -0
  187. package/styles/components/popover.css +93 -0
  188. package/styles/components/progress-ring.css +112 -0
  189. package/styles/components/progress.css +162 -0
  190. package/styles/components/radio.css +117 -0
  191. package/styles/components/range-slider.css +158 -0
  192. package/styles/components/rating.css +100 -0
  193. package/styles/components/reorder-list.css +143 -0
  194. package/styles/components/scroll-area.css +39 -0
  195. package/styles/components/search-input.css +25 -0
  196. package/styles/components/segmented.css +136 -0
  197. package/styles/components/select.css +257 -0
  198. package/styles/components/sidebar.css +105 -0
  199. package/styles/components/skeleton.css +83 -0
  200. package/styles/components/slider.css +132 -0
  201. package/styles/components/splitter.css +83 -0
  202. package/styles/components/stat.css +62 -0
  203. package/styles/components/stepper.css +236 -0
  204. package/styles/components/switch.css +107 -0
  205. package/styles/components/table.css +195 -0
  206. package/styles/components/tabs.css +198 -0
  207. package/styles/components/tag-input.css +138 -0
  208. package/styles/components/text-highlight.css +22 -0
  209. package/styles/components/time-input.css +96 -0
  210. package/styles/components/timeline.css +182 -0
  211. package/styles/components/toast.css +146 -0
  212. package/styles/components/toolbar.css +72 -0
  213. package/styles/components/tooltip.css +93 -0
  214. package/styles/components/tree.css +88 -0
  215. package/styles/components/upload-list.css +113 -0
  216. package/styles/fonts.css +67 -0
  217. package/styles/index.css +14 -0
  218. package/styles/reset.css +57 -0
  219. package/styles/tokens/primitives.css +364 -0
  220. package/styles/tokens/semantic.css +233 -0
  221. package/types/vadem-ui-accordion.d.ts +43 -0
  222. package/types/vadem-ui-active-filters.d.ts +73 -0
  223. package/types/vadem-ui-alert-dialog.d.ts +87 -0
  224. package/types/vadem-ui-alert.d.ts +64 -0
  225. package/types/vadem-ui-autocomplete.d.ts +156 -0
  226. package/types/vadem-ui-avatar.d.ts +59 -0
  227. package/types/vadem-ui-badge.d.ts +25 -0
  228. package/types/vadem-ui-breadcrumbs.d.ts +22 -0
  229. package/types/vadem-ui-button.d.ts +52 -0
  230. package/types/vadem-ui-calendar.d.ts +327 -0
  231. package/types/vadem-ui-card.d.ts +58 -0
  232. package/types/vadem-ui-character-count.d.ts +71 -0
  233. package/types/vadem-ui-chart.d.ts +452 -0
  234. package/types/vadem-ui-checkbox.d.ts +20 -0
  235. package/types/vadem-ui-color-picker.d.ts +171 -0
  236. package/types/vadem-ui-command.d.ts +145 -0
  237. package/types/vadem-ui-copy-button.d.ts +90 -0
  238. package/types/vadem-ui-date-range-picker.d.ts +216 -0
  239. package/types/vadem-ui-description-list.d.ts +15 -0
  240. package/types/vadem-ui-dialog.d.ts +174 -0
  241. package/types/vadem-ui-dropzone.d.ts +73 -0
  242. package/types/vadem-ui-editable-text.d.ts +141 -0
  243. package/types/vadem-ui-empty-state.d.ts +34 -0
  244. package/types/vadem-ui-expandable-text.d.ts +52 -0
  245. package/types/vadem-ui-field.d.ts +180 -0
  246. package/types/vadem-ui-file-preview.d.ts +108 -0
  247. package/types/vadem-ui-file-size.d.ts +18 -0
  248. package/types/vadem-ui-form-error-summary.d.ts +46 -0
  249. package/types/vadem-ui-icon.d.ts +152 -0
  250. package/types/vadem-ui-input.d.ts +31 -0
  251. package/types/vadem-ui-kbd.d.ts +66 -0
  252. package/types/vadem-ui-keyboard.d.ts +61 -0
  253. package/types/vadem-ui-locale.d.ts +241 -0
  254. package/types/vadem-ui-menu.d.ts +132 -0
  255. package/types/vadem-ui-navigation-list.d.ts +28 -0
  256. package/types/vadem-ui-number-input.d.ts +39 -0
  257. package/types/vadem-ui-otp-input.d.ts +15 -0
  258. package/types/vadem-ui-pagination.d.ts +96 -0
  259. package/types/vadem-ui-password-input.d.ts +36 -0
  260. package/types/vadem-ui-popover.d.ts +48 -0
  261. package/types/vadem-ui-progress.d.ts +95 -0
  262. package/types/vadem-ui-radio.d.ts +11 -0
  263. package/types/vadem-ui-range-slider.d.ts +136 -0
  264. package/types/vadem-ui-rating.d.ts +95 -0
  265. package/types/vadem-ui-relative-time.d.ts +58 -0
  266. package/types/vadem-ui-reorder-list.d.ts +120 -0
  267. package/types/vadem-ui-scroll-area.d.ts +13 -0
  268. package/types/vadem-ui-search-input.d.ts +58 -0
  269. package/types/vadem-ui-segmented.d.ts +76 -0
  270. package/types/vadem-ui-select.d.ts +303 -0
  271. package/types/vadem-ui-sidebar.d.ts +70 -0
  272. package/types/vadem-ui-skeleton.d.ts +28 -0
  273. package/types/vadem-ui-slider.d.ts +17 -0
  274. package/types/vadem-ui-splitter.d.ts +99 -0
  275. package/types/vadem-ui-stat.d.ts +101 -0
  276. package/types/vadem-ui-stepper.d.ts +108 -0
  277. package/types/vadem-ui-switch.d.ts +10 -0
  278. package/types/vadem-ui-table.d.ts +172 -0
  279. package/types/vadem-ui-tabs.d.ts +101 -0
  280. package/types/vadem-ui-tag-input.d.ts +170 -0
  281. package/types/vadem-ui-text-highlight.d.ts +27 -0
  282. package/types/vadem-ui-time-input.d.ts +47 -0
  283. package/types/vadem-ui-timeline.d.ts +54 -0
  284. package/types/vadem-ui-toast.d.ts +104 -0
  285. package/types/vadem-ui-toolbar.d.ts +80 -0
  286. package/types/vadem-ui-tooltip.d.ts +71 -0
  287. package/types/vadem-ui-tree.d.ts +123 -0
  288. package/types/vadem-ui-upload-list.d.ts +70 -0
  289. package/types/vadem-ui.d.ts +1 -0
@@ -0,0 +1,201 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, inject, input } from "@angular/core";
3
+ import { vdUniqueId } from "@vadem/ui/field";
4
+ import { VdIcon } from "@vadem/ui/icon";
5
+ import { vdTexts } from "@vadem/ui/locale";
6
+ var VdFormErrorSummary = class VdFormErrorSummary {
7
+ errors = input([], ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
8
+ title = input(...ngDevMode ? [void 0, { debugName: "title" }] : /* istanbul ignore next */ []);
9
+ description = input(...ngDevMode ? [void 0, { debugName: "description" }] : /* istanbul ignore next */ []);
10
+ t = vdTexts("formErrorSummary", {
11
+ title: this.title,
12
+ description: this.description
13
+ });
14
+ titleId = vdUniqueId("vd-form-error-summary-title");
15
+ descriptionId = vdUniqueId("vd-form-error-summary-description");
16
+ host = inject(ElementRef).nativeElement;
17
+ injector = inject(Injector);
18
+ destroyRef = inject(DestroyRef);
19
+ scrollFrame;
20
+ constructor() {
21
+ this.destroyRef.onDestroy(() => {
22
+ if (this.scrollFrame !== void 0) this.host.ownerDocument.defaultView?.cancelAnimationFrame(this.scrollFrame);
23
+ });
24
+ }
25
+ focus() {
26
+ if (this.destroyRef.destroyed) return;
27
+ afterNextRender(() => {
28
+ if (!this.errors().length) return;
29
+ this.host.focus({ preventScroll: true });
30
+ const view = this.host.ownerDocument.defaultView;
31
+ if (!view) return;
32
+ if (this.scrollFrame !== void 0) view.cancelAnimationFrame(this.scrollFrame);
33
+ this.scrollFrame = view.requestAnimationFrame(() => {
34
+ this.scrollFrame = void 0;
35
+ if (this.errors().length && this.host.ownerDocument.activeElement === this.host) this.host.scrollIntoView({
36
+ block: "start",
37
+ behavior: "instant"
38
+ });
39
+ });
40
+ }, { injector: this.injector });
41
+ }
42
+ fragment(target) {
43
+ return `#${encodeURIComponent(target)}`;
44
+ }
45
+ navigate(event, id) {
46
+ if (event.defaultPrevented || event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;
47
+ event.preventDefault();
48
+ const target = this.host.ownerDocument.getElementById(id);
49
+ if (!target || target.matches(":disabled, [aria-disabled=\"true\"]") || target.closest("[hidden], [inert]") || !target.getClientRects().length) return;
50
+ target.focus();
51
+ }
52
+ static ɵfac = i0.ɵɵngDeclareFactory({
53
+ minVersion: "12.0.0",
54
+ version: "22.2.1",
55
+ ngImport: i0,
56
+ type: VdFormErrorSummary,
57
+ deps: [],
58
+ target: i0.ɵɵFactoryTarget.Component
59
+ });
60
+ static ɵcmp = i0.ɵɵngDeclareComponent({
61
+ minVersion: "17.0.0",
62
+ version: "22.2.1",
63
+ type: VdFormErrorSummary,
64
+ isStandalone: true,
65
+ selector: "vd-form-error-summary",
66
+ inputs: {
67
+ errors: {
68
+ classPropertyName: "errors",
69
+ publicName: "errors",
70
+ isSignal: true,
71
+ isRequired: false,
72
+ transformFunction: null
73
+ },
74
+ title: {
75
+ classPropertyName: "title",
76
+ publicName: "title",
77
+ isSignal: true,
78
+ isRequired: false,
79
+ transformFunction: null
80
+ },
81
+ description: {
82
+ classPropertyName: "description",
83
+ publicName: "description",
84
+ isSignal: true,
85
+ isRequired: false,
86
+ transformFunction: null
87
+ }
88
+ },
89
+ host: {
90
+ properties: {
91
+ "attr.hidden": "errors().length ? null : \"\"",
92
+ "attr.role": "errors().length ? \"region\" : null",
93
+ "attr.tabindex": "errors().length ? \"-1\" : null",
94
+ "attr.aria-labelledby": "errors().length ? titleId : null",
95
+ "attr.aria-describedby": "errors().length && t().description ? descriptionId : null"
96
+ },
97
+ classAttribute: "vd-form-error-summary"
98
+ },
99
+ ngImport: i0,
100
+ template: `
101
+ @if (errors().length) {
102
+ <h2 class="vd-form-error-summary__title" [id]="titleId">
103
+ <vd-icon name="alert-circle" /><span>{{ t().title }}</span>
104
+ </h2>
105
+ @if (t().description) {
106
+ <p [id]="descriptionId">{{ t().description }}</p>
107
+ }
108
+ <ul class="vd-form-error-summary__list" role="list">
109
+ @for (error of errors(); track $index) {
110
+ <li>
111
+ <a [href]="fragment(error.target)" (click)="navigate($event, error.target)">{{
112
+ error.message
113
+ }}</a>
114
+ </li>
115
+ }
116
+ </ul>
117
+ }
118
+ `,
119
+ isInline: true,
120
+ dependencies: [{
121
+ kind: "component",
122
+ type: VdIcon,
123
+ selector: "vd-icon",
124
+ inputs: ["name", "label"]
125
+ }],
126
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
127
+ encapsulation: i0.ViewEncapsulation.None
128
+ });
129
+ };
130
+ i0.ɵɵngDeclareClassMetadata({
131
+ minVersion: "12.0.0",
132
+ version: "22.2.1",
133
+ ngImport: i0,
134
+ type: VdFormErrorSummary,
135
+ decorators: [{
136
+ type: Component,
137
+ args: [{
138
+ selector: "vd-form-error-summary",
139
+ imports: [VdIcon],
140
+ changeDetection: ChangeDetectionStrategy.OnPush,
141
+ encapsulation: ViewEncapsulation.None,
142
+ host: {
143
+ class: "vd-form-error-summary",
144
+ "[attr.hidden]": "errors().length ? null : \"\"",
145
+ "[attr.role]": "errors().length ? \"region\" : null",
146
+ "[attr.tabindex]": "errors().length ? \"-1\" : null",
147
+ "[attr.aria-labelledby]": "errors().length ? titleId : null",
148
+ "[attr.aria-describedby]": "errors().length && t().description ? descriptionId : null"
149
+ },
150
+ template: `
151
+ @if (errors().length) {
152
+ <h2 class="vd-form-error-summary__title" [id]="titleId">
153
+ <vd-icon name="alert-circle" /><span>{{ t().title }}</span>
154
+ </h2>
155
+ @if (t().description) {
156
+ <p [id]="descriptionId">{{ t().description }}</p>
157
+ }
158
+ <ul class="vd-form-error-summary__list" role="list">
159
+ @for (error of errors(); track $index) {
160
+ <li>
161
+ <a [href]="fragment(error.target)" (click)="navigate($event, error.target)">{{
162
+ error.message
163
+ }}</a>
164
+ </li>
165
+ }
166
+ </ul>
167
+ }
168
+ `
169
+ }]
170
+ }],
171
+ ctorParameters: () => [],
172
+ propDecorators: {
173
+ errors: [{
174
+ type: i0.Input,
175
+ args: [{
176
+ isSignal: true,
177
+ alias: "errors",
178
+ required: false
179
+ }]
180
+ }],
181
+ title: [{
182
+ type: i0.Input,
183
+ args: [{
184
+ isSignal: true,
185
+ alias: "title",
186
+ required: false
187
+ }]
188
+ }],
189
+ description: [{
190
+ type: i0.Input,
191
+ args: [{
192
+ isSignal: true,
193
+ alias: "description",
194
+ required: false
195
+ }]
196
+ }]
197
+ }
198
+ });
199
+ export { VdFormErrorSummary };
200
+
201
+ //# sourceMappingURL=vadem-ui-form-error-summary.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vadem-ui-form-error-summary.mjs","names":[],"sources":["../../../projects/ui/form-error-summary/src/form-error-summary.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n} from '@angular/core';\nimport { vdUniqueId } from '@vadem/ui/field';\nimport { VdIcon } from '@vadem/ui/icon';\nimport { vdTexts } from '@vadem/ui/locale';\n\nexport interface VdFormError {\n /** Raw ID of a visible, enabled, focusable control in the same document. */\n readonly target: string;\n readonly message: string;\n}\n\n/** Controlled validation navigation; the application owns validation and submit timing. */\n@Component({\n selector: 'vd-form-error-summary',\n imports: [VdIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'vd-form-error-summary',\n '[attr.hidden]': 'errors().length ? null : \"\"',\n '[attr.role]': 'errors().length ? \"region\" : null',\n '[attr.tabindex]': 'errors().length ? \"-1\" : null',\n '[attr.aria-labelledby]': 'errors().length ? titleId : null',\n '[attr.aria-describedby]': 'errors().length && t().description ? descriptionId : null',\n },\n template: `\n @if (errors().length) {\n <h2 class=\"vd-form-error-summary__title\" [id]=\"titleId\">\n <vd-icon name=\"alert-circle\" /><span>{{ t().title }}</span>\n </h2>\n @if (t().description) {\n <p [id]=\"descriptionId\">{{ t().description }}</p>\n }\n <ul class=\"vd-form-error-summary__list\" role=\"list\">\n @for (error of errors(); track $index) {\n <li>\n <a [href]=\"fragment(error.target)\" (click)=\"navigate($event, error.target)\">{{\n error.message\n }}</a>\n </li>\n }\n </ul>\n }\n `,\n})\nexport class VdFormErrorSummary {\n readonly errors = input<readonly VdFormError[]>([]);\n readonly title = input<string>();\n readonly description = input<string>();\n protected readonly t = vdTexts('formErrorSummary', {\n title: this.title,\n description: this.description,\n });\n protected readonly titleId = vdUniqueId('vd-form-error-summary-title');\n protected readonly descriptionId = vdUniqueId('vd-form-error-summary-description');\n private readonly host: HTMLElement = inject(ElementRef).nativeElement;\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n private scrollFrame: number | undefined;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n if (this.scrollFrame !== undefined)\n this.host.ownerDocument.defaultView?.cancelAnimationFrame(this.scrollFrame);\n });\n }\n\n /** Call after a failed submit; passive updates deliberately do not move focus. */\n focus(): void {\n if (this.destroyRef.destroyed) return;\n afterNextRender(\n () => {\n if (!this.errors().length) return;\n this.host.focus({ preventScroll: true });\n const view = this.host.ownerDocument.defaultView;\n if (!view) return;\n if (this.scrollFrame !== undefined) view.cancelAnimationFrame(this.scrollFrame);\n // Apply scrolling after layout anchoring for newly inserted error messages.\n this.scrollFrame = view.requestAnimationFrame(() => {\n this.scrollFrame = undefined;\n if (this.errors().length && this.host.ownerDocument.activeElement === this.host)\n this.host.scrollIntoView({ block: 'start', behavior: 'instant' });\n });\n },\n { injector: this.injector },\n );\n }\n\n protected fragment(target: string): string {\n return `#${encodeURIComponent(target)}`;\n }\n\n protected navigate(event: MouseEvent, id: string): void {\n if (\n event.defaultPrevented ||\n event.button !== 0 ||\n event.ctrlKey ||\n event.metaKey ||\n event.shiftKey ||\n event.altKey\n )\n return;\n event.preventDefault();\n const target = this.host.ownerDocument.getElementById(id);\n if (\n !target ||\n target.matches(':disabled, [aria-disabled=\"true\"]') ||\n target.closest('[hidden], [inert]') ||\n !target.getClientRects().length\n )\n return;\n target.focus();\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,303 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from "@angular/core";
3
+ /**
4
+ * @license
5
+ * Icon geometry from Lucide 1.49.0 (https://lucide.dev), ISC License,
6
+ * Copyright (c) Lucide Icons and Contributors. Parts derived from Feather (MIT),
7
+ * Copyright (c) 2013-2023 Cole Bemis. Full text: LICENSE-lucide.txt
8
+ */
9
+ const VD_ICONS = {
10
+ activity: ["M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"],
11
+ "alert-circle": [
12
+ "M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z",
13
+ "M12 8L12 12",
14
+ "M12 16L12.01 16"
15
+ ],
16
+ "alert-triangle": [
17
+ "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
18
+ "M12 9v4",
19
+ "M12 17h.01"
20
+ ],
21
+ "arrow-down": ["M12 5v14", "m19 12-7 7-7-7"],
22
+ "arrow-left": ["m12 19-7-7 7-7", "M19 12H5"],
23
+ "arrow-right": ["M5 12h14", "m12 5 7 7-7 7"],
24
+ "arrow-up": ["m5 12 7-7 7 7", "M12 19V5"],
25
+ "arrow-up-down": [
26
+ "m21 16-4 4-4-4",
27
+ "M17 20V4",
28
+ "m3 8 4-4 4 4",
29
+ "M7 4v16"
30
+ ],
31
+ bell: ["M10.268 21a2 2 0 0 0 3.464 0", "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"],
32
+ calendar: [
33
+ "M8 2v3",
34
+ "M16 2v3",
35
+ "M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2Z",
36
+ "M3 9h18"
37
+ ],
38
+ check: ["M20 6 9 17l-5-5"],
39
+ "check-circle": ["M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z", "m16 9-5.5 5.5L8 12"],
40
+ "chevron-down": ["m6 9 6 6 6-6"],
41
+ "chevron-left": ["m15 18-6-6 6-6"],
42
+ "chevron-right": ["m9 18 6-6-6-6"],
43
+ "chevron-up": ["m18 15-6-6-6 6"],
44
+ copy: ["M10 8h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2Z", "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"],
45
+ "credit-card": [
46
+ "M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2Z",
47
+ "M2 10L22 10",
48
+ "M6 14h2"
49
+ ],
50
+ download: [
51
+ "M12 15V3",
52
+ "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
53
+ "m7 10 5 5 5-5"
54
+ ],
55
+ "external-link": [
56
+ "M15 3h6v6",
57
+ "M10 14 21 3",
58
+ "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
59
+ ],
60
+ eye: ["M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0", "M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z"],
61
+ "eye-off": [
62
+ "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
63
+ "M14.084 14.158a3 3 0 0 1-4.242-4.242",
64
+ "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
65
+ "m2 2 20 20"
66
+ ],
67
+ file: ["M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z", "M14 2v5a1 1 0 0 0 1 1h5"],
68
+ folder: ["M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],
69
+ "git-branch": [
70
+ "M15 6a9 9 0 0 0-9 9V3",
71
+ "M15 6a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z",
72
+ "M3 18a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z"
73
+ ],
74
+ globe: [
75
+ "M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z",
76
+ "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
77
+ "M2 12h20"
78
+ ],
79
+ info: [
80
+ "M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z",
81
+ "M12 16v-4",
82
+ "M12 8h.01"
83
+ ],
84
+ key: ["M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z", "M16 7.5a0.5 0.5 0 1 0 1 0a0.5 0.5 0 1 0 -1 0Z"],
85
+ "layout-dashboard": [
86
+ "M4 3h5a1 1 0 0 1 1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1Z",
87
+ "M15 3h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1Z",
88
+ "M15 12h5a1 1 0 0 1 1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1Z",
89
+ "M4 16h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1Z"
90
+ ],
91
+ loader: ["M21 12a9 9 0 1 1-6.219-8.56"],
92
+ lock: ["M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-7a2 2 0 0 1 2 -2Z", "M7 11V7a5 5 0 0 1 10 0v4"],
93
+ "log-out": [
94
+ "m16 17 5-5-5-5",
95
+ "M21 12H9",
96
+ "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
97
+ ],
98
+ mail: ["m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", "M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2Z"],
99
+ menu: [
100
+ "M4 5h16",
101
+ "M4 12h16",
102
+ "M4 19h16"
103
+ ],
104
+ minus: ["M5 12h14"],
105
+ monitor: [
106
+ "M4 3h16a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2Z",
107
+ "M8 21L16 21",
108
+ "M12 17L12 21"
109
+ ],
110
+ moon: ["M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"],
111
+ "more-horizontal": [
112
+ "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0Z",
113
+ "M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0Z",
114
+ "M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0Z"
115
+ ],
116
+ "panel-left": ["M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2Z", "M9 3v18"],
117
+ pencil: ["M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z", "m15 5 4 4"],
118
+ plus: ["M5 12h14", "M12 5v14"],
119
+ rocket: [
120
+ "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",
121
+ "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",
122
+ "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",
123
+ "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"
124
+ ],
125
+ search: ["m21 21-4.34-4.34", "M3 11a8 8 0 1 0 16 0a8 8 0 1 0 -16 0Z"],
126
+ settings: ["M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915", "M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z"],
127
+ shield: ["M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z", "m9 12 2 2 4-4"],
128
+ star: ["M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"],
129
+ sun: [
130
+ "M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0Z",
131
+ "M12 2v2",
132
+ "M12 20v2",
133
+ "m4.93 4.93 1.41 1.41",
134
+ "m17.66 17.66 1.41 1.41",
135
+ "M2 12h2",
136
+ "M20 12h2",
137
+ "m6.34 17.66-1.41 1.41",
138
+ "m19.07 4.93-1.41 1.41"
139
+ ],
140
+ trash: [
141
+ "M10 11v6",
142
+ "M14 11v6",
143
+ "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
144
+ "M3 6h18",
145
+ "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
146
+ ],
147
+ "trending-down": ["M16 17h6v-6", "m22 17-8.5-8.5-5 5L2 7"],
148
+ "trending-up": ["M16 7h6v6", "m22 7-8.5 8.5-5-5L2 17"],
149
+ upload: [
150
+ "M12 3v12",
151
+ "m17 8-5-5-5 5",
152
+ "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
153
+ ],
154
+ user: ["M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", "M8 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0Z"],
155
+ users: [
156
+ "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
157
+ "M16 3.128a4 4 0 0 1 0 7.744",
158
+ "M22 21v-2a4 4 0 0 0-3-3.87",
159
+ "M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0Z"
160
+ ],
161
+ x: ["M18 6 6 18", "m6 6 12 12"],
162
+ "x-circle": [
163
+ "M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z",
164
+ "m15 9-6 6",
165
+ "m9 9 6 6"
166
+ ]
167
+ };
168
+ const VD_DIRECTIONAL_ICONS = /* @__PURE__ */ new Set([
169
+ "arrow-left",
170
+ "arrow-right",
171
+ "chevron-left",
172
+ "chevron-right",
173
+ "panel-left"
174
+ ]);
175
+ const VD_ICON_NAMES = Object.keys(VD_ICONS);
176
+ var VdIcon = class VdIcon {
177
+ name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
178
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
179
+ paths = computed(() => VD_ICONS[this.name()], ...ngDevMode ? [{ debugName: "paths" }] : /* istanbul ignore next */ []);
180
+ directional = computed(() => VD_DIRECTIONAL_ICONS.has(this.name()), ...ngDevMode ? [{ debugName: "directional" }] : /* istanbul ignore next */ []);
181
+ static ɵfac = i0.ɵɵngDeclareFactory({
182
+ minVersion: "12.0.0",
183
+ version: "22.2.1",
184
+ ngImport: i0,
185
+ type: VdIcon,
186
+ deps: [],
187
+ target: i0.ɵɵFactoryTarget.Component
188
+ });
189
+ static ɵcmp = i0.ɵɵngDeclareComponent({
190
+ minVersion: "17.0.0",
191
+ version: "22.2.1",
192
+ type: VdIcon,
193
+ isStandalone: true,
194
+ selector: "vd-icon",
195
+ inputs: {
196
+ name: {
197
+ classPropertyName: "name",
198
+ publicName: "name",
199
+ isSignal: true,
200
+ isRequired: true,
201
+ transformFunction: null
202
+ },
203
+ label: {
204
+ classPropertyName: "label",
205
+ publicName: "label",
206
+ isSignal: true,
207
+ isRequired: false,
208
+ transformFunction: null
209
+ }
210
+ },
211
+ host: {
212
+ properties: {
213
+ "attr.data-name": "name()",
214
+ "attr.data-directional": "directional() ? \"\" : null",
215
+ "attr.role": "label() ? \"img\" : null",
216
+ "attr.aria-label": "label() || null",
217
+ "attr.aria-hidden": "label() ? null : \"true\""
218
+ },
219
+ classAttribute: "vd-icon"
220
+ },
221
+ ngImport: i0,
222
+ template: `
223
+ <svg
224
+ class="vd-icon__svg"
225
+ viewBox="0 0 24 24"
226
+ fill="none"
227
+ stroke="currentColor"
228
+ stroke-width="1.5"
229
+ stroke-linecap="round"
230
+ stroke-linejoin="round"
231
+ focusable="false"
232
+ aria-hidden="true"
233
+ >
234
+ @for (d of paths(); track $index) {
235
+ <path [attr.d]="d" />
236
+ }
237
+ </svg>
238
+ `,
239
+ isInline: true,
240
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
241
+ encapsulation: i0.ViewEncapsulation.None
242
+ });
243
+ };
244
+ i0.ɵɵngDeclareClassMetadata({
245
+ minVersion: "12.0.0",
246
+ version: "22.2.1",
247
+ ngImport: i0,
248
+ type: VdIcon,
249
+ decorators: [{
250
+ type: Component,
251
+ args: [{
252
+ selector: "vd-icon",
253
+ template: `
254
+ <svg
255
+ class="vd-icon__svg"
256
+ viewBox="0 0 24 24"
257
+ fill="none"
258
+ stroke="currentColor"
259
+ stroke-width="1.5"
260
+ stroke-linecap="round"
261
+ stroke-linejoin="round"
262
+ focusable="false"
263
+ aria-hidden="true"
264
+ >
265
+ @for (d of paths(); track $index) {
266
+ <path [attr.d]="d" />
267
+ }
268
+ </svg>
269
+ `,
270
+ host: {
271
+ class: "vd-icon",
272
+ "[attr.data-name]": "name()",
273
+ "[attr.data-directional]": "directional() ? \"\" : null",
274
+ "[attr.role]": "label() ? \"img\" : null",
275
+ "[attr.aria-label]": "label() || null",
276
+ "[attr.aria-hidden]": "label() ? null : \"true\""
277
+ },
278
+ changeDetection: ChangeDetectionStrategy.OnPush,
279
+ encapsulation: ViewEncapsulation.None
280
+ }]
281
+ }],
282
+ propDecorators: {
283
+ name: [{
284
+ type: i0.Input,
285
+ args: [{
286
+ isSignal: true,
287
+ alias: "name",
288
+ required: true
289
+ }]
290
+ }],
291
+ label: [{
292
+ type: i0.Input,
293
+ args: [{
294
+ isSignal: true,
295
+ alias: "label",
296
+ required: false
297
+ }]
298
+ }]
299
+ }
300
+ });
301
+ export { VD_ICON_NAMES, VdIcon };
302
+
303
+ //# sourceMappingURL=vadem-ui-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vadem-ui-icon.mjs","names":[],"sources":["../../../projects/ui/icon/src/core/icons.ts","../../../projects/ui/icon/src/icon.ts"],"sourcesContent":["/**\n * @license\n * Icon geometry from Lucide 1.49.0 (https://lucide.dev), ISC License,\n * Copyright (c) Lucide Icons and Contributors. Parts derived from Feather (MIT),\n * Copyright (c) 2013-2023 Cole Bemis. Full text: LICENSE-lucide.txt\n */\n\n// GENERATED by tools/icons.mjs from tools/icons.json - do not edit by hand.\n\n/**\n * Vadem icon set. Framework-agnostic data: every icon is a list of SVG path `d` strings on a\n * 24x24 grid, rendered by adapters with stroke 1.5, round caps and joins, currentColor.\n */\nexport const VD_ICONS = {\n /** lucide: activity */\n activity: [\n 'M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2',\n ],\n /** lucide: circle-alert */\n 'alert-circle': ['M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z', 'M12 8L12 12', 'M12 16L12.01 16'],\n /** lucide: triangle-alert */\n 'alert-triangle': [\n 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3',\n 'M12 9v4',\n 'M12 17h.01',\n ],\n /** lucide: arrow-down */\n 'arrow-down': ['M12 5v14', 'm19 12-7 7-7-7'],\n /** lucide: arrow-left */\n 'arrow-left': ['m12 19-7-7 7-7', 'M19 12H5'],\n /** lucide: arrow-right */\n 'arrow-right': ['M5 12h14', 'm12 5 7 7-7 7'],\n /** lucide: arrow-up */\n 'arrow-up': ['m5 12 7-7 7 7', 'M12 19V5'],\n /** lucide: arrow-up-down */\n 'arrow-up-down': ['m21 16-4 4-4-4', 'M17 20V4', 'm3 8 4-4 4 4', 'M7 4v16'],\n /** lucide: bell */\n bell: [\n 'M10.268 21a2 2 0 0 0 3.464 0',\n 'M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326',\n ],\n /** lucide: calendar */\n calendar: [\n 'M8 2v3',\n 'M16 2v3',\n 'M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2Z',\n 'M3 9h18',\n ],\n /** lucide: check */\n check: ['M20 6 9 17l-5-5'],\n /** lucide: circle-check */\n 'check-circle': ['M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z', 'm16 9-5.5 5.5L8 12'],\n /** lucide: chevron-down */\n 'chevron-down': ['m6 9 6 6 6-6'],\n /** lucide: chevron-left */\n 'chevron-left': ['m15 18-6-6 6-6'],\n /** lucide: chevron-right */\n 'chevron-right': ['m9 18 6-6-6-6'],\n /** lucide: chevron-up */\n 'chevron-up': ['m18 15-6-6-6 6'],\n /** lucide: copy */\n copy: [\n 'M10 8h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2Z',\n 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2',\n ],\n /** lucide: credit-card */\n 'credit-card': [\n 'M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2Z',\n 'M2 10L22 10',\n 'M6 14h2',\n ],\n /** lucide: download */\n download: ['M12 15V3', 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', 'm7 10 5 5 5-5'],\n /** lucide: external-link */\n 'external-link': [\n 'M15 3h6v6',\n 'M10 14 21 3',\n 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6',\n ],\n /** lucide: eye */\n eye: [\n 'M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0',\n 'M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z',\n ],\n /** lucide: eye-off */\n 'eye-off': [\n 'M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49',\n 'M14.084 14.158a3 3 0 0 1-4.242-4.242',\n 'M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143',\n 'm2 2 20 20',\n ],\n /** lucide: file */\n file: [\n 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n 'M14 2v5a1 1 0 0 0 1 1h5',\n ],\n /** lucide: folder */\n folder: [\n 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n ],\n /** lucide: git-branch */\n 'git-branch': [\n 'M15 6a9 9 0 0 0-9 9V3',\n 'M15 6a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z',\n 'M3 18a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z',\n ],\n /** lucide: globe */\n globe: [\n 'M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z',\n 'M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20',\n 'M2 12h20',\n ],\n /** lucide: info */\n info: ['M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z', 'M12 16v-4', 'M12 8h.01'],\n /** lucide: key-round */\n key: [\n 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n 'M16 7.5a0.5 0.5 0 1 0 1 0a0.5 0.5 0 1 0 -1 0Z',\n ],\n /** lucide: layout-dashboard */\n 'layout-dashboard': [\n 'M4 3h5a1 1 0 0 1 1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1Z',\n 'M15 3h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1Z',\n 'M15 12h5a1 1 0 0 1 1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1Z',\n 'M4 16h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1Z',\n ],\n /** lucide: loader-circle */\n loader: ['M21 12a9 9 0 1 1-6.219-8.56'],\n /** lucide: lock */\n lock: [\n 'M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-7a2 2 0 0 1 2 -2Z',\n 'M7 11V7a5 5 0 0 1 10 0v4',\n ],\n /** lucide: log-out */\n 'log-out': ['m16 17 5-5-5-5', 'M21 12H9', 'M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'],\n /** lucide: mail */\n mail: [\n 'm22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7',\n 'M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2Z',\n ],\n /** lucide: menu */\n menu: ['M4 5h16', 'M4 12h16', 'M4 19h16'],\n /** lucide: minus */\n minus: ['M5 12h14'],\n /** lucide: monitor */\n monitor: [\n 'M4 3h16a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2Z',\n 'M8 21L16 21',\n 'M12 17L12 21',\n ],\n /** lucide: moon */\n moon: [\n 'M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401',\n ],\n /** lucide: ellipsis */\n 'more-horizontal': [\n 'M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0Z',\n 'M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0Z',\n 'M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0Z',\n ],\n /** lucide: panel-left */\n 'panel-left': [\n 'M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2Z',\n 'M9 3v18',\n ],\n /** lucide: pencil */\n pencil: [\n 'M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z',\n 'm15 5 4 4',\n ],\n /** lucide: plus */\n plus: ['M5 12h14', 'M12 5v14'],\n /** lucide: rocket */\n rocket: [\n 'M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5',\n 'M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09',\n 'M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z',\n 'M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05',\n ],\n /** lucide: search */\n search: ['m21 21-4.34-4.34', 'M3 11a8 8 0 1 0 16 0a8 8 0 1 0 -16 0Z'],\n /** lucide: settings */\n settings: [\n 'M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915',\n 'M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0Z',\n ],\n /** lucide: shield-check */\n shield: [\n 'M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z',\n 'm9 12 2 2 4-4',\n ],\n /** lucide: star */\n star: [\n 'M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z',\n ],\n /** lucide: sun */\n sun: [\n 'M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0Z',\n 'M12 2v2',\n 'M12 20v2',\n 'm4.93 4.93 1.41 1.41',\n 'm17.66 17.66 1.41 1.41',\n 'M2 12h2',\n 'M20 12h2',\n 'm6.34 17.66-1.41 1.41',\n 'm19.07 4.93-1.41 1.41',\n ],\n /** lucide: trash-2 */\n trash: [\n 'M10 11v6',\n 'M14 11v6',\n 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6',\n 'M3 6h18',\n 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2',\n ],\n /** lucide: trending-down */\n 'trending-down': ['M16 17h6v-6', 'm22 17-8.5-8.5-5 5L2 7'],\n /** lucide: trending-up */\n 'trending-up': ['M16 7h6v6', 'm22 7-8.5 8.5-5-5L2 17'],\n /** lucide: upload */\n upload: ['M12 3v12', 'm17 8-5-5-5 5', 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'],\n /** lucide: user */\n user: ['M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2', 'M8 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0Z'],\n /** lucide: users */\n users: [\n 'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2',\n 'M16 3.128a4 4 0 0 1 0 7.744',\n 'M22 21v-2a4 4 0 0 0-3-3.87',\n 'M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0Z',\n ],\n /** lucide: x */\n x: ['M18 6 6 18', 'm6 6 12 12'],\n /** lucide: circle-x */\n 'x-circle': ['M2 12a10 10 0 1 0 20 0a10 10 0 1 0 -20 0Z', 'm15 9-6 6', 'm9 9 6 6'],\n} as const satisfies Record<string, readonly string[]>;\n\nexport type VdIconName = keyof typeof VD_ICONS;\n\n/** Icons that point in the reading direction and must be mirrored in RTL. */\nexport const VD_DIRECTIONAL_ICONS: ReadonlySet<VdIconName> = new Set<VdIconName>([\n 'arrow-left',\n 'arrow-right',\n 'chevron-left',\n 'chevron-right',\n 'panel-left',\n]);\n\nexport const VD_ICON_NAMES = Object.keys(VD_ICONS) as VdIconName[];\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { VD_DIRECTIONAL_ICONS, VD_ICONS, VdIconName } from './core/icons';\n\n/**\n * Inline SVG icon from the Vadem set. Decorative by default (hidden from assistive tech);\n * pass `label` when the icon carries meaning on its own.\n */\n@Component({\n selector: 'vd-icon',\n template: `\n <svg\n class=\"vd-icon__svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n focusable=\"false\"\n aria-hidden=\"true\"\n >\n @for (d of paths(); track $index) {\n <path [attr.d]=\"d\" />\n }\n </svg>\n `,\n host: {\n class: 'vd-icon',\n '[attr.data-name]': 'name()',\n '[attr.data-directional]': 'directional() ? \"\" : null',\n '[attr.role]': 'label() ? \"img\" : null',\n '[attr.aria-label]': 'label() || null',\n '[attr.aria-hidden]': 'label() ? null : \"true\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class VdIcon {\n readonly name = input.required<VdIconName>();\n /** Accessible name. Omit for decorative icons next to visible text. */\n readonly label = input<string>();\n\n protected readonly paths = computed(() => VD_ICONS[this.name()]);\n protected readonly directional = computed(() => VD_DIRECTIONAL_ICONS.has(this.name()));\n}\n"],"mappings":";;;;;;;;AAaA,MAAa,WAAW;CAEtB,UAAU,CACR,4HACD;CAED,gBAAgB;EAAC;EAA6C;EAAe;CAAiB;CAE9F,kBAAkB;EAChB;EACA;EACA;CACD;CAED,cAAc,CAAC,YAAY,gBAAgB;CAE3C,cAAc,CAAC,kBAAkB,UAAU;CAE3C,eAAe,CAAC,YAAY,eAAe;CAE3C,YAAY,CAAC,iBAAiB,UAAU;CAExC,iBAAiB;EAAC;EAAkB;EAAY;EAAgB;CAAS;CAEzE,MAAM,CACJ,gCACA,+HACD;CAED,UAAU;EACR;EACA;EACA;EACA;CACD;CAED,OAAO,CAAC,iBAAiB;CAEzB,gBAAgB,CAAC,6CAA6C,oBAAoB;CAElF,gBAAgB,CAAC,cAAc;CAE/B,gBAAgB,CAAC,gBAAgB;CAEjC,iBAAiB,CAAC,eAAe;CAEjC,cAAc,CAAC,gBAAgB;CAE/B,MAAM,CACJ,oFACA,yDACD;CAED,eAAe;EACb;EACA;EACA;CACD;CAED,UAAU;EAAC;EAAY;EAA6C;CAAe;CAEnF,iBAAiB;EACf;EACA;EACA;CACD;CAED,KAAK,CACH,yGACA,qCACD;CAED,WAAW;EACT;EACA;EACA;EACA;CACD;CAED,MAAM,CACJ,kHACA,yBACD;CAED,QAAQ,CACN,wHACD;CAED,cAAc;EACZ;EACA;EACA;CACD;CAED,OAAO;EACL;EACA;EACA;CACD;CAED,MAAM;EAAC;EAA6C;EAAa;CAAW;CAE5E,KAAK,CACH,8KACA,+CACD;CAED,oBAAoB;EAClB;EACA;EACA;EACA;CACD;CAED,QAAQ,CAAC,6BAA6B;CAEtC,MAAM,CACJ,kFACA,0BACD;CAED,WAAW;EAAC;EAAkB;EAAY;CAAyC;CAEnF,MAAM,CACJ,2CACA,iFACD;CAED,MAAM;EAAC;EAAW;EAAY;CAAU;CAExC,OAAO,CAAC,UAAU;CAElB,SAAS;EACP;EACA;EACA;CACD;CAED,MAAM,CACJ,gHACD;CAED,mBAAmB;EACjB;EACA;EACA;CACD;CAED,cAAc,CACZ,mFACA,SACD;CAED,QAAQ,CACN,oIACA,WACD;CAED,MAAM,CAAC,YAAY,UAAU;CAE7B,QAAQ;EACN;EACA;EACA;EACA;CACD;CAED,QAAQ,CAAC,oBAAoB,uCAAuC;CAEpE,UAAU,CACR,2UACA,qCACD;CAED,QAAQ,CACN,sKACA,eACD;CAED,MAAM,CACJ,8WACD;CAED,KAAK;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CAED,OAAO;EACL;EACA;EACA;EACA;EACA;CACD;CAED,iBAAiB,CAAC,eAAe,wBAAwB;CAEzD,eAAe,CAAC,aAAa,wBAAwB;CAErD,QAAQ;EAAC;EAAY;EAAiB;CAA2C;CAEjF,MAAM,CAAC,6CAA6C,oCAAoC;CAExF,OAAO;EACL;EACA;EACA;EACA;CACD;CAED,GAAG,CAAC,cAAc,YAAY;CAE9B,YAAY;EAAC;EAA6C;EAAa;CAAU;AAC7B;AAKtD,MAAa,uCAAgD,IAAI,IAAgB;CAC/E;CACA;CACA;CACA;CACA;AACD,CAAA;AAED,MAAa,gBAAgB,OAAO,KAAK,QAAQ;AC5MjD,IAAa,SAAb,MAAa,OAAM;CACR,OAAO,MAAM,SAAsB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEnC,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEb,QAAQ,eAAe,SAAS,KAAK,KAAI,IAAI,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,cAAc,eAAe,qBAAqB,IAAI,KAAK,KAAI,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAN3E,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAM,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAN,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAM,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,YAAA;IAAA,kBAAA;IAAA,yBAAA;IAAA,aAAA;IAAA,mBAAA;IAAA,oBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA5BP;;;;;;;;;;;;;;;;;EAgBT,UAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAYU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA;EA9BlB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;;;;;;;;;;;;;;;;;GAiBV,MAAM;IACJ,OAAO;IACP,oBAAoB;IACpB,2BAA2B;IAC3B,eAAe;IACf,qBAAqB;IACrB,sBAAsB;GACvB;GACD,iBAAiB,wBAAwB;GACzC,eAAe,kBAAkB;EAClC,CAAA"}
@@ -0,0 +1,120 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, ViewEncapsulation, inject, input } from "@angular/core";
3
+ import { VdFieldControlBase } from "@vadem/ui/field";
4
+ var VdInput = class VdInput extends VdFieldControlBase {
5
+ size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
6
+ static ɵfac = i0.ɵɵngDeclareFactory({
7
+ minVersion: "12.0.0",
8
+ version: "22.2.1",
9
+ ngImport: i0,
10
+ type: VdInput,
11
+ deps: null,
12
+ target: i0.ɵɵFactoryTarget.Directive
13
+ });
14
+ static ɵdir = i0.ɵɵngDeclareDirective({
15
+ minVersion: "17.1.0",
16
+ version: "22.2.1",
17
+ type: VdInput,
18
+ isStandalone: true,
19
+ selector: "input[vdInput], textarea[vdInput]",
20
+ inputs: { size: {
21
+ classPropertyName: "size",
22
+ publicName: "size",
23
+ isSignal: true,
24
+ isRequired: false,
25
+ transformFunction: null
26
+ } },
27
+ host: {
28
+ properties: { "attr.data-size": "size()" },
29
+ classAttribute: "vd-input"
30
+ },
31
+ usesInheritance: true,
32
+ ngImport: i0
33
+ });
34
+ };
35
+ i0.ɵɵngDeclareClassMetadata({
36
+ minVersion: "12.0.0",
37
+ version: "22.2.1",
38
+ ngImport: i0,
39
+ type: VdInput,
40
+ decorators: [{
41
+ type: Directive,
42
+ args: [{
43
+ selector: "input[vdInput], textarea[vdInput]",
44
+ host: {
45
+ class: "vd-input",
46
+ "[attr.data-size]": "size()"
47
+ }
48
+ }]
49
+ }],
50
+ propDecorators: { size: [{
51
+ type: i0.Input,
52
+ args: [{
53
+ isSignal: true,
54
+ alias: "size",
55
+ required: false
56
+ }]
57
+ }] }
58
+ });
59
+ var VdInputGroup = class VdInputGroup {
60
+ el = inject(ElementRef).nativeElement;
61
+ focusInput(event) {
62
+ const interactive = event.target.closest("button, a, input, textarea, select, [tabindex]");
63
+ if (interactive && interactive !== this.el && this.el.contains(interactive)) return;
64
+ this.el.querySelector(":scope > .vd-input")?.focus();
65
+ }
66
+ static ɵfac = i0.ɵɵngDeclareFactory({
67
+ minVersion: "12.0.0",
68
+ version: "22.2.1",
69
+ ngImport: i0,
70
+ type: VdInputGroup,
71
+ deps: [],
72
+ target: i0.ɵɵFactoryTarget.Component
73
+ });
74
+ static ɵcmp = i0.ɵɵngDeclareComponent({
75
+ minVersion: "14.0.0",
76
+ version: "22.2.1",
77
+ type: VdInputGroup,
78
+ isStandalone: true,
79
+ selector: "vd-input-group",
80
+ host: {
81
+ listeners: { "click": "focusInput($event)" },
82
+ classAttribute: "vd-input-group"
83
+ },
84
+ ngImport: i0,
85
+ template: `
86
+ <ng-content select="[slot=start]" />
87
+ <ng-content />
88
+ <ng-content select="[slot=end]" />
89
+ `,
90
+ isInline: true,
91
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
92
+ encapsulation: i0.ViewEncapsulation.None
93
+ });
94
+ };
95
+ i0.ɵɵngDeclareClassMetadata({
96
+ minVersion: "12.0.0",
97
+ version: "22.2.1",
98
+ ngImport: i0,
99
+ type: VdInputGroup,
100
+ decorators: [{
101
+ type: Component,
102
+ args: [{
103
+ selector: "vd-input-group",
104
+ template: `
105
+ <ng-content select="[slot=start]" />
106
+ <ng-content />
107
+ <ng-content select="[slot=end]" />
108
+ `,
109
+ host: {
110
+ class: "vd-input-group",
111
+ "(click)": "focusInput($event)"
112
+ },
113
+ changeDetection: ChangeDetectionStrategy.OnPush,
114
+ encapsulation: ViewEncapsulation.None
115
+ }]
116
+ }]
117
+ });
118
+ export { VdInput, VdInputGroup };
119
+
120
+ //# sourceMappingURL=vadem-ui-input.mjs.map