@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,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
+ }
@@ -0,0 +1 @@
1
+ /* empty */
@@ -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";
@@ -1,25 +1,29 @@
1
1
  .datepicker-dropdown {
2
+ --color-current: var(--color-default);
3
+
2
4
  z-index: 9999;
3
5
  transition: var(--transition-opacity), var(--transition-transform);
4
6
  will-change: transform;
7
+ color: rgb(var(--color-current));
5
8
 
6
9
  @nest html:not(.no-pointer-events) & {
7
10
  display: block;
8
11
  }
9
12
 
10
13
  & .datepicker-picker {
11
- box-shadow: 0 .15em 1.5em 0 rgba(var(--color-dark),0.05), 0 0 1em 0 rgba(var(--color-dark),0.05);
14
+ box-shadow: 0 0.15em 1.5em 0 rgb(var(--color-dark) / 0.05), 0 0 1em 0 rgb(var(--color-dark) / 0.05);
12
15
  overflow: hidden;
13
16
  display: block;
17
+ border-radius: var(--radius);
14
18
  }
15
19
 
16
20
  &.datepicker-orient-top {
17
21
  padding-bottom: 0;
18
22
  margin-top: -0.75rem;
19
23
 
20
- &:after, &:before {
24
+ &::after, &::before {
21
25
  top: 100%;
22
- left: 1.25rem;
26
+ left: 1.3125rem;
23
27
  border: solid transparent;
24
28
  content: "";
25
29
  height: 0;
@@ -29,13 +33,13 @@
29
33
  margin-top: -1px;
30
34
  }
31
35
 
32
- &:after {
36
+ &::after {
33
37
  border-top-color: #fff;
34
38
  border-width: 0.375rem;
35
39
  margin-left: -0.375rem;
36
40
  }
37
41
 
38
- &:before {
42
+ &::before {
39
43
  border-top-color: #eee;
40
44
  border-width: 0.4375rem;
41
45
  margin-left: -0.4375rem;
@@ -50,9 +54,9 @@
50
54
  padding-top: 0;
51
55
  margin-top: 0.75rem;
52
56
 
53
- &:after, &:before {
57
+ &::after, &::before {
54
58
  bottom: 100%;
55
- left: 1.25rem;
59
+ left: 1.3125rem;
56
60
  border: solid transparent;
57
61
  content: "";
58
62
  height: 0;
@@ -61,13 +65,13 @@
61
65
  pointer-events: none;
62
66
  }
63
67
 
64
- &:after {
68
+ &::after {
65
69
  border-bottom-color: #fff;
66
70
  border-width: 0.375rem;
67
71
  margin-left: -0.375rem;
68
72
  }
69
73
 
70
- &:before {
74
+ &::before {
71
75
  border-bottom-color: #eee;
72
76
  border-width: 0.4375rem;
73
77
  margin-left: -0.4375rem;
@@ -88,7 +92,7 @@
88
92
  font-size: 0.75rem;
89
93
  font-weight: var(--font-semibold);
90
94
  text-transform: uppercase;
91
- color: rgb(var(--color-primary));
95
+ color: rgb(var(--color-accent));
92
96
  }
93
97
 
94
98
  .datepicker-cell {
@@ -96,34 +100,57 @@
96
100
  }
97
101
 
98
102
  .datepicker-cell.selected, .datepicker-cell.selected:hover {
99
- background-color: rgb(var(--color-primary));
103
+ background-color: rgb(var(--color-accent));
100
104
  }
101
105
 
102
- .datepicker-time {
103
- padding: 0.5rem;
106
+ .datepicker-controls {
104
107
  display: flex;
105
108
  justify-content: center;
106
109
  align-items: center;
110
+ padding: 0.125rem;
107
111
 
108
- & input {
109
- height: 1.875rem;
110
- color: rgb(var(--color-default));
111
- font-size: 0.875rem;
112
- border: 0;
113
- max-width: 4.375rem;
112
+ & .ok-btn {
113
+ background: rgb(var(--color-accent));
114
+ color: rgb(var(--color-light)) !important;
115
+ border-color: rgb(var(--color-accent)) !important;
114
116
  font-weight: var(--font-medium);
117
+ }
118
+
119
+ & :is(.button, input) {
120
+ margin-left: 0.125rem !important;
121
+ margin-right: 0.125rem !important;
122
+ }
123
+
124
+ & input {
125
+ color: rgb(var(--color-current));
126
+ font-size: 0.8125rem;
127
+ min-width: 4.5rem;
128
+ max-width: 4.5rem;
129
+ font-weight: var(--font-normal);
115
130
  background-color: transparent;
131
+ border: 1px solid #dbdbdb;
132
+ height: 1.6875rem;
133
+ border-radius: var(--radius) !important;
134
+ padding: 0 0.1875rem !important;
135
+
136
+ @nest .chrome & {
137
+ padding: 0 0.125rem 0 0.25rem !important;
138
+ min-width: 3.75rem;
139
+ }
140
+
141
+ @nest .safari & {
142
+ min-width: 3rem;
143
+ }
116
144
 
117
- &.polyfill {
118
- max-width: 2.25rem;
145
+ &::-webkit-calendar-picker-indicator {
146
+ padding: 0;
147
+ margin: 0;
119
148
  }
120
149
  }
121
150
  }
122
151
 
123
- .datepicker-footer {
124
- background-color: rgb(var(--color-background));
125
- box-shadow: none;
126
- border-top: 1px solid rgba(var(--color-default), 0.05);
152
+ .datepicker-input.in-edit:active, .datepicker-input.in-edit:focus {
153
+ box-shadow: inherit;
127
154
  }
128
155
 
129
156
  .button {
@@ -131,22 +158,25 @@
131
158
  font-size: 0;
132
159
  height: 2.25rem;
133
160
 
134
- &:before {
135
- @mixin iconfont;
161
+ &::before {
162
+ width: 1em;
163
+ height: 1em;
136
164
  font-size: 1rem;
137
165
  display: block;
166
+ background-color: currentColor;
167
+ content: "";
138
168
  }
139
169
  }
140
170
 
141
171
  &.prev-btn {
142
- &:before {
143
- content: var(--icon-chevron-left);
172
+ &::before {
173
+ mask: var(--icon-chevron-left);
144
174
  }
145
175
  }
146
176
 
147
177
  &.next-btn {
148
- &:before {
149
- content: var(--icon-chevron-right);
178
+ &::before {
179
+ mask: var(--icon-chevron-right);
150
180
  }
151
181
  }
152
182
 
@@ -156,19 +186,35 @@
156
186
  }
157
187
  }
158
188
 
189
+ .datepicker-footer {
190
+ background-color: rgb(var(--color-background));
191
+ box-shadow: none;
192
+ border-top: 1px solid rgb(var(--color-current) / 0.05);
193
+
194
+ & .datepicker-controls {
195
+ & + .datepicker-time {
196
+ padding-top: 0.25rem;
197
+ }
198
+ }
199
+
200
+ & .button {
201
+ border-radius: var(--radius) !important;
202
+ }
203
+ }
204
+
159
205
  .dark {
160
- & .datepicker-picker, & .datepicker-time {
206
+ & :is(.datepicker-picker, .datepicker-time) {
161
207
  background-color: rgb(var(--color-background-100));
162
208
  }
163
209
 
164
210
  & .datepicker-dropdown.datepicker-orient-bottom {
165
- &:before, &:after {
211
+ &::before, &::after {
166
212
  border-bottom-color: rgb(var(--color-background-100));
167
213
  }
168
214
  }
169
215
 
170
216
  & .datepicker-dropdown.datepicker-orient-top {
171
- &:before, &:after {
217
+ &::before, &::after {
172
218
  border-top-color: rgb(var(--color-background-100));
173
219
  }
174
220
  }
@@ -176,7 +222,7 @@
176
222
  & .datepicker-controls .button {
177
223
  border-color: transparent;
178
224
  background-color: rgb(var(--color-background-100));
179
- color: rgb(var(--color-default)) !important;
225
+ color: rgb(var(--color-current)) !important;
180
226
  }
181
227
 
182
228
  & .datepicker-header .datepicker-controls {
@@ -184,16 +230,16 @@
184
230
 
185
231
  & .button {
186
232
  &:hover {
187
- background-color: rgba(var(--color-light), 0.1);
233
+ background-color: rgb(var(--color-light) / 0.1);
188
234
  }
189
235
  }
190
236
  }
191
237
 
192
238
  & .datepicker-cell:not(.disabled):hover {
193
- background-color: rgba(var(--color-light), 0.1);
239
+ background-color: rgb(var(--color-light) / 0.1);
194
240
  }
195
241
 
196
242
  & .datepicker-cell.focused:not(.selected) {
197
- background-color: rgba(var(--color-light), 0.2);
243
+ background-color: rgb(var(--color-light) / 0.2);
198
244
  }
199
- }
245
+ }
@@ -1,18 +1,19 @@
1
1
  .lib-dialog {
2
2
  --lib-dialog-bg: var(--color-dark);
3
3
  --lib-dialog-opacity: 0.8;
4
- animation: 0.3s ease 0s backwards 1 fadeIn;
4
+
5
+ animation: 0.3s ease 0s backwards 1 fade-in;
5
6
  inset: 0;
6
7
  z-index: var(--z-30);
7
8
  position: fixed;
8
9
  display: none;
9
10
  overflow: auto;
10
11
  -webkit-overflow-scrolling: touch;
11
- background-color: rgba(var(--lib-dialog-bg), var(--lib-dialog-opacity));
12
+ background-color: rgb(var(--lib-dialog-bg) / var(--lib-dialog-opacity));
12
13
  overscroll-behavior: contain;
13
14
 
14
- &[data-state="hiding"] {
15
- animation: 0.3s ease 0s forwards 1 fadeOut;
15
+ &:--state-hiding {
16
+ animation: 0.3s ease 0s forwards 1 fade-out;
16
17
  pointer-events: none;
17
18
  }
18
- }
19
+ }
@@ -1,9 +1,9 @@
1
1
  .lib-drawer {
2
- --drawerOpacity: 0;
2
+ --lib-drawer-opacity: 0;
3
+
3
4
  z-index: var(--z-30);
4
5
  width: 100%;
5
6
  height: 100%;
6
- //display: none;
7
7
  position: fixed;
8
8
  top: 0;
9
9
  bottom: 0;
@@ -13,6 +13,10 @@
13
13
  display: flex;
14
14
  flex-direction: row;
15
15
 
16
+ & > div {
17
+ scroll-snap-align: end;
18
+ }
19
+
16
20
  &[data-action*="scroll"] {
17
21
  overflow-x: auto;
18
22
  overflow-y: hidden;
@@ -21,7 +25,7 @@
21
25
  scrollbar-width: none;
22
26
  -ms-overflow-style: none;
23
27
 
24
- &[data-state="active"] {
28
+ &:--state-active {
25
29
  scroll-snap-type: x mandatory;
26
30
  }
27
31
 
@@ -31,46 +35,42 @@
31
35
  }
32
36
  }
33
37
 
34
- &:before {
38
+ &::before {
35
39
  position: fixed;
36
40
  top: 0;
37
41
  bottom: 0;
38
42
  right: 0;
39
43
  left: 0;
40
44
  z-index: -1;
41
- background-color: rgba(var(--color-default), 0.6);
45
+ background-color: rgb(var(--color-dark) / 0.6);
42
46
  content: "";
43
- opacity: var(--drawerOpacity);
47
+ opacity: var(--lib-drawer-opacity);
44
48
 
45
49
  @nest .is-opacity& {
46
50
  transition: var(--transition-opacity);
47
51
  }
48
52
 
49
- @nest :not([data-state="active"])& {
53
+ @nest :not(:--state-active)& {
50
54
  opacity: 0;
51
55
  }
52
56
  }
53
57
 
54
- &:not([data-state="active"]) {
58
+ &:not(:--state-active) {
55
59
  pointer-events: none;
56
60
 
57
61
  & > div {
58
62
  transform: translateX(-28.125rem);
59
63
 
60
- @media (--media-400) {
64
+ @media (--media-m) {
61
65
  transform: translateX(-22.5rem);
62
66
  }
63
67
  }
64
68
  }
65
69
 
66
- &:after {
70
+ &::after {
67
71
  content: "";
68
72
  display: block;
69
73
  min-width: 100vw;
70
74
  scroll-snap-align: end;
71
75
  }
72
-
73
- & > div {
74
- scroll-snap-align: end;
75
- }
76
- }
76
+ }