@dataengineeringformachinelearning/viking-ui 1.0.1 → 3.0.0-alpha.2
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 +180 -37
- package/dist/deml-components.css +1122 -0
- package/dist/design-tokens.css +688 -0
- package/dist/elements/button/viking-button.d.ts +14 -0
- package/dist/elements/card/viking-card.d.ts +8 -0
- package/dist/elements/core/dom.d.ts +4 -0
- package/dist/elements/core/styles.d.ts +2 -0
- package/dist/elements/modal/viking-modal.d.ts +15 -0
- package/dist/fonts/inter/InterVariable-Italic.woff2 +0 -0
- package/dist/fonts/inter/InterVariable.woff2 +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4051 -0
- package/dist/lib/core/brand-icons.d.ts +29 -0
- package/dist/lib/core/icons.d.ts +132 -0
- package/dist/lib/core/integration-brand-icons.d.ts +18 -0
- package/dist/lib/core/lucide-paths.generated.d.ts +90 -0
- package/dist/lib/site-drakkar/site-drakkar.config.d.ts +50 -0
- package/dist/lib/site-drakkar/suite-search-items.d.ts +17 -0
- package/dist/viking-components.css +1837 -0
- package/dist/viking-tokens.json +318 -0
- package/dist/viking-ui-elements.js +1750 -0
- package/dist/viking-ui.css +1 -0
- package/dist/web/badge/viking-badge-wc.d.ts +28 -0
- package/dist/web/button/viking-button-wc.d.ts +28 -0
- package/dist/web/callout/viking-callout-wc.d.ts +27 -0
- package/dist/web/card/viking-card-wc.d.ts +29 -0
- package/dist/web/core/base.d.ts +12 -0
- package/dist/web/core/dom.d.ts +11 -0
- package/dist/web/core/icons-inline.d.ts +7 -0
- package/dist/web/core/styles.d.ts +12 -0
- package/dist/web/core/types.d.ts +10 -0
- package/dist/web/field/viking-field-wc.d.ts +32 -0
- package/dist/web/index.d.ts +15 -0
- package/dist/web/input/viking-input-wc.d.ts +32 -0
- package/dist/web/modal/viking-modal-wc.d.ts +50 -0
- package/dist/web/search-palette/viking-search-palette-wc.d.ts +64 -0
- package/dist/web/select/viking-select-wc.d.ts +48 -0
- package/dist/web/suite-header/viking-suite-header-wc.d.ts +36 -0
- package/dist/web/suite-search-palette/viking-suite-search-palette-wc.d.ts +39 -0
- package/dist/web/theme-toggle/viking-theme-toggle-wc.d.ts +19 -0
- package/dist/web/types.d.ts +40 -0
- package/dist/web-components/index.d.ts +1 -0
- package/dist/web-components.js +1750 -0
- package/dist/widget.js +1182 -0
- package/package.json +89 -30
- package/src/assets/fonts/inter/InterVariable-Italic.woff2 +0 -0
- package/src/assets/fonts/inter/InterVariable.woff2 +0 -0
- package/src/elements/button/viking-button.ts +201 -0
- package/src/elements/card/viking-card.ts +60 -0
- package/src/elements/core/dom.ts +33 -0
- package/src/elements/core/styles.ts +28 -0
- package/src/elements/modal/viking-modal.ts +154 -0
- package/src/index.ts +1 -0
- package/src/lib/core/brand-icons.ts +62 -0
- package/src/lib/core/icons.ts +206 -0
- package/src/lib/core/integration-brand-icons.ts +77 -0
- package/src/lib/core/lucide-paths.generated.ts +130 -0
- package/src/lib/site-drakkar/site-drakkar.config.ts +295 -0
- package/src/lib/site-drakkar/suite-search-items.ts +246 -0
- package/src/styles/_buttons.scss +301 -0
- package/src/styles/_component-primitives.scss +183 -0
- package/src/styles/_drakkar-buttons.scss +85 -0
- package/src/styles/_fonts.scss +22 -0
- package/src/styles/_forms.scss +66 -0
- package/src/styles/_input.scss +106 -0
- package/src/styles/_layout-enforcement.scss +166 -0
- package/src/styles/_layout-rhythm.scss +158 -0
- package/src/styles/_legacy-aliases.scss +212 -0
- package/src/styles/_series-colors.scss +24 -0
- package/src/styles/_static-primitives.scss +857 -0
- package/src/styles/_typography.scss +87 -0
- package/src/styles/_variables.scss +527 -0
- package/src/styles/components/a11y.scss +90 -0
- package/src/styles/components/badges.scss +102 -0
- package/src/styles/components/extracted-utilities.scss +459 -0
- package/src/styles/components/footer.scss +155 -0
- package/src/styles/components/icon-heading.scss +47 -0
- package/src/styles/components/icon-inline.scss +78 -0
- package/src/styles/components/layout.scss +59 -0
- package/src/styles/components/utilities.scss +131 -0
- package/src/styles/components/viking-inspired.scss +204 -0
- package/src/styles/components/whitepaper-cta.scss +130 -0
- package/src/styles/components-bundle.scss +9 -0
- package/src/styles/components.scss +175 -0
- package/src/styles/deml-components.scss +10 -0
- package/src/styles/index.scss +8 -0
- package/src/styles/layout-shell.scss +39 -11
- package/src/styles/page-shell.scss +663 -33
- package/src/styles/static-navbar.scss +862 -146
- package/src/styles/surfaces/backend.scss +142 -0
- package/src/styles/surfaces/docs-global.scss +73 -0
- package/src/styles/surfaces/docs-shell.scss +412 -0
- package/src/styles/surfaces/docs-showcase.scss +1051 -0
- package/src/styles/surfaces/marketing-cta.scss +62 -0
- package/src/styles/surfaces/marketing-docs-bento.scss +67 -0
- package/src/styles/surfaces/marketing-global.scss +748 -0
- package/src/styles/surfaces/marketing-landing.scss +1260 -0
- package/src/styles/surfaces/marketing-publication.scss +535 -0
- package/src/styles/surfaces/marketing-theme.scss +14 -0
- package/src/styles/surfaces/swagger-ui.scss +921 -0
- package/src/styles/tokens-export.scss +18 -0
- package/src/styles/tokens.scss +5 -0
- package/src/styles/viking-ui-bundle.scss +21 -2
- package/src/styles/viking-ui.scss +213 -51
- package/src/tokens/viking-tokens.json +318 -0
- package/src/web/badge/viking-badge-wc.ts +116 -0
- package/src/web/button/viking-button-wc.ts +165 -0
- package/src/web/callout/viking-callout-wc.ts +105 -0
- package/src/web/card/viking-card-wc.ts +66 -0
- package/src/web/core/base.ts +56 -0
- package/src/web/core/dom.ts +53 -0
- package/src/web/core/icons-inline.ts +44 -0
- package/src/web/core/styles.ts +1138 -0
- package/src/web/core/types.ts +19 -0
- package/src/web/field/viking-field-wc.ts +154 -0
- package/src/web/index.ts +73 -0
- package/src/web/input/viking-input-wc.ts +211 -0
- package/src/web/modal/viking-modal-wc.ts +187 -0
- package/src/web/search-palette/viking-search-palette-wc.ts +494 -0
- package/src/web/select/viking-select-wc.ts +218 -0
- package/src/web/suite-header/viking-suite-header-wc.ts +714 -0
- package/src/web/suite-search-palette/viking-suite-search-palette-wc.ts +234 -0
- package/src/web/theme-toggle/viking-theme-toggle-wc.ts +139 -0
- package/src/web/types.ts +37 -0
- package/src/web-components/index.ts +1 -0
- package/fesm2022/dataengineeringformachinelearning-viking-ui.mjs +0 -5949
- package/fesm2022/dataengineeringformachinelearning-viking-ui.mjs.map +0 -1
- package/types/dataengineeringformachinelearning-viking-ui.d.ts +0 -1374
- package/viking.manifest.json +0 -189
|
@@ -0,0 +1,1750 @@
|
|
|
1
|
+
"use strict";var VikingUI=(()=>{var ae=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var qe=Object.prototype.hasOwnProperty;var We=(t,e)=>{for(var i in e)ae(t,i,{get:e[i],enumerable:!0})},Ue=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ge(e))!qe.call(t,n)&&n!==i&&ae(t,n,{get:()=>e[n],enumerable:!(r=Be(e,n))||r.enumerable});return t};var Fe=t=>Ue(ae({},"__esModule",{value:!0}),t);var It={};We(It,{VikingBadgeWc:()=>w,VikingButtonWc:()=>E,VikingCalloutWc:()=>S,VikingCardWc:()=>I,VikingFieldWc:()=>_,VikingInputWc:()=>M,VikingModalWc:()=>m,VikingSearchPaletteWc:()=>b,VikingSelectWc:()=>C,VikingSuiteHeaderWc:()=>D,VikingSuiteSearchPaletteWc:()=>f,VikingThemeToggleWc:()=>O,registerVikingBadgeWc:()=>U,registerVikingButtonWc:()=>F,registerVikingCalloutWc:()=>j,registerVikingCardWc:()=>Y,registerVikingElements:()=>he,registerVikingFieldWc:()=>X,registerVikingInputWc:()=>Z,registerVikingModalWc:()=>Q,registerVikingSearchPaletteWc:()=>H,registerVikingSelectWc:()=>re,registerVikingSuiteHeaderWc:()=>ie,registerVikingSuiteSearchPaletteWc:()=>$,registerVikingThemeToggleWc:()=>z});var v=(t,e)=>{if("adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype){let r=new CSSStyleSheet;r.replaceSync(e),t.adoptedStyleSheets=[r];return}let i=document.createElement("style");i.textContent=e,t.append(i)},h=(t,e)=>t.hasAttribute(e)&&t.getAttribute(e)!=="false",K=(t,e)=>{t&&typeof t.setFormValue=="function"&&t.setFormValue(e)},B=t=>{let e=t.attachInternals;return typeof e=="function"?e.call(t):null},G=t=>{t&&typeof t.showModal=="function"&&!t.open&&t.showModal()},T=t=>{t&&typeof t.close=="function"&&t.open&&t.close()};var l=typeof HTMLElement>"u"?class{}:HTMLElement,x=t=>`${t}-${Math.random().toString(36).slice(2,9)}`,a=t=>{let e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.replace(/[&<>"']/g,i=>e[i]??i)},q=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.platform)?"\u2318":"Ctrl",c=(t,e)=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,e)},d=(t,e)=>{typeof customElements>"u"||customElements.get(t)||customElements.define(t,class extends e{})};var oe={"alert-circle":'<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',"alert-triangle":'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',"arrow-left":'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',"arrow-right":'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',"arrow-up-right":'<path d="M7 7h10v10"/><path d="M7 17 17 7"/>',"bar-chart":'<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>',bell:'<path d="M10.268 21a2 2 0 0 0 3.464 0"/><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/>',bold:'<path d="M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"/>',bolt:'<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>',brain:'<path d="M12 18V5"/><path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4"/><path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5"/><path d="M17.997 5.125a4 4 0 0 1 2.526 5.77"/><path d="M18 18a4 4 0 0 0 2-7.464"/><path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517"/><path d="M6 18a4 4 0 0 1-2-7.464"/><path d="M6.003 5.125a4 4 0 0 0-2.526 5.77"/>',bug:'<path d="M12 20v-9"/><path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"/><path d="M14.12 3.88 16 2"/><path d="M21 21a4 4 0 0 0-3.81-4"/><path d="M21 5a4 4 0 0 1-3.55 3.97"/><path d="M22 13h-4"/><path d="M3 21a4 4 0 0 1 3.81-4"/><path d="M3 5a4 4 0 0 0 3.55 3.97"/><path d="M6 13H2"/><path d="m8 2 1.88 1.88"/><path d="M9 7.13V6a3 3 0 1 1 6 0v1.13"/>',building:'<path d="M12 10h.01"/><path d="M12 14h.01"/><path d="M12 6h.01"/><path d="M16 10h.01"/><path d="M16 14h.01"/><path d="M16 6h.01"/><path d="M8 10h.01"/><path d="M8 14h.01"/><path d="M8 6h.01"/><path d="M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"/><rect x="4" y="2" width="16" height="20" rx="2"/>',calendar:'<path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/>',check:'<path d="M20 6 9 17l-5-5"/>',"check-circle":'<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',"chevron-down":'<path d="m6 9 6 6 6-6"/>',"chevron-left":'<path d="m15 18-6-6 6-6"/>',"chevron-right":'<path d="m9 18 6-6-6-6"/>',"chevron-up":'<path d="m18 15-6-6-6 6"/>',chip:'<path d="M12 20v2"/><path d="M12 2v2"/><path d="M17 20v2"/><path d="M17 2v2"/><path d="M2 12h2"/><path d="M2 17h2"/><path d="M2 7h2"/><path d="M20 12h2"/><path d="M20 17h2"/><path d="M20 7h2"/><path d="M7 20v2"/><path d="M7 2v2"/><rect x="4" y="4" width="16" height="16" rx="2"/><rect x="8" y="8" width="8" height="8" rx="1"/>',clock:'<circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/>',cloud:'<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/>',cookie:'<path d="M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5"/><path d="M8.5 8.5v.01"/><path d="M16 15.5v.01"/><path d="M12 12v.01"/><path d="M11 17v.01"/><path d="M7 14v.01"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',"dots-horizontal":'<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="5" cy="12" r="1" fill="currentColor" stroke="none"/>',"dots-vertical":'<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="12" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="12" cy="19" r="1" fill="currentColor" stroke="none"/>',download:'<path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/>',external:'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',eye:'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>',"eye-off":'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>',file:'<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/>',filter:'<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"/>',fingerprint:'<path d="M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"/><path d="M14 13.12c0 2.38 0 6.38-1 8.88"/><path d="M17.29 21.02c.12-.6.43-2.3.5-3.02"/><path d="M2 12a10 10 0 0 1 18-6"/><path d="M2 16h.01"/><path d="M21.8 16c.2-2 .131-5.354 0-6"/><path d="M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2"/><path d="M8.65 22c.21-.66.45-1.32.57-2"/><path d="M9 6.8a6 6 0 0 1 9 5.2v2"/>',folder:'<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',globe:'<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',"grip-vertical":'<circle cx="9" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="9" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="9" cy="19" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="12" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="5" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="19" r="1" fill="currentColor" stroke="none"/>',heart:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/>',home:'<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>',image:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>',info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',insights:'<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="m19 9-5 5-4-4-3 3"/>',italic:'<line x1="19" x2="10" y1="4" y2="4"/><line x1="14" x2="5" y1="20" y2="20"/><line x1="15" x2="9" y1="4" y2="20"/>',key:'<path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"/><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"/>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>',list:'<path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/>',"list-ordered":'<path d="M11 5h10"/><path d="M11 12h10"/><path d="M11 19h10"/><path d="M4 4h1v5"/><path d="M4 9h2"/><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"/>',loader:'<path d="M21 12a9 9 0 1 1-6.219-8.56"/>',lock:'<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',"log-in":'<path d="m10 17 5-5-5-5"/><path d="M15 12H3"/><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/>',"log-out":'<path d="m16 17 5-5-5-5"/><path d="M21 12H9"/><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>',mail:'<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"/><rect x="2" y="4" width="20" height="16" rx="2"/>',menu:'<path d="M4 5h16"/><path d="M4 12h16"/><path d="M4 19h16"/>',minus:'<path d="M5 12h14"/>',moon:'<path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"/>',network:'<rect x="16" y="16" width="6" height="6" rx="1"/><rect x="2" y="16" width="6" height="6" rx="1"/><rect x="9" y="2" width="6" height="6" rx="1"/><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"/><path d="M12 12V8"/>',paperclip:'<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"/>',pencil:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>',phone:'<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"/>',play:'<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" fill="currentColor" stroke="none"/>',plus:'<path d="M5 12h14"/><path d="M12 5v14"/>',policy:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>',refresh:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',rocket:'<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"/><path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"/>',search:'<path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/>',"search-off":'<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',send:'<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/>',server:'<rect width="20" height="8" x="2" y="2" rx="2" ry="2"/><rect width="20" height="8" x="2" y="14" rx="2" ry="2"/><line x1="6" x2="6.01" y1="6" y2="6"/><line x1="6" x2="6.01" y1="18" y2="18"/>',settings:'<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/><circle cx="12" cy="12" r="3"/>',shield:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',ship:'<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',sparkle:'<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"/><path d="M20 2v4"/><path d="M22 4h-4"/><circle cx="4" cy="20" r="2"/>',speed:'<path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/>',star:'<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>',sun:'<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',terminal:'<path d="M12 19h8"/><path d="m4 17 6-6-6-6"/>',trash:'<path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>',"trending-up":'<path d="M16 7h6v6"/><path d="m22 7-8.5 8.5-5-5L2 17"/>',underline:'<path d="M6 4v6a6 6 0 0 0 12 0V4"/><line x1="4" x2="20" y1="20" y2="20"/>',upload:'<path d="M12 3v12"/><path d="m17 8-5-5-5 5"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>',user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',"user-shield":'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M6.376 18.91a6 6 0 0 1 11.249.003"/><circle cx="12" cy="11" r="4"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>'};var se={deml:'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 17V13M12 17V8M16 17V11"/>',"deml-compact":'<rect x="4" y="4" width="16" height="16" rx="3"/><path d="M9 16V12M12 16V9M15 16V13"/>',"deml-lockup":'<rect x="3" y="3" width="18" height="14" rx="2"/><path d="M8 17V13M12 17V8M16 17V11"/><path d="M3 20h18"/>'},le={drakkar:'<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',"drakkar-compact":'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/>',"drakkar-lockup":'<path d="M12 10.189V14"/><path d="M12 2v3"/><path d="M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6"/><path d="M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76"/><path d="M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"/><path d="M3 21h18"/>'},pe={deml:'<path d="M5 4a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4zM8 13h2.5v4H8v-4zM12 8h2.5v9H12V8zM16 11h2.5v6H16v-6z"/>',"deml-compact":'<path d="M6 5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5zM9 12h1.5v4H9v-4zM12 9h1.5v7H12V9zM15 11h1.5v5H15v-5z"/>',"deml-lockup":'<path d="M4 4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4zM8 13h2.5v4H8v-4zM12 8h2.5v9H12V8zM16 11h2.5v6H16v-6z"/><rect x="3" y="19" width="18" height="2" rx="1"/>'},ue={drakkar:'<path d="M7 5h10a2 2 0 0 1 2 2v3.5L20.8 14.2l-7.8-3.5a1.8 1.8 0 0 0-1.4 0L3.2 14.2a10.5 10.5 0 0 0 2.6 7.2L5.2 13V7a2 2 0 0 0-2-2z"/><rect x="10.85" y="2" width="2.3" height="12" rx="0.4"/>',"drakkar-compact":'<path d="M3 3h18a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M7.5 12.5 12 9.8l4.5 2.7v2.2c0 .8-.5 1.4-1.2 1.7L12 17.8l-3.3-1.6c-.7-.3-1.2-.9-1.2-1.7v-2.2z"/><rect x="11" y="6" width="2" height="5.5" rx="0.35"/>',"drakkar-lockup":'<path d="M7 5h10a2 2 0 0 1 2 2v3.5L20.8 14.2l-7.8-3.5a1.8 1.8 0 0 0-1.4 0L3.2 14.2a10.5 10.5 0 0 0 2.6 7.2L5.2 13V7a2 2 0 0 0-2-2z"/><rect x="10.85" y="2" width="2.3" height="12" rx="0.4"/><rect x="3" y="20" width="18" height="2" rx="1"/>'},ke=Object.keys(se),Nt=Object.keys(le);var me={kubernetes:"#326CE5",tensorflow:"#FF6F00",pytorch:"#EE4C2C","apache-spark":"#E25A1C",databricks:"#FF3621","aws-redshift":"#8C4FFF"},$t=Object.keys(me);var be={kubernetes:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-.5-.623h-.804l-.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-.52.123-.736-.172-.216-.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-.555-.5-.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z",tensorflow:"M1.292 5.856L11.54 0v24l-4.095-2.378V7.603l-6.168 3.564.015-5.31zm21.43 5.311l-.014-5.31L12.46 0v24l4.095-2.378V14.87l3.092 1.788-.018-4.618-3.074-1.756V7.603l6.168 3.564z",pytorch:"M12.005 0L4.952 7.053a9.865 9.865 0 000 14.022 9.866 9.866 0 0014.022 0c3.984-3.9 3.986-10.205.085-14.023l-1.744 1.743c2.904 2.905 2.904 7.634 0 10.538s-7.634 2.904-10.538 0-2.904-7.634 0-10.538l4.647-4.646.582-.665zm3.568 3.899a1.327 1.327 0 00-1.327 1.327 1.327 1.327 0 001.327 1.328A1.327 1.327 0 0016.9 5.226 1.327 1.327 0 0015.573 3.9z","apache-spark":"M10.812 0c-.425.013-.845.215-1.196.605a3.593 3.593 0 00-.493.722c-.355.667-.425 1.415-.556 2.143a551.9 551.9 0 00-.726 4.087c-.027.16-.096.227-.244.273C5.83 8.386 4.06 8.94 2.3 9.514c-.387.125-.773.289-1.114.506-1.042.665-1.196 1.753-.415 2.71.346.422.79.715 1.284.936 1.1.49 2.202.976 3.3 1.47.019.01.036.013.053.019h-.004l1.306.535c0 .023.002.045 0 .073-.2 2.03-.39 4.063-.58 6.095-.04.419-.012.831.134 1.23.317.87 1.065 1.148 1.881.701.372-.204.666-.497.937-.818 1.372-1.623 2.746-3.244 4.113-4.872.111-.133.205-.15.363-.098.349.117.697.231 1.045.347h.001c.02.012.045.02.073.03l.142.042c1.248.416 2.68.775 3.929 1.19.4.132.622.164 1.045.098.311-.048.592-.062.828-.236.602-.33.995-.957.988-1.682-.005-.427-.154-.813-.35-1.186-.82-1.556-1.637-3.113-2.461-4.666-.078-.148-.076-.243.037-.375 1.381-1.615 2.756-3.236 4.133-4.855.272-.32.513-.658.653-1.058.308-.878-.09-1.57-1-1.741a2.783 2.783 0 00-1.235.069c-1.974.521-3.947 1.041-5.918 1.57-.175.047-.26.015-.355-.144a353.08 353.08 0 00-2.421-4.018 4.61 4.61 0 00-.652-.849c-.371-.37-.802-.549-1.227-.536zm.172 3.703a.592.592 0 01.189.211c.87 1.446 1.742 2.89 2.609 4.338.07.118.135.16.277.121 1.525-.41 3.052-.813 4.579-1.217.367-.098.735-.193 1.103-.289a.399.399 0 01-.1.2c-1.259 1.48-2.516 2.962-3.779 4.438-.11.13-.12.22-.04.37.937 1.803 1.768 3.309 2.498 4.76l-3.696-1.019c-.538-.18-1.077-.358-1.615-.539-.163-.055-.25-.03-.36.1-1.248 1.488-2.504 2.97-3.759 4.454a.398.398 0 01-.18.132c.035-.378.068-.757.104-1.136.149-1.572.297-3.144.451-4.716-.03-.318.117-.405-.322-.545-1.493-.593-3.346-1.321-4.816-1.905a.595.595 0 01.24-.134c1.797-.57 3.595-1.14 5.394-1.705.127-.04.199-.092.211-.233.013-.148.05-.294.076-.441.241-1.363.483-2.726.726-4.088.068-.386.14-.771.21-1.157z",databricks:"M.95 14.184L12 20.403l9.919-5.55v2.21L12 22.662l-10.484-5.96-.565.308v.77L12 24l11.05-6.218v-4.317l-.515-.309L12 19.118l-9.867-5.653v-2.21L12 16.805l11.05-6.218V6.32l-.515-.308L12 11.974 2.647 6.681 12 1.388l7.76 4.368.668-.411v-.566L12 0 .95 6.27v.72L12 13.207l9.919-5.55v2.26L12 15.52 1.516 9.56l-.565.308Z","aws-redshift":"M16.639 9.932a.822.822 0 0 1-.822-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.823.82m-2.086 4.994a.823.823 0 0 1-.822-.822.822.822 0 0 1 1.645 0 .822.822 0 0 1-.823.822m-5.004-.833a.822.822 0 1 1 .002-1.644.822.822 0 0 1-.002 1.644m-2.083 4.578a.823.823 0 0 1-.823-.82.823.823 0 0 1 1.645 0c0 .452-.37.82-.822.82m9.173-11.236a1.68 1.68 0 0 0-1.68 1.676c0 .566.285 1.066.718 1.37l-.782 1.982a1.674 1.674 0 0 0-1.923 1.104l-1.753-.398a1.675 1.675 0 0 0-3.348.103c0 .432.169.823.438 1.12l-.764 1.79c-.028-.001-.053-.008-.08-.008a1.68 1.68 0 0 0-1.68 1.676 1.68 1.68 0 0 0 3.36 0c0-.593-.312-1.112-.778-1.41l.674-1.579c.161.052.33.088.508.088.661 0 1.228-.386 1.502-.94l1.856.42a1.68 1.68 0 0 0 3.327-.325c0-.5-.224-.943-.574-1.25l.822-2.083c.053.005.104.016.157.016a1.68 1.68 0 0 0 1.68-1.676 1.68 1.68 0 0 0-1.68-1.676M12 23.145c-4.17 0-7.286-1.252-7.286-2.37V4.79C6.14 5.938 9.131 6.547 12 6.547c2.869 0 5.86-.609 7.286-1.756v15.983c0 1.12-3.116 2.37-7.286 2.37M12 .856c4.293 0 7.286 1.274 7.286 2.419 0 1.143-2.993 2.418-7.286 2.418-4.293 0-7.286-1.275-7.286-2.418C4.714 2.129 7.707.855 12 .855m8.143 2.419C20.143 1.147 15.947 0 12 0 8.052 0 3.857 1.147 3.857 3.274l.002.01h-.002v17.49C3.857 22.87 8.052 24 12 24c3.947 0 8.143-1.13 8.143-3.226V3.284h-.002l.002-.01"},N=t=>{let e=me[t],i=be[t];return`<path fill="${e}" d="${i}"/>`},Ot={kubernetes:N("kubernetes"),tensorflow:N("tensorflow"),pytorch:N("pytorch"),"apache-spark":N("apache-spark"),databricks:N("databricks"),"aws-redshift":N("aws-redshift")},fe=Object.fromEntries(Object.entries(be).map(([t,e])=>[t,`<path d="${e}"/>`]));var je={hub:'<circle cx="12" cy="12" r="3"/><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1"/>',model:'<rect x="4" y="8" width="16" height="10" rx="2"/><path d="M8 8V6a4 4 0 0 1 8 0v2"/>',google:'<path d="M12 11.2v2.4h6.6c-.3 1.5-1.8 4.4-6.6 4.4-4 0-7.2-3.3-7.2-7.3S8 3.4 12 3.4c2.3 0 3.9 1 4.8 1.8l3.2-3.1C17.5.8 14.9 0 12 0 5.4 0 0 5.4 0 12s5.4 12 12 12c6.9 0 11.5-4.8 11.5-11.6 0-.8-.1-1.4-.2-1.9H12z"/>',apple:'<path d="M16.365 12.14c.02 2.53 2.21 3.38 2.23 3.39-.02.07-.35 1.21-1.16 2.4-.7 1.02-1.43 2.03-2.58 2.05-1.13.02-1.49-.67-2.78-.67-1.29 0-1.69.65-2.75.69-1.11.04-1.95-1.12-2.66-2.13-1.44-2.08-2.54-5.87-1.07-8.43.73-1.27 2.04-2.08 3.46-2.1 1.08-.02 2.1.72 2.78.72.67 0 2.14-.89 3.61-.76.61.03 2.33.25 3.44 1.88-.09.06-2.05 1.2-2.03 3.55M13.75 3.64c.59-.71 1-1.7.89-2.68-.86.03-1.9.57-2.52 1.28-.55.63-1.03 1.65-.9 2.62.95.07 1.92-.49 2.53-1.22"/>'},R={...oe,...se,...le,...fe,...je},ye={...pe,...ue},Ye={analytics:"deml",security:"shield",link:"link",visibility:"eye",shield:"shield",trending_up:"trending-up",lock:"lock",fingerprint:"fingerprint",gpp_maybe:"shield",verified_user:"user-shield",bolt:"bolt",cloud:"cloud",lan:"network",hub:"hub",speed:"speed",rocket_launch:"rocket",insights:"insights",check:"check",description:"file",vpn_key:"key",policy:"policy",bug_report:"bug",search:"search",chevron_left:"chevron-left",chevron_right:"chevron-right",verified:"check-circle",warning:"alert-triangle",close:"x",account_balance:"building",send:"send",check_circle:"check-circle",play_circle:"play",input:"terminal",model_training:"model",auto_awesome:"sparkle",error_outline:"alert-circle",home:"home",cookie:"cookie",search_off:"search-off",person_add:"user",storage:"aws-redshift",data_object:"aws-redshift",memory:"tensorflow",psychology:"pytorch",dns:"server",login:"log-in"},xe=["play","dots-horizontal","dots-vertical","grip-vertical"],Gt=["google","apple",...ke];var Xe=new Set(Object.keys(R)),we=t=>{let e=t.trim().toLowerCase().replace(/\s+/g,"_");if(Xe.has(e))return e;let i=Ye[e];return i||"info"},qt=Object.keys(R),Wt=Object.keys(oe);var Ze=new Set(xe),g=(t,e=16,i="viking-wc-icon")=>{let r=we(t),n=Ze.has(r),o=n?ye[r]??R[r]:R[r];return n?`<svg class="${i}" width="${e}" height="${e}" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd" aria-hidden="true">${o}</svg>`:`<svg class="${i}" width="${e}" height="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${o}</svg>`},W={accent:"info",secondary:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle",info:"info",muted:"info",subtle:"info"};var Ee=`
|
|
2
|
+
:host {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
font-family: var(--viking-font-family);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host([full-width]) {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host([full-width]) .viking-btn {
|
|
13
|
+
width: 100%;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([compact]) .viking-btn {
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([square]) {
|
|
22
|
+
flex: 0 0 auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.viking-btn {
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
font-size: var(--viking-font-size-ui, var(--viking-font-size-sm));
|
|
28
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
29
|
+
letter-spacing: var(--viking-letter-spacing-wide);
|
|
30
|
+
line-height: var(--viking-line-height-snug);
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
gap: var(--viking-space-1);
|
|
35
|
+
min-height: var(--viking-control-height);
|
|
36
|
+
padding: 0 var(--viking-control-padding-x);
|
|
37
|
+
border-radius: var(--viking-radius);
|
|
38
|
+
border: 1px solid transparent;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
transition: var(--viking-transition-interactive);
|
|
42
|
+
width: auto;
|
|
43
|
+
min-width: var(--viking-btn-min-width, 120px);
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
position: relative;
|
|
46
|
+
user-select: none;
|
|
47
|
+
-webkit-tap-highlight-color: transparent;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.viking-btn:focus-visible {
|
|
52
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
53
|
+
outline-offset: var(--viking-ring-offset);
|
|
54
|
+
z-index: 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.viking-btn:disabled,
|
|
58
|
+
.viking-btn[aria-busy='true'] {
|
|
59
|
+
opacity: var(--viking-state-disabled-opacity);
|
|
60
|
+
cursor: not-allowed;
|
|
61
|
+
transform: none !important;
|
|
62
|
+
box-shadow: none !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.viking-btn-sm {
|
|
66
|
+
min-height: var(--viking-control-height-sm);
|
|
67
|
+
padding: 0 var(--viking-space-2);
|
|
68
|
+
font-size: var(--viking-font-size-xs);
|
|
69
|
+
min-width: auto;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.viking-btn-xs {
|
|
73
|
+
min-height: var(--viking-control-height-xs);
|
|
74
|
+
padding: 0 var(--viking-space-1);
|
|
75
|
+
font-size: var(--viking-font-size-xs);
|
|
76
|
+
min-width: auto;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.viking-btn-square {
|
|
80
|
+
display: inline-grid;
|
|
81
|
+
place-items: center;
|
|
82
|
+
width: var(--viking-control-height);
|
|
83
|
+
min-width: var(--viking-control-height);
|
|
84
|
+
max-width: var(--viking-control-height);
|
|
85
|
+
height: var(--viking-control-height);
|
|
86
|
+
min-height: var(--viking-control-height);
|
|
87
|
+
padding: 0;
|
|
88
|
+
line-height: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.viking-btn-square.viking-btn-sm {
|
|
92
|
+
width: var(--viking-control-height-sm);
|
|
93
|
+
min-width: var(--viking-control-height-sm);
|
|
94
|
+
max-width: var(--viking-control-height-sm);
|
|
95
|
+
height: var(--viking-control-height-sm);
|
|
96
|
+
min-height: var(--viking-control-height-sm);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.viking-btn-square.viking-btn-xs {
|
|
100
|
+
width: var(--viking-control-height-xs);
|
|
101
|
+
min-width: var(--viking-control-height-xs);
|
|
102
|
+
max-width: var(--viking-control-height-xs);
|
|
103
|
+
height: var(--viking-control-height-xs);
|
|
104
|
+
min-height: var(--viking-control-height-xs);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.viking-btn-square .viking-btn-label {
|
|
108
|
+
display: inline-grid;
|
|
109
|
+
place-items: center;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
line-height: 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.viking-btn-square ::slotted(*) {
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
margin: 0;
|
|
120
|
+
line-height: 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.viking-btn-square ::slotted(svg),
|
|
124
|
+
.viking-btn-square ::slotted([data-viking-icon]) {
|
|
125
|
+
width: var(--viking-icon-size-md, 20px);
|
|
126
|
+
height: var(--viking-icon-size-md, 20px);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.viking-btn-outline {
|
|
130
|
+
background: var(--viking-surface);
|
|
131
|
+
color: var(--viking-text);
|
|
132
|
+
border-color: var(--viking-border-strong);
|
|
133
|
+
box-shadow: var(--viking-shadow-sm);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.viking-btn-outline:hover:not(:disabled):not([aria-busy='true']) {
|
|
137
|
+
background: var(--viking-surface-alt);
|
|
138
|
+
border-color: color-mix(in srgb, var(--viking-accent) 45%, var(--viking-border-strong));
|
|
139
|
+
box-shadow: var(--viking-shadow-md);
|
|
140
|
+
transform: translateY(var(--viking-state-hover-lift));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.viking-btn-primary {
|
|
144
|
+
background: var(--viking-accent);
|
|
145
|
+
color: var(--viking-accent-content);
|
|
146
|
+
border-color: color-mix(in srgb, var(--viking-accent) 82%, var(--viking-black));
|
|
147
|
+
box-shadow: var(--viking-shadow-sm);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.viking-btn-primary:hover:not(:disabled):not([aria-busy='true']) {
|
|
151
|
+
background: var(--viking-accent-hover);
|
|
152
|
+
border-color: var(--viking-accent-hover);
|
|
153
|
+
box-shadow: var(--viking-shadow-hover);
|
|
154
|
+
transform: translateY(var(--viking-state-hover-lift));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.viking-btn-secondary {
|
|
158
|
+
background: var(--viking-accent-secondary);
|
|
159
|
+
color: var(--viking-accent-secondary-content);
|
|
160
|
+
border-color: color-mix(in srgb, var(--viking-accent-secondary) 82%, var(--viking-black));
|
|
161
|
+
box-shadow: var(--viking-shadow-sm);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.viking-btn-secondary:hover:not(:disabled):not([aria-busy='true']) {
|
|
165
|
+
background: var(--viking-accent-secondary-hover);
|
|
166
|
+
border-color: var(--viking-accent-secondary-hover);
|
|
167
|
+
box-shadow: var(--viking-shadow-hover);
|
|
168
|
+
transform: translateY(var(--viking-state-hover-lift));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.viking-btn-filled {
|
|
172
|
+
background: var(--viking-surface-alt);
|
|
173
|
+
color: var(--viking-text);
|
|
174
|
+
border-color: var(--viking-border);
|
|
175
|
+
box-shadow: var(--viking-shadow-xs);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.viking-btn-filled:hover:not(:disabled):not([aria-busy='true']) {
|
|
179
|
+
border-color: color-mix(in srgb, var(--viking-accent) 45%, var(--viking-border));
|
|
180
|
+
background: color-mix(in srgb, var(--viking-accent) 8%, var(--viking-surface-alt));
|
|
181
|
+
box-shadow: var(--viking-shadow-sm);
|
|
182
|
+
transform: translateY(var(--viking-state-hover-lift));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.viking-btn-danger {
|
|
186
|
+
background: var(--viking-danger);
|
|
187
|
+
color: var(--viking-on-danger);
|
|
188
|
+
border-color: color-mix(in srgb, var(--viking-danger) 85%, var(--viking-black));
|
|
189
|
+
box-shadow: var(--viking-shadow-sm);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.viking-btn-danger:hover:not(:disabled):not([aria-busy='true']) {
|
|
193
|
+
background: color-mix(in srgb, var(--viking-danger) 88%, var(--viking-white));
|
|
194
|
+
box-shadow: var(--viking-shadow-hover);
|
|
195
|
+
transform: translateY(var(--viking-state-hover-lift));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.viking-btn-ghost {
|
|
199
|
+
background: transparent;
|
|
200
|
+
color: var(--viking-text);
|
|
201
|
+
min-width: auto;
|
|
202
|
+
box-shadow: none;
|
|
203
|
+
border-color: transparent;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.viking-btn-ghost:hover:not(:disabled):not([aria-busy='true']) {
|
|
207
|
+
background: var(--viking-accent-soft);
|
|
208
|
+
color: var(--viking-accent-strong);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.viking-btn-subtle {
|
|
212
|
+
background: transparent;
|
|
213
|
+
color: var(--viking-text-muted);
|
|
214
|
+
border-color: var(--viking-border-subtle);
|
|
215
|
+
min-width: auto;
|
|
216
|
+
box-shadow: none;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.viking-btn-subtle:hover:not(:disabled):not([aria-busy='true']) {
|
|
220
|
+
color: var(--viking-text);
|
|
221
|
+
background: var(--viking-accent-soft);
|
|
222
|
+
border-color: var(--viking-border-strong);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.viking-btn:active:not(:disabled):not([aria-busy='true']) {
|
|
226
|
+
transform: translateY(0) scale(var(--viking-state-active-scale));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.viking-btn-label {
|
|
230
|
+
display: inline-flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
line-height: inherit;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.viking-btn-spinner {
|
|
236
|
+
width: 1.125rem;
|
|
237
|
+
height: 1.125rem;
|
|
238
|
+
border: 2px solid currentColor;
|
|
239
|
+
border-right-color: transparent;
|
|
240
|
+
border-radius: 50%;
|
|
241
|
+
animation: viking-spin 0.8s linear infinite;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@keyframes viking-spin {
|
|
245
|
+
to { transform: rotate(360deg); }
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media (prefers-reduced-motion: reduce) {
|
|
249
|
+
.viking-btn-spinner { animation-duration: 0.01ms; }
|
|
250
|
+
.viking-btn { transition-duration: 0.01ms; }
|
|
251
|
+
}
|
|
252
|
+
`,Se=`
|
|
253
|
+
:host {
|
|
254
|
+
display: block;
|
|
255
|
+
font-family: var(--viking-font-family);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.viking-input-shell {
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
gap: var(--viking-space-1);
|
|
262
|
+
min-height: var(--viking-control-height);
|
|
263
|
+
padding: 0 var(--viking-space-2);
|
|
264
|
+
font-family: inherit;
|
|
265
|
+
font-size: var(--viking-font-size);
|
|
266
|
+
color: var(--viking-text);
|
|
267
|
+
background: var(--viking-surface-alt);
|
|
268
|
+
border: 1px solid var(--viking-border);
|
|
269
|
+
border-radius: var(--viking-radius-sm);
|
|
270
|
+
box-shadow: var(--viking-shadow-xs);
|
|
271
|
+
transition: var(--viking-transition-interactive);
|
|
272
|
+
width: 100%;
|
|
273
|
+
min-width: 0;
|
|
274
|
+
box-sizing: border-box;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.viking-input-shell:hover:not(.viking-disabled):not(.viking-loading) {
|
|
278
|
+
border-color: color-mix(in srgb, var(--viking-accent) 35%, var(--viking-border-strong));
|
|
279
|
+
box-shadow: var(--viking-shadow-sm);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.viking-input-shell:focus-within:not(.viking-loading) {
|
|
283
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
284
|
+
outline-offset: var(--viking-ring-offset);
|
|
285
|
+
border-color: var(--viking-accent);
|
|
286
|
+
box-shadow: var(--viking-shadow-sm);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.viking-input-shell.viking-disabled,
|
|
290
|
+
.viking-input-shell.viking-loading {
|
|
291
|
+
opacity: var(--viking-state-disabled-opacity);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.viking-input-shell.viking-loading {
|
|
295
|
+
cursor: wait;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.viking-input-native {
|
|
299
|
+
flex: 1;
|
|
300
|
+
min-width: 0;
|
|
301
|
+
width: 100%;
|
|
302
|
+
border: none;
|
|
303
|
+
outline: none !important;
|
|
304
|
+
background: transparent;
|
|
305
|
+
color: var(--viking-text);
|
|
306
|
+
font-family: inherit;
|
|
307
|
+
font-size: inherit;
|
|
308
|
+
padding: 0;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.viking-input-native::placeholder {
|
|
312
|
+
color: var(--viking-text-muted);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
input {
|
|
316
|
+
flex: 1;
|
|
317
|
+
min-width: 0;
|
|
318
|
+
border: none;
|
|
319
|
+
outline: none !important;
|
|
320
|
+
background: transparent;
|
|
321
|
+
color: var(--viking-text);
|
|
322
|
+
font-family: inherit;
|
|
323
|
+
font-size: inherit;
|
|
324
|
+
padding: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
input::placeholder {
|
|
328
|
+
color: var(--viking-text-muted);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
input:disabled {
|
|
332
|
+
cursor: not-allowed;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.viking-input-clear {
|
|
336
|
+
display: inline-flex;
|
|
337
|
+
align-items: center;
|
|
338
|
+
justify-content: center;
|
|
339
|
+
min-width: var(--viking-touch-target-comfort, 44px);
|
|
340
|
+
min-height: var(--viking-touch-target-comfort, 44px);
|
|
341
|
+
border: none;
|
|
342
|
+
background: transparent;
|
|
343
|
+
color: var(--viking-text-muted);
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
padding: var(--viking-space-half);
|
|
346
|
+
border-radius: var(--viking-radius-pill);
|
|
347
|
+
transition: var(--viking-transition-interactive);
|
|
348
|
+
flex-shrink: 0;
|
|
349
|
+
-webkit-tap-highlight-color: transparent;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.viking-input-clear:hover {
|
|
353
|
+
color: var(--viking-text);
|
|
354
|
+
background: var(--viking-accent-soft);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.viking-input-clear:focus-visible {
|
|
358
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
359
|
+
outline-offset: var(--viking-ring-offset);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.viking-input-spinner {
|
|
363
|
+
width: 1rem;
|
|
364
|
+
height: 1rem;
|
|
365
|
+
border: 2px solid var(--viking-text-muted);
|
|
366
|
+
border-right-color: transparent;
|
|
367
|
+
border-radius: 50%;
|
|
368
|
+
animation: viking-spin 0.8s linear infinite;
|
|
369
|
+
flex-shrink: 0;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@keyframes viking-spin {
|
|
373
|
+
to { transform: rotate(360deg); }
|
|
374
|
+
}
|
|
375
|
+
`,Ie=`
|
|
376
|
+
:host {
|
|
377
|
+
display: block;
|
|
378
|
+
font-family: var(--viking-font-family);
|
|
379
|
+
color: var(--viking-text);
|
|
380
|
+
min-width: 0;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
:host([hidden]) {
|
|
384
|
+
display: none;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
:host([width='full']) {
|
|
388
|
+
width: 100%;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:host([width='half']) {
|
|
392
|
+
width: 100%;
|
|
393
|
+
max-width: var(--viking-select-half-max-width, min(100%, 24rem));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.viking-field {
|
|
397
|
+
display: flex;
|
|
398
|
+
flex-direction: column;
|
|
399
|
+
gap: var(--viking-space-1);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.viking-field-label-row {
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: baseline;
|
|
405
|
+
justify-content: space-between;
|
|
406
|
+
gap: var(--viking-space-2);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.viking-field-label {
|
|
410
|
+
display: inline-flex;
|
|
411
|
+
align-items: center;
|
|
412
|
+
gap: var(--viking-space-half);
|
|
413
|
+
font-size: var(--viking-font-size-ui);
|
|
414
|
+
font-weight: var(--viking-font-weight-bold);
|
|
415
|
+
color: var(--viking-text);
|
|
416
|
+
line-height: var(--viking-line-height-snug);
|
|
417
|
+
cursor: pointer;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.viking-field-required {
|
|
421
|
+
color: var(--viking-danger-text);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.viking-field-control {
|
|
425
|
+
min-width: 0;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.viking-field-description,
|
|
429
|
+
.viking-field-error {
|
|
430
|
+
margin: 0;
|
|
431
|
+
font-size: var(--viking-font-size-xs);
|
|
432
|
+
line-height: var(--viking-line-height-relaxed);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.viking-field-description {
|
|
436
|
+
color: var(--viking-text-muted);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.viking-field-error {
|
|
440
|
+
color: var(--viking-danger-text);
|
|
441
|
+
}
|
|
442
|
+
`,_e=`
|
|
443
|
+
:host {
|
|
444
|
+
display: inline-flex;
|
|
445
|
+
align-items: center;
|
|
446
|
+
gap: var(--viking-space-half);
|
|
447
|
+
padding: var(--viking-space-half) var(--viking-space-1);
|
|
448
|
+
font-family: var(--viking-font-family);
|
|
449
|
+
font-size: var(--viking-font-size-xs);
|
|
450
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
451
|
+
letter-spacing: var(--viking-letter-spacing-wide);
|
|
452
|
+
line-height: var(--viking-line-height-snug);
|
|
453
|
+
border-radius: var(--viking-radius-pill);
|
|
454
|
+
border: 1px solid var(--viking-border);
|
|
455
|
+
background: var(--viking-surface-alt);
|
|
456
|
+
color: var(--viking-text);
|
|
457
|
+
white-space: nowrap;
|
|
458
|
+
transition: var(--viking-transition-interactive);
|
|
459
|
+
box-shadow: var(--viking-shadow-xs);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
:host([size='sm']) {
|
|
463
|
+
padding: 0 var(--viking-space-1);
|
|
464
|
+
font-size: var(--viking-font-size-2xs);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
:host([tone='accent']) {
|
|
468
|
+
background: var(--viking-accent);
|
|
469
|
+
border-color: color-mix(in srgb, var(--viking-accent) 80%, var(--viking-black));
|
|
470
|
+
color: var(--viking-accent-content);
|
|
471
|
+
box-shadow: var(--viking-shadow-sm);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
:host([tone='secondary']) {
|
|
475
|
+
background: color-mix(in srgb, var(--viking-accent-secondary) 16%, var(--viking-surface));
|
|
476
|
+
border-color: color-mix(in srgb, var(--viking-accent-secondary) 55%, transparent);
|
|
477
|
+
color: var(--viking-accent-secondary);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
:host([tone='success']) {
|
|
481
|
+
background: color-mix(in srgb, var(--viking-success) 16%, var(--viking-surface));
|
|
482
|
+
border-color: color-mix(in srgb, var(--viking-success) 55%, transparent);
|
|
483
|
+
color: var(--viking-success);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
:host([tone='warning']) {
|
|
487
|
+
background: color-mix(in srgb, var(--viking-warning) 18%, var(--viking-surface));
|
|
488
|
+
border-color: color-mix(in srgb, var(--viking-warning) 55%, transparent);
|
|
489
|
+
color: var(--viking-warning);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
:host([tone='danger']) {
|
|
493
|
+
background: color-mix(in srgb, var(--viking-danger) 14%, var(--viking-surface));
|
|
494
|
+
border-color: color-mix(in srgb, var(--viking-danger) 50%, transparent);
|
|
495
|
+
color: var(--viking-danger-text);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
:host([tone='info']) {
|
|
499
|
+
background: color-mix(in srgb, var(--viking-info) 14%, var(--viking-surface));
|
|
500
|
+
border-color: color-mix(in srgb, var(--viking-info) 50%, transparent);
|
|
501
|
+
color: var(--viking-info);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
:host([tone='muted']),
|
|
505
|
+
:host([tone='subtle']) {
|
|
506
|
+
color: var(--viking-text-muted);
|
|
507
|
+
background: var(--viking-surface);
|
|
508
|
+
border-color: var(--viking-border-subtle);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.viking-wc-icon {
|
|
512
|
+
flex-shrink: 0;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.viking-badge-remove {
|
|
516
|
+
display: inline-flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
justify-content: center;
|
|
519
|
+
min-width: var(--viking-touch-target-comfort, 44px);
|
|
520
|
+
min-height: var(--viking-touch-target-comfort, 44px);
|
|
521
|
+
border: none;
|
|
522
|
+
background: transparent;
|
|
523
|
+
color: currentColor;
|
|
524
|
+
cursor: pointer;
|
|
525
|
+
padding: var(--viking-space-half);
|
|
526
|
+
border-radius: var(--viking-radius-pill);
|
|
527
|
+
transition: var(--viking-transition-interactive);
|
|
528
|
+
margin-left: calc(var(--viking-space-half) * -1);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.viking-badge-remove:hover {
|
|
532
|
+
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.viking-badge-remove:focus-visible {
|
|
536
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
537
|
+
outline-offset: var(--viking-ring-offset);
|
|
538
|
+
}
|
|
539
|
+
`,Me=`
|
|
540
|
+
:host {
|
|
541
|
+
display: block;
|
|
542
|
+
font-family: var(--viking-font-family);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
:host([hidden]) {
|
|
546
|
+
display: none;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.viking-callout {
|
|
550
|
+
display: flex;
|
|
551
|
+
align-items: flex-start;
|
|
552
|
+
gap: var(--viking-space-2);
|
|
553
|
+
padding: var(--viking-space-2);
|
|
554
|
+
border-radius: var(--viking-radius-lg);
|
|
555
|
+
border: 1px solid var(--viking-border);
|
|
556
|
+
border-left-width: 3px;
|
|
557
|
+
background: var(--viking-surface-alt);
|
|
558
|
+
color: var(--viking-text);
|
|
559
|
+
font-size: var(--viking-font-size-sm);
|
|
560
|
+
box-shadow: var(--viking-shadow-sm);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.viking-callout-icon {
|
|
564
|
+
flex-shrink: 0;
|
|
565
|
+
margin-top: 2px;
|
|
566
|
+
color: var(--viking-text-muted);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.viking-callout-body {
|
|
570
|
+
flex: 1;
|
|
571
|
+
min-width: 0;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.viking-callout-heading {
|
|
575
|
+
margin: 0 0 var(--viking-space-half);
|
|
576
|
+
font-size: var(--viking-font-size-ui);
|
|
577
|
+
font-weight: var(--viking-font-weight-bold);
|
|
578
|
+
color: var(--viking-text);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.viking-callout-text {
|
|
582
|
+
margin: 0;
|
|
583
|
+
color: var(--viking-text);
|
|
584
|
+
line-height: var(--viking-line-height-relaxed);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.viking-callout-close {
|
|
588
|
+
display: inline-flex;
|
|
589
|
+
align-items: center;
|
|
590
|
+
justify-content: center;
|
|
591
|
+
min-width: var(--viking-touch-target-comfort, 44px);
|
|
592
|
+
min-height: var(--viking-touch-target-comfort, 44px);
|
|
593
|
+
border: none;
|
|
594
|
+
background: transparent;
|
|
595
|
+
color: var(--viking-text-muted);
|
|
596
|
+
cursor: pointer;
|
|
597
|
+
padding: var(--viking-space-half);
|
|
598
|
+
border-radius: var(--viking-radius);
|
|
599
|
+
transition: var(--viking-transition-interactive);
|
|
600
|
+
flex-shrink: 0;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.viking-callout-close:hover {
|
|
604
|
+
color: var(--viking-text);
|
|
605
|
+
background: color-mix(in srgb, currentColor 8%, transparent);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.viking-callout-close:focus-visible {
|
|
609
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
610
|
+
outline-offset: var(--viking-ring-offset);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.viking-callout-accent {
|
|
614
|
+
border-color: var(--viking-accent);
|
|
615
|
+
border-left-color: var(--viking-accent);
|
|
616
|
+
background: var(--viking-accent-soft);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.viking-callout-accent .viking-callout-icon {
|
|
620
|
+
color: var(--viking-accent);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.viking-callout-secondary {
|
|
624
|
+
border-color: color-mix(in srgb, var(--viking-accent-secondary) 45%, transparent);
|
|
625
|
+
border-left-color: var(--viking-accent-secondary);
|
|
626
|
+
background: var(--viking-accent-secondary-soft);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.viking-callout-secondary .viking-callout-icon {
|
|
630
|
+
color: var(--viking-accent-secondary);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.viking-callout-info {
|
|
634
|
+
border-color: color-mix(in srgb, var(--viking-info) 45%, transparent);
|
|
635
|
+
border-left-color: var(--viking-info);
|
|
636
|
+
background: color-mix(in srgb, var(--viking-info) 10%, var(--viking-surface));
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.viking-callout-info .viking-callout-icon {
|
|
640
|
+
color: var(--viking-info);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.viking-callout-success {
|
|
644
|
+
border-color: color-mix(in srgb, var(--viking-success) 45%, transparent);
|
|
645
|
+
border-left-color: var(--viking-success);
|
|
646
|
+
background: color-mix(in srgb, var(--viking-success) 10%, var(--viking-surface));
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.viking-callout-success .viking-callout-icon {
|
|
650
|
+
color: var(--viking-success);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.viking-callout-warning {
|
|
654
|
+
border-color: color-mix(in srgb, var(--viking-warning) 45%, transparent);
|
|
655
|
+
border-left-color: var(--viking-warning);
|
|
656
|
+
background: color-mix(in srgb, var(--viking-warning) 12%, var(--viking-surface));
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.viking-callout-warning .viking-callout-icon {
|
|
660
|
+
color: var(--viking-warning);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.viking-callout-danger {
|
|
664
|
+
border-color: var(--viking-danger);
|
|
665
|
+
border-left-color: var(--viking-danger);
|
|
666
|
+
background: color-mix(in srgb, var(--viking-crimson-600) 22%, var(--viking-surface));
|
|
667
|
+
color: var(--viking-white);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.viking-callout-danger .viking-callout-icon {
|
|
671
|
+
color: var(--viking-crimson-400);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.viking-callout-danger .viking-callout-text {
|
|
675
|
+
color: var(--viking-white);
|
|
676
|
+
}
|
|
677
|
+
`,Ae=`
|
|
678
|
+
:host {
|
|
679
|
+
display: block;
|
|
680
|
+
font-family: var(--viking-font-family);
|
|
681
|
+
min-width: 0;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
:host([width='full']) {
|
|
685
|
+
width: 100%;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
:host([width='half']) {
|
|
689
|
+
width: 100%;
|
|
690
|
+
max-width: var(--viking-select-half-max-width, min(100%, 24rem));
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.viking-field {
|
|
694
|
+
display: flex;
|
|
695
|
+
flex-direction: column;
|
|
696
|
+
gap: var(--viking-space-1);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.viking-field-label {
|
|
700
|
+
font-size: var(--viking-font-size-ui);
|
|
701
|
+
font-weight: var(--viking-font-weight-bold);
|
|
702
|
+
color: var(--viking-text);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.viking-field-description {
|
|
706
|
+
margin: 0;
|
|
707
|
+
font-size: var(--viking-font-size-xs);
|
|
708
|
+
color: var(--viking-text-muted);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.viking-field-error {
|
|
712
|
+
margin: 0;
|
|
713
|
+
font-size: var(--viking-font-size-xs);
|
|
714
|
+
color: var(--viking-danger);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.viking-select-native {
|
|
718
|
+
width: 100%;
|
|
719
|
+
min-height: var(--viking-control-height);
|
|
720
|
+
padding: 0 var(--viking-space-2);
|
|
721
|
+
border: 1px solid var(--viking-border-strong);
|
|
722
|
+
border-radius: var(--viking-radius);
|
|
723
|
+
background: var(--viking-surface);
|
|
724
|
+
color: var(--viking-text);
|
|
725
|
+
font-family: inherit;
|
|
726
|
+
font-size: var(--viking-font-size);
|
|
727
|
+
cursor: pointer;
|
|
728
|
+
transition: var(--viking-transition-interactive);
|
|
729
|
+
box-shadow: var(--viking-shadow-sm);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.viking-select-native:hover:not(:disabled) {
|
|
733
|
+
border-color: var(--viking-accent-strong);
|
|
734
|
+
box-shadow: var(--viking-shadow-md);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.viking-select-native:focus-visible {
|
|
738
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
739
|
+
outline-offset: var(--viking-ring-offset);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.viking-select-native:disabled {
|
|
743
|
+
opacity: var(--viking-state-disabled-opacity);
|
|
744
|
+
cursor: not-allowed;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.viking-select-native[aria-invalid='true'] {
|
|
748
|
+
border-color: var(--viking-danger);
|
|
749
|
+
}
|
|
750
|
+
`,Ce=`
|
|
751
|
+
:host {
|
|
752
|
+
display: contents;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.viking-modal-backdrop {
|
|
756
|
+
position: fixed;
|
|
757
|
+
inset: 0;
|
|
758
|
+
z-index: var(--viking-z-overlay, 10001);
|
|
759
|
+
display: flex;
|
|
760
|
+
align-items: center;
|
|
761
|
+
justify-content: center;
|
|
762
|
+
padding: var(--viking-space-3);
|
|
763
|
+
background: var(--viking-overlay-backdrop);
|
|
764
|
+
backdrop-filter: blur(8px);
|
|
765
|
+
-webkit-backdrop-filter: blur(8px);
|
|
766
|
+
border: none;
|
|
767
|
+
animation: viking-backdrop-in var(--viking-duration-fast) var(--viking-ease-out);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.viking-modal-panel {
|
|
771
|
+
display: flex;
|
|
772
|
+
flex-direction: column;
|
|
773
|
+
gap: var(--viking-space-2);
|
|
774
|
+
width: min(522px, calc(100vw - var(--viking-space-4)));
|
|
775
|
+
max-height: calc(100vh - var(--viking-space-6));
|
|
776
|
+
padding: var(--viking-space-3);
|
|
777
|
+
border: 1px solid var(--viking-border-strong);
|
|
778
|
+
border-radius: var(--viking-radius-lg);
|
|
779
|
+
background: var(--viking-surface);
|
|
780
|
+
color: var(--viking-text);
|
|
781
|
+
box-shadow: var(--viking-shadow-lg);
|
|
782
|
+
font-family: var(--viking-font-family);
|
|
783
|
+
position: relative;
|
|
784
|
+
overflow: hidden;
|
|
785
|
+
animation: viking-modal-in var(--viking-duration) var(--viking-ease-default);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.viking-modal-panel::before {
|
|
789
|
+
content: '';
|
|
790
|
+
position: absolute;
|
|
791
|
+
inset: 0 0 auto;
|
|
792
|
+
height: 1px;
|
|
793
|
+
background: linear-gradient(
|
|
794
|
+
90deg,
|
|
795
|
+
transparent,
|
|
796
|
+
color-mix(in srgb, var(--viking-metallic-200) 22%, transparent),
|
|
797
|
+
transparent
|
|
798
|
+
);
|
|
799
|
+
pointer-events: none;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.viking-modal-header {
|
|
803
|
+
display: flex;
|
|
804
|
+
align-items: flex-start;
|
|
805
|
+
justify-content: space-between;
|
|
806
|
+
gap: var(--viking-space-2);
|
|
807
|
+
padding-bottom: var(--viking-space-1);
|
|
808
|
+
border-bottom: 1px solid var(--viking-border-subtle);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.viking-modal-heading {
|
|
812
|
+
margin: 0;
|
|
813
|
+
font-size: var(--viking-font-size-md);
|
|
814
|
+
font-weight: var(--viking-font-weight-bold);
|
|
815
|
+
letter-spacing: var(--viking-letter-spacing-tight);
|
|
816
|
+
color: var(--viking-text);
|
|
817
|
+
line-height: var(--viking-line-height-tight);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.viking-modal-close {
|
|
821
|
+
display: inline-flex;
|
|
822
|
+
align-items: center;
|
|
823
|
+
justify-content: center;
|
|
824
|
+
min-width: var(--viking-touch-target-comfort, 44px);
|
|
825
|
+
min-height: var(--viking-touch-target-comfort, 44px);
|
|
826
|
+
border: 1px solid transparent;
|
|
827
|
+
background: transparent;
|
|
828
|
+
color: var(--viking-text-muted);
|
|
829
|
+
cursor: pointer;
|
|
830
|
+
border-radius: var(--viking-radius);
|
|
831
|
+
transition: var(--viking-transition-interactive);
|
|
832
|
+
flex-shrink: 0;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.viking-modal-close:hover {
|
|
836
|
+
color: var(--viking-text);
|
|
837
|
+
background: var(--viking-accent-soft);
|
|
838
|
+
border-color: var(--viking-border-subtle);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.viking-modal-close:focus-visible {
|
|
842
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
843
|
+
outline-offset: var(--viking-ring-offset);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.viking-modal-body {
|
|
847
|
+
overflow-y: auto;
|
|
848
|
+
color: var(--viking-text-muted);
|
|
849
|
+
font-size: var(--viking-font-size);
|
|
850
|
+
line-height: var(--viking-line-height-relaxed);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.viking-modal-footer {
|
|
854
|
+
display: flex;
|
|
855
|
+
flex-wrap: wrap;
|
|
856
|
+
gap: var(--viking-space-2);
|
|
857
|
+
justify-content: flex-end;
|
|
858
|
+
padding-top: var(--viking-space-2);
|
|
859
|
+
border-top: 1px solid var(--viking-border-subtle);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.viking-modal-footer:empty {
|
|
863
|
+
display: none;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
@keyframes viking-backdrop-in {
|
|
867
|
+
from { opacity: 0; }
|
|
868
|
+
to { opacity: 1; }
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
@keyframes viking-modal-in {
|
|
872
|
+
from {
|
|
873
|
+
opacity: 0;
|
|
874
|
+
transform: translateY(var(--viking-space-1)) scale(0.98);
|
|
875
|
+
}
|
|
876
|
+
to {
|
|
877
|
+
opacity: 1;
|
|
878
|
+
transform: translateY(0) scale(1);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
@media (prefers-reduced-motion: reduce) {
|
|
883
|
+
.viking-modal-backdrop,
|
|
884
|
+
.viking-modal-panel {
|
|
885
|
+
animation: none;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
`,Le=`
|
|
889
|
+
:host {
|
|
890
|
+
display: contents;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.viking-search-palette-backdrop {
|
|
894
|
+
position: fixed;
|
|
895
|
+
inset: 0;
|
|
896
|
+
z-index: var(--viking-z-overlay, 10001);
|
|
897
|
+
display: flex;
|
|
898
|
+
align-items: flex-start;
|
|
899
|
+
justify-content: center;
|
|
900
|
+
padding: 10vh var(--viking-space-2) var(--viking-space-2);
|
|
901
|
+
background: var(--viking-overlay-backdrop);
|
|
902
|
+
backdrop-filter: blur(8px);
|
|
903
|
+
-webkit-backdrop-filter: blur(8px);
|
|
904
|
+
border: none;
|
|
905
|
+
animation: viking-backdrop-in var(--viking-duration-fast) var(--viking-ease-out);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.viking-search-palette-backdrop:not([open]) {
|
|
909
|
+
display: none !important;
|
|
910
|
+
pointer-events: none;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.viking-search-palette {
|
|
914
|
+
display: flex;
|
|
915
|
+
flex-direction: column;
|
|
916
|
+
background: var(--viking-surface-raised, var(--viking-surface));
|
|
917
|
+
border: 1px solid var(--viking-border-strong);
|
|
918
|
+
border-radius: var(--viking-radius-lg);
|
|
919
|
+
box-shadow: var(--viking-shadow-lg);
|
|
920
|
+
overflow: hidden;
|
|
921
|
+
max-width: 600px;
|
|
922
|
+
width: min(100%, 600px);
|
|
923
|
+
margin: 0 auto;
|
|
924
|
+
font-family: var(--viking-font-family);
|
|
925
|
+
color: var(--viking-text);
|
|
926
|
+
animation: viking-modal-in var(--viking-duration) var(--viking-ease-default);
|
|
927
|
+
position: relative;
|
|
928
|
+
isolation: isolate;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.viking-search-palette::before {
|
|
932
|
+
content: '';
|
|
933
|
+
position: absolute;
|
|
934
|
+
inset: 0 0 auto;
|
|
935
|
+
height: 1px;
|
|
936
|
+
background: linear-gradient(
|
|
937
|
+
90deg,
|
|
938
|
+
transparent,
|
|
939
|
+
color-mix(in srgb, var(--viking-metallic-200) 22%, transparent),
|
|
940
|
+
transparent
|
|
941
|
+
);
|
|
942
|
+
pointer-events: none;
|
|
943
|
+
z-index: 1;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.viking-search-palette-header {
|
|
947
|
+
display: flex;
|
|
948
|
+
align-items: center;
|
|
949
|
+
padding: var(--viking-space-2);
|
|
950
|
+
border-bottom: 1px solid var(--viking-border);
|
|
951
|
+
gap: var(--viking-space-1);
|
|
952
|
+
background: color-mix(in srgb, var(--viking-bg) 26%, var(--viking-surface-raised));
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.viking-search-palette-header:focus-within {
|
|
956
|
+
border-bottom-color: var(--viking-accent);
|
|
957
|
+
box-shadow: inset 0 -2px 0 var(--viking-accent-soft);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.viking-search-palette-icon {
|
|
961
|
+
color: var(--viking-text-muted);
|
|
962
|
+
flex-shrink: 0;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
.viking-search-palette-input {
|
|
966
|
+
flex: 1;
|
|
967
|
+
background: none;
|
|
968
|
+
border: none;
|
|
969
|
+
outline: none;
|
|
970
|
+
font-size: calc(var(--viking-font-size) * 1.05);
|
|
971
|
+
color: var(--viking-text);
|
|
972
|
+
font-family: inherit;
|
|
973
|
+
min-width: 0;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
.viking-search-palette-input::placeholder {
|
|
977
|
+
color: var(--viking-text-muted);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.viking-search-palette-close {
|
|
981
|
+
display: inline-flex;
|
|
982
|
+
align-items: center;
|
|
983
|
+
justify-content: center;
|
|
984
|
+
min-width: var(--viking-touch-target-comfort, 44px);
|
|
985
|
+
min-height: var(--viking-touch-target-comfort, 44px);
|
|
986
|
+
border: none;
|
|
987
|
+
background: transparent;
|
|
988
|
+
color: var(--viking-text-muted);
|
|
989
|
+
cursor: pointer;
|
|
990
|
+
padding: var(--viking-space-half);
|
|
991
|
+
border-radius: var(--viking-radius);
|
|
992
|
+
transition: var(--viking-transition-interactive);
|
|
993
|
+
flex-shrink: 0;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
.viking-search-palette-close:hover {
|
|
997
|
+
color: var(--viking-text);
|
|
998
|
+
background: var(--viking-accent-soft);
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.viking-search-palette-close:focus-visible {
|
|
1002
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
1003
|
+
outline-offset: var(--viking-ring-offset);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.viking-search-palette-body {
|
|
1007
|
+
max-height: 50vh;
|
|
1008
|
+
overflow-y: auto;
|
|
1009
|
+
padding: var(--viking-space-2);
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.viking-search-palette-footer {
|
|
1013
|
+
display: flex;
|
|
1014
|
+
align-items: center;
|
|
1015
|
+
justify-content: center;
|
|
1016
|
+
gap: var(--viking-space-1);
|
|
1017
|
+
padding: var(--viking-space-1) var(--viking-space-2);
|
|
1018
|
+
border-top: 1px solid var(--viking-border);
|
|
1019
|
+
font-size: calc(var(--viking-font-size) * 0.85);
|
|
1020
|
+
color: var(--viking-text-muted);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.viking-kbd {
|
|
1024
|
+
display: inline-flex;
|
|
1025
|
+
align-items: center;
|
|
1026
|
+
justify-content: center;
|
|
1027
|
+
min-width: 1.5rem;
|
|
1028
|
+
padding: 2px 6px;
|
|
1029
|
+
font-family: inherit;
|
|
1030
|
+
font-size: calc(var(--viking-font-size) * 0.75);
|
|
1031
|
+
border-radius: calc(var(--viking-radius) / 2);
|
|
1032
|
+
border: 1px solid var(--viking-border);
|
|
1033
|
+
background: var(--viking-surface-alt);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.viking-search-results {
|
|
1037
|
+
display: flex;
|
|
1038
|
+
flex-direction: column;
|
|
1039
|
+
gap: var(--viking-space-1);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.viking-search-group-label {
|
|
1043
|
+
margin: var(--viking-space-1) 0 var(--viking-space-half);
|
|
1044
|
+
padding: 0 var(--viking-space-1);
|
|
1045
|
+
font-size: var(--viking-font-size-2xs);
|
|
1046
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
1047
|
+
letter-spacing: var(--viking-letter-spacing-caps);
|
|
1048
|
+
text-transform: uppercase;
|
|
1049
|
+
color: var(--viking-text-muted);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
.viking-search-result {
|
|
1053
|
+
display: flex;
|
|
1054
|
+
align-items: center;
|
|
1055
|
+
min-height: var(--viking-control-height-sm, 36px);
|
|
1056
|
+
padding: var(--viking-space-1) var(--viking-space-2);
|
|
1057
|
+
border-radius: var(--viking-radius);
|
|
1058
|
+
background: var(--viking-surface-alt);
|
|
1059
|
+
border: 1px solid var(--viking-border-subtle);
|
|
1060
|
+
cursor: pointer;
|
|
1061
|
+
transition: var(--viking-transition-interactive);
|
|
1062
|
+
gap: var(--viking-space-1);
|
|
1063
|
+
text-decoration: none;
|
|
1064
|
+
color: inherit;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.viking-search-result:hover,
|
|
1068
|
+
.viking-search-result.is-selected {
|
|
1069
|
+
background: color-mix(in srgb, var(--viking-accent) 10%, var(--viking-surface-alt));
|
|
1070
|
+
border-color: color-mix(in srgb, var(--viking-accent) 42%, var(--viking-border-strong));
|
|
1071
|
+
box-shadow: var(--viking-shadow-sm);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.viking-search-result:focus-visible {
|
|
1075
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
1076
|
+
outline-offset: var(--viking-ring-offset);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.viking-search-result-title {
|
|
1080
|
+
font-size: var(--viking-font-size-sm);
|
|
1081
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
1082
|
+
color: var(--viking-text);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.viking-search-result-snippet {
|
|
1086
|
+
font-size: var(--viking-font-size-xs);
|
|
1087
|
+
color: var(--viking-text-muted);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
.viking-search-empty {
|
|
1091
|
+
padding: var(--viking-space-3);
|
|
1092
|
+
text-align: center;
|
|
1093
|
+
color: var(--viking-text-muted);
|
|
1094
|
+
font-size: var(--viking-font-size-sm);
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
@keyframes viking-backdrop-in {
|
|
1098
|
+
from { opacity: 0; }
|
|
1099
|
+
to { opacity: 1; }
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
@keyframes viking-modal-in {
|
|
1103
|
+
from {
|
|
1104
|
+
opacity: 0;
|
|
1105
|
+
transform: translateY(var(--viking-space-1)) scale(0.98);
|
|
1106
|
+
}
|
|
1107
|
+
to {
|
|
1108
|
+
opacity: 1;
|
|
1109
|
+
transform: translateY(0) scale(1);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1114
|
+
.viking-search-palette-backdrop,
|
|
1115
|
+
.viking-search-palette {
|
|
1116
|
+
animation: none;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
`;var Qe=new Set(["accent","secondary","success","warning","danger","info","muted","subtle"]),w=class extends l{static tag="viking-badge";static legacyTag="viking-badge-wc";static get observedAttributes(){return["tone","size","icon","removable"]}shadow;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,_e)}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}get tone(){let e=this.getAttribute("tone")??"";return Qe.has(e)?e:null}get size(){return this.getAttribute("size")==="sm"?"sm":null}get removable(){return this.hasAttribute("removable")&&this.getAttribute("removable")!=="false"}onRemove=()=>{this.dispatchEvent(new CustomEvent("viking-removed",{bubbles:!0,composed:!0}))};render(){let e=this.tone;e&&this.getAttribute("tone")!==e?this.setAttribute("tone",e):!e&&this.hasAttribute("tone")&&this.removeAttribute("tone");let i=this.size;i&&this.getAttribute("size")!==i?this.setAttribute("size",i):!i&&this.hasAttribute("size")&&this.removeAttribute("size");let r=this.getAttribute("icon")??(e?W[e]:null),n=r?g(r,16):"";this.shadow.innerHTML=`
|
|
1120
|
+
${n}
|
|
1121
|
+
<span part="label"><slot></slot></span>
|
|
1122
|
+
${this.removable?`<button type="button" class="viking-badge-remove" part="remove" aria-label="Remove">${g("x",14)}</button>`:""}
|
|
1123
|
+
`,this.shadow.querySelector(".viking-badge-remove")?.addEventListener("click",this.onRemove)}},U=()=>{c(w.tag,w),d(w.legacyTag,w)};var Je=new Set(["outline","primary","secondary","filled","danger","ghost","subtle"]),et=new Set(["sm","xs"]),E=class extends l{static tag="viking-button";static legacyTag="viking-button-wc";static get observedAttributes(){return["variant","size","type","disabled","loading","href","target","aria-label","aria-busy","square","full-width","compact"]}shadow;control=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Ee)}connectedCallback(){this.render(),this.syncHostSemantics(),this.control?.addEventListener("click",this.onClick)}disconnectedCallback(){this.control?.removeEventListener("click",this.onClick)}attributeChangedCallback(){this.isConnected&&(this.render(),this.syncHostSemantics())}onClick=e=>{if(this.disabled||this.loading){e.preventDefault(),e.stopPropagation();return}this.dispatchEvent(new CustomEvent("viking-press",{bubbles:!0,composed:!0,detail:e}))};get variant(){let e=this.getAttribute("variant")??"outline";return Je.has(e)?e:"outline"}get size(){let e=this.getAttribute("size");return e&&et.has(e)?e:null}get disabled(){return h(this,"disabled")}get loading(){return h(this,"loading")}get square(){return h(this,"square")}syncHostSemantics(){this.hasAttribute("role")||this.setAttribute("role",this.getAttribute("href")?"link":"button")}render(){let e=this.getAttribute("href"),i=!!e,r=i?"a":"button",n=["viking-btn",`viking-btn-${this.variant}`,this.size?`viking-btn-${this.size}`:"",this.square?"viking-btn-square":""].filter(Boolean).join(" "),o=this.getAttribute("aria-label")??"",s=this.getAttribute("aria-busy")==="true"||this.loading?"true":null,u=a(this.getAttribute("type")??"button"),p=e?a(e):"",k=this.getAttribute("target"),y=k?a(k):"";this.shadow.innerHTML=`
|
|
1124
|
+
<${r}
|
|
1125
|
+
class="${n}"
|
|
1126
|
+
part="control"
|
|
1127
|
+
${i?`href="${p}"`:`type="${u}"`}
|
|
1128
|
+
${i&&y?`target="${y}"`:""}
|
|
1129
|
+
${i&&k==="_blank"?'rel="noopener noreferrer"':""}
|
|
1130
|
+
${this.disabled||this.loading?"disabled":""}
|
|
1131
|
+
${o?`aria-label="${a(o)}"`:""}
|
|
1132
|
+
${s?`aria-busy="${s}"`:""}
|
|
1133
|
+
${this.disabled&&i?'aria-disabled="true" tabindex="-1"':""}
|
|
1134
|
+
>
|
|
1135
|
+
${this.loading?'<span class="viking-btn-spinner" aria-hidden="true"></span>':""}
|
|
1136
|
+
<span class="viking-btn-label" part="label"><slot></slot></span>
|
|
1137
|
+
</${r}>
|
|
1138
|
+
`,this.control=this.shadow.querySelector(r)}},F=()=>{c(E.tag,E),d(E.legacyTag,E)};var tt=new Set(["accent","secondary","success","warning","danger","info","muted"]),S=class extends l{static tag="viking-callout";static legacyTag="viking-callout-wc";static get observedAttributes(){return["tone","heading","icon","dismissible","hidden"]}shadow;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Me)}connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}get tone(){let e=this.getAttribute("tone")??"info";return tt.has(e)?e:"info"}get dismissible(){return this.hasAttribute("dismissible")&&this.getAttribute("dismissible")!=="false"}onDismiss=()=>{this.setAttribute("hidden",""),this.dispatchEvent(new CustomEvent("viking-close",{bubbles:!0,composed:!0}))};render(){let e=this.getAttribute("heading")??"",i=this.getAttribute("icon")??W[this.tone]??"info",r=g(i,22,"viking-callout-icon");this.shadow.innerHTML=`
|
|
1139
|
+
<div class="viking-callout viking-callout-${this.tone}" role="note" part="surface">
|
|
1140
|
+
<span part="icon">${r}</span>
|
|
1141
|
+
<div class="viking-callout-body" part="body">
|
|
1142
|
+
${e?`<p class="viking-callout-heading" part="heading">${a(e)}</p>`:""}
|
|
1143
|
+
<div class="viking-callout-text" part="text"><slot></slot></div>
|
|
1144
|
+
</div>
|
|
1145
|
+
${this.dismissible?`<button type="button" class="viking-callout-close" part="close" aria-label="Dismiss">${g("x",18)}</button>`:""}
|
|
1146
|
+
</div>
|
|
1147
|
+
`,this.shadow.querySelector(".viking-callout-close")?.addEventListener("click",this.onDismiss)}},j=()=>{c(S.tag,S),d(S.legacyTag,S)};var I=class extends l{static tag="viking-card";static legacyTag="viking-card-wc";static get observedAttributes(){return["compact","interactive","title"]}connectedCallback(){this.syncClasses()}attributeChangedCallback(){this.isConnected&&this.syncClasses()}syncClasses(){this.classList.add("viking-card"),this.classList.toggle("viking-card-compact",this.hasAttribute("compact")),this.classList.toggle("viking-card-interactive",this.hasAttribute("interactive"));let e=this.getAttribute("title");e?(this.setAttribute("role","region"),this.setAttribute("aria-label",e)):(this.removeAttribute("role"),this.removeAttribute("aria-label"))}},Y=()=>{c(I.tag,I),d(I.legacyTag,I)};var _=class extends l{static tag="viking-field";static legacyTag="viking-field-wc";static get observedAttributes(){return["label","description","error","required","width"]}shadow;labelId=x("viking-field-label");descriptionId=x("viking-field-description");errorId=x("viking-field-error");slotEl=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Ie)}connectedCallback(){this.render(),this.syncControlA11y()}disconnectedCallback(){this.slotEl?.removeEventListener("slotchange",this.syncControlA11y)}attributeChangedCallback(){this.isConnected&&(this.render(),this.syncControlA11y())}get control(){return(this.slotEl?.assignedElements({flatten:!0})??[]).find(i=>i instanceof HTMLElement)??null}focusControl=()=>{this.control?.focus?.()};syncControlA11y=()=>{let e=this.control;if(!e)return;let i=[this.getAttribute("description")??"",this.getAttribute("error")??""].filter(Boolean).join(" "),r=this.getAttribute("label")??"";r&&!e.hasAttribute("aria-label")&&e.setAttribute("aria-label",r),i?e.setAttribute("aria-description",i):e.removeAttribute("aria-description"),this.getAttribute("error")?(e.setAttribute("aria-invalid","true"),e.setAttribute("error",this.getAttribute("error")??"")):(e.removeAttribute("aria-invalid"),e.getAttribute("error")===""&&e.removeAttribute("error")),h(this,"required")&&e.setAttribute("required","")};render(){let e=this.getAttribute("label")??"",i=this.getAttribute("description")??"",r=this.getAttribute("error")??"",n=h(this,"required");this.shadow.innerHTML=`
|
|
1148
|
+
<div class="viking-field" part="field" role="group" aria-labelledby="${this.labelId}">
|
|
1149
|
+
${e?`<div class="viking-field-label-row" part="label-row">
|
|
1150
|
+
<span class="viking-field-label" part="label" id="${this.labelId}">
|
|
1151
|
+
<span>${a(e)}</span>
|
|
1152
|
+
${n?'<span class="viking-field-required" aria-label="required">*</span>':""}
|
|
1153
|
+
</span>
|
|
1154
|
+
</div>`:`<span id="${this.labelId}" hidden>Form field</span>`}
|
|
1155
|
+
<div class="viking-field-control" part="control"><slot></slot></div>
|
|
1156
|
+
${i?`<p id="${this.descriptionId}" class="viking-field-description" part="description">${a(i)}</p>`:""}
|
|
1157
|
+
${r?`<p id="${this.errorId}" class="viking-field-error" part="error" role="alert">${a(r)}</p>`:""}
|
|
1158
|
+
</div>
|
|
1159
|
+
`,this.slotEl=this.shadow.querySelector("slot"),this.slotEl?.addEventListener("slotchange",this.syncControlA11y),this.shadow.querySelector(".viking-field-label")?.addEventListener("click",this.focusControl)}},X=()=>{c(_.tag,_),d(_.legacyTag,_)};var M=class extends l{static formAssociated=!0;static tag="viking-input";static legacyTag="viking-input-wc";static get observedAttributes(){return["type","placeholder","value","disabled","loading","clearable","name","autocomplete","required","readonly","minlength","maxlength","pattern","error","aria-label","aria-describedby","bare"]}shadow;internals;input=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.internals=B(this),v(this.shadow,Se)}connectedCallback(){this.render(),this.syncFormValue()}attributeChangedCallback(e){if(this.isConnected){if(e==="value"&&this.input){this.input.value=this.getAttribute("value")??"",this.syncFormValue();return}this.render()}}get value(){return this.input?.value??this.getAttribute("value")??""}set value(e){let i=e??"";this.setAttribute("value",i),this.input&&(this.input.value=i),this.syncFormValue()}get disabled(){return h(this,"disabled")}get loading(){return h(this,"loading")}get clearable(){return h(this,"clearable")}get bare(){return h(this,"bare")}onInput=()=>{let e=this.input?.value??"";this.setAttribute("value",e),this.syncFormValue(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};onBlur=()=>{this.dispatchEvent(new Event("blur",{bubbles:!0,composed:!0}))};onClear=()=>{this.value="",this.input?.focus(),this.dispatchEvent(new CustomEvent("viking-cleared",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))};syncFormValue(){K(this.internals,this.value)}render(){let e=["viking-input-shell",this.disabled?"viking-disabled":"",this.loading?"viking-loading":""].filter(Boolean).join(" "),i=a(this.getAttribute("type")??"text"),r=this.getAttribute("placeholder")??"",n=a(r),o=a(this.getAttribute("value")??""),s=this.getAttribute("aria-label")??(r||"Text input"),u=a(this.getAttribute("autocomplete")??""),p=a(this.getAttribute("aria-describedby")??""),k=a(this.getAttribute("minlength")??""),y=a(this.getAttribute("maxlength")??""),L=a(this.getAttribute("pattern")??""),V=this.getAttribute("error")??"",ne=h(this,"required"),P=h(this,"readonly"),Ke=this.clearable&&o.length>0&&!this.loading&&!this.bare,ve=`
|
|
1160
|
+
${this.disabled||this.loading?"disabled":""}
|
|
1161
|
+
${ne?"required":""}
|
|
1162
|
+
${P?"readonly":""}
|
|
1163
|
+
aria-label="${a(s)}"
|
|
1164
|
+
${p?`aria-describedby="${p}"`:""}
|
|
1165
|
+
${this.loading?'aria-busy="true"':""}
|
|
1166
|
+
${V?'aria-invalid="true"':""}
|
|
1167
|
+
${u?`autocomplete="${u}"`:""}
|
|
1168
|
+
${k?`minlength="${k}"`:""}
|
|
1169
|
+
${y?`maxlength="${y}"`:""}
|
|
1170
|
+
${L?`pattern="${L}"`:""}
|
|
1171
|
+
`;this.bare?this.shadow.innerHTML=`
|
|
1172
|
+
<input
|
|
1173
|
+
part="input"
|
|
1174
|
+
class="viking-input-native"
|
|
1175
|
+
type="${i}"
|
|
1176
|
+
placeholder="${n}"
|
|
1177
|
+
value="${o}"
|
|
1178
|
+
${ve}
|
|
1179
|
+
/>
|
|
1180
|
+
`:this.shadow.innerHTML=`
|
|
1181
|
+
<div class="${e}" part="shell">
|
|
1182
|
+
<slot name="leading"></slot>
|
|
1183
|
+
<input
|
|
1184
|
+
part="input"
|
|
1185
|
+
type="${i}"
|
|
1186
|
+
placeholder="${n}"
|
|
1187
|
+
value="${o}"
|
|
1188
|
+
${ve}
|
|
1189
|
+
/>
|
|
1190
|
+
${this.loading?'<span class="viking-input-spinner" aria-hidden="true"></span>':""}
|
|
1191
|
+
${Ke?'<button type="button" class="viking-input-clear" aria-label="Clear input" part="clear">\xD7</button>':""}
|
|
1192
|
+
<slot name="trailing"></slot>
|
|
1193
|
+
</div>
|
|
1194
|
+
`,this.input=this.shadow.querySelector("input"),this.input?.addEventListener("input",this.onInput),this.input?.addEventListener("blur",this.onBlur),this.shadow.querySelector(".viking-input-clear")?.addEventListener("click",this.onClear)}},Z=()=>{c(M.tag,M),d(M.legacyTag,M)};var m=class extends l{static tag="viking-modal";static legacyTag="viking-modal-wc";static dialogTag="viking-dialog";static get observedAttributes(){return["open","title","dismissible"]}shadow;dialogEl=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Ce)}connectedCallback(){this.render(),this.syncOpen(),this.dialogEl?.addEventListener("close",this.onClose),this.dialogEl?.addEventListener("click",this.onBackdropClick)}disconnectedCallback(){this.dialogEl?.removeEventListener("close",this.onClose),this.dialogEl?.removeEventListener("click",this.onBackdropClick)}attributeChangedCallback(e){if(this.isConnected){if(e==="open"){this.syncOpen();return}if(e==="title"){this.updateTitle();return}e==="dismissible"&&(this.render(),this.syncOpen())}}openModal(){this.setAttribute("open",""),this.syncOpen()}closeModal(){this.removeAttribute("open"),T(this.dialogEl)}open(){this.openModal()}close(){this.closeModal()}get dismissible(){return this.getAttribute("dismissible")!=="false"}onClose=()=>{this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("viking-close",{bubbles:!0,composed:!0}))};onBackdropClick=e=>{this.dismissible&&e.target===this.dialogEl&&this.closeModal()};syncOpen(){if(!this.dialogEl)return;let e=this.hasAttribute("open");e&&!this.dialogEl.open?(G(this.dialogEl),queueMicrotask(()=>{(this.shadow.querySelector(".viking-modal-close")??this.dialogEl)?.focus()})):!e&&this.dialogEl.open&&T(this.dialogEl)}updateTitle(){let e=this.getAttribute("title")??"Dialog",i=this.shadow.querySelector(".viking-modal-heading");i&&(i.textContent=e),this.dialogEl?.setAttribute("aria-label",e)}render(){let e=this.getAttribute("title")??"Dialog";this.shadow.innerHTML=`
|
|
1195
|
+
<dialog class="viking-modal-backdrop" aria-label="${a(e)}" aria-modal="true">
|
|
1196
|
+
<div class="viking-modal-panel" part="panel" role="document">
|
|
1197
|
+
<header class="viking-modal-header" part="header">
|
|
1198
|
+
<h2 class="viking-modal-heading" part="title">${a(e)}</h2>
|
|
1199
|
+
${this.dismissible?`<button type="button" class="viking-modal-close" part="close" aria-label="Close dialog">${g("x",20)}</button>`:""}
|
|
1200
|
+
</header>
|
|
1201
|
+
<div class="viking-modal-body" part="body"><slot></slot></div>
|
|
1202
|
+
<footer class="viking-modal-footer" part="footer"><slot name="actions"></slot></footer>
|
|
1203
|
+
</div>
|
|
1204
|
+
</dialog>
|
|
1205
|
+
`,this.dialogEl=this.shadow.querySelector("dialog"),this.shadow.querySelector(".viking-modal-close")?.addEventListener("click",()=>this.closeModal()),this.dialogEl?.addEventListener("keydown",i=>{i.key==="Escape"&&this.dismissible&&(i.preventDefault(),this.closeModal())})}},Q=()=>{c(m.tag,m),d(m.legacyTag,m),d(m.dialogTag,m)};var it=t=>{let e=t.getAttribute("items");if(!e)return[];try{let i=JSON.parse(e);return Array.isArray(i)?i:[]}catch{return[]}},rt=(t,e)=>[t.title,t.snippet??"",t.group??"",t.href,...t.keywords??[]].join(" ").toLowerCase().includes(e),nt=(t,e)=>{let i=e.trim().toLowerCase();return i?t.filter(r=>rt(r,i)):t},at=t=>{let e=new Map;return t.forEach(i=>{let r=i.group??null,n=e.get(r)??[];n.push(i),e.set(r,n)}),Array.from(e.entries()).map(([i,r])=>({group:i,items:r}))},b=class extends l{static tag="viking-command-palette";static searchTag="viking-search-palette";static legacyTag="viking-search-palette-wc";static get observedAttributes(){return["open","placeholder","items","global-shortcut"]}shadow;dialogEl=null;inputEl=null;resultsEl=null;globalKeyHandler=null;resultsId=x("viking-search-results");inputId=x("viking-search-input");query="";activeIndex=0;flatResults=[];constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,Le)}connectedCallback(){this.render(),this.syncOpen(),this.bindGlobalShortcut(),this.dialogEl?.addEventListener("close",this.onClose),this.dialogEl?.addEventListener("click",this.onBackdropClick),this.inputEl?.addEventListener("input",this.onInput),this.inputEl?.addEventListener("keydown",this.onInputKeydown)}disconnectedCallback(){this.dialogEl?.removeEventListener("close",this.onClose),this.dialogEl?.removeEventListener("click",this.onBackdropClick),this.inputEl?.removeEventListener("input",this.onInput),this.inputEl?.removeEventListener("keydown",this.onInputKeydown),this.unbindGlobalShortcut()}attributeChangedCallback(e){if(this.isConnected&&(e==="open"&&this.syncOpen(),e==="global-shortcut"&&(this.unbindGlobalShortcut(),this.bindGlobalShortcut()),e==="items"||e==="placeholder"))if(e==="placeholder"&&this.inputEl){let i=this.getAttribute("placeholder")??"Search documentation, dashboard, API\u2026";this.inputEl.placeholder=i,this.inputEl.setAttribute("aria-label",i)}else this.renderResults()}openPalette(){this.setAttribute("open",""),this.syncOpen()}closePalette(){this.removeAttribute("open"),T(this.dialogEl)}search(e){this.query=e,this.inputEl&&(this.inputEl.value=e),this.activeIndex=0,this.renderResults(),this.dispatchEvent(new CustomEvent("viking-query",{bubbles:!0,composed:!0,detail:{query:this.query}}))}onClose=()=>{this.removeAttribute("open"),this.query="",this.activeIndex=0,this.inputEl&&(this.inputEl.value=""),this.dispatchEvent(new CustomEvent("viking-close",{bubbles:!0,composed:!0}))};onBackdropClick=e=>{e.target===this.dialogEl&&this.closePalette()};onInput=e=>{this.query=e.target.value??this.inputEl?.value??"",this.activeIndex=0,this.renderResults(),this.dispatchEvent(new CustomEvent("viking-query",{bubbles:!0,composed:!0,detail:{query:this.query}}))};onInputKeydown=e=>{if(this.flatResults.length===0){e.key==="Escape"&&(e.preventDefault(),this.closePalette());return}if(e.key==="ArrowDown"){e.preventDefault(),this.activeIndex=Math.min(this.flatResults.length-1,this.activeIndex+1),this.renderResults(),this.scrollActiveIntoView();return}if(e.key==="ArrowUp"){e.preventDefault(),this.activeIndex=Math.max(0,this.activeIndex-1),this.renderResults(),this.scrollActiveIntoView();return}if(e.key==="Enter"){e.preventDefault();let i=this.flatResults[this.activeIndex];i&&this.activateItem(i)}};bindGlobalShortcut(){h(this,"global-shortcut")&&(this.globalKeyHandler=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="k"&&(e.preventDefault(),this.hasAttribute("open")?this.closePalette():this.openPalette())},document.addEventListener("keydown",this.globalKeyHandler))}unbindGlobalShortcut(){this.globalKeyHandler&&(document.removeEventListener("keydown",this.globalKeyHandler),this.globalKeyHandler=null)}syncOpen(){if(!this.dialogEl)return;let e=this.hasAttribute("open");e&&!this.dialogEl.open?(this.dialogEl.removeAttribute("aria-hidden"),G(this.dialogEl),this.activeIndex=0,this.renderResults(),queueMicrotask(()=>this.inputEl?.focus())):!e&&this.dialogEl.open?(T(this.dialogEl),this.dialogEl.setAttribute("aria-hidden","true")):e||this.dialogEl.setAttribute("aria-hidden","true")}scrollActiveIntoView(){this.resultsEl?.querySelector(".viking-search-result.is-selected")?.scrollIntoView({block:"nearest"})}activateItem(e){if(this.dispatchEvent(new CustomEvent("viking-select",{bubbles:!0,composed:!0,detail:{item:e}})),this.closePalette(),e.action==="cookie-settings"){globalThis.DemlWidgets?.openCookieSettings?.();return}if(e.action==="bug-report"){let i=globalThis.DemlWidgets;if(i?.openBugReport){i.openBugReport();return}}e.href&&e.href!=="#"&&window.location.assign(e.href)}renderResults(){if(!this.resultsEl)return;let e=it(this),i=this.query.trim().toLowerCase(),r=nt(e,i);if(this.flatResults=r,r.length===0){let p=this.query.trim();this.resultsEl.innerHTML=`<p class="viking-search-empty" role="status">${p?"No results found":"Start typing to search\u2026"}</p>`,this.inputEl?.removeAttribute("aria-activedescendant");return}this.activeIndex>=r.length&&(this.activeIndex=r.length-1);let n=0,s=at(r).map(({group:p,items:k})=>{let y=p?`<p class="viking-search-group-label" role="presentation">${a(p)}</p>`:"",L=k.map(V=>{let ne=`${this.resultsId}-result-${n}`,P=n===this.activeIndex;return n+=1,`
|
|
1206
|
+
<a
|
|
1207
|
+
id="${ne}"
|
|
1208
|
+
class="viking-search-result${P?" is-selected":""}"
|
|
1209
|
+
role="option"
|
|
1210
|
+
aria-selected="${P}"
|
|
1211
|
+
href="${a(V.href)}"
|
|
1212
|
+
part="result"
|
|
1213
|
+
data-index="${n-1}"
|
|
1214
|
+
>
|
|
1215
|
+
<div>
|
|
1216
|
+
<div class="viking-search-result-title">${a(V.title)}</div>
|
|
1217
|
+
${V.snippet?`<div class="viking-search-result-snippet">${a(V.snippet)}</div>`:""}
|
|
1218
|
+
</div>
|
|
1219
|
+
</a>`}).join("");return`${y}${L}`}).join("");this.resultsEl.innerHTML=`<div class="viking-search-results" id="${this.resultsId}" role="listbox" aria-label="Search results">${s}</div>`;let u=`${this.resultsId}-result-${this.activeIndex}`;this.inputEl?.setAttribute("aria-activedescendant",u),this.inputEl?.setAttribute("role","combobox"),this.inputEl?.setAttribute("aria-expanded","true"),this.inputEl?.setAttribute("aria-controls",this.resultsId),this.resultsEl.querySelectorAll(".viking-search-result").forEach(p=>{p.addEventListener("click",k=>{k.preventDefault();let y=Number(p.dataset.index??0),L=this.flatResults[y];L&&this.activateItem(L)}),p.addEventListener("mouseenter",()=>{let k=Number(p.dataset.index??0);this.activeIndex=k,this.renderResults()})})}render(){let e=this.getAttribute("placeholder")??"Search documentation, dashboard, API\u2026",i=q();this.shadow.innerHTML=`
|
|
1220
|
+
<dialog class="viking-search-palette-backdrop" aria-label="Search" aria-hidden="true">
|
|
1221
|
+
<div class="viking-search-palette" part="panel" role="document">
|
|
1222
|
+
<div class="viking-search-palette-header" part="header">
|
|
1223
|
+
<span class="viking-search-palette-icon" aria-hidden="true">${g("search",24)}</span>
|
|
1224
|
+
<input
|
|
1225
|
+
id="${this.inputId}"
|
|
1226
|
+
type="search"
|
|
1227
|
+
class="viking-search-palette-input"
|
|
1228
|
+
part="input"
|
|
1229
|
+
placeholder="${a(e)}"
|
|
1230
|
+
aria-label="${a(e)}"
|
|
1231
|
+
aria-autocomplete="list"
|
|
1232
|
+
autocomplete="off"
|
|
1233
|
+
spellcheck="false"
|
|
1234
|
+
/>
|
|
1235
|
+
<button type="button" class="viking-search-palette-close" part="close" aria-label="Close search">${g("x",20)}</button>
|
|
1236
|
+
</div>
|
|
1237
|
+
<div class="viking-search-palette-body" part="body">
|
|
1238
|
+
<slot></slot>
|
|
1239
|
+
<div class="viking-search-results-host"></div>
|
|
1240
|
+
</div>
|
|
1241
|
+
<footer class="viking-search-palette-footer" part="footer">
|
|
1242
|
+
<span class="viking-kbd">${i}</span><span class="viking-kbd">K</span> toggle \xB7
|
|
1243
|
+
<span class="viking-kbd">\u2191</span><span class="viking-kbd">\u2193</span> navigate \xB7
|
|
1244
|
+
<span class="viking-kbd">Enter</span> open \xB7
|
|
1245
|
+
<span class="viking-kbd">Esc</span> close
|
|
1246
|
+
</footer>
|
|
1247
|
+
</div>
|
|
1248
|
+
</dialog>
|
|
1249
|
+
`,this.dialogEl=this.shadow.querySelector("dialog"),this.inputEl=this.shadow.querySelector("input"),this.resultsEl=this.shadow.querySelector(".viking-search-results-host"),this.shadow.querySelector(".viking-search-palette-close")?.addEventListener("click",()=>this.closePalette()),this.dialogEl?.addEventListener("keydown",r=>{r.key==="Escape"&&(r.preventDefault(),this.closePalette())})}},H=()=>{c(b.tag,b),d(b.searchTag,b),d(b.legacyTag,b)};var J=[{id:"explore",label:"Explore",icon:"globe",appHref:"/explore",marketingHref:"/explore",platform:!0},{id:"documentation",label:"Documentation",icon:"file",appHref:"https://dataengineeringformachinelearning.com/documentation/",marketingHref:"/documentation"},{id:"dashboard",label:"Dashboard",icon:"home",appHref:"/dashboard",marketingHref:"/dashboard",requireAuth:!0,platform:!0},{id:"sites",label:"Sites",icon:"building",appHref:"/settings",marketingHref:"/settings",requireAuth:!0,platform:!0},{id:"account",label:"Account",icon:"user",appHref:"/account",marketingHref:"/account",requireAuth:!0,platform:!0}],Ve=[{title:"Platform",links:[{label:"Explore",appHref:"/explore",marketingHref:"/explore",platform:!0},{label:"Dashboard",appHref:"/dashboard",marketingHref:"/dashboard",platform:!0},{label:"Sites",appHref:"/settings",marketingHref:"/settings",platform:!0},{label:"Account",appHref:"/account",marketingHref:"/account",platform:!0},{label:"Platform Status",appHref:"/status/platform-status",marketingHref:"/status/platform-status",platform:!0}]},{title:"Resources",links:[{label:"Documentation",appHref:"https://dataengineeringformachinelearning.com/documentation/",marketingHref:"/documentation"},{label:"Whitepaper",appHref:"https://dataengineeringformachinelearning.com/whitepaper/",marketingHref:"/whitepaper"},{label:"Book",appHref:"https://dataengineeringformachinelearning.com/book/",marketingHref:"/book"}]},{title:"Support",links:[{label:"Platform Status",appHref:"/status/platform-status",marketingHref:"/status/platform-status",platform:!0},{label:"Report a Bug",appHref:"#",marketingHref:"#",action:"bug-report"}]},{title:"Legal & Compliance",links:[{label:"Privacy Policy",appHref:"https://dataengineeringformachinelearning.com/privacy/",marketingHref:"/privacy"},{label:"Terms of Service",appHref:"https://dataengineeringformachinelearning.com/terms/",marketingHref:"/terms"},{label:"SOC2 Compliance",appHref:"https://dataengineeringformachinelearning.com/compliance/",marketingHref:"/compliance"},{label:"GDPR Compliance",appHref:"https://dataengineeringformachinelearning.com/privacy/#gdpr",marketingHref:"/privacy#gdpr"},{label:"Cookie Settings",appHref:"#",marketingHref:"#",action:"cookie-settings"}]}],ot="reportBug=1",st="cookieSettings=1",Te=t=>/^https?:\/\//i.test(t),ee=(t,e)=>{if(Te(e))return e;let i=t.replace(/\/$/,""),r=e.startsWith("/")?e:`/${e}`;return`${i}${r}`},ce=t=>`${ee(t.app,"/")}?${ot}`,de=t=>`${ee(t.marketing,"/")}?${st}`,Ne=(t,e)=>Te(t)||t.startsWith("mailto:")||t.startsWith("/")?t:ee(e.marketing,t),He=(t,e,i)=>e==="app"?t:ee(i.app,t),te=(t,e,i)=>t.platform?He(t.appHref,e,i):e==="app"?t.appHref:Ne(t.marketingHref,i),$e=(t,e,i)=>t.action==="bug-report"?e==="app"?"#":ce(i):t.action==="cookie-settings"?de(i):t.platform?He(t.appHref,e,i):e==="app"?t.appHref:Ne(t.marketingHref,i),Oe=(t,e)=>t==="marketing"?"/":e.marketing,ze=(t,e=!1)=>t.filter(i=>!i.requireAuth||e);var A={app:"https://deml.app",marketing:"https://dataengineeringformachinelearning.com",backend:"https://backend.deml.app"};var lt=t=>{let e=new Set;return t.filter(i=>{let r=`${i.title}:${i.href}:${i.action??""}`;return e.has(r)?!1:(e.add(r),!0)})},ct=(t,e,i)=>({title:t.label,href:te(t,e,i),snippet:`Open ${t.label}`,group:"Platform",keywords:[t.id,t.label.toLowerCase(),"navigate","go"]}),dt=(t,e,i,r)=>t.action==="cookie-settings"?{title:t.label,href:de(r),snippet:"Manage analytics and cookie preferences",group:e,keywords:["cookies","consent","privacy","gdpr"],action:"cookie-settings"}:t.action==="bug-report"?{title:t.label,href:i==="app"?"#":ce(r),snippet:"Submit a product issue or regression",group:e,keywords:["bug","issue","support","feedback"],action:"bug-report"}:{title:t.label,href:$e(t,i,r),snippet:`Open ${t.label}`,group:e,keywords:[t.label.toLowerCase(),e.toLowerCase()]},gt=[{title:"Viking-UI Components",snippet:"Browse the design system showcase",group:"Resources",keywords:["viking","ui","design system","components","showcase"]},{title:"Design tokens",snippet:"Canonical --viking-* token matrix",group:"Resources",keywords:["tokens","theme","css","variables"]},{title:"API reference",snippet:"OpenAPI schema and REST endpoints",group:"Resources",keywords:["api","openapi","swagger","rest"]}],ht=(t,e,i)=>{switch(t.title){case"Viking-UI Components":return"https://ui.dataengineeringformachinelearning.com/components";case"Design tokens":return"https://ui.dataengineeringformachinelearning.com/tokens";case"API reference":return`${i.backend.replace(/\/$/,"")}/api/docs`;default:return e==="app"?i.app:i.marketing}},vt=[{title:"Components",href:"/components",snippet:"Browse all documented primitives",group:"Viking-UI",keywords:["components","showcase","registry"]},{title:"Playground",href:"/playground",snippet:"Live Web Component sandbox",group:"Viking-UI",keywords:["playground","sandbox","demo"]},{title:"Architecture",href:"/architecture",snippet:"CSS + WC + Angular layers",group:"Viking-UI",keywords:["architecture","layers","web component"]},{title:"Design tokens",href:"/tokens",snippet:"Canonical --viking-* token matrix",group:"Viking-UI",keywords:["tokens","theme","css","variables"]},{title:"Theming",href:"/theming",snippet:"Light/dark mode and sync pipeline",group:"Viking-UI",keywords:["theming","dark","light","mode"]},{title:"Framework guides",href:"/frameworks",snippet:"Angular, Astro, Django setup",group:"Viking-UI",keywords:["frameworks","angular","astro","django"]},{title:"Contributing",href:"/contributing",snippet:"Extend the Viking-UI kit",group:"Viking-UI",keywords:["contributing","extend","primitives"]}],pt=(t,e)=>t.startsWith("http")?t:`${e.replace(/\/$/,"")}${t.startsWith("/")?t:`/${t}`}`,ge=(t,e,i)=>{let r=t==="docs"?"marketing":t,n=[...J.map(o=>ct(o,r,e)),...Ve.flatMap(o=>o.links.map(s=>dt(s,o.title,r,e))),...gt.map(o=>({...o,href:ht(o,r,e)}))];if(t==="app"&&n.push({title:"Settings",href:"/settings",snippet:"Workspace domains, billing, and security",group:"Platform",keywords:["settings","sites","workspace","configuration"]},{title:"Billing & subscription",href:"/settings/billing",snippet:"Manage plan, invoices, and payment methods",group:"Platform",keywords:["billing","stripe","subscription","payment"]},{title:"Security settings",href:"/settings/security",snippet:"Keys, sessions, and access controls",group:"Platform",keywords:["security","keys","auth","rbac"]}),t==="docs"){let o=i?.docsOrigin??"https://ui.dataengineeringformachinelearning.com";n.push(...vt.map(s=>({...s,href:pt(s.href,o)})))}return lt(n)};var De=new Set(["app","marketing","backend","docs"]),ut=()=>{let t=document.documentElement.getAttribute("data-deml-context");if(t&&De.has(t))return t;let e=window.location.hostname;return e.startsWith("ui.")?"docs":e.includes("deml.app")&&!e.startsWith("backend.")?"app":e.startsWith("backend.")?"backend":"marketing"},kt=t=>{let e=globalThis.__DEML??{};return{app:t.getAttribute("app-url")??e.app??A.app,marketing:t.getAttribute("marketing-url")??e.marketing??A.marketing,backend:t.getAttribute("backend-url")??e.backend??A.backend}},mt=t=>{let e=t.getAttribute("context");return e&&De.has(e)?e:ut()},f=class extends l{static tag="viking-suite-command-palette";static searchTag="viking-suite-search-palette";static legacyTag="viking-suite-search-palette-wc";static get observedAttributes(){return["context","app-url","marketing-url","backend-url","placeholder","global-shortcut"]}paletteEl=null;itemsLoaded=!1;connectedCallback(){H(),this.ensurePalette(),this.loadItems()}attributeChangedCallback(e){if(this.isConnected){if(e==="placeholder"&&this.paletteEl){let i=this.getAttribute("placeholder")??"Search documentation, dashboard, settings\u2026";this.paletteEl.setAttribute("placeholder",i);return}if(e==="global-shortcut"&&this.paletteEl){h(this,"global-shortcut")||!this.hasAttribute("global-shortcut")?this.paletteEl.setAttribute("global-shortcut",""):this.paletteEl.removeAttribute("global-shortcut");return}(e==="context"||e==="app-url"||e==="marketing-url"||e==="backend-url")&&this.loadItems(!0)}}openPalette(){this.ensurePalette(),this.loadItems().then(()=>this.paletteEl?.openPalette())}closePalette(){this.paletteEl?.closePalette()}ensurePalette(){if(this.paletteEl)return;this.paletteEl=document.createElement("viking-command-palette"),this.paletteEl.id="deml-command-palette";let e=this.getAttribute("placeholder")??"Search documentation, dashboard, settings\u2026";this.paletteEl.setAttribute("placeholder",e),(h(this,"global-shortcut")||!this.hasAttribute("global-shortcut"))&&this.paletteEl.setAttribute("global-shortcut",""),this.append(this.paletteEl)}async loadItems(e=!1){if(!this.paletteEl||this.itemsLoaded&&!e)return;let i=mt(this),r=kt(this),n=ge(i,r,{docsOrigin:window.location.origin});try{let o=await fetch("/assets/site-drakkar.json",{cache:"no-cache"});if(o.ok){let s=await o.json();(s.navLinks?.length||s.footerColumns?.length)&&(n=ge(i,r,{docsOrigin:window.location.origin}))}}catch{}this.paletteEl.setAttribute("items",JSON.stringify(n)),this.itemsLoaded=!0}},$=()=>{c(f.tag,f),d(f.searchTag,f),d(f.legacyTag,f)};var bt=`
|
|
1250
|
+
:host {
|
|
1251
|
+
display: inline-flex;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.theme-toggle-btn {
|
|
1255
|
+
display: inline-flex;
|
|
1256
|
+
align-items: center;
|
|
1257
|
+
justify-content: center;
|
|
1258
|
+
flex-shrink: 0;
|
|
1259
|
+
width: var(--viking-control-height, 40px);
|
|
1260
|
+
height: var(--viking-control-height, 40px);
|
|
1261
|
+
min-width: var(--viking-control-height, 40px);
|
|
1262
|
+
padding: 0;
|
|
1263
|
+
border: 1px solid color-mix(in srgb, var(--viking-accent, var(--viking-accent)) 32%, var(--viking-border-strong, var(--viking-border)));
|
|
1264
|
+
border-radius: var(--viking-radius);
|
|
1265
|
+
background: color-mix(in srgb, var(--viking-accent, var(--viking-accent)) 8%, var(--viking-surface));
|
|
1266
|
+
color: var(--viking-accent-strong, var(--viking-ring));
|
|
1267
|
+
box-shadow: var(--viking-shadow-sm);
|
|
1268
|
+
cursor: pointer;
|
|
1269
|
+
transition: var(--viking-transition-interactive);
|
|
1270
|
+
-webkit-tap-highlight-color: transparent;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.theme-toggle-btn:hover {
|
|
1274
|
+
border-color: var(--viking-accent-strong, var(--viking-ring));
|
|
1275
|
+
background: color-mix(in srgb, var(--viking-accent, var(--viking-accent)) 14%, var(--viking-surface-alt));
|
|
1276
|
+
color: var(--viking-accent-strong, var(--viking-ring));
|
|
1277
|
+
box-shadow: var(--viking-shadow-md);
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
.theme-toggle-btn:focus-visible {
|
|
1281
|
+
outline: var(--viking-ring-width, 2px) solid var(--viking-ring);
|
|
1282
|
+
outline-offset: var(--viking-ring-offset, 2px);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.theme-toggle-btn:active {
|
|
1286
|
+
transform: scale(var(--viking-state-active-scale, 0.98));
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.theme-icon {
|
|
1290
|
+
display: none;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.theme-icon.is-visible {
|
|
1294
|
+
display: block;
|
|
1295
|
+
}
|
|
1296
|
+
`,ft=t=>{document.documentElement.setAttribute("data-theme",t),document.documentElement.classList.toggle("dark",t==="dark"),localStorage.setItem("theme",t)},Re=()=>{let t=localStorage.getItem("theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},O=class extends l{static tag="viking-theme-toggle-wc";shadow;button=null;sunIcon=null;moonIcon=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,bt)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button"),this.render(),this.syncIcons(),this.button?.addEventListener("click",this.onClick)}disconnectedCallback(){this.button?.removeEventListener("click",this.onClick)}onClick=()=>{let e=Re()==="light"?"dark":"light";ft(e),this.syncIcons(),this.dispatchEvent(new CustomEvent("viking-theme-change",{bubbles:!0,composed:!0,detail:{theme:e}}))};syncIcons=()=>{let e=Re()==="light";this.sunIcon?.classList.toggle("is-visible",e),this.moonIcon?.classList.toggle("is-visible",!e)};render(){let e=this.getAttribute("aria-label")??"Toggle light and dark theme";this.shadow.innerHTML=`
|
|
1297
|
+
<button type="button" class="theme-toggle-btn" part="control" aria-label="${e}">
|
|
1298
|
+
<svg class="theme-icon theme-icon-sun" width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
|
|
1299
|
+
<circle cx="12" cy="12" r="4" fill="none" stroke="currentColor" stroke-width="2"/>
|
|
1300
|
+
<path stroke="currentColor" stroke-width="2" d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>
|
|
1301
|
+
</svg>
|
|
1302
|
+
<svg class="theme-icon theme-icon-moon" width="20" height="20" viewBox="0 0 24 24" aria-hidden="true">
|
|
1303
|
+
<path fill="currentColor" d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/>
|
|
1304
|
+
</svg>
|
|
1305
|
+
</button>
|
|
1306
|
+
`,this.button=this.shadow.querySelector("button"),this.sunIcon=this.shadow.querySelector(".theme-icon-sun"),this.moonIcon=this.shadow.querySelector(".theme-icon-moon")}},z=()=>{c(O.tag,O)};var Pe=new Set(["app","marketing","backend","docs"]),yt=`
|
|
1307
|
+
:host {
|
|
1308
|
+
display: block;
|
|
1309
|
+
position: sticky;
|
|
1310
|
+
top: 0;
|
|
1311
|
+
z-index: var(--viking-z-sticky, 50);
|
|
1312
|
+
color: var(--viking-text);
|
|
1313
|
+
font-family: var(--viking-font-family);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
* {
|
|
1317
|
+
box-sizing: border-box;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
.suite-header {
|
|
1321
|
+
width: 100%;
|
|
1322
|
+
min-height: var(--viking-navbar-height, var(--viking-space-8));
|
|
1323
|
+
background: var(--viking-surface);
|
|
1324
|
+
border-bottom: var(--viking-border-width, 1px) solid var(--viking-border);
|
|
1325
|
+
box-shadow: var(--viking-shadow-xs);
|
|
1326
|
+
isolation: isolate;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
.suite-header__bar {
|
|
1330
|
+
display: grid;
|
|
1331
|
+
grid-template-columns: minmax(max-content, auto) minmax(0, 1fr) max-content;
|
|
1332
|
+
align-items: center;
|
|
1333
|
+
gap: var(--viking-space-1);
|
|
1334
|
+
width: 100%;
|
|
1335
|
+
max-width: var(--viking-container-max-width);
|
|
1336
|
+
min-height: var(--viking-navbar-height, var(--viking-space-8));
|
|
1337
|
+
margin-inline: auto;
|
|
1338
|
+
padding-inline: var(--viking-page-gutter);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.suite-header__brand {
|
|
1342
|
+
display: inline-flex;
|
|
1343
|
+
align-items: center;
|
|
1344
|
+
justify-content: center;
|
|
1345
|
+
gap: var(--viking-space-1);
|
|
1346
|
+
min-width: 0;
|
|
1347
|
+
min-height: var(--viking-control-height);
|
|
1348
|
+
color: var(--viking-text);
|
|
1349
|
+
text-decoration: none;
|
|
1350
|
+
border-radius: var(--viking-radius);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
.suite-header__brand:focus-visible,
|
|
1354
|
+
.suite-header__link:focus-visible,
|
|
1355
|
+
.suite-header__icon-button:focus-visible,
|
|
1356
|
+
.suite-header__auth-link:focus-visible,
|
|
1357
|
+
.suite-header__user-trigger:focus-visible,
|
|
1358
|
+
.suite-header__menu-link:focus-visible,
|
|
1359
|
+
.suite-header__menu-button:focus-visible {
|
|
1360
|
+
outline: var(--viking-ring-width) solid var(--viking-ring);
|
|
1361
|
+
outline-offset: var(--viking-ring-offset);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
.suite-header__mark {
|
|
1365
|
+
display: inline-flex;
|
|
1366
|
+
align-items: center;
|
|
1367
|
+
justify-content: center;
|
|
1368
|
+
width: var(--viking-space-4);
|
|
1369
|
+
height: var(--viking-space-4);
|
|
1370
|
+
color: var(--viking-accent);
|
|
1371
|
+
flex: 0 0 auto;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
.suite-header__lockup {
|
|
1375
|
+
display: none;
|
|
1376
|
+
min-width: 0;
|
|
1377
|
+
color: var(--viking-text);
|
|
1378
|
+
font-size: var(--viking-font-size-sm);
|
|
1379
|
+
font-weight: var(--viking-font-weight-bold);
|
|
1380
|
+
line-height: var(--viking-line-height-tight);
|
|
1381
|
+
letter-spacing: var(--viking-letter-spacing-caps);
|
|
1382
|
+
text-transform: uppercase;
|
|
1383
|
+
white-space: nowrap;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.suite-header__nav {
|
|
1387
|
+
display: none;
|
|
1388
|
+
align-items: center;
|
|
1389
|
+
justify-content: center;
|
|
1390
|
+
gap: var(--viking-space-half);
|
|
1391
|
+
min-width: 0;
|
|
1392
|
+
overflow: hidden;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
.suite-header__link {
|
|
1396
|
+
display: inline-flex;
|
|
1397
|
+
align-items: center;
|
|
1398
|
+
justify-content: center;
|
|
1399
|
+
gap: var(--viking-space-half);
|
|
1400
|
+
min-width: 0;
|
|
1401
|
+
height: var(--viking-control-height);
|
|
1402
|
+
padding-inline: var(--viking-space-1-5);
|
|
1403
|
+
color: var(--viking-text-muted);
|
|
1404
|
+
border-radius: var(--viking-radius) var(--viking-radius) 0 0;
|
|
1405
|
+
font-size: var(--viking-font-size-sm);
|
|
1406
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
1407
|
+
line-height: var(--viking-line-height-none);
|
|
1408
|
+
letter-spacing: var(--viking-letter-spacing-caps);
|
|
1409
|
+
text-decoration: none;
|
|
1410
|
+
text-transform: uppercase;
|
|
1411
|
+
white-space: nowrap;
|
|
1412
|
+
transition: var(--viking-transition-interactive);
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
.suite-header__link:hover,
|
|
1416
|
+
.suite-header__link[aria-current='page'] {
|
|
1417
|
+
color: var(--viking-text);
|
|
1418
|
+
background: var(--viking-surface-alt);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
.suite-header__actions {
|
|
1422
|
+
display: inline-flex;
|
|
1423
|
+
align-items: center;
|
|
1424
|
+
justify-content: flex-end;
|
|
1425
|
+
gap: var(--viking-space-1);
|
|
1426
|
+
min-width: 0;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
.suite-header__icon-button,
|
|
1430
|
+
.suite-header__menu-button,
|
|
1431
|
+
.suite-header__user-trigger,
|
|
1432
|
+
.suite-header__auth-link {
|
|
1433
|
+
min-height: var(--viking-control-height);
|
|
1434
|
+
border: var(--viking-border-width, 1px) solid var(--viking-border-strong);
|
|
1435
|
+
border-radius: var(--viking-radius);
|
|
1436
|
+
background: var(--viking-surface);
|
|
1437
|
+
color: var(--viking-text);
|
|
1438
|
+
box-shadow: var(--viking-shadow-sm);
|
|
1439
|
+
cursor: pointer;
|
|
1440
|
+
font-family: inherit;
|
|
1441
|
+
transition: var(--viking-transition-interactive);
|
|
1442
|
+
-webkit-tap-highlight-color: transparent;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
.suite-header__icon-button,
|
|
1446
|
+
.suite-header__menu-button {
|
|
1447
|
+
display: inline-flex;
|
|
1448
|
+
align-items: center;
|
|
1449
|
+
justify-content: center;
|
|
1450
|
+
width: var(--viking-control-height);
|
|
1451
|
+
min-width: var(--viking-control-height);
|
|
1452
|
+
padding: 0;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
.suite-header__icon-button:hover,
|
|
1456
|
+
.suite-header__menu-button:hover,
|
|
1457
|
+
.suite-header__user-trigger:hover,
|
|
1458
|
+
.suite-header__auth-link:hover {
|
|
1459
|
+
border-color: var(--viking-accent-strong);
|
|
1460
|
+
background: var(--viking-surface-alt);
|
|
1461
|
+
box-shadow: var(--viking-shadow-md);
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
.suite-header__auth-link {
|
|
1465
|
+
display: none;
|
|
1466
|
+
align-items: center;
|
|
1467
|
+
justify-content: center;
|
|
1468
|
+
gap: var(--viking-space-half);
|
|
1469
|
+
min-width: max-content;
|
|
1470
|
+
padding-inline: var(--viking-space-2);
|
|
1471
|
+
background: var(--viking-accent);
|
|
1472
|
+
border-color: var(--viking-accent);
|
|
1473
|
+
color: var(--viking-accent-content);
|
|
1474
|
+
font-size: var(--viking-font-size-sm);
|
|
1475
|
+
font-weight: var(--viking-font-weight-bold);
|
|
1476
|
+
line-height: var(--viking-line-height-none);
|
|
1477
|
+
letter-spacing: var(--viking-letter-spacing-caps);
|
|
1478
|
+
text-decoration: none;
|
|
1479
|
+
text-transform: uppercase;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.suite-header__auth-link:hover {
|
|
1483
|
+
background: var(--viking-accent-hover);
|
|
1484
|
+
color: var(--viking-accent-content);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
.suite-header__user {
|
|
1488
|
+
position: relative;
|
|
1489
|
+
display: none;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.suite-header__user-trigger {
|
|
1493
|
+
display: inline-flex;
|
|
1494
|
+
align-items: center;
|
|
1495
|
+
justify-content: center;
|
|
1496
|
+
gap: var(--viking-space-1);
|
|
1497
|
+
min-width: max-content;
|
|
1498
|
+
padding-inline: var(--viking-space-1);
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
.suite-header__avatar {
|
|
1502
|
+
display: inline-flex;
|
|
1503
|
+
align-items: center;
|
|
1504
|
+
justify-content: center;
|
|
1505
|
+
width: var(--viking-space-3);
|
|
1506
|
+
height: var(--viking-space-3);
|
|
1507
|
+
border-radius: var(--viking-radius-full);
|
|
1508
|
+
background: var(--viking-accent-soft);
|
|
1509
|
+
color: var(--viking-accent-strong);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
.suite-header__user-text {
|
|
1513
|
+
display: none;
|
|
1514
|
+
max-width: var(--viking-space-16);
|
|
1515
|
+
overflow: hidden;
|
|
1516
|
+
color: var(--viking-text);
|
|
1517
|
+
font-size: var(--viking-font-size-sm);
|
|
1518
|
+
font-weight: var(--viking-font-weight-semibold);
|
|
1519
|
+
line-height: var(--viking-line-height-tight);
|
|
1520
|
+
text-overflow: ellipsis;
|
|
1521
|
+
white-space: nowrap;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
.suite-header__menu {
|
|
1525
|
+
position: absolute;
|
|
1526
|
+
inset-block-start: calc(100% + var(--viking-space-1));
|
|
1527
|
+
inset-inline-end: 0;
|
|
1528
|
+
display: none;
|
|
1529
|
+
min-width: var(--viking-space-24);
|
|
1530
|
+
padding: var(--viking-space-1);
|
|
1531
|
+
background: var(--viking-surface);
|
|
1532
|
+
border: var(--viking-border-width, 1px) solid var(--viking-border-strong);
|
|
1533
|
+
border-radius: var(--viking-radius);
|
|
1534
|
+
box-shadow: var(--viking-shadow-lg);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
.suite-header__user[data-open='true'] .suite-header__menu {
|
|
1538
|
+
display: grid;
|
|
1539
|
+
gap: var(--viking-space-half);
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
.suite-header__menu-label {
|
|
1543
|
+
padding: var(--viking-space-1);
|
|
1544
|
+
color: var(--viking-text-muted);
|
|
1545
|
+
font-size: var(--viking-font-size-xs);
|
|
1546
|
+
line-height: var(--viking-line-height-tight);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.suite-header__menu-label strong {
|
|
1550
|
+
display: block;
|
|
1551
|
+
color: var(--viking-text);
|
|
1552
|
+
font-size: var(--viking-font-size-sm);
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
.suite-header__menu-link,
|
|
1556
|
+
.suite-header__menu-button {
|
|
1557
|
+
display: inline-flex;
|
|
1558
|
+
align-items: center;
|
|
1559
|
+
justify-content: flex-start;
|
|
1560
|
+
gap: var(--viking-space-1);
|
|
1561
|
+
width: 100%;
|
|
1562
|
+
min-height: var(--viking-control-height);
|
|
1563
|
+
padding-inline: var(--viking-space-1);
|
|
1564
|
+
background: transparent;
|
|
1565
|
+
border: 0;
|
|
1566
|
+
border-radius: var(--viking-radius-sm);
|
|
1567
|
+
box-shadow: none;
|
|
1568
|
+
color: var(--viking-text);
|
|
1569
|
+
font: inherit;
|
|
1570
|
+
text-align: start;
|
|
1571
|
+
text-decoration: none;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
.suite-header__menu-link:hover,
|
|
1575
|
+
.suite-header__menu-button:hover {
|
|
1576
|
+
background: var(--viking-surface-alt);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
.suite-header__mobile {
|
|
1580
|
+
display: none;
|
|
1581
|
+
width: 100%;
|
|
1582
|
+
max-width: var(--viking-container-max-width);
|
|
1583
|
+
margin-inline: auto;
|
|
1584
|
+
padding: 0 var(--viking-page-gutter) var(--viking-space-2);
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
.suite-header[data-menu-open='true'] .suite-header__mobile {
|
|
1588
|
+
display: grid;
|
|
1589
|
+
gap: var(--viking-space-1);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.suite-header__mobile .suite-header__link,
|
|
1593
|
+
.suite-header__mobile .suite-header__auth-link,
|
|
1594
|
+
.suite-header__mobile .suite-header__menu-button {
|
|
1595
|
+
display: inline-flex;
|
|
1596
|
+
justify-content: flex-start;
|
|
1597
|
+
width: 100%;
|
|
1598
|
+
border-radius: var(--viking-radius);
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
.suite-header__mobile .suite-header__auth-link {
|
|
1602
|
+
justify-content: center;
|
|
1603
|
+
margin-block-start: var(--viking-space-1);
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
viking-suite-command-palette {
|
|
1607
|
+
display: contents;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
@media (min-width: 520px) {
|
|
1611
|
+
.suite-header__lockup,
|
|
1612
|
+
.suite-header__user-text {
|
|
1613
|
+
display: inline;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
@media (min-width: 768px) {
|
|
1618
|
+
.suite-header__bar {
|
|
1619
|
+
padding-inline: var(--viking-page-gutter-lg);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.suite-header__nav {
|
|
1623
|
+
display: flex;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
.suite-header__auth-link,
|
|
1627
|
+
.suite-header__user {
|
|
1628
|
+
display: inline-flex;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
.suite-header__menu-button {
|
|
1632
|
+
display: none;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
`,xt=()=>{let t=document.documentElement.getAttribute("data-deml-context");if(t&&Pe.has(t))return t;let e=window.location.hostname;return e.startsWith("ui.")?"docs":e.startsWith("backend.")?"backend":e.includes("deml.app")?"app":"marketing"},wt=t=>{let e=t.getAttribute("context");return e&&Pe.has(e)?e:xt()},Et=t=>{let e=globalThis.__DEML??{};return{app:t.getAttribute("app-url")??e.app??A.app,marketing:t.getAttribute("marketing-url")??e.marketing??A.marketing,backend:t.getAttribute("backend-url")??e.backend??A.backend}},St=t=>{try{let e=new URL(t,window.location.origin);return e.origin===window.location.origin&&e.pathname===window.location.pathname}catch{return!1}},D=class extends l{static tag="viking-suite-header";static get observedAttributes(){return["context","app-url","marketing-url","backend-url","authenticated","user-name","user-email","sign-in-href","dashboard-href"]}shadow;menuOpen=!1;userMenuOpen=!1;paletteEl=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),v(this.shadow,yt)}connectedCallback(){z(),$(),this.render(),document.addEventListener("click",this.onDocumentClick)}disconnectedCallback(){document.removeEventListener("click",this.onDocumentClick)}attributeChangedCallback(){this.isConnected&&this.render()}openSearch(){this.paletteEl?.openPalette(),this.dispatchEvent(new CustomEvent("viking-search-open",{bubbles:!0,composed:!0}))}onDocumentClick=e=>{e.composedPath().includes(this)||(this.menuOpen||this.userMenuOpen)&&(this.menuOpen=!1,this.userMenuOpen=!1,this.syncOpenState())};onSearchClick=()=>{this.openSearch()};onMenuClick=()=>{this.menuOpen=!this.menuOpen,this.syncOpenState()};onUserClick=()=>{this.userMenuOpen=!this.userMenuOpen,this.syncOpenState()};onSignInClick=e=>{let i=new CustomEvent("viking-sign-in",{bubbles:!0,cancelable:!0,composed:!0,detail:e});this.dispatchEvent(i),i.defaultPrevented&&e.preventDefault()};onSignOutClick=()=>{this.userMenuOpen=!1,this.menuOpen=!1,this.syncOpenState(),this.dispatchEvent(new CustomEvent("viking-sign-out",{bubbles:!0,composed:!0}))};syncOpenState(){let e=this.shadow.querySelector(".suite-header"),i=this.shadow.querySelector("[data-menu-toggle]"),r=this.shadow.querySelector(".suite-header__user"),n=this.shadow.querySelector("[data-user-toggle]");e?.setAttribute("data-menu-open",String(this.menuOpen)),i?.setAttribute("aria-expanded",String(this.menuOpen)),r?.setAttribute("data-open",String(this.userMenuOpen)),n?.setAttribute("aria-expanded",String(this.userMenuOpen))}renderNavLinks(e,i,r){return ze(J,r).map(n=>{let o=te(n,e,i),s=St(o)?' aria-current="page"':"";return`
|
|
1636
|
+
<a class="suite-header__link" href="${a(o)}"${s}>
|
|
1637
|
+
${g(n.icon,16,"suite-header__link-icon")}
|
|
1638
|
+
<span>${a(n.label)}</span>
|
|
1639
|
+
</a>
|
|
1640
|
+
`}).join("")}renderAuth(e,i,r=!1){if(!i){let s=this.getAttribute("sign-in-href")??`${e.app}/login`;return`
|
|
1641
|
+
<a class="suite-header__auth-link" href="${a(s)}" data-sign-in>
|
|
1642
|
+
<span>Sign In</span>
|
|
1643
|
+
${g("arrow-right",16,"suite-header__auth-icon")}
|
|
1644
|
+
</a>
|
|
1645
|
+
`}if(r)return`
|
|
1646
|
+
<a class="suite-header__menu-link" href="${a(this.getDashboardHref(e))}">
|
|
1647
|
+
${g("home",16,"suite-header__menu-icon")}
|
|
1648
|
+
<span>Dashboard</span>
|
|
1649
|
+
</a>
|
|
1650
|
+
<button class="suite-header__menu-button" type="button" data-sign-out>
|
|
1651
|
+
${g("log-out",16,"suite-header__menu-icon")}
|
|
1652
|
+
<span>Sign Out</span>
|
|
1653
|
+
</button>
|
|
1654
|
+
`;let n=this.getAttribute("user-name")??"Account",o=this.getAttribute("user-email")??"";return`
|
|
1655
|
+
<div class="suite-header__user" data-open="${String(this.userMenuOpen)}">
|
|
1656
|
+
<button
|
|
1657
|
+
class="suite-header__user-trigger"
|
|
1658
|
+
type="button"
|
|
1659
|
+
aria-haspopup="menu"
|
|
1660
|
+
aria-expanded="${String(this.userMenuOpen)}"
|
|
1661
|
+
data-user-toggle
|
|
1662
|
+
>
|
|
1663
|
+
<span class="suite-header__avatar" aria-hidden="true">
|
|
1664
|
+
${g("user",16,"suite-header__avatar-icon")}
|
|
1665
|
+
</span>
|
|
1666
|
+
<span class="suite-header__user-text">${a(n)}</span>
|
|
1667
|
+
${g("chevron-down",16,"suite-header__chevron")}
|
|
1668
|
+
</button>
|
|
1669
|
+
<div class="suite-header__menu" role="menu">
|
|
1670
|
+
<div class="suite-header__menu-label">
|
|
1671
|
+
<strong>${a(n)}</strong>
|
|
1672
|
+
${o?`<span>${a(o)}</span>`:""}
|
|
1673
|
+
</div>
|
|
1674
|
+
<a class="suite-header__menu-link" role="menuitem" href="${a(this.getDashboardHref(e))}">
|
|
1675
|
+
${g("home",16,"suite-header__menu-icon")}
|
|
1676
|
+
<span>Dashboard</span>
|
|
1677
|
+
</a>
|
|
1678
|
+
<button class="suite-header__menu-button" type="button" role="menuitem" data-sign-out>
|
|
1679
|
+
${g("log-out",16,"suite-header__menu-icon")}
|
|
1680
|
+
<span>Sign Out</span>
|
|
1681
|
+
</button>
|
|
1682
|
+
</div>
|
|
1683
|
+
</div>
|
|
1684
|
+
`}getDashboardHref(e){return this.getAttribute("dashboard-href")??`${e.app}/dashboard`}render(){let e=wt(this),i=Et(this),r=h(this,"authenticated"),n=this.renderNavLinks(e,i,r),o=Oe(e,i),s=`${q()}K`;this.shadow.innerHTML=`
|
|
1685
|
+
<header class="suite-header" data-menu-open="${String(this.menuOpen)}">
|
|
1686
|
+
<div class="suite-header__bar">
|
|
1687
|
+
<a class="suite-header__brand" href="${a(o)}" aria-label="Data Engineering for Machine Learning home">
|
|
1688
|
+
<span class="suite-header__mark" aria-hidden="true">
|
|
1689
|
+
${g("drakkar",28,"suite-header__brand-icon")}
|
|
1690
|
+
</span>
|
|
1691
|
+
<span class="suite-header__lockup">DEML</span>
|
|
1692
|
+
</a>
|
|
1693
|
+
|
|
1694
|
+
<nav class="suite-header__nav" aria-label="Main navigation">
|
|
1695
|
+
${n}
|
|
1696
|
+
</nav>
|
|
1697
|
+
|
|
1698
|
+
<div class="suite-header__actions">
|
|
1699
|
+
<button
|
|
1700
|
+
class="suite-header__icon-button"
|
|
1701
|
+
type="button"
|
|
1702
|
+
aria-label="Open command palette (${s})"
|
|
1703
|
+
title="Open command palette (${s})"
|
|
1704
|
+
data-search-trigger
|
|
1705
|
+
>
|
|
1706
|
+
${g("search",18,"suite-header__action-icon")}
|
|
1707
|
+
</button>
|
|
1708
|
+
${this.renderAuth(i,r)}
|
|
1709
|
+
<viking-theme-toggle-wc></viking-theme-toggle-wc>
|
|
1710
|
+
<button
|
|
1711
|
+
class="suite-header__menu-button"
|
|
1712
|
+
type="button"
|
|
1713
|
+
aria-label="Toggle navigation menu"
|
|
1714
|
+
aria-expanded="${String(this.menuOpen)}"
|
|
1715
|
+
data-menu-toggle
|
|
1716
|
+
>
|
|
1717
|
+
${g(this.menuOpen?"x":"menu",18,"suite-header__action-icon")}
|
|
1718
|
+
</button>
|
|
1719
|
+
</div>
|
|
1720
|
+
</div>
|
|
1721
|
+
|
|
1722
|
+
<nav class="suite-header__mobile" aria-label="Mobile navigation">
|
|
1723
|
+
${n}
|
|
1724
|
+
${this.renderAuth(i,r,!0)}
|
|
1725
|
+
</nav>
|
|
1726
|
+
</header>
|
|
1727
|
+
<viking-suite-command-palette
|
|
1728
|
+
context="${e}"
|
|
1729
|
+
app-url="${a(i.app)}"
|
|
1730
|
+
marketing-url="${a(i.marketing)}"
|
|
1731
|
+
backend-url="${a(i.backend)}"
|
|
1732
|
+
global-shortcut
|
|
1733
|
+
></viking-suite-command-palette>
|
|
1734
|
+
`,this.paletteEl=this.shadow.querySelector("viking-suite-command-palette"),this.shadow.querySelector("[data-search-trigger]")?.addEventListener("click",this.onSearchClick),this.shadow.querySelector("[data-menu-toggle]")?.addEventListener("click",this.onMenuClick),this.shadow.querySelector("[data-user-toggle]")?.addEventListener("click",this.onUserClick),this.shadow.querySelectorAll("[data-sign-in]").forEach(u=>u.addEventListener("click",this.onSignInClick)),this.shadow.querySelectorAll("[data-sign-out]").forEach(u=>u.addEventListener("click",this.onSignOutClick))}},ie=()=>{c(D.tag,D)};var C=class extends l{static formAssociated=!0;static tag="viking-select";static legacyTag="viking-select-wc";static get observedAttributes(){return["label","name","value","placeholder","description","error","width","disabled","required"]}shadow;internals;selectEl=null;optionObserver=null;controlId=x("viking-select");constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.internals=B(this),v(this.shadow,Ae)}connectedCallback(){this.render(),this.syncOptions(),this.observeOptions(),this.selectEl?.addEventListener("change",this.onChange)}disconnectedCallback(){this.selectEl?.removeEventListener("change",this.onChange),this.optionObserver?.disconnect(),this.optionObserver=null}attributeChangedCallback(e){if(this.isConnected){if(e==="value"&&this.selectEl){this.selectEl.value=this.getAttribute("value")??"",this.syncFormValue();return}if(e==="error"||e==="description"||e==="label"){this.render(),this.syncOptions();return}this.render(),this.syncOptions()}}get value(){return this.selectEl?.value??this.getAttribute("value")??""}set value(e){this.setAttribute("value",e),this.selectEl&&(this.selectEl.value=e),this.syncFormValue()}onChange=()=>{let e=this.selectEl?.value??"";this.setAttribute("value",e),this.syncFormValue(),this.dispatchEvent(new CustomEvent("viking-change",{bubbles:!0,composed:!0,detail:{value:e}}))};syncFormValue(){K(this.internals,this.value)}observeOptions(){this.optionObserver?.disconnect(),this.optionObserver=new MutationObserver(()=>this.syncOptions()),this.optionObserver.observe(this,{childList:!0,subtree:!0,characterData:!0})}render(){let e=this.getAttribute("label")??"",i=this.getAttribute("name")??"",r=this.hasAttribute("disabled"),n=this.hasAttribute("required"),o=this.getAttribute("error")??"",s=this.getAttribute("description")??"",u=[s&&`${this.controlId}-desc`,o&&`${this.controlId}-error`].filter(Boolean).join(" ");this.shadow.innerHTML=`
|
|
1735
|
+
<div class="viking-field" part="field">
|
|
1736
|
+
${e?`<label class="viking-field-label" part="label" for="${this.controlId}">${a(e)}</label>`:""}
|
|
1737
|
+
<select
|
|
1738
|
+
id="${this.controlId}"
|
|
1739
|
+
class="viking-select-native"
|
|
1740
|
+
part="control"
|
|
1741
|
+
${i?`name="${a(i)}"`:""}
|
|
1742
|
+
${r?"disabled":""}
|
|
1743
|
+
${n?"required":""}
|
|
1744
|
+
${o?'aria-invalid="true"':""}
|
|
1745
|
+
${u?`aria-describedby="${u}"`:""}
|
|
1746
|
+
></select>
|
|
1747
|
+
${s?`<p id="${this.controlId}-desc" class="viking-field-description" part="description">${a(s)}</p>`:""}
|
|
1748
|
+
${o?`<p id="${this.controlId}-error" class="viking-field-error" part="error" role="alert">${a(o)}</p>`:""}
|
|
1749
|
+
</div>
|
|
1750
|
+
`,this.selectEl=this.shadow.querySelector("select");let p=this.getAttribute("value");this.selectEl&&p&&(this.selectEl.value=p),this.syncFormValue()}syncOptions(){if(!this.selectEl)return;let e=this.selectEl.value;this.selectEl.innerHTML="";let i=this.querySelectorAll("option");if(i.length===0){let n=this.getAttribute("placeholder")??"Select\u2026",o=document.createElement("option");o.value="",o.textContent=n,o.disabled=!0,o.selected=!this.getAttribute("value"),this.selectEl.append(o);return}i.forEach(n=>{this.selectEl?.append(n.cloneNode(!0))});let r=this.getAttribute("value");r?this.selectEl.value=r:e&&(this.selectEl.value=e),this.syncFormValue()}},re=()=>{c(C.tag,C),d(C.legacyTag,C)};var he=()=>{F(),X(),Z(),U(),j(),Y(),re(),Q(),H(),ie(),$(),z()};typeof globalThis<"u"&&typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",he):he());return Fe(It);})();
|