@dataengineeringformachinelearning/viking-ui 1.0.2 → 3.0.0-alpha.4

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 (366) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +217 -38
  3. package/dist/core/brand-icons.d.ts +29 -0
  4. package/dist/core/icons.d.ts +132 -0
  5. package/dist/core/integration-brand-icons.d.ts +18 -0
  6. package/dist/core/lucide-paths.generated.d.ts +90 -0
  7. package/dist/core/types.d.ts +56 -0
  8. package/dist/core/uid.d.ts +2 -0
  9. package/dist/deml-components.css +1122 -0
  10. package/dist/design-tokens.css +688 -0
  11. package/dist/elements/button/viking-button.d.ts +14 -0
  12. package/dist/elements/card/viking-card.d.ts +8 -0
  13. package/dist/elements/core/dom.d.ts +4 -0
  14. package/dist/elements/core/styles.d.ts +2 -0
  15. package/dist/elements/modal/viking-modal.d.ts +15 -0
  16. package/dist/fonts/inter/InterVariable-Italic.woff2 +0 -0
  17. package/dist/fonts/inter/InterVariable.woff2 +0 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +4051 -0
  20. package/dist/lib/accordion/accordion.d.ts +19 -0
  21. package/dist/lib/app-header/app-header.d.ts +8 -0
  22. package/dist/lib/app-sidebar/app-sidebar.d.ts +10 -0
  23. package/dist/lib/auth-panel/auth-panel.d.ts +13 -0
  24. package/dist/lib/autocomplete/autocomplete.d.ts +25 -0
  25. package/dist/lib/avatar/avatar.d.ts +14 -0
  26. package/dist/lib/badge/badge.d.ts +16 -0
  27. package/dist/lib/bar/bar.d.ts +4 -0
  28. package/dist/lib/brand/brand.d.ts +8 -0
  29. package/dist/lib/breadcrumbs/breadcrumbs.d.ts +10 -0
  30. package/dist/lib/button/button-group.d.ts +6 -0
  31. package/dist/lib/button/button.d.ts +25 -0
  32. package/dist/lib/calendar/calendar.d.ts +22 -0
  33. package/dist/lib/callout/callout.d.ts +14 -0
  34. package/dist/lib/card/card-title.d.ts +12 -0
  35. package/dist/lib/card/card.d.ts +19 -0
  36. package/dist/lib/carousel/carousel.d.ts +13 -0
  37. package/dist/lib/chart/chart-zoom.d.ts +14 -0
  38. package/dist/lib/chart/chart.d.ts +119 -0
  39. package/dist/lib/chart-card-header/chart-card-header.d.ts +10 -0
  40. package/dist/lib/chart-empty-state/chart-empty-state.d.ts +13 -0
  41. package/dist/lib/chart-panel/chart-panel.d.ts +10 -0
  42. package/dist/lib/checkbox/checkbox.d.ts +13 -0
  43. package/dist/lib/color-picker/color-picker.d.ts +16 -0
  44. package/dist/lib/command/command.d.ts +23 -0
  45. package/dist/lib/composer/composer.d.ts +15 -0
  46. package/dist/lib/confirm-dialog/confirm-dialog.d.ts +18 -0
  47. package/dist/lib/confirm-dialog/dialog.service.d.ts +28 -0
  48. package/dist/lib/context/context.d.ts +17 -0
  49. package/dist/lib/core/brand-icons.d.ts +29 -0
  50. package/dist/lib/core/cva.d.ts +15 -0
  51. package/dist/lib/core/icons.d.ts +132 -0
  52. package/dist/lib/core/integration-brand-icons.d.ts +18 -0
  53. package/dist/lib/core/lucide-paths.generated.d.ts +90 -0
  54. package/dist/lib/date-picker/date-picker.d.ts +18 -0
  55. package/dist/lib/dropdown/dropdown.d.ts +29 -0
  56. package/dist/lib/editor/editor.d.ts +26 -0
  57. package/dist/lib/empty-state/empty-state.d.ts +9 -0
  58. package/dist/lib/fab/fab.d.ts +9 -0
  59. package/dist/lib/field/field.d.ts +14 -0
  60. package/dist/lib/file-upload/file-upload.d.ts +19 -0
  61. package/dist/lib/footer/footer.d.ts +6 -0
  62. package/dist/lib/form-section/form-section.d.ts +15 -0
  63. package/dist/lib/gauge-arc/gauge-arc.d.ts +8 -0
  64. package/dist/lib/hud-panel/hud-panel.d.ts +5 -0
  65. package/dist/lib/icon/icon.d.ts +44 -0
  66. package/dist/lib/icon-badge/icon-badge.d.ts +14 -0
  67. package/dist/lib/icon-heading/icon-heading.d.ts +9 -0
  68. package/dist/lib/icon-text/icon-text.d.ts +12 -0
  69. package/dist/lib/input/input.d.ts +23 -0
  70. package/dist/lib/kanban/kanban.d.ts +16 -0
  71. package/dist/lib/kbd/kbd.d.ts +5 -0
  72. package/dist/lib/label/label.d.ts +7 -0
  73. package/dist/lib/loading-overlay/loading-overlay.d.ts +10 -0
  74. package/dist/lib/menubar/menubar.d.ts +10 -0
  75. package/dist/lib/metric-card/metric-card.d.ts +9 -0
  76. package/dist/lib/modal/modal.d.ts +13 -0
  77. package/dist/lib/native-select/native-select.d.ts +17 -0
  78. package/dist/lib/navbar/navbar.d.ts +13 -0
  79. package/dist/lib/navigation-menu/navigation-menu.d.ts +13 -0
  80. package/dist/lib/otp-input/otp-input.d.ts +23 -0
  81. package/dist/lib/page-back-link/page-back-link.d.ts +11 -0
  82. package/dist/lib/page-header/page-header.d.ts +15 -0
  83. package/dist/lib/pagination/pagination.d.ts +10 -0
  84. package/dist/lib/pillbox/pillbox.d.ts +15 -0
  85. package/dist/lib/popover/popover.d.ts +15 -0
  86. package/dist/lib/profile/profile.d.ts +11 -0
  87. package/dist/lib/progress/progress.d.ts +12 -0
  88. package/dist/lib/radio/radio.d.ts +16 -0
  89. package/dist/lib/ring-gauge/ring-gauge.d.ts +8 -0
  90. package/dist/lib/scroll-area/scroll-area.d.ts +7 -0
  91. package/dist/lib/search-palette/search-palette.d.ts +16 -0
  92. package/dist/lib/select/select.d.ts +26 -0
  93. package/dist/lib/separator/separator.d.ts +8 -0
  94. package/dist/lib/sheet/sheet.d.ts +13 -0
  95. package/dist/lib/sidebar-nav/sidebar-nav.d.ts +46 -0
  96. package/dist/lib/site-drakkar/site-drakkar.config.d.ts +50 -0
  97. package/dist/lib/site-drakkar/site-footer.d.ts +18 -0
  98. package/dist/lib/site-drakkar/site-navbar.d.ts +25 -0
  99. package/dist/lib/site-drakkar/suite-search-items.d.ts +17 -0
  100. package/dist/lib/skeleton/skeleton.d.ts +8 -0
  101. package/dist/lib/slider/slider.d.ts +17 -0
  102. package/dist/lib/spinner/spinner.d.ts +7 -0
  103. package/dist/lib/status-metric-row/status-metric-row.d.ts +9 -0
  104. package/dist/lib/suite-search-palette/suite-search-palette.d.ts +25 -0
  105. package/dist/lib/switch/switch.d.ts +12 -0
  106. package/dist/lib/table/table.d.ts +10 -0
  107. package/dist/lib/tabs/tab-panel.d.ts +12 -0
  108. package/dist/lib/tabs/tab.d.ts +14 -0
  109. package/dist/lib/tabs/tabs.d.ts +10 -0
  110. package/dist/lib/textarea/textarea.d.ts +16 -0
  111. package/dist/lib/theme-toggle/theme-toggle.d.ts +9 -0
  112. package/dist/lib/time-picker/time-picker.d.ts +21 -0
  113. package/dist/lib/timeline/timeline.d.ts +14 -0
  114. package/dist/lib/toast/toast.d.ts +21 -0
  115. package/dist/lib/toggle/toggle-group.d.ts +9 -0
  116. package/dist/lib/toggle/toggle.d.ts +15 -0
  117. package/dist/lib/tooltip/tooltip.d.ts +20 -0
  118. package/dist/lib/typography/heading.d.ts +9 -0
  119. package/dist/lib/typography/text.d.ts +11 -0
  120. package/dist/lib/uptime-bar/uptime-bar.d.ts +6 -0
  121. package/dist/lib/verification-code-field/verification-code-field.d.ts +19 -0
  122. package/dist/lib/whitepaper-cta/whitepaper-cta.d.ts +15 -0
  123. package/dist/lib/wizard/wizard.d.ts +13 -0
  124. package/dist/public-api.d.ts +109 -0
  125. package/dist/tokens/series-presets.d.ts +4 -0
  126. package/dist/viking-components.css +1837 -0
  127. package/dist/viking-tokens.json +318 -0
  128. package/dist/viking-ui-elements.js +1750 -0
  129. package/dist/viking-ui.css +1 -0
  130. package/dist/web/badge/viking-badge-wc.d.ts +28 -0
  131. package/dist/web/button/viking-button-wc.d.ts +28 -0
  132. package/dist/web/callout/viking-callout-wc.d.ts +27 -0
  133. package/dist/web/card/viking-card-wc.d.ts +29 -0
  134. package/dist/web/core/base.d.ts +12 -0
  135. package/dist/web/core/dom.d.ts +11 -0
  136. package/dist/web/core/icons-inline.d.ts +7 -0
  137. package/dist/web/core/styles.d.ts +12 -0
  138. package/dist/web/core/types.d.ts +10 -0
  139. package/dist/web/field/viking-field-wc.d.ts +32 -0
  140. package/dist/web/index.d.ts +15 -0
  141. package/dist/web/input/viking-input-wc.d.ts +32 -0
  142. package/dist/web/modal/viking-modal-wc.d.ts +50 -0
  143. package/dist/web/search-palette/viking-search-palette-wc.d.ts +64 -0
  144. package/dist/web/select/viking-select-wc.d.ts +48 -0
  145. package/dist/web/suite-header/viking-suite-header-wc.d.ts +36 -0
  146. package/dist/web/suite-search-palette/viking-suite-search-palette-wc.d.ts +39 -0
  147. package/dist/web/theme-toggle/viking-theme-toggle-wc.d.ts +19 -0
  148. package/dist/web/types.d.ts +40 -0
  149. package/dist/web-components/index.d.ts +1 -0
  150. package/dist/web-components.js +1750 -0
  151. package/dist/widget.js +1182 -0
  152. package/package.json +89 -30
  153. package/src/assets/drakkar-favicon.svg +17 -0
  154. package/src/assets/fonts/inter/InterVariable-Italic.woff2 +0 -0
  155. package/src/assets/fonts/inter/InterVariable.woff2 +0 -0
  156. package/src/core/brand/deml-lockup.svg +5 -0
  157. package/src/core/brand/deml-mark-compact.svg +4 -0
  158. package/src/core/brand/deml-mark-filled.svg +3 -0
  159. package/src/core/brand/deml-mark-outline.svg +4 -0
  160. package/src/core/brand-icons.ts +62 -0
  161. package/src/core/icons.spec.ts +52 -0
  162. package/src/core/icons.ts +206 -0
  163. package/src/core/integration-brand-icons.ts +77 -0
  164. package/src/core/lucide-paths.generated.ts +130 -0
  165. package/src/core/types.ts +85 -0
  166. package/src/core/uid.ts +7 -0
  167. package/src/elements/button/viking-button.ts +201 -0
  168. package/src/elements/card/viking-card.ts +60 -0
  169. package/src/elements/core/dom.ts +33 -0
  170. package/src/elements/core/styles.ts +28 -0
  171. package/src/elements/modal/viking-modal.ts +154 -0
  172. package/src/index.ts +1 -0
  173. package/src/lib/accordion/accordion.ts +126 -0
  174. package/src/lib/app-header/app-header.scss +274 -0
  175. package/src/lib/app-header/app-header.ts +43 -0
  176. package/src/lib/app-sidebar/app-sidebar.scss +415 -0
  177. package/src/lib/app-sidebar/app-sidebar.ts +29 -0
  178. package/src/lib/auth-panel/auth-panel.spec.ts +132 -0
  179. package/src/lib/auth-panel/auth-panel.ts +228 -0
  180. package/src/lib/autocomplete/autocomplete.ts +223 -0
  181. package/src/lib/avatar/avatar.ts +126 -0
  182. package/src/lib/badge/badge.ts +182 -0
  183. package/src/lib/bar/bar.ts +31 -0
  184. package/src/lib/brand/brand.ts +60 -0
  185. package/src/lib/breadcrumbs/breadcrumbs.ts +81 -0
  186. package/src/lib/button/button-group.ts +40 -0
  187. package/src/lib/button/button.scss +96 -0
  188. package/src/lib/button/button.ts +98 -0
  189. package/src/lib/calendar/calendar.ts +253 -0
  190. package/src/lib/callout/callout.ts +211 -0
  191. package/src/lib/card/card-title.spec.ts +27 -0
  192. package/src/lib/card/card-title.ts +50 -0
  193. package/src/lib/card/card.ts +170 -0
  194. package/src/lib/carousel/carousel.ts +206 -0
  195. package/src/lib/chart/chart-zoom.spec.ts +65 -0
  196. package/src/lib/chart/chart-zoom.ts +71 -0
  197. package/src/lib/chart/chart.ts +1257 -0
  198. package/src/lib/chart-card-header/chart-card-header.ts +80 -0
  199. package/src/lib/chart-empty-state/chart-empty-state.ts +146 -0
  200. package/src/lib/chart-panel/chart-panel.ts +133 -0
  201. package/src/lib/checkbox/checkbox.ts +139 -0
  202. package/src/lib/color-picker/color-picker.ts +148 -0
  203. package/src/lib/command/command.ts +260 -0
  204. package/src/lib/composer/composer.ts +180 -0
  205. package/src/lib/confirm-dialog/confirm-dialog.ts +163 -0
  206. package/src/lib/confirm-dialog/dialog.service.ts +79 -0
  207. package/src/lib/context/context.ts +75 -0
  208. package/src/lib/core/brand-icons.ts +62 -0
  209. package/src/lib/core/cva.ts +33 -0
  210. package/src/lib/core/icons.ts +206 -0
  211. package/src/lib/core/integration-brand-icons.ts +77 -0
  212. package/src/lib/core/lucide-paths.generated.ts +130 -0
  213. package/src/lib/date-picker/date-picker.ts +139 -0
  214. package/src/lib/dropdown/dropdown.ts +188 -0
  215. package/src/lib/editor/editor.ts +170 -0
  216. package/src/lib/empty-state/empty-state.ts +100 -0
  217. package/src/lib/fab/fab.ts +76 -0
  218. package/src/lib/field/field.ts +111 -0
  219. package/src/lib/file-upload/file-upload.ts +208 -0
  220. package/src/lib/footer/footer.scss +155 -0
  221. package/src/lib/footer/footer.ts +28 -0
  222. package/src/lib/form-section/form-section.ts +200 -0
  223. package/src/lib/forms.spec.ts +92 -0
  224. package/src/lib/gauge-arc/gauge-arc.ts +85 -0
  225. package/src/lib/hud-panel/hud-panel.ts +27 -0
  226. package/src/lib/icon/icon.ts +284 -0
  227. package/src/lib/icon-badge/icon-badge.ts +87 -0
  228. package/src/lib/icon-heading/icon-heading.spec.ts +32 -0
  229. package/src/lib/icon-heading/icon-heading.ts +38 -0
  230. package/src/lib/icon-text/icon-text.ts +120 -0
  231. package/src/lib/input/input.ts +119 -0
  232. package/src/lib/kanban/kanban.ts +211 -0
  233. package/src/lib/kbd/kbd.ts +32 -0
  234. package/src/lib/label/label.ts +39 -0
  235. package/src/lib/loading-overlay/loading-overlay.ts +80 -0
  236. package/src/lib/menubar/menubar.ts +77 -0
  237. package/src/lib/metric-card/metric-card.ts +33 -0
  238. package/src/lib/modal/modal.ts +207 -0
  239. package/src/lib/native-select/native-select.ts +124 -0
  240. package/src/lib/navbar/navbar.ts +124 -0
  241. package/src/lib/navigation-menu/navigation-menu.ts +116 -0
  242. package/src/lib/otp-input/otp-input.ts +164 -0
  243. package/src/lib/page-back-link/page-back-link.ts +74 -0
  244. package/src/lib/page-header/page-header.ts +70 -0
  245. package/src/lib/pagination/pagination.ts +157 -0
  246. package/src/lib/pillbox/pillbox.ts +157 -0
  247. package/src/lib/popover/popover.ts +92 -0
  248. package/src/lib/profile/profile.ts +73 -0
  249. package/src/lib/progress/progress.ts +123 -0
  250. package/src/lib/radio/radio.ts +132 -0
  251. package/src/lib/ring-gauge/ring-gauge.ts +75 -0
  252. package/src/lib/scroll-area/scroll-area.ts +57 -0
  253. package/src/lib/search-palette/search-palette.scss +288 -0
  254. package/src/lib/search-palette/search-palette.ts +114 -0
  255. package/src/lib/select/select.ts +292 -0
  256. package/src/lib/separator/separator.ts +59 -0
  257. package/src/lib/sheet/sheet.ts +192 -0
  258. package/src/lib/sidebar-nav/sidebar-nav.scss +218 -0
  259. package/src/lib/sidebar-nav/sidebar-nav.ts +158 -0
  260. package/src/lib/site-drakkar/site-drakkar.config.ts +295 -0
  261. package/src/lib/site-drakkar/site-footer.ts +129 -0
  262. package/src/lib/site-drakkar/site-navbar.scss +2 -0
  263. package/src/lib/site-drakkar/site-navbar.ts +267 -0
  264. package/src/lib/site-drakkar/suite-search-items.spec.ts +61 -0
  265. package/src/lib/site-drakkar/suite-search-items.ts +246 -0
  266. package/src/lib/skeleton/skeleton.ts +51 -0
  267. package/src/lib/slider/slider.ts +133 -0
  268. package/src/lib/spinner/spinner.ts +75 -0
  269. package/src/lib/status-metric-row/status-metric-row.ts +74 -0
  270. package/src/lib/suite-search-palette/suite-search-palette.ts +95 -0
  271. package/src/lib/switch/switch.ts +131 -0
  272. package/src/lib/table/table.ts +137 -0
  273. package/src/lib/tabs/tab-panel.ts +61 -0
  274. package/src/lib/tabs/tab.ts +107 -0
  275. package/src/lib/tabs/tabs.ts +109 -0
  276. package/src/lib/textarea/textarea.ts +103 -0
  277. package/src/lib/theme-toggle/theme-toggle.spec.ts +40 -0
  278. package/src/lib/theme-toggle/theme-toggle.ts +39 -0
  279. package/src/lib/time-picker/time-picker.ts +197 -0
  280. package/src/lib/timeline/timeline.ts +152 -0
  281. package/src/lib/toast/toast.ts +196 -0
  282. package/src/lib/toggle/toggle-group.ts +60 -0
  283. package/src/lib/toggle/toggle.ts +101 -0
  284. package/src/lib/tooltip/tooltip.ts +119 -0
  285. package/src/lib/typography/heading.ts +52 -0
  286. package/src/lib/typography/text.ts +51 -0
  287. package/src/lib/uptime-bar/uptime-bar.ts +55 -0
  288. package/src/lib/verification-code-field/verification-code-field.ts +149 -0
  289. package/src/lib/whitepaper-cta/whitepaper-cta.scss +130 -0
  290. package/src/lib/whitepaper-cta/whitepaper-cta.ts +78 -0
  291. package/src/lib/wizard/wizard.ts +80 -0
  292. package/src/public-api.ts +172 -0
  293. package/src/styles/_buttons.scss +301 -0
  294. package/src/styles/_component-primitives.scss +183 -0
  295. package/src/styles/_drakkar-buttons.scss +85 -0
  296. package/src/styles/_fonts.scss +22 -0
  297. package/src/styles/_forms.scss +66 -0
  298. package/src/styles/_input.scss +106 -0
  299. package/src/styles/_layout-enforcement.scss +166 -0
  300. package/src/styles/_layout-rhythm.scss +158 -0
  301. package/src/styles/_legacy-aliases.scss +212 -0
  302. package/src/styles/_series-colors.scss +24 -0
  303. package/src/styles/_static-primitives.scss +857 -0
  304. package/src/styles/_typography.scss +87 -0
  305. package/src/styles/_variables.scss +527 -0
  306. package/src/styles/components/a11y.scss +90 -0
  307. package/src/styles/components/badges.scss +102 -0
  308. package/src/styles/components/extracted-utilities.scss +459 -0
  309. package/src/styles/components/footer.scss +155 -0
  310. package/src/styles/components/icon-heading.scss +47 -0
  311. package/src/styles/components/icon-inline.scss +78 -0
  312. package/src/styles/components/layout.scss +59 -0
  313. package/src/styles/components/utilities.scss +131 -0
  314. package/src/styles/components/viking-inspired.scss +204 -0
  315. package/src/styles/components/whitepaper-cta.scss +130 -0
  316. package/src/styles/components-bundle.scss +9 -0
  317. package/src/styles/components.scss +175 -0
  318. package/src/styles/deml-components.scss +10 -0
  319. package/src/styles/index.scss +8 -0
  320. package/src/styles/layout-shell.scss +39 -11
  321. package/src/styles/page-shell.scss +663 -33
  322. package/src/styles/static-navbar.scss +862 -146
  323. package/src/styles/surfaces/backend.scss +142 -0
  324. package/src/styles/surfaces/docs-global.scss +73 -0
  325. package/src/styles/surfaces/docs-shell.scss +412 -0
  326. package/src/styles/surfaces/docs-showcase.scss +1051 -0
  327. package/src/styles/surfaces/marketing-cta.scss +62 -0
  328. package/src/styles/surfaces/marketing-docs-bento.scss +67 -0
  329. package/src/styles/surfaces/marketing-global.scss +748 -0
  330. package/src/styles/surfaces/marketing-landing.scss +1260 -0
  331. package/src/styles/surfaces/marketing-publication.scss +535 -0
  332. package/src/styles/surfaces/marketing-theme.scss +14 -0
  333. package/src/styles/surfaces/swagger-ui.scss +921 -0
  334. package/src/styles/tokens-export.scss +18 -0
  335. package/src/styles/tokens.scss +5 -0
  336. package/src/styles/viking-ui-bundle.scss +20 -2
  337. package/src/styles/viking-ui.scss +213 -51
  338. package/src/tokens/series-presets.ts +15 -0
  339. package/src/tokens/tailwind.preset.js +209 -0
  340. package/src/tokens/viking-tokens.json +318 -0
  341. package/src/viking-ui.spec.ts +416 -0
  342. package/src/web/badge/viking-badge-wc.ts +116 -0
  343. package/src/web/button/viking-button-wc.ts +165 -0
  344. package/src/web/callout/viking-callout-wc.ts +105 -0
  345. package/src/web/card/viking-card-wc.ts +66 -0
  346. package/src/web/core/base.ts +56 -0
  347. package/src/web/core/dom.ts +53 -0
  348. package/src/web/core/icons-inline.ts +44 -0
  349. package/src/web/core/styles.ts +1138 -0
  350. package/src/web/core/types.ts +19 -0
  351. package/src/web/field/viking-field-wc.ts +154 -0
  352. package/src/web/index.ts +73 -0
  353. package/src/web/input/viking-input-wc.ts +211 -0
  354. package/src/web/modal/viking-modal-wc.ts +187 -0
  355. package/src/web/search-palette/viking-search-palette-wc.ts +494 -0
  356. package/src/web/select/viking-select-wc.ts +218 -0
  357. package/src/web/suite-header/viking-suite-header-wc.ts +714 -0
  358. package/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +234 -0
  359. package/src/web/theme-toggle/viking-theme-toggle-wc.ts +139 -0
  360. package/src/web/types.ts +37 -0
  361. package/src/web/web-components.spec.ts +297 -0
  362. package/src/web-components/index.ts +1 -0
  363. package/fesm2022/dataengineeringformachinelearning-viking-ui.mjs +0 -6114
  364. package/fesm2022/dataengineeringformachinelearning-viking-ui.mjs.map +0 -1
  365. package/types/dataengineeringformachinelearning-viking-ui.d.ts +0 -1397
  366. package/viking.manifest.json +0 -238
@@ -0,0 +1,92 @@
1
+ import { Component } from "@angular/core";
2
+ import { TestBed, ComponentFixture } from "@angular/core/testing";
3
+ import { FormsModule } from "@angular/forms";
4
+ import { describe, it, expect } from "vitest";
5
+ import { VikingField } from "./field/field";
6
+ import { VikingInput } from "./input/input";
7
+ import { VikingFormSection } from "./form-section/form-section";
8
+
9
+ @Component({
10
+ imports: [VikingField, VikingInput, FormsModule],
11
+ template: `
12
+ <viking-field label="Email" [required]="true" [error]="error">
13
+ <viking-input [(ngModel)]="email" placeholder="you@example.com" />
14
+ </viking-field>
15
+ `,
16
+ })
17
+ class FieldInputHost {
18
+ email = "";
19
+ error = "";
20
+ }
21
+
22
+ @Component({
23
+ imports: [VikingFormSection, VikingField, VikingInput, FormsModule],
24
+ template: `
25
+ <viking-form-section heading="Profile" icon="user" layout="stack">
26
+ <viking-field label="Display name">
27
+ <viking-input [(ngModel)]="name" />
28
+ </viking-field>
29
+ </viking-form-section>
30
+ `,
31
+ })
32
+ class FormStackHost {
33
+ name = "";
34
+ }
35
+
36
+ describe("viking forms", () => {
37
+ const render = async <T>(
38
+ component: new () => T,
39
+ ): Promise<ComponentFixture<T>> => {
40
+ const fixture = TestBed.createComponent(component);
41
+ fixture.detectChanges();
42
+ await fixture.whenStable();
43
+ return fixture;
44
+ };
45
+
46
+ it("renders required marker and associates label with input", async () => {
47
+ const fixture = await render(FieldInputHost);
48
+ const label = fixture.nativeElement.querySelector(".viking-field-label");
49
+ expect(label?.textContent).toContain("Email");
50
+ expect(label?.querySelector(".viking-field-required")).toBeTruthy();
51
+ expect(fixture.nativeElement.querySelector("viking-input-wc")).toBeTruthy();
52
+ });
53
+
54
+ it("shows error alert and invalid host class", async () => {
55
+ const fixture = await render(FieldInputHost);
56
+ fixture.componentInstance.error = "Invalid email address";
57
+ fixture.detectChanges();
58
+ const field = fixture.nativeElement.querySelector(
59
+ "viking-field",
60
+ ) as HTMLElement;
61
+ expect(field.classList.contains("viking-field-invalid")).toBe(true);
62
+ const alert = fixture.nativeElement.querySelector(
63
+ ".viking-field-error",
64
+ ) as HTMLElement;
65
+ expect(alert.getAttribute("role")).toBe("alert");
66
+ expect(alert.textContent).toContain("Invalid email address");
67
+ });
68
+
69
+ it("binds input value via ngModel (ControlValueAccessor)", async () => {
70
+ const fixture = await render(FieldInputHost);
71
+ const wc = fixture.nativeElement.querySelector(
72
+ "viking-input-wc",
73
+ ) as HTMLElement;
74
+ const input = wc.shadowRoot?.querySelector("input") as HTMLInputElement;
75
+ input.value = "ops@deml.app";
76
+ input.dispatchEvent(new Event("input"));
77
+ fixture.detectChanges();
78
+ await fixture.whenStable();
79
+ expect(fixture.componentInstance.email).toBe("ops@deml.app");
80
+ });
81
+
82
+ it("renders stacked form section with icon heading", async () => {
83
+ const fixture = await render(FormStackHost);
84
+ const section = fixture.nativeElement.querySelector(
85
+ "viking-form-section",
86
+ ) as HTMLElement;
87
+ expect(section.classList.contains("viking-form-section-stack")).toBe(true);
88
+ expect(
89
+ section.querySelector(".viking-form-section-title")?.textContent,
90
+ ).toContain("Profile");
91
+ });
92
+ });
@@ -0,0 +1,85 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ input,
6
+ } from "@angular/core";
7
+
8
+ /** viking-gauge-arc — semicircle gauge fill driven by value / max. */
9
+ @Component({
10
+ selector: "viking-gauge-arc",
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ host: {
13
+ class: "viking-gauge-arc",
14
+ "aria-hidden": "true",
15
+ "[class.viking-gauge-arc-amber]": "tone() === 'amber'",
16
+ "[class.viking-gauge-arc-danger]": "tone() === 'danger'",
17
+ "[class.viking-gauge-arc-primary]": "tone() === 'primary'",
18
+ },
19
+ template: `
20
+ <svg class="viking-gauge-arc-svg" viewBox="0 0 100 60" fill="none">
21
+ <path class="viking-gauge-arc-bg" d="M10 50A40 40 0 0 1 90 50" />
22
+ <path
23
+ class="viking-gauge-arc-fill"
24
+ d="M10 50A40 40 0 0 1 90 50"
25
+ [attr.stroke-dasharray]="strokeDasharray()"
26
+ />
27
+ </svg>
28
+ `,
29
+ styles: [
30
+ `
31
+ :host {
32
+ display: block;
33
+ width: 100%;
34
+ color: var(--viking-accent);
35
+ }
36
+
37
+ .viking-gauge-arc-svg {
38
+ width: 100%;
39
+ height: auto;
40
+ overflow: visible;
41
+ shape-rendering: geometricPrecision;
42
+ }
43
+
44
+ .viking-gauge-arc-bg,
45
+ .viking-gauge-arc-fill {
46
+ fill: none;
47
+ stroke-width: 8;
48
+ stroke-linecap: round;
49
+ }
50
+
51
+ .viking-gauge-arc-bg {
52
+ stroke: color-mix(in srgb, var(--viking-text-muted) 25%, transparent);
53
+ }
54
+
55
+ .viking-gauge-arc-fill {
56
+ stroke: currentColor;
57
+ transition: stroke-dasharray 0.4s var(--viking-ease-default);
58
+ }
59
+
60
+ :host(.viking-gauge-arc-amber) {
61
+ color: var(--viking-warning);
62
+ }
63
+
64
+ :host(.viking-gauge-arc-danger) {
65
+ color: var(--viking-danger);
66
+ }
67
+
68
+ :host(.viking-gauge-arc-primary) {
69
+ color: var(--viking-accent);
70
+ }
71
+ `,
72
+ ],
73
+ })
74
+ export class VikingGaugeArc {
75
+ readonly value = input.required<number>();
76
+ readonly max = input<number>(100);
77
+ readonly circumference = input<number>(125.66);
78
+ readonly tone = input<"accent" | "amber" | "danger" | "primary">("accent");
79
+
80
+ protected readonly strokeDasharray = computed(() => {
81
+ const pct = Math.max(0, Math.min(1, this.value() / this.max()));
82
+ const filled = pct * this.circumference();
83
+ return `${filled} ${this.circumference()}`;
84
+ });
85
+ }
@@ -0,0 +1,27 @@
1
+ import { ChangeDetectionStrategy, Component, input } from "@angular/core";
2
+ import { VikingIcon } from "../icon/icon";
3
+ import { VikingIconName } from "../../core/icons";
4
+
5
+ /** viking-hud-panel — bordered dashboard panel with icon header. */
6
+ @Component({
7
+ selector: "viking-hud-panel",
8
+ imports: [VikingIcon],
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ host: {
11
+ class: "viking-hud-panel panel-section",
12
+ },
13
+ template: `
14
+ <div class="viking-hud-panel-header panel-header">
15
+ @if (icon()) {
16
+ <viking-icon [name]="icon()!" [size]="20" class="panel-icon" />
17
+ }
18
+ <h2 class="viking-hud-panel-title">{{ title() }}</h2>
19
+ <ng-content select="[vikingHudPanelBadge]" />
20
+ </div>
21
+ <ng-content />
22
+ `,
23
+ })
24
+ export class VikingHudPanel {
25
+ readonly title = input.required<string>();
26
+ readonly icon = input<VikingIconName | null>(null);
27
+ }
@@ -0,0 +1,284 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ input,
6
+ } from "@angular/core";
7
+ import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
8
+ import {
9
+ VIKING_FILLED_ICON_NAMES,
10
+ VIKING_ICON_FILLED_PATHS,
11
+ VIKING_ICON_PATHS,
12
+ resolveVikingIcon,
13
+ resolveVikingIconColor,
14
+ resolveVikingIconSize,
15
+ vikingIconViewBox,
16
+ VikingIconColorToken,
17
+ VikingIconName,
18
+ VikingIconSizePreset,
19
+ VikingIconVariant,
20
+ VIKING_DRAKKAR_ICON_NAMES_LIST,
21
+ } from "../../core/icons";
22
+ import {
23
+ isIntegrationBrandIcon,
24
+ VIKING_INTEGRATION_BRAND_SVGS,
25
+ type VikingIntegrationBrandName,
26
+ } from "../../core/integration-brand-icons";
27
+
28
+ const VIKING_FILLED_ICON_SET = new Set<string>(VIKING_FILLED_ICON_NAMES);
29
+ const VIKING_DRAKKAR_ICON_SET = new Set<string>(VIKING_DRAKKAR_ICON_NAMES_LIST);
30
+
31
+ /**
32
+ * viking-icon — themeable inline SVG icon (Lucide-sourced registry + DEML brand marks).
33
+ * Zero runtime dependencies; paths are inlined at build time from Lucide.
34
+ *
35
+ * @example Outline with semantic color
36
+ * ```html
37
+ * <viking-icon name="search" sizePreset="md" color="accent" />
38
+ * ```
39
+ *
40
+ * @example Brand mark (outline)
41
+ * ```html
42
+ * <viking-icon name="drakkar" [size]="28" color="accent" />
43
+ * ```
44
+ */
45
+ @Component({
46
+ selector: "viking-icon",
47
+ changeDetection: ChangeDetectionStrategy.OnPush,
48
+ host: {
49
+ "[class.viking-icon-spin]": "spin()",
50
+ "[class.viking-icon-filled]": "isFilled()",
51
+ "[class.viking-icon-outline]": "!isFilled()",
52
+ "[class.viking-icon-brand-drakkar]": "isDrakkarBrand()",
53
+ "[class.viking-icon-sm]": 'sizePreset() === "sm"',
54
+ "[class.viking-icon-md]": 'sizePreset() === "md"',
55
+ "[class.viking-icon-lg]":
56
+ 'sizePreset() === "lg" || (!sizePreset() && !size())',
57
+ "[class.viking-icon-backdrop]": "backdrop()",
58
+ "[class.viking-icon-backdrop-success]":
59
+ "backdrop() && backdropTone() === 'success'",
60
+ "[class.viking-icon-backdrop-warning]":
61
+ "backdrop() && backdropTone() === 'warning'",
62
+ "[class.viking-icon-backdrop-danger]":
63
+ "backdrop() && backdropTone() === 'danger'",
64
+ "[class.viking-icon-backdrop-info]":
65
+ "backdrop() && backdropTone() === 'info'",
66
+ "[style.color]": "resolvedColor()",
67
+ "aria-hidden": "true",
68
+ },
69
+ template: `
70
+ @if (resolvedName() === "google") {
71
+ <svg
72
+ class="viking-icon-svg viking-icon-brand"
73
+ xmlns="http://www.w3.org/2000/svg"
74
+ viewBox="0 0 48 48"
75
+ [style.width.px]="resolvedSize()"
76
+ [style.height.px]="resolvedSize()"
77
+ aria-hidden="true"
78
+ >
79
+ <path
80
+ fill="#EA4335"
81
+ d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
82
+ />
83
+ <path
84
+ fill="#4285F4"
85
+ d="M46.5 24c0-1.55-.15-3.24-.47-4.77H24v9.03h12.75c-.55 2.83-2.13 5.23-4.53 6.82l7.02 5.44C43.35 36.56 46.5 30.82 46.5 24z"
86
+ />
87
+ <path
88
+ fill="#FBBC05"
89
+ d="M10.54 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24s.92 7.54 2.56 10.78l7.98-6.19z"
90
+ />
91
+ <path
92
+ fill="#34A853"
93
+ d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.02-5.44c-1.99 1.33-4.51 2.15-7.87 2.15-6.26 0-11.57-4.22-13.46-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
94
+ />
95
+ </svg>
96
+ } @else if (resolvedName() === "apple") {
97
+ <svg
98
+ class="viking-icon-svg viking-icon-brand"
99
+ xmlns="http://www.w3.org/2000/svg"
100
+ viewBox="0 0 24 24"
101
+ fill="currentColor"
102
+ [style.width.px]="resolvedSize()"
103
+ [style.height.px]="resolvedSize()"
104
+ aria-hidden="true"
105
+ >
106
+ <path
107
+ d="M16.365 12.14c.02 2.53 2.21 3.38 2.23 3.39-.02.07-.35 1.21-1.16 2.4-.7 1.02-1.43 2.03-2.58 2.05-1.13.02-1.49-.67-2.78-.67-1.29 0-1.69.65-2.75.69-1.11.04-1.95-1.12-2.66-2.13-1.44-2.08-2.54-5.87-1.07-8.43.73-1.27 2.04-2.08 3.46-2.1 1.08-.02 2.1.72 2.78.72.67 0 2.14-.89 3.61-.76.61.03 2.33.25 3.44 1.88-.09.06-2.05 1.2-2.03 3.55M13.75 3.64c.59-.71 1-1.7.89-2.68-.86.03-1.9.57-2.52 1.28-.55.63-1.03 1.65-.9 2.62.95.07 1.92-.49 2.53-1.22"
108
+ />
109
+ </svg>
110
+ } @else if (isIntegrationBrand()) {
111
+ <svg
112
+ class="viking-icon-svg viking-icon-brand viking-icon-integration-brand"
113
+ xmlns="http://www.w3.org/2000/svg"
114
+ viewBox="0 0 24 24"
115
+ [style.width.px]="resolvedSize()"
116
+ [style.height.px]="resolvedSize()"
117
+ aria-hidden="true"
118
+ >
119
+ <g [innerHTML]="integrationBrandSvg()"></g>
120
+ </svg>
121
+ } @else {
122
+ <svg
123
+ class="viking-icon-svg"
124
+ xmlns="http://www.w3.org/2000/svg"
125
+ [attr.viewBox]="viewBox()"
126
+ [attr.fill]="isFilled() ? 'currentColor' : 'none'"
127
+ [attr.fill-rule]="isFilled() ? 'evenodd' : null"
128
+ [attr.stroke]="isFilled() ? 'none' : 'currentColor'"
129
+ stroke-linecap="round"
130
+ stroke-linejoin="round"
131
+ [style.width.px]="resolvedSize()"
132
+ [style.height.px]="resolvedSize()"
133
+ >
134
+ <!-- innerHTML on <g> — binding on <svg> throws NotYetImplemented under SSR (domino). -->
135
+ <g [innerHTML]="paths()"></g>
136
+ </svg>
137
+ }
138
+ `,
139
+ styles: [
140
+ `
141
+ :host {
142
+ display: inline-flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ flex-shrink: 0;
146
+ line-height: 0;
147
+ color: inherit;
148
+ }
149
+
150
+ :host(.viking-icon-outline) .viking-icon-svg {
151
+ --viking-icon-stroke-width: 1.75;
152
+ stroke-width: var(--viking-icon-stroke-width);
153
+ shape-rendering: geometricPrecision;
154
+ }
155
+
156
+ :host(.viking-icon-outline.viking-icon-brand-drakkar) .viking-icon-svg {
157
+ --viking-icon-stroke-width: 1.5;
158
+ }
159
+
160
+ :host(.viking-icon-sm) .viking-icon-svg {
161
+ --viking-icon-stroke-width: 1.5;
162
+ }
163
+
164
+ :host(.viking-icon-lg) .viking-icon-svg {
165
+ --viking-icon-stroke-width: 1.75;
166
+ }
167
+
168
+ :host(.viking-icon-filled) .viking-icon-svg {
169
+ stroke: none;
170
+ }
171
+
172
+ :host(.viking-icon-spin) svg {
173
+ animation: viking-icon-rotate 0.9s linear infinite;
174
+ }
175
+
176
+ :host(.viking-icon-backdrop) {
177
+ padding: var(--viking-icon-backdrop-padding, var(--viking-space-half));
178
+ border-radius: var(--viking-radius-lg);
179
+ background: var(--viking-accent-soft);
180
+ color: var(--viking-accent-strong);
181
+ box-shadow: var(--viking-shadow-sm);
182
+ }
183
+
184
+ :host(.viking-icon-backdrop-success) {
185
+ background: color-mix(in srgb, var(--viking-success) 14%, transparent);
186
+ color: var(--viking-success);
187
+ }
188
+
189
+ :host(.viking-icon-backdrop-warning) {
190
+ background: color-mix(in srgb, var(--viking-warning) 14%, transparent);
191
+ color: var(--viking-warning);
192
+ }
193
+
194
+ :host(.viking-icon-backdrop-danger) {
195
+ background: color-mix(in srgb, var(--viking-danger) 14%, transparent);
196
+ color: var(--viking-danger);
197
+ }
198
+
199
+ :host(.viking-icon-backdrop-info) {
200
+ background: color-mix(in srgb, var(--viking-info) 14%, transparent);
201
+ color: var(--viking-info);
202
+ }
203
+
204
+ @keyframes viking-icon-rotate {
205
+ to {
206
+ transform: rotate(360deg);
207
+ }
208
+ }
209
+ `,
210
+ ],
211
+ })
212
+ export class VikingIcon {
213
+ readonly name = input.required<VikingIconName | string>();
214
+ /** Explicit pixel size — overridden by sizePreset when set. */
215
+ readonly size = input<number | undefined>(undefined);
216
+ /** sm (16px) · md (20px) · lg (24px) */
217
+ readonly sizePreset = input<VikingIconSizePreset | null>(null);
218
+ /** outline (stroke) or filled (solid) */
219
+ readonly variant = input<VikingIconVariant>("outline");
220
+ /** Semantic token (accent, success, …) or any CSS color value. */
221
+ readonly color = input<VikingIconColorToken | string | undefined>(undefined);
222
+ /** Renders icon inside a padded tokenized backdrop (matches viking-icon-badge). */
223
+ readonly backdrop = input<boolean>(false);
224
+ readonly backdropTone = input<
225
+ "default" | "success" | "warning" | "danger" | "info"
226
+ >("default");
227
+ readonly spin = input<boolean>(false);
228
+
229
+ protected readonly resolvedName = computed(() =>
230
+ resolveVikingIcon(this.name()),
231
+ );
232
+
233
+ protected readonly resolvedSize = computed(() =>
234
+ resolveVikingIconSize(this.size(), this.sizePreset()),
235
+ );
236
+
237
+ protected readonly resolvedColor = computed(() =>
238
+ resolveVikingIconColor(this.color()),
239
+ );
240
+
241
+ protected readonly viewBox = computed(() =>
242
+ vikingIconViewBox(this.resolvedName()),
243
+ );
244
+
245
+ protected readonly isFilled = computed(() => {
246
+ const name = this.resolvedName();
247
+ if (name === "google" || name === "apple" || isIntegrationBrandIcon(name)) {
248
+ return false;
249
+ }
250
+ if (this.variant() === "filled") {
251
+ return true;
252
+ }
253
+ return VIKING_FILLED_ICON_SET.has(name);
254
+ });
255
+
256
+ protected readonly isDrakkarBrand = computed(() =>
257
+ VIKING_DRAKKAR_ICON_SET.has(this.resolvedName()),
258
+ );
259
+
260
+ protected readonly isIntegrationBrand = computed(() =>
261
+ isIntegrationBrandIcon(this.resolvedName()),
262
+ );
263
+
264
+ protected readonly integrationBrandSvg = computed<SafeHtml>(() => {
265
+ const name = this.resolvedName() as VikingIntegrationBrandName;
266
+ return this.sanitizer.bypassSecurityTrustHtml(
267
+ VIKING_INTEGRATION_BRAND_SVGS[name] ?? "",
268
+ );
269
+ });
270
+
271
+ protected readonly paths = computed<SafeHtml>(() => {
272
+ const name = this.resolvedName();
273
+ const html =
274
+ this.isFilled() && VIKING_ICON_FILLED_PATHS[name]
275
+ ? VIKING_ICON_FILLED_PATHS[name]
276
+ : (VIKING_ICON_PATHS[name] ?? "");
277
+ return this.sanitizer.bypassSecurityTrustHtml(html);
278
+ });
279
+
280
+ constructor(private readonly sanitizer: DomSanitizer) {}
281
+ }
282
+
283
+ /** Alias for consumers expecting VikingIconComponent. */
284
+ export { VikingIcon as VikingIconComponent };
@@ -0,0 +1,87 @@
1
+ import { ChangeDetectionStrategy, Component, input } from "@angular/core";
2
+ import { VikingIcon } from "../icon/icon";
3
+ import {
4
+ VikingIconColorToken,
5
+ VikingIconName,
6
+ VikingIconSizePreset,
7
+ } from "../../core/icons";
8
+
9
+ export type VikingIconBadgeTone =
10
+ | "default"
11
+ | "success"
12
+ | "warning"
13
+ | "danger"
14
+ | "info";
15
+
16
+ /**
17
+ * viking-icon-badge — consistent icon backdrop for empty states, callouts, and metric headers.
18
+ */
19
+ @Component({
20
+ selector: "viking-icon-badge",
21
+ imports: [VikingIcon],
22
+ changeDetection: ChangeDetectionStrategy.OnPush,
23
+ host: {
24
+ class: "viking-icon-badge",
25
+ "[class.viking-icon-badge-success]": "tone() === 'success'",
26
+ "[class.viking-icon-badge-warning]": "tone() === 'warning'",
27
+ "[class.viking-icon-badge-danger]": "tone() === 'danger'",
28
+ "[class.viking-icon-badge-info]": "tone() === 'info'",
29
+ "[attr.aria-hidden]": 'decorative() ? "true" : null',
30
+ },
31
+ template: `
32
+ <viking-icon
33
+ [name]="icon()"
34
+ [size]="size()"
35
+ [sizePreset]="sizePreset()"
36
+ [color]="color()"
37
+ [variant]="variant()"
38
+ />
39
+ `,
40
+ styles: [
41
+ `
42
+ :host {
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ flex-shrink: 0;
47
+ width: var(--viking-icon-badge-size, var(--viking-space-6));
48
+ height: var(--viking-icon-badge-size, var(--viking-space-6));
49
+ padding: var(--viking-icon-badge-padding, var(--viking-space-half));
50
+ box-sizing: border-box;
51
+ border-radius: var(--viking-radius-lg);
52
+ background: var(--viking-accent-soft);
53
+ color: var(--viking-accent-strong);
54
+ box-shadow: var(--viking-shadow-sm);
55
+ }
56
+
57
+ :host(.viking-icon-badge-success) {
58
+ background: color-mix(in srgb, var(--viking-success) 14%, transparent);
59
+ color: var(--viking-success);
60
+ }
61
+
62
+ :host(.viking-icon-badge-warning) {
63
+ background: color-mix(in srgb, var(--viking-warning) 14%, transparent);
64
+ color: var(--viking-warning);
65
+ }
66
+
67
+ :host(.viking-icon-badge-danger) {
68
+ background: color-mix(in srgb, var(--viking-danger) 14%, transparent);
69
+ color: var(--viking-danger);
70
+ }
71
+
72
+ :host(.viking-icon-badge-info) {
73
+ background: color-mix(in srgb, var(--viking-info) 14%, transparent);
74
+ color: var(--viking-info);
75
+ }
76
+ `,
77
+ ],
78
+ })
79
+ export class VikingIconBadge {
80
+ readonly icon = input.required<VikingIconName>();
81
+ readonly tone = input<VikingIconBadgeTone>("default");
82
+ readonly size = input<number | undefined>(28);
83
+ readonly sizePreset = input<VikingIconSizePreset | null>(null);
84
+ readonly color = input<VikingIconColorToken | string | undefined>(undefined);
85
+ readonly variant = input<"outline" | "filled">("outline");
86
+ readonly decorative = input<boolean>(true);
87
+ }
@@ -0,0 +1,32 @@
1
+ import { Component } from "@angular/core";
2
+ import { TestBed } from "@angular/core/testing";
3
+ import { VikingIconHeading } from "./icon-heading";
4
+
5
+ @Component({
6
+ imports: [VikingIconHeading],
7
+ template: `<viking-icon-heading icon="shield" headingLevel="h3"
8
+ >Tenant Isolation</viking-icon-heading
9
+ >`,
10
+ })
11
+ class HostComponent {}
12
+
13
+ describe("VikingIconHeading", () => {
14
+ beforeEach(async () => {
15
+ await TestBed.configureTestingModule({
16
+ imports: [HostComponent],
17
+ }).compileComponents();
18
+ });
19
+
20
+ it("renders aligned icon and title", () => {
21
+ const fixture = TestBed.createComponent(HostComponent);
22
+ fixture.detectChanges();
23
+ const heading = fixture.nativeElement.querySelector(
24
+ ".viking-icon-heading",
25
+ ) as HTMLElement;
26
+ expect(heading).toBeTruthy();
27
+ expect(heading.querySelector(".viking-icon-heading__icon")).toBeTruthy();
28
+ expect(
29
+ heading.querySelector("h3.viking-icon-heading__title")?.textContent,
30
+ ).toContain("Tenant Isolation");
31
+ });
32
+ });
@@ -0,0 +1,38 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ ViewEncapsulation,
5
+ input,
6
+ } from "@angular/core";
7
+ import { VikingIcon } from "../icon/icon";
8
+ import { VikingIconName } from "../../core/icons";
9
+
10
+ /**
11
+ * viking-icon-heading — icon + title row with shared vertical alignment.
12
+ * Use in bento cards, integration tiles, and docs panels.
13
+ */
14
+ @Component({
15
+ selector: "viking-icon-heading",
16
+ changeDetection: ChangeDetectionStrategy.OnPush,
17
+ encapsulation: ViewEncapsulation.None,
18
+ imports: [VikingIcon],
19
+ host: {
20
+ class: "viking-icon-heading",
21
+ "[class.viking-icon-heading--lg]": 'size() === "lg"',
22
+ },
23
+ template: `
24
+ <span class="viking-icon-heading__icon" aria-hidden="true">
25
+ <viking-icon [name]="icon()" [size]="24" color="accent" />
26
+ </span>
27
+ @if (headingLevel() === "h2") {
28
+ <h2 class="viking-icon-heading__title"><ng-content /></h2>
29
+ } @else {
30
+ <h3 class="viking-icon-heading__title"><ng-content /></h3>
31
+ }
32
+ `,
33
+ })
34
+ export class VikingIconHeading {
35
+ readonly icon = input.required<VikingIconName>();
36
+ readonly size = input<"md" | "lg">("md");
37
+ readonly headingLevel = input<"h2" | "h3">("h3");
38
+ }