@supersoniks/concorde 3.0.12 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +129 -124
  3. package/concorde-core.es.js +1117 -1101
  4. package/dist/concorde-core.bundle.js +129 -124
  5. package/dist/concorde-core.es.js +1117 -1101
  6. package/dist/fonts/ClashGrotesk-Bold.eot +0 -0
  7. package/dist/fonts/ClashGrotesk-Bold.ttf +0 -0
  8. package/dist/fonts/ClashGrotesk-Bold.woff +0 -0
  9. package/dist/fonts/ClashGrotesk-Bold.woff2 +0 -0
  10. package/dist/fonts/ClashGrotesk-Extralight.eot +0 -0
  11. package/dist/fonts/ClashGrotesk-Extralight.ttf +0 -0
  12. package/dist/fonts/ClashGrotesk-Extralight.woff +0 -0
  13. package/dist/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  14. package/dist/fonts/ClashGrotesk-Light.eot +0 -0
  15. package/dist/fonts/ClashGrotesk-Light.ttf +0 -0
  16. package/dist/fonts/ClashGrotesk-Light.woff +0 -0
  17. package/dist/fonts/ClashGrotesk-Light.woff2 +0 -0
  18. package/dist/fonts/ClashGrotesk-Medium.eot +0 -0
  19. package/dist/fonts/ClashGrotesk-Medium.ttf +0 -0
  20. package/dist/fonts/ClashGrotesk-Medium.woff +0 -0
  21. package/dist/fonts/ClashGrotesk-Medium.woff2 +0 -0
  22. package/dist/fonts/ClashGrotesk-Regular.eot +0 -0
  23. package/dist/fonts/ClashGrotesk-Regular.ttf +0 -0
  24. package/dist/fonts/ClashGrotesk-Regular.woff +0 -0
  25. package/dist/fonts/ClashGrotesk-Regular.woff2 +0 -0
  26. package/dist/fonts/ClashGrotesk-Semibold.eot +0 -0
  27. package/dist/fonts/ClashGrotesk-Semibold.ttf +0 -0
  28. package/dist/fonts/ClashGrotesk-Semibold.woff +0 -0
  29. package/dist/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  30. package/dist/fonts/ClashGrotesk-Variable.eot +0 -0
  31. package/dist/fonts/ClashGrotesk-Variable.ttf +0 -0
  32. package/dist/fonts/ClashGrotesk-Variable.woff +0 -0
  33. package/dist/fonts/ClashGrotesk-Variable.woff2 +0 -0
  34. package/dist/img/concorde-icon.svg +5 -0
  35. package/dist/img/concorde_seuil.png.webp +0 -0
  36. package/dist/img/concorde_seuil_invert.png +0 -0
  37. package/index.html +67 -108
  38. package/package.json +2 -2
  39. package/public/fonts/ClashGrotesk-Bold.eot +0 -0
  40. package/public/fonts/ClashGrotesk-Bold.ttf +0 -0
  41. package/public/fonts/ClashGrotesk-Bold.woff +0 -0
  42. package/public/fonts/ClashGrotesk-Bold.woff2 +0 -0
  43. package/public/fonts/ClashGrotesk-Extralight.eot +0 -0
  44. package/public/fonts/ClashGrotesk-Extralight.ttf +0 -0
  45. package/public/fonts/ClashGrotesk-Extralight.woff +0 -0
  46. package/public/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  47. package/public/fonts/ClashGrotesk-Light.eot +0 -0
  48. package/public/fonts/ClashGrotesk-Light.ttf +0 -0
  49. package/public/fonts/ClashGrotesk-Light.woff +0 -0
  50. package/public/fonts/ClashGrotesk-Light.woff2 +0 -0
  51. package/public/fonts/ClashGrotesk-Medium.eot +0 -0
  52. package/public/fonts/ClashGrotesk-Medium.ttf +0 -0
  53. package/public/fonts/ClashGrotesk-Medium.woff +0 -0
  54. package/public/fonts/ClashGrotesk-Medium.woff2 +0 -0
  55. package/public/fonts/ClashGrotesk-Regular.eot +0 -0
  56. package/public/fonts/ClashGrotesk-Regular.ttf +0 -0
  57. package/public/fonts/ClashGrotesk-Regular.woff +0 -0
  58. package/public/fonts/ClashGrotesk-Regular.woff2 +0 -0
  59. package/public/fonts/ClashGrotesk-Semibold.eot +0 -0
  60. package/public/fonts/ClashGrotesk-Semibold.ttf +0 -0
  61. package/public/fonts/ClashGrotesk-Semibold.woff +0 -0
  62. package/public/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  63. package/public/fonts/ClashGrotesk-Variable.eot +0 -0
  64. package/public/fonts/ClashGrotesk-Variable.ttf +0 -0
  65. package/public/fonts/ClashGrotesk-Variable.woff +0 -0
  66. package/public/fonts/ClashGrotesk-Variable.woff2 +0 -0
  67. package/public/img/concorde-icon.svg +5 -0
  68. package/public/img/concorde_seuil.png.webp +0 -0
  69. package/public/img/concorde_seuil_invert.png +0 -0
  70. package/src/core/components/ui/menu/menu-item.ts +3 -3
  71. package/src/core/components/ui/pop/pop.ts +54 -19
  72. package/src/core/components/ui/theme/theme.ts +28 -22
  73. package/src/core/components/ui/toast/toast.ts +1 -3
  74. package/src/core/utils/PublisherProxy.ts +15 -11
  75. package/src/docs/_core-concept/subscriber.md +1 -1
  76. package/src/docs/_getting-started/concorde-outside.md +12 -10
  77. package/src/docs/_getting-started/create-a-component.md +1 -1
  78. package/src/docs/_getting-started/pubsub.md +1 -1
  79. package/src/docs/_getting-started/start.md +19 -17
  80. package/src/docs/docs.ts +1 -0
  81. package/src/docs/header/header.ts +217 -0
  82. package/src/docs/navigation/navigation.ts +123 -51
  83. package/src/docs/search/docs-search.json +85 -100
  84. package/src/docs/search/page.ts +4 -5
  85. package/src/docs/search/search.ts +18 -3
  86. package/src/docs/tailwind/css/tailwind.css +146 -0
  87. package/tailwind.config.js +19 -24
  88. package/vite/config.js +19 -1
@@ -1,9 +1,9 @@
1
- import {html, LitElement, css} from "lit";
2
- import {customElement, property} from "lit/decorators.js";
3
- import {coreVariables} from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
4
- import {light} from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
5
- import {dark} from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
6
- import {PublisherManager} from "@supersoniks/concorde/utils";
1
+ import { html, LitElement, css } from "lit";
2
+ import { customElement, property } from "lit/decorators.js";
3
+ import { coreVariables } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
4
+ import { light } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
5
+ import { dark } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
6
+ import { PublisherManager } from "@supersoniks/concorde/utils";
7
7
 
8
8
  const tagName = "sonic-theme";
9
9
 
@@ -40,12 +40,12 @@ export class Theme extends LitElement {
40
40
  return Theme.instance || document.body;
41
41
  }
42
42
 
43
- @property({type: String, reflect: true})
43
+ @property({ type: String, reflect: true })
44
44
  theme = "light";
45
45
 
46
- @property({type: Boolean, reflect: true}) background = false;
47
- @property({type: Boolean, reflect: true}) color = false;
48
- @property({type: Boolean, reflect: true}) font = false;
46
+ @property({ type: Boolean, reflect: true }) background = false;
47
+ @property({ type: Boolean, reflect: true }) color = false;
48
+ @property({ type: Boolean, reflect: true }) font = false;
49
49
 
50
50
  connectedCallback(): void {
51
51
  super.connectedCallback();
@@ -60,22 +60,25 @@ export class Theme extends LitElement {
60
60
  const fontUrls: string[] = [];
61
61
  for (let i = 0; i < ssLength; i++) {
62
62
  const ss = stylesheets[i];
63
- if (ss.href && (ss.href.includes("googleapis") || ss.href.includes("typekit.net"))) fontUrls.push(ss.href);
63
+ if (
64
+ ss.href &&
65
+ (ss.href.includes("googleapis") || ss.href.includes("typekit.net"))
66
+ )
67
+ fontUrls.push(ss.href);
64
68
  }
65
69
  const theme = {
66
70
  variables: this.getCssVariables(),
67
71
  fonts: fontUrls,
68
72
  };
69
73
  PublisherManager.get("sonic-theme")?.set(theme);
70
- document.querySelectorAll("iframe").forEach(
71
- (elt) =>
72
- elt.contentWindow?.postMessage(
73
- {
74
- type: "SonicTheme",
75
- ...theme,
76
- },
77
- "*"
78
- )
74
+ document.querySelectorAll("iframe").forEach((elt) =>
75
+ elt.contentWindow?.postMessage(
76
+ {
77
+ type: "SonicTheme",
78
+ ...theme,
79
+ },
80
+ "*"
81
+ )
79
82
  );
80
83
  }
81
84
 
@@ -87,8 +90,11 @@ export class Theme extends LitElement {
87
90
 
88
91
  getCssVariables() {
89
92
  const names: Array<string> = [];
90
- const stylesheets = [...Theme.styles.map((s) => s.styleSheet), ...Array.from(document.styleSheets)] as {
91
- cssRules: {style: string[]}[] | CSSRuleList;
93
+ const stylesheets = [
94
+ ...Theme.styles.map((s) => s.styleSheet),
95
+ ...Array.from(document.styleSheets),
96
+ ] as {
97
+ cssRules: { style: string[] }[] | CSSRuleList;
92
98
  }[];
93
99
  for (const stylesheet of stylesheets) {
94
100
  try {
@@ -207,9 +207,7 @@ export class SonicToast extends LitElement {
207
207
 
208
208
  declare const __SONIC_PREFIX__: string;
209
209
  if (typeof window !== "undefined") {
210
- if (__SONIC_PREFIX__ == "sonic") {
211
- window.SonicToast = window.SonicToast || SonicToast;
212
- }
210
+ window.SonicToast = window.SonicToast || SonicToast;
213
211
  }
214
212
 
215
213
  /**
@@ -26,19 +26,23 @@ const queueTaskPromise = async () => {
26
26
 
27
27
  declare const __BUILD_DATE__: string;
28
28
  declare const __SONIC_PREFIX__: string;
29
+ let SONIC_PREFIX = "sonic";
29
30
 
30
31
  if (typeof __BUILD_DATE__ === "undefined") {
31
32
  (window as any).__BUILD_DATE__ = "No build date";
32
33
  }
33
34
 
35
+ // console.log("PublisherProxy.ts loaded", (import.meta as any).env?.MODE);
36
+
34
37
  if (typeof __SONIC_PREFIX__ === "undefined") {
35
- (window as any).__SONIC_PREFIX__ = "sonic";
38
+ SONIC_PREFIX = "sonic" + Math.floor(Math.random() * 1000000);
36
39
  }
40
+ export const prefix = SONIC_PREFIX;
37
41
 
38
42
  const localStorageDataKey =
39
- __SONIC_PREFIX__ == "sonic"
43
+ SONIC_PREFIX == "sonic"
40
44
  ? "publisher-proxies-data"
41
- : __SONIC_PREFIX__ + "-publisher-proxies-data";
45
+ : SONIC_PREFIX + "-publisher-proxies-data";
42
46
 
43
47
  /**
44
48
  * Custom Proxy contient les méthodes des publishers retournés par PublisherManager.get(publisherId) qui seront utilisées couramment
@@ -365,11 +369,11 @@ export class PublisherProxy<T = any> {
365
369
  PublisherProxy.instances.set(this._instanceCounter_, this);
366
370
  const str =
367
371
  "<" +
368
- __SONIC_PREFIX__ +
372
+ SONIC_PREFIX +
369
373
  '-publisher-proxy publisher="' +
370
374
  this._instanceCounter_ +
371
375
  '"></' +
372
- __SONIC_PREFIX__ +
376
+ SONIC_PREFIX +
373
377
  "-publisher-proxy>";
374
378
  return str;
375
379
  }
@@ -430,8 +434,6 @@ export class PublisherManager {
430
434
  }
431
435
  }
432
436
  resolve(true);
433
- // compressedData = await this.compress(JSON.stringify(this.localStorageData), "gzip");
434
- // localStorage.setItem(__SONIC_PREFIX__+"-publisher-proxies-data", compressedData);
435
437
  } catch (e) {
436
438
  window.requestAnimationFrame(() => {
437
439
  resolve(false);
@@ -832,7 +834,9 @@ class PublisherWebComponent extends HTMLElement {
832
834
  this.innerHTML = value.toString();
833
835
  };
834
836
  }
835
- customElements.define(
836
- __SONIC_PREFIX__ + "-publisher-proxy",
837
- PublisherWebComponent
838
- );
837
+ try {
838
+ customElements.define(
839
+ SONIC_PREFIX + "-publisher-proxy",
840
+ PublisherWebComponent
841
+ );
842
+ } catch (e) {}
@@ -1,4 +1,4 @@
1
- # 🔔 The subscriber mixin
1
+ # The subscriber mixin
2
2
 
3
3
  This is a mixin that is commonly extended by Concorde core components and destination components. Pure UI components usually don't extend it, especially those outside of form components.
4
4
 
@@ -1,9 +1,8 @@
1
- # installation
1
+ # Installation
2
2
 
3
3
  ## Starter
4
4
 
5
- The easiest way to use Concorde is by using the Concorde starter.
6
-
5
+ The easiest way to use Concorde is by using the Concorde starter.
7
6
  The following command creates a new Vite project in TypeScript mode with Tailwind and an example component to get started.
8
7
 
9
8
  <sonic-code language="shell">
@@ -12,10 +11,12 @@ npx @supersoniks/create-concorde-ts-starter "project_name"
12
11
  </template>
13
12
  </sonic-code>
14
13
 
14
+ ## Brand New Vite Project
15
+
16
+
15
17
  For a more manual configuration, you can refer to the following sections. <br/>
16
18
  However, the Tailwind configuration is not mentioned at the moment.
17
19
 
18
- ## Brand New Vite Project
19
20
 
20
21
  ### Creating the Project
21
22
 
@@ -23,9 +24,11 @@ However, the Tailwind configuration is not mentioned at the moment.
23
24
  <template>
24
25
  # Pure JavaScript project
25
26
  yarn create vite --template vanilla-js
26
- # TypeScript project (it is recommended to use this approach, which installs Lit separately if needed, via "yarn add lit")
27
+ # TypeScript project
28
+ # (it is recommended to use this approach, which installs Lit separately if needed, via "yarn add lit")
27
29
  yarn create vite --template vanilla-ts
28
- # TypeScript + Lit project (creating new web components, for example, to extend the fetch or subscriber mixins)
30
+ # TypeScript + Lit project
31
+ # (creating new web components, for example, to extend the fetch or subscriber mixins)
29
32
  yarn create vite --template lit-ts
30
33
  </template>
31
34
  </sonic-code>
@@ -81,8 +84,7 @@ The original paths remain accessible. Shortcut imports are used for the examples
81
84
 
82
85
  ### Simple Integration in HTML
83
86
 
84
- For example, to use a button:
85
- In `main.ts` or `main.js` to be compiled:
87
+ Import needed component in `main.ts` or wherever you want to use it:
86
88
 
87
89
  <sonic-code language="typescript">
88
90
  <template>
@@ -90,7 +92,7 @@ import "@supersoniks/concorde/ui/button";
90
92
  </template>
91
93
  </sonic-code>
92
94
 
93
- In the HTML of a JS or TS component or in the HTML of the web page that includes the compiled JS:
95
+ Then in the render function ofyour component or in the HTML of the web page that includes the compiled JS, use the component as follows:
94
96
 
95
97
  <sonic-code>
96
98
  <template>
@@ -124,7 +126,7 @@ export class SonicComponent extends Fetcher(Subscriber(LitElement)) {
124
126
  </template>
125
127
  </sonic-code>
126
128
 
127
- In `main.ts` or `main.js` or any other component that uses it to be compiled
129
+ Import component `main.ts` or `main.js` or any other component that uses it to be compiled
128
130
 
129
131
  <sonic-code language="typescript">
130
132
  <template>
@@ -1,4 +1,4 @@
1
- # 🧱 Creating components
1
+ # Creating components
2
2
 
3
3
  ## Where to put it?
4
4
 
@@ -1,4 +1,4 @@
1
- # 🥨 Sharing data
1
+ # Sharing data
2
2
 
3
3
  This section describes how we share data between graphical and non graphical components and classes.
4
4
 
@@ -2,33 +2,35 @@
2
2
 
3
3
  ## What is Concorde ?
4
4
 
5
- Based on [lit.dev](https://lit.dev), Concorde is a collection of functional & UI webcomponents, created to build easily shared components, beetween apps and websites. Or even to build a website or an app from scratch.
6
- It's like a toolbox to build user interfaces, faster, where everything is scoped, but preserving graphical consistency in set a few css variables.
5
+ Based on **[lit.dev](https://lit.dev)**, Concorde is a collection of webcomponents made to build shared components, between apps or websites.
6
+ Develop user interfaces without thinking about the implementation context, where everything is scoped, but preserving graphic consistency by setting the strict minimum of css variables.
7
7
 
8
8
  ## Why and use case
9
9
 
10
- At Supersoniks, we've created a ticketing management system that needs shared components which could be implemented in mobile apps, modern websites, and also old ones made in php, without bundlers or whatever.
11
- Instead of creating a new library for each type of project, which would become hard to maintain, we've decided to create one shared library, that could be used in any environment and pre-bundled for legacy environment.
12
- Webcomponents appeared to be a the perfect solution to guarantee that compatibility with all past, present and futures stacks.
10
+ In 2022, Supersoniks wanted to create a new version of his ticketing app, in production un nearly 100 websites. We needed shared components which could be implemented in mobile apps, modern websites, and also old ones made in php, without bundlers or whatever.
11
+ Instead of building a new app for each type of project, which would become impossible to maintain, we've decided to create one app, composed by a few webcomponents wich could easily be recomposed on any website.
12
+ Webcomponents appeared to be a the perfect solution to guarantee that compatibility with all past, present and futures environment, and lit seemed to be the best choice to build them.
13
13
 
14
- ### Functionnal features
14
+ ### Stack
15
+
16
+ * Lit
17
+ * Typescript
18
+ * Vite
19
+ * Tailwind, not in the core, but in the starter kit
20
+
21
+ ### Functionnal features and components
15
22
 
16
- * Fetching data, lists, queue with lazyload, etc.
17
23
  * Data management with Publisher / Subscriber pattern
24
+ * Form management
25
+ * Fetching data, lists, queue with lazyload
18
26
  * Data binding
19
- * Form management ("doux Jésus")
20
- * Simple router, state component,...
27
+ * Simple router, state component, ...
28
+ * All ui component, with status variations to build an app with a consistent design
21
29
 
22
- ### Tools
23
-
24
- * Lit, of course
25
- * Typescript
26
- * Vite
27
- * Tailwind (not in the core, but in the starter kit)
28
30
 
29
- ## Start a new project from scratch ?
31
+ ## Start a new project easily
30
32
 
31
- A new project with Vite, Typescript and Tailwind already configured and a simple example of a subscriber component :
33
+ A new project with Vite, Typescript and Tailwind already configured and a simple example of a subscriber component :
32
34
 
33
35
  <sonic-code language="bash">
34
36
  <template>
package/src/docs/docs.ts CHANGED
@@ -2,5 +2,6 @@ import "./search/search";
2
2
  import "./search/page";
3
3
  import "./search/markdown-renderer";
4
4
  import "./code";
5
+ import "./header/header";
5
6
  import "./navigation/navigation";
6
7
  import "./example/users";
@@ -0,0 +1,217 @@
1
+ import { html, LitElement, nothing } from "lit";
2
+ import { customElement, state } from "lit/decorators.js";
3
+ import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
4
+ import { tailwind } from "../tailwind";
5
+ import { animate } from "@lit-labs/motion";
6
+ import { Theme } from "@supersoniks/concorde/core/components/ui/theme/theme";
7
+ const tagName = "sonic-docs-header"; // For Astro.build
8
+ @customElement(tagName)
9
+ export class SonicComponent extends Subscriber(LitElement) {
10
+ static styles = [tailwind];
11
+
12
+ @state() theme: "dark" | "light" = "light";
13
+ @state() searchVisible = false;
14
+
15
+ connectedCallback() {
16
+ this.handleColorScheme();
17
+ super.connectedCallback();
18
+
19
+ // if escape key is pressed and search is visible, hide search
20
+ document.addEventListener("keydown", (e) => {
21
+ if (e.key === "Escape" && this.searchVisible) {
22
+ this.hideSearch();
23
+ }
24
+ });
25
+
26
+ // ctrl + k to toggle search
27
+ document.addEventListener("keydown", (e) => {
28
+ if (e.ctrlKey && e.key === "k") {
29
+ this.toggleSearch();
30
+ e.preventDefault();
31
+ }
32
+ // command + k to toggle search
33
+ if (e.metaKey && e.key === "k") {
34
+ this.toggleSearch();
35
+ e.preventDefault();
36
+ }
37
+ });
38
+
39
+ // on hash change, hide search
40
+ window.addEventListener("hashchange", () => {
41
+ this.hideSearch();
42
+ });
43
+ }
44
+
45
+ handleColorScheme() {
46
+ const themeComponent = document.querySelector("sonic-theme") as Theme;
47
+ if (
48
+ localStorage.sonicTheme === "dark" ||
49
+ (!("sonicTheme" in localStorage) &&
50
+ window.matchMedia("(prefers-color-scheme: dark)").matches)
51
+ ) {
52
+ document.documentElement.setAttribute("data-concorde-theme", "dark");
53
+ document.documentElement.classList.add("dark");
54
+ this.theme = "dark";
55
+ themeComponent.theme = "dark";
56
+ } else {
57
+ document.documentElement.classList.remove("dark");
58
+ document.documentElement.setAttribute("data-concorde-theme", "light");
59
+ this.theme = "light";
60
+ themeComponent.theme = "light";
61
+ }
62
+ }
63
+
64
+ setMode(theme: "dark" | "light") {
65
+ localStorage.sonicTheme = theme;
66
+ this.handleColorScheme();
67
+ }
68
+
69
+ hideSearch() {
70
+ this.searchVisible = false;
71
+ }
72
+ toggleSearch() {
73
+ this.searchVisible = !this.searchVisible;
74
+ }
75
+
76
+ render() {
77
+ return html`<div
78
+ class="flex items-center gap-4 border-b-[.18rem] text-content border-current py-3 sticky top-0 z-40 bg-neutral-0"
79
+ >
80
+ <div class="">
81
+ <sonic-link href="/" class="flex items-end gap-x-1">
82
+ <svg
83
+ class="size-[2.4rem] inline-block rotate-[55deg] "
84
+ viewBox="0 0 66 66"
85
+ fill="none"
86
+ xmlns="http://www.w3.org/2000/svg"
87
+
88
+ >
89
+ <circle cx="33" cy="33" r="30" fill="var(--sc-base-content)" />
90
+ <path
91
+ d="M33.2499 62.03C33.8799 59.24 34.26 56.17 34.39 53.08C34.57 52.78 34.9099 52.6 35.2599 52.64H35.39C35.48 52.64 35.5799 52.64 35.6899 52.64H35.7599C35.7599 52.64 35.7999 52.64 35.8299 52.64C36.2499 52.62 36.6799 52.58 36.9099 52.56C36.9399 52.56 36.9599 52.56 36.9799 52.56C37.0099 52.56 37.0299 52.56 37.0499 52.56H37.0899L37.2099 51.93H37.4799L37.5799 52.4L37.6899 52.49H39.2699L39.39 52.38L39.5099 51.93H39.7899L39.8399 52.21L39.9999 52.29L45.2099 51.86L46.2799 51.29C46.2799 51.29 46.2799 50.85 46.2399 50.25V50.18C46.2399 50.18 46.2399 50.13 46.2399 50.11C46.2099 49.62 46.1399 49.13 46.0399 48.65C45.7899 47.45 45.29 46 42.2 41.58C39.11 37.16 38.04 35.52 35.89 27.63C35.85 27.48 35.8199 27.35 35.7899 27.2C35.1399 24.53 34.6899 22.95 34.5199 22.38V10.89C34.4999 9.60996 34.3999 8.33996 34.2099 7.07996C34.0499 5.97996 33.6099 4.89996 33.3499 3.95996H32.6299C32.3599 4.89996 31.9299 5.97996 31.7699 7.06996C31.5799 8.33996 31.4799 9.60996 31.4599 10.89V22.38C31.2899 22.95 30.8299 24.52 30.1899 27.2C30.1599 27.35 30.1199 27.49 30.0899 27.63C27.9499 35.52 26.8699 37.16 23.7799 41.58C20.6899 46 20.1899 47.45 19.9399 48.65C19.8399 49.13 19.7799 49.62 19.7399 50.11C19.7399 50.13 19.7399 50.16 19.7399 50.18V50.25C19.6999 50.85 19.7 51.29 19.7 51.29L20.7699 51.86L25.9799 52.29L26.14 52.21L26.1899 51.93H26.4799L26.5999 52.38L26.7299 52.49H28.2999L28.4099 52.4L28.5099 51.93H28.7699L28.89 52.56H28.9399C28.9399 52.56 28.9799 52.56 29.0099 52.56C29.0299 52.56 29.0499 52.56 29.0799 52.56C29.3099 52.58 29.7499 52.63 30.1599 52.64C30.1799 52.64 30.2099 52.64 30.2299 52.64H30.2999C30.4099 52.64 30.5099 52.64 30.5999 52.64H30.7299C31.0799 52.6 31.4299 52.77 31.6099 53.08C31.7299 56.17 32.1099 59.24 32.7399 62.03H33.2499Z"
92
+ fill="var(--sc-base)"
93
+ />
94
+ </svg>
95
+
96
+ <span class="font-headings text-4xl leading-none inline-block italic font-medium"
97
+ >concorde</span
98
+ >
99
+ </sonic-link>
100
+ </div>
101
+
102
+ <div class="ml-auto flex gap-x-3 ">
103
+ <sonic-button
104
+ @click=${() => (this.searchVisible = !this.searchVisible)}
105
+ class="lg:min-w-[19rem]"
106
+ align="left"
107
+ >
108
+ Quick search...
109
+ <sonic-icon
110
+ name="magnifying-glass"
111
+ library="custom"
112
+ slot="prefix"
113
+ ></sonic-icon>
114
+ </sonic-button>
115
+
116
+ <sonic-pop>
117
+ <sonic-button shape="circle" variant="ghost" icon>
118
+ ${
119
+ this.theme == "light"
120
+ ? html`<sonic-icon name="sun" library="custom"></sonic-icon>`
121
+ : html`<sonic-icon name="moon" library="custom"></sonic-icon>`
122
+ }
123
+ </sonic-button>
124
+
125
+ <sonic-menu slot="content">
126
+ <sonic-menu-item
127
+ ?active="${this.theme == "light"}"
128
+ @click=${() => this.setMode("light")}
129
+ >
130
+ <sonic-icon
131
+ name="sun"
132
+ library="custom"
133
+ slot="prefix"
134
+ ></sonic-icon>
135
+ light
136
+ </sonic-menu-item>
137
+ <sonic-menu-item
138
+ ?active="${this.theme == "dark"}"
139
+ @click=${() => this.setMode("dark")}
140
+ >
141
+ <sonic-icon
142
+ name="moon"
143
+ library="custom"
144
+ slot="prefix"
145
+ ></sonic-icon>
146
+ dark
147
+ </sonic-menu-item>
148
+ </sonic-menu>
149
+ </sonic-pop>
150
+ </div>
151
+ </div>
152
+
153
+
154
+
155
+ ${
156
+ this.searchVisible
157
+ ? html`
158
+ <div
159
+ ${animate({
160
+ keyframeOptions: {
161
+ duration: 250,
162
+ },
163
+ in: [
164
+ {
165
+ opacity: 0,
166
+ },
167
+ ],
168
+ out: [
169
+ {
170
+ opacity: 0,
171
+ },
172
+ ],
173
+ stabilizeOut: true,
174
+ })}
175
+ class="fixed top-0 w-full left-0 z-[3000] pt-[20vh] flex items-center justify-center "
176
+ >
177
+ <div
178
+ @click=${() => this.hideSearch()}
179
+ class="bg-neutral-0 dark:bg-neutral-300 opacity-90 fixed top-0 left-0 w-full h-full "
180
+ ></div>
181
+
182
+ <div
183
+ ${animate({
184
+ keyframeOptions: {
185
+ duration: 250,
186
+ easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`,
187
+ },
188
+ in: [
189
+ {
190
+ transform: "translateY(1rem) scale(1.05)",
191
+ opacity: 0,
192
+ },
193
+ ],
194
+ out: [
195
+ {
196
+ transform: "scale(.90) ",
197
+ opacity: 0,
198
+ duration: 3000,
199
+ easing: `ease-in-out`,
200
+ },
201
+ ],
202
+ stabilizeOut: true,
203
+ })}
204
+ class="relative z-20 w-full max-w-[40rem] w-full block "
205
+ >
206
+ <docs-search setFocus class="max-w-[40rem] w-full block">
207
+ </docs-search>
208
+ </div>
209
+ </div>
210
+ `
211
+ : nothing
212
+ }
213
+ </div>
214
+
215
+ </div> `;
216
+ }
217
+ }