@newlogic-digital/ui 3.7.5 → 4.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 (214) hide show
  1. package/README.md +17 -31
  2. package/package.json +21 -12
  3. package/src/data/main.json +2 -32
  4. package/src/data/nav.json +12 -0
  5. package/src/icons.svg +0 -30
  6. package/src/pages/dialog/basic.json.latte +5 -0
  7. package/src/pages/email/index.json +12 -0
  8. package/src/pages/gdpr.json +11 -0
  9. package/src/pages/index.json +8 -0
  10. package/src/scripts/components/(ui)/+.js +12 -0
  11. package/src/scripts/components/(ui)/Button.js +4 -0
  12. package/src/scripts/components/(ui)/Compare.js +4 -0
  13. package/src/scripts/components/(ui)/Control.js +11 -0
  14. package/src/scripts/components/(ui)/ControlSelect.js +4 -0
  15. package/src/scripts/components/(ui)/Details.js +4 -0
  16. package/src/scripts/components/(ui)/Dialog.js +17 -0
  17. package/src/scripts/components/(ui)/Drawer.js +4 -0
  18. package/src/scripts/components/(ui)/Form.js +15 -0
  19. package/src/scripts/components/(ui)/Popover.js +4 -0
  20. package/src/scripts/components/(ui)/Range.js +4 -0
  21. package/src/scripts/components/(ui)/Tabs.js +4 -0
  22. package/src/scripts/components/(ui)/Toast.js +4 -0
  23. package/src/scripts/components/+.js +5 -0
  24. package/src/scripts/components/App.js +5 -0
  25. package/src/scripts/components/ReCaptcha.js +4 -0
  26. package/src/scripts/components/Reveal.js +4 -0
  27. package/src/scripts/components/cookieconsent/+.js +2 -0
  28. package/src/scripts/components/cookieconsent/CookieConsentDialog.js +4 -0
  29. package/src/scripts/components/cookieconsent/CookieConsentForm.js +4 -0
  30. package/src/scripts/composables/+.js +3 -0
  31. package/src/scripts/composables/naja.js +24 -0
  32. package/src/scripts/composables/stimulus.js +31 -0
  33. package/src/scripts/composables/swup.js +23 -0
  34. package/src/scripts/main.js +3 -6
  35. package/src/scripts/utils/+.js +1 -0
  36. package/src/scripts/{Utils → utils}/initAfter.js +3 -3
  37. package/src/styles/base/+.css +4 -0
  38. package/src/styles/{Utils/default.css → base/defaults.css} +11 -1
  39. package/src/styles/base/transitions.css +12 -0
  40. package/src/styles/components/(layout)/+.css +2 -0
  41. package/src/styles/components/(layout)/Header.css +11 -0
  42. package/src/styles/{Layout → components/(layout)}/Main.css +2 -13
  43. package/src/styles/components/(ui)/+.css +23 -0
  44. package/src/styles/components/(ui)/Badge.css +8 -0
  45. package/src/styles/components/(ui)/Button.css +12 -0
  46. package/src/styles/components/(ui)/Check.css +1 -0
  47. package/src/styles/components/(ui)/Compare.css +1 -0
  48. package/src/styles/components/(ui)/Control.css +29 -0
  49. package/src/styles/components/(ui)/ControlSelect.css +1 -0
  50. package/src/styles/components/(ui)/Drawer.css +14 -0
  51. package/src/styles/components/(ui)/Group.css +1 -0
  52. package/src/styles/components/(ui)/Heading.css +4 -0
  53. package/src/styles/components/(ui)/Image.css +1 -0
  54. package/src/styles/components/(ui)/Info.css +1 -0
  55. package/src/styles/components/(ui)/Label.css +1 -0
  56. package/src/styles/components/(ui)/Link.css +2 -0
  57. package/src/styles/components/(ui)/Notice.css +1 -0
  58. package/src/styles/components/(ui)/Progress.css +1 -0
  59. package/src/styles/components/(ui)/Range.css +1 -0
  60. package/src/styles/components/(ui)/Switch.css +1 -0
  61. package/src/styles/components/(ui)/Text.css +1 -0
  62. package/src/styles/components/(ui)/Title.css +4 -0
  63. package/src/styles/components/(ui)/dialog/+.css +2 -0
  64. package/src/styles/components/(ui)/dialog/Dialog.css +2 -0
  65. package/src/styles/components/(ui)/dialog/DialogContent.css +2 -0
  66. package/src/styles/components/+.css +3 -0
  67. package/src/styles/components/cookieconsent/+.css +1 -0
  68. package/src/styles/{Components/Dialog/CookieConsent.css → components/cookieconsent/CookieConsentDialog.css} +4 -4
  69. package/src/styles/emails/+.css +5 -0
  70. package/src/styles/emails/base/+.css +2 -0
  71. package/src/styles/emails/base/defaults.css +22 -0
  72. package/src/styles/emails/components/+.css +4 -0
  73. package/src/styles/emails/components/Button.css +31 -0
  74. package/src/styles/emails/components/Heading.css +7 -0
  75. package/src/styles/emails/components/Main.css +13 -0
  76. package/src/{emails/styles/main/Ui → styles/emails/components}/Text.css +7 -5
  77. package/src/styles/emails/main.css +9 -0
  78. package/src/styles/emails/theme/+.css +2 -0
  79. package/src/styles/emails/theme/config.css +5 -0
  80. package/src/styles/emails/theme/default.css +13 -0
  81. package/src/styles/emails/utils/+.css +1 -0
  82. package/src/styles/emails/utils/common.css +29 -0
  83. package/src/styles/main.css +5 -11
  84. package/src/styles/theme/+.css +2 -0
  85. package/src/styles/theme/dark.css +5 -0
  86. package/src/styles/theme/main.css +35 -0
  87. package/src/styles/tinymce.css +2 -34
  88. package/src/styles/utils/+.css +4 -0
  89. package/src/styles/utils/container.css +5 -0
  90. package/src/styles/utils/index.css +8 -0
  91. package/src/styles/utils/reveal.css +22 -0
  92. package/src/styles/utils/scrollbar.css +23 -0
  93. package/src/templates/components/(layout)/Footer.latte +1 -0
  94. package/src/templates/components/(layout)/Header.latte +7 -0
  95. package/src/templates/components/(ui)/Toast.latte +9 -0
  96. package/src/templates/{Sections/Text.latte → components/Content.latte} +3 -3
  97. package/src/templates/components/Example.latte +17 -0
  98. package/src/templates/{Sections/CookieConsent.latte → components/cookieconsent/CookieConsentContent.latte} +4 -4
  99. package/src/templates/components/cookieconsent/CookieConsentDialog.latte +27 -0
  100. package/src/templates/{Components/Form/CookieConsent.latte → components/cookieconsent/CookieConsentForm.latte} +9 -9
  101. package/src/templates/components/dialog/DialogBasic.latte +18 -0
  102. package/src/templates/emails/components/Content.latte +29 -0
  103. package/src/templates/emails/components/Footer.latte +13 -0
  104. package/src/templates/emails/components/Header.latte +8 -0
  105. package/src/{emails/templates.test/Layout.latte → templates/emails/layouts/default.latte} +12 -12
  106. package/src/templates/{Layout/Main.latte → layouts/default.latte} +24 -26
  107. package/vite.config.js +2 -21
  108. package/src/emails/styles/main/+.css +0 -3
  109. package/src/emails/styles/main/Base/+.css +0 -2
  110. package/src/emails/styles/main/Base/config.css +0 -22
  111. package/src/emails/styles/main/Components/+.css +0 -1
  112. package/src/emails/styles/main/Components/Card.css +0 -12
  113. package/src/emails/styles/main/Ui/+.css +0 -3
  114. package/src/emails/styles/main/Ui/Btn.css +0 -78
  115. package/src/emails/styles/main/Ui/Heading.css +0 -8
  116. package/src/emails/styles/main.css +0 -92
  117. package/src/emails/templates/.gitkeep +0 -0
  118. package/src/emails/templates.test/Sections/Footer.latte +0 -22
  119. package/src/emails/templates.test/Sections/Header.latte +0 -37
  120. package/src/emails/templates.test/Sections/Text.latte +0 -24
  121. package/src/scripts/Components/+.js +0 -2
  122. package/src/scripts/Components/Drawer.js +0 -60
  123. package/src/scripts/Components/Popover.js +0 -65
  124. package/src/scripts/Layout/+.js +0 -1
  125. package/src/scripts/Layout/Header.js +0 -20
  126. package/src/scripts/Libraries/+.js +0 -10
  127. package/src/scripts/Libraries/CookieConsent.js +0 -80
  128. package/src/scripts/Libraries/Dialog.js +0 -28
  129. package/src/scripts/Libraries/Form.js +0 -13
  130. package/src/scripts/Libraries/Naja.js +0 -37
  131. package/src/scripts/Libraries/ReCaptcha.js +0 -25
  132. package/src/scripts/Libraries/Reveal.js +0 -32
  133. package/src/scripts/Libraries/Ripple.js +0 -8
  134. package/src/scripts/Libraries/Stimulus.js +0 -56
  135. package/src/scripts/Libraries/Swup.js +0 -77
  136. package/src/scripts/Libraries/Toaster.js +0 -55
  137. package/src/scripts/Sections/+.js +0 -0
  138. package/src/scripts/Ui/+.js +0 -4
  139. package/src/scripts/Ui/Check.js +0 -8
  140. package/src/scripts/Ui/Control.js +0 -194
  141. package/src/scripts/Ui/ControlSelect.js +0 -25
  142. package/src/scripts/Ui/Text.js +0 -21
  143. package/src/scripts/Utils/+.js +0 -3
  144. package/src/scripts/Utils/cdn.js +0 -5
  145. package/src/scripts/Utils/naja.js +0 -41
  146. package/src/scripts/Utils/utilities.js +0 -8
  147. package/src/styles/Components/+.css +0 -5
  148. package/src/styles/Components/Dialog/+.css +0 -3
  149. package/src/styles/Components/Dialog/Content.css +0 -2
  150. package/src/styles/Components/Dialog/Default.css +0 -2
  151. package/src/styles/Components/Drawer.css +0 -18
  152. package/src/styles/Layout/+.css +0 -3
  153. package/src/styles/Layout/Header.css +0 -18
  154. package/src/styles/Layout/Nav.css +0 -23
  155. package/src/styles/Libraries/+.css +0 -2
  156. package/src/styles/Libraries/Datepicker.css +0 -54
  157. package/src/styles/Libraries/Pickr.css +0 -13
  158. package/src/styles/Sections/+.css +0 -1
  159. package/src/styles/Ui/+.css +0 -16
  160. package/src/styles/Ui/Badge.css +0 -8
  161. package/src/styles/Ui/Btn.css +0 -14
  162. package/src/styles/Ui/Check.css +0 -1
  163. package/src/styles/Ui/Control.css +0 -57
  164. package/src/styles/Ui/ControlSelect.css +0 -57
  165. package/src/styles/Ui/Group.css +0 -1
  166. package/src/styles/Ui/Heading.css +0 -4
  167. package/src/styles/Ui/Image.css +0 -1
  168. package/src/styles/Ui/Info.css +0 -1
  169. package/src/styles/Ui/Label.css +0 -1
  170. package/src/styles/Ui/Link.css +0 -8
  171. package/src/styles/Ui/Notice.css +0 -9
  172. package/src/styles/Ui/Progress.css +0 -1
  173. package/src/styles/Ui/Switch.css +0 -1
  174. package/src/styles/Ui/Text.css +0 -1
  175. package/src/styles/Ui/Title.css +0 -4
  176. package/src/styles/Utils/+.css +0 -6
  177. package/src/styles/Utils/config.css +0 -16
  178. package/src/styles/Utils/theme/+.css +0 -1
  179. package/src/styles/Utils/theme/main.css +0 -33
  180. package/src/styles/Utils/utilities.css +0 -42
  181. package/src/templates/Components/Dialog/Basic.latte +0 -24
  182. package/src/templates/Components/Dialog/CookieConsent.latte +0 -27
  183. package/src/templates/Layout/Footer.latte +0 -0
  184. package/src/templates/Layout/Header.latte +0 -38
  185. package/src/templates/Sections/Site.latte +0 -213
  186. package/src/templates/Sections/Ui/Docs/@intro.html +0 -48
  187. package/src/templates/Sections/Ui/Docs/@nav.html +0 -134
  188. package/src/templates/Sections/Ui/Docs/@styles.html +0 -96
  189. package/src/templates/Sections/Ui/Docs/Default.latte +0 -979
  190. package/src/templates/Sections/Ui/Icons.html +0 -30
  191. package/src/templates/Sections/Ui/Intro.html +0 -119
  192. package/src/templates/Sections/Ui.latte +0 -8
  193. package/src/templates/Ui/+.latte +0 -5
  194. package/src/templates/Ui/Check.latte +0 -7
  195. package/src/templates/Ui/Control.latte +0 -9
  196. package/src/templates/Ui/ControlDate.latte +0 -14
  197. package/src/templates/Ui/ControlSelect.latte +0 -9
  198. package/src/templates/Ui/ControlTime.latte +0 -14
  199. package/src/views/dialog/basic.json.latte +0 -5
  200. package/src/views/email/email.latte +0 -6
  201. package/src/views/email/email.test.latte +0 -6
  202. package/src/views/gdpr.json +0 -14
  203. package/src/views/index.json +0 -12
  204. package/src/views/popover/info.json.latte +0 -15
  205. package/src/views/site.json +0 -11
  206. package/src/views/ui-icons.json +0 -12
  207. package/src/views/ui.json +0 -11
  208. /package/src/styles/{Utils → base}/breakpoints.css +0 -0
  209. /package/src/styles/{Utils → base}/keyframes.css +0 -0
  210. /package/src/styles/{Components → components/(ui)}/Field.css +0 -0
  211. /package/src/styles/{Components → components/(ui)}/Popover.css +0 -0
  212. /package/src/styles/{Components → components/(ui)}/Toaster.css +0 -0
  213. /package/src/{emails/styles/main/Base/font.css → styles/emails/base/fonts.css} +0 -0
  214. /package/src/templates/{Utils → utils}/sections.latte +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://ui.newlogic.cz/" target="_blank" rel="noopener noreferrer">
3
- <img width="180" src="https://ui.newlogic.cz/favicons/favicon.svg" alt="Logo">
3
+ <img width="180" src="https://ui.newlogic.cz/favicon.svg" alt="Logo">
4
4
  </a>
5
5
  </p>
6
6
  <p align="center">
@@ -10,7 +10,7 @@
10
10
 
11
11
  # 🎨 Newlogic UI
12
12
 
13
- Lightweight, modern and modular CSS framework with the best principles
13
+ Where Innovation Meets Simplicity.
14
14
 
15
15
  - 💡 Modern
16
16
  - 📦 Modular
@@ -18,51 +18,37 @@ Lightweight, modern and modular CSS framework with the best principles
18
18
  - ✨️ Progressive
19
19
  - ⚡️ Fast
20
20
 
21
- ## Příprava projektu pro implementaci
22
- 1. nainstalovat node - `npm i`
23
- 2. nainstalovat cms - `newlogic init cms`
24
- 3. vytvořit si db na devlogic.cz a nastavit v `config/local.neon`
25
- 4. spustit `docker compose up` a `vite`
26
- 5. spustit `make prepare`
27
- 6. spustit `make phinx-seed`
28
- 7. nastavit `FTP_SERVER`, `DB_USERNAME` a `DB_PASSWORD` a vytvořit prostor na devlogic.cz
29
- 8. commitnout změny a pushnout
30
-
31
- Newlogic UI is component framework with easy syntax for backend integration. Modern approach of CSS properties, enriched with utility classes from TailwindCSS and powered by Winduum.
32
-
33
- Javascript implementation is only **28 kB** and mainly intended for use on backend rendered websites and applications with PHP framework Nette
21
+ Component framework for modern backend driven web applications. Powered by Vite and Winduum.
34
22
 
35
23
  ## ⚙️ Under the hood
36
- * **[Vituum](https://vituum.dev/)** - plugins for Vite, adds support for template engines and more.
37
24
  * **[Newlogic Core](https://github.com/newlogic-digital/core)** - starter pack for creating modern web applications. Powered by Vite and Vituum.
38
- * **[ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)** - completely written in modern JS syntax - esnext, ES modules, etc.
39
- * **[PostCSS](https://postcss.org/)** - completely written in modern CSS syntax - nesting, variables, etc.
40
- * **[Tailwind CSS](https://tailwindcss.com/)** - rich utility classes for everything
25
+ * **[Vituum](https://vituum.dev/)** - plugins for Vite, adds support for template engines, and more.
26
+ * **[Vite](https://vituum.dev/)** - next generation frontend tooling
27
+ * **[Winduum](https://winduum.dev/)** - a small modest CSS component framework for TailwindCSS
28
+ * **[Tailwind CSS](https://tailwindcss.com/)** - rapidly build modern websites without ever leaving your HTML
29
+ * **[Naja](https://naja.js.org/)** - a full-featured JS client-side AJAX library for Nette Framework
41
30
  * **[Stimulus](https://stimulus.hotwire.dev/)** - a modest JavaScript framework for the HTML you already have
42
- * **Dark mode** - creating dark mode was never easier
43
- * **Easy syntax** - .ui-btn (ui elements), .c-component (components), .c-section (sections) etc.
44
-
31
+ * **[Swup](https://next.ui.newlogic.cz/docs/.html)** - versatile and extensible page transition library for server-rendered websites
45
32
 
46
- Newlogic UI uses Newlogic Core, which compiles modern JS and CSS syntax via Vite and Vituum. Source code can be used with any other tools or even different environment than NodeJS, e.g. Deno and is written in W3C standards and should be runnable in current or future version of browsers.
47
33
 
48
34
  ## 🪄 Get started
49
35
 
50
- Creating a new project (with Vituum and Newlogic Core)
36
+ Creating a new project
51
37
  ```sh
52
- $ git clone --depth 1 https://github.com/newlogic-digital/ui.git newlogic-ui-project
53
- $ cd newlogic-ui-project && npm i
38
+ git clone --depth 1 https://github.com/newlogic-digital/ui.git newlogic-ui-project
39
+ cd newlogic-ui-project && npm i
54
40
  ```
55
41
  ```sh
56
- $ vite
42
+ npm run dev
57
43
  ```
58
44
  or
59
45
  ```sh
60
- $ vituum build
46
+ npm run build
61
47
  ```
62
48
  ___
63
49
  Or in any other environment
64
50
  ```sh
65
- $ npm i @newlogic-digital/ui
51
+ npm i @newlogic-digital/ui
66
52
  ```
67
53
 
68
54
  ```css
@@ -77,8 +63,8 @@ import "@newlogic-digital/ui/src/scripts/main.js"
77
63
 
78
64
  ### Requirements
79
65
 
80
- - [Node.js LTS (16.x)](https://nodejs.org/en/download/)
81
- - [NPM (9.x)](https://www.npmjs.com/package/npm) or any other package manager
66
+ - [Node.js LTS (22.x)](https://nodejs.org/en/download/)
67
+ - [NPM (10.x)](https://www.npmjs.com/package/npm) or any other package manager
82
68
 
83
69
  ## Licence
84
70
  GNU GPLv3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newlogic-digital/ui",
3
- "version": "3.7.5",
3
+ "version": "4.0.0",
4
4
  "type": "module",
5
5
  "main": "vite.config.js",
6
6
  "author": "New Logic Studio s.r.o.",
@@ -23,27 +23,36 @@
23
23
  "npm-sort": "npm r -S example && npm r -D example"
24
24
  },
25
25
  "dependencies": {
26
- "@floating-ui/dom": "^1.6.12",
26
+ "@floating-ui/dom": "^1.6.13",
27
27
  "@hotwired/stimulus": "^3.2.2",
28
28
  "@newlogic-digital/cookieconsent-js": "^1.0.0",
29
+ "@newlogic-digital/naja-extensions": "^1.0.0",
30
+ "@newlogic-digital/stimulus-components": "^1.0.0",
31
+ "@newlogic-digital/swup-plugins": "^1.0.0",
29
32
  "@newlogic-digital/utils-js": "^1.1.1",
30
- "@simonwep/pickr": "^1.9.1",
31
- "air-datepicker": "^3.5.3",
32
- "eslint": "^9.15.0",
33
33
  "naja": "^3.2.1",
34
- "neostandard": "^0.11.8",
35
- "stylelint-config-standard": "^36.0.1",
34
+ "slide-element": "^2.3.1",
36
35
  "swup": "^4.8.1",
37
- "winduum": "^1.2.4"
36
+ "winduum": "^2.1.0",
37
+ "winduum-stimulus": "^2.0.9"
38
38
  },
39
39
  "devDependencies": {
40
- "@newlogic-digital/core": "^2.1.2",
40
+ "@newlogic-digital/core": "^3.0.0",
41
41
  "@stylistic/stylelint-config": "^2.0.0",
42
42
  "@tailwindcss/container-queries": "^0.1.1",
43
- "@types/grecaptcha": "^3.0.9",
44
- "npm-check-updates": "^17.1.11",
45
- "vite": "^5.4.11"
43
+ "@vituum/vite-plugin-tailwindcss": "^1.2.0",
44
+ "eslint": "^9.19.0",
45
+ "neostandard": "^0.12.0",
46
+ "npm-check-updates": "^17.1.14",
47
+ "stylelint-config-standard": "^37.0.0",
48
+ "tailwindcss": "^3.4.17"
46
49
  },
50
+ "browserslist": [
51
+ "> 1%",
52
+ "last 2 major versions",
53
+ "not kaios > 0",
54
+ "not dead"
55
+ ],
47
56
  "files": [
48
57
  "src"
49
58
  ],
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "baseUrl": "https://localhost:5173",
3
3
  "lang": "en",
4
+ "cookieConsent": true,
4
5
  "prefetch": [
5
6
  "https://cdn.jsdelivr.net",
6
7
  "https://fonts.gstatic.com",
@@ -12,12 +13,6 @@
12
13
  "rel": "preload stylesheet",
13
14
  "as": "style",
14
15
  "crossorigin": true
15
- },
16
- {
17
- "href": "https://fonts.gstatic.com/s/poppins/v20/pxiEyp8kv8JHgFVrJJnecnFHGPezSQ.woff2",
18
- "as": "font",
19
- "type": "font/woff2",
20
- "crossorigin": true
21
16
  }
22
17
  ],
23
18
  "assets": {
@@ -30,37 +25,12 @@
30
25
  "main": "/src/scripts/main.js"
31
26
  }
32
27
  },
33
- "layout": {
34
- "cookies": true,
35
- "nav": [
36
- {
37
- "name": "Home",
38
- "url": "/"
39
- },
40
- {
41
- "name": "Documentation",
42
- "url": "/ui"
43
- },
44
- {
45
- "name": "Icons",
46
- "url": "/ui-icons"
47
- }
48
- ]
49
- },
50
28
  "media": {
51
29
  "min-xl": "(min-width: 1216px)",
52
30
  "max-lg": "(max-width: 959px)",
53
31
  "min-lg": "(min-width: 960px)",
54
- "min-md": "(min-width: 768px)",
32
+ "min-md": "(min-width: 744px)",
55
33
  "max-md": "(max-width: 767px)",
56
34
  "min-xs": "(min-width: 360px)"
57
- },
58
- "lazy": {
59
- "1x1": "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
60
- "16x9": "data:image/gif;base64,R0lGODlhEAAJAIAAAP///wAAACwAAAAAEAAJAAACCoSPqcvtD6OclBUAOw==",
61
- "5x2": "data:image/gif;base64,R0lGODlhBQACAIAAAP///wAAACwAAAAABQACAAACA4SPBQA7",
62
- "4x3": "data:image/gif;base64,R0lGODlhBAADAIAAAP///wAAACwAAAAABAADAAACA4SPVgA7",
63
- "8x5": "data:image/gif;base64,R0lGODlhCAAFAIAAAP///wAAACwAAAAACAAFAAACBYSPqctYADs=",
64
- "3x2": "data:image/gif;base64,R0lGODlhAwACAIAAAP///wAAACwAAAAAAwACAAACAoRfADs="
65
35
  }
66
36
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "nav": [
3
+ {
4
+ "name": "Home",
5
+ "url": "/"
6
+ },
7
+ {
8
+ "name": "Gdpr",
9
+ "url": "/gdpr"
10
+ }
11
+ ]
12
+ }
package/src/icons.svg CHANGED
@@ -1,38 +1,8 @@
1
1
  <svg class="hidden">
2
- <symbol id="icon-chevron-left" viewBox="0 0 24 24">
3
- <path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
4
- </symbol>
5
- <symbol id="icon-chevron-right" viewBox="0 0 24 24">
6
- <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
7
- </symbol>
8
2
  <symbol id="icon-exclamation-circle" viewBox="0 0 24 24">
9
3
  <path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
10
4
  </symbol>
11
5
  <symbol id="icon-x-mark" viewBox="0 0 24 24">
12
6
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
13
7
  </symbol>
14
- <symbol id="icon-bars-3" viewBox="0 0 24 24">
15
- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
16
- </symbol>
17
- <symbol id="icon-moon" viewBox="0 0 24 24">
18
- <path stroke-linecap="round" stroke-linejoin="round" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
19
- </symbol>
20
- <symbol id="icon-sun" viewBox="0 0 24 24">
21
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
22
- </symbol>
23
- <symbol id="icon-at-symbol" viewBox="0 0 24 24">
24
- <path stroke-linecap="round" stroke-linejoin="round" d="M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207" />
25
- </symbol>
26
- <symbol id="icon-calendar" viewBox="0 0 24 24">
27
- <path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" />
28
- </symbol>
29
- <symbol id="icon-clock" viewBox="0 0 24 24">
30
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" />
31
- </symbol>
32
- <symbol id="icon-angle-down-solid" viewBox="0 0 24 24">
33
- <path d="M10.998 15.467c.491.71 1.513.71 2.004 0l3.767-5.453c.581-.843 0-2.013-1.002-2.014H8.234C7.232 8 6.65 9.17 7.231 10.014z" />
34
- </symbol>
35
- <symbol id="icon-angle-up-solid" viewBox="0 0 24 24">
36
- <path d="M10.998 15.467c.491.71 1.513.71 2.004 0l3.767-5.453c.581-.843 0-2.013-1.002-2.014H8.234C7.232 8 6.65 9.17 7.231 10.014z" style="transform: scaleY(-1) translateY(1px); transform-origin: 50% 50%;" />
37
- </symbol>
38
8
  </svg>
@@ -0,0 +1,5 @@
1
+ {capture $dialog}
2
+ {include TEMPLATES_DIR . 'components/dialog/DialogBasic.latte'}
3
+ {/capture}
4
+
5
+ {$dialog|json('content')|noescape}
@@ -0,0 +1,12 @@
1
+ {
2
+ "title": "Email",
3
+ "template": "./src/templates/emails/layouts/default.latte",
4
+ "body": [
5
+ {
6
+ "src": "emails/components/Header.latte"
7
+ },
8
+ {
9
+ "src": "emails/components/Content.latte"
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "GDPR",
3
+ "body": [
4
+ {
5
+ "src": "components/Content.latte"
6
+ },
7
+ {
8
+ "src": "components/cookieconsent/CookieConsentContent.latte"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "title": "Example",
3
+ "body": [
4
+ {
5
+ "src": "components/Example.latte"
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,12 @@
1
+ import './Button.js'
2
+ import './Compare.js'
3
+ import './Control.js'
4
+ import './ControlSelect.js'
5
+ import './Details.js'
6
+ import './Dialog.js'
7
+ import './Drawer.js'
8
+ import './Form.js'
9
+ import './Popover.js'
10
+ import './Range.js'
11
+ import './Tabs.js'
12
+ import './Toast.js'
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Button } from 'winduum-stimulus/components/button/index.js'
3
+
4
+ useStimulus.register('x-button', Button)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Compare } from 'winduum-stimulus/components/compare/index.js'
3
+
4
+ useStimulus.register('x-compare', Compare)
@@ -0,0 +1,11 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Control } from 'winduum-stimulus/components/control/index.js'
3
+ import { validateField } from 'winduum/src/components/form/index.js'
4
+
5
+ useStimulus.register('x-control', class extends Control {
6
+ connect() {
7
+ validateField(this.element, { validate: false })
8
+
9
+ this.element.addEventListener('change', () => validateField(this.element))
10
+ }
11
+ })
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { ControlSelect } from '@newlogic-digital/stimulus-components'
3
+
4
+ useStimulus.register('x-control-select', ControlSelect)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Details } from 'winduum-stimulus/components/details/index.js'
3
+
4
+ useStimulus.register('x-details', Details)
@@ -0,0 +1,17 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Dialog } from 'winduum-stimulus/components/dialog/index.js'
3
+
4
+ useStimulus.register('x-dialog', class extends Dialog {
5
+ connect() {
6
+ super.connect()
7
+
8
+ this.element.addEventListener('x-dialog:show', () => this.appendToaster(this.element))
9
+ this.element.addEventListener('close', () => this.appendToaster(document.body))
10
+ }
11
+
12
+ appendToaster(parentElement) {
13
+ const toasterElement = document.querySelector('.x-toaster')
14
+
15
+ if (toasterElement) parentElement.appendChild(toasterElement)
16
+ }
17
+ })
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Drawer } from 'winduum-stimulus/components/drawer/index.js'
3
+
4
+ useStimulus.register('x-drawer', Drawer)
@@ -0,0 +1,15 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Form } from 'winduum-stimulus/components/form/index.js'
3
+ import { validateForm } from 'winduum/src/components/form/index.js'
4
+
5
+ useStimulus.register('x-form', class extends Form {
6
+ requestSubmit() {
7
+ this.element.requestSubmit()
8
+ }
9
+
10
+ reset(event) {
11
+ this.element.reset()
12
+
13
+ validateForm(event, { validateOptions: { validate: false } })
14
+ }
15
+ })
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Popover } from 'winduum-stimulus/components/popover/index.js'
3
+
4
+ useStimulus.register('x-popover', Popover)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Range } from 'winduum-stimulus/components/range/index.js'
3
+
4
+ useStimulus.register('x-range', Range)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Tabs } from 'winduum-stimulus/components/tabs/index.js'
3
+
4
+ useStimulus.register('x-tabs', Tabs)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { Toast } from 'winduum-stimulus/components/toast/index.js'
3
+
4
+ useStimulus.register('x-toast', Toast)
@@ -0,0 +1,5 @@
1
+ import './(ui)/+.js'
2
+ import './App.js'
3
+ import './ReCaptcha.js'
4
+ import './Reveal.js'
5
+ import './cookieconsent/+.js'
@@ -0,0 +1,5 @@
1
+ import { Controller, useStimulus } from '../composables/stimulus.js'
2
+
3
+ useStimulus.register('x-app', class extends Controller {
4
+ // YOUR GLOBAL METHODS
5
+ })
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../composables/stimulus.js'
2
+ import { ReCaptcha } from '@newlogic-digital/stimulus-components'
3
+
4
+ useStimulus.register('x-recaptcha', ReCaptcha)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../composables/stimulus.js'
2
+ import { Reveal } from '@newlogic-digital/stimulus-components'
3
+
4
+ useStimulus.register('x-reveal', Reveal)
@@ -0,0 +1,2 @@
1
+ import './CookieConsentDialog.js'
2
+ import './CookieConsentForm.js'
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { CookieConsentDialog } from '@newlogic-digital/stimulus-components'
3
+
4
+ useStimulus.register('x-cookieconsent-dialog', CookieConsentDialog)
@@ -0,0 +1,4 @@
1
+ import { useStimulus } from '../../composables/stimulus.js'
2
+ import { CookieConsentForm } from '@newlogic-digital/stimulus-components'
3
+
4
+ useStimulus.register('x-cookieconsent-form', CookieConsentForm)
@@ -0,0 +1,3 @@
1
+ import './naja.js'
2
+ import './stimulus.js'
3
+ import './swup.js'
@@ -0,0 +1,24 @@
1
+ import naja from 'naja'
2
+ import {
3
+ NajaCoreExtension,
4
+ NajaInvokeExtension,
5
+ NajaCheckValidityExtension
6
+ } from '@newlogic-digital/naja-extensions'
7
+ import { initCookieConsent } from '@newlogic-digital/cookieconsent-js'
8
+ import { initStimulus } from './stimulus.js'
9
+ import { useSwup } from './swup.js'
10
+
11
+ naja.registerExtension(NajaCoreExtension())
12
+ naja.registerExtension(NajaInvokeExtension())
13
+ naja.registerExtension(NajaCheckValidityExtension())
14
+
15
+ naja.snippetHandler.addEventListener('afterUpdate', ({ detail }) => {
16
+ initStimulus(detail.snippet)
17
+ initCookieConsent(detail.snippet)
18
+
19
+ useSwup.cache.clear()
20
+ })
21
+
22
+ naja.initialize({
23
+ history: 'replace'
24
+ })
@@ -0,0 +1,31 @@
1
+ import { Application, Controller } from '@hotwired/stimulus'
2
+ import { InvokeFetch } from 'winduum-stimulus/utilities/invoke/index.js'
3
+ import stimulus from 'winduum-stimulus'
4
+ import { initAfter } from '../utils/+.js'
5
+
6
+ const initConfig = {
7
+ controllers: ['x-button', 'x-control', 'x-text', 'x-check', 'x-dialog'],
8
+ actions: [
9
+ ['.x-button', 'click->x-button#ripple'],
10
+ ['.x-check', 'change->x-form#validateField'],
11
+ ['.x-switch', 'change->x-form#validateField'],
12
+ ['[data-invoke-action]:not([data-naja], [data-action*="invoke#action"])', 'invoke#action']
13
+ ]
14
+ }
15
+
16
+ const useStimulus = new Application(document.documentElement)
17
+
18
+ const useController = (controller, target, application = useStimulus) =>
19
+ stimulus.useController(controller, target, application)
20
+
21
+ const initStimulus = (element, { controllers, actions } = initConfig) =>
22
+ stimulus.initStimulus(element, { controllers, actions })
23
+
24
+ useStimulus.start().then(() => initStimulus(document.body))
25
+ useStimulus.register('invoke', class extends InvokeFetch {
26
+ onFetchComplete(element) {
27
+ initAfter(element)
28
+ }
29
+ })
30
+
31
+ export { useStimulus, useController, Controller, initStimulus, initConfig }
@@ -0,0 +1,23 @@
1
+ import Swup from 'swup'
2
+ import { SwupCorePlugin } from '@newlogic-digital/swup-plugins'
3
+ import initAfter from '../utils/initAfter.js'
4
+ import { useController } from 'winduum-stimulus'
5
+
6
+ const useSwup = new Swup({
7
+ containers: ['.x-main', '.x-header', '.x-toaster'],
8
+ plugins: [new SwupCorePlugin()]
9
+ })
10
+
11
+ useSwup.hooks.on('animation:out:start', async () => {
12
+ useController('x-drawer', '.x-drawer').invoke('close')
13
+ useController('x-dialog', '.x-dialog').invoke('close')
14
+ useController('x-popover', '.x-popover:has([data-open])').invoke('hide')
15
+ })
16
+
17
+ useSwup.hooks.on('content:replace', () => {
18
+ useSwup.options.containers.forEach((selector) => {
19
+ initAfter(document.querySelector(selector))
20
+ })
21
+ })
22
+
23
+ export { useSwup }
@@ -1,7 +1,4 @@
1
- import './Libraries/+.js'
2
- import './Layout/+.js'
3
- import './Sections/+.js'
4
- import './Components/+.js'
5
- import './Ui/+.js'
6
- import './Utils/utilities.js'
1
+ import './composables/stimulus.js'
2
+ import './composables/swup.js'
3
+ import './components/+.js'
7
4
  import.meta.glob('/src/assets/**')
@@ -0,0 +1 @@
1
+ export { default as initAfter } from './initAfter.js'
@@ -1,7 +1,7 @@
1
1
  import { replaceScripts } from '@newlogic-digital/utils-js'
2
- import { initStimulus } from '../Libraries/Stimulus.js'
3
- import { initCookieConsent } from '../Libraries/CookieConsent.js'
4
- import { initNaja } from './naja.js'
2
+ import { initCookieConsent } from '@newlogic-digital/cookieconsent-js'
3
+ import { initStimulus } from '../composables/stimulus.js'
4
+ import { initNaja } from '@newlogic-digital/naja-extensions'
5
5
 
6
6
  export default function initAfter(element) {
7
7
  initStimulus(element)
@@ -0,0 +1,4 @@
1
+ @import "./breakpoints.css";
2
+ @import "./defaults.css";
3
+ @import "./keyframes.css";
4
+ @import "./transitions.css";
@@ -1,10 +1,11 @@
1
1
  @import "winduum/src/base/defaults.css";
2
+ @import "winduum/tailwindcss/base/defaults.css";
2
3
 
3
4
  :where(svg) {
4
5
  display: block;
5
6
 
6
7
  &:has([href]) {
7
- stroke-width: 2;
8
+ stroke-width: 1.5;
8
9
  stroke: currentcolor;
9
10
  fill: none;
10
11
  }
@@ -24,3 +25,12 @@
24
25
  padding: 0;
25
26
  margin: 0;
26
27
  }
28
+
29
+ :where([type="number"]) {
30
+ -moz-appearance: textfield;
31
+
32
+ &::-webkit-outer-spin-button,
33
+ &::-webkit-inner-spin-button {
34
+ -webkit-appearance: none;
35
+ }
36
+ }
@@ -0,0 +1,12 @@
1
+ @import "winduum/src/base/transitions.css";
2
+
3
+ .view-transition-main {
4
+ html.swup-enabled & {
5
+ transition: opacity var(--view-transition-main-duration);
6
+ opacity: 1;
7
+ }
8
+
9
+ html.is-animating & {
10
+ opacity: 0;
11
+ }
12
+ }
@@ -0,0 +1,2 @@
1
+ @import "./Header.css";
2
+ @import "./Main.css";
@@ -0,0 +1,11 @@
1
+ :root {
2
+ --x-header-height: 4rem;
3
+ --scroll-padding-top: calc(var(--x-header-height) + 1rem);
4
+ }
5
+
6
+ .x-header {
7
+ position: sticky;
8
+ top: 0;
9
+ z-index: var(--z-index-20);
10
+ height: var(--x-header-height);
11
+ }