@oslokommune/punkt-css 12.21.6 → 12.23.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.
- package/CHANGELOG.md +36 -0
- package/dist/css/components/modal.css +90 -36
- package/dist/css/components/modal.min.css +1 -1
- package/dist/css/components/textinput.css +1 -1
- package/dist/css/components/textinput.min.css +1 -1
- package/dist/css/elements/checkbox-radio.css +2 -2
- package/dist/css/elements/checkbox-radio.min.css +1 -1
- package/dist/css/elements/input.css +1 -1
- package/dist/css/elements/input.min.css +1 -1
- package/dist/css/elements/select.css +1 -1
- package/dist/css/elements/select.min.css +1 -1
- package/dist/css/pkt-base.css +1 -1
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +91 -37
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-elements.css +3 -3
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +94 -40
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/variables/_index.scss +1 -1
- package/dist/scss/abstracts/variables/_typography.scss +130 -68
- package/dist/scss/components/_modal.scss +128 -47
- package/package.json +3 -3
|
@@ -6,54 +6,109 @@
|
|
|
6
6
|
@use '../abstracts/mixins/breakpoints' as *;
|
|
7
7
|
@use '../abstracts/' as *;
|
|
8
8
|
|
|
9
|
+
$pkt-modal-gap: map.get(variables.$spacing, 'size-32');
|
|
10
|
+
$pkt-modal-padding-sides: map.get(variables.$spacing, 'size-40');
|
|
11
|
+
|
|
9
12
|
.pkt-modal {
|
|
10
13
|
&[open] {
|
|
11
|
-
|
|
14
|
+
background-color: transparent;
|
|
12
15
|
border: none;
|
|
13
|
-
background: white;
|
|
14
16
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
gap: map.get(variables.$spacing, 'size-32');
|
|
19
|
-
align-items: center;
|
|
20
|
-
position: fixed;
|
|
21
|
-
|
|
22
|
-
max-height: 80vh;
|
|
17
|
+
padding: 0;
|
|
18
|
+
min-height: 30vh;
|
|
19
|
+
max-height: 90vh;
|
|
23
20
|
|
|
24
|
-
&::backdrop
|
|
21
|
+
&::backdrop,
|
|
22
|
+
& + .backdrop {
|
|
25
23
|
background-color: rgba(0, 0, 0, 0.55);
|
|
26
24
|
}
|
|
27
25
|
|
|
26
|
+
.pkt-modal__container {
|
|
27
|
+
padding-top: $pkt-modal-gap;
|
|
28
|
+
background: var(--pkt-color-background-default);
|
|
29
|
+
overflow-y: auto;
|
|
30
|
+
max-height: calc(100vh - 4rem);
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
.pkt-modal__header {
|
|
29
|
-
display:
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: 1fr auto;
|
|
36
|
+
grid-template-rows: auto;
|
|
37
|
+
justify-content: flex-start;
|
|
32
38
|
width: 100%;
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
.pkt-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
.pkt-modal__header-background {
|
|
42
|
+
background: var(--pkt-color-background-default);
|
|
43
|
+
grid-column: 1 / 2;
|
|
44
|
+
grid-row: 1 / 2;
|
|
45
|
+
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
|
|
50
|
+
.pkt-modal__headingText {
|
|
51
|
+
grid-column: 1 / 2;
|
|
52
|
+
grid-row: 1 / 2;
|
|
53
|
+
padding: $pkt-modal-gap 0 0 $pkt-modal-padding-sides;
|
|
54
|
+
margin: 0;
|
|
55
|
+
color: var(--pkt-color-text-body-default);
|
|
42
56
|
}
|
|
43
57
|
|
|
44
58
|
.pkt-modal__closeButton {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
59
|
+
grid-column: 2 / 3;
|
|
60
|
+
grid-row: 1 / 2;
|
|
61
|
+
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: row-reverse;
|
|
64
|
+
align-self: flex-start;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pkt-modal__closeButton--blue {
|
|
68
|
+
height: 100%;
|
|
69
|
+
background: var(--pkt-color-background-default);
|
|
70
|
+
.pkt-btn {
|
|
71
|
+
margin: map.get(variables.$spacing, 'size-4');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.pkt-modal__closeButton--yellow-filled {
|
|
76
|
+
.pkt-btn {
|
|
77
|
+
height: 4rem;
|
|
78
|
+
width: 4rem;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
align-items: center;
|
|
81
|
+
border: none;
|
|
82
|
+
border-radius: 50%;
|
|
83
|
+
color: var(--pkt-color-surface-strong-dark-blue);
|
|
84
|
+
background-color: var(--pkt-color-brand-yellow-1000);
|
|
85
|
+
|
|
86
|
+
&:hover,
|
|
87
|
+
&:focus {
|
|
88
|
+
background-color: var(--pkt-color-brand-warm-blue-1000);
|
|
89
|
+
color: var(--pkt-color-background-default);
|
|
90
|
+
.pkt-icon {
|
|
91
|
+
color: var(--pkt-color-background-default);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.pkt-link__icon {
|
|
96
|
+
width: unset;
|
|
97
|
+
height: 1.75rem;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
48
100
|
}
|
|
49
101
|
|
|
50
102
|
.pkt-modal__content {
|
|
51
103
|
display: flex;
|
|
52
104
|
flex-direction: column;
|
|
105
|
+
flex-grow: 1;
|
|
53
106
|
gap: map.get(variables.$spacing, 'size-16');
|
|
54
|
-
overflow: auto;
|
|
55
|
-
|
|
107
|
+
overflow-y: auto;
|
|
108
|
+
padding: map.get(variables.$spacing, 'size-32') map.get(variables.$spacing, 'size-40');
|
|
109
|
+
padding-top: 0;
|
|
56
110
|
position: relative;
|
|
111
|
+
color: var(--pkt-color-text-body-default);
|
|
57
112
|
background:
|
|
58
113
|
linear-gradient(var(--pkt-color-white) 30%, transparent) top,
|
|
59
114
|
linear-gradient(transparent, var(--pkt-color-border-subtle) 60%) bottom,
|
|
@@ -66,6 +121,7 @@
|
|
|
66
121
|
100% 50px,
|
|
67
122
|
100% 16px,
|
|
68
123
|
100% 16px;
|
|
124
|
+
max-height: calc(100vh - 10rem);
|
|
69
125
|
}
|
|
70
126
|
}
|
|
71
127
|
}
|
|
@@ -90,25 +146,17 @@ body.pkt-modal--open {
|
|
|
90
146
|
width: 640px;
|
|
91
147
|
}
|
|
92
148
|
|
|
93
|
-
.pkt-modal__btn {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
width: 100%;
|
|
101
|
-
justify-self: flex-end;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&--right-side {
|
|
105
|
-
display: flex;
|
|
106
|
-
justify-self: flex-end;
|
|
107
|
-
gap: map.get(variables.$spacing, 'size-16');
|
|
108
|
-
flex-wrap: wrap;
|
|
109
|
-
}
|
|
149
|
+
.pkt-modal__btn-wrapper {
|
|
150
|
+
padding-top: map.get(variables.$spacing, 'size-24');
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: flex-start;
|
|
153
|
+
gap: map.get(variables.$spacing, 'size-16');
|
|
154
|
+
flex-wrap: wrap;
|
|
155
|
+
width: 100%;
|
|
110
156
|
}
|
|
111
157
|
|
|
158
|
+
// Small screen
|
|
159
|
+
|
|
112
160
|
@media screen and (max-width: 640px) {
|
|
113
161
|
.pkt-modal {
|
|
114
162
|
&[open] {
|
|
@@ -119,6 +167,10 @@ body.pkt-modal--open {
|
|
|
119
167
|
font-size: map.get(variables.$font-size, 'size-22');
|
|
120
168
|
}
|
|
121
169
|
|
|
170
|
+
.pkt-modal__closeButton {
|
|
171
|
+
background-color: var(--pkt-color-background-default);
|
|
172
|
+
}
|
|
173
|
+
|
|
122
174
|
.pkt-modal__content {
|
|
123
175
|
letter-spacing: map.get(variables.$letter-spacing, 'tight');
|
|
124
176
|
font-size: map.get(variables.$font-size, 'size-16');
|
|
@@ -154,18 +206,47 @@ body.pkt-modal--open {
|
|
|
154
206
|
// Make sure the buttons are centered and stacked on mobile
|
|
155
207
|
@media screen and (max-width: 480px) {
|
|
156
208
|
.pkt-modal__btn {
|
|
157
|
-
|
|
158
|
-
|
|
209
|
+
&-wrapper {
|
|
210
|
+
display: grid;
|
|
211
|
+
grid-template-columns: 1fr;
|
|
159
212
|
justify-content: center;
|
|
160
213
|
align-items: center;
|
|
161
|
-
}
|
|
162
214
|
|
|
163
|
-
|
|
164
|
-
|
|
215
|
+
.pkt-btn {
|
|
216
|
+
justify-content: center;
|
|
217
|
+
}
|
|
165
218
|
}
|
|
166
219
|
}
|
|
167
220
|
}
|
|
168
221
|
|
|
222
|
+
// Adjustments for padding
|
|
223
|
+
|
|
169
224
|
.pkt-modal.pkt-modal--removePadding {
|
|
170
|
-
|
|
225
|
+
.pkt-modal__headingText,
|
|
226
|
+
.pkt-modal__content,
|
|
227
|
+
.pkt-modal__container {
|
|
228
|
+
padding: 0;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.pkt-modal.pkt-modal--noHeadingText {
|
|
233
|
+
.pkt-modal__container {
|
|
234
|
+
padding-top: 1rem;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Make sure the header has a background color if the close button is not yellow
|
|
239
|
+
// :has() is not supported in Safari thus we must set :is so that it is ignored in Safari and not crash at least.
|
|
240
|
+
.pkt-modal__header:is(:has(.pkt-modal__closeButton:not(.pkt-modal__closeButton--yellow-filled))) {
|
|
241
|
+
background-color: var(--pkt-color-background-default);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// In Modal docs, margin is being added on buttons because of some global style, thus we need to override it here so that our docs example is consistent with the component.
|
|
245
|
+
.pkt-modal
|
|
246
|
+
.pkt-modal__container
|
|
247
|
+
.pkt-modal__btn-wrapper
|
|
248
|
+
button.pkt-btn:not(.pkt-inputwrapper__helptext-expandable > .pkt-btn):not(.pkt-header__user-btn):not(
|
|
249
|
+
.pkt-searchinput__button
|
|
250
|
+
) {
|
|
251
|
+
margin: 0;
|
|
171
252
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.23.0",
|
|
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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"preview": "astro preview"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@oslokommune/punkt-assets": "^12.
|
|
23
|
+
"@oslokommune/punkt-assets": "^12.23.0",
|
|
24
24
|
"edit-json-file": "^1.8.0",
|
|
25
25
|
"fs-extra": "^11.2.0",
|
|
26
26
|
"prettier": "^3.3.3",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
55
55
|
},
|
|
56
56
|
"license": "MIT",
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "98a44ae9962af8297e125fefb09a6c6f7e65ef74"
|
|
58
58
|
}
|