@natachah/vanilla-frontend 0.4.0 → 1.0.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 (283) hide show
  1. package/.gitlab-ci.yml +22 -13
  2. package/LICENSE.md +1 -1
  3. package/docs/.vitepress/config.mts +101 -0
  4. package/docs/base/layout.md +77 -0
  5. package/docs/base/media.md +146 -0
  6. package/docs/base/reset.md +33 -0
  7. package/docs/base/typography.md +296 -0
  8. package/docs/classes/badge.md +146 -0
  9. package/docs/classes/breadcrumb.md +54 -0
  10. package/docs/classes/card.md +171 -0
  11. package/docs/classes/dropdown.md +180 -0
  12. package/docs/classes/grid.md +230 -0
  13. package/docs/classes/list.md +90 -0
  14. package/docs/components/button.md +254 -0
  15. package/docs/components/dialog.md +223 -0
  16. package/docs/components/disclosure.md +169 -0
  17. package/docs/components/form.md +514 -0
  18. package/docs/components/loading.md +53 -0
  19. package/docs/components/popover.md +270 -0
  20. package/docs/components/progress.md +33 -0
  21. package/docs/components/table.md +175 -0
  22. package/docs/index.md +27 -0
  23. package/docs/javascript/autofill.md +155 -0
  24. package/docs/javascript/check.md +53 -0
  25. package/docs/javascript/comfort.md +125 -0
  26. package/docs/javascript/consent.md +89 -0
  27. package/docs/javascript/cookie.md +33 -0
  28. package/docs/javascript/drawer.md +99 -0
  29. package/docs/javascript/form.md +130 -0
  30. package/docs/javascript/scroll.md +104 -0
  31. package/docs/javascript/slider.md +130 -0
  32. package/docs/javascript/sortable.md +127 -0
  33. package/docs/javascript/tabpanel.md +72 -0
  34. package/docs/javascript/toggle.md +182 -0
  35. package/docs/javascript/trap.md +33 -0
  36. package/docs/javascript/tree.md +220 -0
  37. package/docs/prologue/conventions.md +92 -0
  38. package/docs/prologue/release.md +44 -0
  39. package/docs/prologue/upgrade.md +21 -0
  40. package/docs/{pages/demo/layout.html → public/demo/demo.html} +1 -2
  41. package/docs/start/customization.md +184 -0
  42. package/docs/start/install.md +80 -0
  43. package/docs/start/mixin.md +203 -0
  44. package/docs/vuejs/ComponentPreview.vue +99 -0
  45. package/js/_slider.js +17 -1
  46. package/js/vanilla-frontend-doc.js +105 -0
  47. package/natachah-vanilla-frontend-1.0.0.tgz +0 -0
  48. package/package.json +11 -14
  49. package/public/404.html +22 -0
  50. package/public/assets/app.DsgDPRSA.js +1 -0
  51. package/public/assets/base_layout.md.CTGv6rTn.js +13 -0
  52. package/public/assets/base_layout.md.CTGv6rTn.lean.js +1 -0
  53. package/public/assets/base_media.md.CcuDUcF-.js +24 -0
  54. package/public/assets/base_media.md.CcuDUcF-.lean.js +1 -0
  55. package/public/assets/base_reset.md.DqIdqFRJ.js +3 -0
  56. package/public/assets/base_reset.md.DqIdqFRJ.lean.js +1 -0
  57. package/public/assets/base_typography.md.DV-ikqGZ.js +87 -0
  58. package/public/assets/base_typography.md.DV-ikqGZ.lean.js +1 -0
  59. package/public/assets/chunks/ComponentPreview.BW2s4ay5.js +27 -0
  60. package/public/assets/chunks/framework.CaiDwmc7.js +4 -0
  61. package/public/assets/chunks/theme.DL_11MHV.js +1 -0
  62. package/public/assets/classes_badge.md.BCGzPr6f.js +24 -0
  63. package/public/assets/classes_badge.md.BCGzPr6f.lean.js +1 -0
  64. package/public/assets/classes_breadcrumb.md.vU6jlo36.js +15 -0
  65. package/public/assets/classes_breadcrumb.md.vU6jlo36.lean.js +1 -0
  66. package/public/assets/classes_card.md.BZEh2l_B.js +41 -0
  67. package/public/assets/classes_card.md.BZEh2l_B.lean.js +1 -0
  68. package/public/assets/classes_dropdown.md.BLVw_xQY.js +70 -0
  69. package/public/assets/classes_dropdown.md.BLVw_xQY.lean.js +1 -0
  70. package/public/assets/classes_grid.md.47v-Ybqe.js +45 -0
  71. package/public/assets/classes_grid.md.47v-Ybqe.lean.js +1 -0
  72. package/public/assets/classes_list.md.BW9PWZV1.js +36 -0
  73. package/public/assets/classes_list.md.BW9PWZV1.lean.js +1 -0
  74. package/public/assets/components_button.md.vx3HzdpN.js +45 -0
  75. package/public/assets/components_button.md.vx3HzdpN.lean.js +1 -0
  76. package/public/assets/components_dialog.md.C-0gJGus.js +76 -0
  77. package/public/assets/components_dialog.md.C-0gJGus.lean.js +1 -0
  78. package/public/assets/components_disclosure.md.DeSRu9_P.js +53 -0
  79. package/public/assets/components_disclosure.md.DeSRu9_P.lean.js +1 -0
  80. package/public/assets/components_form.md.Be8d5WFv.js +122 -0
  81. package/public/assets/components_form.md.Be8d5WFv.lean.js +1 -0
  82. package/public/assets/components_loading.md.CKDG7z5x.js +4 -0
  83. package/public/assets/components_loading.md.CKDG7z5x.lean.js +1 -0
  84. package/public/assets/components_popover.md.CwgNttNc.js +102 -0
  85. package/public/assets/components_popover.md.CwgNttNc.lean.js +1 -0
  86. package/public/assets/components_progress.md.CNC7rJiC.js +6 -0
  87. package/public/assets/components_progress.md.CNC7rJiC.lean.js +1 -0
  88. package/public/assets/components_table.md.LyBkIDkF.js +75 -0
  89. package/public/assets/components_table.md.LyBkIDkF.lean.js +1 -0
  90. package/public/assets/index.md.CJiHmjB7.js +1 -0
  91. package/public/assets/index.md.CJiHmjB7.lean.js +1 -0
  92. package/public/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  93. package/public/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  94. package/public/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  95. package/public/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  96. package/public/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  97. package/public/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  98. package/public/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  99. package/public/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  100. package/public/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  101. package/public/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  102. package/public/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  103. package/public/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  104. package/public/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  105. package/public/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  106. package/public/assets/javascript_autofill.md.BewVUo4H.js +49 -0
  107. package/public/assets/javascript_autofill.md.BewVUo4H.lean.js +1 -0
  108. package/public/assets/javascript_check.md.B6ajE66i.js +13 -0
  109. package/public/assets/javascript_check.md.B6ajE66i.lean.js +1 -0
  110. package/public/assets/javascript_comfort.md.BRci3j7V.js +20 -0
  111. package/public/assets/javascript_comfort.md.BRci3j7V.lean.js +1 -0
  112. package/public/assets/javascript_consent.md.Bjv8ZDS6.js +29 -0
  113. package/public/assets/javascript_consent.md.Bjv8ZDS6.lean.js +1 -0
  114. package/public/assets/javascript_cookie.md.Dlhyk4Ha.js +2 -0
  115. package/public/assets/javascript_cookie.md.Dlhyk4Ha.lean.js +1 -0
  116. package/public/assets/javascript_drawer.md.BCJX3fL-.js +32 -0
  117. package/public/assets/javascript_drawer.md.BCJX3fL-.lean.js +1 -0
  118. package/public/assets/javascript_form.md.Cwf_gxLI.js +40 -0
  119. package/public/assets/javascript_form.md.Cwf_gxLI.lean.js +2 -0
  120. package/public/assets/javascript_scroll.md.BrJijWbF.js +30 -0
  121. package/public/assets/javascript_scroll.md.BrJijWbF.lean.js +1 -0
  122. package/public/assets/javascript_slider.md.DDO8wC4u.js +27 -0
  123. package/public/assets/javascript_slider.md.DDO8wC4u.lean.js +1 -0
  124. package/public/assets/javascript_sortable.md.BKyem7yw.js +35 -0
  125. package/public/assets/javascript_sortable.md.BKyem7yw.lean.js +1 -0
  126. package/public/assets/javascript_tabpanel.md.D9M-_xE0.js +19 -0
  127. package/public/assets/javascript_tabpanel.md.D9M-_xE0.lean.js +1 -0
  128. package/public/assets/javascript_toggle.md.C8582WNC.js +46 -0
  129. package/public/assets/javascript_toggle.md.C8582WNC.lean.js +1 -0
  130. package/public/assets/javascript_trap.md.Bc59YUng.js +2 -0
  131. package/public/assets/javascript_trap.md.Bc59YUng.lean.js +1 -0
  132. package/public/assets/javascript_tree.md.uc1UUsFV.js +72 -0
  133. package/public/assets/javascript_tree.md.uc1UUsFV.lean.js +1 -0
  134. package/public/assets/prologue_conventions.md.D8nVwlRS.js +34 -0
  135. package/public/assets/prologue_conventions.md.D8nVwlRS.lean.js +1 -0
  136. package/public/assets/prologue_release.md.CG6nuFnt.js +1 -0
  137. package/public/assets/prologue_release.md.CG6nuFnt.lean.js +1 -0
  138. package/public/assets/prologue_upgrade.md.CFxokaBG.js +1 -0
  139. package/public/assets/prologue_upgrade.md.CFxokaBG.lean.js +1 -0
  140. package/public/assets/start_customization.md.t-ze_NoQ.js +141 -0
  141. package/public/assets/start_customization.md.t-ze_NoQ.lean.js +1 -0
  142. package/public/assets/start_install.md.OluH7l11.js +46 -0
  143. package/public/assets/start_install.md.OluH7l11.lean.js +1 -0
  144. package/public/assets/start_mixin.md.D76cLRSX.js +85 -0
  145. package/public/assets/start_mixin.md.D76cLRSX.lean.js +1 -0
  146. package/public/assets/style.zIeGMibA.css +1 -0
  147. package/public/base/layout.html +37 -0
  148. package/public/base/media.html +179 -0
  149. package/public/base/reset.html +27 -0
  150. package/public/base/typography.html +320 -0
  151. package/public/bundles/vanilla-frontend-doc.css +1 -0
  152. package/public/bundles/vanilla-frontend-doc.js +1 -0
  153. package/public/bundles/vanilla-frontend.css +1 -0
  154. package/public/classes/badge.html +205 -0
  155. package/public/classes/breadcrumb.html +66 -0
  156. package/public/classes/card.html +222 -0
  157. package/public/classes/dropdown.html +147 -0
  158. package/public/classes/grid.html +278 -0
  159. package/public/classes/list.html +113 -0
  160. package/public/components/button.html +304 -0
  161. package/public/components/dialog.html +205 -0
  162. package/public/components/disclosure.html +130 -0
  163. package/public/components/form.html +589 -0
  164. package/public/components/loading.html +107 -0
  165. package/public/components/popover.html +257 -0
  166. package/public/components/progress.html +57 -0
  167. package/public/components/table.html +152 -0
  168. package/public/demo/demo.html +84 -0
  169. package/public/hashmap.json +1 -0
  170. package/public/index.html +25 -0
  171. package/public/javascript/autofill.html +152 -0
  172. package/public/javascript/check.html +64 -0
  173. package/public/javascript/comfort.html +123 -0
  174. package/public/javascript/consent.html +80 -0
  175. package/public/javascript/cookie.html +26 -0
  176. package/public/javascript/drawer.html +83 -0
  177. package/public/javascript/form.html +117 -0
  178. package/public/javascript/scroll.html +81 -0
  179. package/public/javascript/slider.html +78 -0
  180. package/public/javascript/sortable.html +112 -0
  181. package/public/javascript/tabpanel.html +70 -0
  182. package/public/javascript/toggle.html +201 -0
  183. package/public/javascript/trap.html +26 -0
  184. package/public/javascript/tree.html +175 -0
  185. package/public/prologue/conventions.html +58 -0
  186. package/public/prologue/release.html +25 -0
  187. package/public/prologue/upgrade.html +25 -0
  188. package/public/start/customization.html +165 -0
  189. package/public/start/install.html +70 -0
  190. package/public/start/mixin.html +109 -0
  191. package/public/vp-icons.css +0 -0
  192. package/sandbox/index.html +27 -0
  193. package/sandbox/js/sandbox-header.js +57 -0
  194. package/sandbox/js/sandbox-test.js +91 -0
  195. package/sandbox/pages/base/layout.html +80 -0
  196. package/sandbox/pages/base/media.html +52 -0
  197. package/sandbox/pages/base/typography.html +132 -0
  198. package/sandbox/pages/components/button.html +70 -0
  199. package/sandbox/pages/components/dialog.html +72 -0
  200. package/sandbox/pages/components/disclosure.html +77 -0
  201. package/sandbox/pages/components/form.html +164 -0
  202. package/sandbox/pages/components/loading.html +32 -0
  203. package/sandbox/pages/components/popover.html +119 -0
  204. package/sandbox/pages/components/progress.html +28 -0
  205. package/sandbox/pages/components/table.html +80 -0
  206. package/sandbox/pages/customs/badge.html +59 -0
  207. package/sandbox/pages/customs/breadcrumb.html +34 -0
  208. package/sandbox/pages/customs/card.html +71 -0
  209. package/sandbox/pages/customs/dropdown.html +70 -0
  210. package/sandbox/pages/customs/grid.html +109 -0
  211. package/sandbox/pages/customs/list.html +43 -0
  212. package/sandbox/pages/javascript/autofill.html +39 -0
  213. package/sandbox/pages/javascript/checkall.html +37 -0
  214. package/sandbox/pages/javascript/comfort.html +41 -0
  215. package/sandbox/pages/javascript/consent.html +45 -0
  216. package/sandbox/pages/javascript/form.html +50 -0
  217. package/sandbox/pages/javascript/scroll.html +44 -0
  218. package/sandbox/pages/javascript/slider.html +44 -0
  219. package/sandbox/pages/javascript/sortable.html +56 -0
  220. package/sandbox/pages/javascript/tabpanel.html +39 -0
  221. package/sandbox/pages/javascript/toggle.html +72 -0
  222. package/sandbox/pages/javascript/tree.html +96 -0
  223. package/sandbox/sandbox.js +26 -0
  224. package/sandbox/scss/sandbox-header.scss +93 -0
  225. package/scss/base/_reset.scss +2 -0
  226. package/scss/components/_badge.scss +2 -1
  227. package/scss/components/_dropdown.scss +2 -2
  228. package/scss/components/_group.scss +8 -4
  229. package/scss/components/_popover.scss +74 -0
  230. package/scss/components/index.scss +1 -0
  231. package/scss/themes/_root.scss +3 -0
  232. package/scss/vanilla-frontend-doc.scss +46 -1
  233. package/scss/vanilla-frontend-sandbox.scss +34 -0
  234. package/vite.config.js +30 -0
  235. package/docs/index.html +0 -36
  236. package/docs/main-demo.js +0 -2
  237. package/docs/main.js +0 -34
  238. package/docs/pages/base/layout.html +0 -131
  239. package/docs/pages/base/media.html +0 -142
  240. package/docs/pages/base/reset.html +0 -53
  241. package/docs/pages/base/typography.html +0 -334
  242. package/docs/pages/components/button.html +0 -202
  243. package/docs/pages/components/dialog.html +0 -336
  244. package/docs/pages/components/disclosure.html +0 -174
  245. package/docs/pages/components/form.html +0 -427
  246. package/docs/pages/components/loading.html +0 -58
  247. package/docs/pages/components/progress.html +0 -47
  248. package/docs/pages/components/table.html +0 -168
  249. package/docs/pages/customs/badge.html +0 -150
  250. package/docs/pages/customs/breadcrumb.html +0 -67
  251. package/docs/pages/customs/card.html +0 -185
  252. package/docs/pages/customs/drawer.html +0 -149
  253. package/docs/pages/customs/dropdown.html +0 -270
  254. package/docs/pages/customs/grid.html +0 -185
  255. package/docs/pages/customs/list.html +0 -112
  256. package/docs/pages/customs/slider.html +0 -273
  257. package/docs/pages/javascript/autofill.html +0 -170
  258. package/docs/pages/javascript/checkall.html +0 -59
  259. package/docs/pages/javascript/comfort.html +0 -146
  260. package/docs/pages/javascript/consent.html +0 -112
  261. package/docs/pages/javascript/cookie.html +0 -81
  262. package/docs/pages/javascript/form.html +0 -199
  263. package/docs/pages/javascript/scroll.html +0 -209
  264. package/docs/pages/javascript/sortable.html +0 -167
  265. package/docs/pages/javascript/tabpanel.html +0 -89
  266. package/docs/pages/javascript/toggle.html +0 -193
  267. package/docs/pages/javascript/trap.html +0 -89
  268. package/docs/pages/javascript/tree.html +0 -256
  269. package/docs/pages/quick-start/conventions.html +0 -112
  270. package/docs/pages/quick-start/customization.html +0 -184
  271. package/docs/pages/quick-start/installation.html +0 -97
  272. package/docs/pages/quick-start/mixins.html +0 -214
  273. package/docs/src/js/demo.js +0 -110
  274. package/docs/src/js/doc-code.js +0 -102
  275. package/docs/src/js/doc-demo.js +0 -14
  276. package/docs/src/js/doc-layout.js +0 -117
  277. package/docs/src/scss/demo.scss +0 -77
  278. package/docs/src/scss/layout.scss +0 -83
  279. package/docs/src/scss/style.scss +0 -278
  280. package/docs/vite.config.mjs +0 -23
  281. package/esbuild.mjs +0 -25
  282. package/natachah-vanilla-frontend-0.4.0.tgz +0 -0
  283. package/vitest.config.js +0 -8
package/.gitlab-ci.yml CHANGED
@@ -15,23 +15,19 @@ unit-test-job:
15
15
  stage: test
16
16
  rules:
17
17
  - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
18
+ - if: $CI_COMMIT_BRANCH =~ /^hotfix\//
18
19
  script:
19
20
  - npm test
20
21
 
21
- pages:
22
+ create-docs-job:
22
23
  stage: build
23
24
  script:
25
+ - npm run assets:build
26
+ - echo "The assets has been generated in docs/public/bundles"
24
27
  - npm run docs:build
25
- - echo "Fichiers générés dans docs/dist :"
26
- - ls -R docs/dist
27
- - rm -rf public
28
- - mkdir public
29
- - cp -a docs/dist/* public/
30
- - echo "Fichiers dans le répertoire public :"
31
- - ls -R public
28
+ - echo "Vitepress doc has been generated !"
32
29
  artifacts:
33
30
  paths:
34
- # The folder that contains the files to be exposed at the Page URL
35
31
  - public
36
32
  rules:
37
33
  - if: $CI_COMMIT_REF_NAME == "production"
@@ -41,13 +37,26 @@ publish-job:
41
37
  environment: production
42
38
  rules:
43
39
  - if: $CI_COMMIT_REF_NAME == "production"
40
+ - if: $CI_COMMIT_REF_NAME =~ /^support\//
44
41
  id_tokens:
45
42
  NPM_ID_TOKEN:
46
43
  aud: "npm:registry.npmjs.org"
47
44
  SIGSTORE_ID_TOKEN:
48
45
  aud: sigstore
49
46
  script:
50
- - echo "Fichiers dans le répertoire public avant publication :"
51
- - ls -R public
52
- - npm pack
53
- - npm publish --access public
47
+ - |
48
+ # 1. Lire la version réelle dans le package.json
49
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
50
+
51
+ # 2. Déterminer le tag NPM
52
+ if [ "$CI_COMMIT_REF_NAME" == "production" ]; then
53
+ EXPORT_TAG="latest"
54
+ else
55
+ EXPORT_TAG="$PACKAGE_VERSION"
56
+ fi
57
+
58
+ echo "Publication to NPMJS with the tag: $EXPORT_TAG"
59
+
60
+ # 2. Publication
61
+ npm pack
62
+ npm publish --access public --tag $EXPORT_TAG
package/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024 Natacha Herth
1
+ Copyright (c) 2026 Natacha Herth
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
@@ -0,0 +1,101 @@
1
+ import { defineConfig } from 'vitepress'
2
+
3
+ // https://vitepress.dev/reference/site-config
4
+ export default defineConfig({
5
+ outDir: '../public',
6
+ title: "Vanilla Frontend",
7
+ description: "Documentation of my package",
8
+ themeConfig: {
9
+ // https://vitepress.dev/reference/default-theme-config
10
+ nav: [
11
+ { text: 'Home', link: '/' },
12
+ ],
13
+
14
+ sidebar: [
15
+ {
16
+ text: 'Prologue',
17
+ items: [
18
+ { text: 'Release Notes', link: '/prologue/release' },
19
+ { text: 'Upgrade guide', link: '/prologue/upgrade' },
20
+ { text: 'Conventions', link: '/prologue/conventions' },
21
+ ]
22
+ },
23
+ {
24
+ text: 'Quick start',
25
+ items: [
26
+ { text: 'Install', link: '/start/install' },
27
+ { text: 'Customization', link: '/start/customization' },
28
+ { text: 'SCSS mixin', link: '/start/mixin' },
29
+ ]
30
+ },
31
+ {
32
+ text: 'Base',
33
+ items: [
34
+ { text: 'Reset', link: '/base/reset' },
35
+ { text: 'Layout', link: '/base/layout' },
36
+ { text: 'Typography', link: '/base/typography' },
37
+ { text: 'Media', link: '/base/media' },
38
+ ]
39
+ },
40
+ {
41
+ text: 'Components',
42
+ items: [
43
+ { text: 'Button', link: '/components/button' },
44
+ { text: 'Dialog', link: '/components/dialog' },
45
+ { text: 'Disclosure', link: '/components/disclosure' },
46
+ { text: 'Form', link: '/components/form' },
47
+ { text: 'Loading', link: '/components/loading' },
48
+ { text: 'Popover', link: '/components/popover' },
49
+ { text: 'Progress', link: '/components/progress' },
50
+ { text: 'Table', link: '/components/table' },
51
+ ]
52
+ },
53
+
54
+ {
55
+ text: 'Class components',
56
+ items: [
57
+ { text: 'Badge', link: '/classes/badge' },
58
+ { text: 'Breadcrumb', link: '/classes/breadcrumb' },
59
+ { text: 'Card', link: '/classes/card' },
60
+ { text: 'Dropdown', link: '/classes/dropdown' },
61
+ { text: 'Grid', link: '/classes/grid' },
62
+ { text: 'List', link: '/classes/list' },
63
+ ]
64
+ },
65
+ {
66
+ text: 'Javascript',
67
+ items: [
68
+ { text: 'Autofill', link: '/javascript/autofill' },
69
+ { text: 'Check all', link: '/javascript/check' },
70
+ { text: 'Comfort', link: '/javascript/comfort' },
71
+ { text: 'Consent', link: '/javascript/consent' },
72
+ { text: 'Cookie', link: '/javascript/cookie' },
73
+ { text: 'Drawer', link: '/javascript/drawer' },
74
+ { text: 'Form helper', link: '/javascript/form' },
75
+ { text: 'Scroll', link: '/javascript/scroll' },
76
+ { text: 'Slider', link: '/javascript/slider' },
77
+ { text: 'Sortable', link: '/javascript/sortable' },
78
+ { text: 'Tabpanel', link: '/javascript/tabpanel' },
79
+ { text: 'Toggle', link: '/javascript/toggle' },
80
+ { text: 'Trap', link: '/javascript/trap' },
81
+ { text: 'Tree', link: '/javascript/tree' },
82
+ ]
83
+ },
84
+ ],
85
+
86
+ footer: {
87
+ message: 'Released under the MIT License.',
88
+ copyright: 'Copyright © 2024-present <a href="https://natachaherth.ch">Natacha Herth</a>'
89
+ },
90
+
91
+ socialLinks: [
92
+ {
93
+ icon: {
94
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-gitlab" viewBox="0 0 16 16"><path d="m15.734 6.1-.022-.058L13.534.358a.57.57 0 0 0-.563-.356.6.6 0 0 0-.328.122.6.6 0 0 0-.193.294l-1.47 4.499H5.025l-1.47-4.5A.572.572 0 0 0 2.47.358L.289 6.04l-.022.057A4.044 4.044 0 0 0 1.61 10.77l.007.006.02.014 3.318 2.485 1.64 1.242 1 .755a.67.67 0 0 0 .814 0l1-.755 1.64-1.242 3.338-2.5.009-.007a4.05 4.05 0 0 0 1.34-4.668Z" /></svg>'
95
+ },
96
+ link: 'https://gitlab.com/packages4913705/vanilla-frontend',
97
+ ariaLabel: 'Gitlab'
98
+ }
99
+ ],
100
+ }
101
+ })
@@ -0,0 +1,77 @@
1
+ # Layout
2
+
3
+ The framework uses a CSS grid to create the default page layout on the body. It features default CSS variables that you can customize, such as the maximum content width, which is set at **1280px**. Since it uses a grid, it includes gaps and columns.
4
+
5
+ Also, the grid template as two content zone available as **full** and **content** that you can use as you wish.
6
+
7
+ But as every website can be different, these value can be changed !
8
+
9
+ ```scss
10
+ @use '@natachah/vanilla-frontend/scss/base/layout'
11
+ ```
12
+
13
+ ## Device Breakpoint Viewport
14
+
15
+ | Device | Breakpoint | Columns | Max-width |
16
+ | ------ | ---------- | ------- | -------- |
17
+ | Mobile | < 720px | 1 | 100% |
18
+ | Tablet | < 1024px | 6 | 100% |
19
+ | Laptop | < 1440px | 12 | 1280px |
20
+ | Desktop | > 1440px | 12 | 1280px |
21
+
22
+ ::: code-group
23
+
24
+ ```html
25
+ <body data-preload>
26
+ <header></header>
27
+ <main></main>
28
+ <footer></footer>
29
+ </body>
30
+ ```
31
+
32
+ ```scss
33
+ @use '@natachah/vanilla-frontend/scss/base/layout';
34
+ ```
35
+
36
+ ```css [css properties]
37
+ --layout-width
38
+ --layout-gap-block
39
+ --layout-gap-inline
40
+ --layout-columns
41
+ --subgrid-gap-block
42
+ --subgrid-gap-inline
43
+ ```
44
+
45
+ :::
46
+
47
+ ::: tip
48
+ The `--subgrid-gap-*` are used for the direct child as `<header>`, `<main>` and `<footer>`. It set by default the gap block at **0** and take the layout inline gap.
49
+ :::
50
+
51
+ ## Container
52
+
53
+ The default layout include a `.container` and a `.container-full`.
54
+
55
+ The classic container is centered into the page layout and the full container take the full length of the page.
56
+ It's perfect if you need to set a background color to a section.
57
+
58
+ ```html
59
+ <section class="container"></section>
60
+ <section class="container-full"></section>
61
+ ```
62
+
63
+ ## Subgrid
64
+
65
+ You can re-use the layout grid into a container with the class `.subgrid`. Then you can use the grid-column CSS property to manage the space.
66
+
67
+ ::: code-group
68
+
69
+ ```html
70
+ <section class="container subgrid"></section>
71
+ <section class="container-full subgrid"></section>
72
+ ```
73
+
74
+ ```css [css properties]
75
+ --subgrid-gap-block
76
+ --subgrid-gap-inline
77
+ ```
@@ -0,0 +1,146 @@
1
+ <script setup>
2
+ import ComponentPreview from '../vuejs/ComponentPreview.vue'
3
+ </script>
4
+
5
+ # Media
6
+
7
+ To implement clean images, videos and audio.
8
+
9
+ ```scss
10
+ @use '@natachah/vanilla-frontend/scss/base/media'
11
+ ```
12
+
13
+ ## Image
14
+
15
+ The image is using the native `<img>` tag with the attributes `srcset`, `alt` and `title`.
16
+
17
+ <ComponentPreview>
18
+ <img src="https://picsum.photos/400/330" srcset="https://picsum.photos/800/660 2x" alt="A random image from lorem picsum" title="This is my picture">
19
+ </ComponentPreview>
20
+
21
+ ::: code-group
22
+
23
+ ```html
24
+ <img src="https://picsum.photos/400/330" srcset="https://picsum.photos/800/660 2x" alt="A random image from lorem picsum" title="This is my picture">
25
+ ```
26
+
27
+ ```css [css properties]
28
+ --image-width
29
+ --image-height
30
+ --image-fit
31
+ --image-position
32
+ --image-ratio
33
+ ```
34
+
35
+ :::
36
+
37
+ ### Picture
38
+
39
+ For responsive and best practice, it's better to use the `<picture>` tag with inside the `<source>` and `<img>` tags.
40
+
41
+ <ComponentPreview>
42
+ <picture>
43
+ <source media="(max-width:576px)" srcset="https://picsum.photos/id/237/200, https://picsum.photos/id/237/400 2x">
44
+ <source media="(max-width:768px)" srcset="https://picsum.photos/id/237/400, https://picsum.photos/id/237/800 2x">
45
+ <source media="(max-width:992px)" srcset="https://picsum.photos/id/237/800, https://picsum.photos/id/237/1600 2x">
46
+ <img src="https://picsum.photos/id/237/200" srcset="https://https://picsum.photos/id/237/400 2x" alt="A random image from lorem picsum" title="This is my picture">
47
+ </picture>
48
+ </ComponentPreview>
49
+
50
+ ```html
51
+ <picture>
52
+ <source media="(max-width:576px)" srcset="https://picsum.photos/id/237/200, https://picsum.photos/id/237/400 2x">
53
+ <source media="(max-width:768px)" srcset="https://picsum.photos/id/237/400, https://picsum.photos/id/237/800 2x">
54
+ <source media="(max-width:992px)" srcset="https://picsum.photos/id/237/800, https://picsum.photos/id/237/1600 2x">
55
+ <img src="https://picsum.photos/id/237/200" srcset="https://https://picsum.photos/id/237/400 2x" alt="A random image from lorem picsum" title="This is my picture">
56
+ </picture>
57
+ ```
58
+
59
+ ### Figure
60
+
61
+ You also can use `<figure>` and `<figcaption>` tags, to display an `<img>` with a nice caption.
62
+
63
+ <ComponentPreview>
64
+ <figure>
65
+ <img src="https://picsum.photos/id/320/400/330" srcset="https://picsum.photos/id/320/800/660 2x" alt="My random image from lorem picsum">
66
+ <figcaption>My image from lorem picsum</figcaption>
67
+ </figure>
68
+ </ComponentPreview>
69
+
70
+ ::: tip
71
+ You can also combine `<figure>` with a `<picture>` tag.
72
+ :::
73
+
74
+ ::: code-group
75
+
76
+ ```html
77
+ <figure>
78
+ <img src="https://picsum.photos/id/320/400/330" srcset="https://picsum.photos/id/320/800/660 2x" alt="My random image from lorem picsum">
79
+ <figcaption>My image from lorem picsum</figcaption>
80
+ </figure>
81
+ ```
82
+
83
+ ```css [css properties]
84
+ --caption-color
85
+ --caption-font-size
86
+ --caption-margin-block
87
+ --caption-margin-inline
88
+ ```
89
+
90
+ :::
91
+
92
+ ## Video
93
+
94
+ Use the default `<video>` and `<source>` tags.
95
+
96
+ By default the video take 100% width and have a ratio of 16:9.
97
+
98
+ <ComponentPreview>
99
+ <video width="320" height="240" controls>
100
+ <source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
101
+ </video>
102
+ </ComponentPreview>
103
+
104
+ ::: code-group
105
+
106
+ ```html
107
+ <video width="320" height="240" controls>
108
+ <source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
109
+ </video>
110
+ ```
111
+
112
+ ```css [css properties]
113
+ --video-width
114
+ --video-height
115
+ --video-fit
116
+ --video-position
117
+ --video-ratio
118
+ ```
119
+
120
+ :::
121
+
122
+ ## Audio
123
+
124
+ Use the default `<audio>` and `<source>` tags.
125
+
126
+ By default the audio take 100% width.
127
+
128
+ <ComponentPreview>
129
+ <audio controls>
130
+ <source src="http://localhost:5173/public/audio.mp3" type="audio/mpeg">
131
+ </audio>
132
+ </ComponentPreview>
133
+
134
+ ::: code-group
135
+
136
+ ```html
137
+ <audio controls>
138
+ <source src="http://localhost:5173/public/audio.mp3" type="audio/mpeg">
139
+ </audio>
140
+ ```
141
+
142
+ ```css [css properties]
143
+ --audio-width
144
+ ```
145
+
146
+ :::
@@ -0,0 +1,33 @@
1
+ # Reset
2
+
3
+ The framework include a simple **reboot** to makes browsers render all elements more consistently and in line with modern standards.
4
+
5
+ - Unset all default style *(except display)*
6
+ - Change box-sizing to `border-box` on all element
7
+ - Render media as block with a default 100% width
8
+ - Change the `overflow-wrap` for text
9
+ - Set default size and align for `<svg>`
10
+ - Set `<table>` default width
11
+ - Set default cursor for `draggable`
12
+ - Set default cursor and animation for tree
13
+ - Enable `scroll-behavior` if `prefers-reduced-motion` is not set
14
+ - Set default `<body>` setting + `inert` mode for `<dialog>`
15
+ - Set functionalities on `<body>` for `inert` and `data-preload` attributes
16
+
17
+ To use it, import this file:
18
+
19
+ ```scss
20
+ @use '@natachah/vanilla-frontend/scss/base/reset';
21
+ ```
22
+
23
+ ## Preload
24
+
25
+ If you need to disabled the CSS animation on first load of the page add the data attribute `data-preload` on the `<body>`.
26
+
27
+ And then add this script that will remove the attribute after a timeout:
28
+
29
+ ```js
30
+ setTimeout(() => {
31
+ document.body.removeAttribute('data-preload')
32
+ }, 10)
33
+ ```