@oslokommune/punkt-css 9.4.1 → 9.5.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 +19 -0
- package/dist/css/components/searchinput.css +94 -0
- package/dist/css/components/searchinput.min.css +1 -0
- package/dist/css/components/textinput.css +9 -2
- package/dist/css/components/textinput.min.css +1 -1
- package/dist/css/pkt-base.css +3 -3
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +104 -3
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-elements.css +11 -3
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +109 -7
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/base/_typography.scss +6 -4
- package/dist/scss/components/_index.scss +1 -0
- package/dist/scss/components/_searchinput.scss +109 -0
- package/dist/scss/elements/_checkbox-radio.scss +1 -1
- package/dist/scss/elements/_input.scss +12 -3
- package/package.json +2 -2
|
@@ -44,7 +44,7 @@ a,
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
|
|
46
46
|
// visited
|
|
47
|
-
&:visited:not(.pkt-linkcard) {
|
|
47
|
+
&:visited:not(.pkt-linkcard):not(.pkt-btn) {
|
|
48
48
|
color: inherit;
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -102,7 +102,7 @@ a,
|
|
|
102
102
|
|
|
103
103
|
&--external::after {
|
|
104
104
|
content: ' ';
|
|
105
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/9.
|
|
105
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/9.5/icons/new-window-small.svg);
|
|
106
106
|
background-image: var(--svg);
|
|
107
107
|
background-repeat: no-repeat;
|
|
108
108
|
background-size: 18px 18px;
|
|
@@ -112,7 +112,8 @@ a,
|
|
|
112
112
|
|
|
113
113
|
&--external:hover::after {
|
|
114
114
|
// #1f42aa
|
|
115
|
-
filter: brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(2420%)
|
|
115
|
+
filter: brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(2420%)
|
|
116
|
+
hue-rotate(222deg) brightness(93%) contrast(90%);
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
|
|
@@ -134,7 +135,8 @@ button.pkt-link {
|
|
|
134
135
|
|
|
135
136
|
&--external:hover::after {
|
|
136
137
|
// #b3f5ff
|
|
137
|
-
filter: brightness(0) saturate(100%) invert(80%) sepia(54%) saturate(502%)
|
|
138
|
+
filter: brightness(0) saturate(100%) invert(80%) sepia(54%) saturate(502%)
|
|
139
|
+
hue-rotate(173deg) brightness(109%) contrast(105%);
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* Common styles for all inputs */
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../abstracts/variables';
|
|
4
|
+
@use '../abstracts/functions';
|
|
5
|
+
@use '../abstracts/mixins/typography';
|
|
6
|
+
|
|
7
|
+
.pkt-searchinput {
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
@include typography.get-text('pkt-txt-18-light');
|
|
11
|
+
|
|
12
|
+
&__field {
|
|
13
|
+
width: min(100%, 31rem);
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&--fullwidth &__field {
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--global .pkt-input:not(:disabled) {
|
|
22
|
+
border-color: var(--pkt-color-border-yellow);
|
|
23
|
+
&:hover,
|
|
24
|
+
&:active,
|
|
25
|
+
&:focus {
|
|
26
|
+
border-color: var(--pkt-color-input-border-active);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--global &__button {
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&--local-with-button &__field {
|
|
35
|
+
gap: 0.5rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--local .pkt-input {
|
|
39
|
+
padding: 0.5rem 0 0.5rem 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--local &__button {
|
|
43
|
+
&:disabled {
|
|
44
|
+
border-color: var(--pkt-color-input-border-disabled);
|
|
45
|
+
}
|
|
46
|
+
& svg {
|
|
47
|
+
margin-left: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__suggestions {
|
|
52
|
+
position: absolute;
|
|
53
|
+
z-index: 2;
|
|
54
|
+
padding: 0;
|
|
55
|
+
margin: 2px 0 0;
|
|
56
|
+
width: min(calc(100%), 31rem);
|
|
57
|
+
list-style: none;
|
|
58
|
+
background-color: var(--pkt-color-background-card);
|
|
59
|
+
box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
60
|
+
0px 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
61
|
+
}
|
|
62
|
+
&--global &__suggestions {
|
|
63
|
+
width: min(calc(100% - 3rem), 28rem);
|
|
64
|
+
}
|
|
65
|
+
&--local-with-button &__suggestions {
|
|
66
|
+
width: min(calc(100% - 3.5rem), 27.5rem);
|
|
67
|
+
}
|
|
68
|
+
&--fullwidth &__suggestions {
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
71
|
+
&__suggestion {
|
|
72
|
+
display: block;
|
|
73
|
+
padding: 1rem;
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
background-color: transparent;
|
|
76
|
+
color: var(--pkt-color-text-action-normal);
|
|
77
|
+
border: none;
|
|
78
|
+
font: inherit;
|
|
79
|
+
outline: inherit;
|
|
80
|
+
text-align: inherit;
|
|
81
|
+
&:hover,
|
|
82
|
+
&:focus,
|
|
83
|
+
&:active {
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
background-color: var(--pkt-color-background-subtle);
|
|
86
|
+
color: var(--pkt-color-text-action-active);
|
|
87
|
+
.pkt-searchinput__suggestion-title {
|
|
88
|
+
text-decoration: underline;
|
|
89
|
+
}
|
|
90
|
+
> * {
|
|
91
|
+
color: inherit;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
&--has-hover {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
&__suggestion-title {
|
|
99
|
+
@include typography.get-text('pkt-txt-18-medium');
|
|
100
|
+
}
|
|
101
|
+
&__suggestion-text {
|
|
102
|
+
margin: 0;
|
|
103
|
+
display: -webkit-box;
|
|
104
|
+
-webkit-line-clamp: 3;
|
|
105
|
+
-webkit-box-orient: vertical;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
hyphens: auto;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -118,7 +118,7 @@ $-module-name: 'pkt-input-check';
|
|
|
118
118
|
|
|
119
119
|
// Checkbox
|
|
120
120
|
&[type='checkbox'] {
|
|
121
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/9.
|
|
121
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/9.5/icons/check-medium.svg);
|
|
122
122
|
position: relative;
|
|
123
123
|
background-color: var(--pkt-color-input-border-normal);
|
|
124
124
|
}
|
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
--pkt-color-input-text-open: var(--pkt-color-brand-neutrals-white);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@at-root [data-mode='dark'] .pkt-input,
|
|
27
|
+
@at-root [data-mode='dark'] .pkt-input,
|
|
28
|
+
[data-mode='dark'] .pkt-input-prefix,
|
|
29
|
+
[data-mode='dark'] .pkt-input-suffix,
|
|
30
|
+
[data-mode='dark'] .pkt-input-icon,
|
|
31
|
+
[data-mode='dark'] .pkt-input__container {
|
|
28
32
|
--pkt-color-input-background-normal: var(--pkt-color-brand-neutrals-white);
|
|
29
33
|
--pkt-color-input-border-active: var(--pkt-color-brand-blue-500);
|
|
30
34
|
--pkt-color-input-border-disabled: var(--pkt-color-grays-gray-200);
|
|
@@ -52,7 +56,9 @@
|
|
|
52
56
|
padding: 0.5rem 1rem;
|
|
53
57
|
|
|
54
58
|
&:not(textarea[cols]):not(input[size]):not(&--fullwidth),
|
|
55
|
-
&__container:not(:is(:has(textarea[cols]))):not(:is(:has(input[size]))):not(
|
|
59
|
+
&__container:not(:is(:has(textarea[cols]))):not(:is(:has(input[size]))):not(
|
|
60
|
+
:is(:has(&--fullwidth))
|
|
61
|
+
) {
|
|
56
62
|
width: min(100%, 31rem);
|
|
57
63
|
}
|
|
58
64
|
|
|
@@ -71,7 +77,7 @@
|
|
|
71
77
|
padding-right: 3rem;
|
|
72
78
|
|
|
73
79
|
&:not([multiple]) {
|
|
74
|
-
--svg: url(https://punkt-cdn.oslo.kommune.no/9.
|
|
80
|
+
--svg: url(https://punkt-cdn.oslo.kommune.no/9.5/icons/chevron-thin-down.svg);
|
|
75
81
|
background-image: var(--svg);
|
|
76
82
|
background-repeat: no-repeat;
|
|
77
83
|
background-position: right 0.7rem top 50%;
|
|
@@ -225,6 +231,9 @@
|
|
|
225
231
|
&:hover .pkt-input-suffix,
|
|
226
232
|
&:hover .pkt-input-icon {
|
|
227
233
|
border-color: var(--pkt-color-input-border-active);
|
|
234
|
+
&:disabled {
|
|
235
|
+
border-color: var(--pkt-color-input-border-disabled);
|
|
236
|
+
}
|
|
228
237
|
}
|
|
229
238
|
|
|
230
239
|
&:focus-within {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.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",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
56
56
|
},
|
|
57
57
|
"license": "MIT",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "b3440f0d1a9cec53e08bb5fdaae88bf6c74b586e"
|
|
59
59
|
}
|