@dataengineeringformachinelearning/viking-ui 4.0.4 → 4.0.5
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/README.md +35 -11
- package/dist/README.md +35 -11
- package/dist/design-tokens.css +300 -85
- package/dist/fesm2022/dataengineeringformachinelearning-viking-ui.mjs +100 -64
- package/dist/fesm2022/dataengineeringformachinelearning-viking-ui.mjs.map +1 -1
- package/dist/icons.js +306 -0
- package/dist/package.json +24 -5
- package/{src/lib/site-drakkar/site-drakkar.config.ts → dist/site-drakkar.js} +64 -130
- package/dist/src/tokens/viking-tokens.json +9 -7
- package/dist/types/dataengineeringformachinelearning-viking-ui.d.ts +97 -3
- package/dist/viking-components.css +161 -70
- package/dist/viking-tokens.json +9 -7
- package/dist/viking-ui-elements.js +44 -32
- package/dist/viking-ui.css +1 -1
- package/dist/web-components.js +44 -32
- package/package.json +30 -8
- package/dist/scripts/build-web-components.mjs +0 -37
- package/dist/src/web/badge/viking-badge-wc.ts +0 -116
- package/dist/src/web/button/viking-button-wc.ts +0 -165
- package/dist/src/web/callout/viking-callout-wc.ts +0 -105
- package/dist/src/web/card/viking-card-wc.ts +0 -67
- package/dist/src/web/core/base.ts +0 -56
- package/dist/src/web/core/dom.ts +0 -53
- package/dist/src/web/core/icons-inline.ts +0 -44
- package/dist/src/web/core/styles.ts +0 -1261
- package/dist/src/web/core/types.ts +0 -19
- package/dist/src/web/field/viking-field-wc.ts +0 -154
- package/dist/src/web/index.ts +0 -73
- package/dist/src/web/input/viking-input-wc.ts +0 -211
- package/dist/src/web/modal/viking-modal-wc.ts +0 -187
- package/dist/src/web/search-palette/viking-search-palette-wc.ts +0 -495
- package/dist/src/web/select/viking-select-wc.ts +0 -218
- package/dist/src/web/suite-header/viking-suite-header-wc.ts +0 -729
- package/dist/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +0 -234
- package/dist/src/web/theme-toggle/viking-theme-toggle-wc.ts +0 -139
- package/dist/src/web/types.ts +0 -37
- package/dist/src/web/web-components.spec.ts +0 -297
- package/src/assets/drakkar-favicon.svg +0 -17
- package/src/assets/fonts/inter/InterVariable-Italic.woff2 +0 -0
- package/src/assets/fonts/inter/InterVariable.woff2 +0 -0
- package/src/core/brand/deml-lockup.svg +0 -5
- package/src/core/brand/deml-mark-compact.svg +0 -4
- package/src/core/brand/deml-mark-filled.svg +0 -3
- package/src/core/brand/deml-mark-outline.svg +0 -4
- package/src/core/brand-icons.ts +0 -62
- package/src/core/icons.spec.ts +0 -52
- package/src/core/icons.ts +0 -206
- package/src/core/integration-brand-icons.ts +0 -77
- package/src/core/lucide-paths.generated.ts +0 -130
- package/src/core/types.ts +0 -85
- package/src/core/uid.ts +0 -7
- package/src/elements/button/viking-button.ts +0 -201
- package/src/elements/card/viking-card.ts +0 -60
- package/src/elements/core/dom.ts +0 -33
- package/src/elements/core/styles.ts +0 -28
- package/src/elements/modal/viking-modal.ts +0 -154
- package/src/index.ts +0 -1
- package/src/lib/accordion/accordion.ts +0 -126
- package/src/lib/app-header/app-header.scss +0 -274
- package/src/lib/app-header/app-header.ts +0 -43
- package/src/lib/app-sidebar/app-sidebar.scss +0 -415
- package/src/lib/app-sidebar/app-sidebar.ts +0 -29
- package/src/lib/auth-panel/auth-panel.spec.ts +0 -132
- package/src/lib/auth-panel/auth-panel.ts +0 -228
- package/src/lib/autocomplete/autocomplete.ts +0 -223
- package/src/lib/avatar/avatar.ts +0 -126
- package/src/lib/badge/badge.ts +0 -182
- package/src/lib/bar/bar.ts +0 -31
- package/src/lib/brand/brand.ts +0 -60
- package/src/lib/breadcrumbs/breadcrumbs.ts +0 -81
- package/src/lib/button/button-group.ts +0 -40
- package/src/lib/button/button.scss +0 -119
- package/src/lib/button/button.ts +0 -98
- package/src/lib/calendar/calendar.ts +0 -253
- package/src/lib/callout/callout.ts +0 -211
- package/src/lib/card/card-title.spec.ts +0 -27
- package/src/lib/card/card-title.ts +0 -50
- package/src/lib/card/card.ts +0 -200
- package/src/lib/carousel/carousel.ts +0 -206
- package/src/lib/chart/chart-zoom.spec.ts +0 -65
- package/src/lib/chart/chart-zoom.ts +0 -71
- package/src/lib/chart/chart.ts +0 -1257
- package/src/lib/chart-card-header/chart-card-header.ts +0 -80
- package/src/lib/chart-empty-state/chart-empty-state.ts +0 -146
- package/src/lib/chart-panel/chart-panel.ts +0 -133
- package/src/lib/checkbox/checkbox.ts +0 -139
- package/src/lib/color-picker/color-picker.ts +0 -148
- package/src/lib/command/command.ts +0 -260
- package/src/lib/composer/composer.ts +0 -180
- package/src/lib/confirm-dialog/confirm-dialog.ts +0 -163
- package/src/lib/confirm-dialog/dialog.service.ts +0 -79
- package/src/lib/context/context.ts +0 -75
- package/src/lib/core/brand-icons.ts +0 -62
- package/src/lib/core/cva.ts +0 -33
- package/src/lib/core/icons.ts +0 -206
- package/src/lib/core/integration-brand-icons.ts +0 -77
- package/src/lib/core/lucide-paths.generated.ts +0 -130
- package/src/lib/date-picker/date-picker.ts +0 -139
- package/src/lib/dropdown/dropdown.ts +0 -188
- package/src/lib/editor/editor.ts +0 -170
- package/src/lib/empty-state/empty-state.ts +0 -100
- package/src/lib/fab/fab.ts +0 -76
- package/src/lib/field/field.ts +0 -111
- package/src/lib/file-upload/file-upload.ts +0 -208
- package/src/lib/footer/footer.scss +0 -162
- package/src/lib/footer/footer.ts +0 -28
- package/src/lib/form-section/form-section.ts +0 -200
- package/src/lib/forms.spec.ts +0 -92
- package/src/lib/gauge-arc/gauge-arc.ts +0 -85
- package/src/lib/hud-panel/hud-panel.ts +0 -27
- package/src/lib/icon/icon.ts +0 -284
- package/src/lib/icon-badge/icon-badge.ts +0 -87
- package/src/lib/icon-heading/icon-heading.spec.ts +0 -32
- package/src/lib/icon-heading/icon-heading.ts +0 -38
- package/src/lib/icon-text/icon-text.ts +0 -120
- package/src/lib/input/input.ts +0 -119
- package/src/lib/kanban/kanban.ts +0 -211
- package/src/lib/kbd/kbd.ts +0 -32
- package/src/lib/label/label.ts +0 -39
- package/src/lib/loading-overlay/loading-overlay.ts +0 -80
- package/src/lib/menubar/menubar.ts +0 -77
- package/src/lib/metric-card/metric-card.ts +0 -33
- package/src/lib/modal/modal.ts +0 -207
- package/src/lib/native-select/native-select.ts +0 -124
- package/src/lib/navbar/navbar.ts +0 -124
- package/src/lib/navigation-menu/navigation-menu.ts +0 -116
- package/src/lib/otp-input/otp-input.ts +0 -164
- package/src/lib/page-back-link/page-back-link.ts +0 -74
- package/src/lib/page-header/page-header.ts +0 -70
- package/src/lib/pagination/pagination.ts +0 -157
- package/src/lib/pillbox/pillbox.ts +0 -157
- package/src/lib/popover/popover.ts +0 -92
- package/src/lib/profile/profile.ts +0 -73
- package/src/lib/progress/progress.ts +0 -123
- package/src/lib/radio/radio.ts +0 -132
- package/src/lib/ring-gauge/ring-gauge.ts +0 -75
- package/src/lib/scroll-area/scroll-area.ts +0 -57
- package/src/lib/search-palette/search-palette.scss +0 -288
- package/src/lib/search-palette/search-palette.ts +0 -114
- package/src/lib/select/select.ts +0 -292
- package/src/lib/separator/separator.ts +0 -59
- package/src/lib/sheet/sheet.ts +0 -192
- package/src/lib/sidebar-nav/sidebar-nav.scss +0 -218
- package/src/lib/sidebar-nav/sidebar-nav.ts +0 -158
- package/src/lib/site-drakkar/site-footer.ts +0 -133
- package/src/lib/site-drakkar/site-navbar.scss +0 -2
- package/src/lib/site-drakkar/site-navbar.ts +0 -286
- package/src/lib/site-drakkar/suite-search-items.spec.ts +0 -61
- package/src/lib/site-drakkar/suite-search-items.ts +0 -246
- package/src/lib/skeleton/skeleton.ts +0 -51
- package/src/lib/slider/slider.ts +0 -133
- package/src/lib/spinner/spinner.ts +0 -75
- package/src/lib/status-metric-row/status-metric-row.ts +0 -74
- package/src/lib/suite-search-palette/suite-search-palette.ts +0 -95
- package/src/lib/switch/switch.ts +0 -131
- package/src/lib/table/table.ts +0 -137
- package/src/lib/tabs/tab-panel.ts +0 -61
- package/src/lib/tabs/tab.ts +0 -107
- package/src/lib/tabs/tabs.ts +0 -109
- package/src/lib/textarea/textarea.ts +0 -103
- package/src/lib/theme-toggle/theme-toggle.spec.ts +0 -40
- package/src/lib/theme-toggle/theme-toggle.ts +0 -40
- package/src/lib/time-picker/time-picker.ts +0 -197
- package/src/lib/timeline/timeline.ts +0 -152
- package/src/lib/toast/toast.ts +0 -196
- package/src/lib/toggle/toggle-group.ts +0 -60
- package/src/lib/toggle/toggle.ts +0 -101
- package/src/lib/tooltip/tooltip.ts +0 -119
- package/src/lib/typography/heading.ts +0 -52
- package/src/lib/typography/text.ts +0 -51
- package/src/lib/uptime-bar/uptime-bar.ts +0 -55
- package/src/lib/verification-code-field/verification-code-field.ts +0 -149
- package/src/lib/whitepaper-cta/whitepaper-cta.scss +0 -130
- package/src/lib/whitepaper-cta/whitepaper-cta.ts +0 -78
- package/src/lib/wizard/wizard.ts +0 -80
- package/src/public-api.ts +0 -172
- package/src/styles/_buttons.scss +0 -386
- package/src/styles/_component-primitives.scss +0 -183
- package/src/styles/_drakkar-buttons.scss +0 -85
- package/src/styles/_fonts.scss +0 -22
- package/src/styles/_forms.scss +0 -66
- package/src/styles/_input.scss +0 -106
- package/src/styles/_layout-enforcement.scss +0 -229
- package/src/styles/_layout-rhythm.scss +0 -158
- package/src/styles/_legacy-aliases.scss +0 -212
- package/src/styles/_series-colors.scss +0 -24
- package/src/styles/_static-primitives.scss +0 -857
- package/src/styles/_typography.scss +0 -87
- package/src/styles/_variables.scss +0 -527
- package/src/styles/components/a11y.scss +0 -90
- package/src/styles/components/badges.scss +0 -102
- package/src/styles/components/extracted-utilities.scss +0 -459
- package/src/styles/components/footer.scss +0 -168
- package/src/styles/components/icon-heading.scss +0 -47
- package/src/styles/components/icon-inline.scss +0 -101
- package/src/styles/components/layout.scss +0 -59
- package/src/styles/components/utilities.scss +0 -131
- package/src/styles/components/viking-inspired.scss +0 -204
- package/src/styles/components/whitepaper-cta.scss +0 -130
- package/src/styles/components-bundle.scss +0 -9
- package/src/styles/components.scss +0 -442
- package/src/styles/deml-components.scss +0 -10
- package/src/styles/index.scss +0 -8
- package/src/styles/layout-shell.scss +0 -111
- package/src/styles/page-shell.scss +0 -859
- package/src/styles/static-navbar.scss +0 -1250
- package/src/styles/surfaces/backend.scss +0 -154
- package/src/styles/surfaces/docs-global.scss +0 -73
- package/src/styles/surfaces/docs-shell.scss +0 -437
- package/src/styles/surfaces/docs-showcase.scss +0 -1153
- package/src/styles/surfaces/marketing-cta.scss +0 -62
- package/src/styles/surfaces/marketing-docs-bento.scss +0 -67
- package/src/styles/surfaces/marketing-global.scss +0 -748
- package/src/styles/surfaces/marketing-landing.scss +0 -1526
- package/src/styles/surfaces/marketing-publication.scss +0 -535
- package/src/styles/surfaces/marketing-theme.scss +0 -14
- package/src/styles/surfaces/swagger-ui.scss +0 -1013
- package/src/styles/tokens-export.scss +0 -18
- package/src/styles/tokens.scss +0 -5
- package/src/styles/viking-ui-bundle.scss +0 -23
- package/src/styles/viking-ui.scss +0 -272
- package/src/tokens/series-presets.ts +0 -15
- package/src/tokens/tailwind.preset.js +0 -209
- package/src/tokens/viking-tokens.json +0 -318
- package/src/viking-ui.spec.ts +0 -416
- package/src/web/badge/viking-badge-wc.ts +0 -116
- package/src/web/button/viking-button-wc.ts +0 -165
- package/src/web/callout/viking-callout-wc.ts +0 -105
- package/src/web/card/viking-card-wc.ts +0 -67
- package/src/web/core/base.ts +0 -56
- package/src/web/core/dom.ts +0 -53
- package/src/web/core/icons-inline.ts +0 -44
- package/src/web/core/styles.ts +0 -1261
- package/src/web/core/types.ts +0 -19
- package/src/web/field/viking-field-wc.ts +0 -154
- package/src/web/index.ts +0 -73
- package/src/web/input/viking-input-wc.ts +0 -211
- package/src/web/modal/viking-modal-wc.ts +0 -187
- package/src/web/search-palette/viking-search-palette-wc.ts +0 -495
- package/src/web/select/viking-select-wc.ts +0 -218
- package/src/web/suite-header/viking-suite-header-wc.ts +0 -729
- package/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +0 -234
- package/src/web/theme-toggle/viking-theme-toggle-wc.ts +0 -139
- package/src/web/types.ts +0 -37
- package/src/web/web-components.spec.ts +0 -297
- package/src/web-components/index.ts +0 -1
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
SiteDrakkarContext,
|
|
3
|
-
SiteFooterLink,
|
|
4
|
-
SiteNavLink,
|
|
5
|
-
SiteUrls,
|
|
6
|
-
} from "./site-drakkar.config";
|
|
7
|
-
import {
|
|
8
|
-
SITE_FOOTER_COLUMNS,
|
|
9
|
-
SITE_NAV_LINKS,
|
|
10
|
-
bugReportHref,
|
|
11
|
-
cookieSettingsHref,
|
|
12
|
-
resolveFooterHref,
|
|
13
|
-
resolveNavHref,
|
|
14
|
-
} from "./site-drakkar.config";
|
|
15
|
-
|
|
16
|
-
/** Curated command-palette entry for cross-surface navigation. */
|
|
17
|
-
export type SuiteSearchItem = {
|
|
18
|
-
title: string;
|
|
19
|
-
href: string;
|
|
20
|
-
snippet?: string;
|
|
21
|
-
group?: string;
|
|
22
|
-
keywords?: string[];
|
|
23
|
-
action?: "cookie-settings" | "bug-report";
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const dedupeItems = (items: SuiteSearchItem[]): SuiteSearchItem[] => {
|
|
27
|
-
const seen = new Set<string>();
|
|
28
|
-
return items.filter((item) => {
|
|
29
|
-
const key = `${item.title}:${item.href}:${item.action ?? ""}`;
|
|
30
|
-
if (seen.has(key)) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
seen.add(key);
|
|
34
|
-
return true;
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const navItem = (
|
|
39
|
-
link: SiteNavLink,
|
|
40
|
-
context: SiteDrakkarContext,
|
|
41
|
-
urls: SiteUrls,
|
|
42
|
-
): SuiteSearchItem => ({
|
|
43
|
-
title: link.label,
|
|
44
|
-
href: resolveNavHref(link, context, urls),
|
|
45
|
-
snippet: `Open ${link.label}`,
|
|
46
|
-
group: "Platform",
|
|
47
|
-
keywords: [link.id, link.label.toLowerCase(), "navigate", "go"],
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const footerItem = (
|
|
51
|
-
link: SiteFooterLink,
|
|
52
|
-
columnTitle: string,
|
|
53
|
-
context: SiteDrakkarContext,
|
|
54
|
-
urls: SiteUrls,
|
|
55
|
-
): SuiteSearchItem => {
|
|
56
|
-
if (link.action === "cookie-settings") {
|
|
57
|
-
return {
|
|
58
|
-
title: link.label,
|
|
59
|
-
href: cookieSettingsHref(urls),
|
|
60
|
-
snippet: "Manage analytics and cookie preferences",
|
|
61
|
-
group: columnTitle,
|
|
62
|
-
keywords: ["cookies", "consent", "privacy", "gdpr"],
|
|
63
|
-
action: "cookie-settings",
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (link.action === "bug-report") {
|
|
68
|
-
return {
|
|
69
|
-
title: link.label,
|
|
70
|
-
href: context === "app" ? "#" : bugReportHref(urls),
|
|
71
|
-
snippet: "Submit a product issue or regression",
|
|
72
|
-
group: columnTitle,
|
|
73
|
-
keywords: ["bug", "issue", "support", "feedback"],
|
|
74
|
-
action: "bug-report",
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return {
|
|
79
|
-
title: link.label,
|
|
80
|
-
href: resolveFooterHref(link, context, urls),
|
|
81
|
-
snippet: `Open ${link.label}`,
|
|
82
|
-
group: columnTitle,
|
|
83
|
-
keywords: [link.label.toLowerCase(), columnTitle.toLowerCase()],
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/** Static entries that are not derived from Drakkar nav/footer config. */
|
|
88
|
-
const SUITE_SEARCH_EXTRAS: readonly Omit<SuiteSearchItem, "href">[] = [
|
|
89
|
-
{
|
|
90
|
-
title: "Viking-UI Components",
|
|
91
|
-
snippet: "Browse the design system showcase",
|
|
92
|
-
group: "Resources",
|
|
93
|
-
keywords: ["viking", "ui", "design system", "components", "showcase"],
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
title: "Design tokens",
|
|
97
|
-
snippet: "Canonical --viking-* token matrix",
|
|
98
|
-
group: "Resources",
|
|
99
|
-
keywords: ["tokens", "theme", "css", "variables"],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
title: "API reference",
|
|
103
|
-
snippet: "OpenAPI schema and REST endpoints",
|
|
104
|
-
group: "Resources",
|
|
105
|
-
keywords: ["api", "openapi", "swagger", "rest"],
|
|
106
|
-
},
|
|
107
|
-
];
|
|
108
|
-
|
|
109
|
-
const resolveExtraHref = (
|
|
110
|
-
extra: (typeof SUITE_SEARCH_EXTRAS)[number],
|
|
111
|
-
context: SiteDrakkarContext,
|
|
112
|
-
urls: SiteUrls,
|
|
113
|
-
): string => {
|
|
114
|
-
switch (extra.title) {
|
|
115
|
-
case "Viking-UI Components":
|
|
116
|
-
return "https://ui.dataengineeringformachinelearning.com/components";
|
|
117
|
-
case "Design tokens":
|
|
118
|
-
return "https://ui.dataengineeringformachinelearning.com/tokens";
|
|
119
|
-
case "API reference":
|
|
120
|
-
return `${urls.backend.replace(/\/$/, "")}/api/docs`;
|
|
121
|
-
default:
|
|
122
|
-
return context === "app" ? urls.app : urls.marketing;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
/** Viking-UI docs site entries (ui.dataengineeringformachinelearning.com). */
|
|
127
|
-
const DOCS_SEARCH_EXTRAS: readonly SuiteSearchItem[] = [
|
|
128
|
-
{
|
|
129
|
-
title: "Components",
|
|
130
|
-
href: "/components",
|
|
131
|
-
snippet: "Browse all documented primitives",
|
|
132
|
-
group: "Viking-UI",
|
|
133
|
-
keywords: ["components", "showcase", "registry"],
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
title: "Playground",
|
|
137
|
-
href: "/playground",
|
|
138
|
-
snippet: "Live Web Component sandbox",
|
|
139
|
-
group: "Viking-UI",
|
|
140
|
-
keywords: ["playground", "sandbox", "demo"],
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
title: "Architecture",
|
|
144
|
-
href: "/architecture",
|
|
145
|
-
snippet: "CSS + WC + Angular layers",
|
|
146
|
-
group: "Viking-UI",
|
|
147
|
-
keywords: ["architecture", "layers", "web component"],
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
title: "Design tokens",
|
|
151
|
-
href: "/tokens",
|
|
152
|
-
snippet: "Canonical --viking-* token matrix",
|
|
153
|
-
group: "Viking-UI",
|
|
154
|
-
keywords: ["tokens", "theme", "css", "variables"],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
title: "Theming",
|
|
158
|
-
href: "/theming",
|
|
159
|
-
snippet: "Light/dark mode and sync pipeline",
|
|
160
|
-
group: "Viking-UI",
|
|
161
|
-
keywords: ["theming", "dark", "light", "mode"],
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
title: "Framework guides",
|
|
165
|
-
href: "/frameworks",
|
|
166
|
-
snippet: "Angular, Astro, Django setup",
|
|
167
|
-
group: "Viking-UI",
|
|
168
|
-
keywords: ["frameworks", "angular", "astro", "django"],
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
title: "Contributing",
|
|
172
|
-
href: "/contributing",
|
|
173
|
-
snippet: "Extend the Viking-UI kit",
|
|
174
|
-
group: "Viking-UI",
|
|
175
|
-
keywords: ["contributing", "extend", "primitives"],
|
|
176
|
-
},
|
|
177
|
-
];
|
|
178
|
-
|
|
179
|
-
const resolveDocsHref = (href: string, docsOrigin: string): string =>
|
|
180
|
-
href.startsWith("http")
|
|
181
|
-
? href
|
|
182
|
-
: `${docsOrigin.replace(/\/$/, "")}${href.startsWith("/") ? href : `/${href}`}`;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Builds curated command-palette links for deml.app, marketing, backend, and docs.
|
|
186
|
-
* Used by the static widget and Angular `viking-suite-search-palette`.
|
|
187
|
-
*/
|
|
188
|
-
export const buildSuiteSearchItems = (
|
|
189
|
-
context: SiteDrakkarContext,
|
|
190
|
-
urls: SiteUrls,
|
|
191
|
-
options?: { docsOrigin?: string },
|
|
192
|
-
): SuiteSearchItem[] => {
|
|
193
|
-
const paletteContext = context === "docs" ? "marketing" : context;
|
|
194
|
-
|
|
195
|
-
const items: SuiteSearchItem[] = [
|
|
196
|
-
...SITE_NAV_LINKS.map((link) => navItem(link, paletteContext, urls)),
|
|
197
|
-
...SITE_FOOTER_COLUMNS.flatMap((column) =>
|
|
198
|
-
column.links.map((link) =>
|
|
199
|
-
footerItem(link, column.title, paletteContext, urls),
|
|
200
|
-
),
|
|
201
|
-
),
|
|
202
|
-
...SUITE_SEARCH_EXTRAS.map((extra) => ({
|
|
203
|
-
...extra,
|
|
204
|
-
href: resolveExtraHref(extra, paletteContext, urls),
|
|
205
|
-
})),
|
|
206
|
-
];
|
|
207
|
-
|
|
208
|
-
if (context === "app") {
|
|
209
|
-
items.push(
|
|
210
|
-
{
|
|
211
|
-
title: "Settings",
|
|
212
|
-
href: "/settings",
|
|
213
|
-
snippet: "Workspace domains, billing, and security",
|
|
214
|
-
group: "Platform",
|
|
215
|
-
keywords: ["settings", "sites", "workspace", "configuration"],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
title: "Billing & subscription",
|
|
219
|
-
href: "/settings/billing",
|
|
220
|
-
snippet: "Manage plan, invoices, and payment methods",
|
|
221
|
-
group: "Platform",
|
|
222
|
-
keywords: ["billing", "stripe", "subscription", "payment"],
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
title: "Security settings",
|
|
226
|
-
href: "/settings/security",
|
|
227
|
-
snippet: "Keys, sessions, and access controls",
|
|
228
|
-
group: "Platform",
|
|
229
|
-
keywords: ["security", "keys", "auth", "rbac"],
|
|
230
|
-
},
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
if (context === "docs") {
|
|
235
|
-
const docsOrigin =
|
|
236
|
-
options?.docsOrigin ?? "https://ui.dataengineeringformachinelearning.com";
|
|
237
|
-
items.push(
|
|
238
|
-
...DOCS_SEARCH_EXTRAS.map((extra) => ({
|
|
239
|
-
...extra,
|
|
240
|
-
href: resolveDocsHref(extra.href, docsOrigin),
|
|
241
|
-
})),
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return dedupeItems(items);
|
|
246
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* viking-skeleton — loading placeholder.
|
|
5
|
-
*/
|
|
6
|
-
@Component({
|
|
7
|
-
selector: "viking-skeleton",
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
-
host: {
|
|
10
|
-
"aria-hidden": "true",
|
|
11
|
-
"[class.viking-skeleton-circle]": "shape() === 'circle'",
|
|
12
|
-
"[style.width]": "width()",
|
|
13
|
-
"[style.height]": "height()",
|
|
14
|
-
},
|
|
15
|
-
template: ``,
|
|
16
|
-
styles: [
|
|
17
|
-
`
|
|
18
|
-
:host {
|
|
19
|
-
display: block;
|
|
20
|
-
border-radius: var(--viking-radius-sm);
|
|
21
|
-
background: linear-gradient(
|
|
22
|
-
100deg,
|
|
23
|
-
var(--viking-surface-alt) 38%,
|
|
24
|
-
color-mix(
|
|
25
|
-
in srgb,
|
|
26
|
-
var(--viking-text-muted) 10%,
|
|
27
|
-
var(--viking-surface-alt)
|
|
28
|
-
)
|
|
29
|
-
50%,
|
|
30
|
-
var(--viking-surface-alt) 62%
|
|
31
|
-
);
|
|
32
|
-
background-size: 200% 100%;
|
|
33
|
-
animation: viking-shimmer 1.6s ease-in-out infinite;
|
|
34
|
-
}
|
|
35
|
-
:host(.viking-skeleton-circle) {
|
|
36
|
-
border-radius: var(--viking-radius-pill);
|
|
37
|
-
}
|
|
38
|
-
@media (prefers-reduced-motion: reduce) {
|
|
39
|
-
:host {
|
|
40
|
-
animation: none;
|
|
41
|
-
background: var(--viking-surface-alt);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`,
|
|
45
|
-
],
|
|
46
|
-
})
|
|
47
|
-
export class VikingSkeleton {
|
|
48
|
-
readonly shape = input<"line" | "rect" | "circle">("line");
|
|
49
|
-
readonly width = input<string>("100%");
|
|
50
|
-
readonly height = input<string>("var(--viking-font-size-sm)");
|
|
51
|
-
}
|
package/src/lib/slider/slider.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
computed,
|
|
5
|
-
input,
|
|
6
|
-
model,
|
|
7
|
-
} from "@angular/core";
|
|
8
|
-
import { VikingControl, provideVikingCva } from "../core/cva";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* viking-slider — range slider.
|
|
12
|
-
* ControlValueAccessor-compatible.
|
|
13
|
-
*/
|
|
14
|
-
@Component({
|
|
15
|
-
selector: "viking-slider",
|
|
16
|
-
providers: [provideVikingCva(VikingSlider)],
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
template: `
|
|
19
|
-
<div class="viking-slider-header">
|
|
20
|
-
@if (label()) {
|
|
21
|
-
<span class="viking-slider-label">{{ label() }}</span>
|
|
22
|
-
}
|
|
23
|
-
@if (showValue()) {
|
|
24
|
-
<output class="viking-slider-value">{{ value() }}</output>
|
|
25
|
-
}
|
|
26
|
-
</div>
|
|
27
|
-
<input
|
|
28
|
-
type="range"
|
|
29
|
-
[min]="min()"
|
|
30
|
-
[max]="max()"
|
|
31
|
-
[step]="step()"
|
|
32
|
-
[value]="value()"
|
|
33
|
-
[disabled]="disabled() || formDisabled()"
|
|
34
|
-
[attr.aria-label]="label() || 'Slider'"
|
|
35
|
-
[style.--viking-slider-fill.%]="fillPercent()"
|
|
36
|
-
(input)="onInput($event)"
|
|
37
|
-
(blur)="onTouched()"
|
|
38
|
-
/>
|
|
39
|
-
`,
|
|
40
|
-
styles: [
|
|
41
|
-
`
|
|
42
|
-
:host {
|
|
43
|
-
display: block;
|
|
44
|
-
font-family: var(--viking-font-family);
|
|
45
|
-
}
|
|
46
|
-
.viking-slider-header {
|
|
47
|
-
display: flex;
|
|
48
|
-
justify-content: space-between;
|
|
49
|
-
gap: var(--viking-space-2);
|
|
50
|
-
margin-bottom: calc(var(--viking-space-1) / 2);
|
|
51
|
-
font-size: var(--viking-font-size);
|
|
52
|
-
}
|
|
53
|
-
.viking-slider-label {
|
|
54
|
-
color: var(--viking-text);
|
|
55
|
-
font-weight: 500;
|
|
56
|
-
}
|
|
57
|
-
.viking-slider-value {
|
|
58
|
-
color: var(--viking-text-muted);
|
|
59
|
-
font-variant-numeric: tabular-nums;
|
|
60
|
-
}
|
|
61
|
-
input[type="range"] {
|
|
62
|
-
appearance: none;
|
|
63
|
-
width: 100%;
|
|
64
|
-
height: var(--viking-space-1);
|
|
65
|
-
border-radius: var(--viking-radius-pill);
|
|
66
|
-
border: 1px solid var(--viking-border);
|
|
67
|
-
background: linear-gradient(
|
|
68
|
-
to right,
|
|
69
|
-
var(--viking-accent) var(--viking-slider-fill, 0%),
|
|
70
|
-
var(--viking-surface-alt) var(--viking-slider-fill, 0%)
|
|
71
|
-
);
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
margin: var(--viking-space-1) 0;
|
|
74
|
-
}
|
|
75
|
-
input[type="range"]:disabled {
|
|
76
|
-
opacity: var(--viking-state-disabled-opacity);
|
|
77
|
-
cursor: not-allowed;
|
|
78
|
-
}
|
|
79
|
-
input[type="range"]::-webkit-slider-thumb {
|
|
80
|
-
appearance: none;
|
|
81
|
-
width: var(--viking-space-2);
|
|
82
|
-
height: var(--viking-space-2);
|
|
83
|
-
border-radius: var(--viking-radius-pill);
|
|
84
|
-
background: var(--viking-surface);
|
|
85
|
-
border: 2px solid var(--viking-accent);
|
|
86
|
-
box-shadow: var(--viking-shadow-sm);
|
|
87
|
-
transition: transform 0.15s ease;
|
|
88
|
-
}
|
|
89
|
-
input[type="range"]::-webkit-slider-thumb:hover {
|
|
90
|
-
transform: scale(1.15);
|
|
91
|
-
}
|
|
92
|
-
input[type="range"]::-moz-range-thumb {
|
|
93
|
-
width: var(--viking-space-2);
|
|
94
|
-
height: var(--viking-space-2);
|
|
95
|
-
border-radius: var(--viking-radius-pill);
|
|
96
|
-
background: var(--viking-surface);
|
|
97
|
-
border: 2px solid var(--viking-accent);
|
|
98
|
-
box-shadow: var(--viking-shadow-sm);
|
|
99
|
-
}
|
|
100
|
-
input[type="range"]:focus-visible {
|
|
101
|
-
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
102
|
-
outline-offset: var(--viking-ring-offset);
|
|
103
|
-
}
|
|
104
|
-
`,
|
|
105
|
-
],
|
|
106
|
-
})
|
|
107
|
-
export class VikingSlider extends VikingControl<number> {
|
|
108
|
-
readonly value = model<number>(0);
|
|
109
|
-
readonly min = input<number>(0);
|
|
110
|
-
readonly max = input<number>(100);
|
|
111
|
-
readonly step = input<number>(1);
|
|
112
|
-
readonly label = input<string>("");
|
|
113
|
-
readonly showValue = input<boolean>(true);
|
|
114
|
-
readonly disabled = input<boolean>(false);
|
|
115
|
-
|
|
116
|
-
protected readonly fillPercent = computed(() => {
|
|
117
|
-
const range = this.max() - this.min();
|
|
118
|
-
if (range <= 0) {
|
|
119
|
-
return 0;
|
|
120
|
-
}
|
|
121
|
-
return ((this.value() - this.min()) / range) * 100;
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
writeValue(value: number): void {
|
|
125
|
-
this.value.set(Number(value ?? 0));
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
protected onInput = (event: Event): void => {
|
|
129
|
-
const next = Number((event.target as HTMLInputElement).value);
|
|
130
|
-
this.value.set(next);
|
|
131
|
-
this.onChange(next);
|
|
132
|
-
};
|
|
133
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* viking-spinner — clinical loading indicator.
|
|
5
|
-
*/
|
|
6
|
-
@Component({
|
|
7
|
-
selector: "viking-spinner",
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
-
host: {
|
|
10
|
-
role: "status",
|
|
11
|
-
"aria-live": "polite",
|
|
12
|
-
"[attr.aria-label]": "label()",
|
|
13
|
-
},
|
|
14
|
-
template: `
|
|
15
|
-
<svg
|
|
16
|
-
class="viking-spinner-svg"
|
|
17
|
-
viewBox="0 0 24 24"
|
|
18
|
-
fill="none"
|
|
19
|
-
[attr.width]="size()"
|
|
20
|
-
[attr.height]="size()"
|
|
21
|
-
aria-hidden="true"
|
|
22
|
-
>
|
|
23
|
-
<circle class="viking-spinner-track" cx="12" cy="12" r="9" />
|
|
24
|
-
<circle
|
|
25
|
-
class="viking-spinner-arc"
|
|
26
|
-
cx="12"
|
|
27
|
-
cy="12"
|
|
28
|
-
r="9"
|
|
29
|
-
stroke-linecap="round"
|
|
30
|
-
/>
|
|
31
|
-
</svg>
|
|
32
|
-
`,
|
|
33
|
-
styles: [
|
|
34
|
-
`
|
|
35
|
-
:host {
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
color: var(--viking-accent);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.viking-spinner-svg {
|
|
41
|
-
--viking-spinner-stroke: 2;
|
|
42
|
-
shape-rendering: geometricPrecision;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.viking-spinner-track,
|
|
46
|
-
.viking-spinner-arc {
|
|
47
|
-
fill: none;
|
|
48
|
-
stroke-width: var(--viking-spinner-stroke);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.viking-spinner-track {
|
|
52
|
-
stroke: color-mix(in srgb, currentColor 14%, transparent);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.viking-spinner-arc {
|
|
56
|
-
stroke: currentColor;
|
|
57
|
-
stroke-dasharray: 42 84;
|
|
58
|
-
transform-origin: center;
|
|
59
|
-
animation: viking-spin var(--viking-duration-slow)
|
|
60
|
-
var(--viking-ease-default) infinite;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@media (prefers-reduced-motion: reduce) {
|
|
64
|
-
.viking-spinner-arc {
|
|
65
|
-
animation: none;
|
|
66
|
-
stroke-dasharray: 56 84;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
`,
|
|
70
|
-
],
|
|
71
|
-
})
|
|
72
|
-
export class VikingSpinner {
|
|
73
|
-
readonly size = input<number>(20);
|
|
74
|
-
readonly label = input<string>("Loading");
|
|
75
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
2
|
-
import { VikingIcon } from "../icon/icon";
|
|
3
|
-
import type { VikingIconName } from "../../core/icons";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* viking-status-metric-row — icon + title/subtitle + value row for status cards.
|
|
7
|
-
*/
|
|
8
|
-
@Component({
|
|
9
|
-
selector: "viking-status-metric-row",
|
|
10
|
-
imports: [VikingIcon],
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
host: { class: "viking-status-metric-row ml-stat-panel" },
|
|
13
|
-
template: `
|
|
14
|
-
<div class="stat-info">
|
|
15
|
-
<viking-icon
|
|
16
|
-
[name]="icon()"
|
|
17
|
-
[size]="22"
|
|
18
|
-
color="accent"
|
|
19
|
-
[backdrop]="true"
|
|
20
|
-
/>
|
|
21
|
-
<div>
|
|
22
|
-
<span class="stat-title">{{ title() }}</span>
|
|
23
|
-
@if (subtitle()) {
|
|
24
|
-
<span class="stat-subtitle">{{ subtitle() }}</span>
|
|
25
|
-
}
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="stat-value-container">
|
|
29
|
-
<span class="stat-value"><ng-content />{{ value() }}</span>
|
|
30
|
-
</div>
|
|
31
|
-
`,
|
|
32
|
-
styles: [
|
|
33
|
-
`
|
|
34
|
-
:host {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: space-between;
|
|
38
|
-
gap: var(--viking-space-2);
|
|
39
|
-
padding: var(--viking-space-2);
|
|
40
|
-
border: 1px solid var(--viking-border);
|
|
41
|
-
border-radius: var(--viking-radius-lg);
|
|
42
|
-
background: var(--viking-surface);
|
|
43
|
-
}
|
|
44
|
-
.stat-info {
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
gap: var(--viking-space-2);
|
|
48
|
-
min-width: 0;
|
|
49
|
-
}
|
|
50
|
-
.stat-title {
|
|
51
|
-
display: block;
|
|
52
|
-
font-size: var(--viking-font-size-sm);
|
|
53
|
-
font-weight: var(--viking-font-weight-semibold);
|
|
54
|
-
color: var(--viking-text);
|
|
55
|
-
}
|
|
56
|
-
.stat-subtitle {
|
|
57
|
-
display: block;
|
|
58
|
-
font-size: var(--viking-font-size-sm);
|
|
59
|
-
color: var(--viking-text-muted);
|
|
60
|
-
}
|
|
61
|
-
.stat-value {
|
|
62
|
-
font-size: calc(var(--viking-font-size) * 1.25);
|
|
63
|
-
font-weight: 700;
|
|
64
|
-
color: var(--viking-text);
|
|
65
|
-
}
|
|
66
|
-
`,
|
|
67
|
-
],
|
|
68
|
-
})
|
|
69
|
-
export class VikingStatusMetricRow {
|
|
70
|
-
readonly icon = input.required<VikingIconName>();
|
|
71
|
-
readonly title = input.required<string>();
|
|
72
|
-
readonly subtitle = input<string>("");
|
|
73
|
-
readonly value = input<string | number>("");
|
|
74
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
CUSTOM_ELEMENTS_SCHEMA,
|
|
6
|
-
ElementRef,
|
|
7
|
-
OnInit,
|
|
8
|
-
PLATFORM_ID,
|
|
9
|
-
inject,
|
|
10
|
-
input,
|
|
11
|
-
viewChild,
|
|
12
|
-
} from "@angular/core";
|
|
13
|
-
import { isPlatformBrowser } from "@angular/common";
|
|
14
|
-
import {
|
|
15
|
-
DEFAULT_SITE_URLS,
|
|
16
|
-
type SiteDrakkarContext,
|
|
17
|
-
type SiteUrls,
|
|
18
|
-
} from "../site-drakkar/site-drakkar.config";
|
|
19
|
-
import { registerVikingElements } from "../../web/index";
|
|
20
|
-
|
|
21
|
-
registerVikingElements();
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* viking-suite-search-palette — thin Angular wrapper around `viking-suite-command-palette`.
|
|
25
|
-
* Unified ⌘K command palette for deml.app with curated suite navigation.
|
|
26
|
-
*/
|
|
27
|
-
@Component({
|
|
28
|
-
selector: "viking-suite-search-palette",
|
|
29
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
30
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
-
template: `
|
|
32
|
-
<viking-suite-command-palette
|
|
33
|
-
#palette
|
|
34
|
-
[attr.context]="context()"
|
|
35
|
-
[attr.app-url]="urls().app"
|
|
36
|
-
[attr.marketing-url]="urls().marketing"
|
|
37
|
-
[attr.backend-url]="urls().backend"
|
|
38
|
-
[attr.placeholder]="placeholder()"
|
|
39
|
-
[attr.global-shortcut]="bindShortcut() ? '' : 'false'"
|
|
40
|
-
/>
|
|
41
|
-
`,
|
|
42
|
-
})
|
|
43
|
-
export class VikingSuiteSearchPalette implements OnInit, AfterViewInit {
|
|
44
|
-
private readonly platformId = inject(PLATFORM_ID);
|
|
45
|
-
|
|
46
|
-
readonly context = input<SiteDrakkarContext>("app");
|
|
47
|
-
readonly urls = input<SiteUrls>(DEFAULT_SITE_URLS);
|
|
48
|
-
readonly placeholder = input<string>(
|
|
49
|
-
"Search documentation, dashboard, settings…",
|
|
50
|
-
);
|
|
51
|
-
readonly bindShortcut = input<boolean>(true);
|
|
52
|
-
|
|
53
|
-
/** Optional callback when the palette opens (e.g. SearchService bridge). */
|
|
54
|
-
readonly onRegister =
|
|
55
|
-
input<(handlers: { open: () => void; close: () => void }) => void>();
|
|
56
|
-
|
|
57
|
-
private readonly paletteRef = viewChild<ElementRef<HTMLElement>>("palette");
|
|
58
|
-
|
|
59
|
-
ngOnInit(): void {
|
|
60
|
-
this.onRegister()?.({
|
|
61
|
-
open: () => this.openPalette(),
|
|
62
|
-
close: () => this.closePalette(),
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
ngAfterViewInit(): void {
|
|
67
|
-
if (!isPlatformBrowser(this.platformId)) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const widgets =
|
|
71
|
-
(globalThis as { DemlWidgets?: Record<string, unknown> }).DemlWidgets ??
|
|
72
|
-
{};
|
|
73
|
-
(globalThis as { DemlWidgets?: Record<string, unknown> }).DemlWidgets = {
|
|
74
|
-
...widgets,
|
|
75
|
-
openSearch: () => this.openPalette(),
|
|
76
|
-
closeSearch: () => this.closePalette(),
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** Opens the palette. */
|
|
81
|
-
openPalette(): void {
|
|
82
|
-
const el = this.paletteRef()?.nativeElement as HTMLElement & {
|
|
83
|
-
openPalette?: () => void;
|
|
84
|
-
};
|
|
85
|
-
el?.openPalette?.();
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/** Closes the palette and clears the query. */
|
|
89
|
-
closePalette(): void {
|
|
90
|
-
const el = this.paletteRef()?.nativeElement as HTMLElement & {
|
|
91
|
-
closePalette?: () => void;
|
|
92
|
-
};
|
|
93
|
-
el?.closePalette?.();
|
|
94
|
-
}
|
|
95
|
-
}
|