@dataengineeringformachinelearning/viking-ui 3.0.0-alpha.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.
- package/LICENSE +201 -0
- package/README.md +52 -12
- package/dist/core/brand-icons.d.ts +29 -0
- package/dist/core/icons.d.ts +132 -0
- package/dist/core/integration-brand-icons.d.ts +18 -0
- package/dist/core/lucide-paths.generated.d.ts +90 -0
- package/dist/core/types.d.ts +56 -0
- package/dist/core/uid.d.ts +2 -0
- package/dist/lib/accordion/accordion.d.ts +19 -0
- package/dist/lib/app-header/app-header.d.ts +8 -0
- package/dist/lib/app-sidebar/app-sidebar.d.ts +10 -0
- package/dist/lib/auth-panel/auth-panel.d.ts +13 -0
- package/dist/lib/autocomplete/autocomplete.d.ts +25 -0
- package/dist/lib/avatar/avatar.d.ts +14 -0
- package/dist/lib/badge/badge.d.ts +16 -0
- package/dist/lib/bar/bar.d.ts +4 -0
- package/dist/lib/brand/brand.d.ts +8 -0
- package/dist/lib/breadcrumbs/breadcrumbs.d.ts +10 -0
- package/dist/lib/button/button-group.d.ts +6 -0
- package/dist/lib/button/button.d.ts +25 -0
- package/dist/lib/calendar/calendar.d.ts +22 -0
- package/dist/lib/callout/callout.d.ts +14 -0
- package/dist/lib/card/card-title.d.ts +12 -0
- package/dist/lib/card/card.d.ts +19 -0
- package/dist/lib/carousel/carousel.d.ts +13 -0
- package/dist/lib/chart/chart-zoom.d.ts +14 -0
- package/dist/lib/chart/chart.d.ts +119 -0
- package/dist/lib/chart-card-header/chart-card-header.d.ts +10 -0
- package/dist/lib/chart-empty-state/chart-empty-state.d.ts +13 -0
- package/dist/lib/chart-panel/chart-panel.d.ts +10 -0
- package/dist/lib/checkbox/checkbox.d.ts +13 -0
- package/dist/lib/color-picker/color-picker.d.ts +16 -0
- package/dist/lib/command/command.d.ts +23 -0
- package/dist/lib/composer/composer.d.ts +15 -0
- package/dist/lib/confirm-dialog/confirm-dialog.d.ts +18 -0
- package/dist/lib/confirm-dialog/dialog.service.d.ts +28 -0
- package/dist/lib/context/context.d.ts +17 -0
- package/dist/lib/core/cva.d.ts +15 -0
- package/dist/lib/date-picker/date-picker.d.ts +18 -0
- package/dist/lib/dropdown/dropdown.d.ts +29 -0
- package/dist/lib/editor/editor.d.ts +26 -0
- package/dist/lib/empty-state/empty-state.d.ts +9 -0
- package/dist/lib/fab/fab.d.ts +9 -0
- package/dist/lib/field/field.d.ts +14 -0
- package/dist/lib/file-upload/file-upload.d.ts +19 -0
- package/dist/lib/footer/footer.d.ts +6 -0
- package/dist/lib/form-section/form-section.d.ts +15 -0
- package/dist/lib/gauge-arc/gauge-arc.d.ts +8 -0
- package/dist/lib/hud-panel/hud-panel.d.ts +5 -0
- package/dist/lib/icon/icon.d.ts +44 -0
- package/dist/lib/icon-badge/icon-badge.d.ts +14 -0
- package/dist/lib/icon-heading/icon-heading.d.ts +9 -0
- package/dist/lib/icon-text/icon-text.d.ts +12 -0
- package/dist/lib/input/input.d.ts +23 -0
- package/dist/lib/kanban/kanban.d.ts +16 -0
- package/dist/lib/kbd/kbd.d.ts +5 -0
- package/dist/lib/label/label.d.ts +7 -0
- package/dist/lib/loading-overlay/loading-overlay.d.ts +10 -0
- package/dist/lib/menubar/menubar.d.ts +10 -0
- package/dist/lib/metric-card/metric-card.d.ts +9 -0
- package/dist/lib/modal/modal.d.ts +13 -0
- package/dist/lib/native-select/native-select.d.ts +17 -0
- package/dist/lib/navbar/navbar.d.ts +13 -0
- package/dist/lib/navigation-menu/navigation-menu.d.ts +13 -0
- package/dist/lib/otp-input/otp-input.d.ts +23 -0
- package/dist/lib/page-back-link/page-back-link.d.ts +11 -0
- package/dist/lib/page-header/page-header.d.ts +15 -0
- package/dist/lib/pagination/pagination.d.ts +10 -0
- package/dist/lib/pillbox/pillbox.d.ts +15 -0
- package/dist/lib/popover/popover.d.ts +15 -0
- package/dist/lib/profile/profile.d.ts +11 -0
- package/dist/lib/progress/progress.d.ts +12 -0
- package/dist/lib/radio/radio.d.ts +16 -0
- package/dist/lib/ring-gauge/ring-gauge.d.ts +8 -0
- package/dist/lib/scroll-area/scroll-area.d.ts +7 -0
- package/dist/lib/search-palette/search-palette.d.ts +16 -0
- package/dist/lib/select/select.d.ts +26 -0
- package/dist/lib/separator/separator.d.ts +8 -0
- package/dist/lib/sheet/sheet.d.ts +13 -0
- package/dist/lib/sidebar-nav/sidebar-nav.d.ts +46 -0
- package/dist/lib/site-drakkar/site-footer.d.ts +18 -0
- package/dist/lib/site-drakkar/site-navbar.d.ts +25 -0
- package/dist/lib/skeleton/skeleton.d.ts +8 -0
- package/dist/lib/slider/slider.d.ts +17 -0
- package/dist/lib/spinner/spinner.d.ts +7 -0
- package/dist/lib/status-metric-row/status-metric-row.d.ts +9 -0
- package/dist/lib/suite-search-palette/suite-search-palette.d.ts +25 -0
- package/dist/lib/switch/switch.d.ts +12 -0
- package/dist/lib/table/table.d.ts +10 -0
- package/dist/lib/tabs/tab-panel.d.ts +12 -0
- package/dist/lib/tabs/tab.d.ts +14 -0
- package/dist/lib/tabs/tabs.d.ts +10 -0
- package/dist/lib/textarea/textarea.d.ts +16 -0
- package/dist/lib/theme-toggle/theme-toggle.d.ts +9 -0
- package/dist/lib/time-picker/time-picker.d.ts +21 -0
- package/dist/lib/timeline/timeline.d.ts +14 -0
- package/dist/lib/toast/toast.d.ts +21 -0
- package/dist/lib/toggle/toggle-group.d.ts +9 -0
- package/dist/lib/toggle/toggle.d.ts +15 -0
- package/dist/lib/tooltip/tooltip.d.ts +20 -0
- package/dist/lib/typography/heading.d.ts +9 -0
- package/dist/lib/typography/text.d.ts +11 -0
- package/dist/lib/uptime-bar/uptime-bar.d.ts +6 -0
- package/dist/lib/verification-code-field/verification-code-field.d.ts +19 -0
- package/dist/lib/whitepaper-cta/whitepaper-cta.d.ts +15 -0
- package/dist/lib/wizard/wizard.d.ts +13 -0
- package/dist/public-api.d.ts +109 -0
- package/dist/tokens/series-presets.d.ts +4 -0
- package/package.json +1 -1
- package/src/assets/drakkar-favicon.svg +17 -0
- package/src/core/brand/deml-lockup.svg +5 -0
- package/src/core/brand/deml-mark-compact.svg +4 -0
- package/src/core/brand/deml-mark-filled.svg +3 -0
- package/src/core/brand/deml-mark-outline.svg +4 -0
- package/src/core/brand-icons.ts +62 -0
- package/src/core/icons.spec.ts +52 -0
- package/src/core/icons.ts +206 -0
- package/src/core/integration-brand-icons.ts +77 -0
- package/src/core/lucide-paths.generated.ts +130 -0
- package/src/core/types.ts +85 -0
- package/src/core/uid.ts +7 -0
- package/src/lib/accordion/accordion.ts +126 -0
- package/src/lib/app-header/app-header.scss +274 -0
- package/src/lib/app-header/app-header.ts +43 -0
- package/src/lib/app-sidebar/app-sidebar.scss +415 -0
- package/src/lib/app-sidebar/app-sidebar.ts +29 -0
- package/src/lib/auth-panel/auth-panel.spec.ts +132 -0
- package/src/lib/auth-panel/auth-panel.ts +228 -0
- package/src/lib/autocomplete/autocomplete.ts +223 -0
- package/src/lib/avatar/avatar.ts +126 -0
- package/src/lib/badge/badge.ts +182 -0
- package/src/lib/bar/bar.ts +31 -0
- package/src/lib/brand/brand.ts +60 -0
- package/src/lib/breadcrumbs/breadcrumbs.ts +81 -0
- package/src/lib/button/button-group.ts +40 -0
- package/src/lib/button/button.scss +96 -0
- package/src/lib/button/button.ts +98 -0
- package/src/lib/calendar/calendar.ts +253 -0
- package/src/lib/callout/callout.ts +211 -0
- package/src/lib/card/card-title.spec.ts +27 -0
- package/src/lib/card/card-title.ts +50 -0
- package/src/lib/card/card.ts +170 -0
- package/src/lib/carousel/carousel.ts +206 -0
- package/src/lib/chart/chart-zoom.spec.ts +65 -0
- package/src/lib/chart/chart-zoom.ts +71 -0
- package/src/lib/chart/chart.ts +1257 -0
- package/src/lib/chart-card-header/chart-card-header.ts +80 -0
- package/src/lib/chart-empty-state/chart-empty-state.ts +146 -0
- package/src/lib/chart-panel/chart-panel.ts +133 -0
- package/src/lib/checkbox/checkbox.ts +139 -0
- package/src/lib/color-picker/color-picker.ts +148 -0
- package/src/lib/command/command.ts +260 -0
- package/src/lib/composer/composer.ts +180 -0
- package/src/lib/confirm-dialog/confirm-dialog.ts +163 -0
- package/src/lib/confirm-dialog/dialog.service.ts +79 -0
- package/src/lib/context/context.ts +75 -0
- package/src/lib/core/cva.ts +33 -0
- package/src/lib/date-picker/date-picker.ts +139 -0
- package/src/lib/dropdown/dropdown.ts +188 -0
- package/src/lib/editor/editor.ts +170 -0
- package/src/lib/empty-state/empty-state.ts +100 -0
- package/src/lib/fab/fab.ts +76 -0
- package/src/lib/field/field.ts +111 -0
- package/src/lib/file-upload/file-upload.ts +208 -0
- package/src/lib/footer/footer.scss +155 -0
- package/src/lib/footer/footer.ts +28 -0
- package/src/lib/form-section/form-section.ts +200 -0
- package/src/lib/forms.spec.ts +92 -0
- package/src/lib/gauge-arc/gauge-arc.ts +85 -0
- package/src/lib/hud-panel/hud-panel.ts +27 -0
- package/src/lib/icon/icon.ts +284 -0
- package/src/lib/icon-badge/icon-badge.ts +87 -0
- package/src/lib/icon-heading/icon-heading.spec.ts +32 -0
- package/src/lib/icon-heading/icon-heading.ts +38 -0
- package/src/lib/icon-text/icon-text.ts +120 -0
- package/src/lib/input/input.ts +119 -0
- package/src/lib/kanban/kanban.ts +211 -0
- package/src/lib/kbd/kbd.ts +32 -0
- package/src/lib/label/label.ts +39 -0
- package/src/lib/loading-overlay/loading-overlay.ts +80 -0
- package/src/lib/menubar/menubar.ts +77 -0
- package/src/lib/metric-card/metric-card.ts +33 -0
- package/src/lib/modal/modal.ts +207 -0
- package/src/lib/native-select/native-select.ts +124 -0
- package/src/lib/navbar/navbar.ts +124 -0
- package/src/lib/navigation-menu/navigation-menu.ts +116 -0
- package/src/lib/otp-input/otp-input.ts +164 -0
- package/src/lib/page-back-link/page-back-link.ts +74 -0
- package/src/lib/page-header/page-header.ts +70 -0
- package/src/lib/pagination/pagination.ts +157 -0
- package/src/lib/pillbox/pillbox.ts +157 -0
- package/src/lib/popover/popover.ts +92 -0
- package/src/lib/profile/profile.ts +73 -0
- package/src/lib/progress/progress.ts +123 -0
- package/src/lib/radio/radio.ts +132 -0
- package/src/lib/ring-gauge/ring-gauge.ts +75 -0
- package/src/lib/scroll-area/scroll-area.ts +57 -0
- package/src/lib/search-palette/search-palette.scss +288 -0
- package/src/lib/search-palette/search-palette.ts +114 -0
- package/src/lib/select/select.ts +292 -0
- package/src/lib/separator/separator.ts +59 -0
- package/src/lib/sheet/sheet.ts +192 -0
- package/src/lib/sidebar-nav/sidebar-nav.scss +218 -0
- package/src/lib/sidebar-nav/sidebar-nav.ts +158 -0
- package/src/lib/site-drakkar/site-footer.ts +129 -0
- package/src/lib/site-drakkar/site-navbar.scss +2 -0
- package/src/lib/site-drakkar/site-navbar.ts +267 -0
- package/src/lib/site-drakkar/suite-search-items.spec.ts +61 -0
- package/src/lib/skeleton/skeleton.ts +51 -0
- package/src/lib/slider/slider.ts +133 -0
- package/src/lib/spinner/spinner.ts +75 -0
- package/src/lib/status-metric-row/status-metric-row.ts +74 -0
- package/src/lib/suite-search-palette/suite-search-palette.ts +95 -0
- package/src/lib/switch/switch.ts +131 -0
- package/src/lib/table/table.ts +137 -0
- package/src/lib/tabs/tab-panel.ts +61 -0
- package/src/lib/tabs/tab.ts +107 -0
- package/src/lib/tabs/tabs.ts +109 -0
- package/src/lib/textarea/textarea.ts +103 -0
- package/src/lib/theme-toggle/theme-toggle.spec.ts +40 -0
- package/src/lib/theme-toggle/theme-toggle.ts +39 -0
- package/src/lib/time-picker/time-picker.ts +197 -0
- package/src/lib/timeline/timeline.ts +152 -0
- package/src/lib/toast/toast.ts +196 -0
- package/src/lib/toggle/toggle-group.ts +60 -0
- package/src/lib/toggle/toggle.ts +101 -0
- package/src/lib/tooltip/tooltip.ts +119 -0
- package/src/lib/typography/heading.ts +52 -0
- package/src/lib/typography/text.ts +51 -0
- package/src/lib/uptime-bar/uptime-bar.ts +55 -0
- package/src/lib/verification-code-field/verification-code-field.ts +149 -0
- package/src/lib/whitepaper-cta/whitepaper-cta.scss +130 -0
- package/src/lib/whitepaper-cta/whitepaper-cta.ts +78 -0
- package/src/lib/wizard/wizard.ts +80 -0
- package/src/public-api.ts +172 -0
- package/src/tokens/series-presets.ts +15 -0
- package/src/tokens/tailwind.preset.js +209 -0
- package/src/viking-ui.spec.ts +416 -0
- package/src/web/web-components.spec.ts +297 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
input,
|
|
5
|
+
output,
|
|
6
|
+
signal,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { VikingControl, provideVikingCva } from "../core/cva";
|
|
9
|
+
import { vikingUid } from "../../core/uid";
|
|
10
|
+
import { VikingOtpInput } from "../otp-input/otp-input";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* viking-verification-code-field — labeled, centered OTP entry for MFA and phone verification flows.
|
|
14
|
+
*/
|
|
15
|
+
@Component({
|
|
16
|
+
selector: "viking-verification-code-field",
|
|
17
|
+
imports: [VikingOtpInput],
|
|
18
|
+
providers: [provideVikingCva(VikingVerificationCodeField)],
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
host: {
|
|
21
|
+
class: "viking-verification-code-field",
|
|
22
|
+
"[class.viking-verification-code-field-invalid]": "!!error()",
|
|
23
|
+
},
|
|
24
|
+
template: `
|
|
25
|
+
<fieldset class="viking-verification-code-fieldset">
|
|
26
|
+
@if (label()) {
|
|
27
|
+
<legend class="viking-verification-code-label" [id]="labelId">
|
|
28
|
+
{{ label() }}
|
|
29
|
+
@if (required()) {
|
|
30
|
+
<span class="viking-verification-code-required" aria-hidden="true"
|
|
31
|
+
>*</span
|
|
32
|
+
>
|
|
33
|
+
}
|
|
34
|
+
</legend>
|
|
35
|
+
}
|
|
36
|
+
<div class="viking-verification-code-control">
|
|
37
|
+
<viking-otp-input
|
|
38
|
+
[length]="length()"
|
|
39
|
+
[value]="value()"
|
|
40
|
+
(valueChange)="onValueChange($event)"
|
|
41
|
+
[disabled]="disabled() || formDisabled()"
|
|
42
|
+
[label]="label()"
|
|
43
|
+
[centered]="true"
|
|
44
|
+
(completed)="completed.emit($event)"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</fieldset>
|
|
48
|
+
@if (description() && !error()) {
|
|
49
|
+
<p class="viking-verification-code-description" [id]="descriptionId">
|
|
50
|
+
{{ description() }}
|
|
51
|
+
</p>
|
|
52
|
+
}
|
|
53
|
+
@if (error()) {
|
|
54
|
+
<p class="viking-verification-code-error" [id]="errorId" role="alert">
|
|
55
|
+
{{ error() }}
|
|
56
|
+
</p>
|
|
57
|
+
}
|
|
58
|
+
`,
|
|
59
|
+
styles: [
|
|
60
|
+
`
|
|
61
|
+
:host {
|
|
62
|
+
display: block;
|
|
63
|
+
width: 100%;
|
|
64
|
+
font-family: var(--viking-font-family);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host(.viking-verification-code-field-invalid) {
|
|
68
|
+
animation: viking-shake var(--viking-duration-slow)
|
|
69
|
+
var(--viking-ease-default);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.viking-verification-code-fieldset {
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0;
|
|
75
|
+
border: 0;
|
|
76
|
+
min-width: 0;
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.viking-verification-code-label {
|
|
81
|
+
display: block;
|
|
82
|
+
width: 100%;
|
|
83
|
+
margin-bottom: var(--viking-space-1);
|
|
84
|
+
padding: 0;
|
|
85
|
+
font-size: var(--viking-font-size-sm);
|
|
86
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
87
|
+
color: var(--viking-text);
|
|
88
|
+
letter-spacing: var(--viking-letter-spacing-wide);
|
|
89
|
+
line-height: var(--viking-line-height-tight);
|
|
90
|
+
text-align: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.viking-verification-code-required {
|
|
94
|
+
color: var(--viking-danger);
|
|
95
|
+
margin-left: 2px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.viking-verification-code-control {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.viking-verification-code-description,
|
|
105
|
+
.viking-verification-code-error {
|
|
106
|
+
margin: var(--viking-space-1) 0 0;
|
|
107
|
+
font-size: var(--viking-font-size-sm);
|
|
108
|
+
line-height: var(--viking-line-height-normal);
|
|
109
|
+
text-align: center;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.viking-verification-code-description {
|
|
113
|
+
color: var(--viking-text-muted);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.viking-verification-code-error {
|
|
117
|
+
color: var(--viking-danger-text, var(--viking-danger));
|
|
118
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
119
|
+
}
|
|
120
|
+
`,
|
|
121
|
+
],
|
|
122
|
+
})
|
|
123
|
+
export class VikingVerificationCodeField extends VikingControl<string> {
|
|
124
|
+
readonly length = input<number>(6);
|
|
125
|
+
readonly label = input<string>("Verification Code");
|
|
126
|
+
readonly description = input<string>("");
|
|
127
|
+
readonly error = input<string>("");
|
|
128
|
+
readonly required = input<boolean>(false);
|
|
129
|
+
readonly disabled = input<boolean>(false);
|
|
130
|
+
|
|
131
|
+
readonly completed = output<string>();
|
|
132
|
+
|
|
133
|
+
protected readonly value = signal<string>("");
|
|
134
|
+
protected readonly labelId = vikingUid("viking-verification-code-label");
|
|
135
|
+
protected readonly descriptionId = vikingUid(
|
|
136
|
+
"viking-verification-code-description",
|
|
137
|
+
);
|
|
138
|
+
protected readonly errorId = vikingUid("viking-verification-code-error");
|
|
139
|
+
|
|
140
|
+
writeValue(value: string): void {
|
|
141
|
+
this.value.set(value ?? "");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
protected onValueChange = (next: string): void => {
|
|
145
|
+
this.value.set(next);
|
|
146
|
+
this.onChange(next);
|
|
147
|
+
this.onTouched();
|
|
148
|
+
};
|
|
149
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
.viking-whitepaper-cta {
|
|
2
|
+
position: relative;
|
|
3
|
+
max-width: 720px;
|
|
4
|
+
margin: 0 auto;
|
|
5
|
+
padding: var(--viking-space-4) var(--viking-space-3);
|
|
6
|
+
border-radius: var(--viking-radius-xl);
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
border: 1px solid color-mix(in srgb, var(--viking-accent) 22%, transparent);
|
|
9
|
+
background: color-mix(in srgb, var(--viking-accent) 6%, var(--viking-surface));
|
|
10
|
+
text-align: center;
|
|
11
|
+
box-shadow: var(--viking-shadow-sm);
|
|
12
|
+
transition: var(--viking-transition-colors);
|
|
13
|
+
|
|
14
|
+
@media (min-width: 768px) {
|
|
15
|
+
padding: var(--viking-space-5) var(--viking-space-4);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.viking-whitepaper-cta-bg {
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
opacity: 0.5;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.viking-whitepaper-polars-grid {
|
|
27
|
+
position: absolute;
|
|
28
|
+
inset: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: flex-end;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
gap: var(--viking-space-half);
|
|
33
|
+
padding: 0 var(--viking-space-3);
|
|
34
|
+
mask-image: linear-gradient(to top, black 30%, transparent 85%);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.viking-bar,
|
|
38
|
+
.viking-whitepaper-polars-bar {
|
|
39
|
+
display: block;
|
|
40
|
+
flex: 1;
|
|
41
|
+
max-width: 28px;
|
|
42
|
+
height: calc(var(--viking-bar-height, 50) * 1%);
|
|
43
|
+
background: var(--viking-accent);
|
|
44
|
+
border-radius: var(--viking-radius-xs) var(--viking-radius-xs) 0 0;
|
|
45
|
+
opacity: 0.75;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.viking-whitepaper-polars-bar {
|
|
49
|
+
animation: vikingWhitepaperBarPulse 4s var(--viking-ease-default) infinite;
|
|
50
|
+
|
|
51
|
+
@for $i from 1 through 12 {
|
|
52
|
+
&:nth-child(#{$i}) {
|
|
53
|
+
animation-delay: #{$i * 0.12}s;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes vikingWhitepaperBarPulse {
|
|
59
|
+
0%,
|
|
60
|
+
100% {
|
|
61
|
+
opacity: 0.4;
|
|
62
|
+
transform: scaleY(1);
|
|
63
|
+
}
|
|
64
|
+
50% {
|
|
65
|
+
opacity: 0.75;
|
|
66
|
+
transform: scaleY(1.06);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (prefers-reduced-motion: reduce) {
|
|
71
|
+
.viking-whitepaper-polars-bar {
|
|
72
|
+
animation: none;
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.viking-whitepaper-sparkline {
|
|
78
|
+
position: absolute;
|
|
79
|
+
bottom: 0;
|
|
80
|
+
left: 0;
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 40%;
|
|
83
|
+
opacity: 0.65;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.viking-whitepaper-cta-content {
|
|
87
|
+
position: relative;
|
|
88
|
+
z-index: 1;
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: var(--viking-space-1-5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.viking-whitepaper-tag {
|
|
96
|
+
font-size: var(--viking-font-size-ui);
|
|
97
|
+
font-weight: var(--viking-font-weight-bold);
|
|
98
|
+
letter-spacing: var(--viking-letter-spacing-caps);
|
|
99
|
+
color: var(--viking-accent);
|
|
100
|
+
text-transform: uppercase;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.viking-whitepaper-title {
|
|
104
|
+
font-size: clamp(1.375rem, 3vw, 1.75rem);
|
|
105
|
+
font-weight: var(--viking-font-weight-bold);
|
|
106
|
+
margin: 0;
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
letter-spacing: var(--viking-letter-spacing-tight);
|
|
109
|
+
color: var(--viking-text);
|
|
110
|
+
line-height: var(--viking-line-height-tight);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.viking-whitepaper-description {
|
|
114
|
+
color: var(--viking-text-muted);
|
|
115
|
+
margin: 0;
|
|
116
|
+
max-width: 30rem;
|
|
117
|
+
line-height: var(--viking-line-height-relaxed);
|
|
118
|
+
font-size: var(--viking-font-size);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.viking-whitepaper-btn {
|
|
122
|
+
margin-top: var(--viking-space-1);
|
|
123
|
+
color: var(--viking-accent-content);
|
|
124
|
+
|
|
125
|
+
&:hover,
|
|
126
|
+
&:focus-visible {
|
|
127
|
+
color: var(--viking-accent-content);
|
|
128
|
+
border-bottom-color: transparent;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
2
|
+
import { VikingBar } from "../bar/bar";
|
|
3
|
+
import { VikingButton } from "../button/button";
|
|
4
|
+
import { VikingChart } from "../chart/chart";
|
|
5
|
+
import { VikingChartSeries } from "../../core/types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* viking-whitepaper-cta — Polars-style animated research CTA with bar grid + sparkline.
|
|
9
|
+
*/
|
|
10
|
+
@Component({
|
|
11
|
+
selector: "viking-whitepaper-cta",
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
imports: [VikingBar, VikingButton, VikingChart],
|
|
14
|
+
template: `
|
|
15
|
+
<section class="viking-whitepaper-cta" [attr.aria-labelledby]="headingId">
|
|
16
|
+
<div class="viking-whitepaper-cta-bg" aria-hidden="true">
|
|
17
|
+
<div class="viking-whitepaper-polars-grid">
|
|
18
|
+
@for (bar of barHeights; track $index) {
|
|
19
|
+
<viking-bar class="viking-whitepaper-polars-bar" [height]="bar" />
|
|
20
|
+
}
|
|
21
|
+
</div>
|
|
22
|
+
<viking-chart
|
|
23
|
+
kind="sparkline"
|
|
24
|
+
[series]="sparklineSeries"
|
|
25
|
+
label="Research activity trend"
|
|
26
|
+
class="viking-whitepaper-sparkline viking-chart-wide"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="viking-whitepaper-cta-content">
|
|
31
|
+
<span class="viking-whitepaper-tag">{{ tag() }}</span>
|
|
32
|
+
<h2 [id]="headingId" class="viking-whitepaper-title">{{ title() }}</h2>
|
|
33
|
+
<p class="viking-whitepaper-description">{{ description() }}</p>
|
|
34
|
+
<viking-button
|
|
35
|
+
variant="primary"
|
|
36
|
+
[href]="href()"
|
|
37
|
+
[attr.target]="external() ? '_blank' : null"
|
|
38
|
+
[attr.rel]="external() ? 'noopener noreferrer' : null"
|
|
39
|
+
icon="file"
|
|
40
|
+
class="viking-whitepaper-btn"
|
|
41
|
+
>
|
|
42
|
+
{{ buttonLabel() }}
|
|
43
|
+
</viking-button>
|
|
44
|
+
</div>
|
|
45
|
+
</section>
|
|
46
|
+
`,
|
|
47
|
+
styleUrl: "./whitepaper-cta.scss",
|
|
48
|
+
styles: [
|
|
49
|
+
`
|
|
50
|
+
:host {
|
|
51
|
+
display: block;
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
`,
|
|
55
|
+
],
|
|
56
|
+
})
|
|
57
|
+
export class VikingWhitepaperCta {
|
|
58
|
+
readonly tag = input("Research & Architecture");
|
|
59
|
+
readonly title = input("The Whitepaper");
|
|
60
|
+
readonly description = input(
|
|
61
|
+
"Event projection patterns, threat mitigation algorithms, and the architecture powering symmetrical multi-tenant pipelines.",
|
|
62
|
+
);
|
|
63
|
+
readonly buttonLabel = input("Read Whitepaper");
|
|
64
|
+
readonly href = input("/whitepaper");
|
|
65
|
+
readonly external = input(false);
|
|
66
|
+
|
|
67
|
+
protected readonly headingId = "viking-whitepaper-cta-title";
|
|
68
|
+
protected readonly barHeights = [
|
|
69
|
+
72, 45, 88, 56, 91, 38, 67, 82, 49, 76, 58, 94,
|
|
70
|
+
];
|
|
71
|
+
protected readonly sparklineSeries: VikingChartSeries[] = [
|
|
72
|
+
{
|
|
73
|
+
name: "Research",
|
|
74
|
+
tone: "accent",
|
|
75
|
+
data: [12, 18, 15, 22, 28, 24, 32, 35, 30, 38, 42, 45],
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
} from "@angular/core";
|
|
7
|
+
import { VikingProgress } from "../progress/progress";
|
|
8
|
+
|
|
9
|
+
export interface VikingWizardStep {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* viking-wizard — multi-step modal shell with progress and action slots.
|
|
16
|
+
*/
|
|
17
|
+
@Component({
|
|
18
|
+
selector: "viking-wizard",
|
|
19
|
+
imports: [VikingProgress],
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
host: { class: "viking-wizard" },
|
|
22
|
+
template: `
|
|
23
|
+
<viking-progress [value]="progressPercent()" />
|
|
24
|
+
<p class="viking-wizard-step-label">{{ activeStep().label }}</p>
|
|
25
|
+
<div class="viking-wizard-body">
|
|
26
|
+
<ng-content />
|
|
27
|
+
</div>
|
|
28
|
+
<footer class="viking-wizard-actions">
|
|
29
|
+
<ng-content select="[vikingWizardActions]" />
|
|
30
|
+
</footer>
|
|
31
|
+
`,
|
|
32
|
+
styles: [
|
|
33
|
+
`
|
|
34
|
+
:host {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: var(--viking-space-2);
|
|
38
|
+
font-family: var(--viking-font-family);
|
|
39
|
+
}
|
|
40
|
+
.viking-wizard-step-label {
|
|
41
|
+
margin: 0;
|
|
42
|
+
font-size: var(--viking-font-size-sm);
|
|
43
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
44
|
+
color: var(--viking-text-muted);
|
|
45
|
+
letter-spacing: var(--viking-letter-spacing-wide);
|
|
46
|
+
text-transform: uppercase;
|
|
47
|
+
}
|
|
48
|
+
.viking-wizard-body {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: var(--viking-space-2);
|
|
52
|
+
}
|
|
53
|
+
.viking-wizard-actions {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
justify-content: flex-end;
|
|
57
|
+
gap: var(--viking-space-1);
|
|
58
|
+
padding-top: var(--viking-space-2);
|
|
59
|
+
border-top: 1px solid var(--viking-border);
|
|
60
|
+
}
|
|
61
|
+
`,
|
|
62
|
+
],
|
|
63
|
+
})
|
|
64
|
+
export class VikingWizard {
|
|
65
|
+
readonly steps = input<VikingWizardStep[]>([]);
|
|
66
|
+
readonly step = input<string>("");
|
|
67
|
+
|
|
68
|
+
protected readonly activeStep = computed(
|
|
69
|
+
() =>
|
|
70
|
+
this.steps().find((item) => item.id === this.step()) ??
|
|
71
|
+
this.steps()[0] ?? { id: "", label: "" },
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
protected readonly progressPercent = computed(() => {
|
|
75
|
+
const steps = this.steps();
|
|
76
|
+
if (steps.length <= 1) return 100;
|
|
77
|
+
const index = steps.findIndex((item) => item.id === this.step());
|
|
78
|
+
return Math.round(((index + 1) / steps.length) * 100);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @dataengineeringformachinelearning/viking-ui — public API surface.
|
|
3
|
+
* Viking-UI: DEML premium design system for Angular (THEME.md palette only).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export * from "./core/types";
|
|
7
|
+
export {
|
|
8
|
+
VIKING_ICON_NAMES,
|
|
9
|
+
VIKING_ICON_PATHS,
|
|
10
|
+
VIKING_ICON_SIZE_PRESETS,
|
|
11
|
+
VIKING_BRAND_ICON_NAMES,
|
|
12
|
+
VIKING_LUCIDE_ICON_NAMES,
|
|
13
|
+
MATERIAL_ICON_ALIASES,
|
|
14
|
+
resolveVikingIcon,
|
|
15
|
+
resolveVikingIconColor,
|
|
16
|
+
resolveVikingIconSize,
|
|
17
|
+
type VikingIconName,
|
|
18
|
+
vikingIconViewBox,
|
|
19
|
+
type VikingIconSizePreset,
|
|
20
|
+
} from "./core/icons";
|
|
21
|
+
export {
|
|
22
|
+
VIKING_BRAND_ICON_PATHS,
|
|
23
|
+
VIKING_BRAND_ICON_FILLED_PATHS,
|
|
24
|
+
VIKING_BRAND_ICON_NAMES_LIST,
|
|
25
|
+
VIKING_DRAKKAR_ICON_PATHS,
|
|
26
|
+
VIKING_DRAKKAR_ICON_FILLED_PATHS,
|
|
27
|
+
VIKING_DRAKKAR_ICON_NAMES_LIST,
|
|
28
|
+
type VikingBrandIconName,
|
|
29
|
+
type VikingDrakkarIconName,
|
|
30
|
+
} from "./core/brand-icons";
|
|
31
|
+
export {
|
|
32
|
+
type VikingChartCurve,
|
|
33
|
+
type VikingChartKind,
|
|
34
|
+
type VikingDonutSegment,
|
|
35
|
+
type VikingCommandItem,
|
|
36
|
+
type VikingSelectOption,
|
|
37
|
+
} from "./core/types";
|
|
38
|
+
export { type VikingSeriesPreset } from "./tokens/series-presets";
|
|
39
|
+
export { VikingControl, provideVikingCva } from "./lib/core/cva";
|
|
40
|
+
|
|
41
|
+
// Framework-agnostic Web Components + registration
|
|
42
|
+
export {
|
|
43
|
+
VikingBadgeWc,
|
|
44
|
+
VikingButtonWc,
|
|
45
|
+
VikingCalloutWc,
|
|
46
|
+
VikingCardWc,
|
|
47
|
+
VikingInputWc,
|
|
48
|
+
VikingModalWc,
|
|
49
|
+
VikingSearchPaletteWc,
|
|
50
|
+
VikingSelectWc,
|
|
51
|
+
VikingSuiteSearchPaletteWc,
|
|
52
|
+
VikingThemeToggleWc,
|
|
53
|
+
registerVikingBadgeWc,
|
|
54
|
+
registerVikingButtonWc,
|
|
55
|
+
registerVikingCalloutWc,
|
|
56
|
+
registerVikingCardWc,
|
|
57
|
+
registerVikingInputWc,
|
|
58
|
+
registerVikingModalWc,
|
|
59
|
+
registerVikingSearchPaletteWc,
|
|
60
|
+
registerVikingSelectWc,
|
|
61
|
+
registerVikingSuiteSearchPaletteWc,
|
|
62
|
+
registerVikingThemeToggleWc,
|
|
63
|
+
registerVikingElements,
|
|
64
|
+
type VikingSearchPaletteItem,
|
|
65
|
+
type VikingWcTone,
|
|
66
|
+
} from "./web/index";
|
|
67
|
+
|
|
68
|
+
// Site-drakkar config + services (cross-surface).
|
|
69
|
+
export * from "./lib/site-drakkar/site-drakkar.config";
|
|
70
|
+
export * from "./lib/site-drakkar/suite-search-items";
|
|
71
|
+
|
|
72
|
+
// Angular components
|
|
73
|
+
export * from "./lib/site-drakkar/site-navbar";
|
|
74
|
+
export * from "./lib/site-drakkar/site-footer";
|
|
75
|
+
export * from "./lib/theme-toggle/theme-toggle";
|
|
76
|
+
export * from "./lib/app-header/app-header";
|
|
77
|
+
export * from "./lib/app-sidebar/app-sidebar";
|
|
78
|
+
export * from "./lib/accordion/accordion";
|
|
79
|
+
export * from "./lib/auth-panel/auth-panel";
|
|
80
|
+
export * from "./lib/autocomplete/autocomplete";
|
|
81
|
+
export * from "./lib/avatar/avatar";
|
|
82
|
+
export * from "./lib/badge/badge";
|
|
83
|
+
export * from "./lib/bar/bar";
|
|
84
|
+
export * from "./lib/brand/brand";
|
|
85
|
+
export * from "./lib/breadcrumbs/breadcrumbs";
|
|
86
|
+
export * from "./lib/button/button";
|
|
87
|
+
export * from "./lib/button/button-group";
|
|
88
|
+
export * from "./lib/calendar/calendar";
|
|
89
|
+
export * from "./lib/callout/callout";
|
|
90
|
+
export * from "./lib/card/card";
|
|
91
|
+
export * from "./lib/card/card-title";
|
|
92
|
+
export * from "./lib/carousel/carousel";
|
|
93
|
+
export * from "./lib/chart/chart";
|
|
94
|
+
export * from "./lib/chart/chart-zoom";
|
|
95
|
+
export * from "./lib/confirm-dialog/confirm-dialog";
|
|
96
|
+
export * from "./lib/confirm-dialog/dialog.service";
|
|
97
|
+
export * from "./lib/chart-card-header/chart-card-header";
|
|
98
|
+
export * from "./lib/icon-heading/icon-heading";
|
|
99
|
+
export * from "./lib/chart-empty-state/chart-empty-state";
|
|
100
|
+
export * from "./lib/chart-panel/chart-panel";
|
|
101
|
+
export * from "./lib/checkbox/checkbox";
|
|
102
|
+
export * from "./lib/color-picker/color-picker";
|
|
103
|
+
export * from "./lib/command/command";
|
|
104
|
+
export * from "./lib/composer/composer";
|
|
105
|
+
export * from "./lib/context/context";
|
|
106
|
+
export * from "./lib/date-picker/date-picker";
|
|
107
|
+
export * from "./lib/dropdown/dropdown";
|
|
108
|
+
export * from "./lib/empty-state/empty-state";
|
|
109
|
+
export * from "./lib/editor/editor";
|
|
110
|
+
export * from "./lib/fab/fab";
|
|
111
|
+
export * from "./lib/field/field";
|
|
112
|
+
export * from "./lib/footer/footer";
|
|
113
|
+
export * from "./lib/form-section/form-section";
|
|
114
|
+
export * from "./lib/file-upload/file-upload";
|
|
115
|
+
export * from "./lib/gauge-arc/gauge-arc";
|
|
116
|
+
export * from "./lib/hud-panel/hud-panel";
|
|
117
|
+
export * from "./lib/icon/icon";
|
|
118
|
+
export * from "./lib/icon-badge/icon-badge";
|
|
119
|
+
export { VikingIconComponent } from "./lib/icon/icon";
|
|
120
|
+
export * from "./lib/icon-text/icon-text";
|
|
121
|
+
export * from "./lib/input/input";
|
|
122
|
+
export * from "./lib/kanban/kanban";
|
|
123
|
+
export * from "./lib/kbd/kbd";
|
|
124
|
+
export * from "./lib/label/label";
|
|
125
|
+
export * from "./lib/loading-overlay/loading-overlay";
|
|
126
|
+
export * from "./lib/metric-card/metric-card";
|
|
127
|
+
export * from "./lib/menubar/menubar";
|
|
128
|
+
export * from "./lib/modal/modal";
|
|
129
|
+
export * from "./lib/native-select/native-select";
|
|
130
|
+
export * from "./lib/navigation-menu/navigation-menu";
|
|
131
|
+
export type { VikingNavItem } from "./lib/navigation-menu/navigation-menu";
|
|
132
|
+
export * from "./lib/navbar/navbar";
|
|
133
|
+
export * from "./lib/otp-input/otp-input";
|
|
134
|
+
export * from "./lib/verification-code-field/verification-code-field";
|
|
135
|
+
export * from "./lib/page-back-link/page-back-link";
|
|
136
|
+
export * from "./lib/page-header/page-header";
|
|
137
|
+
export * from "./lib/pagination/pagination";
|
|
138
|
+
export * from "./lib/pillbox/pillbox";
|
|
139
|
+
export * from "./lib/popover/popover";
|
|
140
|
+
export * from "./lib/profile/profile";
|
|
141
|
+
export * from "./lib/progress/progress";
|
|
142
|
+
export * from "./lib/radio/radio";
|
|
143
|
+
export * from "./lib/ring-gauge/ring-gauge";
|
|
144
|
+
export * from "./lib/search-palette/search-palette";
|
|
145
|
+
export * from "./lib/select/select";
|
|
146
|
+
export * from "./lib/separator/separator";
|
|
147
|
+
export * from "./lib/scroll-area/scroll-area";
|
|
148
|
+
export * from "./lib/sheet/sheet";
|
|
149
|
+
export * from "./lib/sidebar-nav/sidebar-nav";
|
|
150
|
+
export * from "./lib/skeleton/skeleton";
|
|
151
|
+
export * from "./lib/spinner/spinner";
|
|
152
|
+
export * from "./lib/status-metric-row/status-metric-row";
|
|
153
|
+
export * from "./lib/slider/slider";
|
|
154
|
+
export * from "./lib/switch/switch";
|
|
155
|
+
export * from "./lib/table/table";
|
|
156
|
+
export * from "./lib/tabs/tab";
|
|
157
|
+
export * from "./lib/tabs/tab-panel";
|
|
158
|
+
export * from "./lib/tabs/tabs";
|
|
159
|
+
export * from "./lib/textarea/textarea";
|
|
160
|
+
export * from "./lib/toggle/toggle";
|
|
161
|
+
export * from "./lib/toggle/toggle-group";
|
|
162
|
+
export * from "./lib/time-picker/time-picker";
|
|
163
|
+
export * from "./lib/timeline/timeline";
|
|
164
|
+
export * from "./lib/toast/toast";
|
|
165
|
+
export * from "./lib/uptime-bar/uptime-bar";
|
|
166
|
+
export * from "./lib/whitepaper-cta/whitepaper-cta";
|
|
167
|
+
export * from "./lib/wizard/wizard";
|
|
168
|
+
export type { VikingUptimeStatus } from "./lib/uptime-bar/uptime-bar";
|
|
169
|
+
export * from "./lib/tooltip/tooltip";
|
|
170
|
+
export * from "./lib/typography/heading";
|
|
171
|
+
export * from "./lib/typography/text";
|
|
172
|
+
export * from "./lib/suite-search-palette/suite-search-palette";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Fixed series palette — keep in sync with viking-tokens.json and THEME.md §8.4 */
|
|
2
|
+
export const VIKING_SERIES_PRESETS = [
|
|
3
|
+
"var(--viking-electric-500)",
|
|
4
|
+
"var(--viking-crimson-600)",
|
|
5
|
+
"var(--viking-green-500)",
|
|
6
|
+
"var(--viking-gold-500)",
|
|
7
|
+
"var(--viking-crimson-500)",
|
|
8
|
+
"var(--viking-blue-500)",
|
|
9
|
+
"var(--viking-charcoal-700)",
|
|
10
|
+
"var(--viking-metallic-500)",
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
export const VIKING_SERIES_DEFAULT = VIKING_SERIES_PRESETS[0];
|
|
14
|
+
|
|
15
|
+
export type VikingSeriesPreset = (typeof VIKING_SERIES_PRESETS)[number];
|