@newlogic-digital/ui 3.3.0 → 3.5.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 +10 -14
- package/package.json +23 -23
- package/src/data/main.json +2 -8
- package/src/emails/{templates/Content.twig → templates.test/Content.latte} +10 -2
- package/src/emails/{templates/Header.twig → templates.test/Header.latte} +1 -1
- package/src/emails/{templates/Layout.twig → templates.test/Layout.latte} +2 -2
- package/src/icons.svg +34 -28
- package/src/scripts/Components/CookieConsent.js +22 -28
- package/src/scripts/Layout/Header.js +25 -11
- package/src/scripts/Layout/Main.js +25 -55
- package/src/scripts/Libraries/+.js +4 -5
- package/src/scripts/Libraries/Dialog.js +37 -72
- package/src/scripts/Libraries/Drawer.js +22 -21
- package/src/scripts/Libraries/Form.js +8 -13
- package/src/scripts/Libraries/Naja.js +33 -0
- package/src/scripts/Libraries/ReCaptcha.js +14 -4
- package/src/scripts/Libraries/Ripple.js +6 -22
- package/src/scripts/Libraries/Script.js +1 -2
- package/src/scripts/Libraries/Slider.js +160 -0
- package/src/scripts/Libraries/Stimulus.js +0 -1
- package/src/scripts/Libraries/Swup.js +54 -38
- package/src/scripts/Libraries/Tippy.js +17 -20
- package/src/scripts/Ui/+.js +3 -3
- package/src/scripts/Ui/Check.js +8 -0
- package/src/scripts/Ui/Control.js +186 -0
- package/src/scripts/Ui/ControlSelect.js +24 -0
- package/src/scripts/Ui/Text.js +8 -10
- package/src/scripts/Utils/Functions/+.js +3 -3
- package/src/scripts/Utils/Functions/importScript.js +1 -1
- package/src/scripts/Utils/Functions/importStyle.js +1 -1
- package/src/scripts/Utils/Functions/inputStep.js +9 -0
- package/src/scripts/Utils/Functions/inputValidity.js +57 -0
- package/src/scripts/Utils/Functions/loadStimulus.js +12 -9
- package/src/scripts/Utils/Functions/replaceScript.js +4 -0
- package/src/scripts/Utils/Functions/replaceTag.js +1 -5
- package/src/scripts/Utils/cdn.js +2 -3
- package/src/scripts/Utils/global.js +1 -1
- package/src/styles/Components/+.css +1 -1
- package/src/styles/Components/CookieConsent.css +22 -25
- package/src/styles/Components/Dialog/Default.css +10 -62
- package/src/styles/Components/Dropdown/Default.css +6 -3
- package/src/styles/Components/Field.css +1 -0
- package/src/styles/Layout/Header.css +13 -17
- package/src/styles/Layout/Main.css +8 -91
- package/src/styles/Layout/Nav.css +31 -27
- package/src/styles/Libraries/+.css +1 -2
- package/src/styles/Libraries/Datepicker.css +38 -229
- package/src/styles/Libraries/Dialog.css +1 -19
- package/src/styles/Libraries/Drawer.css +17 -29
- package/src/styles/Libraries/Hint.css +86 -101
- package/src/styles/Libraries/Pickr.css +13 -0
- package/src/styles/Libraries/Ripple.css +1 -29
- package/src/styles/Libraries/Tippy.css +25 -39
- package/src/styles/Ui/+.css +6 -5
- package/src/styles/Ui/Badge.css +7 -82
- package/src/styles/Ui/Btn.css +13 -226
- package/src/styles/Ui/Check.css +1 -0
- package/src/styles/Ui/Control.css +47 -0
- package/src/styles/Ui/ControlSelect.css +66 -0
- package/src/styles/Ui/Dot.css +22 -0
- package/src/styles/Ui/Group.css +1 -0
- package/src/styles/Ui/Heading.css +3 -22
- package/src/styles/Ui/Image.css +1 -17
- package/src/styles/Ui/Info.css +1 -0
- package/src/styles/Ui/Label.css +1 -14
- package/src/styles/Ui/Link.css +2 -41
- package/src/styles/Ui/Notice.css +1 -47
- package/src/styles/Ui/Progress.css +1 -56
- package/src/styles/Ui/Switch.css +1 -70
- package/src/styles/Ui/Text.css +4 -245
- package/src/styles/Ui/Title.css +5 -13
- package/src/styles/Utils/+.css +3 -4
- package/src/styles/Utils/breakpoints.css +1 -0
- package/src/styles/Utils/config.css +5 -0
- package/src/styles/Utils/default.css +8 -122
- package/src/styles/Utils/icons.css +3 -7
- package/src/styles/Utils/keyframes.css +1 -182
- package/src/styles/Utils/{tailwind/base.css → tailwind.css} +31 -21
- package/src/styles/Utils/theme/+.css +1 -1
- package/src/styles/Utils/theme/main.css +14 -23
- package/src/styles/main.css +19 -15
- package/src/styles/tinymce.css +34 -0
- package/src/templates/Components/CookieConsent.latte +28 -0
- package/src/templates/Components/Dialogs/Basic.latte +22 -0
- package/src/templates/Layout/{Header.twig → Header.latte} +15 -17
- package/src/templates/Layout/Main.latte +62 -0
- package/src/templates/Sections/Gdpr.latte +127 -0
- package/src/templates/Sections/Site.latte +141 -0
- package/src/templates/Sections/Ui/Docs/@intro.html +13 -62
- package/src/templates/Sections/Ui/Docs/@nav.html +41 -92
- package/src/templates/Sections/Ui/Docs/@styles.html +2 -6
- package/src/templates/Sections/Ui/Docs/Default.latte +1059 -0
- package/src/templates/Sections/Ui/Icons.html +11 -9
- package/src/templates/Sections/Ui/Intro.html +66 -37
- package/src/templates/Sections/Ui.latte +8 -0
- package/src/templates/Ui/+.latte +5 -0
- package/src/templates/Ui/Check.latte +7 -0
- package/src/templates/Ui/Control.latte +9 -0
- package/src/templates/Ui/ControlDate.latte +14 -0
- package/src/templates/Ui/ControlSelect.latte +9 -0
- package/src/templates/Ui/ControlTime.latte +14 -0
- package/src/templates/Utils/sections.latte +3 -0
- package/src/views/dialog/basic.json.latte +5 -0
- package/src/views/dropdown/{tippy.json.twig → tippy.json.latte} +7 -4
- package/src/views/email/email.latte +6 -0
- package/src/views/email/email.test.latte +6 -0
- package/src/views/gdpr.json +1 -1
- package/src/views/index.json +1 -1
- package/src/views/site.json +11 -0
- package/src/views/ui-icons.json +1 -1
- package/src/views/ui.json +1 -1
- package/vite.config.js +16 -6
- package/.eslintrc +0 -13
- package/.stylelintrc +0 -18
- package/public/sw.js +0 -30
- package/src/emails/email.prod.html +0 -6
- package/src/emails/email.twig.html +0 -6
- package/src/scripts/Libraries/Anchor.js +0 -35
- package/src/scripts/Libraries/NativeSlider.js +0 -138
- package/src/scripts/Libraries/Tabs.js +0 -16
- package/src/scripts/Ui/Checkbox.js +0 -10
- package/src/scripts/Ui/Input.js +0 -259
- package/src/scripts/Ui/Select.js +0 -53
- package/src/scripts/Utils/Functions/checkValidity.js +0 -44
- package/src/scripts/Utils/Functions/dataValue.js +0 -52
- package/src/scripts/Utils/Functions/inView.js +0 -24
- package/src/styles/Components/Form/+.css +0 -1
- package/src/styles/Components/Form/CookieConsent.css +0 -31
- package/src/styles/Libraries/NativeSlider.css +0 -60
- package/src/styles/Libraries/Tabs.css +0 -19
- package/src/styles/Ui/Checkbox.css +0 -151
- package/src/styles/Ui/Icon.css +0 -33
- package/src/styles/Ui/Input.css +0 -467
- package/src/styles/Ui/Radio.css +0 -4
- package/src/styles/Ui/Select.css +0 -137
- package/src/styles/Utils/normalize.css +0 -223
- package/src/styles/Utils/tailwind/+.css +0 -2
- package/src/styles/Utils/tailwind/gutters.css +0 -346
- package/src/styles/Utils/vars.css +0 -126
- package/src/styles/Utils/vendor.css +0 -1
- package/src/templates/Components/CookieConsent.twig +0 -30
- package/src/templates/Components/Dialogs/Basic.twig +0 -24
- package/src/templates/Layout/Main.twig +0 -49
- package/src/templates/Sections/Gdpr.twig +0 -64
- package/src/templates/Sections/Ui/Docs/Default.twig +0 -1600
- package/src/templates/Sections/Ui.twig +0 -8
- package/src/templates/Utils/sections.twig +0 -3
- package/src/views/dialog/basic.json.twig +0 -3
- package/tailwind.config.cjs +0 -69
- /package/src/emails/{templates.prod → templates}/.gitkeep +0 -0
- /package/src/templates/Layout/{Footer.twig → Footer.latte} +0 -0
package/README.md
CHANGED
|
@@ -18,14 +18,14 @@ 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. Modern approach of CSS properties, enriched with utility classes from
|
|
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
22
|
|
|
23
|
-
Javascript implementation is mainly intended for use on backend rendered websites and applications
|
|
23
|
+
Javascript implementation is only **28 kB** and mainly intended for use on backend rendered websites and applications with PHP framework Nette
|
|
24
24
|
|
|
25
25
|
## ⚙️ Under the hood
|
|
26
|
-
* **[Vituum](https://vituum.dev/)** -
|
|
27
|
-
* **[Newlogic Core](https://github.com/newlogic-digital/core)** -
|
|
28
|
-
* **[ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)** - completely written in modern JS syntax -
|
|
26
|
+
* **[Vituum](https://vituum.dev/)** - plugins for Vite, adds support for template engines and more.
|
|
27
|
+
* **[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
29
|
* **[PostCSS](https://postcss.org/)** - completely written in modern CSS syntax - nesting, variables, etc.
|
|
30
30
|
* **[Tailwind CSS](https://tailwindcss.com/)** - rich utility classes for everything
|
|
31
31
|
* **[Stimulus](https://stimulus.hotwire.dev/)** - a modest JavaScript framework for the HTML you already have
|
|
@@ -33,11 +33,11 @@ Javascript implementation is mainly intended for use on backend rendered website
|
|
|
33
33
|
* **Easy syntax** - .ui-btn (ui elements), .c-component (components), .c-section (sections) etc.
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
|
|
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
37
|
|
|
38
38
|
## 🪄 Get started
|
|
39
39
|
|
|
40
|
-
Creating a new project (
|
|
40
|
+
Creating a new project (with Vituum and Newlogic Core)
|
|
41
41
|
```sh
|
|
42
42
|
$ git clone --depth 1 https://github.com/newlogic-digital/ui.git newlogic-ui-project
|
|
43
43
|
$ cd newlogic-ui-project && npm i
|
|
@@ -57,22 +57,18 @@ $ npm i @newlogic-digital/ui
|
|
|
57
57
|
|
|
58
58
|
```css
|
|
59
59
|
/* main.css or individual modules */
|
|
60
|
-
@import "
|
|
60
|
+
@import "@newlogic-digital/ui/src/styles/main.css"
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
```js
|
|
64
64
|
/* main.js or individual modules */
|
|
65
|
-
import "
|
|
65
|
+
import "@newlogic-digital/ui/src/scripts/main.js"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
### Requirements
|
|
69
69
|
|
|
70
70
|
- [Node.js LTS (16.x)](https://nodejs.org/en/download/)
|
|
71
|
-
- [NPM (
|
|
72
|
-
|
|
73
|
-
### Config
|
|
74
|
-
|
|
75
|
-
Each Vituum project has to have config via `vite.config.js`, docs - [vituum.dev](https://vituum.dev)
|
|
71
|
+
- [NPM (9.x)](https://www.npmjs.com/package/npm) or any other package manager
|
|
76
72
|
|
|
77
73
|
## Licence
|
|
78
74
|
GNU GPLv3
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newlogic-digital/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.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",
|
|
10
11
|
"dev": "vite",
|
|
11
12
|
"preview": "vite preview",
|
|
12
|
-
"build": "
|
|
13
|
-
"build
|
|
14
|
-
"build
|
|
15
|
-
"emails": "vituum emails",
|
|
16
|
-
"cleanup": "vituum cleanup",
|
|
13
|
+
"build": "vite build --mode development",
|
|
14
|
+
"build-production": "vite build",
|
|
15
|
+
"build-emails": "vite build --mode emails",
|
|
17
16
|
"eslint": "eslint 'src/scripts/**/*.js'",
|
|
18
|
-
"eslint
|
|
17
|
+
"eslint-fix": "eslint 'src/scripts/**/*.js' --fix",
|
|
19
18
|
"stylelint": "stylelint 'src/styles/**/*.css'",
|
|
20
|
-
"stylelint
|
|
19
|
+
"stylelint-fix": "stylelint 'src/styles/**/*.css' --fix"
|
|
21
20
|
},
|
|
22
21
|
"dependencies": {
|
|
23
22
|
"@simonwep/pickr": "^1.8.2",
|
|
24
|
-
"@hotwired/stimulus": "^3.
|
|
25
|
-
"
|
|
23
|
+
"@hotwired/stimulus": "^3.2.1",
|
|
24
|
+
"winduum": "^0.3.0",
|
|
25
|
+
"swup": "^3.1.1",
|
|
26
|
+
"naja": "^2.5.0",
|
|
26
27
|
"tippy.js": "^6.3.7",
|
|
27
|
-
"
|
|
28
|
-
"css-has-pseudo": "^
|
|
28
|
+
"air-datepicker": "^3.3.5",
|
|
29
|
+
"css-has-pseudo": "^6.0.0"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
|
-
"@newlogic-digital/core": "^
|
|
32
|
+
"@newlogic-digital/core": "^2.0.1",
|
|
32
33
|
"@types/grecaptcha": "^3.0.4",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"stylelint-
|
|
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"
|
|
36
38
|
},
|
|
37
39
|
"files": [
|
|
38
|
-
"src"
|
|
39
|
-
"tailwind.config.cjs",
|
|
40
|
-
"vite.config.js",
|
|
41
|
-
".eslintrc",
|
|
42
|
-
".stylelintrc",
|
|
43
|
-
"public/sw.js"
|
|
40
|
+
"src"
|
|
44
41
|
],
|
|
42
|
+
"exports": {
|
|
43
|
+
"./src/*": "./src/*"
|
|
44
|
+
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=16.0.0",
|
|
47
|
-
"npm": ">=
|
|
47
|
+
"npm": ">=9.0.0"
|
|
48
48
|
},
|
|
49
49
|
"repository": {
|
|
50
50
|
"type": "git",
|
package/src/data/main.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"lang": "en",
|
|
3
|
-
"template": "templates/Layout/Main.twig",
|
|
4
3
|
"prefetch": [
|
|
5
4
|
"https://cdn.jsdelivr.net",
|
|
6
5
|
"https://fonts.gstatic.com",
|
|
@@ -11,15 +10,10 @@
|
|
|
11
10
|
"all": [
|
|
12
11
|
"/src/styles/main.css",
|
|
13
12
|
"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=block"
|
|
14
|
-
]
|
|
15
|
-
"tailwind": "/temp/tailwind.css",
|
|
16
|
-
"tailwind.src": "/src/styles/tailwind.css",
|
|
17
|
-
"ratio": "/temp/ratio.css"
|
|
13
|
+
]
|
|
18
14
|
},
|
|
19
15
|
"js": {
|
|
20
|
-
"
|
|
21
|
-
"main": "/src/scripts/main.js",
|
|
22
|
-
"lazysizes": "https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js"
|
|
16
|
+
"main": "/src/scripts/main.js"
|
|
23
17
|
}
|
|
24
18
|
},
|
|
25
19
|
"layout": {
|
|
@@ -4,11 +4,19 @@
|
|
|
4
4
|
<tr>
|
|
5
5
|
<td>
|
|
6
6
|
<br />
|
|
7
|
-
<div class="elm_content_heading">
|
|
7
|
+
<div class="elm_content_heading">Děkujeme za Váš zájem</div>
|
|
8
8
|
<br />
|
|
9
|
+
Jsme opravdu rádi že jste se nám ozvali! Toto jsou Vaše údaje z formuláře:
|
|
10
|
+
<br />
|
|
11
|
+
<br />
|
|
12
|
+
<p><strong>Jméno</strong>: Pavel Novák</p>
|
|
13
|
+
<p><strong>Email</strong>: jmeno.prijmeni@email.cz</p>
|
|
14
|
+
<p><strong>Telefon</strong>: +420111222333</p>
|
|
15
|
+
<br/>
|
|
16
|
+
<p><strong>Zpráva</strong>:</p>
|
|
9
17
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vitae est dui. Vestibulum vehicula in mi in interdum. Aliquam quis tempor nibh. Duis tincidunt vel purus tincidunt iaculis. In bibendum leo justo, et elementum justo dapibus et. Aliquam eu elementum magna. Fusce egestas urna ac venenatis auctor. Phasellus felis leo, suscipit non est sit amet, lobortis pellentesque urna. Ut enim leo, posuere eget mauris vel, egestas pellentesque metus. Curabitur ut est ut orci blandit suscipit. Morbi lacinia sapien luctus lectus maximus, vitae gravida lectus aliquet. Vestibulum ut placerat diam. Fusce dapibus tincidunt justo, sed venenatis nisl porttitor vitae.</p>
|
|
10
18
|
<br />
|
|
11
|
-
<div class="elm_content_info"><a href="https://www.
|
|
19
|
+
<div class="elm_content_info"><a href="https://www.nazevwebu.cz"><span>www.nazevwebu.cz</span></a></div>
|
|
12
20
|
</td>
|
|
13
21
|
</tr>
|
|
14
22
|
</table>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<title>Email Template</title>
|
|
6
6
|
<!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
-
<style type="text/css">
|
|
9
|
-
@import 'styles/email.css';
|
|
8
|
+
<style type="text/css" n:syntax="off">
|
|
9
|
+
@import '/src/emails/styles/email.css';
|
|
10
10
|
</style>
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/src/icons.svg
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
4
|
-
</
|
|
5
|
-
<
|
|
6
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
7
|
-
</
|
|
8
|
-
<
|
|
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
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
|
-
</
|
|
11
|
-
<
|
|
10
|
+
</svg>
|
|
11
|
+
<svg id="icon-angle-up" fill="currentColor" viewBox="0 0 24 24" stroke="currentColor">
|
|
12
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
|
-
</
|
|
14
|
-
<
|
|
15
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
16
|
-
</
|
|
17
|
-
<
|
|
13
|
+
</svg>
|
|
14
|
+
<svg id="icon-exclamation-circle" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
15
|
+
<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
18
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M6 18L18 6M6 6l12 12" />
|
|
19
|
-
</
|
|
20
|
-
<
|
|
21
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
22
|
-
</
|
|
23
|
-
<
|
|
24
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
25
|
-
</
|
|
26
|
-
<
|
|
27
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
28
|
-
</
|
|
29
|
-
<
|
|
30
|
-
<path stroke-linecap="round" stroke-linejoin="round"
|
|
31
|
-
</
|
|
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>
|
|
32
38
|
</svg>
|
|
@@ -2,7 +2,7 @@ import { LibStimulus, Controller } from '../Libraries/Stimulus.js'
|
|
|
2
2
|
import LibCookieConsent from '../Libraries/CookieConsent.js'
|
|
3
3
|
|
|
4
4
|
LibStimulus.register('c-cookieconsent', class extends Controller {
|
|
5
|
-
connect() {
|
|
5
|
+
connect () {
|
|
6
6
|
const selector = this.element
|
|
7
7
|
|
|
8
8
|
if (document.querySelector('.c-form-cookieconsent') !== null) {
|
|
@@ -11,40 +11,37 @@ LibStimulus.register('c-cookieconsent', class extends Controller {
|
|
|
11
11
|
|
|
12
12
|
if (LibCookieConsent.getItem('lib-cookieconsent') === null || parseInt(LibCookieConsent.getItem('lib-cookieconsent-expire')) < Date.now()) {
|
|
13
13
|
setTimeout(() => {
|
|
14
|
-
selector.
|
|
15
|
-
selector.classList.add('is-animate')
|
|
14
|
+
selector.classList.add('active', 'is-animate')
|
|
16
15
|
}, 1500)
|
|
17
16
|
}
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
approve () {
|
|
20
|
+
this.hide(['performance', 'marketing'])
|
|
21
|
+
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
23
|
+
decline () {
|
|
24
|
+
this.hide([])
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
hide(type) {
|
|
27
|
+
hide (type) {
|
|
29
28
|
LibCookieConsent.set(type)
|
|
30
29
|
this.element.classList.remove('is-animate')
|
|
31
30
|
|
|
32
31
|
setTimeout(() => {
|
|
33
|
-
this.element.
|
|
32
|
+
this.element.classList.remove('active')
|
|
34
33
|
this.element.remove()
|
|
35
34
|
}, 500)
|
|
36
35
|
}
|
|
37
36
|
})
|
|
38
|
-
|
|
39
37
|
LibStimulus.register('c-form-cookieconsent', class extends Controller {
|
|
40
|
-
connect() {
|
|
38
|
+
connect () {
|
|
41
39
|
const selector = this.element
|
|
42
40
|
const type = LibCookieConsent.getItem('lib-cookieconsent')
|
|
43
41
|
const modal = document.querySelector('.c-cookieconsent')
|
|
44
42
|
|
|
45
43
|
if (modal) {
|
|
46
|
-
modal.classList.remove('is-animate')
|
|
47
|
-
modal._removeDataValue('state', 'active')
|
|
44
|
+
modal.classList.remove('is-animate', 'active')
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
if (type !== null) {
|
|
@@ -58,27 +55,24 @@ LibStimulus.register('c-form-cookieconsent', class extends Controller {
|
|
|
58
55
|
}
|
|
59
56
|
})
|
|
60
57
|
}
|
|
58
|
+
}
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const type = []
|
|
66
|
-
|
|
67
|
-
this.element.querySelectorAll('input:not([disabled])').forEach(input => {
|
|
68
|
-
input.checked && type.push(input.value)
|
|
69
|
-
})
|
|
60
|
+
update () {
|
|
61
|
+
const type = []
|
|
70
62
|
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
this.element.querySelectorAll('input:not([disabled])').forEach(input => {
|
|
64
|
+
input.checked && type.push(input.value)
|
|
73
65
|
})
|
|
66
|
+
|
|
67
|
+
LibCookieConsent.set(type)
|
|
68
|
+
location.reload()
|
|
74
69
|
}
|
|
75
70
|
|
|
76
|
-
disconnect() {
|
|
71
|
+
disconnect () {
|
|
77
72
|
const modal = document.querySelector('.c-cookieconsent')
|
|
78
73
|
|
|
79
74
|
if (modal && (LibCookieConsent.getItem('lib-cookieconsent') === null || parseInt(LibCookieConsent.getItem('lib-cookieconsent-expire')) < Date.now())) {
|
|
80
|
-
modal.
|
|
81
|
-
modal.classList.add('is-animate')
|
|
75
|
+
modal.classList.add('active', 'is-animate')
|
|
82
76
|
}
|
|
83
77
|
}
|
|
84
78
|
})
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
import { LibStimulus, Controller, getController } from '../Libraries/Stimulus.js'
|
|
2
2
|
|
|
3
|
-
LibStimulus.register('l-header',
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
LibStimulus.register('l-header',
|
|
4
|
+
/** @property {LibDrawer} libDrawerOutlet */
|
|
5
|
+
class extends Controller {
|
|
6
|
+
connect () {
|
|
7
|
+
if (document.querySelector('#l-nav') === null) {
|
|
8
|
+
this.element.insertAdjacentHTML('afterend', `
|
|
9
|
+
<div id="l-nav" class="lib-drawer" data-controller="lib-drawer" data-action="scroll->lib-drawer#scroll" inert>
|
|
10
|
+
<div class="l_nav">
|
|
11
|
+
<div class="l_nav_head"></div>
|
|
12
|
+
<div class="l_nav_body"></div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
`)
|
|
7
16
|
|
|
8
|
-
|
|
17
|
+
const layoutNav = document.querySelector('#l-nav')
|
|
18
|
+
const logo = this.element.querySelector('.l_header_logo').outerHTML
|
|
19
|
+
const nav = this.element.querySelector('.l_header_nav').outerHTML
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
layoutNav.querySelector('.l_nav_head').insertAdjacentHTML('beforeend', logo)
|
|
22
|
+
layoutNav.querySelector('.l_nav_body').insertAdjacentHTML('beforeend', nav)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
13
25
|
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
showDrawer () {
|
|
27
|
+
/** @type {LibDrawer} */
|
|
28
|
+
const LibDrawer = getController(document.querySelector('[data-controller~="lib-drawer"]'), 'lib-drawer')
|
|
29
|
+
LibDrawer.show()
|
|
16
30
|
}
|
|
17
31
|
}
|
|
18
|
-
|
|
32
|
+
)
|
|
@@ -1,30 +1,9 @@
|
|
|
1
|
-
import { LibStimulus, Controller
|
|
2
|
-
import { importScript } from '../Utils/Functions/+.js'
|
|
3
|
-
import LibRipple from '../Libraries/Ripple.js'
|
|
4
|
-
import LibAnchor from '../Libraries/Anchor.js'
|
|
5
|
-
import LibDialog from '../Libraries/Dialog.js'
|
|
1
|
+
import { LibStimulus, Controller } from '../Libraries/Stimulus.js'
|
|
6
2
|
import LibTippy from '../Libraries/Tippy.js'
|
|
7
|
-
import
|
|
8
|
-
import LibNativeSlider from '../Libraries/NativeSlider.js'
|
|
9
|
-
import cdn from '../Utils/cdn.js'
|
|
3
|
+
import { initSlider, nextSlide, prevSlide, selectSlide } from '../Libraries/Slider.js'
|
|
10
4
|
|
|
11
5
|
LibStimulus.register('lib', class extends Controller {
|
|
12
|
-
|
|
13
|
-
if (!('scrollBehavior' in document.documentElement.style)) {
|
|
14
|
-
importScript(cdn.seamless).then(() => window.seamless.polyfill())
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
ripple(e) {
|
|
19
|
-
LibRipple(e)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
anchor({ currentTarget }) {
|
|
23
|
-
arguments[0].preventDefault()
|
|
24
|
-
LibAnchor.action(currentTarget)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
darkMode() {
|
|
6
|
+
darkMode () {
|
|
28
7
|
if (document.documentElement.classList.contains('dark')) {
|
|
29
8
|
localStorage.theme = 'light'
|
|
30
9
|
document.documentElement.classList.remove('dark')
|
|
@@ -35,46 +14,37 @@ LibStimulus.register('lib', class extends Controller {
|
|
|
35
14
|
}
|
|
36
15
|
})
|
|
37
16
|
|
|
38
|
-
LibStimulus.register('lib-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const url = this.element.getAttribute('data-action-url')
|
|
17
|
+
LibStimulus.register('lib-tippy', class extends Controller {
|
|
18
|
+
connect () {
|
|
19
|
+
const attributes = this.element.dataset.libTippy
|
|
42
20
|
|
|
43
|
-
|
|
44
|
-
await LibDialog.action(this.element, url, () => loadStimulus(document.querySelector('.lib-dialog')))
|
|
45
|
-
} else {
|
|
46
|
-
await LibDialog.show(document.querySelector(this.element.getAttribute('data-lib-dialog-open')).innerHTML, () => loadStimulus(document.querySelector('.lib-dialog')))
|
|
47
|
-
}
|
|
48
|
-
}
|
|
21
|
+
new LibTippy(this.element, attributes?.replace(/\s/g, '')?.split(','))
|
|
49
22
|
}
|
|
23
|
+
})
|
|
50
24
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
await LibDialog.action(currentTarget, url)
|
|
55
|
-
}
|
|
25
|
+
LibStimulus.register('lib-slider', class extends Controller {
|
|
26
|
+
static targets = ['slider', 'dots', 'progress', 'counterMin', 'counterMax']
|
|
56
27
|
|
|
57
|
-
|
|
58
|
-
|
|
28
|
+
connect () {
|
|
29
|
+
initSlider(this.sliderTarget, {
|
|
30
|
+
paginationSelector: this.hasDotsTarget ? this.dotsTarget : null,
|
|
31
|
+
paginationItemClass: 'ui-dot',
|
|
32
|
+
progressSelector: this.hasProgressTarget ? this.progressTarget : null,
|
|
33
|
+
counterMinSelector: this.hasCounterMinTarget ? this.counterMinTarget : null,
|
|
34
|
+
counterMaxSelector: this.hasCounterMaxTarget ? this.counterMaxTarget : null,
|
|
35
|
+
pauseSelector: this.element.querySelectorAll('[data-action*="lib-slider"]')
|
|
36
|
+
})
|
|
59
37
|
}
|
|
60
|
-
})
|
|
61
38
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
LibTabs(this.element)
|
|
39
|
+
next () {
|
|
40
|
+
nextSlide(this.sliderTarget)
|
|
65
41
|
}
|
|
66
|
-
})
|
|
67
42
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
LibNativeSlider(this.element.querySelector('[data-lib-ns]'), this.element)
|
|
43
|
+
prev () {
|
|
44
|
+
prevSlide(this.sliderTarget)
|
|
71
45
|
}
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
LibStimulus.register('lib-tippy', class extends Controller {
|
|
75
|
-
connect() {
|
|
76
|
-
const attributes = this.element.getAttribute('data-lib-tippy')
|
|
77
46
|
|
|
78
|
-
|
|
47
|
+
select () {
|
|
48
|
+
selectSlide(this.sliderTarget)
|
|
79
49
|
}
|
|
80
50
|
})
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export { default as Anchor } from './Anchor.js'
|
|
2
1
|
export { default as CookieConsent } from './CookieConsent.js'
|
|
3
|
-
|
|
2
|
+
import './Dialog.js'
|
|
4
3
|
import './Drawer.js'
|
|
5
4
|
import './Form.js'
|
|
6
|
-
|
|
5
|
+
import './Naja.js'
|
|
7
6
|
import './ReCaptcha.js'
|
|
8
|
-
|
|
7
|
+
import './Ripple.js'
|
|
9
8
|
import './Script.js'
|
|
9
|
+
import './Slider.js'
|
|
10
10
|
import './Stimulus.js'
|
|
11
11
|
export { default as Swup } from './Swup.js'
|
|
12
|
-
export { default as Tabs } from './Tabs.js'
|
|
13
12
|
export { default as Tippy } from './Tippy.js'
|