@natachah/vanilla-frontend 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/.gitlab-ci.yml +40 -0
  2. package/LICENSE.md +7 -0
  3. package/README.md +11 -0
  4. package/docs/index.html +36 -0
  5. package/docs/main.js +32 -0
  6. package/docs/pages/components/badge.html +154 -0
  7. package/docs/pages/components/button.html +186 -0
  8. package/docs/pages/components/card.html +184 -0
  9. package/docs/pages/components/dialog.html +334 -0
  10. package/docs/pages/components/disclosure.html +310 -0
  11. package/docs/pages/components/dropdown.html +255 -0
  12. package/docs/pages/components/form.html +331 -0
  13. package/docs/pages/components/list.html +140 -0
  14. package/docs/pages/components/loading.html +58 -0
  15. package/docs/pages/components/media.html +130 -0
  16. package/docs/pages/components/nav.html +119 -0
  17. package/docs/pages/components/progress.html +47 -0
  18. package/docs/pages/components/slider.html +311 -0
  19. package/docs/pages/components/table.html +168 -0
  20. package/docs/pages/javascript/autofill.html +170 -0
  21. package/docs/pages/javascript/checkall.html +59 -0
  22. package/docs/pages/javascript/comfort.html +134 -0
  23. package/docs/pages/javascript/consent.html +112 -0
  24. package/docs/pages/javascript/cookie.html +81 -0
  25. package/docs/pages/javascript/form.html +199 -0
  26. package/docs/pages/javascript/scroll.html +209 -0
  27. package/docs/pages/javascript/sidebar.html +53 -0
  28. package/docs/pages/javascript/sortable.html +148 -0
  29. package/docs/pages/javascript/toggle.html +191 -0
  30. package/docs/pages/javascript/tree.html +221 -0
  31. package/docs/pages/layout/grid.html +201 -0
  32. package/docs/pages/layout/reset.html +53 -0
  33. package/docs/pages/layout/typography.html +324 -0
  34. package/docs/pages/quick-start/conventions.html +112 -0
  35. package/docs/pages/quick-start/customization.html +187 -0
  36. package/docs/pages/quick-start/installation.html +95 -0
  37. package/docs/pages/quick-start/mixins.html +228 -0
  38. package/docs/pages/test.html +15 -0
  39. package/docs/src/js/demo.js +98 -0
  40. package/docs/src/js/doc-code.js +102 -0
  41. package/docs/src/js/doc-demo.js +14 -0
  42. package/docs/src/js/doc-layout.js +108 -0
  43. package/docs/src/scss/demo.scss +77 -0
  44. package/docs/src/scss/layout.scss +160 -0
  45. package/docs/src/scss/style.scss +278 -0
  46. package/docs/vite.config.mjs +23 -0
  47. package/esbuild.mjs +25 -0
  48. package/js/_autofill.js +131 -0
  49. package/js/_check-all.js +77 -0
  50. package/js/_comfort.js +174 -0
  51. package/js/_consent.js +84 -0
  52. package/js/_dialog.js +164 -0
  53. package/js/_dropdown.js +101 -0
  54. package/js/_scroll.js +184 -0
  55. package/js/_sidebar.js +97 -0
  56. package/js/_slider.js +249 -0
  57. package/js/_sortable.js +143 -0
  58. package/js/_tabpanel.js +88 -0
  59. package/js/_toggle.js +123 -0
  60. package/js/_tree.js +85 -0
  61. package/js/tests/autofill.test.js +157 -0
  62. package/js/tests/base-component.test.js +108 -0
  63. package/js/tests/check-all.test.js +88 -0
  64. package/js/tests/comfort.test.js +219 -0
  65. package/js/tests/consent.test.js +84 -0
  66. package/js/tests/cookie.test.js +102 -0
  67. package/js/tests/dialog.test.js +189 -0
  68. package/js/tests/dropdown.test.js +115 -0
  69. package/js/tests/form-helper.test.js +155 -0
  70. package/js/tests/scroll.test.js +203 -0
  71. package/js/tests/sidebar.test.js +99 -0
  72. package/js/tests/slider.test.js +307 -0
  73. package/js/tests/sortable.test.js +124 -0
  74. package/js/tests/tabpanel.test.js +114 -0
  75. package/js/tests/toggle.test.js +190 -0
  76. package/js/tests/tree.test.js +165 -0
  77. package/js/utilities/_base-component.js +101 -0
  78. package/js/utilities/_cookie.js +98 -0
  79. package/js/utilities/_error.js +80 -0
  80. package/js/utilities/_form-helper.js +101 -0
  81. package/package.json +42 -0
  82. package/scss/_badge.scss +37 -0
  83. package/scss/_button.scss +34 -0
  84. package/scss/_card.scss +122 -0
  85. package/scss/_dialog.scss +116 -0
  86. package/scss/_disclosure.scss +101 -0
  87. package/scss/_dropdown.scss +68 -0
  88. package/scss/_form.scss +197 -0
  89. package/scss/_grid.scss +40 -0
  90. package/scss/_group.scss +57 -0
  91. package/scss/_list.scss +18 -0
  92. package/scss/_loading.scss +49 -0
  93. package/scss/_media.scss +37 -0
  94. package/scss/_nav.scss +72 -0
  95. package/scss/_progress.scss +40 -0
  96. package/scss/_slider.scss +35 -0
  97. package/scss/_table.scss +36 -0
  98. package/scss/utilities/_mixin.scss +322 -0
  99. package/scss/utilities/_reset.scss +145 -0
  100. package/scss/utilities/_typography.scss +107 -0
  101. package/scss/vanilla-frontend.scss +23 -0
  102. package/scss/variables/_root.scss +70 -0
  103. package/scss/variables/_setting.scss +63 -0
  104. package/vitest.config.js +7 -0
@@ -0,0 +1,334 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Documentations: Components > Dialog</title>
8
+ </head>
9
+
10
+ <body data-preload>
11
+ <doc-layout>
12
+
13
+ <h1>Dialog</h1>
14
+
15
+ <p>The dialog is using the native <code>&lt;dialog&gt;</code> tag.</p>
16
+
17
+ <p>You can define if the dialog is a <b>modal</b> with the <code>aria-modal</code> attribute.</p>
18
+
19
+ <blockquote>
20
+ <p>
21
+ <b>Difference between modal and non-modal:</b><br>
22
+ The key difference is the level interaction and interaction restriction.
23
+ A modal will block interaction with the main content, and they have their own context focus (use of a backdrop). But a non-modal don't impose context and restriction.
24
+ </p>
25
+ </blockquote>
26
+
27
+ <doc-demo>
28
+ <button aria-controls="demoDialog">Open the dialog</button>
29
+ <dialog id="demoDialog" class="demo-dialog">
30
+ <h3>Hey this is a dialog as non-modal !</h3>
31
+ <p>Hello there !</p>
32
+ <button data-dialog-close>Close the dialog</button>
33
+ </dialog>
34
+ </doc-demo>
35
+
36
+ <div class="code-group">
37
+ <div role="tablist">
38
+ <button role="tab" aria-controls="html">HTML</button>
39
+ <button role="tab" aria-controls="scss">SCSS</button>
40
+ <button role="tab" aria-controls="css">CSS</button>
41
+ <button role="tab" aria-controls="js">JS</button>
42
+ </div>
43
+ <doc-code id="html" data-type="html" role="tabpanel">
44
+ <button aria-controls="myDialog">Open the dialog</button>
45
+ <dialog id="myDialog" aria-modal="true">
46
+ Content of the dialog
47
+ <button data-dialog-close>Close the dialog</button>
48
+ </dialog>
49
+ </doc-code>
50
+ <doc-code id="scss" data-type="scss" role="tabpanel">
51
+ @import '@natachah/vanilla-frontend/scss/_dialog';
52
+ </doc-code>
53
+ <doc-code id="css" data-type="css" role="tabpanel">
54
+ --dialog-color
55
+ --dialog-background
56
+ --dialog-border-size
57
+ --dialog-border-style
58
+ --dialog-border-color
59
+ --dialog-border-radius
60
+ --dialog-padding-inline
61
+ --dialog-padding-block
62
+ --dialog-position
63
+ --dialog-width
64
+ --dialog-height
65
+ --dialog-max-width
66
+ --dialog-max-height
67
+ --dialog-index
68
+ --dialog-backdrop-background
69
+ --dialog-backdrop-filter
70
+ --dialog-open-animation
71
+ --dialog-open-transform
72
+ --dialog-close-animation
73
+ --dialog-close-transform
74
+ --dialog-divider-size
75
+ --dialog-divider-style
76
+ --dialog-divider-color
77
+ </doc-code>
78
+ <doc-code id="js" data-type="js" role="tabpanel">
79
+ import Dialog from "@natachah/vanilla-frontend/js/_dialog"
80
+ const myDialog = document.getElementById('myDialog')
81
+ if (myDialog) new Dialog(myDialog)
82
+ </doc-code>
83
+ </div>
84
+
85
+ <p>To work properly you must have a <code>&lt;button&gt;</code> in your page with the attribute <code>aria-controls=&quot;IdOfDialogToOpen&quot;</code> that will open the dialog.</p>
86
+ <p>And inside your <code>&lt;dialog&gt;</code> you should have a <code>&lt;button&gt;</code> with the attribute <code>data-dialog-close</code> to close the dialog.</p>
87
+
88
+ <h2>Layout</h2>
89
+
90
+ <p>The dialog can have a <code>&lt;header&gt;</code> and/or <code>&lt;footer&gt;</code> inside to create a more complexe layout.</p>
91
+
92
+ <doc-demo>
93
+ <button aria-controls="demoDialogLayout">Open the dialog</button>
94
+ <dialog id="demoDialogLayout" class="demo-dialog" aria-modal="true">
95
+ <header>This is a header</header>
96
+ <div>
97
+ <p>This is the content</p>
98
+ <p>This dialog is a modal</p>
99
+ <button data-dialog-close>Close</button>
100
+ </div>
101
+ <footer>This is a footer</footer>
102
+ </dialog>
103
+ </doc-demo>
104
+
105
+ <doc-code>
106
+ <dialog id="myDialog" class="demo-dialog" aria-modal="true">
107
+ <header>This is a header</header>
108
+ <div>
109
+ <p>This is the content</p>
110
+ <button data-dialog-close>Close</button>
111
+ </div>
112
+ <footer>This is a footer</footer>
113
+ </dialog>
114
+ </doc-code>
115
+
116
+ <h2>Form</h2>
117
+
118
+ <p>You can submit a <code>&lt;form&gt;</code> inside the <code>&lt;dialog&gt;</code>.</p>
119
+
120
+ <doc-demo>
121
+ <button aria-controls="demoDialogForm">Open the dialog</button>
122
+ <dialog id="demoDialogForm" class="demo-dialog" aria-modal="true">
123
+ <h3>Dialog with form</h3>
124
+ <form method="POST">
125
+ <label for="animal">What is your favorite animal</label>
126
+ <input id="animal" type="text" name="animal" required>
127
+ <button type="reset" data-dialog-close>Cancel</button>
128
+ <button type="submit">Default submit</button>
129
+ </form>
130
+ </dialog>
131
+ </doc-demo>
132
+
133
+ <doc-code>
134
+ <button aria-controls="myDialog">Open the dialog</button>
135
+ <dialog id="myDialog" aria-modal="true">
136
+ <h3>Dialog with form</h3>
137
+ <form method="POST">
138
+ <label for="animal">What is your favorite animal</label>
139
+ <input id="animal" type="text" name="animal" required>
140
+ <button type="reset" data-dialog-close>Cancel</button>
141
+ <button type="submit">Default submit</button>
142
+ </form>
143
+ </dialog>
144
+ </doc-code>
145
+
146
+ <p>If you want to submit via <b>javascript</b> add the <code>method=&quot;dialog&quot;</code> attribute on the <code>&lt;form&gt;</code> or the <code>formmethod=&quot;dialog&quot;</code> attribute on the <code>&lt;button&gt;</code>.</p>
147
+
148
+ <p>Then you should use the event <b>dialog:submited</b> to catch the values.</p>
149
+
150
+ <doc-demo>
151
+ <button aria-controls="demoDialogFormJs">Open the dialog</button>
152
+ <dialog id="demoDialogFormJs" class="demo-dialog" aria-modal="true">
153
+ <h3>Dialog with form</h3>
154
+ <form method="dialog">
155
+ <label for="animal">What is your favorite animal</label>
156
+ <input id="animal" type="text" name="animal" required>
157
+ <button type="reset" data-dialog-close>Cancel</button>
158
+ <button type="submit">Javascript submit</button>
159
+ </form>
160
+ </dialog>
161
+ <p>Your favorite animal is: <span id="favorite">--</span></p>
162
+ </doc-demo>
163
+
164
+ <div class="code-group">
165
+ <div role="tablist">
166
+ <button role="tab" aria-controls="html">HTML</button>
167
+ <button role="tab" aria-controls="js">JS</button>
168
+ </div>
169
+ <doc-code id="html" data-type="html" role="tabpanel">
170
+ <button aria-controls="myDialog">Open the dialog</button>
171
+ <dialog id="myDialog" aria-modal="true">
172
+ <h3>Dialog with form</h3>
173
+ <form method="dialog">
174
+ <label for="animal">What is your favorite animal</label>
175
+ <input id="animal" type="text" name="animal" required>
176
+ <button type="reset" data-dialog-close>Cancel</button>
177
+ <button type="submit">Javascript submit</button>
178
+ </form>
179
+ </dialog>
180
+ <p>Your favorite animal is: <span id="favorite">--</span></p>
181
+ </doc-code>
182
+ <doc-code id="js" data-type="js" role="tabpanel">
183
+ const demoDialogFormJS = document.getElementById('myDialog')
184
+ if (demoDialogFormJS) {
185
+ new Dialog(demoDialogFormJS)
186
+ demoDialogFormJS.addEventListener('dialog:submited', (e) => {
187
+ const value = e.detail.form.querySelector('input').value
188
+ document.getElementById('favorite').innerText = value
189
+ })
190
+ }
191
+ </doc-code>
192
+ </div>
193
+
194
+ <h2>Javascript</h2>
195
+
196
+ <blockquote>
197
+ <p>To work properly the dialog required some javascript.</p>
198
+ </blockquote>
199
+
200
+ <h3>Methods</h3>
201
+
202
+ <table>
203
+ <thead>
204
+ <tr>
205
+ <th>Method</th>
206
+ <th>Description</th>
207
+ </tr>
208
+ </thead>
209
+ <tbody>
210
+ <tr>
211
+ <td data-label="Method">
212
+ <p>open()</p>
213
+ </td>
214
+ <td data-label="Description">
215
+ <p>This method will open the dialog</p>
216
+ </td>
217
+ </tr>
218
+ <tr>
219
+ <td data-label="Method">
220
+ <p>close()</p>
221
+ </td>
222
+ <td data-label="Description">
223
+ <p>This method will close the dialog</p>
224
+ </td>
225
+ </tr>
226
+ <tr>
227
+ <td data-label="Method">
228
+ <p>submit()</p>
229
+ </td>
230
+ <td data-label="Description">
231
+ <p>This method will submit the dialog</p>
232
+ </td>
233
+ </tr>
234
+ </tbody>
235
+ </table>
236
+
237
+ <h3>Events</h3>
238
+ <table>
239
+ <thead>
240
+ <tr>
241
+ <th>Event</th>
242
+ <th>Description</th>
243
+ <th>Value</th>
244
+ </tr>
245
+ </thead>
246
+ <tbody>
247
+ <tr>
248
+ <td data-label="Event">
249
+ <p>dialog:opening</p>
250
+ </td>
251
+ <td data-label="Description">
252
+ <p>This event is fired when the method <code>open()</code> is called</p>
253
+ </td>
254
+ <td data-label="Value">
255
+ <p>-</p>
256
+ </td>
257
+ </tr>
258
+ <tr>
259
+ <td data-label="Event">
260
+ <p>dialog:opened</p>
261
+ </td>
262
+ <td data-label="Description">
263
+ <p>This event is fired after the method <code>open()</code> is called</p>
264
+ </td>
265
+ <td data-label="Value">
266
+ <p>-</p>
267
+ </td>
268
+ </tr>
269
+ <tr>
270
+ <td data-label="Event">
271
+ <p>dialog:closing</p>
272
+ </td>
273
+ <td data-label="Description">
274
+ <p>This event is fired when the method <code>close()</code> is called</p>
275
+ </td>
276
+ <td data-label="Value">
277
+ <p>-</p>
278
+ </td>
279
+ </tr>
280
+ <tr>
281
+ <td data-label="Event">
282
+ <p>dialog:closed</p>
283
+ </td>
284
+ <td data-label="Description">
285
+ <p>This event is fired after the method <code>close()</code> is called</p>
286
+ </td>
287
+ <td data-label="Value">
288
+ <p>-</p>
289
+ </td>
290
+ </tr>
291
+ <tr>
292
+ <td data-label="Event">
293
+ <p>dialog:submiting</p>
294
+ </td>
295
+ <td data-label="Description">
296
+ <p>This event is fired when the method <code>submit()</code> is called</p>
297
+ </td>
298
+ <td data-label="Value">
299
+ <p><code>form</code> as an <code>HTMLElement</code></p>
300
+ </td>
301
+ </tr>
302
+ <tr>
303
+ <td data-label="Event">
304
+ <p>dialog:submited</p>
305
+ </td>
306
+ <td data-label="Description">
307
+ <p>This event is fired after the method <code>submit()</code> is called</p>
308
+ </td>
309
+ <td data-label="Value">
310
+ <p><code>form</code> as an <code>HTMLElement</code></p>
311
+ </td>
312
+ </tr>
313
+ </tbody>
314
+ </table>
315
+
316
+ <doc-code data-type="js">
317
+ // E.G. basic opening
318
+ document.getElementById('myDialogID').addEventListener('dialog:opening', () => {
319
+ console.log('The dialog is opening')
320
+ })
321
+
322
+ // E.G. with form value
323
+ document.getElementById('myDialogID').addEventListener('dialog:submited', (e) => {
324
+ const theHTMLForm = e.detail.form
325
+ ...
326
+ })
327
+ </doc-code>
328
+
329
+
330
+ </doc-layout>
331
+ <script type="module" src="/main.js"></script>
332
+ </body>
333
+
334
+ </html>
@@ -0,0 +1,310 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Documentations: Components > Disclosure</title>
8
+ </head>
9
+
10
+ <body data-preload>
11
+ <doc-layout>
12
+
13
+ <h1>Disclosure</h1>
14
+
15
+ <p>The disclosure is using the native <code>&lt;details&gt;</code> and <code>&lt;summary&gt;</code> tags.</p>
16
+
17
+ <doc-demo>
18
+ <details>
19
+ <summary>
20
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
21
+ <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" />
22
+ </svg>
23
+ Some disclosure
24
+ </summary>
25
+ <div>
26
+ <p>
27
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis non, doloremque possimus maiores earum, aperiam dolore sequi incidunt a nam
28
+ reprehenderit ipsa inventore exercitationem dolor officiis odio optio nisi facilis? Aliquid nihil sequi beatae architecto ullam quisquam
29
+ voluptatem, atque optio voluptatum doloribus esse molestiae repudiandae nesciunt dolorem impedit corrupti ipsam.
30
+ </p>
31
+ </div>
32
+ </details>
33
+ </doc-demo>
34
+
35
+ <div class="code-group">
36
+ <div role="tablist">
37
+ <button role="tab" aria-controls="html">HTML</button>
38
+ <button role="tab" aria-controls="scss">SCSS</button>
39
+ <button role="tab" aria-controls="css">CSS</button>
40
+ </div>
41
+ <doc-code id="html" data-type="html" role="tabpanel">
42
+ <details>
43
+ <summary>
44
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
45
+ <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" />
46
+ </svg>
47
+ Title
48
+ </summary>
49
+ <div>
50
+ Content
51
+ </div>
52
+ </details>
53
+ </doc-code>
54
+ <doc-code id="scss" data-type="scss" role="tabpanel">
55
+ @import '@natachah/vanilla-frontend/scss/_disclosure';
56
+ </doc-code>
57
+ <doc-code id="css" data-type="css" role="tabpanel">
58
+ --disclosure-color
59
+ --disclosure-background
60
+ --disclosure-border-size
61
+ --disclosure-border-style
62
+ --disclosure-border-color
63
+ --disclosure-border-radius
64
+ --disclosure-padding-inline
65
+ --disclosure-padding-block
66
+ --disclosure-transition
67
+ --disclosure-decoration
68
+ --disclosure-focus-size
69
+ --disclosure-focus-style
70
+ --disclosure-focus-color
71
+ --disclosure-focus-offset
72
+ --disclosure-hover-color
73
+ --disclosure-hover-background
74
+ --disclosure-hover-border-color
75
+ --disclosure-active-color
76
+ --disclosure-active-background
77
+ --disclosure-active-border-color
78
+ --disclosure-disabled-opacity
79
+ --disclosure-svg-transform
80
+ </doc-code>
81
+ </div>
82
+
83
+ <blockquote class="tip">
84
+ <p>It's recommended to add a <code>&lt;div&gt;</code> around the inside content for better design.</p>
85
+ </blockquote>
86
+
87
+ <h2>States</h2>
88
+
89
+ <p>The <code>&lt;summary&gt;</code> can have multiple states as <code>:focus</code>, <code>:hover</code> and <code>:active</code></p>
90
+
91
+ <blockquote>
92
+ <p>The active state is automatically displayed when the disclosure is <code>open</code>.</p>
93
+ </blockquote>
94
+
95
+ <h2>Variants</h2>
96
+
97
+ <h3>Outline</h3>
98
+
99
+ <p>You can create an outline variation by adding the class <code>.outline</code>.</p>
100
+
101
+ <doc-demo>
102
+ <details>
103
+ <summary class="outline">
104
+ Some disclosure
105
+ </summary>
106
+ <div>
107
+ <p>
108
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis non, doloremque possimus maiores earum, aperiam dolore sequi incidunt a nam
109
+ reprehenderit ipsa inventore exercitationem dolor officiis odio optio nisi facilis? Aliquid nihil sequi beatae architecto ullam quisquam
110
+ voluptatem, atque optio voluptatum doloribus esse molestiae repudiandae nesciunt dolorem impedit corrupti ipsam.
111
+ </p>
112
+ </div>
113
+ </details>
114
+ </doc-demo>
115
+
116
+ <div class="code-group">
117
+ <div role="tablist">
118
+ <button role="tab" aria-controls="html">HTML</button>
119
+ <button role="tab" aria-controls="scss">setting.scss</button>
120
+ </div>
121
+ <doc-code id="html" data-type="html" role="tabpanel">
122
+ <details>
123
+ <summary class="outline">
124
+ Some disclosure
125
+ </summary>
126
+ <div>
127
+ ...
128
+ </div>
129
+ </details>
130
+ </doc-code>
131
+ <doc-code id="scss" data-type="scss" role="tabpanel">
132
+ $outline-variations: (
133
+ disclosure
134
+ );
135
+ </doc-code>
136
+ </div>
137
+
138
+ <blockquote class="todo">
139
+ <p>This feature must be optimize...</p>
140
+ </blockquote>
141
+
142
+ <h3>Color</h3>
143
+ <p>You can create a color variation by adding the class <code>.{COLOR}</code>.</p>
144
+ <p>The variation can be applied on:</p>
145
+ <ul>
146
+ <li>The full component on the<code>&lt;details&gt;</code></li>
147
+ <li>Only the button, on the <code>&lt;summary&gt;</code></li>
148
+ <li>Only the content, on the <code>&lt;div&gt;</code></li>
149
+ </ul>
150
+
151
+ <doc-demo>
152
+ <details class="primary">
153
+ <summary>
154
+ Some disclosure FULL primary
155
+ </summary>
156
+ <div>
157
+ <p>
158
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis non, doloremque possimus maiores earum, aperiam dolore sequi incidunt a nam
159
+ reprehenderit ipsa inventore exercitationem dolor officiis odio optio nisi facilis? Aliquid nihil sequi beatae architecto ullam quisquam
160
+ voluptatem, atque optio voluptatum doloribus esse molestiae repudiandae nesciunt dolorem impedit corrupti ipsam.
161
+ </p>
162
+ </div>
163
+ </details>
164
+
165
+ <details style="margin-top:1rem">
166
+ <summary class="primary">
167
+ Some disclosure with ONLY summary as primary
168
+ </summary>
169
+ <div>
170
+ <p>
171
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis non, doloremque possimus maiores earum, aperiam dolore sequi incidunt a nam
172
+ reprehenderit ipsa inventore exercitationem dolor officiis odio optio nisi facilis? Aliquid nihil sequi beatae architecto ullam quisquam
173
+ voluptatem, atque optio voluptatum doloribus esse molestiae repudiandae nesciunt dolorem impedit corrupti ipsam.
174
+ </p>
175
+ </div>
176
+ </details>
177
+
178
+ <details style="margin-top:1rem">
179
+ <summary>
180
+ Some disclosure with ONLY content as primary
181
+ </summary>
182
+ <div class="primary">
183
+ <p>
184
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis non, doloremque possimus maiores earum, aperiam dolore sequi incidunt a nam
185
+ reprehenderit ipsa inventore exercitationem dolor officiis odio optio nisi facilis? Aliquid nihil sequi beatae architecto ullam quisquam
186
+ voluptatem, atque optio voluptatum doloribus esse molestiae repudiandae nesciunt dolorem impedit corrupti ipsam.
187
+ </p>
188
+ </div>
189
+ </details>
190
+ </doc-demo>
191
+
192
+ <div class="code-group">
193
+ <div role="tablist">
194
+ <button role="tab" aria-controls="html">HTML</button>
195
+ <button role="tab" aria-controls="scss">setting.scss</button>
196
+ </div>
197
+ <doc-code id="html" data-type="html" role="tabpanel">
198
+ <details class="primary">
199
+ <summary>
200
+ Some disclosure FULL primary
201
+ </summary>
202
+ <div>
203
+ ...
204
+ </div>
205
+ </details>
206
+
207
+ <details>
208
+ <summary class="primary">
209
+ Some disclosure with ONLY summary as primary
210
+ </summary>
211
+ <div>
212
+ ...
213
+ </div>
214
+ </details>
215
+
216
+ <details>
217
+ <summary>
218
+ Some disclosure with ONLY content as primary
219
+ </summary>
220
+ <div class="primary">
221
+ ...
222
+ </div>
223
+ </details>
224
+ </doc-code>
225
+ <doc-code id="scss" data-type="scss" role="tabpanel">
226
+ $color-variations: (
227
+ disclosure: (primary)
228
+ );
229
+ </doc-code>
230
+ </div>
231
+
232
+ <blockquote class="todo">
233
+ <p>This feature must be optimize...</p>
234
+ </blockquote>
235
+
236
+ <h3>Group</h3>
237
+
238
+ <p>You can group some disclosure by putting them in a <code>&lt;div&gt;</code> with the class <code>.accordion</code>.</p>
239
+
240
+ <doc-demo>
241
+ <div class="accordion">
242
+ <details>
243
+ <summary>
244
+ Disclosure A
245
+ </summary>
246
+ <div>
247
+ <p>
248
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis non, doloremque possimus maiores earum, aperiam dolore sequi incidunt a nam.
249
+ </p>
250
+ </div>
251
+ </details>
252
+ <details>
253
+ <summary>
254
+ Disclosure B
255
+ </summary>
256
+ <div>
257
+ <p>
258
+ Ipsa inventore exercitationem dolor officiis odio optio nisi facilis? Aliquid nihil sequi beatae architecto ullam quisquam.
259
+ </p>
260
+ </div>
261
+ </details>
262
+ <details>
263
+ <summary>
264
+ Disclosure C
265
+ </summary>
266
+ <div>
267
+ <p>
268
+ Aliquid nihil sequi beatae architecto ullam quisquam
269
+ voluptatem, atque optio voluptatum doloribus esse molestiae repudiandae nesciunt dolorem impedit corrupti ipsam.
270
+ </p>
271
+ </div>
272
+ </details>
273
+ </div>
274
+ </doc-demo>
275
+
276
+
277
+ <doc-code>
278
+ <div class="accordion">
279
+ <details>
280
+ <summary>
281
+ Disclosure A
282
+ </summary>
283
+ <div>
284
+ AAA
285
+ </div>
286
+ </details>
287
+ <details>
288
+ <summary>
289
+ Disclosure B
290
+ </summary>
291
+ <div>
292
+ BBB
293
+ </div>
294
+ </details>
295
+ <details>
296
+ <summary>
297
+ Disclosure C
298
+ </summary>
299
+ <div>
300
+ CCC
301
+ </div>
302
+ </details>
303
+ </div>
304
+ </doc-code>
305
+
306
+ </doc-layout>
307
+ <script type="module" src="/main.js"></script>
308
+ </body>
309
+
310
+ </html>