@oslokommune/punkt-css 14.5.3 → 15.0.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.
@@ -6,7 +6,7 @@
6
6
  @forward 'spacing';
7
7
 
8
8
  // Default icon path
9
- $icon-path: 'https://punkt-cdn.oslo.kommune.no/14.5/icons' !default;
9
+ $icon-path: 'https://punkt-cdn.oslo.kommune.no/15.0/icons' !default;
10
10
 
11
11
  // Borders
12
12
  $border-width: (
@@ -11,6 +11,16 @@
11
11
  .pkt-show {
12
12
  display: block !important;
13
13
  }
14
+ .pkt-invisible {
15
+ visibility: hidden !important;
16
+ }
17
+ .pkt-visually-hidden {
18
+ position: absolute !important;
19
+ width: 0 !important;
20
+ height: 0 !important;
21
+ overflow: hidden !important;
22
+ opacity: 0 !important;
23
+ }
14
24
 
15
25
  @each $name, $value in $breakpoints {
16
26
  .pkt-hide-#{$name}-up,
@@ -107,9 +107,15 @@ pkt-calendar {
107
107
  .pkt-btn:focus,
108
108
  .pkt-btn:hover {
109
109
  background-color: var(--pkt-color-surface-strong-blue);
110
+ color: var(--pkt-color-brand-dark-blue-1000);
110
111
  }
111
112
  }
112
113
  .pkt-cal-in-range {
114
+ .pkt-btn,
115
+ .pkt-btn:focus,
116
+ .pkt-btn:hover {
117
+ color: var(--pkt-color-brand-dark-blue-1000);
118
+ }
113
119
  :before,
114
120
  :after,
115
121
  &-first :after,
@@ -125,6 +131,7 @@ pkt-calendar {
125
131
  :before,
126
132
  .pkt-btn {
127
133
  background-color: var(--pkt-color-surface-default-light-blue);
134
+ color: var(--pkt-color-brand-dark-blue-1000);
128
135
  }
129
136
  ::after {
130
137
  background-color: transparent;
@@ -141,81 +148,3 @@ pkt-calendar {
141
148
  }
142
149
  }
143
150
  }
144
-
145
- pkt-datepicker {
146
- display: block;
147
- position: relative;
148
- .pkt-datepicker {
149
- position: relative;
150
- &__tags {
151
- .pkt-tag {
152
- margin: 0 0.25rem 0.5rem 0;
153
- }
154
- }
155
- }
156
- }
157
-
158
- pkt-datepicker-single,
159
- pkt-datepicker-range,
160
- pkt-datepicker-multiple {
161
- display: block;
162
- }
163
-
164
- .pkt-datepicker__inputs {
165
- width: 100%;
166
- position: relative;
167
- .pkt-input__container {
168
- width: fit-content;
169
- }
170
- button.pkt-input-icon {
171
- padding-left: 0.25rem;
172
- padding-right: 0.25rem;
173
- &:hover {
174
- background-color: inherit !important;
175
- border-color: inherit !important;
176
- --fg-color: var(--pkt-color-button-text-hover);
177
- }
178
- }
179
- .pkt-datepicker__input {
180
- padding-right: 0;
181
- background-image: none;
182
- }
183
- .pkt-input-separator ~ .pkt-datepicker--range {
184
- padding-left: 0.25rem;
185
- }
186
- }
187
- .pkt-calendar-popup {
188
- top: 100%;
189
- left: 0;
190
- z-index: 2;
191
- margin: 0;
192
- padding: 0.5rem;
193
- position: absolute;
194
- width: max-content;
195
- background: var(--pkt-color-background-default);
196
- box-shadow:
197
- 0px 2px 4px -2px rgba(0, 0, 0, 0.1),
198
- 0px 4px 6px -1px rgba(0, 0, 0, 0.1);
199
- }
200
- .pkt-datepicker__input:not(.pkt-datepicker--multiple) {
201
- width: 8.3rem;
202
- }
203
- .pkt-datepicker__input::-webkit-inner-spin-button,
204
- .pkt-datepicker__input::-webkit-calendar-picker-indicator {
205
- display: none;
206
- -webkit-appearance: none;
207
- }
208
-
209
- // Firefox specific styles :(
210
- @-moz-document url-prefix() {
211
- .pkt-datepicker__input:not(.pkt-datepicker--multiple) {
212
- width: 10.5rem;
213
- }
214
- .pkt-datepicker__inputs button.pkt-input-icon {
215
- display: none;
216
- }
217
- .pkt-datepicker__inputs
218
- input.pkt-datepicker__input:has(~ button):not(:has(~ .pkt-input-separator)):not(:has(~ .pkt-input-prefix)) {
219
- border-right-width: 2px !important;
220
- }
221
- }
@@ -0,0 +1,139 @@
1
+ // Datepicker wrapper & input styles
2
+ // Primary selectors use CSS classes (framework-agnostic).
3
+ // Element selectors kept for backward compatibility with web components.
4
+
5
+ .pkt-datepicker,
6
+ pkt-datepicker {
7
+ display: block;
8
+ position: relative;
9
+ }
10
+
11
+ .pkt-datepicker__tags {
12
+ button.pkt-tag {
13
+ margin: 0 0.25rem 0.5rem 0;
14
+ }
15
+ }
16
+
17
+ .pkt-datepicker-single,
18
+ .pkt-datepicker-range,
19
+ .pkt-datepicker-multiple,
20
+ pkt-datepicker-single,
21
+ pkt-datepicker-range,
22
+ pkt-datepicker-multiple {
23
+ display: block;
24
+ }
25
+
26
+ .pkt-datepicker__inputs {
27
+ width: 100%;
28
+ position: relative;
29
+ .pkt-input__container:not(:has(.pkt-input--fullwidth)) {
30
+ width: fit-content;
31
+ }
32
+ > .pkt-input__container {
33
+ border: 2px solid var(--pkt-color-input-border-normal);
34
+
35
+ .pkt-input,
36
+ .pkt-input-prefix,
37
+ .pkt-input-suffix,
38
+ .pkt-input-icon,
39
+ .pkt-input-separator {
40
+ border: 0;
41
+ }
42
+
43
+ &:hover {
44
+ border-color: var(--pkt-color-input-border-active);
45
+ }
46
+
47
+ &:focus-within {
48
+ border-color: var(--pkt-color-input-border-active);
49
+ }
50
+
51
+ &:has(input:disabled),
52
+ &:has(input[readonly]) {
53
+ border-color: var(--pkt-color-input-border-disabled);
54
+ }
55
+
56
+ &:has(.pkt-input--counter-error) {
57
+ border-color: var(--pkt-color-input-border-error);
58
+ }
59
+
60
+ .pkt-inputwrapper--error & {
61
+ border-color: var(--pkt-color-brand-red-1000);
62
+
63
+ &:hover,
64
+ &:focus-within {
65
+ border-color: var(--pkt-color-brand-red-1000);
66
+ }
67
+ }
68
+
69
+ .pkt-inputwrapper--disabled & {
70
+ border-color: var(--pkt-color-border-states-disabled);
71
+
72
+ &:hover,
73
+ &:focus-within {
74
+ border-color: var(--pkt-color-border-states-disabled);
75
+ box-shadow: none;
76
+ outline: none;
77
+ }
78
+ }
79
+ }
80
+ button.pkt-input-icon {
81
+ padding-left: 0.75rem;
82
+ padding-right: 0.75rem;
83
+ &:hover {
84
+ background-color: inherit !important;
85
+ border-color: inherit !important;
86
+ --fg-color: var(--pkt-color-button-text-hover);
87
+ }
88
+ }
89
+ .pkt-datepicker__input {
90
+ padding-right: 0;
91
+ background-image: none;
92
+ }
93
+ .pkt-input-separator ~ .pkt-datepicker--range {
94
+ padding-left: 0.25rem;
95
+ }
96
+ }
97
+ .pkt-calendar-popup {
98
+ top: 100%;
99
+ left: 0;
100
+ z-index: 2;
101
+ margin: 0;
102
+ padding: 0.5rem;
103
+ position: absolute;
104
+ width: max-content;
105
+ background: var(--pkt-color-background-default);
106
+ box-shadow:
107
+ 0px 2px 4px -2px rgba(0, 0, 0, 0.1),
108
+ 0px 4px 6px -1px rgba(0, 0, 0, 0.1);
109
+ }
110
+ .pkt-datepicker__input:not(.pkt-datepicker--multiple) {
111
+ width: 8.3rem;
112
+ }
113
+ .pkt-datepicker__input.pkt-input--fullwidth:not(.pkt-datepicker--multiple) {
114
+ width: auto;
115
+ flex: 1;
116
+ }
117
+ .pkt-datepicker__input::-webkit-inner-spin-button,
118
+ .pkt-datepicker__input::-webkit-calendar-picker-indicator {
119
+ display: none;
120
+ -webkit-appearance: none;
121
+ }
122
+
123
+ // Firefox specific styles :(
124
+ @-moz-document url-prefix() {
125
+ .pkt-datepicker__input:not(.pkt-datepicker--multiple) {
126
+ width: 10.5rem;
127
+ }
128
+ .pkt-datepicker__input.pkt-input--fullwidth:not(.pkt-datepicker--multiple) {
129
+ width: auto;
130
+ flex: 1;
131
+ }
132
+ .pkt-datepicker__inputs button.pkt-input-icon {
133
+ display: none;
134
+ }
135
+ .pkt-datepicker__inputs
136
+ input.pkt-datepicker__input:has(~ button):not(:has(~ .pkt-input-separator)):not(:has(~ .pkt-input-prefix)) {
137
+ border-right-width: 2px !important;
138
+ }
139
+ }
@@ -7,6 +7,7 @@
7
7
  @forward 'calendar';
8
8
  @forward 'card';
9
9
  @forward 'combobox';
10
+ @forward 'datepicker';
10
11
  @forward 'footer';
11
12
  @forward 'header';
12
13
  @forward 'header-service';
@@ -51,10 +51,14 @@ pkt-select {
51
51
 
52
52
  &--fullwidth {
53
53
  &,
54
+ *:has(&) ~ .pkt-input__counter,
54
55
  & + .pkt-input__counter {
55
56
  width: 100%;
56
57
  }
57
58
  }
59
+ [fullwidth] &__counter {
60
+ width: 100%;
61
+ }
58
62
 
59
63
  &:is(textarea) {
60
64
  min-height: map.get(variables.$spacing, 'size-128');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-css",
3
- "version": "14.5.3",
3
+ "version": "15.0.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": "^14.1.1",
23
+ "@oslokommune/punkt-assets": "^15.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": "343d038807d9a8cb3e15f2cb54ead64fd19708e4"
58
+ "gitHead": "e4a75d4efe0a17688bdba0071e12cb789ae430c2"
59
59
  }