@newlogic-digital/ui 3.5.0 → 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 (229) hide show
  1. package/README.md +17 -21
  2. package/package.json +38 -22
  3. package/src/data/main.json +17 -32
  4. package/src/data/nav.json +12 -0
  5. package/src/icons.svg +5 -35
  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 +4 -6
  35. package/src/scripts/utils/+.js +1 -0
  36. package/src/scripts/utils/initAfter.js +11 -0
  37. package/src/styles/base/+.css +4 -0
  38. package/src/styles/base/defaults.css +36 -0
  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/components/(layout)/Main.css +20 -0
  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)/Field.css +1 -0
  52. package/src/styles/components/(ui)/Group.css +1 -0
  53. package/src/styles/components/(ui)/Heading.css +4 -0
  54. package/src/styles/components/(ui)/Image.css +1 -0
  55. package/src/styles/components/(ui)/Info.css +1 -0
  56. package/src/styles/components/(ui)/Label.css +1 -0
  57. package/src/styles/components/(ui)/Link.css +2 -0
  58. package/src/styles/components/(ui)/Notice.css +1 -0
  59. package/src/styles/components/(ui)/Popover.css +1 -0
  60. package/src/styles/components/(ui)/Progress.css +1 -0
  61. package/src/styles/components/(ui)/Range.css +1 -0
  62. package/src/styles/components/(ui)/Switch.css +1 -0
  63. package/src/styles/components/(ui)/Text.css +1 -0
  64. package/src/styles/components/(ui)/Title.css +4 -0
  65. package/src/styles/components/(ui)/Toaster.css +2 -0
  66. package/src/styles/components/(ui)/dialog/+.css +2 -0
  67. package/src/styles/components/(ui)/dialog/Dialog.css +2 -0
  68. package/src/styles/components/(ui)/dialog/DialogContent.css +2 -0
  69. package/src/styles/components/+.css +3 -0
  70. package/src/styles/components/cookieconsent/+.css +1 -0
  71. package/src/styles/components/cookieconsent/CookieConsentDialog.css +17 -0
  72. package/src/styles/emails/+.css +5 -0
  73. package/src/styles/emails/base/+.css +2 -0
  74. package/src/styles/emails/base/defaults.css +22 -0
  75. package/src/styles/emails/components/+.css +4 -0
  76. package/src/styles/emails/components/Button.css +31 -0
  77. package/src/styles/emails/components/Heading.css +7 -0
  78. package/src/styles/emails/components/Main.css +13 -0
  79. package/src/styles/emails/components/Text.css +14 -0
  80. package/src/styles/emails/main.css +9 -0
  81. package/src/styles/emails/theme/+.css +2 -0
  82. package/src/styles/emails/theme/config.css +5 -0
  83. package/src/styles/emails/theme/default.css +13 -0
  84. package/src/styles/emails/utils/+.css +1 -0
  85. package/src/styles/emails/utils/common.css +29 -0
  86. package/src/styles/main.css +5 -14
  87. package/src/styles/theme/+.css +2 -0
  88. package/src/styles/theme/dark.css +5 -0
  89. package/src/styles/theme/main.css +35 -0
  90. package/src/styles/tinymce.css +2 -34
  91. package/src/styles/utils/+.css +4 -0
  92. package/src/styles/utils/container.css +5 -0
  93. package/src/styles/utils/index.css +8 -0
  94. package/src/styles/utils/reveal.css +22 -0
  95. package/src/styles/utils/scrollbar.css +23 -0
  96. package/src/templates/components/(layout)/Footer.latte +1 -0
  97. package/src/templates/components/(layout)/Header.latte +7 -0
  98. package/src/templates/components/(ui)/Toast.latte +9 -0
  99. package/src/templates/components/Content.latte +64 -0
  100. package/src/templates/components/Example.latte +17 -0
  101. package/src/templates/components/cookieconsent/CookieConsentContent.latte +69 -0
  102. package/src/templates/components/cookieconsent/CookieConsentDialog.latte +27 -0
  103. package/src/templates/components/cookieconsent/CookieConsentForm.latte +47 -0
  104. package/src/templates/components/dialog/DialogBasic.latte +18 -0
  105. package/src/templates/emails/components/Content.latte +29 -0
  106. package/src/templates/emails/components/Footer.latte +13 -0
  107. package/src/templates/emails/components/Header.latte +8 -0
  108. package/src/templates/emails/layouts/default.latte +35 -0
  109. package/src/templates/layouts/default.latte +71 -0
  110. package/vite.config.js +5 -17
  111. package/src/emails/styles/email.css +0 -77
  112. package/src/emails/templates/.gitkeep +0 -0
  113. package/src/emails/templates.test/Content.latte +0 -24
  114. package/src/emails/templates.test/Header.latte +0 -14
  115. package/src/emails/templates.test/Layout.latte +0 -23
  116. package/src/scripts/Components/+.js +0 -1
  117. package/src/scripts/Components/CookieConsent.js +0 -78
  118. package/src/scripts/Layout/+.js +0 -2
  119. package/src/scripts/Layout/Header.js +0 -32
  120. package/src/scripts/Layout/Main.js +0 -50
  121. package/src/scripts/Libraries/+.js +0 -12
  122. package/src/scripts/Libraries/CookieConsent.js +0 -67
  123. package/src/scripts/Libraries/Dialog.js +0 -47
  124. package/src/scripts/Libraries/Drawer.js +0 -42
  125. package/src/scripts/Libraries/Form.js +0 -26
  126. package/src/scripts/Libraries/Naja.js +0 -33
  127. package/src/scripts/Libraries/ReCaptcha.js +0 -42
  128. package/src/scripts/Libraries/Ripple.js +0 -8
  129. package/src/scripts/Libraries/Script.js +0 -18
  130. package/src/scripts/Libraries/Slider.js +0 -160
  131. package/src/scripts/Libraries/Stimulus.js +0 -11
  132. package/src/scripts/Libraries/Swup.js +0 -92
  133. package/src/scripts/Libraries/Tippy.js +0 -117
  134. package/src/scripts/Sections/+.js +0 -0
  135. package/src/scripts/Ui/+.js +0 -4
  136. package/src/scripts/Ui/Check.js +0 -8
  137. package/src/scripts/Ui/Control.js +0 -186
  138. package/src/scripts/Ui/ControlSelect.js +0 -24
  139. package/src/scripts/Ui/Text.js +0 -21
  140. package/src/scripts/Utils/+.js +0 -3
  141. package/src/scripts/Utils/Functions/+.js +0 -7
  142. package/src/scripts/Utils/Functions/importScript.js +0 -17
  143. package/src/scripts/Utils/Functions/importStyle.js +0 -18
  144. package/src/scripts/Utils/Functions/inputStep.js +0 -9
  145. package/src/scripts/Utils/Functions/inputValidity.js +0 -57
  146. package/src/scripts/Utils/Functions/loadStimulus.js +0 -42
  147. package/src/scripts/Utils/Functions/replaceScript.js +0 -4
  148. package/src/scripts/Utils/Functions/replaceTag.js +0 -8
  149. package/src/scripts/Utils/cdn.js +0 -6
  150. package/src/scripts/Utils/global.js +0 -15
  151. package/src/styles/Components/+.css +0 -4
  152. package/src/styles/Components/CookieConsent.css +0 -68
  153. package/src/styles/Components/Dialog/+.css +0 -1
  154. package/src/styles/Components/Dialog/Default.css +0 -26
  155. package/src/styles/Components/Dropdown/+.css +0 -1
  156. package/src/styles/Components/Dropdown/Default.css +0 -8
  157. package/src/styles/Components/Field.css +0 -1
  158. package/src/styles/Layout/+.css +0 -3
  159. package/src/styles/Layout/Header.css +0 -50
  160. package/src/styles/Layout/Main.css +0 -28
  161. package/src/styles/Layout/Nav.css +0 -47
  162. package/src/styles/Libraries/+.css +0 -7
  163. package/src/styles/Libraries/Datepicker.css +0 -54
  164. package/src/styles/Libraries/Dialog.css +0 -1
  165. package/src/styles/Libraries/Drawer.css +0 -64
  166. package/src/styles/Libraries/Hint.css +0 -186
  167. package/src/styles/Libraries/Pickr.css +0 -13
  168. package/src/styles/Libraries/Ripple.css +0 -1
  169. package/src/styles/Libraries/Tippy.css +0 -73
  170. package/src/styles/Sections/+.css +0 -1
  171. package/src/styles/Ui/+.css +0 -17
  172. package/src/styles/Ui/Badge.css +0 -7
  173. package/src/styles/Ui/Btn.css +0 -13
  174. package/src/styles/Ui/Check.css +0 -1
  175. package/src/styles/Ui/Control.css +0 -47
  176. package/src/styles/Ui/ControlSelect.css +0 -66
  177. package/src/styles/Ui/Dot.css +0 -22
  178. package/src/styles/Ui/Group.css +0 -1
  179. package/src/styles/Ui/Heading.css +0 -3
  180. package/src/styles/Ui/Image.css +0 -1
  181. package/src/styles/Ui/Info.css +0 -1
  182. package/src/styles/Ui/Label.css +0 -1
  183. package/src/styles/Ui/Link.css +0 -2
  184. package/src/styles/Ui/Notice.css +0 -1
  185. package/src/styles/Ui/Progress.css +0 -1
  186. package/src/styles/Ui/Switch.css +0 -1
  187. package/src/styles/Ui/Text.css +0 -8
  188. package/src/styles/Ui/Title.css +0 -7
  189. package/src/styles/Utils/+.css +0 -8
  190. package/src/styles/Utils/config.css +0 -5
  191. package/src/styles/Utils/default.css +0 -19
  192. package/src/styles/Utils/icons.css +0 -5
  193. package/src/styles/Utils/tailwind.css +0 -50
  194. package/src/styles/Utils/theme/+.css +0 -1
  195. package/src/styles/Utils/theme/main.css +0 -19
  196. package/src/templates/Components/CookieConsent.latte +0 -28
  197. package/src/templates/Components/Dialogs/Basic.latte +0 -22
  198. package/src/templates/Components/Items/.gitkeep +0 -0
  199. package/src/templates/Layout/Footer.latte +0 -0
  200. package/src/templates/Layout/Header.latte +0 -40
  201. package/src/templates/Layout/Main.latte +0 -62
  202. package/src/templates/Sections/Gdpr.latte +0 -127
  203. package/src/templates/Sections/Site.latte +0 -141
  204. package/src/templates/Sections/Ui/Docs/@intro.html +0 -48
  205. package/src/templates/Sections/Ui/Docs/@nav.html +0 -144
  206. package/src/templates/Sections/Ui/Docs/@styles.html +0 -96
  207. package/src/templates/Sections/Ui/Docs/Default.latte +0 -1059
  208. package/src/templates/Sections/Ui/Icons.html +0 -30
  209. package/src/templates/Sections/Ui/Intro.html +0 -165
  210. package/src/templates/Sections/Ui.latte +0 -8
  211. package/src/templates/Ui/+.latte +0 -5
  212. package/src/templates/Ui/Check.latte +0 -7
  213. package/src/templates/Ui/Control.latte +0 -9
  214. package/src/templates/Ui/ControlDate.latte +0 -14
  215. package/src/templates/Ui/ControlSelect.latte +0 -9
  216. package/src/templates/Ui/ControlTime.latte +0 -14
  217. package/src/views/dialog/basic.json.latte +0 -5
  218. package/src/views/dropdown/tippy.json.latte +0 -19
  219. package/src/views/email/email.latte +0 -6
  220. package/src/views/email/email.test.latte +0 -6
  221. package/src/views/gdpr.json +0 -12
  222. package/src/views/index.json +0 -12
  223. package/src/views/site.json +0 -11
  224. package/src/views/ui-icons.json +0 -12
  225. package/src/views/ui.json +0 -11
  226. /package/src/styles/{Utils → base}/breakpoints.css +0 -0
  227. /package/src/styles/{Utils → base}/keyframes.css +0 -0
  228. /package/src/styles/{Utils/print.css → emails/base/fonts.css} +0 -0
  229. /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/android-chrome-192x192.png" 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,41 +18,37 @@ Lightweight, modern and modular CSS framework with the best principles
18
18
  - ✨️ Progressive
19
19
  - ⚡️ Fast
20
20
 
21
- 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.
22
-
23
- 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.
24
22
 
25
23
  ## ⚙️ Under the hood
26
- * **[Vituum](https://vituum.dev/)** - plugins for Vite, adds support for template engines and more.
27
24
  * **[Newlogic Core](https://github.com/newlogic-digital/core)** - starter pack for creating modern web applications. Powered by Vite and Vituum.
28
- * **[ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)** - completely written in modern JS syntax - esnext, ES modules, etc.
29
- * **[PostCSS](https://postcss.org/)** - completely written in modern CSS syntax - nesting, variables, etc.
30
- * **[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
31
30
  * **[Stimulus](https://stimulus.hotwire.dev/)** - a modest JavaScript framework for the HTML you already have
32
- * **Dark mode** - creating dark mode was never easier
33
- * **Easy syntax** - .ui-btn (ui elements), .c-component (components), .c-section (sections) etc.
34
-
31
+ * **[Swup](https://next.ui.newlogic.cz/docs/.html)** - versatile and extensible page transition library for server-rendered websites
35
32
 
36
- 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.
37
33
 
38
34
  ## 🪄 Get started
39
35
 
40
- Creating a new project (with Vituum and Newlogic Core)
36
+ Creating a new project
41
37
  ```sh
42
- $ git clone --depth 1 https://github.com/newlogic-digital/ui.git newlogic-ui-project
43
- $ 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
44
40
  ```
45
41
  ```sh
46
- $ vite
42
+ npm run dev
47
43
  ```
48
44
  or
49
45
  ```sh
50
- $ vituum build
46
+ npm run build
51
47
  ```
52
48
  ___
53
49
  Or in any other environment
54
50
  ```sh
55
- $ npm i @newlogic-digital/ui
51
+ npm i @newlogic-digital/ui
56
52
  ```
57
53
 
58
54
  ```css
@@ -67,8 +63,8 @@ import "@newlogic-digital/ui/src/scripts/main.js"
67
63
 
68
64
  ### Requirements
69
65
 
70
- - [Node.js LTS (16.x)](https://nodejs.org/en/download/)
71
- - [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
72
68
 
73
69
  ## Licence
74
70
  GNU GPLv3
package/package.json CHANGED
@@ -1,41 +1,58 @@
1
1
  {
2
2
  "name": "@newlogic-digital/ui",
3
- "version": "3.5.0",
3
+ "version": "4.0.0",
4
4
  "type": "module",
5
5
  "main": "vite.config.js",
6
6
  "author": "New Logic Studio s.r.o.",
7
7
  "description": "Lightweight, modern and modular CSS framework with the best principles",
8
8
  "license": "GNU GPLv3",
9
9
  "scripts": {
10
- "postinstall": "rm -rf node_modules/typed-query-selector",
11
- "dev": "vite",
10
+ "postinstall": "rm -rf node_modules/typed-query-selector && ncu",
11
+ "dev": "npm run cleanup && vite",
12
+ "dev-emails": "npm run cleanup && vite --mode emails",
12
13
  "preview": "vite preview",
13
- "build": "vite build --mode development",
14
- "build-production": "vite build",
14
+ "build": "npm run cleanup && vite build --mode development",
15
+ "build-production": "npm run cleanup && vite build",
15
16
  "build-emails": "vite build --mode emails",
17
+ "cleanup": "git clean -qdfX public -e \\!userfiles",
16
18
  "eslint": "eslint 'src/scripts/**/*.js'",
17
19
  "eslint-fix": "eslint 'src/scripts/**/*.js' --fix",
18
20
  "stylelint": "stylelint 'src/styles/**/*.css'",
19
- "stylelint-fix": "stylelint 'src/styles/**/*.css' --fix"
21
+ "stylelint-fix": "stylelint 'src/styles/**/*.css' --fix",
22
+ "npm-update": "ncu -u && npm update",
23
+ "npm-sort": "npm r -S example && npm r -D example"
20
24
  },
21
25
  "dependencies": {
22
- "@simonwep/pickr": "^1.8.2",
23
- "@hotwired/stimulus": "^3.2.1",
24
- "winduum": "^0.3.0",
25
- "swup": "^3.1.1",
26
- "naja": "^2.5.0",
27
- "tippy.js": "^6.3.7",
28
- "air-datepicker": "^3.3.5",
29
- "css-has-pseudo": "^6.0.0"
26
+ "@floating-ui/dom": "^1.6.13",
27
+ "@hotwired/stimulus": "^3.2.2",
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",
32
+ "@newlogic-digital/utils-js": "^1.1.1",
33
+ "naja": "^3.2.1",
34
+ "slide-element": "^2.3.1",
35
+ "swup": "^4.8.1",
36
+ "winduum": "^2.1.0",
37
+ "winduum-stimulus": "^2.0.9"
30
38
  },
31
39
  "devDependencies": {
32
- "@newlogic-digital/core": "^2.0.1",
33
- "@types/grecaptcha": "^3.0.4",
34
- "eslint-config-standard": "^17.1.0",
35
- "stylelint-config-standard": "^34.0.0",
36
- "stylelint-stylistic": "^0.4.3",
37
- "postcss-custom-selectors": "^7.1.4"
40
+ "@newlogic-digital/core": "^3.0.0",
41
+ "@stylistic/stylelint-config": "^2.0.0",
42
+ "@tailwindcss/container-queries": "^0.1.1",
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"
38
49
  },
50
+ "browserslist": [
51
+ "> 1%",
52
+ "last 2 major versions",
53
+ "not kaios > 0",
54
+ "not dead"
55
+ ],
39
56
  "files": [
40
57
  "src"
41
58
  ],
@@ -43,8 +60,7 @@
43
60
  "./src/*": "./src/*"
44
61
  },
45
62
  "engines": {
46
- "node": ">=16.0.0",
47
- "npm": ">=9.0.0"
63
+ "node": "^18.0.0 || >=20.0.0"
48
64
  },
49
65
  "repository": {
50
66
  "type": "git",
@@ -1,51 +1,36 @@
1
1
  {
2
+ "baseUrl": "https://localhost:5173",
2
3
  "lang": "en",
4
+ "cookieConsent": true,
3
5
  "prefetch": [
4
6
  "https://cdn.jsdelivr.net",
5
7
  "https://fonts.gstatic.com",
6
8
  "https://fonts.googleapis.com"
7
9
  ],
10
+ "preload": [
11
+ {
12
+ "href": "https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=block",
13
+ "rel": "preload stylesheet",
14
+ "as": "style",
15
+ "crossorigin": true
16
+ }
17
+ ],
8
18
  "assets": {
9
19
  "css": {
10
20
  "all": [
11
- "/src/styles/main.css",
12
- "https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=block"
21
+ "/src/styles/main.css"
13
22
  ]
14
23
  },
15
24
  "js": {
16
25
  "main": "/src/scripts/main.js"
17
26
  }
18
27
  },
19
- "layout": {
20
- "cookies": false,
21
- "nav": [
22
- {
23
- "name": "Home",
24
- "url": "/"
25
- },
26
- {
27
- "name": "Documentation",
28
- "url": "/ui"
29
- },
30
- {
31
- "name": "Icons",
32
- "url": "/ui-icons"
33
- }
34
- ]
35
- },
36
28
  "media": {
37
- "min-1280": "(min-width: 1280px)",
38
- "min-960": "(min-width: 960px)",
39
- "min-768": "(min-width: 768px)",
40
- "max-400": "(max-width: 767px)",
41
- "min-320": "(min-width: 320px)"
42
- },
43
- "lazy": {
44
- "1x1": "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
45
- "16x9": "data:image/gif;base64,R0lGODlhEAAJAIAAAP///wAAACwAAAAAEAAJAAACCoSPqcvtD6OclBUAOw==",
46
- "5x2": "data:image/gif;base64,R0lGODlhBQACAIAAAP///wAAACwAAAAABQACAAACA4SPBQA7",
47
- "4x3": "data:image/gif;base64,R0lGODlhBAADAIAAAP///wAAACwAAAAABAADAAACA4SPVgA7",
48
- "8x5": "data:image/gif;base64,R0lGODlhCAAFAIAAAP///wAAACwAAAAACAAFAAACBYSPqctYADs=",
49
- "3x2": "data:image/gif;base64,R0lGODlhAwACAIAAAP///wAAACwAAAAAAwACAAACAoRfADs="
29
+ "min-xl": "(min-width: 1216px)",
30
+ "max-lg": "(max-width: 959px)",
31
+ "min-lg": "(min-width: 960px)",
32
+ "min-md": "(min-width: 744px)",
33
+ "max-md": "(max-width: 767px)",
34
+ "min-xs": "(min-width: 360px)"
50
35
  }
51
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
- <svg id="icon-chevron-left" fill="none" viewBox="0 0 24 24" stroke="currentColor">
3
- <path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
4
- </svg>
5
- <svg id="icon-chevron-right" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6
- <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
7
- </svg>
8
- <svg id="icon-angle-down" fill="currentColor" viewBox="0 0 24 24" stroke="currentColor">
9
- <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" />
10
- </svg>
11
- <svg id="icon-angle-up" fill="currentColor" viewBox="0 0 24 24" stroke="currentColor">
12
- <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%;" />
13
- </svg>
14
- <svg id="icon-exclamation-circle" fill="none" viewBox="0 0 24 24" stroke="currentColor">
2
+ <symbol id="icon-exclamation-circle" viewBox="0 0 24 24">
15
3
  <path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
16
- </svg>
17
- <svg id="icon-x" fill="none" viewBox="0 0 24 24" stroke="currentColor">
18
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M6 18L18 6M6 6l12 12" />
19
- </svg>
20
- <svg id="icon-menu" fill="none" viewBox="0 0 24 24" stroke="currentColor">
21
- <path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
22
- </svg>
23
- <svg id="icon-moon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
24
- <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" />
25
- </svg>
26
- <svg id="icon-sun" fill="none" viewBox="0 0 24 24" stroke="currentColor">
27
- <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" />
28
- </svg>
29
- <svg id="icon-at-symbol" fill="none" viewBox="0 0 24 24" stroke="currentColor">
30
- <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" />
31
- </svg>
32
- <svg id="icon-calendar" fill="none" viewBox="0 0 24 24" stroke="currentColor">
33
- <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" />
34
- </svg>
35
- <svg id="icon-clock" fill="none" viewBox="0 0 24 24" stroke="currentColor">
36
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" />
37
- </svg>
4
+ </symbol>
5
+ <symbol id="icon-x-mark" viewBox="0 0 24 24">
6
+ <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
7
+ </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,6 +1,4 @@
1
- import './Utils/global.js'
2
- import './Libraries/+.js'
3
- import './Layout/+.js'
4
- import './Sections/+.js'
5
- import './Components/+.js'
6
- import './Ui/+.js'
1
+ import './composables/stimulus.js'
2
+ import './composables/swup.js'
3
+ import './components/+.js'
4
+ import.meta.glob('/src/assets/**')
@@ -0,0 +1 @@
1
+ export { default as initAfter } from './initAfter.js'
@@ -0,0 +1,11 @@
1
+ import { replaceScripts } from '@newlogic-digital/utils-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
+
6
+ export default function initAfter(element) {
7
+ initStimulus(element)
8
+ initNaja(element)
9
+ replaceScripts(element)
10
+ initCookieConsent(element)
11
+ }
@@ -0,0 +1,4 @@
1
+ @import "./breakpoints.css";
2
+ @import "./defaults.css";
3
+ @import "./keyframes.css";
4
+ @import "./transitions.css";