@supersoniks/concorde 5.0.5 → 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.
- package/.github/workflows/ci.yml +21 -0
- package/.github-export-ignore +30 -0
- package/.tmp-cem/custom-elements.json +13705 -0
- package/CONTRIBUTING.md +59 -0
- package/DEV.md +54 -0
- package/LICENSE +21 -0
- package/OPEN_SOURCE_CHECKPOINT.md +133 -0
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +3960 -0
- package/concorde-3d.es.js +33433 -0
- package/concorde-core.bundle.js +196 -196
- package/concorde-core.es.js +3685 -3405
- package/concorde-hugging-face-infer.bundle.js +32 -0
- package/concorde-hugging-face-infer.es.js +2952 -0
- package/concorde-interactive.bundle.js +1157 -0
- package/concorde-interactive.es.js +10734 -0
- package/concorde-shader.bundle.js +116 -0
- package/concorde-shader.es.js +8353 -0
- package/concorde-webgpu.bundle.js +307 -0
- package/concorde-webgpu.es.js +8627 -0
- package/custom-elements-manifest.config.mjs +14 -0
- package/dist/concorde-core.bundle.js +196 -196
- package/dist/concorde-core.es.js +3685 -3405
- package/docs/assets/{index-wVZpLVYW.js → index-D8MVWqY6.js} +1351 -1222
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/alert/alert.html +71 -172
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +5 -113
- package/docs/crawl/core/components/ui/badge/badge.html +79 -157
- package/docs/crawl/core/components/ui/button/button.html +0 -1
- package/docs/crawl/core/components/ui/captcha/captcha.html +8 -90
- package/docs/crawl/core/components/ui/card/card.html +68 -222
- package/docs/crawl/core/components/ui/divider/divider.html +31 -117
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +101 -232
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +52 -95
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +38 -97
- package/docs/crawl/core/components/ui/form/input/input.html +3 -3
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
- package/docs/crawl/core/components/ui/group/group.html +38 -60
- package/docs/crawl/core/components/ui/icon/icon.html +47 -136
- package/docs/crawl/core/components/ui/image/image.html +56 -244
- package/docs/crawl/core/components/ui/link/link.html +9 -67
- package/docs/crawl/core/components/ui/loader/loader.html +23 -97
- package/docs/crawl/core/components/ui/menu/menu.html +90 -162
- package/docs/crawl/core/components/ui/modal/modal.html +50 -275
- package/docs/crawl/core/components/ui/pop/pop.html +66 -260
- package/docs/crawl/core/components/ui/progress/progress.html +30 -103
- package/docs/crawl/core/components/ui/table/table.html +171 -303
- package/docs/crawl/core/components/ui/toast/toast.html +59 -170
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +29 -90
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +2 -3
- package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +63 -311
- package/docs/crawl/hubs/form-components.html +53 -75
- package/docs/crawl/index.html +6 -7
- package/docs/docs-mock-api-sw.js +0 -2
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +7 -9
- package/docs/llms-full.txt +456 -1703
- package/docs/llms.txt +32 -25
- package/docs/sitemap.xml +0 -3
- package/docs/src/core/components/functional/fetch/fetch.md +0 -0
- package/docs/src/core/components/functional/if/if.md +0 -0
- package/docs/src/core/components/functional/list/list.md +0 -0
- package/docs/src/core/components/functional/router/router.md +0 -0
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/functional/states/states.md +0 -0
- package/docs/src/core/components/functional/submit/submit.md +0 -0
- package/docs/src/core/components/ui/alert/alert.md +72 -147
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -85
- package/docs/src/core/components/ui/badge/badge.md +80 -141
- package/docs/src/core/components/ui/button/button.md +0 -1
- package/docs/src/core/components/ui/captcha/captcha.md +6 -65
- package/docs/src/core/components/ui/card/card.md +65 -183
- package/docs/src/core/components/ui/divider/divider.md +13 -107
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +99 -175
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +52 -75
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +34 -109
- package/docs/src/core/components/ui/form/input/input.md +1 -1
- package/docs/src/core/components/ui/form/radio/radio.md +0 -0
- package/docs/src/core/components/ui/form/select/select.md +0 -0
- package/docs/src/core/components/ui/form/switch/switch.md +0 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/docs/src/core/components/ui/group/group.md +36 -36
- package/docs/src/core/components/ui/icon/icon.md +43 -132
- package/docs/src/core/components/ui/image/image.md +53 -179
- package/docs/src/core/components/ui/link/link.md +7 -45
- package/docs/src/core/components/ui/loader/loader.md +22 -79
- package/docs/src/core/components/ui/menu/menu.md +92 -133
- package/docs/src/core/components/ui/modal/modal.md +47 -163
- package/docs/src/core/components/ui/pop/pop.md +64 -262
- package/docs/src/core/components/ui/progress/progress.md +30 -76
- package/docs/src/core/components/ui/table/table.md +171 -147
- package/docs/src/core/components/ui/toast/toast.md +58 -108
- package/docs/src/core/components/ui/tooltip/tooltip.md +26 -68
- package/docs/src/docs/_core-concept/subscriber.md +0 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +2 -3
- package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/docs/src/docs/_getting-started/pubsub.md +0 -0
- package/docs/src/docs/_getting-started/start.md +1 -1
- package/docs/src/docs/_getting-started/theming.md +61 -223
- package/docs/src/docs/search/docs-search.json +348 -3083
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +3 -63
- package/gitlab/job_github_mirror.sh +39 -0
- package/package.json +36 -2
- package/scripts/generate-sdui-catalog.mjs +250 -0
- package/scripts/generate-sdui-catalog.spec.ts +91 -0
- package/scripts/github-export.mjs +150 -0
- package/scripts/post-build-docs.js +0 -0
- package/scripts/post-build.mjs +0 -0
- package/scripts/pre-build.mjs +15 -0
- package/src/core/components/functional/fetch/fetch.md +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/if/if.ts +0 -0
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.md +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
- package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
- package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
- package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
- package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
- package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
- package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
- package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
- package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
- package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
- package/src/core/components/functional/sdui/sdui.md +122 -0
- package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
- package/src/core/components/functional/sdui/sdui.ts +442 -34
- package/src/core/components/functional/sdui/types.ts +49 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/submit/submit.md +0 -0
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/css.d.ts +19 -0
- package/src/docs/_core-concept/subscriber.md +0 -0
- package/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/src/docs/_getting-started/pubsub.md +0 -0
- package/src/docs/example/users.ts +0 -0
- package/src/docs/search/page.ts +0 -0
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.json +90 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/docs/assets/index-CD4WyL6o.css +0 -1
- package/docs/crawl/core/components/ui/theme/theme.html +0 -131
- package/docs/src/core/components/ui/theme/theme.md +0 -122
|
@@ -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>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/modal/modal, modal,
|
|
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">
|
|
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,326 +15,101 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component —
|
|
19
|
-
<
|
|
20
|
-
<p><strong><code>sonic-modal</code></strong> presents focused content in a <code><dialog></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>
|
|
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>
|
|
23
20
|
<pre><code><sonic-button onclick="document.getElementById('modalExample').show()">
|
|
24
|
-
|
|
21
|
+
Simple modal
|
|
25
22
|
</sonic-button>
|
|
26
23
|
<sonic-modal id="modalExample">
|
|
27
|
-
<sonic-modal-title
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</sonic-modal-
|
|
31
|
-
<sonic-modal-subtitle>Your report finished processing.</sonic-modal-subtitle>
|
|
24
|
+
<sonic-modal-title
|
|
25
|
+
>Lorem ipsum dolor sit amet <sonic-badge type="danger" size="sm">+33</sonic-badge></sonic-modal-title
|
|
26
|
+
>
|
|
27
|
+
<sonic-modal-subtitle>Donec sed vestibulum augue.</sonic-modal-subtitle>
|
|
32
28
|
<sonic-modal-content>
|
|
33
|
-
|
|
29
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus.
|
|
34
30
|
</sonic-modal-content>
|
|
35
31
|
<sonic-modal-actions formDataProvider="ModalMiniForm">
|
|
36
|
-
<sonic-button minWidth="8rem" value="true" name="click">
|
|
37
|
-
|
|
32
|
+
<sonic-button FormCheckable minWidth="8rem" value="true" name="click">
|
|
33
|
+
Click don't close
|
|
38
34
|
</sonic-button>
|
|
39
|
-
<sonic-button minWidth="8rem" type="success" hideModal>
|
|
35
|
+
<sonic-button minWidth="8rem" type="success" hideModal>Confirm</sonic-button>
|
|
40
36
|
</sonic-modal-actions>
|
|
41
37
|
</sonic-modal>
|
|
42
38
|
</code></pre>
|
|
43
|
-
<h2 id="
|
|
44
|
-
<
|
|
45
|
-
<pre><code><sonic-button onclick="document.getElementById('modalText').show()">Venue details</sonic-button>
|
|
39
|
+
<h2 id="long-text">Long text</h2>
|
|
40
|
+
<pre><code><sonic-button onclick="document.getElementById('modalText').show()"> Long text </sonic-button>
|
|
46
41
|
<sonic-modal align="left" id="modalText">
|
|
47
|
-
<sonic-modal-title>
|
|
42
|
+
<sonic-modal-title>Infos et tarifs </sonic-modal-title>
|
|
48
43
|
<sonic-modal-content>
|
|
49
44
|
<div class="prose">
|
|
50
45
|
<p>
|
|
51
|
-
<strong>
|
|
52
|
-
|
|
46
|
+
<strong>Horaires d’ouverture </strong><br />
|
|
47
|
+
Du mercredi au samedi de 13h30 à 19h et le dimanche de 13h30 à 18h<br />
|
|
48
|
+
+ horaires spécifiques pour événements ou festivals&nbsp;
|
|
53
49
|
</p>
|
|
54
50
|
<p>
|
|
55
|
-
<strong>
|
|
56
|
-
|
|
51
|
+
<strong> Billetterie&nbsp;<br /></strong>
|
|
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.&nbsp;&nbsp;<strong><br /></strong>
|
|
57
54
|
</p>
|
|
58
55
|
<p>
|
|
59
|
-
|
|
60
|
-
|
|
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.
|
|
61
59
|
</p>
|
|
62
60
|
<p>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
+
</p>
|
|
64
|
+
<p>
|
|
65
|
+
<strong>+ d’infos <br /></strong>billetterie@laconditionpublique.com <br />+33 (0)328334833&nbsp;
|
|
66
|
+
</p>
|
|
67
|
+
<br />
|
|
68
|
+
<p>
|
|
69
|
+
<strong>Accès <br /></strong>14, place Faidherbe <br />59100 Roubaix <br />Métro / Tram : Arrêt
|
|
70
|
+
Eurotéléport, Ligne 2 <br />Bus / V’Lille : Arrêt Condition Publique&nbsp;
|
|
71
|
+
</p>
|
|
72
|
+
<p>
|
|
73
|
+
Accès handicapés : nous contacter avant votre venue au 03 28 33 48 33 ou par mail
|
|
74
|
+
billetterie@laconditionpublique.com
|
|
66
75
|
</p>
|
|
67
76
|
</div>
|
|
68
77
|
</sonic-modal-content>
|
|
69
78
|
</sonic-modal>
|
|
70
79
|
</code></pre>
|
|
71
80
|
<h2 id="force-action">Force action</h2>
|
|
72
|
-
<
|
|
73
|
-
<pre><code><sonic-button onclick="document.getElementById('force').show()">Cookie consent</sonic-button>
|
|
81
|
+
<pre><code><sonic-button onclick="document.getElementById('force').show()"> Force action to close</sonic-button>
|
|
74
82
|
<sonic-modal forceAction id="force">
|
|
75
|
-
<sonic-modal-title>
|
|
83
|
+
<sonic-modal-title>Do you want some cookies ? </sonic-modal-title>
|
|
76
84
|
<sonic-modal-content>
|
|
77
|
-
|
|
85
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus.
|
|
78
86
|
</sonic-modal-content>
|
|
79
|
-
<sonic-modal-actions>
|
|
80
|
-
<sonic-button hideModal minWidth="8rem">
|
|
81
|
-
<sonic-button hideModal minWidth="8rem" type="success">
|
|
87
|
+
<sonic-modal-actions >
|
|
88
|
+
<sonic-button hideModal minWidth="8rem"> Nope </sonic-button>
|
|
89
|
+
<sonic-button hideModal minWidth="8rem" type="success">Hell yes !</sonic-button>
|
|
82
90
|
</sonic-modal-actions>
|
|
83
91
|
</sonic-modal>
|
|
92
|
+
</sonic-modal>
|
|
84
93
|
</code></pre>
|
|
85
94
|
<h2 id="custom-dimensions">Custom dimensions</h2>
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
<sonic-modal
|
|
89
|
-
rounded="none"
|
|
90
|
-
maxHeight="50vh"
|
|
91
|
-
maxWidth="90vw"
|
|
92
|
-
width="100%"
|
|
93
|
-
height="100%"
|
|
94
|
-
id="CustomWidth"
|
|
95
|
-
>
|
|
95
|
+
<pre><code><sonic-button onclick="document.getElementById('CustomWidth').show()"> Custom width </sonic-button>
|
|
96
|
+
<sonic-modal maxHeight="50vh" maxWidth="90vw" width="100%" height="100%" id="CustomWidth">
|
|
96
97
|
<sonic-image
|
|
97
98
|
cover
|
|
98
99
|
objectPosition="center 20%"
|
|
99
100
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
100
|
-
alt="View from an airplane window"
|
|
101
101
|
></sonic-image>
|
|
102
102
|
</sonic-modal>
|
|
103
103
|
</code></pre>
|
|
104
104
|
<h2 id="fullscreen">Fullscreen</h2>
|
|
105
|
-
<
|
|
106
|
-
<pre><code><sonic-button onclick="document.getElementById('Fullscreen').show()">Fullscreen</sonic-button>
|
|
105
|
+
<pre><code><sonic-button onclick="document.getElementById('Fullscreen').show()"> Fullscreen </sonic-button>
|
|
107
106
|
<sonic-modal fullscreen id="Fullscreen">
|
|
108
107
|
<sonic-image
|
|
109
108
|
cover
|
|
110
109
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
111
|
-
alt="View from an airplane window"
|
|
112
110
|
></sonic-image>
|
|
113
111
|
</sonic-modal>
|
|
114
112
|
</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><sonic-button
|
|
119
|
-
onclick="window.SonicModal.create({
|
|
120
|
-
title: 'Send invite?',
|
|
121
|
-
subtitle: 'The recipient can join immediately.',
|
|
122
|
-
content: 'We will email an invitation to alex@example.com.',
|
|
123
|
-
actions: '&lt;sonic-button hideModal minWidth=\'8rem\'&gt;Cancel&lt;/sonic-button&gt;&lt;sonic-button hideModal minWidth=\'8rem\' type=\'success\'&gt;Send&lt;/sonic-button&gt;',
|
|
124
|
-
removeOnHide: true
|
|
125
|
-
})"
|
|
126
|
-
>
|
|
127
|
-
Open programmatic modal
|
|
128
|
-
</sonic-button>
|
|
129
|
-
</code></pre>
|
|
130
|
-
<pre><code class="language-javascript">import { Modal } from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
131
|
-
|
|
132
|
-
const modal = Modal.create({
|
|
133
|
-
title: "Delete project?",
|
|
134
|
-
subtitle: "This cannot be undone.",
|
|
135
|
-
content: "<p>All files in <strong>Acme HQ</strong> will be removed.</p>",
|
|
136
|
-
actions: `
|
|
137
|
-
<sonic-button hideModal minWidth="8rem">Cancel</sonic-button>
|
|
138
|
-
<sonic-button hideModal minWidth="8rem" type="danger">Delete</sonic-button>
|
|
139
|
-
`,
|
|
140
|
-
removeOnHide: true,
|
|
141
|
-
forceAction: false,
|
|
142
|
-
maxWidth: "min(100vw, 28rem)",
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
modal.addEventListener("hidden", () => {
|
|
146
|
-
console.log("Modal removed from the DOM");
|
|
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>
|
|
338
113
|
|
|
339
114
|
</article>
|
|
340
115
|
</main>
|