@newlogic-digital/ui 3.0.4 → 3.1.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 +6 -10
- package/gulpfile.js +17 -168
- package/package.json +13 -8
- package/src/emails/email.css +3 -3
- package/src/emails/email.twig +1 -1
- package/src/icons.svg +32 -0
- package/src/main.json +12 -10
- package/src/scripts/Components/+.js +2 -2
- package/src/scripts/Components/CookieConsent.js +66 -64
- package/src/scripts/Components/Form.js +28 -21
- package/src/scripts/Layout/+.js +2 -1
- package/src/scripts/Layout/Header.js +18 -0
- package/src/scripts/Layout/Main.js +49 -45
- package/src/scripts/Libraries/+.js +12 -10
- package/src/scripts/Libraries/Anchor.js +18 -43
- package/src/scripts/Libraries/CookieConsent.js +37 -58
- package/src/scripts/Libraries/Dialog.js +56 -55
- package/src/scripts/Libraries/Drawer.js +23 -23
- package/src/scripts/Libraries/NativeSlider.js +86 -86
- package/src/scripts/Libraries/ReCaptcha.js +20 -18
- package/src/scripts/Libraries/Ripple.js +16 -32
- package/src/scripts/Libraries/Stimulus.js +30 -34
- package/src/scripts/Libraries/Swup.js +47 -50
- package/src/scripts/Libraries/Tabs.js +12 -18
- package/src/scripts/Libraries/Tippy.js +118 -0
- package/src/scripts/Ui/+.js +5 -3
- package/src/scripts/Ui/Checkbox.js +19 -0
- package/src/scripts/Ui/Input.js +188 -161
- package/src/scripts/Ui/Radio.js +23 -0
- package/src/scripts/Ui/Select.js +64 -37
- package/src/scripts/Ui/Text.js +25 -0
- package/src/scripts/Utils/Functions/+.js +6 -6
- package/src/scripts/Utils/Functions/dataValue.js +28 -25
- package/src/scripts/Utils/Functions/importScript.js +9 -11
- package/src/scripts/Utils/Functions/importStyle.js +18 -5
- package/src/scripts/Utils/Functions/inView.js +19 -21
- package/src/scripts/Utils/Functions/loadStimulus.js +22 -20
- package/src/scripts/Utils/cdn.js +6 -4
- package/src/scripts/Utils/global.js +10 -33
- package/src/scripts/main.js +6 -6
- package/src/styles/Components/CookieConsent.css +40 -179
- package/src/styles/Components/Dialog/Default.css +12 -15
- package/src/styles/Components/Form/CookieConsent.css +7 -12
- package/src/styles/Layout/+.css +2 -0
- package/src/{templates/Sections/.gitkeep → styles/Layout/Header.css} +0 -0
- package/src/styles/Layout/Main.css +28 -63
- package/src/styles/Layout/Nav.css +43 -0
- package/src/styles/Libraries/+.css +1 -1
- package/src/styles/Libraries/Datepicker.css +85 -39
- package/src/styles/Libraries/Dialog.css +6 -5
- package/src/styles/Libraries/Drawer.css +15 -14
- package/src/styles/Libraries/Hint.css +29 -23
- package/src/styles/Libraries/Lazysizes.css +2 -1
- package/src/styles/Libraries/NativeSlider.css +18 -17
- package/src/styles/Libraries/Ripple.css +8 -5
- package/src/styles/Libraries/Tabs.css +4 -4
- package/src/styles/Libraries/Tippy.css +87 -0
- package/src/styles/Ui/+.css +5 -1
- package/src/styles/Ui/Badge.css +33 -19
- package/src/styles/Ui/Btn.css +80 -53
- package/src/styles/Ui/Checkbox.css +80 -41
- package/src/styles/Ui/Dropdown.css +5 -0
- package/src/styles/Ui/Heading.css +12 -12
- package/src/styles/Ui/Icon.css +27 -8
- package/src/styles/Ui/Image.css +23 -0
- package/src/styles/Ui/Input.css +295 -220
- package/src/styles/Ui/Label.css +14 -0
- package/src/styles/Ui/Link.css +3 -3
- package/src/styles/Ui/Notice.css +14 -16
- package/src/styles/Ui/Progress.css +10 -21
- package/src/styles/Ui/Radio.css +3 -8
- package/src/styles/Ui/Select.css +63 -112
- package/src/styles/Ui/Switch.css +70 -0
- package/src/styles/Ui/{Wsw.css → Text.css} +61 -80
- package/src/styles/Ui/Title.css +8 -4
- package/src/styles/Utils/default.css +75 -67
- package/src/styles/Utils/icons.css +9 -0
- package/src/styles/Utils/keyframes.css +182 -0
- package/src/styles/Utils/normalize.css +223 -0
- package/src/styles/Utils/print.css +1 -1
- package/src/styles/Utils/tailwind/base.css +15 -0
- package/src/styles/Utils/tailwind/gutters.css +264 -263
- package/src/styles/Utils/theme/main.css +24 -21
- package/src/styles/Utils/vars.css +58 -35
- package/src/styles/Utils/vendor.css +1 -2
- package/src/styles/main.css +6 -3
- package/src/styles/tailwind.css +1 -4
- package/src/templates/Components/CookieConsent.twig +30 -0
- package/src/templates/Components/Dialogs/Basic.twig +7 -3
- package/src/templates/Layout/Header.twig +42 -0
- package/src/templates/Layout/Main.twig +52 -67
- package/src/templates/Sections/Gdpr.twig +64 -0
- package/src/templates/Sections/Ui.twig +2104 -0
- package/src/templates/dialog-basic.twig +2 -2
- package/src/templates/gdpr.json +11 -0
- package/src/templates/index.json +8 -2
- package/src/templates/json-tippy.twig +16 -0
- package/src/templates/ui.json +11 -0
- package/CHANGELOG +0 -231
- package/src/icons/iconfont.css +0 -171
- package/src/icons/selection.json +0 -1
- package/src/icons/variables.css +0 -31
- package/src/scripts/Ui/Wsw.js +0 -25
- package/src/scripts/Utils/Functions/bodyLoaded.js +0 -12
- package/src/styles/Libraries/Animate.css +0 -184
- package/src/styles/Utils/reference.css +0 -2
- package/src/styles/Utils/tailwind/content.css +0 -24
- package/src/styles/Utils/theme/vars.css +0 -19
- package/src/styles/preload.css +0 -29
package/README.md
CHANGED
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
# 🎨 Newlogic UI
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Modern and modular CSS framework with the best principles.
|
|
13
|
+
Lightweight, modern and modular CSS framework with the best principles
|
|
16
14
|
|
|
17
15
|
- 💡 Modern
|
|
18
16
|
- 📦 Modular
|
|
@@ -20,7 +18,9 @@ Modern and modular CSS framework with the best principles.
|
|
|
20
18
|
- ✨️ Progressive
|
|
21
19
|
- ⚡️ Fast
|
|
22
20
|
|
|
23
|
-
Newlogic UI is component framework with
|
|
21
|
+
Newlogic UI is component framework with easy syntax. Modern approach of CSS properties, enriched with utility classes from Tailwind. Inspired by favourite frameworks like Boostrap and Bulma
|
|
22
|
+
|
|
23
|
+
Javascript implementation is mainly intended for use on backend rendered websites and applications such as with PHP
|
|
24
24
|
|
|
25
25
|
## ⚙️ Under the hood
|
|
26
26
|
* **[Newlogic Core](https://core.newlogic.cz/)** - set of tools that can be used to create modern web applications
|
|
@@ -32,7 +32,7 @@ Newlogic UI is component framework with simple syntax. Inspired by popular frame
|
|
|
32
32
|
* **Easy syntax** - .ui-btn (ui elements), .c-component (components), .c-section (sections) etc.
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
The core of the Newlogic UI is Newlogic Core, which compiles modern JS and CSS
|
|
35
|
+
The core of the Newlogic UI is Newlogic Core, which compiles modern JS and CSS syntax and contains other tools for web development. Source code can be used with any other tools or even different environment than NodeJS, eg. Deno and is written in W3C standards and should be runnable in current or future version of browsers. The framework is modular, and you can really use only what is needed for your project.
|
|
36
36
|
|
|
37
37
|
## 🪄 Instalation
|
|
38
38
|
|
|
@@ -56,7 +56,6 @@ $ npm i @newlogic-newlogic/ui
|
|
|
56
56
|
|
|
57
57
|
```css
|
|
58
58
|
/* main.css or individual modules */
|
|
59
|
-
@import "node_modules/@newlogic/ui/src/icons/style.css"
|
|
60
59
|
@import "node_modules/@newlogic/ui/src/styles/main.css"
|
|
61
60
|
```
|
|
62
61
|
|
|
@@ -75,10 +74,7 @@ import "node_modules/@newlogic/ui/src/scripts/main.js"
|
|
|
75
74
|
Each Newlogic Core project has to have config via `gulpfile.js`, docs - [core.newlogic.cz](https://core.newlogic.cz/)
|
|
76
75
|
|
|
77
76
|
## 📌 Future plans
|
|
78
|
-
-
|
|
79
|
-
- lighthouse optimization
|
|
80
|
-
- upgrading form elements
|
|
81
|
-
- new elements - dropdown, notificaton, snack and more
|
|
77
|
+
- performance optimization
|
|
82
78
|
|
|
83
79
|
## Licence
|
|
84
80
|
GNU GPLv3
|
package/gulpfile.js
CHANGED
|
@@ -1,192 +1,41 @@
|
|
|
1
|
-
import {defineConfig} from
|
|
2
|
-
import
|
|
1
|
+
import { defineConfig } from '@newlogic-digital/core'
|
|
2
|
+
import cms from "./src/module.cms.js"
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
|
+
config: true,
|
|
6
|
+
modules: {cms},
|
|
7
|
+
serve: {
|
|
8
|
+
https: true
|
|
9
|
+
},
|
|
5
10
|
scripts: {
|
|
6
11
|
importResolution: {
|
|
7
|
-
directories: [
|
|
12
|
+
directories: ['Components', 'Sections', 'Layout', 'Libraries', 'Utils/Functions', 'Ui']
|
|
8
13
|
},
|
|
9
14
|
importMap: {
|
|
10
|
-
build:
|
|
15
|
+
build: false,
|
|
11
16
|
trailingSlashes: /(vanillajs-datepicker)/
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
19
|
styles: {
|
|
15
20
|
purge: {
|
|
16
|
-
|
|
21
|
+
enabled: true,
|
|
22
|
+
content: ['src/scripts/**/*.js', 'src/templates/**/*.twig', 'www/templates/**/*.tpl', 'temp/cdn/*.js', 'admin_ex/js/templates/*.html', 'index.html'],
|
|
17
23
|
options: {
|
|
18
24
|
safelist: {
|
|
19
25
|
standard: [/(class|is-|to-|grecaptcha)/],
|
|
20
|
-
deep: [/(ui-
|
|
26
|
+
deep: [/(ui-text|wsw|datepicker)/]
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
30
|
vendor: {
|
|
25
|
-
path:
|
|
31
|
+
path: 'Utils/vendor.css'
|
|
26
32
|
},
|
|
27
33
|
importResolution: {
|
|
28
|
-
directories: [
|
|
34
|
+
directories: ['Components', 'Sections', 'Layout', 'Libraries', 'Ui']
|
|
29
35
|
},
|
|
30
|
-
themePath:
|
|
36
|
+
themePath: 'Utils/theme/{THEME}.{FORMAT}',
|
|
31
37
|
postcss: {
|
|
32
|
-
extend: [
|
|
38
|
+
extend: []
|
|
33
39
|
}
|
|
34
|
-
},
|
|
35
|
-
tailwind: {
|
|
36
|
-
darkMode: "class", // or "media" or "class"
|
|
37
|
-
corePlugins: {
|
|
38
|
-
preflight: false,
|
|
39
|
-
container: false,
|
|
40
|
-
ringWidth: false,
|
|
41
|
-
ringColor: false,
|
|
42
|
-
ringOpacity: false,
|
|
43
|
-
ringOffsetWidth: false,
|
|
44
|
-
ringOffsetColor: false,
|
|
45
|
-
gradientColorStops: false,
|
|
46
|
-
backgroundImage: false,
|
|
47
|
-
boxShadow: false
|
|
48
|
-
},
|
|
49
|
-
theme: {
|
|
50
|
-
extend: {
|
|
51
|
-
colors: {
|
|
52
|
-
background: ({ opacityVariable, opacityValue }) => {
|
|
53
|
-
if (opacityValue !== undefined) {
|
|
54
|
-
return `rgba(var(--color-background), ${opacityValue})`
|
|
55
|
-
}
|
|
56
|
-
if (opacityVariable !== undefined) {
|
|
57
|
-
return `rgba(var(--color-background), var(${opacityVariable}, 1))`
|
|
58
|
-
}
|
|
59
|
-
return `rgb(var(--color-background))`
|
|
60
|
-
},
|
|
61
|
-
default: ({ opacityVariable, opacityValue }) => {
|
|
62
|
-
if (opacityValue !== undefined) {
|
|
63
|
-
return `rgba(var(--color-default), ${opacityValue})`
|
|
64
|
-
}
|
|
65
|
-
if (opacityVariable !== undefined) {
|
|
66
|
-
return `rgba(var(--color-default), var(${opacityVariable}, 1))`
|
|
67
|
-
}
|
|
68
|
-
return `rgb(var(--color-default))`
|
|
69
|
-
},
|
|
70
|
-
invert: ({ opacityVariable, opacityValue }) => {
|
|
71
|
-
if (opacityValue !== undefined) {
|
|
72
|
-
return `rgba(var(--color-invert), ${opacityValue})`
|
|
73
|
-
}
|
|
74
|
-
if (opacityVariable !== undefined) {
|
|
75
|
-
return `rgba(var(--color-invert), var(${opacityVariable}, 1))`
|
|
76
|
-
}
|
|
77
|
-
return `rgb(var(--color-invert))`
|
|
78
|
-
},
|
|
79
|
-
light: ({ opacityVariable, opacityValue }) => {
|
|
80
|
-
if (opacityValue !== undefined) {
|
|
81
|
-
return `rgba(var(--color-light), ${opacityValue})`
|
|
82
|
-
}
|
|
83
|
-
if (opacityVariable !== undefined) {
|
|
84
|
-
return `rgba(var(--color-light), var(${opacityVariable}, 1))`
|
|
85
|
-
}
|
|
86
|
-
return `rgb(var(--color-light))`
|
|
87
|
-
},
|
|
88
|
-
dark: ({ opacityVariable, opacityValue }) => {
|
|
89
|
-
if (opacityValue !== undefined) {
|
|
90
|
-
return `rgba(var(--color-dark), ${opacityValue})`
|
|
91
|
-
}
|
|
92
|
-
if (opacityVariable !== undefined) {
|
|
93
|
-
return `rgba(var(--color-dark), var(${opacityVariable}, 1))`
|
|
94
|
-
}
|
|
95
|
-
return `rgb(var(--color-dark))`
|
|
96
|
-
},
|
|
97
|
-
primary: ({ opacityVariable, opacityValue }) => {
|
|
98
|
-
if (opacityValue !== undefined) {
|
|
99
|
-
return `rgba(var(--color-primary), ${opacityValue})`
|
|
100
|
-
}
|
|
101
|
-
if (opacityVariable !== undefined) {
|
|
102
|
-
return `rgba(var(--color-primary), var(${opacityVariable}, 1))`
|
|
103
|
-
}
|
|
104
|
-
return `rgb(var(--color-primary))`
|
|
105
|
-
},
|
|
106
|
-
secondary: ({ opacityVariable, opacityValue }) => {
|
|
107
|
-
if (opacityValue !== undefined) {
|
|
108
|
-
return `rgba(var(--color-secondary), ${opacityValue})`
|
|
109
|
-
}
|
|
110
|
-
if (opacityVariable !== undefined) {
|
|
111
|
-
return `rgba(var(--color-secondary), var(${opacityVariable}, 1))`
|
|
112
|
-
}
|
|
113
|
-
return `rgb(var(--color-secondary))`
|
|
114
|
-
},
|
|
115
|
-
warning: ({ opacityVariable, opacityValue }) => {
|
|
116
|
-
if (opacityValue !== undefined) {
|
|
117
|
-
return `rgba(var(--color-warning), ${opacityValue})`
|
|
118
|
-
}
|
|
119
|
-
if (opacityVariable !== undefined) {
|
|
120
|
-
return `rgba(var(--color-warning), var(${opacityVariable}, 1))`
|
|
121
|
-
}
|
|
122
|
-
return `rgb(var(--color-warning))`
|
|
123
|
-
},
|
|
124
|
-
error: ({ opacityVariable, opacityValue }) => {
|
|
125
|
-
if (opacityValue !== undefined) {
|
|
126
|
-
return `rgba(var(--color-error), ${opacityValue})`
|
|
127
|
-
}
|
|
128
|
-
if (opacityVariable !== undefined) {
|
|
129
|
-
return `rgba(var(--color-error), var(${opacityVariable}, 1))`
|
|
130
|
-
}
|
|
131
|
-
return `rgb(var(--color-error))`
|
|
132
|
-
},
|
|
133
|
-
info: ({ opacityVariable, opacityValue }) => {
|
|
134
|
-
if (opacityValue !== undefined) {
|
|
135
|
-
return `rgba(var(--color-info), ${opacityValue})`
|
|
136
|
-
}
|
|
137
|
-
if (opacityVariable !== undefined) {
|
|
138
|
-
return `rgba(var(--color-info), var(${opacityVariable}, 1))`
|
|
139
|
-
}
|
|
140
|
-
return `rgb(var(--color-info))`
|
|
141
|
-
},
|
|
142
|
-
success: ({ opacityVariable, opacityValue }) => {
|
|
143
|
-
if (opacityValue !== undefined) {
|
|
144
|
-
return `rgba(var(--color-success), ${opacityValue})`
|
|
145
|
-
}
|
|
146
|
-
if (opacityVariable !== undefined) {
|
|
147
|
-
return `rgba(var(--color-success), var(${opacityVariable}, 1))`
|
|
148
|
-
}
|
|
149
|
-
return `rgb(var(--color-success))`
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
fontFamily: {
|
|
154
|
-
primary: "var(--font-primary)",
|
|
155
|
-
secondary: "var(--font-secondary)"
|
|
156
|
-
},
|
|
157
|
-
fontWeight: {
|
|
158
|
-
light: "var(--weight-light)",
|
|
159
|
-
normal: "var(--weight-normal)",
|
|
160
|
-
medium: "var(--weight-medium)",
|
|
161
|
-
semibold: "var(--weight-semibold)",
|
|
162
|
-
bold: "var(--weight-bold)",
|
|
163
|
-
extrabold: "var(--weight-extrabold)"
|
|
164
|
-
},
|
|
165
|
-
zIndex: {
|
|
166
|
-
"0": 0,
|
|
167
|
-
"10": "var(--z-10)",
|
|
168
|
-
"20": "var(--z-20)",
|
|
169
|
-
"30": "var(--z-30)",
|
|
170
|
-
"40": "var(--z-40)",
|
|
171
|
-
"50": "var(--z-50)",
|
|
172
|
-
"auto": "auto"
|
|
173
|
-
},
|
|
174
|
-
screens: {
|
|
175
|
-
"m": {"max": "47.9375em"},
|
|
176
|
-
"t": "48em",
|
|
177
|
-
"d": "60em",
|
|
178
|
-
"w": "76em",
|
|
179
|
-
"hd": "88em",
|
|
180
|
-
"touch": {"max": "59.9375em"},
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
variants: {
|
|
184
|
-
extend: {
|
|
185
|
-
backgroundColor: ['checked'],
|
|
186
|
-
borderColor: ['checked'],
|
|
187
|
-
textColor: ['checked'],
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
plugins: [],
|
|
191
40
|
}
|
|
192
|
-
})
|
|
41
|
+
})
|
package/package.json
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newlogic-digital/ui",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "gulpfile.js",
|
|
6
6
|
"author": "New Logic Studio s.r.o.",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Lightweight, modern and modular CSS framework with the best principles",
|
|
8
8
|
"license": "GNU GPLv3",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"utils:eslint": "eslint 'src/scripts/**/*.js' --fix",
|
|
11
|
+
"utils:stylelint": "stylelint 'src/styles/**/*.css' --fix"
|
|
12
|
+
},
|
|
9
13
|
"imports": {},
|
|
10
14
|
"dependencies": {
|
|
11
|
-
"@simonwep/pickr": "^1.8.
|
|
12
|
-
"
|
|
13
|
-
"stimulus": "2.0.0",
|
|
15
|
+
"@simonwep/pickr": "^1.8.2",
|
|
16
|
+
"@hotwired/stimulus": "3.0.1",
|
|
14
17
|
"swup": "2.0.14",
|
|
15
|
-
"
|
|
18
|
+
"tippy.js": "^6.3.7",
|
|
19
|
+
"vanillajs-datepicker": "^1.2.0"
|
|
16
20
|
},
|
|
17
21
|
"devDependencies": {
|
|
18
|
-
"@newlogic-digital/core": "~0.5
|
|
19
|
-
"
|
|
22
|
+
"@newlogic-digital/core": "~0.9.5",
|
|
23
|
+
"eslint-config-standard": "^16.0.3",
|
|
24
|
+
"stylelint-config-standard": "^24.0.0"
|
|
20
25
|
},
|
|
21
26
|
"files": [
|
|
22
27
|
"src",
|
package/src/emails/email.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "../styles/Utils/theme/main.css";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--width
|
|
4
|
+
--width: 660px;
|
|
5
5
|
--container: 30px;
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -72,6 +72,6 @@ p {
|
|
|
72
72
|
|
|
73
73
|
@media print {
|
|
74
74
|
* {
|
|
75
|
-
-webkit-print-color-adjust:exact;
|
|
75
|
+
-webkit-print-color-adjust: exact;
|
|
76
76
|
}
|
|
77
|
-
}
|
|
77
|
+
}
|
package/src/emails/email.twig
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
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
8
|
<style type="text/css" n:syntax="off">
|
|
9
|
-
{{ fetch (
|
|
9
|
+
{{ fetch ('/temp/emails/email.css') }}
|
|
10
10
|
</style>
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/src/icons.svg
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<svg hidden="">
|
|
2
|
+
<symbol id="icon-chevron-left" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
3
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
|
|
4
|
+
</symbol>
|
|
5
|
+
<symbol id="icon-chevron-right" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
6
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
|
|
7
|
+
</symbol>
|
|
8
|
+
<symbol 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
|
+
</symbol>
|
|
11
|
+
<symbol 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
|
+
</symbol>
|
|
14
|
+
<symbol id="icon-exclamation-circle" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
15
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
16
|
+
</symbol>
|
|
17
|
+
<symbol 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
|
+
</symbol>
|
|
20
|
+
<symbol id="icon-menu" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
21
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
|
22
|
+
</symbol>
|
|
23
|
+
<symbol id="icon-moon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
24
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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
|
+
</symbol>
|
|
26
|
+
<symbol id="icon-sun" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
27
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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
|
+
</symbol>
|
|
29
|
+
<symbol id="icon-at-symbol" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
30
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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
|
+
</symbol>
|
|
32
|
+
</svg>
|
package/src/main.json
CHANGED
|
@@ -8,27 +8,29 @@
|
|
|
8
8
|
"css": {
|
|
9
9
|
"all": [
|
|
10
10
|
"/src/styles/main.css",
|
|
11
|
-
"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=block"
|
|
12
|
-
"/src/icons/iconfont.css"
|
|
11
|
+
"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=block"
|
|
13
12
|
],
|
|
14
|
-
"preload": "/src/styles/preload.css",
|
|
15
13
|
"tailwind": "/temp/tailwind.css",
|
|
16
|
-
"tailwind.src": "/src/styles/tailwind.css"
|
|
14
|
+
"tailwind.src": "/src/styles/tailwind.css",
|
|
15
|
+
"ratio": "/temp/ratio.css"
|
|
17
16
|
},
|
|
18
17
|
"js": {
|
|
19
18
|
"importmap": "/public/importmap.json",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"lazysizes": "https://cdn.jsdelivr.net/npm/lazysizes@5.2.2/lazysizes.min.js"
|
|
19
|
+
"main": "/src/scripts/main.js",
|
|
20
|
+
"lazysizes": "https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js"
|
|
23
21
|
}
|
|
24
22
|
},
|
|
25
23
|
"layout": {
|
|
26
24
|
"template": "Layout/Main.twig",
|
|
27
|
-
"cookies":
|
|
25
|
+
"cookies": false,
|
|
28
26
|
"nav": [
|
|
29
27
|
{
|
|
30
|
-
"name": "
|
|
28
|
+
"name": "Home",
|
|
31
29
|
"url": "/"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "Documentation",
|
|
33
|
+
"url": "/ui"
|
|
32
34
|
}
|
|
33
35
|
]
|
|
34
36
|
},
|
|
@@ -47,4 +49,4 @@
|
|
|
47
49
|
"8x5": "data:image/gif;base64,R0lGODlhCAAFAIAAAP///wAAACwAAAAACAAFAAACBYSPqctYADs=",
|
|
48
50
|
"3x2": "data:image/gif;base64,R0lGODlhAwACAIAAAP///wAAACwAAAAAAwACAAACAoRfADs="
|
|
49
51
|
}
|
|
50
|
-
}
|
|
52
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './CookieConsent.js'
|
|
2
|
-
import './Form.js'
|
|
1
|
+
import './CookieConsent.js'
|
|
2
|
+
import './Form.js'
|
|
@@ -1,80 +1,82 @@
|
|
|
1
|
-
import {LibStimulus, Controller} from
|
|
2
|
-
import LibCookieConsent from
|
|
1
|
+
import { LibStimulus, Controller } from '../Libraries/Stimulus.js'
|
|
2
|
+
import LibCookieConsent from '../Libraries/CookieConsent.js'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
LibStimulus.register("c-cookieconsent", class extends Controller {
|
|
4
|
+
LibStimulus.register('c-cookieconsent', class extends Controller {
|
|
7
5
|
connect() {
|
|
8
|
-
const selector = this.element
|
|
6
|
+
const selector = this.element
|
|
7
|
+
|
|
8
|
+
if (document.querySelector('.c-form-cookieconsent') !== null) {
|
|
9
|
+
return
|
|
10
|
+
}
|
|
9
11
|
|
|
10
|
-
if (localStorage.getItem('cookieconsent') === null) {
|
|
12
|
+
if (localStorage.getItem('lib-cookieconsent') === null || parseInt(localStorage.getItem('lib-cookieconsent-expire')) < Date.now()) {
|
|
11
13
|
setTimeout(() => {
|
|
12
|
-
selector._addDataValue(
|
|
13
|
-
selector.classList.add(
|
|
14
|
-
},1500)
|
|
14
|
+
selector._addDataValue('state', 'active')
|
|
15
|
+
selector.classList.add('is-animate')
|
|
16
|
+
}, 1500)
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
selector.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
selector.remove();
|
|
38
|
-
},500);
|
|
39
|
-
});
|
|
19
|
+
selector._hasDataValue('type', 'closable') &&
|
|
20
|
+
selector.addEventListener('click', e => {
|
|
21
|
+
if (e.target.closest('.c-cookieconsent > .wrp') === null) {
|
|
22
|
+
this.hide([])
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
selector.querySelector('[data-lib-cookieconsent-approve]').addEventListener('click', () => {
|
|
27
|
+
this.hide(['performance', 'marketing'])
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
hide(type) {
|
|
32
|
+
LibCookieConsent.set(type)
|
|
33
|
+
this.element.classList.remove('is-animate')
|
|
34
|
+
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
this.element._removeDataValue('state', 'active')
|
|
37
|
+
this.element.remove()
|
|
38
|
+
}, 500)
|
|
40
39
|
}
|
|
41
|
-
})
|
|
40
|
+
})
|
|
42
41
|
|
|
43
|
-
LibStimulus.register(
|
|
42
|
+
LibStimulus.register('c-form-cookieconsent', class extends Controller {
|
|
44
43
|
connect() {
|
|
45
|
-
const selector = this.element
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
const selector = this.element
|
|
45
|
+
const type = localStorage.getItem('lib-cookieconsent')
|
|
46
|
+
|
|
47
|
+
document.querySelector('.c-cookieconsent').classList.remove('is-animate')
|
|
48
|
+
document.querySelector('.c-cookieconsent')._removeDataValue('state', 'active')
|
|
49
|
+
|
|
50
|
+
if (type !== null) {
|
|
51
|
+
this.element.querySelectorAll('input:not([disabled])').forEach(input => {
|
|
52
|
+
input.checked = false
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
JSON.parse(type).forEach(type => {
|
|
56
|
+
if (selector.querySelector(`input[value="${type}"]`) !== null) {
|
|
57
|
+
selector.querySelector(`input[value="${type}"]`).checked = true
|
|
58
58
|
}
|
|
59
|
-
}
|
|
60
|
-
selector.querySelector(`input[value="decline"]`).checked = true;
|
|
61
|
-
}
|
|
59
|
+
})
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
selector.addEventListener(
|
|
65
|
-
e.preventDefault()
|
|
62
|
+
selector.addEventListener('submit', e => {
|
|
63
|
+
e.preventDefault()
|
|
66
64
|
|
|
67
|
-
|
|
65
|
+
const type = []
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
} else if (value === "decline") {
|
|
76
|
-
LibCookieConsent.set("decline", () => location.reload());
|
|
77
|
-
}
|
|
67
|
+
this.element.querySelectorAll('input:not([disabled])').forEach(input => {
|
|
68
|
+
input.checked && type.push(input.value)
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
LibCookieConsent.set(type)
|
|
72
|
+
location.reload()
|
|
78
73
|
})
|
|
79
74
|
}
|
|
80
|
-
|
|
75
|
+
|
|
76
|
+
disconnect() {
|
|
77
|
+
if (localStorage.getItem('lib-cookieconsent') === null || parseInt(localStorage.getItem('lib-cookieconsent-expire')) < Date.now()) {
|
|
78
|
+
document.querySelector('.c-cookieconsent')._addDataValue('state', 'active')
|
|
79
|
+
document.querySelector('.c-cookieconsent').classList.add('is-animate')
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
})
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import {LibStimulus, Controller} from
|
|
1
|
+
import { LibStimulus, Controller, getController } from '../Libraries/Stimulus.js'
|
|
2
2
|
|
|
3
|
-
LibStimulus.register(
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
LibStimulus.register('c-form', class extends Controller {
|
|
4
|
+
validate(element, e) {
|
|
5
|
+
if (element.reportValidity() === false) {
|
|
6
|
+
e.preventDefault()
|
|
7
|
+
e.stopPropagation()
|
|
8
|
+
}
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
element.
|
|
9
|
-
|
|
10
|
-
if (element.reportValidity() === false) {
|
|
11
|
-
event.preventDefault();
|
|
12
|
-
event.stopPropagation();
|
|
13
|
-
}
|
|
10
|
+
element.querySelectorAll('.ui-input').forEach(element => {
|
|
11
|
+
getController(element, 'ui-input').validate(element, true)
|
|
12
|
+
})
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
14
|
+
element.querySelectorAll('.ui-select:not([data-state*="active"]) select[required]').forEach(select => {
|
|
15
|
+
getController(select.parentNode, 'ui-select').validate(select.parentNode, select)
|
|
16
|
+
})
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
element.querySelectorAll('[data-controller="ui-checkbox"] input:not([type="hidden"])').forEach(input => {
|
|
19
|
+
input.parentNode._removeDataValue('state', 'valid invalid')
|
|
20
|
+
|
|
21
|
+
if (input.checkValidity()) {
|
|
22
|
+
input.parentNode._addDataValue('state', 'valid')
|
|
23
|
+
} else {
|
|
24
|
+
input.parentNode._addDataValue('state', 'invalid')
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
connect() {
|
|
30
|
+
this.element.setAttribute('novalidate', '')
|
|
31
|
+
this.element.addEventListener('submit', e => this.validate(this.element, e))
|
|
25
32
|
}
|
|
26
|
-
})
|
|
33
|
+
})
|
package/src/scripts/Layout/+.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './Header.js'
|
|
2
|
+
import './Main.js'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LibStimulus, Controller, getController } from '../Libraries/Stimulus.js'
|
|
2
|
+
|
|
3
|
+
LibStimulus.register('l-header', class extends Controller {
|
|
4
|
+
connect() {
|
|
5
|
+
if (document.querySelector('#l-nav') === null) {
|
|
6
|
+
this.element.insertAdjacentHTML('afterend', '<div id="l-nav" class="lib-drawer" data-lib-drawer-target="nav" data-action="scroll->lib-drawer#scroll"><div class="wrp_nav"><div class="wrp_nav_head"></div><div class="wrp_nav_body"></div></div></div>')
|
|
7
|
+
|
|
8
|
+
getController(document.body, 'lib-drawer').init()
|
|
9
|
+
|
|
10
|
+
const layoutNav = document.querySelector('#l-nav')
|
|
11
|
+
const logo = this.element.querySelector('.elm_header_logo').outerHTML
|
|
12
|
+
const nav = this.element.querySelector('.elm_header_nav').outerHTML
|
|
13
|
+
|
|
14
|
+
layoutNav.querySelector('.wrp_nav_head').insertAdjacentHTML('beforeend', logo)
|
|
15
|
+
layoutNav.querySelector('.wrp_nav_body').insertAdjacentHTML('beforeend', nav)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
})
|