@oslokommune/punkt-css 15.4.3 → 16.0.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.
@@ -6,7 +6,7 @@
6
6
  @forward 'spacing';
7
7
 
8
8
  // Default icon path
9
- $icon-path: 'https://punkt-cdn.oslo.kommune.no/15.4/icons' !default;
9
+ $icon-path: 'https://punkt-cdn.oslo.kommune.no/16.0/icons' !default;
10
10
 
11
11
  // Borders
12
12
  $border-width: (
@@ -8,11 +8,13 @@
8
8
  $-box-separator: map.get(variables.$spacing, 'size-8');
9
9
  $-input-spacing: map.get(variables.$spacing, 'size-4');
10
10
 
11
- pkt-combobox {
11
+ pkt-combobox,
12
+ .pkt-combobox-component {
12
13
  display: block;
13
14
  max-width: 31rem;
14
15
  width: 100%;
15
- &[fullwidth] {
16
+ &[fullwidth],
17
+ &--fullwidth {
16
18
  max-width: 100%;
17
19
  }
18
20
  }
@@ -27,38 +29,21 @@ pkt-combobox {
27
29
  flex-direction: column;
28
30
  width: 100%;
29
31
 
32
+ // Legacy arrow button styles (kept for backward compat with older markup)
30
33
  &__arrow.pkt-btn {
31
34
  position: absolute;
32
35
  right: 0.25rem;
33
36
  height: 100%;
34
37
  min-width: 1.125rem;
35
38
  min-height: 1.125rem;
36
- transform: rotate(0deg);
37
- transition: transform 1s linear;
38
39
  padding: 0.5rem;
39
-
40
- // legg til liten bevgelse på pilen på hover
41
40
  svg {
42
- transition: transform 0.1s ease-in-out;
43
41
  width: 1.5rem;
44
42
  height: 1.5rem;
45
43
  }
46
-
47
- &-icon {
48
- transform: rotate(0deg);
49
- transition: transform 0.3s ease;
50
- &--open {
51
- transform: rotate(180deg);
52
- transition: transform 0.3s ease;
53
- }
54
- }
55
-
56
44
  &:hover:not([data-disabled]) {
57
45
  background-color: inherit;
58
46
  border-color: transparent;
59
- svg {
60
- transform: translateY(0.25rem);
61
- }
62
47
  }
63
48
  }
64
49
 
@@ -72,7 +57,9 @@ pkt-combobox {
72
57
  position: relative;
73
58
  margin: 0;
74
59
  padding: 0.5rem 2rem 0.5rem 0.5rem;
75
- border: 2px solid var(--pkt-color-border-default);
60
+ background-color: var(--pkt-color-input-background-normal);
61
+ border: 2px solid var(--pkt-color-input-border-normal);
62
+ color: var(--pkt-color-input-text-normal);
76
63
  min-height: 3rem;
77
64
  gap: 0.375rem;
78
65
  flex-wrap: wrap;
@@ -81,15 +68,27 @@ pkt-combobox {
81
68
 
82
69
  &-div {
83
70
  display: contents;
84
- &:first-child input {
85
- padding-left: 0.5rem;
86
- }
87
71
  }
88
72
 
89
73
  &--fullwidth {
90
74
  width: 100%;
91
75
  }
92
76
 
77
+ &:hover:not(&--disabled):not(&--error) {
78
+ border-color: var(--pkt-color-input-border-hover);
79
+
80
+ > .pkt-combobox__value {
81
+ color: var(--pkt-color-input-text-hover);
82
+ }
83
+
84
+ .pkt-combobox__arrow-icon {
85
+ --fg-color: var(--pkt-color-brand-warm-blue-1000);
86
+ &:not(.pkt-combobox__arrow-icon--open) svg {
87
+ transform: translateY(0.25rem);
88
+ }
89
+ }
90
+ }
91
+
93
92
  &--error {
94
93
  &,
95
94
  &:hover,
@@ -103,8 +102,8 @@ pkt-combobox {
103
102
  &:focus-within,
104
103
  &:focus-visible,
105
104
  &--open {
106
- border-color: var(--pkt-color-brand-warm-blue-1000);
107
- outline: none;
105
+ border-color: var(--pkt-color-input-border-active);
106
+ outline: 2px solid var(--pkt-color-input-border-active);
108
107
  }
109
108
 
110
109
  &--disabled {
@@ -128,12 +127,16 @@ pkt-combobox {
128
127
  background: transparent;
129
128
  letter-spacing: inherit;
130
129
  line-height: 1.4rem;
131
- padding: 0;
130
+ padding: 0 0 0 0.5rem;
132
131
  margin: 0;
133
- width: 0;
132
+ flex: 1;
133
+ min-width: 3rem;
134
+ &::placeholder {
135
+ color: var(--pkt-color-text-placeholder);
136
+ opacity: 1;
137
+ }
134
138
  &:focus,
135
139
  &:active {
136
- width: 100%;
137
140
  outline: none;
138
141
  }
139
142
  }
@@ -141,6 +144,34 @@ pkt-combobox {
141
144
  margin: 0;
142
145
  }
143
146
  }
147
+ &__tag-list {
148
+ display: contents;
149
+ list-style: none;
150
+ margin: 0;
151
+ padding: 0;
152
+ li {
153
+ display: contents;
154
+ }
155
+ }
156
+ &__arrow-icon {
157
+ position: absolute;
158
+ right: 0.25rem;
159
+ min-width: 1.125rem;
160
+ min-height: 1.125rem;
161
+ padding: 0.5rem;
162
+ transform: rotate(0deg);
163
+ transition: transform 0.3s ease;
164
+ pointer-events: none;
165
+ svg {
166
+ width: 1.5rem;
167
+ height: 1.5rem;
168
+ transition: transform 0.1s ease-in-out;
169
+ }
170
+ &--open {
171
+ transform: rotate(180deg);
172
+ transition: transform 0.3s ease;
173
+ }
174
+ }
144
175
  &__tags-outside {
145
176
  display: flex;
146
177
  flex-wrap: wrap;
@@ -148,6 +179,17 @@ pkt-combobox {
148
179
  .pkt-tag {
149
180
  margin: 0;
150
181
  }
182
+ .pkt-combobox__tag-list {
183
+ display: flex;
184
+ flex-wrap: wrap;
185
+ gap: 0.375rem;
186
+ list-style: none;
187
+ margin: 0;
188
+ padding: 0;
189
+ li {
190
+ display: contents;
191
+ }
192
+ }
151
193
  }
152
194
 
153
195
  &__placeholder {
@@ -240,6 +240,7 @@ pkt-fileupload,
240
240
  padding: map.get(variables.$spacing, 'size-8');
241
241
  min-width: 0;
242
242
  overflow: hidden;
243
+ justify-content: end;
243
244
  }
244
245
 
245
246
  // In-progress items span full width
@@ -553,7 +554,7 @@ pkt-fileupload,
553
554
 
554
555
  &--fallback {
555
556
  .pkt-fileupload__queue-display__item__thumbnail__title {
556
- @include typography.get-text('pkt-txt-12');
557
+ @include typography.get-text('pkt-txt-14');
557
558
  }
558
559
  }
559
560
  }
@@ -16,7 +16,8 @@ pkt-listbox {
16
16
  margin: 0;
17
17
  overflow-y: auto;
18
18
  border: 2px solid var(--pkt-color-border-gray);
19
- background-color: white;
19
+ background-color: var(--pkt-color-input-background-normal);
20
+ color: var(--pkt-color-input-text-normal);
20
21
  max-height: 18rem;
21
22
 
22
23
  &.pkt-listbox__open {
@@ -110,6 +111,12 @@ pkt-listbox {
110
111
  }
111
112
  }
112
113
 
114
+ .pkt-listbox__empty {
115
+ padding: $listbox-padding;
116
+ color: var(--pkt-color-text-body-muted);
117
+ list-style: none;
118
+ }
119
+
113
120
  .pkt-listbox__banners {
114
121
  padding: 0.25rem;
115
122
  margin: 0;
@@ -132,7 +139,8 @@ pkt-listbox {
132
139
  box-sizing: border-box;
133
140
 
134
141
  &--new-option,
135
- &--user-message {
142
+ &--user-message,
143
+ &--empty {
136
144
  background-color: var(--pkt-color-surface-default-gray);
137
145
  }
138
146
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-css",
3
- "version": "15.4.3",
3
+ "version": "16.0.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": "^15.0.0",
23
+ "@oslokommune/punkt-assets": "^16.0.0",
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": "2209815d9725ba435cd62f140625a3f40903202a"
58
+ "gitHead": "b3e88b7c06f9a63c2e911693af6b9860cd73c27b"
59
59
  }