@navikt/ds-css 7.4.0 → 7.4.2

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 (71) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/darkside/accordion.darkside.css +198 -0
  3. package/darkside/action-menu.darkside.css +227 -0
  4. package/darkside/alert.darkside.css +113 -0
  5. package/darkside/baseline/theme.darkside.css +4 -2
  6. package/darkside/button.darkside.css +318 -4
  7. package/darkside/chat.darkside.css +120 -0
  8. package/darkside/chips.darkside.css +234 -0
  9. package/darkside/copybutton.darkside.css +226 -0
  10. package/darkside/date.darkside.css +344 -0
  11. package/darkside/dropdown.darkside.css +91 -0
  12. package/darkside/expansioncard.darkside.css +235 -0
  13. package/darkside/form/combobox.darkside.css +441 -0
  14. package/darkside/form/confirmation-panel.darkside.css +53 -0
  15. package/darkside/form/error-summary.darkside.css +55 -0
  16. package/darkside/form/fieldset.darkside.css +51 -0
  17. package/darkside/form/file-upload.darkside.css +230 -0
  18. package/darkside/form/form-progress.darkside.css +52 -0
  19. package/darkside/form/form-summary.darkside.css +78 -0
  20. package/darkside/form/form.darkside.css +61 -0
  21. package/darkside/form/index.css +16 -0
  22. package/darkside/form/radio-checkbox.darkside.css +356 -0
  23. package/darkside/form/search.darkside.css +228 -0
  24. package/darkside/form/select.darkside.css +115 -0
  25. package/darkside/form/switch.darkside.css +269 -0
  26. package/darkside/form/text-field.darkside.css +112 -0
  27. package/darkside/form/textarea.darkside.css +144 -0
  28. package/darkside/guide-panel.darkside.css +96 -0
  29. package/darkside/help-text.darkside.css +85 -0
  30. package/darkside/index copy.css +37 -0
  31. package/darkside/index.css +36 -1
  32. package/darkside/internalheader.darkside.css +105 -0
  33. package/darkside/link-panel.darkside.css +47 -0
  34. package/darkside/link.darkside.css +79 -0
  35. package/darkside/list.darkside.css +85 -0
  36. package/darkside/loader.darkside.css +119 -0
  37. package/darkside/modal.darkside.css +209 -0
  38. package/darkside/pagination.darkside.css +73 -0
  39. package/darkside/panel.darkside.css +10 -0
  40. package/darkside/popover.darkside.css +84 -0
  41. package/darkside/primitives/base.darkside.css +809 -0
  42. package/darkside/primitives/bleed.darkside.css +103 -0
  43. package/darkside/primitives/box.darkside.css +66 -0
  44. package/darkside/primitives/hgrid.darkside.css +80 -0
  45. package/darkside/primitives/index.css +36 -0
  46. package/darkside/primitives/page.darkside.css +63 -0
  47. package/darkside/primitives/responsive.darkside.css +59 -0
  48. package/darkside/primitives/stack.darkside.css +155 -0
  49. package/darkside/progress-bar.darkside.css +108 -0
  50. package/darkside/read-more.darkside.css +91 -0
  51. package/darkside/skeleton.darkside.css +67 -0
  52. package/darkside/stepper.darkside.css +308 -0
  53. package/darkside/table.darkside.css +286 -0
  54. package/darkside/tabs.darkside.css +154 -0
  55. package/darkside/tag.darkside.css +194 -0
  56. package/darkside/timeline.darkside.css +449 -0
  57. package/darkside/toggle-group.darkside.css +181 -0
  58. package/darkside/tooltip.darkside.css +81 -0
  59. package/darkside/typography.darkside.css +253 -0
  60. package/dist/component/form.css +0 -1
  61. package/dist/component/form.min.css +1 -1
  62. package/dist/component/index.css +1 -2
  63. package/dist/component/index.min.css +2 -2
  64. package/dist/components.css +1 -2
  65. package/dist/components.min.css +2 -2
  66. package/dist/global/tokens.css +1 -1
  67. package/dist/global/tokens.min.css +1 -1
  68. package/dist/index.css +1 -2
  69. package/dist/index.min.css +2 -2
  70. package/form/combobox.css +0 -1
  71. package/package.json +2 -2
@@ -0,0 +1,37 @@
1
+ @charset "UTF-8";
2
+
3
+ @import "baseline/index.css";
4
+ @import "typography.css";
5
+ @import "accordion.css";
6
+ @import "alert.css";
7
+ @import "button.css";
8
+ @import "chat.css";
9
+ @import "chips.css";
10
+ @import "copybutton.css";
11
+ @import "dropdown.css";
12
+ @import "action-menu.css";
13
+ @import "expansioncard.css";
14
+ @import "guide-panel.css";
15
+ @import "form/index.css";
16
+ @import "help-text.css";
17
+ @import "internalheader.css";
18
+ @import "link.css";
19
+ @import "loader.css";
20
+ @import "modal.css";
21
+ @import "pagination.css";
22
+ @import "popover.css";
23
+ @import "date.css";
24
+ @import "tag.css";
25
+ @import "timeline.css";
26
+ @import "tooltip.css";
27
+ @import "toggle-group.css";
28
+ @import "panel.css";
29
+ @import "link-panel.css";
30
+ @import "read-more.css";
31
+ @import "progress-bar.css";
32
+ @import "skeleton.css";
33
+ @import "stepper.css";
34
+ @import "table.css";
35
+ @import "tabs.css";
36
+ @import "list.css";
37
+ @import "primitives/index.css";
@@ -1,6 +1,6 @@
1
1
  @charset "UTF-8";
2
2
 
3
- @layer aksel.reset, aksel.typography, aksel.theme, aksel.components, aksel.utilities;
3
+ @layer aksel.reset, aksel.typography, aksel.theme, aksel.forms, aksel.components, aksel.layout, aksel.utilities;
4
4
 
5
5
  /* CSS foundations */
6
6
  @import "./baseline/reset.darkside.css" layer(aksel.reset);
@@ -10,8 +10,43 @@
10
10
  @import "./typography.darkside.css" layer(aksel.typography);
11
11
  @import "./baseline/utilities.darkside.css" layer(aksel.utilities);
12
12
 
13
+ /* Test: Handles layers itself */
14
+ @import "./form/index.css";
15
+ @import "./primitives/index.css";
16
+
13
17
  /* Theming */
14
18
  @import "@navikt/ds-tokens/dist/darkside/tokens.css" layer(aksel.theme);
15
19
 
16
20
  /* Components */
21
+ @import "../primitives/stack.css" layer(aksel.components);
22
+ @import "./accordion.darkside.css" layer(aksel.components);
17
23
  @import "./button.darkside.css" layer(aksel.components);
24
+ @import "./alert.darkside.css" layer(aksel.components);
25
+ @import "./chat.darkside.css" layer(aksel.components);
26
+ @import "./chips.darkside.css" layer(aksel.components);
27
+ @import "./copybutton.darkside.css" layer(aksel.components);
28
+ @import "./dropdown.darkside.css" layer(aksel.components);
29
+ @import "./action-menu.darkside.css" layer(aksel.components);
30
+ @import "./expansioncard.darkside.css" layer(aksel.components);
31
+ @import "./guide-panel.darkside.css" layer(aksel.components);
32
+ @import "./help-text.darkside.css" layer(aksel.components);
33
+ @import "./internalheader.darkside.css" layer(aksel.components);
34
+ @import "./link.darkside.css" layer(aksel.components);
35
+ @import "./loader.darkside.css" layer(aksel.components);
36
+ @import "./modal.darkside.css" layer(aksel.components);
37
+ @import "./pagination.darkside.css" layer(aksel.components);
38
+ @import "./popover.darkside.css" layer(aksel.components);
39
+ @import "./date.darkside.css" layer(aksel.components);
40
+ @import "./tag.darkside.css" layer(aksel.components);
41
+ @import "./timeline.darkside.css" layer(aksel.components);
42
+ @import "./tooltip.darkside.css" layer(aksel.components);
43
+ @import "./toggle-group.darkside.css" layer(aksel.components);
44
+ @import "./panel.darkside.css" layer(aksel.components);
45
+ @import "./link-panel.darkside.css" layer(aksel.components);
46
+ @import "./read-more.darkside.css" layer(aksel.components);
47
+ @import "./progress-bar.darkside.css" layer(aksel.components);
48
+ @import "./skeleton.darkside.css" layer(aksel.components);
49
+ @import "./stepper.darkside.css" layer(aksel.components);
50
+ @import "./table.darkside.css" layer(aksel.components);
51
+ @import "./tabs.darkside.css" layer(aksel.components);
52
+ @import "./list.darkside.css" layer(aksel.components);
@@ -0,0 +1,105 @@
1
+ .navds-internalheader {
2
+ display: flex;
3
+ align-self: stretch;
4
+ background: var(--ac-internalheader-bg, var(--a-surface-inverted));
5
+ min-height: 3rem;
6
+
7
+ --navds-internalheader-focus: inset 0 0 0 2px var(--a-border-focus-on-inverted);
8
+ }
9
+
10
+ @media (forced-colors: active) {
11
+ .navds-internalheader {
12
+ background-color: ButtonFace;
13
+ border: solid 1px ButtonText;
14
+ color: ButtonText;
15
+ }
16
+
17
+ .navds-internalheader a:focus-visible {
18
+ box-shadow: none;
19
+ outline: 2px solid highlight;
20
+ outline-offset: 2px;
21
+ }
22
+
23
+ .navds-internalheader .navds-internalheader__button:focus-visible {
24
+ box-shadow: none;
25
+ outline: 2px solid highlight;
26
+ outline-offset: 2px;
27
+ }
28
+ }
29
+
30
+ .navds-internalheader__title {
31
+ border: none;
32
+ overflow: visible;
33
+ background: transparent;
34
+ font: inherit;
35
+ font-weight: var(--a-font-weight-bold);
36
+ line-height: normal;
37
+ text-align: left;
38
+ padding: 0 var(--a-spacing-5) 0 var(--a-spacing-6);
39
+ border-right: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
40
+ display: flex;
41
+ align-items: center;
42
+ text-decoration: none;
43
+ margin: 0;
44
+ color: var(--ac-internalheader-text, var(--a-text-on-inverted));
45
+ }
46
+
47
+ button.navds-internalheader__title {
48
+ cursor: pointer;
49
+ }
50
+
51
+ .navds-internalheader__user {
52
+ padding: 0 var(--a-spacing-5);
53
+ border-left: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
54
+ display: flex;
55
+ align-items: center;
56
+ }
57
+
58
+ .navds-internalheader__button {
59
+ border: none;
60
+ margin: 0;
61
+ padding: 0 var(--a-spacing-3);
62
+ overflow: visible;
63
+ background: transparent;
64
+ font: inherit;
65
+ line-height: normal;
66
+ cursor: pointer;
67
+ text-align: left;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-self: center;
71
+ gap: var(--a-spacing-2);
72
+ border-left: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
73
+ color: var(--ac-internalheader-text, var(--a-text-on-inverted));
74
+ }
75
+
76
+ a.navds-internalheader__title:hover,
77
+ button.navds-internalheader__title:hover,
78
+ .navds-internalheader__button:hover {
79
+ background-color: var(--ac-internalheader-hover-bg, var(--a-surface-inverted-hover));
80
+ }
81
+
82
+ .navds-internalheader__title:focus-visible,
83
+ .navds-internalheader__button:focus-visible {
84
+ box-shadow: var(--navds-internalheader-focus);
85
+ outline: none;
86
+ }
87
+
88
+ @supports not selector(:focus-visible) {
89
+ .navds-internalheader__title:focus,
90
+ .navds-internalheader__button:focus {
91
+ box-shadow: var(--navds-internalheader-focus);
92
+ outline: none;
93
+ }
94
+ }
95
+
96
+ a.navds-internalheader__title:active,
97
+ button.navds-internalheader__title:active,
98
+ .navds-internalheader__button:active {
99
+ background-color: var(--ac-internalheader-active-bg, var(--a-surface-inverted-active));
100
+ }
101
+
102
+ .navds-internalheader__user-button {
103
+ padding-left: var(--a-spacing-5);
104
+ gap: var(--a-spacing-4);
105
+ }
@@ -0,0 +1,47 @@
1
+ .navds-link-panel {
2
+ text-decoration: none;
3
+ color: var(--ac-link-panel-text, var(--a-text-default));
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ gap: var(--a-spacing-4);
8
+ }
9
+
10
+ .navds-link-panel:hover .navds-link-panel__title {
11
+ text-decoration: underline;
12
+ color: var(--ac-link-panel-hover-text, var(--a-text-action-hover));
13
+ }
14
+
15
+ .navds-link-panel:hover {
16
+ box-shadow: var(--a-shadow-small);
17
+ border-color: var(--ac-link-panel-hover-border, var(--a-border-action-hover));
18
+ }
19
+
20
+ .navds-link-panel:focus-visible {
21
+ outline: 3px solid transparent;
22
+ outline-offset: 2px;
23
+ box-shadow: var(--a-shadow-focus);
24
+ }
25
+
26
+ @supports not selector(:focus-visible) {
27
+ .navds-link-panel:focus {
28
+ outline: 3px solid transparent;
29
+ outline-offset: 2px;
30
+ box-shadow: var(--a-shadow-focus);
31
+ }
32
+ }
33
+
34
+ .navds-link-panel__chevron {
35
+ flex-shrink: 0;
36
+ font-size: 1.5rem;
37
+ transition: transform 200ms;
38
+ }
39
+
40
+ .navds-link-panel:hover > .navds-link-panel__chevron,
41
+ .navds-link-panel:focus-within > .navds-link-panel__chevron {
42
+ transform: translateX(4px);
43
+ }
44
+
45
+ .navds-link-panel__description {
46
+ margin-top: var(--a-spacing-1);
47
+ }
@@ -0,0 +1,79 @@
1
+ .navds-link {
2
+ color: var(--ac-link-text, var(--a-text-action));
3
+ text-decoration: underline;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: var(--a-spacing-1);
7
+ }
8
+
9
+ .navds-link.navds-link--inline-text {
10
+ display: inline;
11
+ }
12
+
13
+ .navds-link.navds-link--inline-text > svg {
14
+ /* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties */
15
+ margin: 0.1em 0.1em -0.1em;
16
+ transform: translateY(0.05em);
17
+ display: inline;
18
+ vertical-align: baseline;
19
+ }
20
+
21
+ .navds-link:hover {
22
+ text-decoration: none;
23
+ }
24
+
25
+ .navds-link.navds-link--remove-underline {
26
+ text-decoration: none;
27
+ }
28
+
29
+ .navds-link.navds-link--remove-underline:hover {
30
+ text-decoration: underline;
31
+ }
32
+
33
+ .navds-alert .navds-link,
34
+ .navds-confirmation-panel .navds-link {
35
+ color: var(--a-text-default);
36
+ }
37
+
38
+ .navds-link:focus-visible {
39
+ outline: 2px solid transparent;
40
+ color: var(--ac-link-focus-text, var(--a-text-on-action));
41
+ text-decoration: none;
42
+ background-color: var(--ac-link-focus-bg, var(--a-border-focus));
43
+ box-shadow: 0 0 0 2px var(--ac-link-focus-border, var(--a-border-focus));
44
+ }
45
+
46
+ @supports not selector(:focus-visible) {
47
+ .navds-link:focus {
48
+ outline: 2px solid transparent;
49
+ color: var(--ac-link-focus-text, var(--a-text-on-action));
50
+ text-decoration: none;
51
+ background-color: var(--ac-link-focus-bg, var(--a-border-focus));
52
+ box-shadow: 0 0 0 2px var(--ac-link-focus-border, var(--a-border-focus));
53
+ }
54
+ }
55
+
56
+ .navds-link:active {
57
+ outline: 2px solid transparent;
58
+ color: var(--ac-link-active-text, var(--a-text-on-action));
59
+ text-decoration: none;
60
+ background-color: var(--ac-link-active-bg, var(--a-border-focus));
61
+ box-shadow: 0 0 0 2px var(--ac-link-active-border, var(--a-border-focus));
62
+ }
63
+
64
+ .navds-link svg {
65
+ color: inherit;
66
+ flex-shrink: 0;
67
+ }
68
+
69
+ .navds-link--action {
70
+ color: var(--ac-link-action-text, var(--a-text-action));
71
+ }
72
+
73
+ .navds-link--neutral {
74
+ color: var(--ac-link-neutral-text, var(--a-text-default));
75
+ }
76
+
77
+ .navds-link--subtle {
78
+ color: var(--ac-link-subtle-text, var(--a-text-subtle));
79
+ }
@@ -0,0 +1,85 @@
1
+ .navds-list ul,
2
+ .navds-list ol {
3
+ padding: 0;
4
+ margin-block: var(--a-spacing-4);
5
+ }
6
+
7
+ .navds-list--small ul,
8
+ .navds-list--small ol {
9
+ margin-block: var(--a-spacing-3);
10
+ }
11
+
12
+ .navds-list .navds-list :where(ul, ol) {
13
+ margin-block: var(--a-spacing-2) 0;
14
+ }
15
+
16
+ .navds-list ol {
17
+ list-style: decimal; /* This is the default value, but some frameworks have `ol,ul { list-style:none }` */
18
+ padding-left: 1.7rem;
19
+ }
20
+
21
+ .navds-list ol > .navds-list__item {
22
+ padding-left: 0.3rem;
23
+ }
24
+
25
+ /* SAFARI HACK START */
26
+ /* stylelint-disable selector-type-no-unknown */
27
+
28
+ _::-webkit-full-page-media,
29
+ _:future,
30
+ :root .navds-list ol {
31
+ padding-left: 2.1rem;
32
+ }
33
+
34
+ _::-webkit-full-page-media,
35
+ _:future,
36
+ :root .navds-list ol .navds-list__item {
37
+ padding-left: 0;
38
+ }
39
+
40
+ /* SAFARI HACK END */
41
+ /* stylelint-enable selector-type-no-unknown */
42
+
43
+ .navds-list__item {
44
+ margin-block-end: var(--a-spacing-2);
45
+ }
46
+
47
+ .navds-list__item:last-child {
48
+ margin-block-end: 0;
49
+ }
50
+
51
+ .navds-list ul > .navds-list__item {
52
+ display: grid;
53
+ grid-template-columns: auto 1fr;
54
+ gap: var(--a-spacing-2);
55
+ }
56
+
57
+ .navds-list ol li::marker {
58
+ font-weight: var(--a-font-weight-bold);
59
+ color: var(--ac-list-marker-ol-color, var(--ac-list-marker-color, var(--a-icon-default)));
60
+ }
61
+
62
+ .navds-list__item-marker {
63
+ width: 1.5rem;
64
+ }
65
+
66
+ .navds-list ul > li > .navds-list__item-marker {
67
+ display: flex;
68
+ align-items: center;
69
+ height: var(--a-font-line-height-xlarge);
70
+ }
71
+
72
+ .navds-list--small ul > li > .navds-list__item-marker {
73
+ height: var(--a-font-line-height-large);
74
+ }
75
+
76
+ .navds-list__item-marker--bullet {
77
+ padding-left: 0.8rem;
78
+ color: var(--ac-list-marker-ul-color, var(--ac-list-marker-color, var(--a-icon-default)));
79
+ }
80
+
81
+ .navds-list__item-marker--icon {
82
+ font-size: 1.5rem;
83
+ justify-content: center;
84
+ color: var(--ac-list-marker-icon-color, var(--ac-list-marker-color, var(--a-icon-default)));
85
+ }
@@ -0,0 +1,119 @@
1
+ .navds-loader {
2
+ width: 1.5rem;
3
+ display: inline-block;
4
+ position: relative;
5
+ animation: loader-rotate 1.8s linear infinite;
6
+ stroke-width: 6;
7
+
8
+ --ac-loader-background-stroke-width: 5.9;
9
+ }
10
+
11
+ .navds-loader__foreground {
12
+ animation: loader-dasharray 1.8s ease-in-out infinite;
13
+ stroke-dasharray: 80px, 200px;
14
+ stroke-dashoffset: 0;
15
+ stroke: var(--ac-loader-stroke, var(--a-border-default));
16
+ }
17
+
18
+ .navds-loader__background {
19
+ stroke: var(--ac-loader-stroke-bg, var(--a-surface-active));
20
+ stroke-width: var(--ac-loader-background-stroke-width);
21
+ }
22
+
23
+ .navds-loader--neutral .navds-loader__foreground {
24
+ stroke: var(--ac-loader-neutral-stroke, var(--a-border-default));
25
+ }
26
+
27
+ .navds-loader--interaction .navds-loader__foreground {
28
+ stroke: var(--ac-loader-interaction-stroke, var(--a-border-action));
29
+ }
30
+
31
+ .navds-loader--inverted .navds-loader__foreground {
32
+ stroke: var(--ac-loader-inverted-stroke, var(--a-border-on-inverted));
33
+ }
34
+
35
+ .navds-loader--inverted .navds-loader__background {
36
+ stroke: var(--ac-loader-inverted-stroke-bg, var(--a-border-on-inverted-subtle));
37
+ }
38
+
39
+ .navds-loader--transparent .navds-loader__background {
40
+ stroke: var(--a-surface-transparent);
41
+ }
42
+
43
+ .navds-loader--3xlarge {
44
+ width: 5.5rem;
45
+ stroke-width: 5;
46
+
47
+ --ac-loader-background-stroke-width: 4.8;
48
+ }
49
+
50
+ .navds-loader--2xlarge {
51
+ width: 4rem;
52
+ stroke-width: 6;
53
+
54
+ --ac-loader-background-stroke-width: 5.8;
55
+ }
56
+
57
+ .navds-loader--xlarge {
58
+ width: 2.5rem;
59
+ stroke-width: 6;
60
+
61
+ --ac-loader-background-stroke-width: 5.8;
62
+ }
63
+
64
+ .navds-loader--large {
65
+ width: 2rem;
66
+ stroke-width: 7;
67
+
68
+ --ac-loader-background-stroke-width: 6.8;
69
+ }
70
+
71
+ .navds-loader--medium {
72
+ width: 1.5rem;
73
+ stroke-width: 7;
74
+
75
+ --ac-loader-background-stroke-width: 6.8;
76
+ }
77
+
78
+ .navds-loader--small {
79
+ width: 1.25rem;
80
+ stroke-width: 8;
81
+
82
+ --ac-loader-background-stroke-width: 7.8;
83
+ }
84
+
85
+ .navds-loader--xsmall {
86
+ width: 1rem;
87
+ stroke-width: 8;
88
+
89
+ --ac-loader-background-stroke-width: 7.8;
90
+ }
91
+
92
+ @keyframes loader-rotate {
93
+ 100% {
94
+ transform: rotate(360deg);
95
+ }
96
+ }
97
+
98
+ @keyframes loader-dasharray {
99
+ 0% {
100
+ stroke-dasharray: 1px, 200px;
101
+ stroke-dashoffset: 0;
102
+ }
103
+
104
+ 50% {
105
+ stroke-dasharray: 100px, 200px;
106
+ stroke-dashoffset: -15px;
107
+ }
108
+
109
+ 100% {
110
+ stroke-dasharray: 100px, 200px;
111
+ stroke-dashoffset: -120px;
112
+ }
113
+ }
114
+
115
+ @media (forced-colors: active) {
116
+ .navds-loader__background {
117
+ stroke: canvastext;
118
+ }
119
+ }