@forsakringskassan/docs-generator 2.38.4 → 2.38.5

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.
@@ -232,6 +232,55 @@ textarea {
232
232
  display: none;
233
233
  padding: 1rem 1.5rem 0;
234
234
  }
235
+ .cookie-warning__button-group {
236
+ align-items: center;
237
+ display: flex;
238
+ flex-wrap: wrap;
239
+ gap: 1rem;
240
+ margin-bottom: 1.5rem;
241
+ margin-top: 0.25rem;
242
+ }
243
+ .cookie-warning__button {
244
+ border: 2px solid transparent;
245
+ border-radius: 4px;
246
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
247
+ cursor: pointer;
248
+ font-weight: 600;
249
+ letter-spacing: 0.01rem;
250
+ line-height: 1.5rem;
251
+ max-width: 100%;
252
+ width: 100%;
253
+ text-align: center;
254
+ transition: background-color 350ms ease-out;
255
+ padding: 1rem 1.5rem;
256
+ }
257
+ @media (width >= 768px) {
258
+ .cookie-warning__button {
259
+ max-width: none;
260
+ width: auto;
261
+ }
262
+ }
263
+ .cookie-warning__button:active, .cookie-warning__button:focus {
264
+ outline: 3px solid transparent;
265
+ border-radius: 0;
266
+ box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
267
+ }
268
+ .cookie-warning__button--primary {
269
+ background-color: #4a52b6;
270
+ border-color: transparent;
271
+ color: #fff;
272
+ }
273
+ .cookie-warning__button--primary:hover, .cookie-warning__button--primary:active, .cookie-warning__button--primary:focus {
274
+ background-color: #3b4292;
275
+ }
276
+ .cookie-warning__button--secondary {
277
+ background-color: #f5f6fa;
278
+ border-color: #4a52b6;
279
+ color: #4a52b6;
280
+ }
281
+ .cookie-warning__button--secondary:hover, .cookie-warning__button--secondary:active, .cookie-warning__button--secondary:focus {
282
+ background-color: #e5e5f5;
283
+ }
235
284
 
236
285
  .docs-motd {
237
286
  padding: 1.5rem;
@@ -277,6 +326,204 @@ textarea {
277
326
  --docs-breakpoint-lg: 1280px;
278
327
  }
279
328
 
329
+ .docs-modal__header {
330
+ display: flex;
331
+ justify-content: space-between;
332
+ align-items: flex-start;
333
+ }
334
+ .docs-modal__title {
335
+ color: #1b1e23;
336
+ font-size: 1.5rem;
337
+ letter-spacing: initial;
338
+ }
339
+ .docs-modal__close {
340
+ align-items: center;
341
+ background: inherit;
342
+ border: none;
343
+ color: #1b1e23;
344
+ cursor: pointer;
345
+ display: flex;
346
+ font-weight: 700;
347
+ gap: 0.5rem;
348
+ margin: 0.375rem;
349
+ padding: 0.125rem 0.625rem;
350
+ }
351
+ .docs-modal__close .icon {
352
+ min-width: 1rem;
353
+ }
354
+ .docs-modal::backdrop {
355
+ background: rgba(0, 0, 0, 0.75);
356
+ backdrop-filter: blur(5px);
357
+ }
358
+
359
+ .docs-modal-active {
360
+ overflow: hidden;
361
+ }
362
+
363
+ /* reset broken FKUI reset */
364
+ dialog {
365
+ display: none;
366
+ }
367
+ dialog[open] {
368
+ display: block;
369
+ }
370
+
371
+ kbd {
372
+ border: 1px solid #bbbbbd;
373
+ color: var(--docs-text-color-discrete);
374
+ padding: 0.1rem 0.5rem;
375
+ border-radius: 6px;
376
+ font-family: var(--docs-font-family);
377
+ }
378
+
379
+ #search button {
380
+ background: transparent;
381
+ color: var(--docs-text-color-discrete);
382
+ border-radius: 4px;
383
+ border: 0;
384
+ box-shadow: none;
385
+ cursor: text;
386
+ min-height: 2.5rem;
387
+ padding: 0 0.75rem;
388
+ width: 100%;
389
+ }
390
+
391
+ #search button:hover {
392
+ cursor: pointer;
393
+ background-color: var(--docs-search-button-color-hover);
394
+ }
395
+
396
+ #search button:focus-visible {
397
+ border-radius: 0;
398
+ box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
399
+ outline: 3px solid transparent;
400
+ }
401
+
402
+ #search .search__icon {
403
+ display: inline-block;
404
+ height: 1rem;
405
+ margin-right: 0.5rem;
406
+ max-height: 100%;
407
+ max-width: 100%;
408
+ pointer-events: none;
409
+ width: 1rem;
410
+ }
411
+
412
+ #search-dialog {
413
+ --docs-text-color-default: var(--docs-search-text-color);
414
+ margin-top: 80px;
415
+ background: var(--docs-search-background-color);
416
+ border: 1px solid var(--docs-search-border-color);
417
+ color: var(--docs-text-color-default);
418
+ width: 580px;
419
+ }
420
+
421
+ .docs-search-dialog__input {
422
+ background-color: #fff;
423
+ box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.1);
424
+ border-radius: 4px;
425
+ border: 2px solid #8d8e91;
426
+ min-height: 2.5rem;
427
+ padding: 0 0.75rem;
428
+ width: 100%;
429
+ margin: 0 0 1.5rem;
430
+ }
431
+ .docs-search-dialog__input:focus {
432
+ border-radius: 0;
433
+ box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
434
+ outline: 3px solid transparent;
435
+ }
436
+ .docs-search-dialog__input::-ms-clear {
437
+ display: none;
438
+ }
439
+ .docs-search-dialog__input::-webkit-search-decoration, .docs-search-dialog__input::-webkit-search-cancel-button, .docs-search-dialog__input::-webkit-search-results-button, .docs-search-dialog__input::-webkit-search-results-decoration {
440
+ appearance: none;
441
+ }
442
+
443
+ .docs-search-result__list {
444
+ overflow-y: auto;
445
+ max-height: 60vh;
446
+ margin: 0.5rem 0 1.5rem;
447
+ padding: 0.2rem;
448
+ }
449
+ .docs-search-result__item {
450
+ display: flex;
451
+ border: 2px solid #8d8e91;
452
+ background: #fff;
453
+ }
454
+ .docs-search-result__item:not(:last-child) {
455
+ border-bottom: none;
456
+ }
457
+ .docs-search-result__item:focus-within .docs-search-result__item:hover {
458
+ background-color: #e5e5e5;
459
+ cursor: pointer;
460
+ }
461
+ .docs-search-result__item--active {
462
+ background-color: #e5e5e5;
463
+ }
464
+ .docs-search-result__link {
465
+ width: 100%;
466
+ padding: 1.25rem;
467
+ text-decoration: none;
468
+ color: var(--docs-text-color-default);
469
+ }
470
+ .docs-search-result__link, .docs-search-result__link:visited {
471
+ color: var(--docs-text-color-default);
472
+ text-decoration: none;
473
+ }
474
+ .docs-search-result__link:focus-visible {
475
+ box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
476
+ outline: 3px solid transparent;
477
+ }
478
+
479
+ #version button {
480
+ padding: 0;
481
+ background: transparent;
482
+ border: 0;
483
+ box-shadow: none;
484
+ margin: 0;
485
+ color: #5f6165;
486
+ text-decoration-color: #5f6165;
487
+ }
488
+ #version button:hover {
489
+ background-color: #f4f4f4;
490
+ }
491
+
492
+ #version-dialog {
493
+ width: 30rem;
494
+ max-height: 80vh;
495
+ background: var(--docs-version-background-color);
496
+ border: 1px solid var(--docs-version-border-color);
497
+ color: var(--docs-text-color-default);
498
+ }
499
+
500
+ .docs-selectable-version__list {
501
+ margin: 0 0 1.5rem;
502
+ padding-left: 0;
503
+ }
504
+ .docs-selectable-version__item {
505
+ display: flex;
506
+ border: 2px solid #8d8e91;
507
+ background: #fff;
508
+ }
509
+ .docs-selectable-version__item:not(:last-child) {
510
+ border-bottom: none;
511
+ }
512
+ .docs-selectable-version__item:focus-within, .docs-selectable-version__item:hover {
513
+ background: #e5e5f5;
514
+ cursor: pointer;
515
+ }
516
+ .docs-selectable-version__link {
517
+ width: 100%;
518
+ padding: 0.2rem;
519
+ text-decoration: none;
520
+ color: var(--docs-text-color-default);
521
+ }
522
+ .docs-selectable-version__link:focus-visible {
523
+ box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1b1e23, 0 0 0 6px #ffffff;
524
+ outline: 3px solid transparent;
525
+ }
526
+
280
527
  .version {
281
528
  color: var(--docs-text-color-discrete);
282
529
  text-wrap: nowrap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/docs-generator",
3
- "version": "2.38.4",
3
+ "version": "2.38.5",
4
4
  "description": "Documentation generator",
5
5
  "keywords": [
6
6
  "documentation"
@@ -1,19 +1,19 @@
1
1
  <div class="cookie-warning">
2
2
  <!-- [html-validate-disable-next heading-level, no-unused-disable -- allowed sectioning root] -->
3
- <h1>Kakor på webbplatsen</h1>
4
- <p>
5
- Vi använder kakor (cookies) för att webbplatsen ska fungera så bra som möjligt för dig.<br />
6
- Vi använder också kakor för webbanalys för att göra webbplatsen bättre.
7
- </p>
8
- <p>Godkänner du att vi också använder kakor för webbanalys?</p>
3
+ <h1>{{ $t('cookie-warning.title') }}</h1>
4
+ <p>{{ $t('cookie-warning.message') }}</p>
5
+ <p>{{ $t('cookie-warning.accept') }}</p>
9
6
 
10
- <div class="button-group">
11
- <button id="consent-all-button" class="button button-group__item button--primary" type="button">
12
- Ja, jag godkänner alla kakor
7
+ <div class="cookie-warning__button-group">
8
+ <button id="consent-all-button" class="cookie-warning__button cookie-warning__button--primary" type="button">
9
+ {{ $t('cookie-warning.consent-all') }}
13
10
  </button>
14
-
15
- <button id="consent-functional-button" class="button button-group__item button--secondary" type="button">
16
- Nej, jag godkänner bara nödvändiga kakor
11
+ <button
12
+ id="consent-functional-button"
13
+ class="cookie-warning__button cookie-warning__button--secondary"
14
+ type="button"
15
+ >
16
+ {{ $t('cookie-warning.consent-functional') }}
17
17
  </button>
18
18
  </div>
19
19
  </div>
@@ -1,25 +1,35 @@
1
- <dialog id="search-dialog">
1
+ <dialog class="docs-modal" id="search-dialog">
2
+ <div class="docs-modal__header">
3
+ <h1 class="docs-modal__title" id="search-dialog-title">{{ $t('search.title') }}</h1>
4
+ <button type="button" class="docs-modal__close">
5
+ <span>{{ $t('modal.close') }}</span>
6
+ <svg class="icon" focusable="false" aria-hidden="true">
7
+ <use xlink:href="#docs-icon-close"></use>
8
+ </svg>
9
+ </button>
10
+ </div>
11
+
2
12
  <!-- [html-validate-disable-next wcag/h32 -- handled via script] -->
3
- <form id="search-form">
4
- <div class="text-field">
5
- <label for="search-field" class="label">{{ $t('search.title') }}</label>
6
- <div class="text-field__input-wrapper">
7
- <div class="text-field__icon-wrapper">
8
- <input
9
- autofocus
10
- autocomplete="off"
11
- autocapitalize="off"
12
- autocorrect="off"
13
- id="search-field"
14
- type="text"
15
- class="text-field__input"
16
- maxlength="50"
17
- placeholder="{{ $t('search.placeholder') }}"
18
- />
19
- </div>
20
- </div>
21
- </div>
22
- <div id="search-results"></div>
13
+ <form class="docs-modal__body" id="search-form">
14
+ <input
15
+ autofocus
16
+ autocomplete="off"
17
+ autocapitalize="off"
18
+ autocorrect="off"
19
+ id="search-field"
20
+ type="search"
21
+ class="docs-search-dialog__input"
22
+ maxlength="50"
23
+ placeholder="{{ $t('search.placeholder') }}"
24
+ aria-labelledby="search-dialog-title"
25
+ />
26
+ <ul class="docs-search-result__list" id="search-results"></ul>
23
27
  <p>{{ $t('search.instructions') }}</p>
24
28
  </form>
25
29
  </dialog>
30
+
31
+ <template id="search-result-item">
32
+ <li class="docs-search-result__item">
33
+ <a class="docs-search-result__link"></a>
34
+ </li>
35
+ </template>
@@ -1,28 +1,7 @@
1
1
  <div class="toolbar__item">
2
2
  <form id="version">
3
3
  <button type="submit" class="anchor">
4
- <span id="version-info" class="version"> Byt version </span>
4
+ <span id="version-info" class="version">{{ $t("selectable-version.button") }} </span>
5
5
  </button>
6
6
  </form>
7
-
8
- <dialog id="version-dialog">
9
- <div id="version-dialog-head">
10
- <h1>Välj version</h1>
11
- <button type="button" class="button button--discrete button--discrete--black">
12
- <span>Stäng</span>
13
- <svg class="button__icon icon" focusable="false" aria-hidden>
14
- <use xlink:href="#docs-icon-close"></use>
15
- </svg>
16
- </button>
17
- </div>
18
- <div id="version-list">
19
- <p>Var god vänta, laddar versionsdata...</p>
20
- </div>
21
- </dialog>
22
7
  </div>
23
-
24
- <template id="version-list-item">
25
- <li class="list__item">
26
- <a class="list__item__itempane">template</a>
27
- </li>
28
- </template>
@@ -0,0 +1,20 @@
1
+ <dialog class="docs-modal" id="version-dialog">
2
+ <div class="docs-modal__header">
3
+ <h1 class="docs-modal__title">{{ $t("selectable-version.title") }}</h1>
4
+ <button type="button" class="docs-modal__close">
5
+ <span>{{ $t("modal.close") }}</span>
6
+ <svg class="icon" focusable="false" aria-hidden="true">
7
+ <use xlink:href="#docs-icon-close"></use>
8
+ </svg>
9
+ </button>
10
+ </div>
11
+ <div class="docs-modal__body" id="version-list">
12
+ <p>{{ $t("selectable-version.loading") }}</p>
13
+ </div>
14
+ </dialog>
15
+
16
+ <template id="version-list-item">
17
+ <li class="docs-selectable-version__item">
18
+ <a class="docs-selectable-version__link"></a>
19
+ </li>
20
+ </template>