@oslokommune/punkt-css 9.4.1 → 9.5.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.
@@ -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.4/icons/new-window-small.svg);
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%) hue-rotate(222deg) brightness(93%) contrast(90%);
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%) hue-rotate(173deg) brightness(109%) contrast(105%);
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
  }
@@ -67,7 +67,7 @@
67
67
  }
68
68
 
69
69
  &-service {
70
- padding-top: 0.2rem;
70
+ padding-top: 0.3rem;
71
71
  display: none;
72
72
  white-space: nowrap;
73
73
  text-overflow: ellipsis;
@@ -80,7 +80,7 @@
80
80
  }
81
81
 
82
82
  @include bp('laptop-up') {
83
- padding-top: 0.4rem;
83
+ padding-top: 0.6rem;
84
84
  @include get-text('pkt-txt-24-light');
85
85
  }
86
86
  }
@@ -143,7 +143,7 @@
143
143
  align-items: center;
144
144
  gap: map.get(variables.$spacing, 'size-32');
145
145
 
146
- >li {
146
+ > li {
147
147
  padding: 0;
148
148
  }
149
149
  }
@@ -172,7 +172,7 @@
172
172
  width: auto;
173
173
  }
174
174
 
175
- >li {
175
+ > li {
176
176
  padding: map.get(variables.$spacing, 'size-32');
177
177
  background-color: var(--pkt-color-surface-subtle-white);
178
178
 
@@ -208,7 +208,7 @@
208
208
  position: relative;
209
209
  }
210
210
 
211
- >.pkt-btn {
211
+ > .pkt-btn {
212
212
  &:hover .pkt-btn--closed {
213
213
  --fg-color: var(--pkt-color-surface-subtle-white);
214
214
  }
@@ -227,7 +227,7 @@
227
227
  }
228
228
 
229
229
  &.pkt-header--open-dropdown {
230
- >.pkt-btn {
230
+ > .pkt-btn {
231
231
  background-color: var(--pkt-color-border-states-active);
232
232
  border-color: var(--pkt-color-border-states-active);
233
233
  color: var(--pkt-color-surface-subtle-white);
@@ -283,7 +283,7 @@
283
283
  }
284
284
  }
285
285
 
286
- >li>a {
286
+ > li > a {
287
287
  grid-template-columns: 1.5rem auto;
288
288
  gap: map.get(variables.$spacing, 'size-8');
289
289
  }
@@ -12,3 +12,4 @@
12
12
  @forward 'linkcard';
13
13
  @forward 'tag';
14
14
  @forward 'textinput';
15
+ @forward 'searchinput';
@@ -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.4/icons/check-medium.svg);
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, [data-mode='dark'] .pkt-input-prefix, [data-mode='dark'] .pkt-input-suffix, [data-mode='dark'] .pkt-input-icon, [data-mode='dark'] .pkt-input__container {
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( :is(:has(&--fullwidth))) {
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.4/icons/chevron-thin-down.svg);
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.4.1",
3
+ "version": "9.5.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": "2b6ea8c5c18bbe72cfcad65ea783e92da07bccf4"
58
+ "gitHead": "aea482195b0b2b6b5fdf7cceea09f585cba16cea"
59
59
  }