@oslokommune/punkt-css 11.14.0 → 11.14.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.
@@ -1,6 +1,5 @@
1
1
  @forward 'accordion';
2
2
  @forward 'alert';
3
- @forward 'tag';
4
3
  @forward 'backlink';
5
4
  @forward 'badge';
6
5
  @forward 'breadcrumbs';
@@ -9,12 +8,14 @@
9
8
  @forward 'header';
10
9
  @forward 'icon';
11
10
  @forward 'inputwrapper';
12
- @forward 'tabs';
13
- @forward 'teaserlist';
14
- @forward 'messagebox';
15
11
  @forward 'linkcard';
16
12
  @forward 'loader';
13
+ @forward 'messagebox';
14
+ @forward 'progressbar';
15
+ @forward 'searchinput';
16
+ @forward 'stepper';
17
+ @forward 'tabs';
18
+ @forward 'tag';
17
19
  @forward 'tag';
20
+ @forward 'teaserlist';
18
21
  @forward 'textinput';
19
- @forward 'searchinput';
20
- @forward 'progressbar';
@@ -19,6 +19,7 @@ $-linkcard-spacing-big: map.get(variables.$spacing, 'size-24');
19
19
  text-decoration: none;
20
20
  width: 100%;
21
21
  height: 100%;
22
+ transition: background-color 0.2s linear;
22
23
 
23
24
  @include bp('laptop-up') {
24
25
  padding: $-linkcard-spacing-big;
@@ -103,6 +104,26 @@ $-linkcard-spacing-big: map.get(variables.$spacing, 'size-24');
103
104
  background-color: var(--pkt-color-surface-subtle-pale-blue);
104
105
  color: var(--pkt-color-text-body-dark) !important;
105
106
 
107
+ &:hover {
108
+ background-color: var(--pkt-color-surface-default-light-blue);
109
+ }
110
+
111
+ &:hover,
112
+ &:focus,
113
+ &:focus-visible,
114
+ &:active {
115
+ color: var(--pkt-color-brand-warm-blue-1000) !important;
116
+ }
117
+ }
118
+
119
+ &--grey {
120
+ background-color: var(--pkt-color-surface-default-gray);
121
+ color: var(--pkt-color-text-body-dark) !important;
122
+
123
+ &:hover {
124
+ background-color: var(--pkt-color-surface-strong-gray);
125
+ }
126
+
106
127
  &:hover,
107
128
  &:focus,
108
129
  &:focus-visible,
@@ -112,9 +133,13 @@ $-linkcard-spacing-big: map.get(variables.$spacing, 'size-24');
112
133
  }
113
134
 
114
135
  &--green {
115
- background-color: var(--pkt-color-surface-strong-light-green);
136
+ background-color: var(--pkt-color-surface-default-faded-green);
116
137
  color: var(--pkt-color-text-body-dark) !important;
117
138
 
139
+ &:hover {
140
+ background-color: var(--pkt-color-surface-strong-light-green);
141
+ }
142
+
118
143
  &:hover,
119
144
  &:focus,
120
145
  &:focus-visible,
@@ -0,0 +1,212 @@
1
+ /*
2
+ * Stepper component
3
+ */
4
+
5
+ @use 'sass:map';
6
+ @use '../abstracts/variables';
7
+ @use '../abstracts/mixins/breakpoints' as *;
8
+ @use '../abstracts/' as *;
9
+
10
+ // GENERELL STEPPER OG STEP
11
+ .pkt-stepper {
12
+ --pkt-steps-indicator-width: 24px;
13
+ --pkt-steps-indicator-height: 24px;
14
+ --pkt-steps-indicator-color: var(--pkt-color-brand-dark-blue-1000);
15
+ --pkt-steps-border-width: 2.5px;
16
+ --pkt-steps-line-length: 1.5rem;
17
+
18
+ color: var(--pkt-color-brand-dark-blue-1000);
19
+ font-size: map.get(variables.$font-size, 'size-18');
20
+ font-weight: map.get(variables.$font-weight, 'medium');
21
+ letter-spacing: map.get(variables.$letter-spacing, 'tight');
22
+ list-style: none;
23
+ margin: 0;
24
+ padding: 0;
25
+
26
+ .pkt-step {
27
+ display: grid;
28
+
29
+ &__wrapper {
30
+ grid-column: title / content;
31
+ grid-row: title / content;
32
+ }
33
+
34
+ &__title {
35
+ font-weight: map.get(variables.$font-weight, 'medium');
36
+ width: max-content;
37
+ width: 100%;
38
+ }
39
+
40
+ &__content {
41
+ font-weight: map.get(variables.$font-weight, 'light');
42
+ padding-bottom: map.get(variables.$spacing, 'size-24');
43
+ width: 100%;
44
+ }
45
+
46
+ &__indicator {
47
+ z-index: 2;
48
+ grid-area: indicator;
49
+ }
50
+
51
+ &__line {
52
+ background-color: var(--pkt-color-brand-dark-blue-1000);
53
+
54
+ &--1 {
55
+ grid-area: indicator;
56
+ }
57
+ &--2 {
58
+ grid-area: indicator;
59
+ }
60
+
61
+ &--3 {
62
+ grid-area: line;
63
+ height: fit-content;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ // VERTICAL STEPPER (default)
70
+ .pkt-stepper--vertical {
71
+ display: grid;
72
+ grid-template-columns: 1fr;
73
+
74
+ .pkt-step {
75
+ grid-template-areas: 'indicator title' 'line content';
76
+ grid-template-columns: var(--pkt-steps-indicator-width) auto;
77
+ grid-template-rows: var(--pkt-steps-indicator-height) minmax(min-content, max-content);
78
+ grid-gap: 0 1rem;
79
+ justify-items: flex-start;
80
+
81
+ &--current {
82
+ .pkt-step__title,
83
+ .pkt-step__content {
84
+ padding: map-get(variables.$spacing, 'size-16') map-get(variables.$spacing, 'size-24');
85
+ background-color: var(--pkt-color-surface-subtle-pale-blue);
86
+ }
87
+
88
+ .pkt-step__wrapper {
89
+ margin-bottom: map-get(variables.$spacing, 'size-24');
90
+ }
91
+ }
92
+
93
+ &__indicator {
94
+ & > svg {
95
+ vertical-align: baseline;
96
+ }
97
+ }
98
+
99
+ &__line {
100
+ min-height: min-content;
101
+ height: 100%;
102
+ margin: auto;
103
+ width: var(--pkt-steps-border-width);
104
+
105
+ &--1 {
106
+ height: 50%;
107
+ transform: translateY(-55%);
108
+ }
109
+ &--2 {
110
+ height: 50%;
111
+ transform: translateY(55%);
112
+ }
113
+
114
+ &--3 {
115
+ min-height: map.get(variables.$spacing, 'size-64');
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ // HORIZONTAL STEPPER
122
+ .pkt-stepper--horizontal {
123
+ display: flex;
124
+
125
+ .pkt-step {
126
+ grid-template-areas: 'indicator line' 'title title' 'content content';
127
+ grid-template-columns: var(--pkt-steps-indicator-width) auto;
128
+ grid-template-rows: var(--pkt-steps-indicator-width) min-content min-content;
129
+ justify-items: flex-start;
130
+
131
+ &__wrapper {
132
+ min-width: fit-content;
133
+ }
134
+ &__title {
135
+ padding: map-get(variables.$spacing, 'size-24') map-get(variables.$spacing, 'size-16')
136
+ map-get(variables.$spacing, 'size-24') 0;
137
+ }
138
+
139
+ &__content {
140
+ padding: 0 map-get(variables.$spacing, 'size-16') map-get(variables.$spacing, 'size-16') 0;
141
+ }
142
+
143
+ &__indicator > svg {
144
+ vertical-align: baseline;
145
+ }
146
+
147
+ &__line {
148
+ min-width: min-content;
149
+ width: 100%;
150
+ margin: auto;
151
+
152
+ height: var(--pkt-steps-border-width);
153
+
154
+ &--1 {
155
+ width: 50%;
156
+ transform: translateX(-55%);
157
+ }
158
+ &--2 {
159
+ width: 50%;
160
+ transform: translateX(55%);
161
+ }
162
+
163
+ &--3 {
164
+ min-width: map.get(variables.$spacing, 'size-80');
165
+ }
166
+ }
167
+ }
168
+ }
169
+
170
+ // FIRST STEP
171
+ .pkt-step:first-of-type {
172
+ .pkt-step__line--1 {
173
+ display: none;
174
+ }
175
+ }
176
+
177
+ // INCOMPLETE STEP
178
+ .pkt-step--incomplete {
179
+ .pkt-step__line {
180
+ background-color: var(--pkt-color-grays-gray-200);
181
+ }
182
+
183
+ .pkt-step__title,
184
+ .pkt-step__content {
185
+ color: var(--pkt-color-grays-gray-600);
186
+ }
187
+ }
188
+
189
+ // FIRST INCOMPLETE STEP
190
+ .pkt-step--current + .pkt-step--incomplete {
191
+ .pkt-step__line--1 {
192
+ background-color: var(--pkt-color-brand-dark-blue-1000);
193
+ }
194
+ .pkt-step__line--2 {
195
+ background-color: var(--pkt-color-grays-gray-200);
196
+ }
197
+ }
198
+
199
+ // LAST STEP
200
+ .pkt-step:last-of-type {
201
+ .pkt-step__line--3,
202
+ .pkt-step__line--2 {
203
+ display: none;
204
+ }
205
+ }
206
+
207
+ // ALL STEP CONTENT EXCEPT CURRENT
208
+ .pkt-step--hidden:not(.pkt-step--current) {
209
+ .pkt-step__content {
210
+ display: none;
211
+ }
212
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-css",
3
- "version": "11.14.0",
3
+ "version": "11.14.2",
4
4
  "description": "CSS-rammeverket til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -55,5 +55,5 @@
55
55
  "url": "https://github.com/oslokommune/punkt/issues"
56
56
  },
57
57
  "license": "MIT",
58
- "gitHead": "bb16f0f94234a0251ca4b9ebec68f65385cd7fa4"
58
+ "gitHead": "817b273dbc62a68c7c9bf259e08bacd26bc538a1"
59
59
  }