@dataengineeringformachinelearning/viking-ui 4.0.4 → 4.0.6

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 (246) hide show
  1. package/README.md +35 -11
  2. package/dist/README.md +35 -11
  3. package/dist/design-tokens.css +300 -85
  4. package/dist/fesm2022/dataengineeringformachinelearning-viking-ui.mjs +100 -64
  5. package/dist/fesm2022/dataengineeringformachinelearning-viking-ui.mjs.map +1 -1
  6. package/dist/icons.js +306 -0
  7. package/dist/package.json +24 -5
  8. package/{src/lib/site-drakkar/site-drakkar.config.ts → dist/site-drakkar.js} +64 -130
  9. package/dist/src/tokens/viking-tokens.json +9 -7
  10. package/dist/types/dataengineeringformachinelearning-viking-ui.d.ts +97 -3
  11. package/dist/viking-components.css +161 -70
  12. package/dist/viking-tokens.json +9 -7
  13. package/dist/viking-ui-elements.js +44 -32
  14. package/dist/viking-ui.css +1 -1
  15. package/dist/web-components.js +44 -32
  16. package/package.json +30 -8
  17. package/dist/scripts/build-web-components.mjs +0 -37
  18. package/dist/src/web/badge/viking-badge-wc.ts +0 -116
  19. package/dist/src/web/button/viking-button-wc.ts +0 -165
  20. package/dist/src/web/callout/viking-callout-wc.ts +0 -105
  21. package/dist/src/web/card/viking-card-wc.ts +0 -67
  22. package/dist/src/web/core/base.ts +0 -56
  23. package/dist/src/web/core/dom.ts +0 -53
  24. package/dist/src/web/core/icons-inline.ts +0 -44
  25. package/dist/src/web/core/styles.ts +0 -1261
  26. package/dist/src/web/core/types.ts +0 -19
  27. package/dist/src/web/field/viking-field-wc.ts +0 -154
  28. package/dist/src/web/index.ts +0 -73
  29. package/dist/src/web/input/viking-input-wc.ts +0 -211
  30. package/dist/src/web/modal/viking-modal-wc.ts +0 -187
  31. package/dist/src/web/search-palette/viking-search-palette-wc.ts +0 -495
  32. package/dist/src/web/select/viking-select-wc.ts +0 -218
  33. package/dist/src/web/suite-header/viking-suite-header-wc.ts +0 -729
  34. package/dist/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +0 -234
  35. package/dist/src/web/theme-toggle/viking-theme-toggle-wc.ts +0 -139
  36. package/dist/src/web/types.ts +0 -37
  37. package/dist/src/web/web-components.spec.ts +0 -297
  38. package/src/assets/drakkar-favicon.svg +0 -17
  39. package/src/assets/fonts/inter/InterVariable-Italic.woff2 +0 -0
  40. package/src/assets/fonts/inter/InterVariable.woff2 +0 -0
  41. package/src/core/brand/deml-lockup.svg +0 -5
  42. package/src/core/brand/deml-mark-compact.svg +0 -4
  43. package/src/core/brand/deml-mark-filled.svg +0 -3
  44. package/src/core/brand/deml-mark-outline.svg +0 -4
  45. package/src/core/brand-icons.ts +0 -62
  46. package/src/core/icons.spec.ts +0 -52
  47. package/src/core/icons.ts +0 -206
  48. package/src/core/integration-brand-icons.ts +0 -77
  49. package/src/core/lucide-paths.generated.ts +0 -130
  50. package/src/core/types.ts +0 -85
  51. package/src/core/uid.ts +0 -7
  52. package/src/elements/button/viking-button.ts +0 -201
  53. package/src/elements/card/viking-card.ts +0 -60
  54. package/src/elements/core/dom.ts +0 -33
  55. package/src/elements/core/styles.ts +0 -28
  56. package/src/elements/modal/viking-modal.ts +0 -154
  57. package/src/index.ts +0 -1
  58. package/src/lib/accordion/accordion.ts +0 -126
  59. package/src/lib/app-header/app-header.scss +0 -274
  60. package/src/lib/app-header/app-header.ts +0 -43
  61. package/src/lib/app-sidebar/app-sidebar.scss +0 -415
  62. package/src/lib/app-sidebar/app-sidebar.ts +0 -29
  63. package/src/lib/auth-panel/auth-panel.spec.ts +0 -132
  64. package/src/lib/auth-panel/auth-panel.ts +0 -228
  65. package/src/lib/autocomplete/autocomplete.ts +0 -223
  66. package/src/lib/avatar/avatar.ts +0 -126
  67. package/src/lib/badge/badge.ts +0 -182
  68. package/src/lib/bar/bar.ts +0 -31
  69. package/src/lib/brand/brand.ts +0 -60
  70. package/src/lib/breadcrumbs/breadcrumbs.ts +0 -81
  71. package/src/lib/button/button-group.ts +0 -40
  72. package/src/lib/button/button.scss +0 -119
  73. package/src/lib/button/button.ts +0 -98
  74. package/src/lib/calendar/calendar.ts +0 -253
  75. package/src/lib/callout/callout.ts +0 -211
  76. package/src/lib/card/card-title.spec.ts +0 -27
  77. package/src/lib/card/card-title.ts +0 -50
  78. package/src/lib/card/card.ts +0 -200
  79. package/src/lib/carousel/carousel.ts +0 -206
  80. package/src/lib/chart/chart-zoom.spec.ts +0 -65
  81. package/src/lib/chart/chart-zoom.ts +0 -71
  82. package/src/lib/chart/chart.ts +0 -1257
  83. package/src/lib/chart-card-header/chart-card-header.ts +0 -80
  84. package/src/lib/chart-empty-state/chart-empty-state.ts +0 -146
  85. package/src/lib/chart-panel/chart-panel.ts +0 -133
  86. package/src/lib/checkbox/checkbox.ts +0 -139
  87. package/src/lib/color-picker/color-picker.ts +0 -148
  88. package/src/lib/command/command.ts +0 -260
  89. package/src/lib/composer/composer.ts +0 -180
  90. package/src/lib/confirm-dialog/confirm-dialog.ts +0 -163
  91. package/src/lib/confirm-dialog/dialog.service.ts +0 -79
  92. package/src/lib/context/context.ts +0 -75
  93. package/src/lib/core/brand-icons.ts +0 -62
  94. package/src/lib/core/cva.ts +0 -33
  95. package/src/lib/core/icons.ts +0 -206
  96. package/src/lib/core/integration-brand-icons.ts +0 -77
  97. package/src/lib/core/lucide-paths.generated.ts +0 -130
  98. package/src/lib/date-picker/date-picker.ts +0 -139
  99. package/src/lib/dropdown/dropdown.ts +0 -188
  100. package/src/lib/editor/editor.ts +0 -170
  101. package/src/lib/empty-state/empty-state.ts +0 -100
  102. package/src/lib/fab/fab.ts +0 -76
  103. package/src/lib/field/field.ts +0 -111
  104. package/src/lib/file-upload/file-upload.ts +0 -208
  105. package/src/lib/footer/footer.scss +0 -162
  106. package/src/lib/footer/footer.ts +0 -28
  107. package/src/lib/form-section/form-section.ts +0 -200
  108. package/src/lib/forms.spec.ts +0 -92
  109. package/src/lib/gauge-arc/gauge-arc.ts +0 -85
  110. package/src/lib/hud-panel/hud-panel.ts +0 -27
  111. package/src/lib/icon/icon.ts +0 -284
  112. package/src/lib/icon-badge/icon-badge.ts +0 -87
  113. package/src/lib/icon-heading/icon-heading.spec.ts +0 -32
  114. package/src/lib/icon-heading/icon-heading.ts +0 -38
  115. package/src/lib/icon-text/icon-text.ts +0 -120
  116. package/src/lib/input/input.ts +0 -119
  117. package/src/lib/kanban/kanban.ts +0 -211
  118. package/src/lib/kbd/kbd.ts +0 -32
  119. package/src/lib/label/label.ts +0 -39
  120. package/src/lib/loading-overlay/loading-overlay.ts +0 -80
  121. package/src/lib/menubar/menubar.ts +0 -77
  122. package/src/lib/metric-card/metric-card.ts +0 -33
  123. package/src/lib/modal/modal.ts +0 -207
  124. package/src/lib/native-select/native-select.ts +0 -124
  125. package/src/lib/navbar/navbar.ts +0 -124
  126. package/src/lib/navigation-menu/navigation-menu.ts +0 -116
  127. package/src/lib/otp-input/otp-input.ts +0 -164
  128. package/src/lib/page-back-link/page-back-link.ts +0 -74
  129. package/src/lib/page-header/page-header.ts +0 -70
  130. package/src/lib/pagination/pagination.ts +0 -157
  131. package/src/lib/pillbox/pillbox.ts +0 -157
  132. package/src/lib/popover/popover.ts +0 -92
  133. package/src/lib/profile/profile.ts +0 -73
  134. package/src/lib/progress/progress.ts +0 -123
  135. package/src/lib/radio/radio.ts +0 -132
  136. package/src/lib/ring-gauge/ring-gauge.ts +0 -75
  137. package/src/lib/scroll-area/scroll-area.ts +0 -57
  138. package/src/lib/search-palette/search-palette.scss +0 -288
  139. package/src/lib/search-palette/search-palette.ts +0 -114
  140. package/src/lib/select/select.ts +0 -292
  141. package/src/lib/separator/separator.ts +0 -59
  142. package/src/lib/sheet/sheet.ts +0 -192
  143. package/src/lib/sidebar-nav/sidebar-nav.scss +0 -218
  144. package/src/lib/sidebar-nav/sidebar-nav.ts +0 -158
  145. package/src/lib/site-drakkar/site-footer.ts +0 -133
  146. package/src/lib/site-drakkar/site-navbar.scss +0 -2
  147. package/src/lib/site-drakkar/site-navbar.ts +0 -286
  148. package/src/lib/site-drakkar/suite-search-items.spec.ts +0 -61
  149. package/src/lib/site-drakkar/suite-search-items.ts +0 -246
  150. package/src/lib/skeleton/skeleton.ts +0 -51
  151. package/src/lib/slider/slider.ts +0 -133
  152. package/src/lib/spinner/spinner.ts +0 -75
  153. package/src/lib/status-metric-row/status-metric-row.ts +0 -74
  154. package/src/lib/suite-search-palette/suite-search-palette.ts +0 -95
  155. package/src/lib/switch/switch.ts +0 -131
  156. package/src/lib/table/table.ts +0 -137
  157. package/src/lib/tabs/tab-panel.ts +0 -61
  158. package/src/lib/tabs/tab.ts +0 -107
  159. package/src/lib/tabs/tabs.ts +0 -109
  160. package/src/lib/textarea/textarea.ts +0 -103
  161. package/src/lib/theme-toggle/theme-toggle.spec.ts +0 -40
  162. package/src/lib/theme-toggle/theme-toggle.ts +0 -40
  163. package/src/lib/time-picker/time-picker.ts +0 -197
  164. package/src/lib/timeline/timeline.ts +0 -152
  165. package/src/lib/toast/toast.ts +0 -196
  166. package/src/lib/toggle/toggle-group.ts +0 -60
  167. package/src/lib/toggle/toggle.ts +0 -101
  168. package/src/lib/tooltip/tooltip.ts +0 -119
  169. package/src/lib/typography/heading.ts +0 -52
  170. package/src/lib/typography/text.ts +0 -51
  171. package/src/lib/uptime-bar/uptime-bar.ts +0 -55
  172. package/src/lib/verification-code-field/verification-code-field.ts +0 -149
  173. package/src/lib/whitepaper-cta/whitepaper-cta.scss +0 -130
  174. package/src/lib/whitepaper-cta/whitepaper-cta.ts +0 -78
  175. package/src/lib/wizard/wizard.ts +0 -80
  176. package/src/public-api.ts +0 -172
  177. package/src/styles/_buttons.scss +0 -386
  178. package/src/styles/_component-primitives.scss +0 -183
  179. package/src/styles/_drakkar-buttons.scss +0 -85
  180. package/src/styles/_fonts.scss +0 -22
  181. package/src/styles/_forms.scss +0 -66
  182. package/src/styles/_input.scss +0 -106
  183. package/src/styles/_layout-enforcement.scss +0 -229
  184. package/src/styles/_layout-rhythm.scss +0 -158
  185. package/src/styles/_legacy-aliases.scss +0 -212
  186. package/src/styles/_series-colors.scss +0 -24
  187. package/src/styles/_static-primitives.scss +0 -857
  188. package/src/styles/_typography.scss +0 -87
  189. package/src/styles/_variables.scss +0 -527
  190. package/src/styles/components/a11y.scss +0 -90
  191. package/src/styles/components/badges.scss +0 -102
  192. package/src/styles/components/extracted-utilities.scss +0 -459
  193. package/src/styles/components/footer.scss +0 -168
  194. package/src/styles/components/icon-heading.scss +0 -47
  195. package/src/styles/components/icon-inline.scss +0 -101
  196. package/src/styles/components/layout.scss +0 -59
  197. package/src/styles/components/utilities.scss +0 -131
  198. package/src/styles/components/viking-inspired.scss +0 -204
  199. package/src/styles/components/whitepaper-cta.scss +0 -130
  200. package/src/styles/components-bundle.scss +0 -9
  201. package/src/styles/components.scss +0 -442
  202. package/src/styles/deml-components.scss +0 -10
  203. package/src/styles/index.scss +0 -8
  204. package/src/styles/layout-shell.scss +0 -111
  205. package/src/styles/page-shell.scss +0 -859
  206. package/src/styles/static-navbar.scss +0 -1250
  207. package/src/styles/surfaces/backend.scss +0 -154
  208. package/src/styles/surfaces/docs-global.scss +0 -73
  209. package/src/styles/surfaces/docs-shell.scss +0 -437
  210. package/src/styles/surfaces/docs-showcase.scss +0 -1153
  211. package/src/styles/surfaces/marketing-cta.scss +0 -62
  212. package/src/styles/surfaces/marketing-docs-bento.scss +0 -67
  213. package/src/styles/surfaces/marketing-global.scss +0 -748
  214. package/src/styles/surfaces/marketing-landing.scss +0 -1526
  215. package/src/styles/surfaces/marketing-publication.scss +0 -535
  216. package/src/styles/surfaces/marketing-theme.scss +0 -14
  217. package/src/styles/surfaces/swagger-ui.scss +0 -1013
  218. package/src/styles/tokens-export.scss +0 -18
  219. package/src/styles/tokens.scss +0 -5
  220. package/src/styles/viking-ui-bundle.scss +0 -23
  221. package/src/styles/viking-ui.scss +0 -272
  222. package/src/tokens/series-presets.ts +0 -15
  223. package/src/tokens/tailwind.preset.js +0 -209
  224. package/src/tokens/viking-tokens.json +0 -318
  225. package/src/viking-ui.spec.ts +0 -416
  226. package/src/web/badge/viking-badge-wc.ts +0 -116
  227. package/src/web/button/viking-button-wc.ts +0 -165
  228. package/src/web/callout/viking-callout-wc.ts +0 -105
  229. package/src/web/card/viking-card-wc.ts +0 -67
  230. package/src/web/core/base.ts +0 -56
  231. package/src/web/core/dom.ts +0 -53
  232. package/src/web/core/icons-inline.ts +0 -44
  233. package/src/web/core/styles.ts +0 -1261
  234. package/src/web/core/types.ts +0 -19
  235. package/src/web/field/viking-field-wc.ts +0 -154
  236. package/src/web/index.ts +0 -73
  237. package/src/web/input/viking-input-wc.ts +0 -211
  238. package/src/web/modal/viking-modal-wc.ts +0 -187
  239. package/src/web/search-palette/viking-search-palette-wc.ts +0 -495
  240. package/src/web/select/viking-select-wc.ts +0 -218
  241. package/src/web/suite-header/viking-suite-header-wc.ts +0 -729
  242. package/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +0 -234
  243. package/src/web/theme-toggle/viking-theme-toggle-wc.ts +0 -139
  244. package/src/web/types.ts +0 -37
  245. package/src/web/web-components.spec.ts +0 -297
  246. package/src/web-components/index.ts +0 -1
@@ -1,154 +0,0 @@
1
- import {
2
- defineVikingElement,
3
- HTMLElementBase,
4
- readBooleanAttribute,
5
- } from "../core/dom";
6
- import { attachStyles, resetStyles } from "../core/styles";
7
-
8
- const styles = `
9
- ${resetStyles}
10
-
11
- :host {
12
- display: contents;
13
- }
14
-
15
- dialog {
16
- width: min(calc(100vw - (var(--viking-space-2) * 2)), 42rem);
17
- padding: 0;
18
- border: 1px solid var(--viking-border-strong);
19
- border-radius: var(--viking-radius-lg);
20
- background: var(--viking-surface-recipe);
21
- color: var(--viking-text);
22
- box-shadow: var(--viking-shadow-lg);
23
- }
24
-
25
- dialog::backdrop {
26
- background: var(--viking-overlay-backdrop);
27
- }
28
-
29
- .modal {
30
- display: grid;
31
- gap: var(--viking-space-3);
32
- padding: var(--viking-card-padding);
33
- }
34
-
35
- .header {
36
- display: flex;
37
- align-items: start;
38
- justify-content: space-between;
39
- gap: var(--viking-space-2);
40
- }
41
-
42
- .title {
43
- margin: 0;
44
- color: var(--viking-text);
45
- font-size: var(--viking-font-size-lg);
46
- line-height: var(--viking-line-height-tight);
47
- }
48
-
49
- .close {
50
- display: inline-grid;
51
- width: var(--viking-control-height-sm);
52
- height: var(--viking-control-height-sm);
53
- place-items: center;
54
- border: 1px solid var(--viking-border);
55
- border-radius: var(--viking-radius);
56
- background: var(--viking-surface-alt);
57
- color: var(--viking-text);
58
- cursor: pointer;
59
- }
60
-
61
- .close:focus-visible {
62
- outline: var(--viking-ring-width) solid var(--viking-ring);
63
- outline-offset: var(--viking-ring-offset);
64
- }
65
- `;
66
-
67
- export class VikingModal extends HTMLElementBase {
68
- static readonly tagName = "viking-modal";
69
-
70
- static get observedAttributes(): string[] {
71
- return ["open", "label"];
72
- }
73
-
74
- private readonly shadowRootRef: ShadowRoot;
75
- private dialog: HTMLDialogElement | null = null;
76
-
77
- constructor() {
78
- super();
79
- this.shadowRootRef = this.attachShadow({ mode: "open" });
80
- attachStyles(this.shadowRootRef, styles);
81
- }
82
-
83
- connectedCallback(): void {
84
- this.render();
85
- }
86
-
87
- attributeChangedCallback(): void {
88
- if (this.isConnected) {
89
- this.syncOpenState();
90
- }
91
- }
92
-
93
- open(): void {
94
- this.setAttribute("open", "");
95
- }
96
-
97
- close(): void {
98
- this.removeAttribute("open");
99
- }
100
-
101
- private render(): void {
102
- const title = this.getAttribute("label") ?? "Dialog";
103
- this.shadowRootRef.innerHTML = `
104
- <dialog aria-label="${title}">
105
- <section class="modal" part="surface">
106
- <header class="header">
107
- <h2 class="title"><slot name="title">${title}</slot></h2>
108
- <button class="close" type="button" aria-label="Close dialog">x</button>
109
- </header>
110
- <slot></slot>
111
- <slot name="footer"></slot>
112
- </section>
113
- </dialog>
114
- `;
115
- this.dialog = this.shadowRootRef.querySelector("dialog");
116
- this.shadowRootRef
117
- .querySelector(".close")
118
- ?.addEventListener("click", () => this.close());
119
- this.dialog?.addEventListener("close", () => {
120
- if (this.hasAttribute("open")) {
121
- this.removeAttribute("open");
122
- }
123
- this.dispatchEvent(
124
- new CustomEvent("viking-close", { bubbles: true, composed: true }),
125
- );
126
- });
127
- this.syncOpenState();
128
- }
129
-
130
- private syncOpenState(): void {
131
- if (!this.dialog) {
132
- return;
133
- }
134
-
135
- if (readBooleanAttribute(this, "open")) {
136
- if (!this.dialog.open && typeof this.dialog.showModal === "function") {
137
- this.dialog.showModal();
138
- } else if (!this.dialog.open) {
139
- this.dialog.setAttribute("open", "");
140
- }
141
- return;
142
- }
143
-
144
- if (this.dialog.open && typeof this.dialog.close === "function") {
145
- this.dialog.close();
146
- } else {
147
- this.dialog.removeAttribute("open");
148
- }
149
- }
150
- }
151
-
152
- export const registerVikingModal = (): void => {
153
- defineVikingElement(VikingModal.tagName, VikingModal);
154
- };
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./public-api";
@@ -1,126 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- Optional,
5
- input,
6
- model,
7
- } from "@angular/core";
8
- import { VikingIcon } from "../icon/icon";
9
- import { vikingUid } from "../../core/uid";
10
-
11
- /**
12
- * viking-accordion — collapsible content panels.
13
- * Set exclusive to allow only one open item at a time.
14
- */
15
- @Component({
16
- selector: "viking-accordion",
17
- changeDetection: ChangeDetectionStrategy.OnPush,
18
- template: `<ng-content />`,
19
- styles: [
20
- `
21
- :host {
22
- display: block;
23
- border: 1px solid var(--viking-border);
24
- border-radius: var(--viking-radius);
25
- background: var(--viking-surface);
26
- overflow: hidden;
27
- }
28
- :host ::ng-deep viking-accordion-item:not(:last-child) {
29
- border-bottom: 1px solid var(--viking-border);
30
- }
31
- `,
32
- ],
33
- })
34
- export class VikingAccordion {
35
- readonly exclusive = input<boolean>(false);
36
-
37
- private openItem: VikingAccordionItem | null = null;
38
-
39
- /** Called by items when they open, to enforce exclusive mode. */
40
- readonly notifyOpened = (item: VikingAccordionItem): void => {
41
- if (this.exclusive() && this.openItem && this.openItem !== item) {
42
- this.openItem.expanded.set(false);
43
- }
44
- this.openItem = item;
45
- };
46
- }
47
-
48
- /** A single expandable section within viking-accordion. */
49
- @Component({
50
- selector: "viking-accordion-item",
51
- imports: [VikingIcon],
52
- changeDetection: ChangeDetectionStrategy.OnPush,
53
- template: `
54
- <button
55
- type="button"
56
- class="viking-accordion-trigger"
57
- [attr.aria-expanded]="expanded()"
58
- [attr.aria-controls]="panelId"
59
- (click)="toggle()"
60
- >
61
- <span class="viking-accordion-heading">{{ heading() }}</span>
62
- <viking-icon
63
- [name]="expanded() ? 'chevron-up' : 'chevron-down'"
64
- [size]="18"
65
- />
66
- </button>
67
- @if (expanded()) {
68
- <div class="viking-accordion-panel" [id]="panelId">
69
- <ng-content />
70
- </div>
71
- }
72
- `,
73
- styles: [
74
- `
75
- :host {
76
- display: block;
77
- }
78
- .viking-accordion-trigger {
79
- display: flex;
80
- align-items: center;
81
- justify-content: space-between;
82
- gap: var(--viking-space-2);
83
- width: 100%;
84
- border: none;
85
- background: transparent;
86
- color: var(--viking-text);
87
- font-family: var(--viking-font-family);
88
- font-size: var(--viking-font-size-ui);
89
- font-weight: 700;
90
- padding: var(--viking-space-2);
91
- cursor: pointer;
92
- text-align: left;
93
- transition: var(--viking-transition);
94
- }
95
- .viking-accordion-trigger:hover {
96
- background: var(--viking-accent-soft);
97
- }
98
- .viking-accordion-trigger:focus-visible {
99
- outline: var(--viking-ring-width) solid var(--viking-ring);
100
- outline-offset: -3px;
101
- }
102
- .viking-accordion-panel {
103
- padding: 0 var(--viking-space-2) var(--viking-space-2);
104
- color: var(--viking-text-muted);
105
- font-family: var(--viking-font-family);
106
- font-size: var(--viking-font-size);
107
- line-height: 1.6;
108
- }
109
- `,
110
- ],
111
- })
112
- export class VikingAccordionItem {
113
- constructor(@Optional() private readonly accordion: VikingAccordion | null) {}
114
-
115
- readonly heading = input.required<string>();
116
- readonly expanded = model<boolean>(false);
117
-
118
- protected readonly panelId = vikingUid("viking-accordion-panel");
119
-
120
- protected toggle = (): void => {
121
- this.expanded.update((value) => !value);
122
- if (this.expanded()) {
123
- this.accordion?.notifyOpened(this);
124
- }
125
- };
126
- }
@@ -1,274 +0,0 @@
1
- :host {
2
- display: block;
3
- width: 100%;
4
- }
5
-
6
- .viking-app-header {
7
- position: sticky;
8
- top: 0;
9
- z-index: 50;
10
- width: 100%;
11
- min-height: var(--viking-navbar-height, 64px);
12
- background-color: var(--navbar-bg, var(--viking-surface));
13
- border-bottom: 1px solid var(--viking-border-strong);
14
- display: flex;
15
- flex-direction: column;
16
- align-items: stretch;
17
- padding: var(--viking-space-1) var(--viking-space-2);
18
- box-sizing: border-box;
19
- }
20
-
21
- .viking-app-header-content {
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- width: 100%;
26
- }
27
-
28
- .viking-app-header-left {
29
- flex: 1;
30
- display: flex;
31
- align-items: center;
32
- justify-content: flex-start;
33
- }
34
-
35
- .viking-app-header-right {
36
- flex: 1;
37
- display: flex;
38
- align-items: center;
39
- justify-content: flex-end;
40
- gap: var(--viking-space-1);
41
- }
42
-
43
- .viking-app-header-center {
44
- display: flex;
45
- justify-content: center;
46
- }
47
-
48
- .viking-app-header-desktop-nav {
49
- display: none;
50
- align-items: center;
51
- gap: calc(var(--viking-space-1) * 1.33);
52
- padding: calc(var(--viking-space-1) / 2) 0;
53
- }
54
-
55
- .viking-app-header-desktop-auth {
56
- display: none;
57
- align-items: center;
58
- gap: var(--viking-space-1);
59
- }
60
-
61
- ::ng-deep .viking-app-header-nav-link {
62
- position: relative;
63
- font-size: var(--viking-font-size) !important;
64
- color: var(--nav-link-color, var(--viking-text-muted)) !important;
65
- font-weight: 600 !important;
66
- text-transform: uppercase !important;
67
- letter-spacing: 0.08em !important;
68
- transition:
69
- color 0.2s ease,
70
- background-color 0.2s ease,
71
- box-shadow 0.2s ease,
72
- transform 0.2s ease !important;
73
- border-radius: var(--viking-radius) var(--viking-radius) 0 0 !important;
74
- padding: 0 var(--viking-space-2) !important;
75
- height: 40px !important;
76
- min-height: 40px !important;
77
- line-height: 1 !important;
78
- display: inline-flex !important;
79
- align-items: center !important;
80
- gap: var(--viking-space-1) !important;
81
- text-decoration: none;
82
- background: transparent;
83
- border: none;
84
- cursor: pointer;
85
- -webkit-tap-highlight-color: transparent;
86
- }
87
-
88
- ::ng-deep .viking-app-header-nav-link::before {
89
- content: '';
90
- position: absolute;
91
- inset: auto var(--viking-space-2) 0;
92
- height: 2px;
93
- border-radius: 2px;
94
- background: linear-gradient(
95
- 90deg,
96
- transparent,
97
- color-mix(in srgb, var(--viking-accent) 80%, transparent),
98
- transparent
99
- );
100
- opacity: 0;
101
- transform: scaleX(0.4);
102
- transition:
103
- opacity 0.25s ease,
104
- transform 0.25s ease;
105
- pointer-events: none;
106
- }
107
-
108
- ::ng-deep .viking-app-header-nav-link:hover {
109
- color: var(--viking-text) !important;
110
- background-color: color-mix(in srgb, var(--viking-accent) 10%, transparent) !important;
111
- transform: translateY(-1px);
112
- }
113
-
114
- ::ng-deep .viking-app-header-nav-link:hover::before {
115
- opacity: 1;
116
- transform: scaleX(1);
117
- }
118
-
119
- ::ng-deep .viking-app-header-nav-link.active,
120
- ::ng-deep .viking-app-header-nav-link.viking-current {
121
- color: var(--viking-text) !important;
122
- background-color: color-mix(in srgb, var(--viking-accent) 14%, transparent) !important;
123
- box-shadow:
124
- inset 0 -2px 0 0 var(--viking-accent),
125
- 0 0 12px color-mix(in srgb, var(--viking-accent) 18%, transparent) !important;
126
- }
127
-
128
- ::ng-deep .viking-app-header-icon-btn {
129
- color: var(--viking-text-muted);
130
- background: transparent;
131
- border: none;
132
- border-radius: 50%;
133
- width: 48px;
134
- height: 48px;
135
- min-width: 48px;
136
- padding: 0;
137
- display: inline-flex;
138
- align-items: center;
139
- justify-content: center;
140
- cursor: pointer;
141
- flex-shrink: 0;
142
- transition:
143
- color 0.2s ease,
144
- transform 0.2s ease,
145
- background-color 0.2s ease;
146
- -webkit-tap-highlight-color: transparent;
147
- }
148
-
149
- ::ng-deep .viking-app-header-icon-btn:hover {
150
- color: var(--viking-text);
151
- transform: rotate(15deg);
152
- background-color: color-mix(in srgb, var(--viking-accent) 5%, transparent);
153
- }
154
-
155
- ::ng-deep .viking-app-header-icon-btn:focus-visible {
156
- outline: var(--viking-ring-width) solid var(--viking-ring);
157
- outline-offset: 3px;
158
- }
159
-
160
- ::ng-deep .viking-app-header-menu-toggle {
161
- display: inline-flex !important;
162
- width: 40px;
163
- height: 40px;
164
- min-width: 40px;
165
- }
166
-
167
- ::ng-deep .viking-app-header-auth-btn {
168
- min-width: auto;
169
- }
170
-
171
- ::ng-deep .viking-app-header-auth-btn.viking-app-header-auth-btn-outline {
172
- /* Global drakkar button styles from viking-ui.css */
173
- }
174
-
175
- ::ng-deep .viking-app-header-auth-btn:hover {
176
- transform: translateY(var(--viking-state-hover-lift, -1px));
177
- }
178
-
179
- .viking-app-header-mobile {
180
- display: none;
181
- flex-direction: column;
182
- position: absolute;
183
- top: var(--viking-navbar-height, 64px);
184
- left: 0;
185
- right: 0;
186
- background-color: var(--viking-surface);
187
- box-shadow: var(--viking-shadow-md);
188
- border-bottom: 1px solid var(--viking-border);
189
- padding: var(--viking-space-2);
190
- box-sizing: border-box;
191
- z-index: 49;
192
- gap: var(--viking-space-1);
193
- transform: translateY(-10px);
194
- opacity: 0;
195
- pointer-events: none;
196
- transition:
197
- transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
198
- opacity 0.25s ease;
199
- }
200
-
201
- .viking-app-header-mobile.viking-open {
202
- transform: translateY(0);
203
- opacity: 1;
204
- pointer-events: auto;
205
- display: flex;
206
- }
207
-
208
- ::ng-deep .viking-app-header-mobile-link {
209
- width: 100% !important;
210
- justify-content: flex-start !important;
211
- font-size: var(--viking-font-size) !important;
212
- color: var(--viking-text-muted) !important;
213
- height: 40px !important;
214
- min-height: 40px !important;
215
- border-radius: var(--viking-radius) !important;
216
- padding: 0 var(--viking-space-2) !important;
217
- display: inline-flex !important;
218
- align-items: center !important;
219
- gap: var(--viking-space-1) !important;
220
- text-decoration: none;
221
- background: transparent;
222
- border: none;
223
- cursor: pointer;
224
- }
225
-
226
- ::ng-deep .viking-app-header-mobile-link:hover {
227
- color: var(--viking-text) !important;
228
- background-color: color-mix(in srgb, var(--viking-accent) 5%, transparent) !important;
229
- }
230
-
231
- ::ng-deep .viking-app-header-mobile-link.active,
232
- ::ng-deep .viking-app-header-mobile-link.viking-current {
233
- color: var(--viking-text) !important;
234
- background-color: color-mix(in srgb, var(--viking-accent) 10%, transparent) !important;
235
- box-shadow: inset 0 0 0 1px var(--viking-accent) !important;
236
- }
237
-
238
- ::ng-deep .viking-app-header-mobile-divider {
239
- height: 1px;
240
- background-color: var(--viking-border);
241
- margin: var(--viking-space-1) 0;
242
- }
243
-
244
- ::ng-deep .viking-app-header-brand {
245
- display: inline-flex;
246
- align-items: center;
247
- justify-content: center;
248
- text-decoration: none;
249
- flex-shrink: 0;
250
- filter: drop-shadow(0 0 6px color-mix(in srgb, var(--viking-accent) 60%, transparent));
251
- transition: filter 0.3s ease;
252
- }
253
-
254
- ::ng-deep .viking-app-header-brand:hover {
255
- filter: drop-shadow(0 0 10px color-mix(in srgb, var(--viking-accent) 90%, transparent));
256
- }
257
-
258
- @media (min-width: 768px) {
259
- .viking-app-header-desktop-nav {
260
- display: flex;
261
- }
262
-
263
- .viking-app-header-desktop-auth {
264
- display: flex;
265
- }
266
-
267
- ::ng-deep .viking-app-header-menu-toggle {
268
- display: none !important;
269
- }
270
-
271
- .viking-app-header-mobile {
272
- display: none !important;
273
- }
274
- }
@@ -1,43 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, input } from "@angular/core";
2
-
3
- /**
4
- * viking-app-header — sticky application header with brand, nav, actions, and mobile menu slots.
5
- * Styles live in the component library so all apps share one navbar implementation.
6
- */
7
- @Component({
8
- selector: "viking-app-header",
9
- changeDetection: ChangeDetectionStrategy.OnPush,
10
- template: `
11
- <header class="viking-app-header">
12
- <div class="viking-app-header-content">
13
- <div class="viking-app-header-left">
14
- <ng-content select="[vikingAppHeaderBrand]" />
15
- </div>
16
- <nav
17
- class="viking-app-header-center viking-app-header-desktop-nav"
18
- aria-label="Main navigation"
19
- >
20
- <ng-content select="[vikingAppHeaderNav]" />
21
- </nav>
22
- <div class="viking-app-header-right">
23
- <div class="viking-app-header-desktop-auth">
24
- <ng-content select="[vikingAppHeaderAuth]" />
25
- </div>
26
- <ng-content select="[vikingAppHeaderActions]" />
27
- </div>
28
- </div>
29
- <nav
30
- class="viking-app-header-mobile"
31
- [class.viking-open]="mobileMenuOpen()"
32
- [attr.aria-label]="mobileMenuLabel()"
33
- >
34
- <ng-content select="[vikingAppHeaderMobile]" />
35
- </nav>
36
- </header>
37
- `,
38
- styleUrl: "./app-header.scss",
39
- })
40
- export class VikingAppHeader {
41
- readonly mobileMenuOpen = input<boolean>(false);
42
- readonly mobileMenuLabel = input<string>("Mobile navigation");
43
- }