@oslokommune/punkt-css 13.2.3 → 13.3.1
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 +1721 -1255
- package/README.md +2 -2
- package/dist/css/components/accordion.css +9 -0
- package/dist/css/components/accordion.min.css +1 -1
- package/dist/css/components/heading.css +3 -3
- package/dist/css/components/heading.min.css +1 -1
- package/dist/css/components/loader.css +1 -0
- package/dist/css/components/loader.min.css +1 -1
- package/dist/css/components/preview.css +100 -16
- package/dist/css/components/preview.min.css +1 -1
- package/dist/css/components/tabs.css +1 -1
- package/dist/css/components/tabs.min.css +1 -1
- package/dist/css/components/tag.css +5 -0
- package/dist/css/components/tag.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/elements/table.css +2 -1
- package/dist/css/elements/table.min.css +1 -1
- package/dist/css/pkt-base.css +93 -89
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +120 -21
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-docs.css +218 -118
- package/dist/css/pkt-docs.min.css +1 -1
- package/dist/css/pkt-elements.css +5 -4
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt-normalise.css +1 -1
- package/dist/css/pkt-normalise.min.css +1 -1
- package/dist/css/pkt.css +218 -114
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/mixins/_breakpoints.scss +46 -1
- package/dist/scss/abstracts/variables/_index.scss +1 -1
- package/dist/scss/abstracts/variables/_typography.scss +1 -1
- package/dist/scss/base/_defaults.scss +2 -2
- package/dist/scss/base/_grid.scss +2 -1
- package/dist/scss/base/_typography.scss +5 -2
- package/dist/scss/components/_accordion.scss +10 -0
- package/dist/scss/components/_heading.scss +3 -3
- package/dist/scss/components/_loader.scss +1 -0
- package/dist/scss/components/_preview.scss +102 -16
- package/dist/scss/components/_tabs.scss +1 -1
- package/dist/scss/components/_tag.scss +4 -1
- package/dist/scss/elements/_table.scss +2 -1
- package/dist/scss/normalise/_index.scss +1 -1
- package/dist/scss/pkt-docs.scss +0 -3
- package/package.json +3 -3
|
@@ -6,52 +6,97 @@
|
|
|
6
6
|
// the verbose thing
|
|
7
7
|
// - TODO: reflect current media queries for use in javascript.
|
|
8
8
|
// https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
|
|
9
|
-
|
|
10
9
|
@mixin bp($name) {
|
|
11
10
|
@if $name== 'mobile' {
|
|
11
|
+
// 0px to 575px
|
|
12
12
|
@media screen and (min-width: 0rem) and (max-width: 35.938rem) {
|
|
13
13
|
@content;
|
|
14
14
|
}
|
|
15
15
|
} @else if $name== 'mobile-up' {
|
|
16
|
+
// 0px and up
|
|
16
17
|
@media screen and (min-width: 0rem) {
|
|
17
18
|
@content;
|
|
18
19
|
}
|
|
19
20
|
} @else if $name== 'phablet' {
|
|
21
|
+
// 575px to 767px
|
|
20
22
|
@media screen and (min-width: 35.938rem) and (max-width: 47.938rem) {
|
|
21
23
|
@content;
|
|
22
24
|
}
|
|
23
25
|
} @else if $name== 'phablet-up' {
|
|
26
|
+
// 575px and up
|
|
24
27
|
@media screen and (min-width: 35.938rem) {
|
|
25
28
|
@content;
|
|
26
29
|
}
|
|
27
30
|
} @else if $name== 'tablet' {
|
|
31
|
+
// 768px to 1023px
|
|
28
32
|
@media screen and (min-width: 48rem) and (max-width: 63.938rem) {
|
|
29
33
|
@content;
|
|
30
34
|
}
|
|
31
35
|
} @else if $name== 'tablet-up' {
|
|
36
|
+
// 768px and up
|
|
32
37
|
@media screen and (min-width: 48rem) {
|
|
33
38
|
@content;
|
|
34
39
|
}
|
|
35
40
|
} @else if $name== 'tablet-big' {
|
|
41
|
+
// 1024px to 1279px
|
|
36
42
|
@media screen and (min-width: 64rem) and (max-width: 79.938rem) {
|
|
37
43
|
@content;
|
|
38
44
|
}
|
|
39
45
|
} @else if $name== 'tablet-big-up' {
|
|
46
|
+
// 1024px and up
|
|
40
47
|
@media screen and (min-width: 64rem) {
|
|
41
48
|
@content;
|
|
42
49
|
}
|
|
43
50
|
} @else if $name== 'laptop' {
|
|
51
|
+
// 1280px to 1599px
|
|
44
52
|
@media screen and (min-width: 80rem) and (max-width: 99.938rem) {
|
|
45
53
|
@content;
|
|
46
54
|
}
|
|
47
55
|
} @else if $name== 'laptop-up' {
|
|
56
|
+
// 1280px and up
|
|
48
57
|
@media screen and (min-width: 80rem) {
|
|
49
58
|
@content;
|
|
50
59
|
}
|
|
51
60
|
} @else if $name== 'desktop-up' {
|
|
61
|
+
// 1600px and up
|
|
52
62
|
@media screen and (min-width: 100rem) {
|
|
53
63
|
@content;
|
|
54
64
|
}
|
|
65
|
+
} @else if $name== 'mobile-to-phablet' {
|
|
66
|
+
// 0px to 575px
|
|
67
|
+
@media screen and (min-width: 0rem) and (max-width: 35.938rem) {
|
|
68
|
+
@content;
|
|
69
|
+
}
|
|
70
|
+
} @else if $name== 'mobile-to-laptop' {
|
|
71
|
+
// 0px to 1279px
|
|
72
|
+
@media screen and (min-width: 0rem) and (max-width: 79.938rem) {
|
|
73
|
+
@content;
|
|
74
|
+
}
|
|
75
|
+
} @else if $name== 'mobile-to-tablet' {
|
|
76
|
+
// 0px to 767px
|
|
77
|
+
@media screen and (min-width: 0rem) and (max-width: 47.938rem) {
|
|
78
|
+
@content;
|
|
79
|
+
}
|
|
80
|
+
} @else if $name== 'tablet-to-tablet-big' {
|
|
81
|
+
// 768px to 1023px
|
|
82
|
+
@media screen and (min-width: 48rem) and (max-width: 63.938rem) {
|
|
83
|
+
@content;
|
|
84
|
+
}
|
|
85
|
+
} @else if $name== 'phablet-to-tablet-big' {
|
|
86
|
+
// 575px to 1023px
|
|
87
|
+
@media screen and (min-width: 35.938rem) and (max-width: 63.938rem) {
|
|
88
|
+
@content;
|
|
89
|
+
}
|
|
90
|
+
} @else if $name== 'tablet-to-laptop' {
|
|
91
|
+
// 768px to 1279px
|
|
92
|
+
@media screen and (min-width: 48rem) and (max-width: 79.938rem) {
|
|
93
|
+
@content;
|
|
94
|
+
}
|
|
95
|
+
} @else if $name== 'tablet-big-to-laptop' {
|
|
96
|
+
// 1024px to 1279px
|
|
97
|
+
@media screen and (min-width: 64rem) and (max-width: 79.938rem) {
|
|
98
|
+
@content;
|
|
99
|
+
}
|
|
55
100
|
} @else {
|
|
56
101
|
@media screen and (min-width: $name) {
|
|
57
102
|
@content;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/*
|
|
2
2
|
* Defaults for elementer
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
@@ -35,7 +35,7 @@ body {
|
|
|
35
35
|
-moz-osx-font-smoothing: grayscale;
|
|
36
36
|
min-height: 100vh;
|
|
37
37
|
overflow-y: auto;
|
|
38
|
-
line-height: 1.
|
|
38
|
+
line-height: 1.75;
|
|
39
39
|
text-rendering: optimizeSpeed;
|
|
40
40
|
scroll-behavior: smooth;
|
|
41
41
|
}
|
|
@@ -12,13 +12,16 @@
|
|
|
12
12
|
@use '../abstracts/functions';
|
|
13
13
|
|
|
14
14
|
body {
|
|
15
|
-
color: var(--pkt-color-text-body-default);
|
|
16
15
|
font-family: #{map.get(variables.$font-family, 'normal')};
|
|
17
16
|
font-size: map.get(variables.$font-size, 'size-16');
|
|
18
17
|
font-weight: map.get(variables.$font-weight, 'light');
|
|
19
18
|
letter-spacing: map.get(variables.$letter-spacing, 'normal');
|
|
20
19
|
line-height: map.get(variables.$line-height, 'body');
|
|
21
20
|
}
|
|
21
|
+
body,
|
|
22
|
+
[data-mode='dark'] {
|
|
23
|
+
color: var(--pkt-color-text-body-default);
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
em {
|
|
24
27
|
font-style: italic;
|
|
@@ -92,7 +95,7 @@ a,
|
|
|
92
95
|
|
|
93
96
|
.pkt-link {
|
|
94
97
|
&__icon {
|
|
95
|
-
--fg-color:
|
|
98
|
+
--fg-color: var(--pkt-color-text-action-normal);
|
|
96
99
|
width: 1.5rem;
|
|
97
100
|
height: 1.5rem;
|
|
98
101
|
flex-shrink: 0;
|
|
@@ -32,6 +32,11 @@ pkt-accordion-item {
|
|
|
32
32
|
display: block;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
pkt-accordion,
|
|
36
|
+
pkt-accordion-item {
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
.pkt-accordion,
|
|
36
41
|
pkt-accordion::part(container) {
|
|
37
42
|
display: grid;
|
|
@@ -49,7 +54,10 @@ pkt-accordion::part(container) {
|
|
|
49
54
|
.pkt-accordion--borderless,
|
|
50
55
|
pkt-accordion[skin='borderless'] {
|
|
51
56
|
.pkt-accordion-item {
|
|
57
|
+
color: var(--pkt-color-text-body-default);
|
|
52
58
|
border: none;
|
|
59
|
+
background-color: var(--pkt-color-background-default);
|
|
60
|
+
|
|
53
61
|
|
|
54
62
|
&[open] {
|
|
55
63
|
.pkt-accordion-item__title {
|
|
@@ -62,7 +70,9 @@ pkt-accordion[skin='borderless'] {
|
|
|
62
70
|
.pkt-accordion--outlined,
|
|
63
71
|
pkt-accordion[skin='outlined'] {
|
|
64
72
|
.pkt-accordion-item {
|
|
73
|
+
color: var(--pkt-color-text-body-default);
|
|
65
74
|
border: 2px solid var(--pkt-color-border-subtle);
|
|
75
|
+
background-color: var(--pkt-color-background-default);
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
|
|
@@ -21,15 +21,15 @@ pkt-heading {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
&--medium {
|
|
24
|
-
@include typography.get-text('pkt-txt-30');
|
|
24
|
+
@include typography.get-text('pkt-txt-30-medium');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&--small {
|
|
28
|
-
@include typography.get-text('pkt-txt-24');
|
|
28
|
+
@include typography.get-text('pkt-txt-24-medium');
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&--xsmall {
|
|
32
|
-
@include typography.get-text('pkt-txt-22');
|
|
32
|
+
@include typography.get-text('pkt-txt-22-medium');
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&--noSpacing {
|
|
@@ -2,30 +2,65 @@
|
|
|
2
2
|
@use '../abstracts/variables';
|
|
3
3
|
@use '../abstracts/functions';
|
|
4
4
|
@use '../abstracts/mixins/typography';
|
|
5
|
+
@use '../abstracts/mixins/breakpoints' as *;
|
|
5
6
|
|
|
6
7
|
.pkt-preview {
|
|
7
8
|
position: relative;
|
|
8
9
|
.pkt-tabs {
|
|
9
10
|
--pkt-tabs-bg: var(--pkt-color-surface-default-gray);
|
|
10
11
|
}
|
|
11
|
-
&__mode {
|
|
12
|
-
position: absolute;
|
|
13
|
-
top: 1rem;
|
|
14
|
-
right: 1rem;
|
|
15
|
-
}
|
|
16
12
|
&__component {
|
|
13
|
+
position: relative;
|
|
17
14
|
display: flex;
|
|
18
15
|
justify-content: space-around;
|
|
19
16
|
align-items: center;
|
|
20
17
|
min-height: 10rem;
|
|
21
18
|
padding: 3rem 1rem;
|
|
22
|
-
margin:
|
|
23
|
-
border: 0.25rem solid var(--pkt-color-surface-default-gray);
|
|
19
|
+
margin: 0;
|
|
24
20
|
background-color: var(--pkt-color-background-default);
|
|
25
21
|
transition: background-color 0.2s linear;
|
|
26
22
|
&--fullwidth > div {
|
|
27
23
|
width: 100%;
|
|
28
24
|
}
|
|
25
|
+
&-container {
|
|
26
|
+
border: 2px solid var(--pkt-color-border-gray);
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: 0;
|
|
30
|
+
@include bp('tablet-big-up') {
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
.pkt-preview__component {
|
|
33
|
+
flex: 1 1 0;
|
|
34
|
+
min-width: 0;
|
|
35
|
+
}
|
|
36
|
+
.pkt-preview__panel {
|
|
37
|
+
flex: 0 0 auto;
|
|
38
|
+
min-width: 20rem;
|
|
39
|
+
max-width: 25rem;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&__panel {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: 1rem;
|
|
49
|
+
padding: 2rem 1.5rem;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
align-items: stretch;
|
|
52
|
+
background-color: var(--pkt-color-surface-default-gray);
|
|
53
|
+
&__options {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
gap: 1rem;
|
|
57
|
+
margin-bottom: 1rem;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
&__options {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 1rem;
|
|
29
64
|
}
|
|
30
65
|
&__opts {
|
|
31
66
|
padding: 1rem;
|
|
@@ -41,13 +76,52 @@
|
|
|
41
76
|
}
|
|
42
77
|
}
|
|
43
78
|
}
|
|
79
|
+
.hide-code-button {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 100%;
|
|
82
|
+
margin-top: -1.5rem;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: flex-end;
|
|
88
|
+
padding-bottom: 1rem;
|
|
89
|
+
z-index: 2;
|
|
90
|
+
}
|
|
44
91
|
&__code {
|
|
92
|
+
color: var(--pkt-color-text-body-default);
|
|
45
93
|
position: relative;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
94
|
+
&-container {
|
|
95
|
+
position: relative;
|
|
96
|
+
padding: 2rem 2rem 0;
|
|
97
|
+
background-color: var(--pkt-color-grays-gray-800);
|
|
98
|
+
transition: max-height 0.5s ease;
|
|
99
|
+
max-height: 50rem;
|
|
100
|
+
.pkt-tabs {
|
|
101
|
+
--pkt-tabs-bg: var(--pkt-color-grays-gray-800);
|
|
102
|
+
}
|
|
103
|
+
&.hide-code {
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
max-height: 11.7rem;
|
|
106
|
+
&:after {
|
|
107
|
+
content: '';
|
|
108
|
+
display: block;
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 0;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
left: 0;
|
|
113
|
+
right: 0;
|
|
114
|
+
background: linear-gradient(180deg, transparent 0%, transparent 93%, var(--pkt-color-grays-gray-800) 100%);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
pre {
|
|
119
|
+
max-height: 30rem;
|
|
120
|
+
overflow: auto;
|
|
49
121
|
margin-top: 0 !important;
|
|
50
|
-
background-color:
|
|
122
|
+
background-color: transparent !important;
|
|
123
|
+
font-size: 1rem;
|
|
124
|
+
padding: 2rem 0;
|
|
51
125
|
}
|
|
52
126
|
}
|
|
53
127
|
&__copy {
|
|
@@ -58,14 +132,26 @@
|
|
|
58
132
|
gap: 0.5rem;
|
|
59
133
|
align-items: center;
|
|
60
134
|
}
|
|
135
|
+
&__array-item,
|
|
136
|
+
&__object-editor {
|
|
137
|
+
position: relative;
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
gap: 1rem;
|
|
141
|
+
}
|
|
142
|
+
&__add-object {
|
|
143
|
+
text-align: right;
|
|
144
|
+
margin-top: 0.5rem;
|
|
145
|
+
}
|
|
146
|
+
&__remove-object {
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: -2rem;
|
|
149
|
+
right: -0.25rem;
|
|
150
|
+
}
|
|
61
151
|
&__specs {
|
|
62
|
-
background-color: var(--pkt-color-surface-default-gray);
|
|
63
152
|
pre {
|
|
64
153
|
margin-top: 0 !important;
|
|
65
154
|
}
|
|
66
|
-
h2 {
|
|
67
|
-
padding: 1rem;
|
|
68
|
-
}
|
|
69
155
|
}
|
|
70
156
|
}
|
|
71
157
|
|
|
@@ -75,4 +161,4 @@
|
|
|
75
161
|
|
|
76
162
|
.preview-content {
|
|
77
163
|
display: contents;
|
|
78
|
-
}
|
|
164
|
+
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
&:focus-visible:not(:active) {
|
|
51
51
|
border: 0;
|
|
52
52
|
box-shadow: none;
|
|
53
|
-
background-color: var(--pkt-
|
|
53
|
+
background-color: var(--pkt-tabs-bg);
|
|
54
54
|
outline: 0.25rem solid var(--pkt-color-border-states-focus);
|
|
55
55
|
outline-offset: 0;
|
|
56
56
|
}
|
|
@@ -314,7 +314,10 @@ pkt-tag > .pkt-tag {
|
|
|
314
314
|
&.pkt-tag--hover {
|
|
315
315
|
background-color: var(--pkt-color-brand-warm-blue-1000) !important;
|
|
316
316
|
color: var(--pkt-color-brand-neutrals-200) !important;
|
|
317
|
-
|
|
317
|
+
&,
|
|
318
|
+
svg {
|
|
319
|
+
--fg-color: var(--pkt-color-brand-neutrals-200) !important;
|
|
320
|
+
}
|
|
318
321
|
}
|
|
319
322
|
}
|
|
320
323
|
|
|
@@ -18,7 +18,8 @@ $-spacing-size-16: map.get(variables.$spacing, 'size-16');
|
|
|
18
18
|
border-collapse: collapse;
|
|
19
19
|
|
|
20
20
|
&__header,
|
|
21
|
-
thead
|
|
21
|
+
thead,
|
|
22
|
+
thead.pkt-table__header th {
|
|
22
23
|
text-align: left;
|
|
23
24
|
vertical-align: top;
|
|
24
25
|
font-size: map.get(variables.$font-size, 'size-18');
|
package/dist/scss/pkt-docs.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.1",
|
|
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": "^13.
|
|
23
|
+
"@oslokommune/punkt-assets": "^13.3.1",
|
|
24
24
|
"astro": "^5.7.5",
|
|
25
25
|
"edit-json-file": "^1.8.0",
|
|
26
26
|
"fs-extra": "^11.2.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
56
56
|
},
|
|
57
57
|
"license": "MIT",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "7b997c2cc58b531ccbf06cce080b0dd8556a46be"
|
|
59
59
|
}
|