@newlogic-digital/ui 3.0.1 → 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 (113) hide show
  1. package/README.md +8 -12
  2. package/gulpfile.js +16 -168
  3. package/package.json +13 -8
  4. package/src/emails/email.css +15 -9
  5. package/src/emails/email.twig +7 -7
  6. package/src/icons.svg +32 -0
  7. package/src/main.json +14 -27
  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/Components/Item/+.css +1 -0
  45. package/src/styles/Layout/+.css +2 -0
  46. package/src/{templates/Components/Dialogs/.gitkeep → styles/Layout/Header.css} +0 -0
  47. package/src/styles/Layout/Main.css +28 -63
  48. package/src/styles/Layout/Nav.css +43 -0
  49. package/src/styles/Libraries/+.css +1 -1
  50. package/src/styles/Libraries/Datepicker.css +85 -39
  51. package/src/styles/Libraries/Dialog.css +6 -5
  52. package/src/styles/Libraries/Drawer.css +15 -15
  53. package/src/styles/Libraries/Hint.css +29 -23
  54. package/src/styles/Libraries/Lazysizes.css +2 -1
  55. package/src/styles/Libraries/NativeSlider.css +19 -18
  56. package/src/styles/Libraries/Ripple.css +8 -5
  57. package/src/styles/Libraries/Tabs.css +4 -4
  58. package/src/styles/Libraries/Tippy.css +87 -0
  59. package/src/styles/Sections/+.css +1 -0
  60. package/src/styles/Ui/+.css +5 -1
  61. package/src/styles/Ui/Badge.css +33 -19
  62. package/src/styles/Ui/Btn.css +80 -53
  63. package/src/styles/Ui/Checkbox.css +80 -41
  64. package/src/styles/Ui/Dropdown.css +5 -0
  65. package/src/styles/Ui/Heading.css +12 -12
  66. package/src/styles/Ui/Icon.css +27 -8
  67. package/src/styles/Ui/Image.css +23 -0
  68. package/src/styles/Ui/Input.css +295 -220
  69. package/src/styles/Ui/Label.css +14 -0
  70. package/src/styles/Ui/Link.css +3 -3
  71. package/src/styles/Ui/Notice.css +14 -16
  72. package/src/styles/Ui/Progress.css +10 -21
  73. package/src/styles/Ui/Radio.css +3 -8
  74. package/src/styles/Ui/Select.css +63 -112
  75. package/src/styles/Ui/Switch.css +70 -0
  76. package/src/styles/Ui/{Wsw.css → Text.css} +61 -80
  77. package/src/styles/Ui/Title.css +8 -4
  78. package/src/styles/Utils/default.css +75 -67
  79. package/src/styles/Utils/icons.css +9 -0
  80. package/src/styles/Utils/keyframes.css +182 -0
  81. package/src/styles/Utils/normalize.css +223 -0
  82. package/src/styles/Utils/print.css +1 -0
  83. package/src/styles/Utils/tailwind/base.css +15 -0
  84. package/src/styles/Utils/tailwind/gutters.css +264 -263
  85. package/src/styles/Utils/theme/main.css +24 -21
  86. package/src/styles/Utils/vars.css +58 -35
  87. package/src/styles/Utils/vendor.css +1 -2
  88. package/src/styles/main.css +6 -3
  89. package/src/styles/tailwind.css +1 -4
  90. package/src/templates/Components/CookieConsent.twig +30 -0
  91. package/src/templates/Components/Dialogs/Basic.twig +7 -3
  92. package/src/templates/Layout/Header.twig +42 -0
  93. package/src/templates/Layout/Main.twig +47 -64
  94. package/src/templates/Sections/Gdpr.twig +64 -0
  95. package/src/templates/Sections/Ui.twig +2104 -0
  96. package/src/templates/dialog-basic.twig +2 -2
  97. package/src/templates/gdpr.json +11 -0
  98. package/src/templates/index.json +8 -2
  99. package/src/templates/json-tippy.twig +16 -0
  100. package/src/templates/ui.json +11 -0
  101. package/CHANGELOG +0 -231
  102. package/src/icons/selection.json +0 -1
  103. package/src/icons/style.css +0 -171
  104. package/src/icons/variables.css +0 -31
  105. package/src/scripts/Ui/Wsw.js +0 -25
  106. package/src/scripts/Utils/Functions/bodyLoaded.js +0 -12
  107. package/src/styles/Libraries/Animate.css +0 -184
  108. package/src/styles/Utils/reference.css +0 -2
  109. package/src/styles/Utils/tailwind/content.css +0 -24
  110. package/src/styles/Utils/theme/vars.css +0 -19
  111. package/src/styles/preload.css +0 -29
  112. package/src/templates/Layout/Preload.twig +0 -21
  113. package/src/templates/Sections/.gitkeep +0 -0
@@ -1,7 +1,13 @@
1
1
  [class*="lib-hint-"] {
2
2
  --lib-hint-bg: var(--color-dark);
3
3
  --lib-hint-fg: var(--color-light);
4
+
4
5
  position: relative;
6
+ text-align: center;
7
+
8
+ @nest .dark & {
9
+ --lib-hint-bg: var(--color-background-200);
10
+ }
5
11
 
6
12
  &.lib-hint-light {
7
13
  --lib-hint-bg: var(--color-light);
@@ -24,7 +30,7 @@
24
30
  --lib-hint-bg: var(--color-success);
25
31
  }
26
32
 
27
- &:before, &:after {
33
+ &::before, &::after {
28
34
  position: absolute;
29
35
  visibility: hidden;
30
36
  opacity: 0;
@@ -35,15 +41,15 @@
35
41
  will-change: transform;
36
42
  backface-visibility: hidden;
37
43
 
38
- @nest :hover& {
44
+ @nest :is(:hover, :focus)& {
39
45
  visibility: visible;
40
46
  opacity: 1;
41
47
  transition-delay: 100ms;
42
48
  }
43
49
  }
44
50
 
45
- &:before {
46
- content: '';
51
+ &::before {
52
+ content: "";
47
53
  position: absolute;
48
54
  background-color: transparent;
49
55
  border: 0.375rem solid transparent;
@@ -66,7 +72,7 @@
66
72
  }
67
73
  }
68
74
 
69
- &:after {
75
+ &::after {
70
76
  border-radius: var(--radius);
71
77
  background-color: rgb(var(--lib-hint-bg));
72
78
  color: rgb(var(--lib-hint-fg));
@@ -75,17 +81,17 @@
75
81
  font-family: inherit;
76
82
  line-height: 0.875rem;
77
83
  white-space: nowrap;
78
- box-shadow: 0.25rem 0.25rem 0.5rem rgba(var(--lib-hint-bg), 0.15);
84
+ box-shadow: 0.25rem 0.25rem 0.5rem rgb(var(--lib-hint-bg) / 0.15);
79
85
 
80
86
  @nest .lib-hint-light& {
81
- box-shadow: 0.25rem 0.25rem 0.5rem rgba(var(--color-dark), 0.15);
87
+ box-shadow: 0.25rem 0.25rem 0.5rem rgb(var(--color-dark) / 0.15);
82
88
  }
83
89
 
84
90
  @nest [aria-label]& {
85
91
  content: attr(aria-label);
86
92
  }
87
93
 
88
- @nest .lib-hint-sm&, .lib-hint-md&, .lib-hint-lg& {
94
+ @nest :is(.lib-hint-sm, .lib-hint-md, .lib-hint-lg)& {
89
95
  white-space: normal;
90
96
  line-height: 1.5;
91
97
  word-wrap: break-word;
@@ -105,36 +111,36 @@
105
111
  }
106
112
 
107
113
  &.lib-hint-top {
108
- &:before, &:after {
114
+ &::before, &::after {
109
115
  bottom: 100%;
110
116
  left: 50%;
111
117
  }
112
118
 
113
- &:before {
119
+ &::before {
114
120
  left: calc(50% - 0.375rem);
115
121
  margin-bottom: -0.6875rem;
116
122
 
117
- @nest :hover& {
123
+ @nest :is(:hover, :focus)& {
118
124
  transform: translateY(-0.5rem);
119
125
  }
120
126
  }
121
127
 
122
- &:after {
128
+ &::after {
123
129
  transform: translateX(-50%);
124
130
 
125
- @nest :hover& {
131
+ @nest :is(:hover, :focus)& {
126
132
  transform: translateX(-50%) translateY(-0.5rem);
127
133
  }
128
134
  }
129
135
  }
130
136
 
131
137
  &.lib-hint-bottom {
132
- &:before, &:after {
138
+ &::before, &::after {
133
139
  top: 100%;
134
140
  left: 50%;
135
141
  }
136
142
 
137
- &:before {
143
+ &::before {
138
144
  left: calc(50% - 0.375rem);
139
145
  margin-top: -0.6875rem;
140
146
 
@@ -143,7 +149,7 @@
143
149
  }
144
150
  }
145
151
 
146
- &:after {
152
+ &::after {
147
153
  transform: translateX(-50%);
148
154
 
149
155
  @nest :hover& {
@@ -153,7 +159,7 @@
153
159
  }
154
160
 
155
161
  &.lib-hint-right {
156
- &:before, &:after {
162
+ &::before, &::after {
157
163
  left: 100%;
158
164
  bottom: 50%;
159
165
 
@@ -162,18 +168,18 @@
162
168
  }
163
169
  }
164
170
 
165
- &:before {
171
+ &::before {
166
172
  margin-left: -0.6875rem;
167
173
  margin-bottom: -0.375rem;
168
174
  }
169
175
 
170
- &:after {
176
+ &::after {
171
177
  margin-bottom: -1.1875rem;
172
178
  }
173
179
  }
174
180
 
175
181
  &.lib-hint-left {
176
- &:before, &:after {
182
+ &::before, &::after {
177
183
  right: 100%;
178
184
  bottom: 50%;
179
185
 
@@ -182,13 +188,13 @@
182
188
  }
183
189
  }
184
190
 
185
- &:before {
191
+ &::before {
186
192
  margin-right: -0.6875rem;
187
193
  margin-bottom: -0.375rem;
188
194
  }
189
195
 
190
- &:after {
196
+ &::after {
191
197
  margin-bottom: -1.1875rem;
192
198
  }
193
199
  }
194
- }
200
+ }
@@ -2,7 +2,8 @@
2
2
  .lazyloading {
3
3
  opacity: 0;
4
4
  }
5
+
5
6
  .lazyloaded {
6
7
  opacity: 1;
7
8
  transition: var(--transition-opacity);
8
- }
9
+ }
@@ -6,6 +6,20 @@
6
6
  scrollbar-width: none !important;
7
7
  -ms-overflow-style: none;
8
8
 
9
+ & > * {
10
+ flex: 0 0 auto;
11
+ scroll-snap-align: start;
12
+
13
+ @nest .is-fade& {
14
+ opacity: 0;
15
+ transition: var(--transition-opacity);
16
+
17
+ &[data-state="active"] {
18
+ opacity: 1;
19
+ }
20
+ }
21
+ }
22
+
9
23
  &::-webkit-scrollbar {
10
24
  display: none !important;
11
25
  }
@@ -16,36 +30,23 @@
16
30
  }
17
31
 
18
32
  &.is-grabbing {
19
- &, * {
33
+ &, & * {
20
34
  cursor: grabbing;
21
35
  }
36
+
22
37
  & a {
23
38
  pointer-events: none;
24
39
  }
25
40
  }
26
-
27
- & > div, & > picture {
28
- flex: 0 0 auto;
29
- scroll-snap-align: start;
30
-
31
- @nest .is-fade& {
32
- opacity: 0;
33
- transition: var(--transition-opacity);
34
-
35
- &[data-state="active"] {
36
- opacity: 1;
37
- }
38
- }
39
- }
40
41
  }
41
42
 
42
43
  [data-lib-ns-nav-item] {
43
44
  width: 0.75rem;
44
45
  height: 0.75rem;
45
- border: 0.125rem solid rgb(var(--color-default));
46
+ border: 0.125rem solid rgb(var(--color-current));
46
47
  border-radius: 50%;
47
48
 
48
49
  &[data-state*="active"] {
49
- background-color: rgb(var(--color-default));
50
+ background-color: rgb(var(--color-current));
50
51
  }
51
- }
52
+ }
@@ -1,15 +1,16 @@
1
- [data-lib-ripple] {
1
+ [data-action*="lib#ripple"] {
2
+ --lib-ripple-bg: rgb(var(--color-background));
3
+
2
4
  position: relative;
3
5
  user-select: none;
4
6
  }
5
7
 
6
- .lib-ripple-inner {
8
+ .lib-ripple {
7
9
  position: absolute;
8
- background: rgb(var(--color-background));
10
+ background: var(--lib-ripple-bg);
9
11
  border-radius: 50%;
10
12
  transform: scale(0);
11
13
  opacity: 0.4;
12
- animation-duration: 1s;
13
14
  pointer-events: none;
14
15
 
15
16
  @nest body > & {
@@ -22,5 +23,7 @@
22
23
 
23
24
  &.animation {
24
25
  animation-name: ripple;
26
+ animation-duration: 1s;
27
+ animation-fill-mode: both;
25
28
  }
26
- }
29
+ }
@@ -7,13 +7,13 @@
7
7
 
8
8
  & [data-lib-tabs-area] {
9
9
  & > [data-lib-tabs-item] {
10
- animation: 0.3s ease 0s backwards 1 fadeOut;
10
+ animation: 0.3s ease 0s backwards 1 fade-out;
11
11
  display: none;
12
12
 
13
- &[data-state="active"] {
14
- animation: 0.3s ease 0s backwards 1 fadeIn;
13
+ &:--state-active {
14
+ animation: 0.3s ease 0s backwards 1 fade-in;
15
15
  display: block;
16
16
  }
17
17
  }
18
18
  }
19
- }
19
+ }
@@ -0,0 +1,87 @@
1
+ .tippy-content {
2
+ padding: 0;
3
+ }
4
+
5
+ .tippy-box {
6
+ --lib-tippy-bg: var(--color-dark);
7
+
8
+ &[data-theme~="light-border"] {
9
+ background-color: rgb(var(--color-background));
10
+ background-clip: padding-box;
11
+ border: 1px solid rgb(0 8 16 / 0.05);
12
+ color: rgb(var(--color-current));
13
+ box-shadow: 0 3px 14px -0.5px rgb(0 8 16 / 0.08);
14
+ border-radius: var(--radius);
15
+ left: 0.1875rem;
16
+
17
+ @nest .dark & {
18
+ --color-background: var(--color-background-200);
19
+ }
20
+
21
+ & .tippy-svg-arrow {
22
+ fill: rgb(var(--color-background));
23
+
24
+ &::after {
25
+ opacity: 0.3;
26
+ }
27
+ }
28
+ }
29
+
30
+ &[data-placement="bottom-end"] {
31
+ &[data-animation="scale"] {
32
+ transform-origin: top right;
33
+ }
34
+
35
+ & .tippy-svg-arrow {
36
+ left: auto !important;
37
+ right: 0.5rem;
38
+ transform: none !important;
39
+ }
40
+ }
41
+
42
+ &[data-placement="bottom-start"] {
43
+ &[data-animation="scale"] {
44
+ transform-origin: top left;
45
+ }
46
+ }
47
+ }
48
+
49
+ [data-controller*="lib-tippy"]:not([data-lib-tippy^="dropdown"]) {
50
+ cursor: default;
51
+ }
52
+
53
+ [data-tippy-root] {
54
+ &.is-full {
55
+ @media (--media-m) {
56
+ inset: 0 !important;
57
+ width: 100% !important;
58
+ height: 100% !important;
59
+ position: fixed !important;
60
+ transform: none !important;
61
+ pointer-events: none;
62
+ max-width: 100%;
63
+
64
+ & .tippy-content {
65
+ padding-bottom: env(safe-area-inset-bottom);
66
+ pointer-events: auto;
67
+ }
68
+
69
+ & .tippy-box {
70
+ max-width: 100% !important;
71
+ position: absolute;
72
+ border: 0 !important;
73
+ bottom: 0;
74
+ left: 0 !important;
75
+ right: 0;
76
+ border-radius: 2rem 2rem 0 0 !important;
77
+ transition-timing-function: ease !important;
78
+ transition-duration: 300ms !important;
79
+
80
+ &[data-state="hidden"] {
81
+ transform: translateY(100%);
82
+ opacity: 0;
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
@@ -0,0 +1 @@
1
+ /* empty */
@@ -1,13 +1,17 @@
1
1
  @import "Badge.css";
2
2
  @import "Btn.css";
3
3
  @import "Checkbox.css";
4
+ @import "Dropdown.css";
4
5
  @import "Heading.css";
5
6
  @import "Icon.css";
7
+ @import "Image.css";
6
8
  @import "Input.css";
9
+ @import "Label.css";
7
10
  @import "Link.css";
8
11
  @import "Notice.css";
9
12
  @import "Progress.css";
10
13
  @import "Radio.css";
11
14
  @import "Select.css";
15
+ @import "Switch.css";
16
+ @import "Text.css";
12
17
  @import "Title.css";
13
- @import "Wsw.css";
@@ -1,44 +1,58 @@
1
1
  .ui-badge {
2
+ --ui-badge-width: auto;
3
+ --ui-badge-height: 1.5rem;
2
4
  --ui-badge-py: 0.375rem;
3
5
  --ui-badge-px: 0.5rem;
4
6
  --ui-badge-size: 0.75rem;
7
+ --ui-badge-radius: var(--radius);
5
8
  --ui-badge-weight: var(--font-normal);
6
- --ui-badge-bg: var(--color-primary);
7
- --ui-badge-color: var(--color-light);
9
+ --ui-badge-bg-opacity: var(--tw-bg-opacity, 1);
10
+ --ui-badge-text-opacity: var(--tw-text-opacity, 1);
11
+ --ui-badge-bg: rgb(var(--color-accent) / var(--ui-badge-bg-opacity));
12
+ --ui-badge-color: rgb(var(--color-light) / var(--ui-badge-text-opacity));
13
+ --ui-badge-hover-opacity: 0.8;
14
+
8
15
  display: inline-flex;
9
16
  align-self: flex-start;
10
17
  align-items: center;
11
18
  text-align: center;
12
19
  justify-content: center;
20
+ flex-shrink: 0;
13
21
  font-size: var(--ui-badge-size);
14
22
  font-weight: var(--ui-badge-weight);
15
23
  padding: var(--ui-badge-py) var(--ui-badge-px);
16
- border-radius: var(--radius);
17
- background-color: rgb(var(--ui-badge-bg));
18
- color: rgb(var(--ui-badge-color));
24
+ border-radius: var(--ui-badge-radius);
25
+ background-color: var(--ui-badge-bg);
26
+ color: var(--ui-badge-color);
27
+ width: var(--ui-badge-width);
28
+ height: var(--ui-badge-height);
19
29
  line-height: var(--ui-badge-size);
20
30
  transition: var(--transition-opacity);
21
31
 
22
- @nest .no-touch [href]:hover&, .no-touch button:hover& {
23
- opacity: 0.8;
32
+ @nest .no-touch &:is([href]:hover, button:hover) {
33
+ opacity: var(--ui-badge-hover-opacity);
34
+ }
35
+
36
+ & svg {
37
+ width: 1em;
38
+ height: 1em;
24
39
  }
25
40
 
26
- &[data-type^="square"], &[data-type^="circle"] {
41
+ &:--type-square, &:--type-circle {
27
42
  --ui-badge-px: var(--ui-badge-py);
28
- width: calc(var(--ui-badge-size) + (2 * var(--ui-badge-py)));
43
+ --ui-badge-width: var(--ui-badge-height);
29
44
  }
30
45
 
31
- &[data-type^="circle"] {
46
+ &:--type-circle {
32
47
  border-radius: 50%;
33
48
  }
34
49
 
35
- &[data-size="sm"] {
36
- --ui-badge-py: 0.25rem;
37
- --ui-badge-px: 0.5rem;
50
+ &:--size-sm {
51
+ --ui-badge-height: 1.25rem;
38
52
  }
39
53
 
40
- &[data-size="md"] {
41
- --ui-badge-py: 0.5rem;
54
+ &:--size-md {
55
+ --ui-badge-height: 1.75rem;
42
56
  --ui-badge-py: 0.5rem;
43
57
  }
44
58
  }
@@ -48,21 +62,21 @@
48
62
 
49
63
  & .ui-badge {
50
64
  &:not(:first-of-type) {
51
- &, &:after {
65
+ &, &::after {
52
66
  border-top-left-radius: 0;
53
67
  border-bottom-left-radius: 0;
54
68
  }
55
69
 
56
- &:after {
70
+ &::after {
57
71
  border-left: 0;
58
72
  }
59
73
  }
60
74
 
61
75
  &:not(:last-of-type) {
62
- &, &:after {
76
+ &, &::after {
63
77
  border-top-right-radius: 0;
64
78
  border-bottom-right-radius: 0;
65
79
  }
66
80
  }
67
81
  }
68
- }
82
+ }