@fremtind/jokul 0.57.7 → 0.58.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/build/build-stats.html +1 -1
- package/build/cjs/components/icon/stories/Icons.stories.cjs +1 -1
- package/build/cjs/components/loader/stories/Skeleton.stories.cjs +1 -1
- package/build/cjs/components/logo/stories/Logo.stories.cjs +2 -0
- package/build/cjs/components/logo/stories/Logo.stories.cjs.map +1 -0
- package/build/cjs/components/logo/stories/Logo.stories.d.cts +12 -0
- package/build/cjs/components/logo/stories/LogoStamp.stories.cjs +2 -0
- package/build/cjs/components/logo/stories/LogoStamp.stories.cjs.map +1 -0
- package/build/cjs/components/logo/stories/LogoStamp.stories.d.cts +12 -0
- package/build/cjs/components/text-area/stories/TextArea.stories.cjs +2 -0
- package/build/cjs/components/text-area/stories/TextArea.stories.cjs.map +1 -0
- package/build/cjs/components/text-area/stories/TextArea.stories.d.cts +12 -0
- package/build/cjs/components/text-input/BaseTextInput.cjs +1 -1
- package/build/cjs/components/text-input/BaseTextInput.cjs.map +1 -1
- package/build/cjs/components/toggle-switch/stories/ToggleSwitch.stories.cjs +2 -0
- package/build/cjs/components/toggle-switch/stories/ToggleSwitch.stories.cjs.map +1 -0
- package/build/cjs/components/toggle-switch/stories/ToggleSwitch.stories.d.cts +15 -0
- package/build/es/components/icon/stories/Icons.stories.js +1 -1
- package/build/es/components/logo/stories/Logo.stories.d.ts +12 -0
- package/build/es/components/logo/stories/Logo.stories.js +2 -0
- package/build/es/components/logo/stories/Logo.stories.js.map +1 -0
- package/build/es/components/logo/stories/LogoStamp.stories.d.ts +12 -0
- package/build/es/components/logo/stories/LogoStamp.stories.js +2 -0
- package/build/es/components/logo/stories/LogoStamp.stories.js.map +1 -0
- package/build/es/components/text-area/stories/TextArea.stories.d.ts +12 -0
- package/build/es/components/text-area/stories/TextArea.stories.js +2 -0
- package/build/es/components/text-area/stories/TextArea.stories.js.map +1 -0
- package/build/es/components/text-input/BaseTextInput.js +1 -1
- package/build/es/components/text-input/BaseTextInput.js.map +1 -1
- package/build/es/components/toggle-switch/stories/ToggleSwitch.stories.d.ts +15 -0
- package/build/es/components/toggle-switch/stories/ToggleSwitch.stories.js +2 -0
- package/build/es/components/toggle-switch/stories/ToggleSwitch.stories.js.map +1 -0
- package/build/style.css +1 -1
- package/package.json +2 -2
- package/styles/components/button/button.css +3 -3
- package/styles/components/button/button.min.css +1 -1
- package/styles/components/checkbox/checkbox.css +4 -4
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/checkbox-panel/checkbox-panel.css +2 -2
- package/styles/components/checkbox-panel/checkbox-panel.min.css +1 -1
- package/styles/components/countdown/countdown.css +2 -2
- package/styles/components/countdown/countdown.min.css +1 -1
- package/styles/components/feedback/feedback.css +2 -2
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/icon-button/icon-button.css +0 -1
- package/styles/components/icon-button/icon-button.min.css +1 -1
- package/styles/components/icon-button/icon-button.scss +0 -2
- package/styles/components/input-group/input-group.css +2 -2
- package/styles/components/input-group/input-group.min.css +1 -1
- package/styles/components/list/list.css +3 -3
- package/styles/components/list/list.min.css +1 -1
- package/styles/components/list/list.scss +3 -3
- package/styles/components/loader/loader.css +6 -6
- package/styles/components/loader/loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.css +5 -5
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/message/message.css +2 -2
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.css +1 -1
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/radio-button/radio-button.css +2 -2
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.css +2 -2
- package/styles/components/radio-panel/radio-panel.min.css +1 -1
- package/styles/components/system-message/system-message.css +2 -2
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/text-area/text-area.css +23 -108
- package/styles/components/text-area/text-area.min.css +1 -1
- package/styles/components/text-area/text-area.scss +2 -6
- package/styles/components/text-input/text-input.css +21 -104
- package/styles/components/text-input/text-input.min.css +1 -1
- package/styles/components/text-input/text-input.scss +0 -1
- package/styles/components/toast/toast.css +4 -4
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/shared/input/shared-input-styles.css +0 -62
- package/styles/shared/input/shared-input-styles.min.css +1 -1
- package/styles/shared/input/shared-input-styles.scss +27 -99
- package/styles/styles.css +86 -193
- package/styles/styles.min.css +1 -1
|
@@ -2,68 +2,6 @@
|
|
|
2
2
|
* Do not edit directly
|
|
3
3
|
* Generated on Wed, 18 Dec 2024 12:25:37 GMT
|
|
4
4
|
*/
|
|
5
|
-
@media screen and (prefers-color-scheme: light) {
|
|
6
|
-
:root {
|
|
7
|
-
--jkl-text-input-border-color: #636060;
|
|
8
|
-
--jkl-text-input-text-color: #1b1917;
|
|
9
|
-
--jkl-text-input-placeholder-color: #636060;
|
|
10
|
-
--jkl-text-input-unit-color: #1b1917;
|
|
11
|
-
--jkl-text-input-background-color: #ffffff;
|
|
12
|
-
--jkl-text-input-focus-color: #1b1917;
|
|
13
|
-
--jkl-text-input-error-background-color: #f6b3b3;
|
|
14
|
-
--jkl-text-input-error-text-color: #1b1917;
|
|
15
|
-
--jkl-text-input-error-placeholder-color: #636060;
|
|
16
|
-
--jkl-text-input-selection-color: rgba(27, 25, 23, 0.2);
|
|
17
|
-
--jkl-text-input-error-selection-color: rgba(27, 25, 23, 0.2);
|
|
18
|
-
--jkl-text-area-counter-count-color: #636060;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
[data-theme=light] {
|
|
22
|
-
--jkl-text-input-border-color: #636060;
|
|
23
|
-
--jkl-text-input-text-color: #1b1917;
|
|
24
|
-
--jkl-text-input-placeholder-color: #636060;
|
|
25
|
-
--jkl-text-input-unit-color: #1b1917;
|
|
26
|
-
--jkl-text-input-background-color: #ffffff;
|
|
27
|
-
--jkl-text-input-focus-color: #1b1917;
|
|
28
|
-
--jkl-text-input-error-background-color: #f6b3b3;
|
|
29
|
-
--jkl-text-input-error-text-color: #1b1917;
|
|
30
|
-
--jkl-text-input-error-placeholder-color: #636060;
|
|
31
|
-
--jkl-text-input-selection-color: rgba(27, 25, 23, 0.2);
|
|
32
|
-
--jkl-text-input-error-selection-color: rgba(27, 25, 23, 0.2);
|
|
33
|
-
--jkl-text-area-counter-count-color: #636060;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@media screen and (prefers-color-scheme: dark) {
|
|
37
|
-
:root {
|
|
38
|
-
--jkl-text-input-border-color: #c8c5c3;
|
|
39
|
-
--jkl-text-input-text-color: #f9f9f9;
|
|
40
|
-
--jkl-text-input-placeholder-color: #c8c5c3;
|
|
41
|
-
--jkl-text-input-unit-color: #f9f9f9;
|
|
42
|
-
--jkl-text-input-background-color: #313030;
|
|
43
|
-
--jkl-text-input-focus-color: #f9f9f9;
|
|
44
|
-
--jkl-text-input-selection-color: rgba(249, 249, 249, 0.25);
|
|
45
|
-
--jkl-text-input-error-background-color: #f6b3b3;
|
|
46
|
-
--jkl-text-input-error-text-color: #1b1917;
|
|
47
|
-
--jkl-text-input-error-placeholder-color: #636060;
|
|
48
|
-
--jkl-text-input-error-selection-color: rgba(27, 25, 23, 0.2);
|
|
49
|
-
--jkl-text-area-counter-count-color: #c8c5c3;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
[data-theme=dark] {
|
|
53
|
-
--jkl-text-input-border-color: #c8c5c3;
|
|
54
|
-
--jkl-text-input-text-color: #f9f9f9;
|
|
55
|
-
--jkl-text-input-placeholder-color: #c8c5c3;
|
|
56
|
-
--jkl-text-input-unit-color: #f9f9f9;
|
|
57
|
-
--jkl-text-input-background-color: #313030;
|
|
58
|
-
--jkl-text-input-focus-color: #f9f9f9;
|
|
59
|
-
--jkl-text-input-selection-color: rgba(249, 249, 249, 0.25);
|
|
60
|
-
--jkl-text-input-error-background-color: #f6b3b3;
|
|
61
|
-
--jkl-text-input-error-text-color: #1b1917;
|
|
62
|
-
--jkl-text-input-error-placeholder-color: #636060;
|
|
63
|
-
--jkl-text-input-error-selection-color: rgba(27, 25, 23, 0.2);
|
|
64
|
-
--jkl-text-area-counter-count-color: #c8c5c3;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
5
|
:root,
|
|
68
6
|
[data-layout-density=comfortable],
|
|
69
7
|
[data-density=comfortable] {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-text-input-font-size:var(--jkl-body-font-size);--jkl-text-input-line-height:var(--jkl-body-line-height);--jkl-text-input-font-weight:var(--jkl-body-font-weight);--jkl-text-input-height:3rem;--jkl-text-input-vertical-padding:0.5rem;--jkl-text-input-horizontal-padding:0.75rem;--jkl-text-input-padding:var(--jkl-text-input-vertical-padding) var(--jkl-text-input-horizontal-padding);--jkl-text-input-action-button-size:3rem;--jkl-text-input-action-button-icon-size:1.25rem;--jkl-text-input-action-button-padding:0.5rem 0;--jkl-text-input-action-button-focus-position:0.375rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-text-input-height:2.75rem;--jkl-text-input-action-button-size:2.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-text-input-font-size:var(--jkl-small-font-size);--jkl-text-input-line-height:var(--jkl-small-line-height);--jkl-text-input-font-weight:var(--jkl-small-font-weight);--jkl-text-input-height:2rem;--jkl-text-input-vertical-padding:0.25rem;--jkl-text-input-horizontal-padding:0.5rem;--jkl-text-input-padding:var(--jkl-text-input-vertical-padding) var(--jkl-text-input-horizontal-padding);--jkl-text-input-action-button-size:2rem;--jkl-text-input-action-button-icon-size:1.125rem;--jkl-text-input-action-button-padding:0;--jkl-text-input-action-button-focus-position:0}
|
|
@@ -19,48 +19,6 @@ $_action-button-padding--compact: 0;
|
|
|
19
19
|
$_action-button-focus-position: jkl.rem(6px);
|
|
20
20
|
$_action-button-focus-position--compact: 0;
|
|
21
21
|
|
|
22
|
-
$_text-input-focus-color: jkl.$color-granitt;
|
|
23
|
-
$_text-input-selection-color: color.scale(
|
|
24
|
-
$color: $_text-input-focus-color,
|
|
25
|
-
$alpha: -80%,
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
$_text-input-focus-color--inverted: jkl.$color-snohvit;
|
|
29
|
-
$_text-input-selection-color--inverted: color.scale(
|
|
30
|
-
$color: $_text-input-focus-color--inverted,
|
|
31
|
-
$alpha: -75%,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
@include jkl.light-mode-variables {
|
|
35
|
-
--jkl-text-input-border-color: #{jkl.$color-stein};
|
|
36
|
-
--jkl-text-input-text-color: #{jkl.$color-granitt};
|
|
37
|
-
--jkl-text-input-placeholder-color: #{jkl.$color-stein};
|
|
38
|
-
--jkl-text-input-unit-color: #{jkl.$color-granitt};
|
|
39
|
-
--jkl-text-input-background-color: #{jkl.$color-hvit};
|
|
40
|
-
--jkl-text-input-focus-color: #{$_text-input-focus-color};
|
|
41
|
-
--jkl-text-input-error-background-color: #{jkl.$color-feil};
|
|
42
|
-
--jkl-text-input-error-text-color: #{jkl.$color-granitt};
|
|
43
|
-
--jkl-text-input-error-placeholder-color: #{jkl.$color-stein};
|
|
44
|
-
--jkl-text-input-selection-color: #{$_text-input-selection-color};
|
|
45
|
-
--jkl-text-input-error-selection-color: #{$_text-input-selection-color};
|
|
46
|
-
--jkl-text-area-counter-count-color: #{jkl.$color-stein};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@include jkl.dark-mode-variables {
|
|
50
|
-
--jkl-text-input-border-color: #{jkl.$color-svaberg};
|
|
51
|
-
--jkl-text-input-text-color: #{jkl.$color-snohvit};
|
|
52
|
-
--jkl-text-input-placeholder-color: #{jkl.$color-svaberg};
|
|
53
|
-
--jkl-text-input-unit-color: #{jkl.$color-snohvit};
|
|
54
|
-
--jkl-text-input-background-color: #{jkl.$color-skifer};
|
|
55
|
-
--jkl-text-input-focus-color: #{$_text-input-focus-color--inverted};
|
|
56
|
-
--jkl-text-input-selection-color: #{$_text-input-selection-color--inverted};
|
|
57
|
-
--jkl-text-input-error-background-color: #{jkl.$color-feil};
|
|
58
|
-
--jkl-text-input-error-text-color: #{jkl.$color-granitt};
|
|
59
|
-
--jkl-text-input-error-placeholder-color: #{jkl.$color-stein};
|
|
60
|
-
--jkl-text-input-error-selection-color: #{$_text-input-selection-color};
|
|
61
|
-
--jkl-text-area-counter-count-color: #{jkl.$color-svaberg};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
22
|
@include jkl.comfortable-density-variables {
|
|
65
23
|
@include jkl.declare-font-variables("jkl-text-input", "body");
|
|
66
24
|
|
|
@@ -95,6 +53,11 @@ $_text-input-selection-color--inverted: color.scale(
|
|
|
95
53
|
}
|
|
96
54
|
|
|
97
55
|
@mixin wrapper-styles {
|
|
56
|
+
--text-color: var(--jkl-color-text-default);
|
|
57
|
+
--background-color: var(--jkl-color-background-input-base);
|
|
58
|
+
--border-color: var(--jkl-color-border-input);
|
|
59
|
+
--placeholder-color: var(--jkl-color-text-subdued);
|
|
60
|
+
|
|
98
61
|
border-radius: jkl.rem(3px);
|
|
99
62
|
box-sizing: border-box;
|
|
100
63
|
max-width: 100%;
|
|
@@ -108,30 +71,34 @@ $_text-input-selection-color--inverted: color.scale(
|
|
|
108
71
|
@include jkl.motion;
|
|
109
72
|
transition-property: color, box-shadow, background-color;
|
|
110
73
|
|
|
111
|
-
color: var(--
|
|
112
|
-
|
|
74
|
+
background-color: var(--background-color);
|
|
75
|
+
color: var(--text-color);
|
|
76
|
+
box-shadow: inset 0 0 0 jkl.rem(1px) var(--border-color),
|
|
113
77
|
0 0 0 jkl.rem(1px) transparent;
|
|
114
|
-
background-color: transparent;
|
|
115
78
|
|
|
116
|
-
|
|
117
|
-
background-color: var(--jkl-
|
|
118
|
-
|
|
79
|
+
&:focus-within {
|
|
80
|
+
--background-color: var(--jkl-color-background-input-focus);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[data-invalid="true"]:not(:focus-within) {
|
|
84
|
+
--background-color: var(--jkl-color-background-alert-error);
|
|
85
|
+
--text-color: var(--jkl-color-text-on-alert);
|
|
86
|
+
// Vi har ingen god måte å få tak i kun light mode-versjon av subdued
|
|
87
|
+
// så vi bruker tekstfargen med litt gjennomsiktighet
|
|
88
|
+
--placeholder-color: color(from currentColor sRGB r g b / 0.75);
|
|
119
89
|
}
|
|
120
90
|
|
|
121
91
|
&:hover {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
92
|
+
--border-color: var(--jkl-color-border-input-focus);
|
|
93
|
+
|
|
94
|
+
box-shadow: inset 0 0 0 jkl.rem(1px) var(--border-color),
|
|
95
|
+
0 0 0 jkl.rem(1px) var(--border-color);
|
|
125
96
|
|
|
126
97
|
@include jkl.forced-colors-mode {
|
|
127
98
|
border: jkl.rem(2px) solid ButtonText;
|
|
128
99
|
}
|
|
129
100
|
}
|
|
130
101
|
|
|
131
|
-
&:focus-within {
|
|
132
|
-
background-color: var(--jkl-text-input-background-color);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
102
|
@include jkl.keyboard-navigation {
|
|
136
103
|
&:has(.jkl-text-input__input:focus-visible),
|
|
137
104
|
&:has(.jkl-text-area__text-area:focus-visible) {
|
|
@@ -143,7 +110,7 @@ $_text-input-selection-color--inverted: color.scale(
|
|
|
143
110
|
@include jkl.focus-outline($offset: -8px);
|
|
144
111
|
|
|
145
112
|
@include jkl.forced-colors-mode {
|
|
146
|
-
--
|
|
113
|
+
--border-color: ButtonText;
|
|
147
114
|
}
|
|
148
115
|
}
|
|
149
116
|
|
|
@@ -168,7 +135,7 @@ $_text-input-selection-color--inverted: color.scale(
|
|
|
168
135
|
}
|
|
169
136
|
|
|
170
137
|
&:hover {
|
|
171
|
-
color: var(--jkl-text-
|
|
138
|
+
color: var(--jkl-color-text-interactive-hover);
|
|
172
139
|
|
|
173
140
|
@include jkl.forced-colors-mode {
|
|
174
141
|
border: jkl.rem(2px) inset ButtonText;
|
|
@@ -184,7 +151,7 @@ $_text-input-selection-color--inverted: color.scale(
|
|
|
184
151
|
@mixin input-styles {
|
|
185
152
|
background: none;
|
|
186
153
|
-webkit-appearance: none;
|
|
187
|
-
color:
|
|
154
|
+
color: inherit;
|
|
188
155
|
|
|
189
156
|
@include jkl.use-font-variables("jkl-text-input");
|
|
190
157
|
@include jkl.reset-outline;
|
|
@@ -202,50 +169,11 @@ $_text-input-selection-color--inverted: color.scale(
|
|
|
202
169
|
// Placeholder text style
|
|
203
170
|
&::placeholder {
|
|
204
171
|
opacity: 1;
|
|
205
|
-
color: var(--
|
|
172
|
+
color: var(--placeholder-color);
|
|
206
173
|
}
|
|
207
174
|
|
|
208
175
|
// Color of text selection
|
|
209
176
|
&::selection {
|
|
210
|
-
background-color:
|
|
211
|
-
|
|
212
|
-
[data-theme="dark"] & {
|
|
213
|
-
background-color: var(--jkl-text-input-selection-color);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Invalid state
|
|
218
|
-
&[aria-invalid="true"] {
|
|
219
|
-
color: var(--jkl-text-input-error-text-color);
|
|
220
|
-
|
|
221
|
-
&::placeholder {
|
|
222
|
-
color: var(--jkl-text-input-error-placeholder-color);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Color of text selection
|
|
226
|
-
&::selection {
|
|
227
|
-
background-color: var(--jkl-text-input-error-selection-color);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
& ~ .jkl-text-input-action-button {
|
|
231
|
-
color: var(--jkl-color-text-on-alert);
|
|
232
|
-
|
|
233
|
-
&:hover {
|
|
234
|
-
color: var(--jkl-text-input-error-text-color);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
&:focus {
|
|
238
|
-
@include jkl.keyboard-navigation {
|
|
239
|
-
&::after {
|
|
240
|
-
box-shadow: inset 0 0 0 jkl.rem(2px)
|
|
241
|
-
var(--jkl-text-input-error-text-color);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
& ~ .jkl-text-input__unit {
|
|
248
|
-
color: var(--jkl-text-input-error-text-color);
|
|
249
|
-
}
|
|
177
|
+
background-color: color(from currentColor sRGB r g b / 0.25);
|
|
250
178
|
}
|
|
251
179
|
}
|