@supersoniks/concorde 5.0.3 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) 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/ai/cursor/rules/concorde-theme.mdc +1 -1
  4. package/ai/cursor/rules/concorde.mdc +1 -1
  5. package/ai/skills/concorde/SKILL.md +1 -1
  6. package/ai/skills/concorde-theme/SKILL.md +21 -10
  7. package/build-infos.json +1 -1
  8. package/concorde-core.bundle.js +515 -521
  9. package/concorde-core.es.js +5151 -5056
  10. package/dist/concorde-core.bundle.js +515 -521
  11. package/dist/concorde-core.es.js +5151 -5056
  12. package/dist/docs-mock-api-sw.js +2 -0
  13. package/dist/docs-mock-api-sw.js.map +2 -2
  14. package/docs/assets/index-CD4WyL6o.css +1 -0
  15. package/docs/assets/{index-BnK6OS7w.js → index-wVZpLVYW.js} +815 -808
  16. package/docs/crawl/core/components/ui/alert/alert.html +76 -5
  17. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
  18. package/docs/crawl/core/components/ui/badge/badge.html +57 -8
  19. package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
  20. package/docs/crawl/core/components/ui/card/card.html +122 -12
  21. package/docs/crawl/core/components/ui/divider/divider.html +117 -31
  22. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
  23. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
  24. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
  25. package/docs/crawl/core/components/ui/group/group.html +60 -38
  26. package/docs/crawl/core/components/ui/icon/icon.html +136 -47
  27. package/docs/crawl/core/components/ui/image/image.html +118 -6
  28. package/docs/crawl/core/components/ui/link/link.html +65 -7
  29. package/docs/crawl/core/components/ui/loader/loader.html +97 -23
  30. package/docs/crawl/core/components/ui/menu/menu.html +162 -90
  31. package/docs/crawl/core/components/ui/modal/modal.html +275 -50
  32. package/docs/crawl/core/components/ui/pop/pop.html +242 -124
  33. package/docs/crawl/core/components/ui/progress/progress.html +103 -30
  34. package/docs/crawl/core/components/ui/table/table.html +303 -171
  35. package/docs/crawl/core/components/ui/theme/theme.html +131 -0
  36. package/docs/crawl/core/components/ui/toast/toast.html +170 -59
  37. package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
  38. package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
  39. package/docs/crawl/docs/_getting-started/start.html +1 -1
  40. package/docs/crawl/docs/_getting-started/theming.html +311 -63
  41. package/docs/crawl/hubs/form-components.html +71 -49
  42. package/docs/crawl/index.html +7 -6
  43. package/docs/docs-mock-api-sw.js +2 -0
  44. package/docs/docs-mock-api-sw.js.map +2 -2
  45. package/docs/index.html +6 -4
  46. package/docs/llms-full.txt +1468 -405
  47. package/docs/llms.txt +23 -30
  48. package/docs/sitemap.xml +3 -0
  49. package/docs/src/core/components/ui/alert/alert.md +21 -2
  50. package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  51. package/docs/src/core/components/ui/badge/badge.md +19 -6
  52. package/docs/src/core/components/ui/captcha/captcha.md +65 -6
  53. package/docs/src/core/components/ui/card/card.md +73 -10
  54. package/docs/src/core/components/ui/divider/divider.md +107 -13
  55. package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  56. package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  57. package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  58. package/docs/src/core/components/ui/group/group.md +36 -36
  59. package/docs/src/core/components/ui/icon/icon.md +132 -43
  60. package/docs/src/core/components/ui/image/image.md +35 -3
  61. package/docs/src/core/components/ui/link/link.md +43 -5
  62. package/docs/src/core/components/ui/loader/loader.md +79 -22
  63. package/docs/src/core/components/ui/menu/menu.md +133 -92
  64. package/docs/src/core/components/ui/modal/modal.md +163 -47
  65. package/docs/src/core/components/ui/pop/pop.md +217 -123
  66. package/docs/src/core/components/ui/progress/progress.md +76 -30
  67. package/docs/src/core/components/ui/table/table.md +147 -171
  68. package/docs/src/core/components/ui/theme/theme.md +122 -0
  69. package/docs/src/core/components/ui/toast/toast.md +108 -58
  70. package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
  71. package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
  72. package/docs/src/docs/_getting-started/start.md +1 -1
  73. package/docs/src/docs/_getting-started/theming.md +223 -61
  74. package/docs/src/docs/search/docs-search.json +2504 -399
  75. package/docs/src/tsconfig.json +18 -0
  76. package/index.html +4 -2
  77. package/package.json +7 -1
  78. package/public/docs-mock-api-sw.js +2 -0
  79. package/public/docs-mock-api-sw.js.map +2 -2
  80. package/src/core/components/ui/_css/align.ts +1 -0
  81. package/src/core/components/ui/_css/type.ts +86 -8
  82. package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
  83. package/src/core/components/ui/alert/alert.md +21 -2
  84. package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  85. package/src/core/components/ui/badge/badge.md +19 -6
  86. package/src/core/components/ui/badge/badge.ts +8 -9
  87. package/src/core/components/ui/button/button.ts +5 -15
  88. package/src/core/components/ui/captcha/captcha.md +65 -6
  89. package/src/core/components/ui/card/card.md +73 -10
  90. package/src/core/components/ui/card/card.ts +24 -22
  91. package/src/core/components/ui/divider/divider.md +107 -13
  92. package/src/core/components/ui/divider/divider.ts +40 -33
  93. package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  94. package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
  95. package/src/core/components/ui/form/fieldset/legend.ts +13 -13
  96. package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  97. package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
  98. package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  99. package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
  100. package/src/core/components/ui/form/textarea/textarea.ts +4 -3
  101. package/src/core/components/ui/group/group.md +36 -36
  102. package/src/core/components/ui/group/group.ts +5 -10
  103. package/src/core/components/ui/icon/icon.md +132 -43
  104. package/src/core/components/ui/image/image.md +35 -3
  105. package/src/core/components/ui/link/link.md +43 -5
  106. package/src/core/components/ui/loader/loader.md +79 -22
  107. package/src/core/components/ui/loader/loader.ts +67 -27
  108. package/src/core/components/ui/loader/styles/fixed.ts +6 -11
  109. package/src/core/components/ui/menu/menu.md +133 -92
  110. package/src/core/components/ui/menu/menu.ts +53 -58
  111. package/src/core/components/ui/modal/modal.md +163 -47
  112. package/src/core/components/ui/modal/modal.ts +2 -4
  113. package/src/core/components/ui/pop/pop.md +217 -123
  114. package/src/core/components/ui/pop/pop.ts +0 -1
  115. package/src/core/components/ui/progress/progress.md +76 -30
  116. package/src/core/components/ui/progress/progress.ts +25 -56
  117. package/src/core/components/ui/table/table-caption.ts +2 -2
  118. package/src/core/components/ui/table/table-tbody.ts +3 -3
  119. package/src/core/components/ui/table/table-td.ts +23 -18
  120. package/src/core/components/ui/table/table-th.ts +8 -8
  121. package/src/core/components/ui/table/table-tr.ts +4 -4
  122. package/src/core/components/ui/table/table.md +147 -171
  123. package/src/core/components/ui/table/table.ts +20 -19
  124. package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
  125. package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
  126. package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
  127. package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
  128. package/src/core/components/ui/theme/theme.md +122 -0
  129. package/src/core/components/ui/theme/theme.ts +30 -7
  130. package/src/core/components/ui/toast/toast-item.ts +6 -9
  131. package/src/core/components/ui/toast/toast.md +108 -58
  132. package/src/core/components/ui/toast/types.ts +1 -1
  133. package/src/core/components/ui/tooltip/tooltip.md +68 -26
  134. package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
  135. package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
  136. package/src/core/utils/AncestorAttributeObserver.ts +183 -70
  137. package/src/docs/_decorators/ancestor-attribute.md +3 -2
  138. package/src/docs/_getting-started/start.md +1 -1
  139. package/src/docs/_getting-started/theming.md +223 -61
  140. package/src/docs/code.ts +125 -58
  141. package/src/docs/header/header.ts +62 -54
  142. package/src/docs/mock-api/router.ts +2 -0
  143. package/src/docs/navigation/navigation.ts +6 -3
  144. package/src/docs/search/docs-search.json +2504 -399
  145. package/src/docs/search/markdown-renderer.ts +6 -6
  146. package/src/docs/search/search.ts +4 -4
  147. package/src/docs/tailwind/css/tailwind.css +6 -5
  148. package/src/tsconfig.json +18 -0
  149. package/src/tsconfig.tsbuildinfo +1 -1
  150. package/tailwind.config.js +19 -0
  151. package/docs/assets/index--GpD7R7a.css +0 -1
@@ -3,9 +3,9 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Concorde — Concorde</title>
7
- <meta name="description" content="Concorde: Simple modal Lorem ipsum dolor sit amet +33 Donec sed vestibulum augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus. Click don't close Confir">
8
- <meta name="keywords" content="Concorde, supersoniks, core/components/ui/modal/modal, modal, UI component, sonic-modal, web component">
6
+ <title>Modal — Concorde</title>
7
+ <meta name="description" content="sonic-modal presents focused content in a &lt;dialog&gt; overlay with backdrop, enter/exit animation, and a built-in close control. Compose sonic-modal-title / sonic-modal-subtitle / sonic-modal-content / s">
8
+ <meta name="keywords" content="Concorde, supersoniks, core/components/ui/modal/modal, modal, Modal, UI component, sonic-modal, web component, , sonic-modal-title, sonic-modal-subtitle, sonic-modal-content, sonic-modal-actions, show(), hideModal, hide(), forceAction">
9
9
  <meta name="concorde-doc-id" content="core/components/ui/modal/modal">
10
10
  <link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/modal/modal.html">
11
11
  </head>
@@ -15,101 +15,326 @@
15
15
  </header>
16
16
  <main>
17
17
  <article>
18
- <p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Concorde</strong>. Concorde: Simple modal Lorem ipsum dolor sit amet +33 Donec sed vestibulum augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus. Click don't close Confir <span>Doc ID: <code>core/components/ui/modal/modal</code>. Keywords: Concorde, supersoniks, core/components/ui/modal/modal, modal, UI component, sonic-modal, web component. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/modal/modal.html">https://concorde.supersoniks.org/crawl/core/components/ui/modal/modal.html</a>.</span></p>
19
- <h2 id="modal">Modal</h2>
18
+ <p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Modal</strong>. sonic-modal presents focused content in a &lt;dialog&gt; overlay with backdrop, enter/exit animation, and a built-in close control. Compose sonic-modal-title / sonic-modal-subtitle / sonic-modal-content / s <span>Doc ID: <code>core/components/ui/modal/modal</code>. Keywords: Concorde, supersoniks, core/components/ui/modal/modal, modal, Modal, UI component, sonic-modal, web component, , sonic-modal-title, sonic-modal-subtitle, sonic-modal-content, sonic-modal-actions, show(), hideModal, hide(), forceAction. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/modal/modal.html">https://concorde.supersoniks.org/crawl/core/components/ui/modal/modal.html</a>.</span></p>
19
+ <h1 id="modal">Modal</h1>
20
+ <p><strong><code>sonic-modal</code></strong> presents focused content in a <code>&lt;dialog&gt;</code> overlay with backdrop, enter/exit animation, and a built-in close control. Compose <strong><code>sonic-modal-title</code></strong> / <strong><code>sonic-modal-subtitle</code></strong> / <strong><code>sonic-modal-content</code></strong> / <strong><code>sonic-modal-actions</code></strong>, or use the default slot. Call <strong><code>show()</code></strong> on the element to open; use <strong><code>hideModal</code></strong> on action buttons or <strong><code>hide()</code></strong> from script. Set <strong><code>forceAction</code></strong> when dismissal must go through explicit actions only. Imperative dialogs: <strong><code>Modal.create()</code></strong> (also <strong><code>window.SonicModal</code></strong>).</p>
21
+ <h2 id="basic-example">Basic example</h2>
22
+ <p>Click the trigger to open. <strong><code>sonic-modal-actions</code></strong> lays out footer buttons; <strong><code>hideModal</code></strong> closes the modal on click. Scope form state with <strong><code>formDataProvider</code></strong> on <strong><code>sonic-modal-actions</code></strong> so child <strong><code>sonic-button</code></strong> elements share one publisher.</p>
20
23
  <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;modalExample&#39;).show()&quot;&gt;
21
- Simple modal
24
+ Open modal
22
25
  &lt;/sonic-button&gt;
23
26
  &lt;sonic-modal id=&quot;modalExample&quot;&gt;
24
- &lt;sonic-modal-title
25
- &gt;Lorem ipsum dolor sit amet &lt;sonic-badge type=&quot;danger&quot; size=&quot;sm&quot;&gt;+33&lt;/sonic-badge&gt;&lt;/sonic-modal-title
26
- &gt;
27
- &lt;sonic-modal-subtitle&gt;Donec sed vestibulum augue.&lt;/sonic-modal-subtitle&gt;
27
+ &lt;sonic-modal-title&gt;
28
+ Export ready
29
+ &lt;sonic-badge type=&quot;success&quot; size=&quot;sm&quot;&gt;New&lt;/sonic-badge&gt;
30
+ &lt;/sonic-modal-title&gt;
31
+ &lt;sonic-modal-subtitle&gt;Your report finished processing.&lt;/sonic-modal-subtitle&gt;
28
32
  &lt;sonic-modal-content&gt;
29
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus.
33
+ Download the CSV now or review the summary in your dashboard before sharing.
30
34
  &lt;/sonic-modal-content&gt;
31
35
  &lt;sonic-modal-actions formDataProvider=&quot;ModalMiniForm&quot;&gt;
32
- &lt;sonic-button FormCheckable minWidth=&quot;8rem&quot; value=&quot;true&quot; name=&quot;click&quot;&gt;
33
- Click don&#39;t close
36
+ &lt;sonic-button minWidth=&quot;8rem&quot; value=&quot;true&quot; name=&quot;click&quot;&gt;
37
+ Save draft
34
38
  &lt;/sonic-button&gt;
35
- &lt;sonic-button minWidth=&quot;8rem&quot; type=&quot;success&quot; hideModal&gt;Confirm&lt;/sonic-button&gt;
39
+ &lt;sonic-button minWidth=&quot;8rem&quot; type=&quot;success&quot; hideModal&gt;Download&lt;/sonic-button&gt;
36
40
  &lt;/sonic-modal-actions&gt;
37
41
  &lt;/sonic-modal&gt;
38
42
  </code></pre>
39
- <h2 id="long-text">Long text</h2>
40
- <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;modalText&#39;).show()&quot;&gt; Long text &lt;/sonic-button&gt;
43
+ <h2 id="scrollable-content">Scrollable content</h2>
44
+ <p>Long copy scrolls inside the dialog. Default <strong><code>maxHeight</code></strong> is <code>90vh</code>. Default <strong><code>align</code></strong> is <code>left</code>.</p>
45
+ <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;modalText&#39;).show()&quot;&gt;Venue details&lt;/sonic-button&gt;
41
46
  &lt;sonic-modal align=&quot;left&quot; id=&quot;modalText&quot;&gt;
42
- &lt;sonic-modal-title&gt;Infos et tarifs &lt;/sonic-modal-title&gt;
47
+ &lt;sonic-modal-title&gt;Hours and tickets&lt;/sonic-modal-title&gt;
43
48
  &lt;sonic-modal-content&gt;
44
49
  &lt;div class=&quot;prose&quot;&gt;
45
50
  &lt;p&gt;
46
- &lt;strong&gt;Horaires d’ouverture &lt;/strong&gt;&lt;br /&gt;
47
- Du mercredi au samedi de 13h30 à 19h et le dimanche de 13h30 à 18h&lt;br /&gt;
48
- + horaires spécifiques pour événements ou festivals&amp;nbsp;
51
+ &lt;strong&gt;Opening hours&lt;/strong&gt;&lt;br /&gt;
52
+ Wednesday–Saturday, 1:30 p.m.–7:00 p.m.; Sunday, 1:30 p.m.–6:00 p.m.
49
53
  &lt;/p&gt;
50
54
  &lt;p&gt;
51
- &lt;strong&gt; Billetterie&amp;nbsp;&lt;br /&gt;&lt;/strong&gt;
52
- La participation à certains événements et activités est soumise à un système de billetterie avec achats ou
53
- réservations disponibles en ligne ou au guichet.&amp;nbsp;&amp;nbsp;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
55
+ &lt;strong&gt;Ticketing&lt;/strong&gt;&lt;br /&gt;
56
+ Some events require online or box-office reservations. Prices vary by event; booking ahead is recommended when capacity is limited.
54
57
  &lt;/p&gt;
55
58
  &lt;p&gt;
56
- Les tarifs (Tarif plein / Tarif Réduit / Tarif Spécifique) sont indiqués pour chaque événement et peuvent
57
- varier selon la nature de l’événement. Les tarifs sont identiques en ligne et au guichet. Il est néanmoins
58
- conseillé de réserver les billets en avance pour s’assurer une place.
59
+ &lt;strong&gt;Contact&lt;/strong&gt;&lt;br /&gt;
60
+ tickets@example.com · +33 3 28 33 48 33
59
61
  &lt;/p&gt;
60
62
  &lt;p&gt;
61
- L’accès au Skatepark, Fablab et Halle C sont soumis à adhésions. Les adhésions sont gratuites et
62
- nominatives. Elle donnent accès aux espaces dans la limite des places disponibles.
63
- &lt;/p&gt;
64
- &lt;p&gt;
65
- &lt;strong&gt;+ d’infos &lt;br /&gt;&lt;/strong&gt;billetterie@laconditionpublique.com &lt;br /&gt;+33 (0)328334833&amp;nbsp;
66
- &lt;/p&gt;
67
- &lt;br /&gt;
68
- &lt;p&gt;
69
- &lt;strong&gt;Accès &lt;br /&gt;&lt;/strong&gt;14, place Faidherbe &lt;br /&gt;59100 Roubaix &lt;br /&gt;Métro / Tram : Arrêt
70
- Eurotéléport, Ligne 2 &lt;br /&gt;Bus / V’Lille : Arrêt Condition Publique&amp;nbsp;
71
- &lt;/p&gt;
72
- &lt;p&gt;
73
- Accès handicapés : nous contacter avant votre venue au 03 28 33 48 33 ou par mail
74
- billetterie@laconditionpublique.com
63
+ &lt;strong&gt;Access&lt;/strong&gt;&lt;br /&gt;
64
+ 14 Place Faidherbe, 59100 Roubaix&lt;br /&gt;
65
+ Metro line 2, Eurotéléport stop
75
66
  &lt;/p&gt;
76
67
  &lt;/div&gt;
77
68
  &lt;/sonic-modal-content&gt;
78
69
  &lt;/sonic-modal&gt;
79
70
  </code></pre>
80
71
  <h2 id="force-action">Force action</h2>
81
- <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;force&#39;).show()&quot;&gt; Force action to close&lt;/sonic-button&gt;
72
+ <p>With <strong><code>forceAction</code></strong>, backdrop click, Escape, and the default close button are disabled. Provide <strong><code>sonic-modal-actions</code></strong> (or <strong><code>sonic-modal-close</code></strong>) so users can finish the flow.</p>
73
+ <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;force&#39;).show()&quot;&gt;Cookie consent&lt;/sonic-button&gt;
82
74
  &lt;sonic-modal forceAction id=&quot;force&quot;&gt;
83
- &lt;sonic-modal-title&gt;Do you want some cookies ? &lt;/sonic-modal-title&gt;
75
+ &lt;sonic-modal-title&gt;Allow analytics cookies?&lt;/sonic-modal-title&gt;
84
76
  &lt;sonic-modal-content&gt;
85
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus.
77
+ We use cookies to measure traffic and improve the product. You can change this later in settings.
86
78
  &lt;/sonic-modal-content&gt;
87
- &lt;sonic-modal-actions &gt;
88
- &lt;sonic-button hideModal minWidth=&quot;8rem&quot;&gt; Nope &lt;/sonic-button&gt;
89
- &lt;sonic-button hideModal minWidth=&quot;8rem&quot; type=&quot;success&quot;&gt;Hell yes !&lt;/sonic-button&gt;
79
+ &lt;sonic-modal-actions&gt;
80
+ &lt;sonic-button hideModal minWidth=&quot;8rem&quot;&gt;Decline&lt;/sonic-button&gt;
81
+ &lt;sonic-button hideModal minWidth=&quot;8rem&quot; type=&quot;success&quot;&gt;Accept&lt;/sonic-button&gt;
90
82
  &lt;/sonic-modal-actions&gt;
91
83
  &lt;/sonic-modal&gt;
92
- &lt;/sonic-modal&gt;
93
84
  </code></pre>
94
85
  <h2 id="custom-dimensions">Custom dimensions</h2>
95
- <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;CustomWidth&#39;).show()&quot;&gt; Custom width &lt;/sonic-button&gt;
96
- &lt;sonic-modal maxHeight=&quot;50vh&quot; maxWidth=&quot;90vw&quot; width=&quot;100%&quot; height=&quot;100%&quot; id=&quot;CustomWidth&quot;&gt;
86
+ <p>Set <strong><code>width</code></strong> / <strong><code>height</code></strong> / <strong><code>maxWidth</code></strong> / <strong><code>maxHeight</code></strong> (CSS lengths). On narrow viewports the panel becomes a bottom sheet. Use <strong><code>rounded=&quot;none&quot;</code></strong> for edge-to-edge media.</p>
87
+ <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;CustomWidth&#39;).show()&quot;&gt;Image preview&lt;/sonic-button&gt;
88
+ &lt;sonic-modal
89
+ rounded=&quot;none&quot;
90
+ maxHeight=&quot;50vh&quot;
91
+ maxWidth=&quot;90vw&quot;
92
+ width=&quot;100%&quot;
93
+ height=&quot;100%&quot;
94
+ id=&quot;CustomWidth&quot;
95
+ &gt;
97
96
  &lt;sonic-image
98
97
  cover
99
98
  objectPosition=&quot;center 20%&quot;
100
99
  src=&quot;https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg&quot;
100
+ alt=&quot;View from an airplane window&quot;
101
101
  &gt;&lt;/sonic-image&gt;
102
102
  &lt;/sonic-modal&gt;
103
103
  </code></pre>
104
104
  <h2 id="fullscreen">Fullscreen</h2>
105
- <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;Fullscreen&#39;).show()&quot;&gt; Fullscreen &lt;/sonic-button&gt;
105
+ <p><strong><code>fullscreen</code></strong> fills the viewport and hides the backdrop.</p>
106
+ <pre><code>&lt;sonic-button onclick=&quot;document.getElementById(&#39;Fullscreen&#39;).show()&quot;&gt;Fullscreen&lt;/sonic-button&gt;
106
107
  &lt;sonic-modal fullscreen id=&quot;Fullscreen&quot;&gt;
107
108
  &lt;sonic-image
108
109
  cover
109
110
  src=&quot;https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg&quot;
111
+ alt=&quot;View from an airplane window&quot;
110
112
  &gt;&lt;/sonic-image&gt;
111
113
  &lt;/sonic-modal&gt;
112
114
  </code></pre>
115
+ <h2 id="programmatic-creation">Programmatic creation</h2>
116
+ <p>Use <strong><code>Modal.create(options)</code></strong> when there is no modal in the template—for confirmations, toasts that need a follow-up, or one-off flows from script. The modal is appended to the nearest <strong><code>sonic-theme</code></strong> pop container (same as declarative modals), opened automatically, and returns the <strong><code>sonic-modal</code></strong> instance. Set <strong><code>removeOnHide: true</code></strong> to detach it from the DOM after close. In the browser, <strong><code>window.SonicModal</code></strong> is the same class after the module loads.</p>
117
+ <p>Pass <strong><code>title</code></strong> / <strong><code>subtitle</code></strong> / <strong><code>content</code></strong> / <strong><code>actions</code></strong> as HTML strings (or Lit template results from application code). Put <strong><code>hideModal</code></strong> on action buttons in the <strong><code>actions</code></strong> string so clicks close the dialog.</p>
118
+ <pre><code>&lt;sonic-button
119
+ onclick=&quot;window.SonicModal.create({
120
+ title: &#39;Send invite?&#39;,
121
+ subtitle: &#39;The recipient can join immediately.&#39;,
122
+ content: &#39;We will email an invitation to alex@example.com.&#39;,
123
+ actions: &#39;&amp;lt;sonic-button hideModal minWidth=\&#39;8rem\&#39;&amp;gt;Cancel&amp;lt;/sonic-button&amp;gt;&amp;lt;sonic-button hideModal minWidth=\&#39;8rem\&#39; type=\&#39;success\&#39;&amp;gt;Send&amp;lt;/sonic-button&amp;gt;&#39;,
124
+ removeOnHide: true
125
+ })&quot;
126
+ &gt;
127
+ Open programmatic modal
128
+ &lt;/sonic-button&gt;
129
+ </code></pre>
130
+ <pre><code class="language-javascript">import { Modal } from &quot;@supersoniks/concorde/core/components/ui/modal/modal&quot;;
131
+
132
+ const modal = Modal.create({
133
+ title: &quot;Delete project?&quot;,
134
+ subtitle: &quot;This cannot be undone.&quot;,
135
+ content: &quot;&lt;p&gt;All files in &lt;strong&gt;Acme HQ&lt;/strong&gt; will be removed.&lt;/p&gt;&quot;,
136
+ actions: `
137
+ &lt;sonic-button hideModal minWidth=&quot;8rem&quot;&gt;Cancel&lt;/sonic-button&gt;
138
+ &lt;sonic-button hideModal minWidth=&quot;8rem&quot; type=&quot;danger&quot;&gt;Delete&lt;/sonic-button&gt;
139
+ `,
140
+ removeOnHide: true,
141
+ forceAction: false,
142
+ maxWidth: &quot;min(100vw, 28rem)&quot;,
143
+ });
144
+
145
+ modal.addEventListener(&quot;hidden&quot;, () =&gt; {
146
+ console.log(&quot;Modal removed from the DOM&quot;);
147
+ });
148
+
149
+ // Or close from script: await modal.hide(); await modal.dispose();
150
+ </code></pre>
151
+ <h2 id="api-reference">API reference</h2>
152
+ <h3 id="sonic-modal"><code>sonic-modal</code></h3>
153
+ <table>
154
+ <thead>
155
+ <tr>
156
+ <th>Attribute</th>
157
+ <th>Values</th>
158
+ <th>Description</th>
159
+ </tr>
160
+ </thead>
161
+ <tbody><tr>
162
+ <td><code>align</code></td>
163
+ <td><code>left</code> (default) · <code>center</code> · <code>right</code></td>
164
+ <td>Align title and slotted content</td>
165
+ </tr>
166
+ <tr>
167
+ <td><code>maxWidth</code></td>
168
+ <td>CSS length (default <code>min(100vw, 40rem)</code>)</td>
169
+ <td>Dialog max width</td>
170
+ </tr>
171
+ <tr>
172
+ <td><code>maxHeight</code></td>
173
+ <td>CSS length (default <code>90vh</code>)</td>
174
+ <td>Scrollable body max height</td>
175
+ </tr>
176
+ <tr>
177
+ <td><code>width</code></td>
178
+ <td>CSS length (default <code>100%</code>)</td>
179
+ <td>Dialog width</td>
180
+ </tr>
181
+ <tr>
182
+ <td><code>height</code></td>
183
+ <td>CSS length (default <code>fit-content</code>)</td>
184
+ <td>Dialog height</td>
185
+ </tr>
186
+ <tr>
187
+ <td><code>paddingX</code> · <code>paddingY</code></td>
188
+ <td>CSS length</td>
189
+ <td>Override content padding (<code>--sc-modal-px</code> / <code>--sc-modal-py</code>)</td>
190
+ </tr>
191
+ <tr>
192
+ <td><code>zIndex</code></td>
193
+ <td>CSS number</td>
194
+ <td>Stacking order (default <code>990</code>)</td>
195
+ </tr>
196
+ <tr>
197
+ <td><code>effect</code></td>
198
+ <td><code>slide</code> (default) · <code>fade</code> · <code>none</code></td>
199
+ <td>Open/close animation</td>
200
+ </tr>
201
+ <tr>
202
+ <td><code>fullscreen</code></td>
203
+ <td>boolean</td>
204
+ <td>Full viewport; no backdrop</td>
205
+ </tr>
206
+ <tr>
207
+ <td><code>forceAction</code></td>
208
+ <td>boolean</td>
209
+ <td>Disable overlay, Escape, and default close button</td>
210
+ </tr>
211
+ <tr>
212
+ <td><code>noCloseButton</code></td>
213
+ <td>boolean</td>
214
+ <td>Hide built-in close when not <strong><code>forceAction</code></strong></td>
215
+ </tr>
216
+ <tr>
217
+ <td><code>closeButtonType</code></td>
218
+ <td><strong><code>sonic-button</code></strong> <code>type</code></td>
219
+ <td>Style of built-in close</td>
220
+ </tr>
221
+ <tr>
222
+ <td><code>visible</code></td>
223
+ <td>boolean</td>
224
+ <td>When toggled, opens or closes the dialog</td>
225
+ </tr>
226
+ <tr>
227
+ <td><code>removeOnHide</code></td>
228
+ <td>boolean</td>
229
+ <td>Remove element from DOM after close</td>
230
+ </tr>
231
+ <tr>
232
+ <td><code>removeHashOnHide</code></td>
233
+ <td>boolean</td>
234
+ <td>Clear URL hash on close</td>
235
+ </tr>
236
+ <tr>
237
+ <td><code>closeOnLocationChange</code></td>
238
+ <td>boolean</td>
239
+ <td>Close when app location changes</td>
240
+ </tr>
241
+ <tr>
242
+ <td><code>resetDataProviderOnHide</code></td>
243
+ <td>string</td>
244
+ <td>Reset named <strong><code>formDataProvider</code></strong> on close</td>
245
+ </tr>
246
+ <tr>
247
+ <td><code>rounded</code></td>
248
+ <td><code>none</code></td>
249
+ <td>Square dialog corners (useful for full-bleed media)</td>
250
+ </tr>
251
+ </tbody></table>
252
+ <table>
253
+ <thead>
254
+ <tr>
255
+ <th>Slot</th>
256
+ <th>Description</th>
257
+ </tr>
258
+ </thead>
259
+ <tbody><tr>
260
+ <td><em>(default)</em></td>
261
+ <td>Additional markup alongside structured children</td>
262
+ </tr>
263
+ </tbody></table>
264
+ <table>
265
+ <thead>
266
+ <tr>
267
+ <th>Event</th>
268
+ <th>Description</th>
269
+ </tr>
270
+ </thead>
271
+ <tbody><tr>
272
+ <td><code>show</code></td>
273
+ <td>Fired when open animation completes</td>
274
+ </tr>
275
+ <tr>
276
+ <td><code>hide</code></td>
277
+ <td>Fired when close starts</td>
278
+ </tr>
279
+ <tr>
280
+ <td><code>hidden</code></td>
281
+ <td>Fired when close finishes</td>
282
+ </tr>
283
+ </tbody></table>
284
+ <p>Methods: <strong><code>show()</code></strong> · <strong><code>hide()</code></strong> · <strong><code>dispose()</code></strong> (hide and remove). Static <strong><code>Modal.create(options)</code></strong> appends a modal to the theme pop container and opens it. <strong><code>options</code></strong> / <strong><code>styleSheet</code></strong> are JavaScript-only.</p>
285
+ <h3 id="sonic-modal-title--sonic-modal-subtitle--sonic-modal-content"><code>sonic-modal-title</code> · <code>sonic-modal-subtitle</code> · <code>sonic-modal-content</code></h3>
286
+ <table>
287
+ <thead>
288
+ <tr>
289
+ <th>Slot</th>
290
+ <th>Description</th>
291
+ </tr>
292
+ </thead>
293
+ <tbody><tr>
294
+ <td><em>(default)</em></td>
295
+ <td>Title, subtitle, or main body content</td>
296
+ </tr>
297
+ </tbody></table>
298
+ <h3 id="sonic-modal-actions"><code>sonic-modal-actions</code></h3>
299
+ <table>
300
+ <thead>
301
+ <tr>
302
+ <th>Slot</th>
303
+ <th>Description</th>
304
+ </tr>
305
+ </thead>
306
+ <tbody><tr>
307
+ <td><em>(default)</em></td>
308
+ <td>Footer actions (typically <strong><code>sonic-button</code></strong>)</td>
309
+ </tr>
310
+ </tbody></table>
311
+ <p>Put <strong><code>hideModal</code></strong> on a <strong><code>sonic-button</code></strong> to close the parent modal on click. Ancestor <strong><code>formDataProvider</code></strong> on this element is inherited by child form controls.</p>
312
+ <h3 id="sonic-modal-close"><code>sonic-modal-close</code></h3>
313
+ <p>Rendered automatically unless <strong><code>forceAction</code></strong> or <strong><code>noCloseButton</code></strong> is set. Calls <strong><code>hide()</code></strong> on the parent modal.</p>
314
+ <table>
315
+ <thead>
316
+ <tr>
317
+ <th>Attribute</th>
318
+ <th>Values</th>
319
+ <th>Description</th>
320
+ </tr>
321
+ </thead>
322
+ <tbody><tr>
323
+ <td><code>type</code></td>
324
+ <td><strong><code>sonic-button</code></strong> <code>type</code></td>
325
+ <td>Close button color</td>
326
+ </tr>
327
+ <tr>
328
+ <td><code>reset</code></td>
329
+ <td>string</td>
330
+ <td>Passed to inner <strong><code>sonic-button</code></strong> <strong><code>reset</code></strong></td>
331
+ </tr>
332
+ <tr>
333
+ <td><code>translation</code></td>
334
+ <td>UI label object</td>
335
+ <td>Overrides default close <strong><code>aria-label</code></strong></td>
336
+ </tr>
337
+ </tbody></table>
113
338
 
114
339
  </article>
115
340
  </main>