@newlogic-digital/ui 3.7.5 → 4.2.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 -31
- package/package.json +22 -15
- package/src/data/main.json +2 -32
- package/src/data/nav.json +12 -0
- package/src/icons.svg +0 -30
- package/src/pages/dialog/basic.json.latte +5 -0
- package/src/pages/email/index.json +12 -0
- package/src/pages/example/popover-autocomplete.json +8 -0
- package/src/pages/gdpr.json +11 -0
- package/src/pages/index.json +8 -0
- package/src/scripts/components/(ui)/+.js +13 -0
- package/src/scripts/components/(ui)/Button.js +4 -0
- package/src/scripts/components/(ui)/Carousel.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 +5 -0
- package/src/styles/{Utils/default.css → base/defaults.css} +17 -1
- package/src/styles/base/transitions.css +12 -0
- package/src/styles/base/variants.css +11 -0
- package/src/styles/components/(layout)/+.css +2 -0
- package/src/styles/components/(layout)/Header.css +13 -0
- package/src/styles/components/(layout)/Main.css +24 -0
- package/src/styles/components/(ui)/+.css +25 -0
- package/src/styles/components/(ui)/Badge.css +8 -0
- package/src/styles/components/(ui)/Button.css +12 -0
- package/src/styles/components/(ui)/Carousel.css +2 -0
- package/src/styles/components/(ui)/Check.css +4 -0
- package/src/styles/components/(ui)/Compare.css +1 -0
- package/src/styles/components/(ui)/Control.css +31 -0
- package/src/styles/components/(ui)/ControlSelect.css +1 -0
- package/src/styles/components/(ui)/Drawer.css +16 -0
- package/src/styles/components/(ui)/Field.css +1 -0
- package/src/styles/components/(ui)/Group.css +2 -0
- package/src/styles/components/(ui)/Heading.css +14 -0
- package/src/styles/components/(ui)/Image.css +2 -0
- package/src/styles/components/(ui)/Info.css +2 -0
- package/src/styles/components/(ui)/Label.css +2 -0
- package/src/styles/components/(ui)/Link.css +2 -0
- package/src/styles/components/(ui)/Notice.css +2 -0
- package/src/styles/components/(ui)/Popover.css +13 -0
- package/src/styles/components/(ui)/Progress.css +6 -0
- package/src/styles/components/(ui)/Range.css +4 -0
- package/src/styles/components/(ui)/Switch.css +4 -0
- package/src/styles/components/(ui)/Text.css +2 -0
- package/src/styles/components/(ui)/Title.css +14 -0
- package/src/styles/components/(ui)/Toast.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 +19 -0
- package/src/styles/emails/base/+.css +2 -0
- package/src/styles/emails/base/defaults.css +23 -0
- package/src/styles/emails/components/+.css +4 -0
- package/src/styles/emails/components/Button.css +32 -0
- package/src/styles/emails/components/Heading.css +7 -0
- package/src/styles/emails/components/Main.css +13 -0
- package/src/{emails/styles/main/Ui → styles/emails/components}/Text.css +8 -5
- package/src/styles/emails/main.css +8 -0
- package/src/styles/emails/theme/+.css +2 -0
- package/src/styles/emails/theme/config.css +16 -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 +17 -16
- package/src/styles/theme/+.css +2 -0
- package/src/styles/theme/dark.css +6 -0
- package/src/styles/{Utils/theme → theme}/main.css +11 -14
- package/src/styles/tinymce.css +2 -34
- package/src/styles/utils/+.css +3 -0
- package/src/styles/utils/index.css +5 -0
- package/src/styles/utils/reveal.css +21 -0
- package/src/styles/utils/scrollbar.css +23 -0
- package/src/templates/components/(example)/PopoverAutocomplete.latte +27 -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/{Sections/Text.latte → components/Content.latte} +3 -3
- package/src/templates/components/Example.latte +17 -0
- package/src/templates/{Sections/CookieConsent.latte → components/cookieconsent/CookieConsentContent.latte} +4 -4
- package/src/templates/components/cookieconsent/CookieConsentDialog.latte +27 -0
- package/src/templates/{Components/Form/CookieConsent.latte → components/cookieconsent/CookieConsentForm.latte} +9 -9
- 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 +44 -0
- package/src/templates/{Layout/Main.latte → layouts/default.latte} +26 -28
- package/vite.config.js +3 -18
- package/src/emails/styles/main/+.css +0 -3
- package/src/emails/styles/main/Base/+.css +0 -2
- package/src/emails/styles/main/Base/config.css +0 -22
- package/src/emails/styles/main/Components/+.css +0 -1
- package/src/emails/styles/main/Components/Card.css +0 -12
- package/src/emails/styles/main/Ui/+.css +0 -3
- package/src/emails/styles/main/Ui/Btn.css +0 -78
- package/src/emails/styles/main/Ui/Heading.css +0 -8
- package/src/emails/styles/main.css +0 -92
- package/src/emails/templates/.gitkeep +0 -0
- package/src/emails/templates.test/Layout.latte +0 -35
- package/src/emails/templates.test/Sections/Footer.latte +0 -22
- package/src/emails/templates.test/Sections/Header.latte +0 -37
- package/src/emails/templates.test/Sections/Text.latte +0 -24
- package/src/scripts/Components/+.js +0 -2
- package/src/scripts/Components/Drawer.js +0 -60
- package/src/scripts/Components/Popover.js +0 -65
- package/src/scripts/Layout/+.js +0 -1
- package/src/scripts/Layout/Header.js +0 -20
- package/src/scripts/Libraries/+.js +0 -10
- package/src/scripts/Libraries/CookieConsent.js +0 -80
- package/src/scripts/Libraries/Dialog.js +0 -28
- package/src/scripts/Libraries/Form.js +0 -13
- package/src/scripts/Libraries/Naja.js +0 -37
- package/src/scripts/Libraries/ReCaptcha.js +0 -25
- package/src/scripts/Libraries/Reveal.js +0 -32
- package/src/scripts/Libraries/Ripple.js +0 -8
- package/src/scripts/Libraries/Stimulus.js +0 -56
- package/src/scripts/Libraries/Swup.js +0 -77
- package/src/scripts/Libraries/Toaster.js +0 -55
- 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 -194
- package/src/scripts/Ui/ControlSelect.js +0 -25
- package/src/scripts/Ui/Text.js +0 -21
- package/src/scripts/Utils/+.js +0 -3
- package/src/scripts/Utils/cdn.js +0 -5
- package/src/scripts/Utils/initAfter.js +0 -11
- package/src/scripts/Utils/naja.js +0 -41
- package/src/scripts/Utils/utilities.js +0 -8
- package/src/styles/Components/+.css +0 -5
- package/src/styles/Components/Dialog/+.css +0 -3
- package/src/styles/Components/Dialog/Content.css +0 -2
- package/src/styles/Components/Dialog/CookieConsent.css +0 -17
- package/src/styles/Components/Dialog/Default.css +0 -2
- package/src/styles/Components/Drawer.css +0 -18
- package/src/styles/Components/Field.css +0 -1
- package/src/styles/Components/Popover.css +0 -1
- package/src/styles/Components/Toaster.css +0 -2
- package/src/styles/Layout/+.css +0 -3
- package/src/styles/Layout/Header.css +0 -18
- package/src/styles/Layout/Main.css +0 -31
- package/src/styles/Layout/Nav.css +0 -23
- package/src/styles/Libraries/+.css +0 -2
- package/src/styles/Libraries/Datepicker.css +0 -54
- package/src/styles/Libraries/Pickr.css +0 -13
- package/src/styles/Sections/+.css +0 -1
- package/src/styles/Ui/+.css +0 -16
- package/src/styles/Ui/Badge.css +0 -8
- package/src/styles/Ui/Btn.css +0 -14
- package/src/styles/Ui/Check.css +0 -1
- package/src/styles/Ui/Control.css +0 -57
- package/src/styles/Ui/ControlSelect.css +0 -57
- package/src/styles/Ui/Group.css +0 -1
- package/src/styles/Ui/Heading.css +0 -4
- 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 -8
- package/src/styles/Ui/Notice.css +0 -9
- package/src/styles/Ui/Progress.css +0 -1
- package/src/styles/Ui/Switch.css +0 -1
- package/src/styles/Ui/Text.css +0 -1
- package/src/styles/Ui/Title.css +0 -4
- package/src/styles/Utils/+.css +0 -6
- package/src/styles/Utils/config.css +0 -16
- package/src/styles/Utils/theme/+.css +0 -1
- package/src/styles/Utils/utilities.css +0 -42
- package/src/templates/Components/Dialog/Basic.latte +0 -24
- package/src/templates/Components/Dialog/CookieConsent.latte +0 -27
- package/src/templates/Layout/Footer.latte +0 -0
- package/src/templates/Layout/Header.latte +0 -38
- package/src/templates/Sections/Site.latte +0 -213
- package/src/templates/Sections/Ui/Docs/@intro.html +0 -48
- package/src/templates/Sections/Ui/Docs/@nav.html +0 -134
- package/src/templates/Sections/Ui/Docs/@styles.html +0 -96
- package/src/templates/Sections/Ui/Docs/Default.latte +0 -979
- package/src/templates/Sections/Ui/Icons.html +0 -30
- package/src/templates/Sections/Ui/Intro.html +0 -119
- 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/email/email.latte +0 -6
- package/src/views/email/email.test.latte +0 -6
- package/src/views/gdpr.json +0 -14
- package/src/views/index.json +0 -12
- package/src/views/popover/info.json.latte +0 -15
- 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/{emails/styles/main/Base/font.css → styles/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,51 +18,37 @@ Lightweight, modern and modular CSS framework with the best principles
|
|
|
18
18
|
- ✨️ Progressive
|
|
19
19
|
- ⚡️ Fast
|
|
20
20
|
|
|
21
|
-
|
|
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
|
-
* **[
|
|
39
|
-
* **[
|
|
40
|
-
* **[
|
|
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
|
-
* **
|
|
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
|
|
36
|
+
Creating a new project
|
|
51
37
|
```sh
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
42
|
+
npm run dev
|
|
57
43
|
```
|
|
58
44
|
or
|
|
59
45
|
```sh
|
|
60
|
-
|
|
46
|
+
npm run build
|
|
61
47
|
```
|
|
62
48
|
___
|
|
63
49
|
Or in any other environment
|
|
64
50
|
```sh
|
|
65
|
-
|
|
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 (
|
|
81
|
-
- [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
|
|
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
|
+
"version": "4.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "vite.config.js",
|
|
6
6
|
"author": "New Logic Studio s.r.o.",
|
|
@@ -23,27 +23,34 @@
|
|
|
23
23
|
"npm-sort": "npm r -S example && npm r -D example"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@floating-ui/dom": "^1.
|
|
26
|
+
"@floating-ui/dom": "^1.7.0",
|
|
27
27
|
"@hotwired/stimulus": "^3.2.2",
|
|
28
28
|
"@newlogic-digital/cookieconsent-js": "^1.0.0",
|
|
29
|
-
"@newlogic-digital/
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"@newlogic-digital/naja-extensions": "^1.0.3",
|
|
30
|
+
"@newlogic-digital/stimulus-components": "^1.1.0",
|
|
31
|
+
"@newlogic-digital/swup-plugins": "^1.0.0",
|
|
32
|
+
"@newlogic-digital/utils-js": "^1.1.4",
|
|
33
33
|
"naja": "^3.2.1",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"winduum": "^
|
|
34
|
+
"slide-element": "^2.3.1",
|
|
35
|
+
"swup": "^4.8.2",
|
|
36
|
+
"winduum": "^2.2.1",
|
|
37
|
+
"winduum-stimulus": "^2.0.11"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@
|
|
40
|
+
"@eslint/js": "^9.26.0",
|
|
41
|
+
"@newlogic-digital/core": "^3.1.0",
|
|
42
|
+
"@stylistic/eslint-plugin": "^4.2.0",
|
|
41
43
|
"@stylistic/stylelint-config": "^2.0.0",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"vite": "^5.4.11"
|
|
44
|
+
"eslint": "^9.26.0",
|
|
45
|
+
"npm-check-updates": "^18.0.1",
|
|
46
|
+
"stylelint-config-standard": "^38.0.0"
|
|
46
47
|
},
|
|
48
|
+
"browserslist": [
|
|
49
|
+
"> 1%",
|
|
50
|
+
"last 2 major versions",
|
|
51
|
+
"not kaios > 0",
|
|
52
|
+
"not dead"
|
|
53
|
+
],
|
|
47
54
|
"files": [
|
|
48
55
|
"src"
|
|
49
56
|
],
|
package/src/data/main.json
CHANGED
|
@@ -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:
|
|
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
|
}
|
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,13 @@
|
|
|
1
|
+
import './Button.js'
|
|
2
|
+
import './Carousel.js'
|
|
3
|
+
import './Compare.js'
|
|
4
|
+
import './Control.js'
|
|
5
|
+
import './ControlSelect.js'
|
|
6
|
+
import './Details.js'
|
|
7
|
+
import './Dialog.js'
|
|
8
|
+
import './Drawer.js'
|
|
9
|
+
import './Form.js'
|
|
10
|
+
import './Popover.js'
|
|
11
|
+
import './Range.js'
|
|
12
|
+
import './Tabs.js'
|
|
13
|
+
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 './stimulus.js'
|
|
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,7 +1,5 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
5
|
-
import './Ui/+.js'
|
|
6
|
-
import './Utils/utilities.js'
|
|
1
|
+
import './composables/naja.js'
|
|
2
|
+
import './composables/stimulus.js'
|
|
3
|
+
import './composables/swup.js'
|
|
4
|
+
import './components/+.js'
|
|
7
5
|
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
|
+
}
|
|
@@ -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:
|
|
8
|
+
stroke-width: 1.5;
|
|
8
9
|
stroke: currentcolor;
|
|
9
10
|
fill: none;
|
|
10
11
|
}
|
|
@@ -24,3 +25,18 @@
|
|
|
24
25
|
padding: 0;
|
|
25
26
|
margin: 0;
|
|
26
27
|
}
|
|
28
|
+
|
|
29
|
+
:where([type="number"]) {
|
|
30
|
+
appearance: textfield;
|
|
31
|
+
|
|
32
|
+
&::-webkit-outer-spin-button,
|
|
33
|
+
&::-webkit-inner-spin-button {
|
|
34
|
+
appearance: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where([type="search"]) {
|
|
39
|
+
&::-webkit-search-cancel-button {
|
|
40
|
+
appearance: none;
|
|
41
|
+
}
|
|
42
|
+
}
|