@supersoniks/concorde 5.0.4 → 5.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 (123) hide show
  1. package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
  2. package/.agents/skills/concorde-component-docs/template.md +45 -0
  3. package/.tmp-cem/custom-elements.json +13705 -0
  4. package/ai/cursor/rules/concorde-theme.mdc +1 -1
  5. package/ai/cursor/rules/concorde.mdc +1 -1
  6. package/ai/skills/concorde/SKILL.md +1 -1
  7. package/ai/skills/concorde-theme/SKILL.md +21 -10
  8. package/build-infos.json +1 -1
  9. package/concorde-3d.bundle.js +3960 -0
  10. package/concorde-3d.es.js +33433 -0
  11. package/concorde-core.bundle.js +507 -513
  12. package/concorde-core.es.js +4027 -3702
  13. package/concorde-hugging-face-infer.bundle.js +32 -0
  14. package/concorde-hugging-face-infer.es.js +2952 -0
  15. package/concorde-interactive.bundle.js +1157 -0
  16. package/concorde-interactive.es.js +10734 -0
  17. package/concorde-shader.bundle.js +116 -0
  18. package/concorde-shader.es.js +8353 -0
  19. package/concorde-webgpu.bundle.js +307 -0
  20. package/concorde-webgpu.es.js +8627 -0
  21. package/custom-elements-manifest.config.mjs +14 -0
  22. package/dist/concorde-core.bundle.js +507 -513
  23. package/dist/concorde-core.es.js +4027 -3702
  24. package/dist/docs-mock-api-sw.js +2 -0
  25. package/dist/docs-mock-api-sw.js.map +2 -2
  26. package/gitlab/job_tests.sh +0 -0
  27. package/index.html +4 -2
  28. package/package.json +42 -2
  29. package/public/docs-mock-api-sw.js +2 -0
  30. package/public/docs-mock-api-sw.js.map +2 -2
  31. package/scripts/generate-sdui-catalog.mjs +250 -0
  32. package/scripts/generate-sdui-catalog.spec.ts +91 -0
  33. package/scripts/pre-build.mjs +15 -0
  34. package/src/core/components/functional/if/if.ts +0 -0
  35. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
  36. package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
  37. package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
  38. package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
  39. package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
  40. package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
  41. package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
  42. package/src/core/components/functional/sdui/component-catalog.json +3103 -0
  43. package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
  44. package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
  45. package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
  46. package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
  47. package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
  48. package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
  49. package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
  50. package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
  51. package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
  52. package/src/core/components/functional/sdui/sdui.md +122 -0
  53. package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
  54. package/src/core/components/functional/sdui/sdui.ts +442 -34
  55. package/src/core/components/functional/sdui/types.ts +49 -0
  56. package/src/core/components/functional/value/value.ts +0 -0
  57. package/src/core/components/ui/_css/align.ts +1 -0
  58. package/src/core/components/ui/_css/type.ts +86 -8
  59. package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
  60. package/src/core/components/ui/alert/alert.md +21 -2
  61. package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  62. package/src/core/components/ui/badge/badge.md +19 -6
  63. package/src/core/components/ui/badge/badge.ts +8 -9
  64. package/src/core/components/ui/button/button.ts +5 -15
  65. package/src/core/components/ui/captcha/captcha.md +65 -6
  66. package/src/core/components/ui/card/card.md +73 -10
  67. package/src/core/components/ui/card/card.ts +24 -22
  68. package/src/core/components/ui/divider/divider.md +107 -13
  69. package/src/core/components/ui/divider/divider.ts +40 -33
  70. package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  71. package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
  72. package/src/core/components/ui/form/fieldset/legend.ts +13 -13
  73. package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  74. package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
  75. package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  76. package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
  77. package/src/core/components/ui/form/textarea/textarea.ts +4 -3
  78. package/src/core/components/ui/group/group.md +36 -36
  79. package/src/core/components/ui/group/group.ts +5 -10
  80. package/src/core/components/ui/icon/icon.md +132 -43
  81. package/src/core/components/ui/image/image.md +35 -3
  82. package/src/core/components/ui/link/link.md +43 -5
  83. package/src/core/components/ui/loader/loader.md +79 -22
  84. package/src/core/components/ui/loader/loader.ts +67 -27
  85. package/src/core/components/ui/loader/styles/fixed.ts +6 -11
  86. package/src/core/components/ui/menu/menu.md +133 -92
  87. package/src/core/components/ui/menu/menu.ts +53 -58
  88. package/src/core/components/ui/modal/modal.md +163 -47
  89. package/src/core/components/ui/modal/modal.ts +2 -4
  90. package/src/core/components/ui/pop/pop.md +217 -123
  91. package/src/core/components/ui/pop/pop.ts +0 -1
  92. package/src/core/components/ui/progress/progress.md +76 -30
  93. package/src/core/components/ui/progress/progress.ts +25 -56
  94. package/src/core/components/ui/table/table-caption.ts +2 -2
  95. package/src/core/components/ui/table/table-tbody.ts +3 -3
  96. package/src/core/components/ui/table/table-td.ts +23 -18
  97. package/src/core/components/ui/table/table-th.ts +8 -8
  98. package/src/core/components/ui/table/table-tr.ts +4 -4
  99. package/src/core/components/ui/table/table.md +147 -171
  100. package/src/core/components/ui/table/table.ts +20 -19
  101. package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
  102. package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
  103. package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
  104. package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
  105. package/src/core/components/ui/theme/theme.md +122 -0
  106. package/src/core/components/ui/theme/theme.ts +30 -7
  107. package/src/core/components/ui/toast/toast-item.ts +6 -9
  108. package/src/core/components/ui/toast/toast.md +108 -58
  109. package/src/core/components/ui/toast/types.ts +1 -1
  110. package/src/core/components/ui/tooltip/tooltip.md +68 -26
  111. package/src/docs/_getting-started/start.md +1 -1
  112. package/src/docs/_getting-started/theming.md +223 -61
  113. package/src/docs/code.ts +125 -58
  114. package/src/docs/header/header.ts +62 -54
  115. package/src/docs/mock-api/router.ts +2 -0
  116. package/src/docs/navigation/navigation.ts +6 -3
  117. package/src/docs/search/docs-search.json +2504 -399
  118. package/src/docs/search/markdown-renderer.ts +6 -6
  119. package/src/docs/search/search.ts +4 -4
  120. package/src/docs/tailwind/css/tailwind.css +6 -5
  121. package/src/tsconfig.json +108 -0
  122. package/src/tsconfig.tsbuildinfo +1 -1
  123. package/tailwind.config.js +19 -0
@@ -1,71 +1,97 @@
1
1
  # Tooltip
2
2
 
3
+ Tooltip shows a short **`label`** on hover (and on focus when the trigger can receive focus). Wrap the trigger in the default slot—buttons, icons, or plain text. Default **`placement`** is **`top`** (center-aligned). An empty **`label`** hides the bubble the same way as **`disabled`**.
4
+
5
+ ## Basic example
6
+
3
7
  <sonic-code>
4
8
  <template>
5
- <sonic-tooltip label="Tada : Text appears">hover me</sonic-tooltip>
9
+ <sonic-tooltip label="Additional context on hover">
10
+ <sonic-button variant="outline">Hover me</sonic-button>
11
+ </sonic-tooltip>
6
12
  </template>
7
13
  </sonic-code>
8
14
 
9
15
  ## Placement
10
16
 
11
- By default, tooltip is centered next to its content
17
+ Use **`top`** · **`bottom`** · **`left`** · **`right`** for the main axis. Add **`-start`** or **`-end`** to align the bubble along the anchor edge.
12
18
 
13
19
  <sonic-code>
14
20
  <template>
15
- <sonic-tooltip placement="top" label="Top text">
16
- <sonic-button>Top</sonic-button>
17
- </sonic-tooltip>
18
- <sonic-tooltip placement="bottom" label="Bottom text">
19
- <sonic-button>Bottom</sonic-button>
20
- </sonic-tooltip>
21
- <sonic-tooltip placement="right" label="Right text">
22
- <sonic-button>Right</sonic-button>
23
- </sonic-tooltip>
24
- <sonic-tooltip placement="left" label="Left text">
25
- <sonic-button>Left</sonic-button>
26
- </sonic-tooltip>
21
+ <div class="flex flex-wrap gap-2">
22
+ <sonic-tooltip placement="top" label="Top">
23
+ <sonic-button>Top</sonic-button>
24
+ </sonic-tooltip>
25
+ <sonic-tooltip placement="bottom" label="Bottom">
26
+ <sonic-button>Bottom</sonic-button>
27
+ </sonic-tooltip>
28
+ <sonic-tooltip placement="right" label="Right">
29
+ <sonic-button>Right</sonic-button>
30
+ </sonic-tooltip>
31
+ <sonic-tooltip placement="left" label="Left">
32
+ <sonic-button>Left</sonic-button>
33
+ </sonic-tooltip>
34
+ </div>
27
35
  </template>
28
36
  </sonic-code>
29
37
 
30
- ## More placement
38
+ ### Aligned placements
39
+
31
40
  <sonic-code>
32
41
  <template>
33
42
  <div class="flex gap-3 flex-wrap">
34
- <sonic-tooltip placement="top-start" label="My tooltip">
43
+ <sonic-tooltip placement="top-start" label="Top start">
35
44
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Top start</sonic-button>
36
45
  </sonic-tooltip>
37
- <sonic-tooltip placement="top-end" label="My tooltip">
46
+ <sonic-tooltip placement="top-end" label="Top end">
38
47
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Top end</sonic-button>
39
48
  </sonic-tooltip>
40
- <sonic-tooltip placement="bottom-start" label="My tooltip">
49
+ <sonic-tooltip placement="bottom-start" label="Bottom start">
41
50
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Bottom start</sonic-button>
42
51
  </sonic-tooltip>
43
- <sonic-tooltip placement="bottom-end" label="My tooltip">
52
+ <sonic-tooltip placement="bottom-end" label="Bottom end">
44
53
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Bottom end</sonic-button>
45
54
  </sonic-tooltip>
46
- <sonic-tooltip placement="right-start" label="My tooltip">
55
+ <sonic-tooltip placement="right-start" label="Right start">
47
56
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Right start</sonic-button>
48
57
  </sonic-tooltip>
49
- <sonic-tooltip placement="right-end" label="My tooltip">
58
+ <sonic-tooltip placement="right-end" label="Right end">
50
59
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Right end</sonic-button>
51
60
  </sonic-tooltip>
52
- <sonic-tooltip placement="left-start" label="My tooltip">
61
+ <sonic-tooltip placement="left-start" label="Left start">
53
62
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Left start</sonic-button>
54
63
  </sonic-tooltip>
55
- <sonic-tooltip placement="left-end" label="My tooltip">
64
+ <sonic-tooltip placement="left-end" label="Left end">
56
65
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Left end</sonic-button>
57
66
  </sonic-tooltip>
58
67
  </div>
59
68
  </template>
60
69
  </sonic-code>
61
70
 
71
+ ## Label formatting
72
+
73
+ **`label`** supports line breaks (`\n` in markup or multiline text). Lines are trimmed; **`&nbsp;`** is normalized to spaces. **`white-space: pre-line`** preserves breaks in the bubble (max width **18rem**).
74
+
75
+ <sonic-code>
76
+ <template>
77
+ <sonic-tooltip label="First line&#10;Second line">
78
+ <sonic-button variant="outline">Multiline label</sonic-button>
79
+ </sonic-tooltip>
80
+ </template>
81
+ </sonic-code>
62
82
 
63
83
  ## Focusable
64
84
 
85
+ On non-interactive triggers, set **`focusable`** so the host gets **`tabindex="0"`** and the tooltip opens on keyboard focus as well as hover.
86
+
65
87
  <sonic-code>
66
88
  <template>
67
- <sonic-tooltip focusable label="The Concorde made its first transatlantic crossing on September 26, 1973">
68
- <sonic-icon library="iconoir" name="chat-bubble-question"></sonic-icon> Focus or hover non interactive element
89
+ <sonic-tooltip
90
+ focusable
91
+ label="The Concorde made its first transatlantic crossing on September 26, 1973"
92
+ >
93
+ <sonic-icon library="iconoir" name="chat-bubble-question"></sonic-icon>
94
+ Focus or hover this text
69
95
  </sonic-tooltip>
70
96
  </template>
71
97
  </sonic-code>
@@ -74,9 +100,25 @@ By default, tooltip is centered next to its content
74
100
 
75
101
  <sonic-code>
76
102
  <template>
77
- <sonic-tooltip disabled label="Disabled text">
103
+ <sonic-tooltip disabled label="Not shown">
78
104
  <sonic-button>Tooltip disabled</sonic-button>
79
105
  </sonic-tooltip>
80
106
  </template>
81
107
  </sonic-code>
82
108
 
109
+ ## Accessibility
110
+
111
+ The bubble uses **`popover="hint"`** (non-modal, no pointer capture). Prefer **`focusable`** when the slotted content is not already focusable. When the Popover API is unavailable, the host falls back to the native **`title`** attribute with a single-line label. Opacity transitions respect **`prefers-reduced-motion`**.
112
+
113
+ ## API reference
114
+
115
+ | Attribute | Values | Description |
116
+ |----------|---------|-------------|
117
+ | `label` | string | Tooltip copy; whitespace-only values suppress the bubble |
118
+ | `placement` | `top` (default) · `bottom` · `left` · `right` · `top-start` · `top-end` · `bottom-start` · `bottom-end` · `left-start` · `left-end` · `right-start` · `right-end` | Position relative to the trigger; repositions while open |
119
+ | `disabled` | boolean | Suppress show/hide; sets **`tabindex="-1"`** on the host |
120
+ | `focusable` | boolean | Add **`tabindex="0"`** on the host for keyboard access |
121
+
122
+ | Slot | Description |
123
+ |------|-------------|
124
+ | *(default)* | Trigger content (hover target) |
@@ -3,7 +3,7 @@
3
3
  ## What is Concorde?
4
4
 
5
5
  Based on **[lit.dev](https://lit.dev)**, Concorde is a collection of web components for shared apps and websites.
6
- Build UIs without tying components to a specific host stack, while keeping visual consistency through a small set of CSS variables.
6
+ Build UIs without tying components to a specific host stack, while keeping visual consistency through the smallest set of CSS variables needed to define a theme.
7
7
 
8
8
  ## Why and use case
9
9
 
@@ -1,91 +1,253 @@
1
- # Adding styles
1
+ # Customization
2
2
 
3
- ## Normal Behavior
3
+ ## Theme-first customization
4
4
 
5
- No style crosses the shadow root of a component, except for inheritable properties (which have the "inherit" property possible) and CSS variables.
6
- Properties integrated via a "[slot](https://developer.mozilla.org/en/docs/Web/HTML/Element/slot)" remain stylizable in a conventional way.
5
+ Concorde components ship with **default styles** (fallback values in each component and in `<sonic-theme>`).
6
+ You do not need to define any CSS variables to get a usable UI.
7
7
 
8
- - **During creation / from the inside:**
9
- - We edit the [static "styles" property of the lit component](https://lit.dev/docs/components/styles/), which can also reference shared and dynamic styles.
10
- These styles are scoped and do not impact the outside.
11
- - We use CSS variables as the value of properties intended to be customized from the outside.
12
- For each variable, we define a default value to have a simple but consistent base style.
13
- - We only rewrite inheritable properties with hard values if they are truly specific to the component.
14
- - The `<style>` tag as a direct child can be used as a last resort, especially if there is a need for particularly dynamic customization. Performance is reduced.
15
- - **During use / from the outside:**
16
- We define values for **inheritable CSS properties** (e.g., font-\_, color...) using tools like Tailwind.
17
- We modify the value of **CSS variables** used by the component.
8
+ To align the kit with your brand, override **only the essential theme tokens** on `<sonic-theme>`, on `:root`, or in a project stylesheet.
9
+ Concorde derives radius steps, button/input rounding, shadows, and most per-component layout from these primitives—**do not copy long lists of derived variables** unless you have a specific need.
18
10
 
19
- ## Choosing Style Presets via Reactive Properties:
11
+ <sonic-code language="html">
12
+ <template>
13
+ <sonic-theme color font class="block bg-base min-h-screen">
14
+ <!-- your app -->
15
+ </sonic-theme>
16
+ </template>
17
+ </sonic-code>
20
18
 
21
- The declaration of reactive properties is useful for selecting a particular configuration that mostly affects a set of properties.
19
+ <sonic-code language="javascript">
20
+ <template>
21
+ import "@supersoniks/concorde/theme";
22
+ </template>
23
+ </sonic-code>
22
24
 
23
- For example, a `size` property (xs, sm, md, xl) will affect margins, font, line heights to align them with the corresponding CSS vars, which can be customized using the methods mentioned earlier if necessary.
25
+ | Attribute | Effect |
26
+ |-----------|--------|
27
+ | *(omit)* \| `theme="custom"` | Default: core tokens + your `--sc-*`; no built-in light/dark palette |
28
+ | `theme="light"` \| `"dark"` \| `"auto"` | Opt-in presets; `auto` follows `prefers-color-scheme` |
29
+ | `class="bg-base block"` (Tailwind) | Page/surface background (`--sc-base`) |
30
+ | `color` | Text color (`--sc-base-content`) |
31
+ | `font` | Base font family/weight (`--sc-font-family-base`, etc.) |
24
32
 
25
- It is recommended to use the `{reflect: true}` property for reactive properties that have an associated style on the `:host()`. For example: `:host([type='primary']){...}`
33
+ Popovers, modals, and toasts mount under the nearest `<sonic-theme>`.
26
34
 
27
- ☢️ **Caution:** Passing class names via reactive properties / HTML attributes of the component should be avoided as it can quickly lead to difficult-to-manage situations.
35
+ ## Customization example
28
36
 
29
- #### CSS "display" Property
37
+ Example (full brand override on `<sonic-theme>` or `:root`). Set every essential token below; derived radii and shadows still come from the theme engine—only `--sc-rounded` is listed here.
30
38
 
31
- By default, the display property is `inline`.
32
- Therefore, be careful to define it according to the needs, as one might mistakenly expect it to be `block` as with a regular `<div>`.
39
+ <sonic-code language="css">
40
+ <template>
41
+ sonic-theme {
42
+ /* Semantic fills */
43
+ --sc-primary: #353429;
44
+ --sc-secondary: #f43f5e;
45
+ --sc-info: #7c3aed;
46
+ --sc-danger: #d71839;
47
+ --sc-warning: #f97316;
48
+ --sc-success: #10b981;
49
+ --sc-contrast: #111;
50
+
51
+ /* Text/icons on semantic fills */
52
+ --sc-primary-content: #fff;
53
+ --sc-secondary-content: #fff;
54
+ --sc-info-content: #fff;
55
+ --sc-danger-content: #fff;
56
+ --sc-warning-content: #fff;
57
+ --sc-success-content: #fff;
58
+ --sc-contrast-content: #fff;
59
+
60
+ /* Neutral fills */
61
+ --sc-base: #fff;
62
+ --sc-base-50: #f6f6f5;
63
+ --sc-base-100: #ededec;
64
+ --sc-base-200: #d7d7d4;
65
+ --sc-base-300: #c8c7c4;
66
+ --sc-base-400: #a8a7a2;
67
+ --sc-base-500: #94938c;
68
+ --sc-base-600: #76756c;
69
+ --sc-base-700: #59584e;
70
+ --sc-base-800: #47463b;
71
+ --sc-base-900: #353429;
72
+
73
+ /* Text/icons on neutral surfaces */
74
+ --sc-base-content: var(--sc-base-900);
75
+
76
+ /* Typography */
77
+ --sc-font-family-base: "Oswald", system-ui, -apple-system, "Segoe UI", Roboto,
78
+ "Helvetica Neue", Arial, sans-serif;
79
+ --sc-headings-font-family: "alternate-gothic-compressed", system-ui, sans-serif;
80
+ --sc-headings-line-height: 1.1;
81
+ --sc-headings-font-weight: bold;
82
+ --sc-headings-text-transform: none;
83
+
84
+ /* Shape (primitive only) */
85
+ --sc-rounded: 0;
86
+
87
+ /* Forms */
88
+ --sc-border-width: 0.2rem;
89
+ --sc-form-height: 2em;
90
+ --sc-input-bg: var(--sc-base);
91
+ --sc-input-color: var(--sc-base-content);
92
+ --sc-input-border-color: var(--sc-input-color);
93
+ --sc-input-active-bg: var(--sc-primary);
94
+ --sc-input-active-color: var(--sc-primary-content);
95
+ --sc-input-active-border-color: var(--sc-primary);
96
+ }
97
+ </template>
98
+ </sonic-code>
33
99
 
34
- ☢️ **Caution:** Defining the `display` property as `contents` may seem attractive at first, but:
100
+ <sonic-button href="https://delanfranchi.github.io/concordecolors/"> Palette generator: concordecolors</sonic-button>
35
101
 
36
- - It almost always leads to the creation of wrappers to style the content (instead of using `:host`).
37
- - It is no longer possible to directly add classes to the component or style it from the outside.
38
- Ultimately, the amount of code to write increases significantly.
39
102
 
40
- ## TAILWIND Functional Classes
103
+ **Without these overrides**, components keep Concorde’s per-component fallbacks. Built-in light/dark palettes apply only when you set `theme="light"`, `theme="dark"`, or `theme="auto"`.
41
104
 
42
- [tailwind](https://tailwindcss.com/) has been integrated into Concorde and is available in scoped components (with Shadow DOM).
43
- To use it, you need to import the following:
105
+ **What we intentionally avoid:** large public `--sc-alert-*` / `--sc-badge-*` APIs or `::part()` styling hooks on most components. Prefer attributes (`type`, `status`, `size`, …) and the theme tokens above.
44
106
 
45
- <sonic-code language="javascript">
46
- <template>
47
- import { tailwind } from "@supersoniks/concorde/la-billetterie/ui/theme/theme";
48
- </template>
49
- </sonic-code>
50
107
 
51
- Then include the `tailwind` style in the static `styles` property of the component:
108
+ ## Only essential CSS variables (public theme API)
52
109
 
53
- <sonic-code language="javascript">
54
- <template>
55
- static styles = [tailwind];
56
- </template>
57
- </sonic-code>
110
+ These are the **smallest set** we recommend customizing. Everything else should stay internal to the theme or to components (`--sc_*` private variables, attributes like `type`, `size`, `variant`).
58
111
 
59
- Finally, use it in the HTML within the render function:
112
+ ### Surfaces and foreground
60
113
 
61
- <sonic-code language="html">
62
- <template>
63
- <p class="m-2">A paragraph with margin</p>
64
- </template>
65
- </sonic-code>
114
+ Tokens **without** a `-content` suffix are **fill / background** colors.
115
+ Tokens **with** `-content` are **text and icons** on top of the matching fill (solid buttons, badges, alerts, etc.).
116
+
117
+ #### Neutral fills
118
+
119
+ | Variable | Role |
120
+ |----------|------|
121
+ | `--sc-base` | Main surface / page background |
122
+ | `--sc-base-50` … `--sc-base-900` | Neutral scale (borders, subtle backgrounds, muted UI) |
123
+
124
+ #### Neutral foreground
125
+
126
+ | Variable | Role |
127
+ |----------|------|
128
+ | `--sc-base-content` | Default body text and icons on neutral surfaces |
66
129
 
67
- The colors from Concorde's theme are referenced in Tailwind's theme.
130
+ #### Semantic fills
68
131
 
69
- ## Operation without Shadow DOM
132
+ | Variable | Role |
133
+ |----------|------|
134
+ | `--sc-primary` | Primary actions, links, emphasis |
135
+ | `--sc-secondary` | Secondary brand accent (when used) |
136
+ | `--sc-info`, `--sc-success`, `--sc-warning`, `--sc-danger` | Status and feedback |
137
+ | `--sc-contrast` | High-contrast fills (e.g. on media) |
70
138
 
71
- ### Usefulness
139
+ #### Semantic foreground
72
140
 
73
- This operation is particularly useful when it comes to **adding behavior to a simple existing element**.
74
- It may also become necessary to establish **compatibility with a traditional JS library**.
141
+ | Variable | Role |
142
+ |----------|------|
143
+ | `--sc-primary-content`, `--sc-secondary-content`, … | Text/icons on the matching semantic **fill** (`--sc-primary`, etc.) |
75
144
 
76
- For example, with a text input:
145
+ ### Shape
77
146
 
78
- - Trigger automatic data or filter update when typing text.
79
- - Automatic formatting.
80
- - Constraints that cannot be handled by native methods.
147
+ | Variable | Role |
148
+ |----------|------|
149
+ | `--sc-rounded` | **Single primitive** corner radius; the theme computes `--sc-rounded-sm`, `--sc-btn-rounded`, `--sc-input-rounded`, etc. |
81
150
 
82
- ### Consequences
151
+ ### Typography
83
152
 
84
- If there is no shadow DOM (see the **noShadowDom** property of **Subscriber**):
153
+ | Variable | Role |
154
+ |----------|------|
155
+ | `--sc-font-family-base` | Body UI text |
156
+ | `--sc-font-weight-base`, `--sc-font-style-base` | Optional |
157
+ | `--sc-headings-font-family`, `--sc-headings-line-height`, `--sc-headings-font-weight`, `--sc-headings-text-transform` | Headings (modal titles, etc.) |
85
158
 
86
- - Styling using the static "styles" property of the lit component will not be applied.
87
- - The element and its content can be styled in a traditional manner.
159
+ ### Forms (only if you customize inputs globally)
88
160
 
89
- For example, the components `queue`, `list`, and `fetch` do not have a shadow DOM.
161
+ Interactive controls expose a few extra **theme-level** tokens; prefer these over styling individual inputs from outside.
162
+
163
+ | Variable | Role |
164
+ |----------|------|
165
+ | `--sc-border-width` | Default border thickness |
166
+ | `--sc-form-height` | Control height |
167
+ | `--sc-input-bg`, `--sc-input-color`, `--sc-input-border-color` | Default field chrome |
168
+ | `--sc-input-active-bg`, `--sc-input-active-color`, `--sc-input-active-border-color` | Focus/active state |
169
+
170
+ ---
171
+
172
+ ## Tailwind in new components ?
173
+
174
+ Set <code>tailwind.config.js</code> to match concorde style token in your custom component.
175
+
176
+ <sonic-code language="js">
177
+ <template>
178
+ ...
179
+ theme: {
180
+ borderRadius: {
181
+ DEFAULT: "var(--sc-rounded)",
182
+ none: "0",
183
+ sm: "var(--sc-rounded-sm)",
184
+ md: "var(--sc-rounded-md)",
185
+ lg: "var(--sc-rounded-lg)",
186
+ xl: "var(--sc-rounded-xl)",
187
+ full: "9999px",
188
+ },
189
+ boxShadow: {
190
+ DEFAULT: "var(--sc-shadow)",
191
+ none: "none",
192
+ sm: "var(--sc-shadow-sm)",
193
+ md: "var(--sc-shadow-md)",
194
+ lg: "var(--sc-shadow-lg)",
195
+ xl: "var(--sc-shadow-xl)",
196
+ },
197
+ colors: {
198
+ transparent: "transparent",
199
+ current: "currentColor",
200
+ content: "var(--sc-base-content)",
201
+ base: "var(--sc-base)",
202
+ neutral: {
203
+ 0: "var(--sc-base)",
204
+ 50: "var(--sc-base-50)",
205
+ 100: "var(--sc-base-100)",
206
+ 200: "var(--sc-base-200)",
207
+ 300: "var(--sc-base-300)",
208
+ 400: "var(--sc-base-400)",
209
+ 500: "var(--sc-base-500)",
210
+ 600: "var(--sc-base-600)",
211
+ 700: "var(--sc-base-700)",
212
+ 800: "var(--sc-base-800)",
213
+ 900: "var(--sc-base-900)",
214
+ content: "var(--sc-base)",
215
+ },
216
+ primary: {
217
+ DEFAULT: "var(--sc-primary)",
218
+ content: "var(--sc-primary-content)",
219
+ },
220
+ success: {
221
+ DEFAULT: "var(--sc-success)",
222
+ content: "var(--sc-success-content)",
223
+ },
224
+ danger: {
225
+ DEFAULT: "var(--sc-danger)",
226
+ content: "var(--sc-danger-content)",
227
+ },
228
+ warning: {
229
+ DEFAULT: "var(--sc-warning)",
230
+ content: "var(--sc-warning-content)",
231
+ },
232
+ info: {
233
+ DEFAULT: "var(--sc-info)",
234
+ content: "var(--sc-info-content)",
235
+ },
236
+ contrast: {
237
+ DEFAULT: "var(--sc-contrast)",
238
+ content: "var(--sc-contrast-content)",
239
+ },
240
+ },
241
+ extend: {
242
+ borderWidth: {
243
+ DEFAULT: "var(--sc-border-width)",
244
+ },
245
+ fontFamily: {
246
+ headings: ["var(--sc-headings-font-family, var(--sc-font-family-base, sans-serif))"],
247
+ body: ["var(--sc-font-family-base)"],
248
+ monospace: ["var(--sc-font-family-monospace, monospace)"],
249
+ }
250
+ }
251
+ </template>
252
+ </sonic-code>
90
253
 
91
- ℹ️ **Note:** Specifically in this case, it may be useful to set the `display` property to `contents`.