@digigov/css 2.0.0-rc.5 → 2.0.0-rc.7

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 (70) hide show
  1. package/defaultTheme/accordion.json +8 -0
  2. package/defaultTheme/brandConfig.json +10 -0
  3. package/defaultTheme/button.json +9 -0
  4. package/defaultTheme/card.json +11 -0
  5. package/defaultTheme/form.json +15 -0
  6. package/defaultTheme/globals.json +11 -1
  7. package/defaultTheme/index.js +1 -1
  8. package/defaultTheme/layout.json +55 -0
  9. package/defaultTheme/misc.json +20 -0
  10. package/defaultTheme/panel.json +5 -0
  11. package/defaultTheme/typography.json +8 -8
  12. package/dist/base/index.css +1 -1
  13. package/dist/base.js +1 -1
  14. package/dist/components.js +1 -1
  15. package/dist/digigov.css +2 -2
  16. package/package.json +7 -3
  17. package/src/base/base.css +1 -1
  18. package/src/base/index.css +5 -5
  19. package/src/components/accordion.css +56 -53
  20. package/src/components/admin-header.css +6 -5
  21. package/src/components/admin-layout.css +8 -8
  22. package/src/components/autocomplete.css +89 -46
  23. package/src/components/back-to-top.css +3 -4
  24. package/src/components/bottom-info.css +2 -1
  25. package/src/components/breadcrumbs.css +8 -6
  26. package/src/components/button.css +49 -48
  27. package/src/components/card.css +55 -49
  28. package/src/components/checkboxes.css +20 -23
  29. package/src/components/chip.css +28 -29
  30. package/src/components/components.css +2 -2
  31. package/src/components/copy-to-clipboard.css +27 -26
  32. package/src/components/details.css +11 -9
  33. package/src/components/dev-theme.css +2 -3
  34. package/src/components/drawer.css +46 -47
  35. package/src/components/dropdown.css +57 -49
  36. package/src/components/experimental.css +12 -12
  37. package/src/components/fillable.css +4 -4
  38. package/src/components/filter.css +9 -14
  39. package/src/components/footer.css +35 -21
  40. package/src/components/form.css +34 -24
  41. package/src/components/full-page-background.css +1 -1
  42. package/src/components/header.css +27 -35
  43. package/src/components/hidden.css +6 -6
  44. package/src/components/index.css +46 -47
  45. package/src/components/kitchensink.css +33 -33
  46. package/src/components/layout.css +34 -36
  47. package/src/components/loader.css +28 -28
  48. package/src/components/masthead.css +56 -55
  49. package/src/components/misc.css +13 -15
  50. package/src/components/modal.css +10 -12
  51. package/src/components/nav.css +69 -65
  52. package/src/components/notification-banner.css +18 -16
  53. package/src/components/pagination.css +29 -30
  54. package/src/components/panel.css +9 -8
  55. package/src/components/phase-banner.css +5 -5
  56. package/src/components/radios.css +24 -21
  57. package/src/components/skiplink.css +2 -2
  58. package/src/components/stack.css +63 -63
  59. package/src/components/stepnav.css +33 -29
  60. package/src/components/summary-list.css +16 -13
  61. package/src/components/svg-icons.css +78 -80
  62. package/src/components/table.css +154 -178
  63. package/src/components/tabs.css +40 -38
  64. package/src/components/task-list.css +18 -18
  65. package/src/components/timeline.css +4 -3
  66. package/src/components/typography.css +80 -108
  67. package/src/components/warning-text.css +7 -7
  68. package/src/pages/index.js +1 -1
  69. package/tailwind.config.js +1 -0
  70. package/defaultTheme/footer.json +0 -8
@@ -68,52 +68,44 @@
68
68
  font-weight: var(--caption-md-font-weight);
69
69
  letter-spacing: var(--caption-md-letter-spacing);
70
70
  }
71
- .ds-body {
72
- font-size: var(--body-font-size);
73
- line-height: var(--body-line-height);
74
- margin-bottom: var(--body-margin-bottom);
75
- color: var(--body-color);
76
- letter-spacing: var(--body-letter-spacing);
77
- }
78
- .ds-body {
79
- .ds-code{
80
- @apply p-2 bg-base-200;
81
- }
82
- }
83
- .ds-body-lg {
84
- font-size: var(--body-lg-font-size);
85
- line-height: var(--body-lg-line-height);
86
- }
87
- .ds-body-sm {
88
- font-size: var(--body-sm-font-size);
89
- line-height: var(--body-sm-line-height);
90
- }
91
71
  .ds-hint {
92
72
  font-size: var(--hint-font-size);
93
73
  line-height: var(--hint-line-height);
94
74
  margin-bottom: var(--hint-margin-bottom);
95
75
  color: var(--hint-color);
96
76
  letter-spacing: var(--hint-letter-spacing);
77
+ &.ds-hint--lg {
78
+ font-size: var(--hint-lg-font-size);
79
+ line-height: var(--hint--lg-line-height);
80
+ }
81
+ &.ds-hint--sm {
82
+ font-size: var(--hint--sm-font-size);
83
+ line-height: var(--hint--sm-line-height);
84
+ }
85
+ &.ds-hint--break-words {
86
+ @apply break-words;
87
+ }
97
88
  }
98
- .ds-background-dark, .ds-masthead--primary {
89
+ .ds-background-dark,
90
+ .ds-masthead--primary {
99
91
  .ds-hint {
100
92
  @apply opacity-70 text-white print:text-base-content;
101
93
  }
102
94
  }
103
95
  .ds-code {
104
96
  @apply text-sm sm:text-base bg-base-100;
105
- }
106
- .ds-code--attr {
107
- @apply text-info;
108
- }
109
- .ds-code--string {
110
- @apply text-success;
111
- }
112
- .ds-code--keyword {
113
- @apply text-warning;
114
- }
115
- .ds-code--name {
116
- @apply text-tertiary;
97
+ &.ds-code--attr {
98
+ @apply text-info;
99
+ }
100
+ &.ds-code--string {
101
+ @apply text-success;
102
+ }
103
+ &.ds-code--keyword {
104
+ @apply text-warning;
105
+ }
106
+ &.ds-code--name {
107
+ @apply text-tertiary;
108
+ }
117
109
  }
118
110
  .ds-\!-font-size-14 {
119
111
  @apply text-xs md:text-sm !important;
@@ -147,9 +139,25 @@
147
139
  }
148
140
  .ds-list {
149
141
  @apply list-none list-outside mt-4;
142
+ @apply md:mb-8 mb-4 text-base-content;
150
143
  font-size: var(--list-font-size);
151
144
  line-height: var(--list-line-height);
152
145
  letter-spacing: var(--list-letter-spacing);
146
+ &.ds-list--bullet {
147
+ @apply list-disc list-outside pl-4;
148
+ }
149
+ &.ds-list--number {
150
+ @apply list-decimal list-outside pl-6;
151
+ }
152
+ &.ds-list--horizontal {
153
+ @apply flex flex-wrap gap-x-6 gap-y-3;
154
+ &.ds-list--spaced {
155
+ @apply gap-x-10 gap-y-5;
156
+ }
157
+ .ds-list__item {
158
+ @apply w-full sm:w-auto;
159
+ }
160
+ }
153
161
  .ds-list__item {
154
162
  @apply mb-2;
155
163
  &:last-child {
@@ -160,41 +168,23 @@
160
168
  .ds-list__item > .ds-list--bullet:nth-child(1) {
161
169
  list-style: circle inside none;
162
170
  }
163
- .ds-list__item
164
- > .ds-list
165
- > .ds-list__item
166
- > .ds-list--bullet:nth-child(1) {
171
+ .ds-list__item > .ds-list > .ds-list__item > .ds-list--bullet:nth-child(1) {
167
172
  @apply list-disc;
168
173
  }
169
174
  .ds-list__item
170
- > .ds-list:not(.ds-list--bullet):not(.ds-list--number):nth-child(1)
175
+ > .ds-list:not(.ds-list--bullet, .ds-list--number):nth-child(1)
171
176
  > .ds-list__item {
172
177
  @apply pl-10;
173
178
  }
174
179
  .ds-list__item > .ds-list {
175
180
  @apply mb-0 mt-2;
176
181
  }
177
- .ds-list--bullet {
178
- @apply list-disc list-outside pl-4;
179
- }
180
- .ds-list--number {
181
- @apply list-decimal list-outside pl-6;
182
- }
183
182
  .ds-list--spaced:not(.ds-list--horizontal) > .ds-list__item {
184
183
  @apply mb-4;
185
184
  &:last-child {
186
185
  @apply mb-0;
187
186
  }
188
187
  }
189
- .ds-list--horizontal {
190
- @apply flex flex-wrap gap-x-6 gap-y-3;
191
- .ds-list__item {
192
- @apply w-full sm:w-auto;
193
- }
194
- &.ds-list--spaced {
195
- @apply gap-x-10 gap-y-5;
196
- }
197
- }
198
188
  @media (min-width: 768px) {
199
189
  .ds-list--col-2 {
200
190
  column-count: 2;
@@ -203,16 +193,14 @@
203
193
  column-count: 2;
204
194
  }
205
195
  }
206
- .ds-list {
207
- @apply md:mb-8 mb-4 text-base-content;
208
- }
209
196
  .ds-blockquote {
210
197
  @apply mb-4 mt-8 md:mb-8 p-4 border-l-8 border-base-500 text-base-content;
211
198
  font-size: var(--blockquote-font-size);
212
199
  line-height: var(--blockquote-line-height);
213
- &.ds-blockquote--dense, .ds-dense & {
200
+ &.ds-blockquote--dense,
201
+ .ds-dense & {
214
202
  @apply mt-3 md:mb-6 p-3 border-l-6;
215
- }
203
+ }
216
204
  }
217
205
  .ds-body {
218
206
  font-size: var(--body-font-size);
@@ -220,35 +208,19 @@
220
208
  margin-bottom: var(--body-margin-bottom);
221
209
  color: var(--body-color);
222
210
  letter-spacing: var(--body-letter-spacing);
223
- }
224
- .ds-body-lg {
225
- font-size: var(--body-lg-font-size);
226
- line-height: var(--body-lg-line-height);
227
- }
228
- .ds-body-sm {
229
- font-size: var(--body-sm-font-size);
230
- line-height: var(--body-sm-line-height);
231
- }
232
- .ds-hint {
233
- font-size: var(--hint-font-size);
234
- line-height: var(--hint-line-height);
235
- margin-bottom: var(--hint-margin-bottom);
236
- color: var(--hint-color);
237
- letter-spacing: var(--hint-letter-spacing);
238
- }
239
- .ds-hint-lg {
240
- font-size: var(--hint-lg-font-size);
241
- line-height: var(--hint-lg-line-height);
242
- }
243
- .ds-hint-sm {
244
- font-size: var(--hint-sm-font-size);
245
- line-height: var(--hint-sm-line-height);
246
- }
247
- .ds-hint--break-words {
248
- @apply break-words;
211
+ &.ds-body--lg {
212
+ font-size: var(--body--lg-font-size);
213
+ line-height: var(--body--lg-line-height);
214
+ }
215
+ &.ds-body--sm {
216
+ font-size: var(--body--sm-font-size);
217
+ line-height: var(--body--sm-line-height);
218
+ }
219
+ .ds-code {
220
+ @apply p-2 bg-base-200;
221
+ }
249
222
  }
250
223
 
251
-
252
224
  .ds-link {
253
225
  @apply focus:text-link-active underline cursor-pointer;
254
226
  color: var(--link-color);
@@ -269,25 +241,24 @@
269
241
  text-decoration: none !important;
270
242
  outline: none;
271
243
  }
272
- .ds-heading-xl & ,
273
- .ds-heading-lg & ,
274
- .ds-heading-md & ,
275
- .ds-heading-sm & ,
244
+ &.ds-link--no-underline {
245
+ @apply no-underline hover:underline;
246
+ }
247
+ .ds-heading-xl &,
248
+ .ds-heading-lg &,
249
+ .ds-heading-md &,
250
+ .ds-heading-sm &,
276
251
  .ds-body &,
277
252
  .ds-hint &,
278
- .ds-footer__list &
279
- {
253
+ .ds-footer__list & {
280
254
  font-size: inherit;
281
255
  }
282
256
  }
283
- .ds-link--no-underline {
284
- @apply no-underline hover:underline;
285
- }
286
257
 
287
258
  .ds-back-link {
259
+ @apply w-fit text-base-content underline flex items-center mb-4 cursor-pointer;
288
260
  font-size: var(--back-link-font-size);
289
261
  letter-spacing: var(--back-link-letter-spacing);
290
- @apply w-fit text-base-content underline flex items-center mb-4 cursor-pointer;
291
262
  &:hover {
292
263
  text-decoration-thickness: 2px;
293
264
  }
@@ -302,34 +273,35 @@
302
273
  }
303
274
 
304
275
  .ds-highlight-links {
305
- .ds-link {
306
- @apply bg-base-content p-1 text-focus underline m-1;
307
- }
308
276
  &.dark {
309
277
  .ds-link {
310
278
  @apply bg-base-300;
311
279
  }
312
280
  }
281
+ .ds-link {
282
+ @apply bg-base-content p-1 text-focus underline m-1;
283
+ }
313
284
  }
314
285
  .ds-visually-hidden {
315
286
  @apply absolute m-0 p-0 overflow-hidden border-0 whitespace-nowrap !important;
316
287
  width: 1px !important;
317
288
  height: 1px !important;
318
289
  clip: rect(0 0 0 0) !important;
319
- -webkit-clip-path: inset(50%) !important;
320
290
  clip-path: inset(50%) !important;
321
291
  }
322
292
  @media print {
323
- .ds-body .ds-link[href^="#"]:after {
293
+ .ds-body .ds-link[href^='#']::after {
324
294
  display: none;
325
295
  }
326
296
  .ds-link[href^="http://"]:after, .ds-link[href^="https://"]:after
327
297
  {
328
- content: " (" attr(href) ")";
298
+ content: ' (' attr(href) ')';
329
299
  font-size: 80%;
330
300
  }
331
- .ds-body .ds-link {
332
- word-wrap: break-word;
301
+ .ds-body {
302
+ .ds-link {
303
+ word-wrap: break-word;
304
+ }
333
305
  }
334
306
  .ds-link {
335
307
  @apply text-base-content;
@@ -343,9 +315,6 @@
343
315
  }
344
316
  }
345
317
  .ds-link {
346
- .ds-svg-icon {
347
- fill: var(--color-link);
348
- }
349
318
  &:hover {
350
319
  .ds-svg-icon {
351
320
  fill: var(--color-link-hover);
@@ -356,6 +325,9 @@
356
325
  fill: var(--color-link-active);
357
326
  }
358
327
  }
328
+ .ds-svg-icon {
329
+ fill: var(--color-link);
330
+ }
359
331
  }
360
332
  button.ds-link {
361
333
  .ds-svg-icon {
@@ -364,8 +336,8 @@ button.ds-link {
364
336
  }
365
337
  .ds-back-link {
366
338
  .ds-svg-icon--caret {
367
- fill: var(--color-base-content);
368
339
  @apply md:w-4 md:h-4 w-3 h-3 inline-block mr-2;
340
+ fill: var(--color-base-content);
369
341
  }
370
342
  }
371
343
  .ds-code-block__container {
@@ -376,7 +348,7 @@ button.ds-link {
376
348
  color: inherit;
377
349
  }
378
350
  }
379
- .ds-table__cell{
351
+ .ds-table__cell {
380
352
  & > code {
381
353
  @apply border-none;
382
354
  }
@@ -1,6 +1,12 @@
1
1
  .ds-warning-text {
2
- font-size: var(--warning-text-font-size);
3
2
  @apply flex py-4 px-0;
3
+ font-size: var(--warning-text-font-size);
4
+ &.ds-warning-text--dense,
5
+ .ds-dense & {
6
+ .ds-warning-text__icon {
7
+ @apply mr-4 md:mr-5;
8
+ }
9
+ }
4
10
  .ds-warning-text__icon {
5
11
  @apply text-base-content-invert font-bold bg-base-content text-3xl leading-10 text-center
6
12
  rounded-3xl md:min-h-10 min-w-10 h-fit mr-6 mt-1
@@ -12,12 +18,6 @@
12
18
  .ds-warning-text__assistive {
13
19
  @apply absolute w-px h-px m-0 p-0 border-0 overflow-hidden whitespace-nowrap !important;
14
20
  clip: rect(0 0 0 0) !important;
15
- -webkit-clip-path: inset(50%) !important;
16
21
  clip-path: inset(50%) !important;
17
22
  }
18
- &.ds-warning-text--dense, .ds-dense & {
19
- .ds-warning-text__icon {
20
- @apply mr-4 md:mr-5;
21
- }
22
- }
23
23
  }
@@ -397,7 +397,7 @@ export default function Home() {
397
397
  <a className="ds-footer__link" href="#3">Σύνδεσμος 3</a>
398
398
  </li>
399
399
  </ul>
400
- <div className="ds-footer__content--logos">
400
+ <div className="ds-footer__content__logos">
401
401
  <img className="ds-footer__logo" src="/img/government-logo2.svg" alt="government logo" />
402
402
  <img className="ds-footer__logo" src="/img/government-logo2.svg" alt="government logo" />
403
403
  </div>
@@ -130,6 +130,7 @@ module.exports = {
130
130
  fit: "fit-content",
131
131
  },
132
132
  minWidth: {
133
+ 4: "1rem",
133
134
  10: "2.5rem",
134
135
  32: "8rem",
135
136
  52: "13rem",
@@ -1,8 +0,0 @@
1
- {
2
- "footer__copyright": {
3
- "font-size": {
4
- "xs": "var(--text-sm)",
5
- "md": "var(--text-base)"
6
- }
7
- }
8
- }