@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.
Files changed (109) hide show
  1. package/README.md +6 -10
  2. package/gulpfile.js +17 -168
  3. package/package.json +13 -8
  4. package/src/emails/email.css +3 -3
  5. package/src/emails/email.twig +1 -1
  6. package/src/icons.svg +32 -0
  7. package/src/main.json +12 -10
  8. package/src/scripts/Components/+.js +2 -2
  9. package/src/scripts/Components/CookieConsent.js +66 -64
  10. package/src/scripts/Components/Form.js +28 -21
  11. package/src/scripts/Layout/+.js +2 -1
  12. package/src/scripts/Layout/Header.js +18 -0
  13. package/src/scripts/Layout/Main.js +49 -45
  14. package/src/scripts/Libraries/+.js +12 -10
  15. package/src/scripts/Libraries/Anchor.js +18 -43
  16. package/src/scripts/Libraries/CookieConsent.js +37 -58
  17. package/src/scripts/Libraries/Dialog.js +56 -55
  18. package/src/scripts/Libraries/Drawer.js +23 -23
  19. package/src/scripts/Libraries/NativeSlider.js +86 -86
  20. package/src/scripts/Libraries/ReCaptcha.js +20 -18
  21. package/src/scripts/Libraries/Ripple.js +16 -32
  22. package/src/scripts/Libraries/Stimulus.js +30 -34
  23. package/src/scripts/Libraries/Swup.js +47 -50
  24. package/src/scripts/Libraries/Tabs.js +12 -18
  25. package/src/scripts/Libraries/Tippy.js +118 -0
  26. package/src/scripts/Ui/+.js +5 -3
  27. package/src/scripts/Ui/Checkbox.js +19 -0
  28. package/src/scripts/Ui/Input.js +188 -161
  29. package/src/scripts/Ui/Radio.js +23 -0
  30. package/src/scripts/Ui/Select.js +64 -37
  31. package/src/scripts/Ui/Text.js +25 -0
  32. package/src/scripts/Utils/Functions/+.js +6 -6
  33. package/src/scripts/Utils/Functions/dataValue.js +28 -25
  34. package/src/scripts/Utils/Functions/importScript.js +9 -11
  35. package/src/scripts/Utils/Functions/importStyle.js +18 -5
  36. package/src/scripts/Utils/Functions/inView.js +19 -21
  37. package/src/scripts/Utils/Functions/loadStimulus.js +22 -20
  38. package/src/scripts/Utils/cdn.js +6 -4
  39. package/src/scripts/Utils/global.js +10 -33
  40. package/src/scripts/main.js +6 -6
  41. package/src/styles/Components/CookieConsent.css +40 -179
  42. package/src/styles/Components/Dialog/Default.css +12 -15
  43. package/src/styles/Components/Form/CookieConsent.css +7 -12
  44. package/src/styles/Layout/+.css +2 -0
  45. package/src/{templates/Sections/.gitkeep → styles/Layout/Header.css} +0 -0
  46. package/src/styles/Layout/Main.css +28 -63
  47. package/src/styles/Layout/Nav.css +43 -0
  48. package/src/styles/Libraries/+.css +1 -1
  49. package/src/styles/Libraries/Datepicker.css +85 -39
  50. package/src/styles/Libraries/Dialog.css +6 -5
  51. package/src/styles/Libraries/Drawer.css +15 -14
  52. package/src/styles/Libraries/Hint.css +29 -23
  53. package/src/styles/Libraries/Lazysizes.css +2 -1
  54. package/src/styles/Libraries/NativeSlider.css +18 -17
  55. package/src/styles/Libraries/Ripple.css +8 -5
  56. package/src/styles/Libraries/Tabs.css +4 -4
  57. package/src/styles/Libraries/Tippy.css +87 -0
  58. package/src/styles/Ui/+.css +5 -1
  59. package/src/styles/Ui/Badge.css +33 -19
  60. package/src/styles/Ui/Btn.css +80 -53
  61. package/src/styles/Ui/Checkbox.css +80 -41
  62. package/src/styles/Ui/Dropdown.css +5 -0
  63. package/src/styles/Ui/Heading.css +12 -12
  64. package/src/styles/Ui/Icon.css +27 -8
  65. package/src/styles/Ui/Image.css +23 -0
  66. package/src/styles/Ui/Input.css +295 -220
  67. package/src/styles/Ui/Label.css +14 -0
  68. package/src/styles/Ui/Link.css +3 -3
  69. package/src/styles/Ui/Notice.css +14 -16
  70. package/src/styles/Ui/Progress.css +10 -21
  71. package/src/styles/Ui/Radio.css +3 -8
  72. package/src/styles/Ui/Select.css +63 -112
  73. package/src/styles/Ui/Switch.css +70 -0
  74. package/src/styles/Ui/{Wsw.css → Text.css} +61 -80
  75. package/src/styles/Ui/Title.css +8 -4
  76. package/src/styles/Utils/default.css +75 -67
  77. package/src/styles/Utils/icons.css +9 -0
  78. package/src/styles/Utils/keyframes.css +182 -0
  79. package/src/styles/Utils/normalize.css +223 -0
  80. package/src/styles/Utils/print.css +1 -1
  81. package/src/styles/Utils/tailwind/base.css +15 -0
  82. package/src/styles/Utils/tailwind/gutters.css +264 -263
  83. package/src/styles/Utils/theme/main.css +24 -21
  84. package/src/styles/Utils/vars.css +58 -35
  85. package/src/styles/Utils/vendor.css +1 -2
  86. package/src/styles/main.css +6 -3
  87. package/src/styles/tailwind.css +1 -4
  88. package/src/templates/Components/CookieConsent.twig +30 -0
  89. package/src/templates/Components/Dialogs/Basic.twig +7 -3
  90. package/src/templates/Layout/Header.twig +42 -0
  91. package/src/templates/Layout/Main.twig +52 -67
  92. package/src/templates/Sections/Gdpr.twig +64 -0
  93. package/src/templates/Sections/Ui.twig +2104 -0
  94. package/src/templates/dialog-basic.twig +2 -2
  95. package/src/templates/gdpr.json +11 -0
  96. package/src/templates/index.json +8 -2
  97. package/src/templates/json-tippy.twig +16 -0
  98. package/src/templates/ui.json +11 -0
  99. package/CHANGELOG +0 -231
  100. package/src/icons/iconfont.css +0 -171
  101. package/src/icons/selection.json +0 -1
  102. package/src/icons/variables.css +0 -31
  103. package/src/scripts/Ui/Wsw.js +0 -25
  104. package/src/scripts/Utils/Functions/bodyLoaded.js +0 -12
  105. package/src/styles/Libraries/Animate.css +0 -184
  106. package/src/styles/Utils/reference.css +0 -2
  107. package/src/styles/Utils/tailwind/content.css +0 -24
  108. package/src/styles/Utils/theme/vars.css +0 -19
  109. package/src/styles/preload.css +0 -29
@@ -1,210 +1,71 @@
1
1
  .c-cookieconsent {
2
2
  position: fixed;
3
+ inset: 0;
3
4
  display: none;
4
- z-index: 1;
5
- color: rgb(var(--color-invert));
6
- left: 1rem;
7
- bottom: 1rem;
8
- background-color: rgb(var(--color-default));
9
- padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
10
-
11
- @media (--media-400) {
12
- display: block;
13
- transform: translateY(100%);
14
-
15
- &.is-animate {
16
- &:before {
17
- transform: translateX(-50%) translateY(0);
18
- }
19
- }
20
-
21
- &.is-mobile-show {
22
- &:before {
23
- transform: translateY(125%) translateX(-50%);
24
- opacity: 0;
25
- z-index: -2;
26
- }
27
- }
28
-
29
- &.is-background-light {
30
- &:after {
31
- background-color: rgb(var(--color-background));
32
- }
33
- }
34
-
35
- &:after {
36
- position: absolute;
37
- inset: 0;
38
- background-color: rgb(var(--color-default));
39
- content: "";
40
- z-index: -1;
41
- }
42
-
43
- &:before {
44
- color: rgb(var(--color-invert));
45
- font-size: 0.875rem;
46
- height: 2.625rem;
47
- display: block;
48
- position: absolute;
49
- background-color: rgb(var(--color-default));
50
- left: 50%;
51
- bottom: 100%;
52
- content: attr(data-title);
53
- line-height: 2.625rem;
54
- padding: 0 1.5rem;
55
- transform: translateY(125%) translateX(-50%);
56
- white-space: nowrap;
57
- cursor: pointer;
58
- transition: var(--transition-opacity), var(--transition-transform);
59
- margin-bottom: calc(0.625rem + env(safe-area-inset-bottom));
60
- border-radius: var(--radius);
61
- }
5
+ z-index: var(--z-50);
6
+ background-color: rgb(var(--color-dark) / 0.75);
7
+ justify-content: center;
8
+ align-items: center;
9
+ flex-direction: column;
10
+
11
+ @media print {
12
+ display: none !important;
62
13
  }
63
14
 
64
- &.is-background-light {
65
- color: rgb(var(--color-default));
66
- background-color: rgb(var(--color-background));
67
- box-shadow: 0 1px 3px 0 rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
68
- }
69
-
70
- @media (--media-min-960) {
71
- width: 40rem;
15
+ &:not(.is-animate) {
16
+ animation: 0.5s ease 0s forwards 1 fade-out;
72
17
  }
73
18
 
74
- @media (--media-only-768) {
75
- left: 50%;
76
- width: 40rem;
77
- margin-left: -20rem;
78
- bottom: 0;
19
+ &.is-animate {
20
+ animation: 0.5s ease 0s backwards 1 fade-in;
79
21
  }
80
22
 
81
- @media (--media-400) {
82
- left: 0;
83
- right: 0;
84
- bottom: 0;
23
+ &:--state-active {
24
+ display: flex;
85
25
  }
86
26
 
87
- &:not(.is-animate) {
88
- @media (--media-min-768) {
89
- animation: 0.5s ease 0s forwards 1 slideOutDown;
90
- }
27
+ & .wrp {
28
+ max-width: 32rem;
29
+ width: calc(100% - 2rem);
30
+ border-radius: var(--radius);
31
+ padding: 2rem;
91
32
 
92
- @media (--media-min-960) {
93
- animation: 0.5s ease 0s forwards 1 fadeOutLeft;
94
- }
33
+ @nest :--type-center& {
34
+ max-width: 26rem;
35
+ text-align: center;
95
36
 
96
- @media (--media-400) {
97
- &.is-mobile-show {
98
- animation: 0.5s ease 0s forwards 1 slideOutDown;
37
+ & .ui-image {
38
+ margin-left: auto;
39
+ margin-right: auto;
99
40
  }
100
41
  }
101
- }
102
-
103
- &.is-animate {
104
- @media (--media-min-768) {
105
- animation: 0.5s ease 0s backwards 1 slideInUp;
106
- }
107
42
 
108
- @media (--media-min-960) {
109
- animation: 0.5s ease 0s backwards 1 fadeInLeft;
110
- }
43
+ & .wrp_c_head {
44
+ margin-bottom: 1rem;
111
45
 
112
- @media (--media-400) {
113
- &.is-mobile-show {
114
- animation: 0.5s ease 0s forwards 1 slideInUp;
46
+ @media (--media-t) {
47
+ margin-bottom: 1.5rem;
115
48
  }
116
49
  }
117
- }
118
50
 
119
- &[data-state="active"] {
120
- display: block;
121
-
122
- @media (--media-400) {
123
- max-width: 100%;
51
+ & .wrp_c_body {
52
+ & .ui-text {
53
+ --ui-text-size: 0.875rem;
54
+ }
124
55
  }
125
- }
126
56
 
127
- & .wrp {
128
- & .wrp_c_options {
57
+ & .wrp_c_foot {
129
58
  display: flex;
130
- margin-top: 1.5rem;
131
59
  align-items: center;
60
+ margin-top: 1.5rem;
132
61
 
133
- @media (--media-400) {
134
- justify-content: center;
135
- flex-wrap: wrap;
136
- flex-direction: column;
62
+ @media (--media-t) {
63
+ margin-top: 2rem;
137
64
  }
138
65
 
139
66
  & .ui-link {
140
- margin-right: 1rem;
141
-
142
- @media (--media-400) {
143
- margin: 0 1rem 1rem;
144
- }
145
-
146
- & span {
147
- display: block;
148
-
149
- @media (--media-min-768) {
150
- font-size: 0.75rem;
151
- }
152
-
153
- &:before {
154
- border-color: rgb(var(--color-invert));
155
-
156
- @nest .is-background-light& {
157
- border-color: rgb(var(--color-default));
158
- }
159
- }
160
- }
67
+ font-weight: var(--font-normal);
161
68
  }
162
-
163
- & .ui-btn {
164
-
165
- @media (--media-min-768) {
166
- margin-left: auto;
167
- padding: 0.625rem 0.75rem;
168
- }
169
-
170
- @media (--media-400) {
171
- margin-top: 0.375rem;
172
- }
173
-
174
- &[data-lib-cookieconsent-approve] {
175
- color: rgb(var(--color-success));
176
- }
177
-
178
- & span {
179
- &:not(.icon-l) {
180
- @media (--media-min-768) {
181
- font-size: 0.75rem;
182
- }
183
- }
184
-
185
- &.icon-l {
186
- &:before {
187
- font-size: 1rem;
188
- }
189
- }
190
- }
191
- }
192
- }
193
- }
194
-
195
- & p {
196
- margin: 0;
197
- font-size: 0.875rem;
198
-
199
- @media (--media-min-768) {
200
- font-size: 0.75rem;
201
- line-height: 2;
202
- padding-right: 1rem;
203
- }
204
-
205
- @media (--media-400) {
206
- line-height: 1.75;
207
- text-align: center;
208
69
  }
209
70
  }
210
- }
71
+ }
@@ -2,7 +2,8 @@
2
2
  --c-dialog-py: 1rem;
3
3
  --c-dialog-px: 1.5rem;
4
4
  --c-dialog-offset-y: 2rem;
5
- animation: 0.3s ease 0s backwards 1 fadeInDown;
5
+
6
+ animation: 0.3s ease 0s backwards 1 fade-in-down;
6
7
  position: relative;
7
8
  z-index: var(--z-30);
8
9
  display: flex;
@@ -16,31 +17,32 @@
16
17
  border-bottom: var(--c-dialog-offset-y) solid transparent;
17
18
  width: calc(100% - 2rem);
18
19
 
19
- @nest [data-state*="hiding"] & {
20
- animation: 0.3s ease 0s forwards 1 fadeOutUp;
20
+ @nest :--state-hiding & {
21
+ animation: 0.3s ease 0s forwards 1 fade-out-up;
21
22
  }
22
23
 
23
- @media (--media-min-768) {
24
+ @media (--media-t) {
24
25
  --c-dialog-offset-y: 4rem;
26
+
25
27
  width: 100%;
26
28
  min-width: 18.75rem;
27
29
  max-width: 40rem;
28
30
  }
29
31
 
30
- &[data-size="sm"] {
32
+ &:--size-sm {
31
33
  max-width: 31.25rem;
32
34
  }
33
35
 
34
- &[data-size="base"] {
36
+ &:--size-base {
35
37
  max-width: none;
36
38
  width: auto;
37
39
  }
38
40
 
39
- &[data-size="lg"] {
41
+ &:--size-lg {
40
42
  max-width: 80rem;
41
43
  }
42
44
 
43
- &[data-type="scrollable"] {
45
+ &:--type-scrollable {
44
46
  height: 100%;
45
47
 
46
48
  & .wrp_dialog_body {
@@ -63,7 +65,7 @@
63
65
  flex-direction: column;
64
66
  max-height: 100%;
65
67
 
66
- @media (--media-min-768) {
68
+ @media (--media-t) {
67
69
  --c-dialog-py: 1.25rem;
68
70
  }
69
71
  }
@@ -72,10 +74,5 @@
72
74
  position: absolute;
73
75
  right: 1rem;
74
76
  top: 1rem;
75
- transition: var(--transition-opacity);
76
-
77
- &:hover {
78
- opacity: 0.8;
79
- }
80
77
  }
81
- }
78
+ }
@@ -1,20 +1,15 @@
1
1
  .c-form-cookieconsent {
2
2
  & .wrp_form_head {
3
- margin-bottom: 1.5rem;
4
-
5
- & .ui-heading {
6
- & span {
7
- font-size: 1.5rem;
8
- }
9
- }
3
+ margin-bottom: 1rem;
10
4
  }
11
5
 
12
6
  & .wrp_form_body {
13
7
  display: flex;
14
8
  flex-direction: row;
15
- margin: 1.5rem 0 1.75rem;
9
+ margin: 0 0 1.75rem;
10
+ line-height: 1.5;
16
11
 
17
- @media (--media-400) {
12
+ @media (--media-m) {
18
13
  flex-direction: column;
19
14
  }
20
15
 
@@ -22,7 +17,7 @@
22
17
  &:not(:last-of-type) {
23
18
  margin-right: 1rem;
24
19
 
25
- @media (--media-400) {
20
+ @media (--media-m) {
26
21
  margin-right: auto;
27
22
  margin-bottom: 0.75rem;
28
23
  }
@@ -31,6 +26,6 @@
31
26
  }
32
27
 
33
28
  & .wrp_form_foot {
34
- margin-top: 1rem;
29
+ margin-top: 2rem;
35
30
  }
36
- }
31
+ }
@@ -1 +1,3 @@
1
+ @import "Header.css";
1
2
  @import "Main.css";
3
+ @import "Nav.css";
@@ -1,6 +1,8 @@
1
1
  html {
2
2
  font-family: sans-serif;
3
- scroll-padding-top: 0;
3
+ scroll-padding-top: var(--l-scroll-padding-top, 0);
4
+ scroll-behavior: smooth;
5
+ accent-color: rgb(var(--color-accent));
4
6
 
5
7
  @media (--media-min-400) {
6
8
  font-size: 95%;
@@ -22,47 +24,8 @@ html {
22
24
  font-size: 90%;
23
25
  }
24
26
 
25
- &.is-lib-drawer-active {
26
- overflow: hidden;
27
- }
28
-
29
- &.no-js {
30
- & .l-default {
31
- opacity: 1;
32
- }
33
-
34
- & .l-spinner {
35
- display: none;
36
- }
37
- }
38
-
39
- &[class*="wf-"] {
40
- & body {
41
- & .l-default {
42
- transition: var(--transition-opacity);
43
- }
44
-
45
- &:not(.is-body-preload) {
46
- & .l-default {
47
- opacity: 1;
48
- }
49
-
50
- & .l-spinner {
51
- opacity: 0;
52
- transition: var(--transition-opacity)
53
- }
54
- }
55
-
56
- &.is-body-loaded {
57
- & .l-spinner {
58
- display: none;
59
- }
60
- }
61
- }
62
- }
63
-
64
27
  &.no-touch, &.no-touch * {
65
- scrollbar-color: rgba(var(--color-default),0.2) rgb(var(--color-background));
28
+ scrollbar-color: rgb(var(--color-current) / 0.2) rgb(var(--color-background));
66
29
  scrollbar-width: thin;
67
30
 
68
31
  &::-webkit-scrollbar {
@@ -74,36 +37,43 @@ html {
74
37
  }
75
38
 
76
39
  &::-webkit-scrollbar-thumb {
77
- background-color: rgba(var(--color-default),0.2);
40
+ background-color: rgb(var(--color-current) / 0.2);
78
41
  }
79
42
  }
80
43
  }
81
44
 
82
45
  body {
83
46
  font-family: var(--font-primary);
84
- color: rgb(var(--color-default));
47
+ color: rgb(var(--color-current));
85
48
  font-weight: var(--font-normal);
86
49
  line-height: 1.5;
87
50
  position: relative;
88
51
  background-color: rgb(var(--color-background));
89
52
  cursor: default;
90
53
 
54
+ &::before {
55
+ position: fixed;
56
+ inset: 0;
57
+ content: "";
58
+ background-color: rgb(var(--color-dark) / 0.6);
59
+ z-index: var(--z-30);
60
+ transition: var(--transition-opacity);
61
+ opacity: 0;
62
+ pointer-events: none;
63
+
64
+ @nest .m\:is-body-overlay & {
65
+ @media (--media-m) {
66
+ pointer-events: auto;
67
+ opacity: 1;
68
+ }
69
+ }
70
+ }
71
+
91
72
  & .l-default {
92
- overflow: visible !important;
93
73
  min-height: 100vh;
94
74
  display: flex;
95
75
  flex-direction: column;
96
76
  }
97
-
98
- & a {
99
- color: inherit;
100
- text-decoration: none;
101
-
102
- &:active,
103
- &:hover {
104
- outline-width: 0;
105
- }
106
- }
107
77
  }
108
78
 
109
79
  #l-main {
@@ -113,14 +83,9 @@ body {
113
83
  flex-direction: column;
114
84
 
115
85
  &.transition-fade {
116
- @nest html.swup-enabled body.is-body-loaded & {
117
- /* clean-css ignore:start */
118
- transition: opacity .2s;
119
- /* clean-css ignore:end */
120
- }
121
-
122
86
  @nest html.swup-enabled & {
123
87
  /* clean-css ignore:start */
88
+ transition: opacity 0.15s;
124
89
  opacity: 1;
125
90
  /* clean-css ignore:end */
126
91
  }
@@ -136,11 +101,11 @@ body {
136
101
  .container {
137
102
  margin-left: auto;
138
103
  margin-right: auto;
139
- max-width: var(--container);
104
+ max-width: var(--container-width);
140
105
  padding-left: var(--container-padding);
141
106
  padding-right: var(--container-padding);
142
107
 
143
- &[data-size="sm"] {
144
- --container: var(--container-sm);
108
+ &:--size-sm {
109
+ --container: var(--container-width-sm);
145
110
  }
146
111
  }
@@ -0,0 +1,43 @@
1
+ #l-nav {
2
+ & > .wrp_nav {
3
+ min-width: 22.5rem;
4
+ background-color: rgb(var(--color-background));
5
+ height: 100vh;
6
+
7
+ @nest .is-transition& {
8
+ transition: var(--transition-transform);
9
+ }
10
+ }
11
+
12
+ & .wrp_nav_head {
13
+ padding: 2rem 3rem;
14
+
15
+ & .elm_header_logo {
16
+ font-size: 1.875rem;
17
+
18
+ & .icon {
19
+ &, &::before {
20
+ display: block;
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ & .wrp_nav_body {
27
+ & .elm_header_nav {
28
+ display: block;
29
+ }
30
+
31
+ & .col {
32
+ margin: 0.75rem 0;
33
+ }
34
+
35
+ & a {
36
+ font-size: 1.5rem;
37
+ padding: 0 3rem;
38
+ font-weight: var(--font-medium);
39
+ text-align: left;
40
+ display: block;
41
+ }
42
+ }
43
+ }
@@ -1,4 +1,3 @@
1
- @import "Animate.css";
2
1
  @import "Datepicker.css";
3
2
  @import "Dialog.css";
4
3
  @import "Drawer.css";
@@ -7,3 +6,4 @@
7
6
  @import "NativeSlider.css";
8
7
  @import "Ripple.css";
9
8
  @import "Tabs.css";
9
+ @import "Tippy.css";