@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.
- package/README.md +17 -21
- package/package.json +38 -22
- package/src/data/main.json +17 -32
- package/src/data/nav.json +12 -0
- package/src/icons.svg +5 -35
- package/src/pages/dialog/basic.json.latte +5 -0
- package/src/pages/email/index.json +12 -0
- package/src/pages/gdpr.json +11 -0
- package/src/pages/index.json +8 -0
- package/src/scripts/components/(ui)/+.js +12 -0
- package/src/scripts/components/(ui)/Button.js +4 -0
- package/src/scripts/components/(ui)/Compare.js +4 -0
- package/src/scripts/components/(ui)/Control.js +11 -0
- package/src/scripts/components/(ui)/ControlSelect.js +4 -0
- package/src/scripts/components/(ui)/Details.js +4 -0
- package/src/scripts/components/(ui)/Dialog.js +17 -0
- package/src/scripts/components/(ui)/Drawer.js +4 -0
- package/src/scripts/components/(ui)/Form.js +15 -0
- package/src/scripts/components/(ui)/Popover.js +4 -0
- package/src/scripts/components/(ui)/Range.js +4 -0
- package/src/scripts/components/(ui)/Tabs.js +4 -0
- package/src/scripts/components/(ui)/Toast.js +4 -0
- package/src/scripts/components/+.js +5 -0
- package/src/scripts/components/App.js +5 -0
- package/src/scripts/components/ReCaptcha.js +4 -0
- package/src/scripts/components/Reveal.js +4 -0
- package/src/scripts/components/cookieconsent/+.js +2 -0
- package/src/scripts/components/cookieconsent/CookieConsentDialog.js +4 -0
- package/src/scripts/components/cookieconsent/CookieConsentForm.js +4 -0
- package/src/scripts/composables/+.js +3 -0
- package/src/scripts/composables/naja.js +24 -0
- package/src/scripts/composables/stimulus.js +31 -0
- package/src/scripts/composables/swup.js +23 -0
- package/src/scripts/main.js +4 -6
- package/src/scripts/utils/+.js +1 -0
- package/src/scripts/utils/initAfter.js +11 -0
- package/src/styles/base/+.css +4 -0
- package/src/styles/base/defaults.css +36 -0
- package/src/styles/base/transitions.css +12 -0
- package/src/styles/components/(layout)/+.css +2 -0
- package/src/styles/components/(layout)/Header.css +11 -0
- package/src/styles/components/(layout)/Main.css +20 -0
- package/src/styles/components/(ui)/+.css +23 -0
- package/src/styles/components/(ui)/Badge.css +8 -0
- package/src/styles/components/(ui)/Button.css +12 -0
- package/src/styles/components/(ui)/Check.css +1 -0
- package/src/styles/components/(ui)/Compare.css +1 -0
- package/src/styles/components/(ui)/Control.css +29 -0
- package/src/styles/components/(ui)/ControlSelect.css +1 -0
- package/src/styles/components/(ui)/Drawer.css +14 -0
- package/src/styles/components/(ui)/Field.css +1 -0
- package/src/styles/components/(ui)/Group.css +1 -0
- package/src/styles/components/(ui)/Heading.css +4 -0
- package/src/styles/components/(ui)/Image.css +1 -0
- package/src/styles/components/(ui)/Info.css +1 -0
- package/src/styles/components/(ui)/Label.css +1 -0
- package/src/styles/components/(ui)/Link.css +2 -0
- package/src/styles/components/(ui)/Notice.css +1 -0
- package/src/styles/components/(ui)/Popover.css +1 -0
- package/src/styles/components/(ui)/Progress.css +1 -0
- package/src/styles/components/(ui)/Range.css +1 -0
- package/src/styles/components/(ui)/Switch.css +1 -0
- package/src/styles/components/(ui)/Text.css +1 -0
- package/src/styles/components/(ui)/Title.css +4 -0
- package/src/styles/components/(ui)/Toaster.css +2 -0
- package/src/styles/components/(ui)/dialog/+.css +2 -0
- package/src/styles/components/(ui)/dialog/Dialog.css +2 -0
- package/src/styles/components/(ui)/dialog/DialogContent.css +2 -0
- package/src/styles/components/+.css +3 -0
- package/src/styles/components/cookieconsent/+.css +1 -0
- package/src/styles/components/cookieconsent/CookieConsentDialog.css +17 -0
- package/src/styles/emails/+.css +5 -0
- package/src/styles/emails/base/+.css +2 -0
- package/src/styles/emails/base/defaults.css +22 -0
- package/src/styles/emails/components/+.css +4 -0
- package/src/styles/emails/components/Button.css +31 -0
- package/src/styles/emails/components/Heading.css +7 -0
- package/src/styles/emails/components/Main.css +13 -0
- package/src/styles/emails/components/Text.css +14 -0
- package/src/styles/emails/main.css +9 -0
- package/src/styles/emails/theme/+.css +2 -0
- package/src/styles/emails/theme/config.css +5 -0
- package/src/styles/emails/theme/default.css +13 -0
- package/src/styles/emails/utils/+.css +1 -0
- package/src/styles/emails/utils/common.css +29 -0
- package/src/styles/main.css +5 -14
- package/src/styles/theme/+.css +2 -0
- package/src/styles/theme/dark.css +5 -0
- package/src/styles/theme/main.css +35 -0
- package/src/styles/tinymce.css +2 -34
- package/src/styles/utils/+.css +4 -0
- package/src/styles/utils/container.css +5 -0
- package/src/styles/utils/index.css +8 -0
- package/src/styles/utils/reveal.css +22 -0
- package/src/styles/utils/scrollbar.css +23 -0
- package/src/templates/components/(layout)/Footer.latte +1 -0
- package/src/templates/components/(layout)/Header.latte +7 -0
- package/src/templates/components/(ui)/Toast.latte +9 -0
- package/src/templates/components/Content.latte +64 -0
- package/src/templates/components/Example.latte +17 -0
- package/src/templates/components/cookieconsent/CookieConsentContent.latte +69 -0
- package/src/templates/components/cookieconsent/CookieConsentDialog.latte +27 -0
- package/src/templates/components/cookieconsent/CookieConsentForm.latte +47 -0
- package/src/templates/components/dialog/DialogBasic.latte +18 -0
- package/src/templates/emails/components/Content.latte +29 -0
- package/src/templates/emails/components/Footer.latte +13 -0
- package/src/templates/emails/components/Header.latte +8 -0
- package/src/templates/emails/layouts/default.latte +35 -0
- package/src/templates/layouts/default.latte +71 -0
- package/vite.config.js +5 -17
- package/src/emails/styles/email.css +0 -77
- package/src/emails/templates/.gitkeep +0 -0
- package/src/emails/templates.test/Content.latte +0 -24
- package/src/emails/templates.test/Header.latte +0 -14
- package/src/emails/templates.test/Layout.latte +0 -23
- package/src/scripts/Components/+.js +0 -1
- package/src/scripts/Components/CookieConsent.js +0 -78
- package/src/scripts/Layout/+.js +0 -2
- package/src/scripts/Layout/Header.js +0 -32
- package/src/scripts/Layout/Main.js +0 -50
- package/src/scripts/Libraries/+.js +0 -12
- package/src/scripts/Libraries/CookieConsent.js +0 -67
- package/src/scripts/Libraries/Dialog.js +0 -47
- package/src/scripts/Libraries/Drawer.js +0 -42
- package/src/scripts/Libraries/Form.js +0 -26
- package/src/scripts/Libraries/Naja.js +0 -33
- package/src/scripts/Libraries/ReCaptcha.js +0 -42
- package/src/scripts/Libraries/Ripple.js +0 -8
- package/src/scripts/Libraries/Script.js +0 -18
- package/src/scripts/Libraries/Slider.js +0 -160
- package/src/scripts/Libraries/Stimulus.js +0 -11
- package/src/scripts/Libraries/Swup.js +0 -92
- package/src/scripts/Libraries/Tippy.js +0 -117
- package/src/scripts/Sections/+.js +0 -0
- package/src/scripts/Ui/+.js +0 -4
- package/src/scripts/Ui/Check.js +0 -8
- package/src/scripts/Ui/Control.js +0 -186
- package/src/scripts/Ui/ControlSelect.js +0 -24
- package/src/scripts/Ui/Text.js +0 -21
- package/src/scripts/Utils/+.js +0 -3
- package/src/scripts/Utils/Functions/+.js +0 -7
- package/src/scripts/Utils/Functions/importScript.js +0 -17
- package/src/scripts/Utils/Functions/importStyle.js +0 -18
- package/src/scripts/Utils/Functions/inputStep.js +0 -9
- package/src/scripts/Utils/Functions/inputValidity.js +0 -57
- package/src/scripts/Utils/Functions/loadStimulus.js +0 -42
- package/src/scripts/Utils/Functions/replaceScript.js +0 -4
- package/src/scripts/Utils/Functions/replaceTag.js +0 -8
- package/src/scripts/Utils/cdn.js +0 -6
- package/src/scripts/Utils/global.js +0 -15
- package/src/styles/Components/+.css +0 -4
- package/src/styles/Components/CookieConsent.css +0 -68
- package/src/styles/Components/Dialog/+.css +0 -1
- package/src/styles/Components/Dialog/Default.css +0 -26
- package/src/styles/Components/Dropdown/+.css +0 -1
- package/src/styles/Components/Dropdown/Default.css +0 -8
- package/src/styles/Components/Field.css +0 -1
- package/src/styles/Layout/+.css +0 -3
- package/src/styles/Layout/Header.css +0 -50
- package/src/styles/Layout/Main.css +0 -28
- package/src/styles/Layout/Nav.css +0 -47
- package/src/styles/Libraries/+.css +0 -7
- package/src/styles/Libraries/Datepicker.css +0 -54
- package/src/styles/Libraries/Dialog.css +0 -1
- package/src/styles/Libraries/Drawer.css +0 -64
- package/src/styles/Libraries/Hint.css +0 -186
- package/src/styles/Libraries/Pickr.css +0 -13
- package/src/styles/Libraries/Ripple.css +0 -1
- package/src/styles/Libraries/Tippy.css +0 -73
- package/src/styles/Sections/+.css +0 -1
- package/src/styles/Ui/+.css +0 -17
- package/src/styles/Ui/Badge.css +0 -7
- package/src/styles/Ui/Btn.css +0 -13
- package/src/styles/Ui/Check.css +0 -1
- package/src/styles/Ui/Control.css +0 -47
- package/src/styles/Ui/ControlSelect.css +0 -66
- package/src/styles/Ui/Dot.css +0 -22
- package/src/styles/Ui/Group.css +0 -1
- package/src/styles/Ui/Heading.css +0 -3
- package/src/styles/Ui/Image.css +0 -1
- package/src/styles/Ui/Info.css +0 -1
- package/src/styles/Ui/Label.css +0 -1
- package/src/styles/Ui/Link.css +0 -2
- package/src/styles/Ui/Notice.css +0 -1
- package/src/styles/Ui/Progress.css +0 -1
- package/src/styles/Ui/Switch.css +0 -1
- package/src/styles/Ui/Text.css +0 -8
- package/src/styles/Ui/Title.css +0 -7
- package/src/styles/Utils/+.css +0 -8
- package/src/styles/Utils/config.css +0 -5
- package/src/styles/Utils/default.css +0 -19
- package/src/styles/Utils/icons.css +0 -5
- package/src/styles/Utils/tailwind.css +0 -50
- package/src/styles/Utils/theme/+.css +0 -1
- package/src/styles/Utils/theme/main.css +0 -19
- package/src/templates/Components/CookieConsent.latte +0 -28
- package/src/templates/Components/Dialogs/Basic.latte +0 -22
- package/src/templates/Components/Items/.gitkeep +0 -0
- package/src/templates/Layout/Footer.latte +0 -0
- package/src/templates/Layout/Header.latte +0 -40
- package/src/templates/Layout/Main.latte +0 -62
- package/src/templates/Sections/Gdpr.latte +0 -127
- package/src/templates/Sections/Site.latte +0 -141
- package/src/templates/Sections/Ui/Docs/@intro.html +0 -48
- package/src/templates/Sections/Ui/Docs/@nav.html +0 -144
- package/src/templates/Sections/Ui/Docs/@styles.html +0 -96
- package/src/templates/Sections/Ui/Docs/Default.latte +0 -1059
- package/src/templates/Sections/Ui/Icons.html +0 -30
- package/src/templates/Sections/Ui/Intro.html +0 -165
- package/src/templates/Sections/Ui.latte +0 -8
- package/src/templates/Ui/+.latte +0 -5
- package/src/templates/Ui/Check.latte +0 -7
- package/src/templates/Ui/Control.latte +0 -9
- package/src/templates/Ui/ControlDate.latte +0 -14
- package/src/templates/Ui/ControlSelect.latte +0 -9
- package/src/templates/Ui/ControlTime.latte +0 -14
- package/src/views/dialog/basic.json.latte +0 -5
- package/src/views/dropdown/tippy.json.latte +0 -19
- package/src/views/email/email.latte +0 -6
- package/src/views/email/email.test.latte +0 -6
- package/src/views/gdpr.json +0 -12
- package/src/views/index.json +0 -12
- package/src/views/site.json +0 -11
- package/src/views/ui-icons.json +0 -12
- package/src/views/ui.json +0 -11
- /package/src/styles/{Utils → base}/breakpoints.css +0 -0
- /package/src/styles/{Utils → base}/keyframes.css +0 -0
- /package/src/styles/{Utils/print.css → emails/base/fonts.css} +0 -0
- /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/
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
* **[
|
|
29
|
-
* **[
|
|
30
|
-
* **[
|
|
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
|
-
* **
|
|
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
|
|
36
|
+
Creating a new project
|
|
41
37
|
```sh
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
42
|
+
npm run dev
|
|
47
43
|
```
|
|
48
44
|
or
|
|
49
45
|
```sh
|
|
50
|
-
|
|
46
|
+
npm run build
|
|
51
47
|
```
|
|
52
48
|
___
|
|
53
49
|
Or in any other environment
|
|
54
50
|
```sh
|
|
55
|
-
|
|
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 (
|
|
71
|
-
- [NPM (
|
|
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
|
+
"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
|
-
"@
|
|
23
|
-
"@hotwired/stimulus": "^3.2.
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
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": "^
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
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": ">=
|
|
47
|
-
"npm": ">=9.0.0"
|
|
63
|
+
"node": "^18.0.0 || >=20.0.0"
|
|
48
64
|
},
|
|
49
65
|
"repository": {
|
|
50
66
|
"type": "git",
|
package/src/data/main.json
CHANGED
|
@@ -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-
|
|
38
|
-
"
|
|
39
|
-
"min-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
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
|
}
|
package/src/icons.svg
CHANGED
|
@@ -1,38 +1,8 @@
|
|
|
1
1
|
<svg class="hidden">
|
|
2
|
-
<
|
|
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
|
-
</
|
|
17
|
-
<
|
|
18
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
19
|
-
</
|
|
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,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,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,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,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,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 }
|
package/src/scripts/main.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import
|
|
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
|
+
}
|