@navikt/ds-css 0.12.12 → 0.13.0-rc.search.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.
@@ -1,11 +1,48 @@
1
1
  :root {
2
- --navds-search-field-color-shadow-error: var(
3
- --navds-semantic-color-interaction-danger
2
+ --navds-search-field-color-input-hover: var(
3
+ --navds-semantic-color-interaction-primary
4
4
  );
5
- --navds-search-field-color-border-error: var(
6
- --navds-semantic-color-interaction-danger
5
+ --navds-search-field-color-button-text: var(--navds-semantic-color-text);
6
+ --navds-search-field-color-button-hover: var(
7
+ --navds-semantic-color-interaction-primary
7
8
  );
8
- --navds-search-field-color-clearbutton-border: var(
9
+ --navds-search-field-color-button-border-hover-focus: var(
10
+ --navds-semantic-color-interaction-primary
11
+ );
12
+ --navds-search-field-color-button-border-focus: var(
13
+ --navds-semantic-color-border
14
+ );
15
+ --navds-search-field-color-input-inverted: var(
16
+ --navds-semantic-color-component-background-light
17
+ );
18
+ --navds-search-field-color-input-inverted-border: var(
19
+ --navds-semantic-color-component-background-light
20
+ );
21
+ --navds-search-field-color-input-inverted-background: var(
22
+ --navds-semantic-color-component-background-inverted
23
+ );
24
+ --navds-search-field-color-input-inverted-background-active: var(
25
+ --navds-semantic-color-component-background-light
26
+ );
27
+ --navds-search-field-color-input-inverted-active: var(
28
+ --navds-semantic-color-text
29
+ );
30
+ --navds-search-field-color-input-inverted-border-active: var(
31
+ --navds-semantic-color-component-background-inverted
32
+ );
33
+ --navds-search-field-color-input-inverted-background-focus: var(
34
+ --navds-semantic-color-component-background-light
35
+ );
36
+ --navds-search-field-color-input-inverted-focus: var(
37
+ --navds-semantic-color-text
38
+ );
39
+ --navds-search-field-color-input-inverted-border-focus: var(
40
+ --navds-semantic-color-component-background-inverted
41
+ );
42
+ --navds-search-field-color-input-inverted-hover-focus: var(
43
+ --navds-semantic-color-focus-inverted
44
+ );
45
+ --navds-search-field-color-button-inverted-focus: var(
9
46
  --navds-semantic-color-border
10
47
  );
11
48
  }
@@ -14,46 +51,134 @@
14
51
  display: flex;
15
52
  align-items: center;
16
53
  justify-content: center;
54
+ position: relative;
55
+ }
56
+
57
+ .navds-search-field__input-icon {
58
+ position: absolute;
59
+ left: 0;
60
+ padding: 0 var(--navds-spacing-4);
61
+ align-items: center;
62
+ display: flex;
63
+ pointer-events: none;
64
+ }
65
+
66
+ .navds-search-field__input {
67
+ padding-left: var(--navds-spacing-11);
68
+ padding-right: var(--navds-spacing-12);
69
+ color: inherit;
17
70
  }
18
71
 
19
72
  .navds-form-field--small .navds-search-field__input {
20
- padding: 0.15rem;
21
73
  min-height: 32px;
74
+ padding: 0.15rem var(--navds-spacing-8);
22
75
  }
23
76
 
24
- .navds-search-field__input-wrapper > *:not(:first-child):not(:last-child) {
25
- border-radius: 0;
77
+ .navds-form-field--small .navds-search-field__input-icon {
78
+ padding: 0 var(--navds-spacing-2);
26
79
  }
27
80
 
28
- .navds-search-field__input-wrapper > :first-child {
29
- border-top-right-radius: 0;
30
- border-bottom-right-radius: 0;
81
+ .navds-search-field__input:hover {
82
+ border-color: var(--navds-search-field-color-input-hover);
31
83
  }
32
84
 
33
- .navds-search-field__input-wrapper > :last-child {
34
- border-top-left-radius: 0;
35
- border-bottom-left-radius: 0;
36
- }
85
+ /* Clear Button */
37
86
 
38
- .navds-search-field__input-wrapper > :last-child:first-child {
87
+ .navds-search-field__clear-button {
88
+ position: absolute;
89
+ right: 0;
90
+ color: var(--navds-search-field-color-button-text);
91
+ appearance: none;
92
+ background: none;
93
+ height: 48px;
94
+ width: 48px;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ border: 1px solid transparent;
39
99
  border-radius: 4px;
100
+ cursor: pointer;
101
+ font-size: 1.5rem;
40
102
  }
41
103
 
42
- .navds-search-field__input-wrapper :focus {
43
- z-index: var(--navds-z-index-focus);
104
+ .navds-form-field--small .navds-search-field__clear-button {
105
+ height: 32px;
106
+ width: 32px;
107
+ font-size: 1rem;
44
108
  }
45
109
 
46
- .navds-search-field__button,
47
- .navds-search-field__clear-button {
48
- flex-shrink: 0;
110
+ .navds-search-field__clear-button:focus {
111
+ box-shadow: var(--navds-shadow-focus);
112
+ border-color: var(--navds-search-field-color-button-border-focus);
113
+ outline: none;
114
+ }
115
+
116
+ .navds-search-field__clear-button:hover {
117
+ color: var(--navds-search-field-color-button-hover);
118
+ }
119
+
120
+ .navds-search-field__clear-button:hover:focus {
121
+ border-color: var(--navds-search-field-color-button-border-hover-focus);
122
+ }
123
+
124
+ /* Inverted */
125
+ .navds-search-field--inverted
126
+ > .navds-search-field__input-wrapper
127
+ > .navds-search-field__input {
128
+ background-color: var(--navds-search-field-color-inverted-background);
129
+ border-color: var(--navds-search-field-color-input-inverted-border);
130
+ }
131
+
132
+ .navds-search-field--inverted
133
+ > .navds-search-field__input-wrapper[data-value="true"]
134
+ > .navds-search-field__input {
135
+ background-color: var(
136
+ --navds-search-field-color-input-inverted-background-active
137
+ );
138
+ border-color: var(--navds-search-field-color-input-inverted-border-active);
139
+ }
140
+
141
+ .navds-search-field--inverted
142
+ > .navds-search-field__input-wrapper[data-value="true"] {
143
+ color: var(--navds-search-field-color-input-inverted-active);
144
+ }
145
+
146
+ .navds-search-field--inverted > .navds-search-field__input-wrapper {
147
+ color: var(--navds-search-field-color-input-inverted);
148
+ }
149
+
150
+ .navds-search-field--inverted
151
+ > .navds-search-field__input-wrapper
152
+ > .navds-search-field__input:focus {
153
+ background-color: var(
154
+ --navds-search-field-color-input-inverted-background-focus
155
+ );
156
+ border-color: var(--navds-search-field-color-input-inverted-border-focus);
157
+ box-shadow: 0 0 0 3px var(--navds-semantic-color-focus-inverted);
158
+ }
159
+
160
+ .navds-search-field--inverted
161
+ > .navds-search-field__input-wrapper:focus-within {
162
+ color: var(--navds-search-field-color-input-inverted-focus);
163
+ }
164
+
165
+ /* Inveted clear button */
166
+
167
+ .navds-search-field--inverted
168
+ > .navds-search-field__input-wrapper
169
+ > .navds-search-field__clear-button:focus {
170
+ box-shadow: 0 0 0 3px var(--navds-semantic-color-focus-inverted);
171
+ border-color: var(--navds-search-field-color-button-inverted-focus);
172
+ outline: none;
49
173
  }
50
174
 
51
- .navds-search-field--error
52
- .navds-search-field__input:not(:hover):not(:focus):not(:disabled) {
53
- box-shadow: 0 0 0 1px var(--navds-search-field-color-shadow-error) inset;
54
- border-color: var(--navds-search-field-color-border-error);
175
+ .navds-search-field--inverted
176
+ > .navds-search-field__input-wrapper
177
+ > .navds-search-field__clear-button:hover:focus {
178
+ border-color: var(--navds-search-field-color-input-inverted-hover-focus);
55
179
  }
56
180
 
181
+ /* disabled */
57
182
  .navds-search-field--disabled {
58
183
  opacity: 0.3;
59
184
  }
package/form/switch.css CHANGED
@@ -210,7 +210,7 @@
210
210
  appearance: none;
211
211
  }
212
212
 
213
- .navds-switch--disabled {
213
+ .navds-switch--disabled:not(.navds-switch--loading) {
214
214
  opacity: 0.3;
215
215
  }
216
216
 
@@ -1,4 +1,5 @@
1
1
  :root {
2
+ --navds-text-field-color-text: var(--navds-semantic-color-text);
2
3
  --navds-text-field-color-background: var(
3
4
  --navds-semantic-color-component-background-light
4
5
  );
@@ -27,6 +28,7 @@
27
28
  border: 1px solid var(--navds-text-field-color-border);
28
29
  min-height: 48px;
29
30
  width: 100%;
31
+ color: var(--navds-text-field-color-text);
30
32
  }
31
33
 
32
34
  .navds-form-field--small > .navds-text-field__input {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-css",
3
- "version": "0.12.12",
3
+ "version": "0.13.0-rc.search.0",
4
4
  "private": false,
5
5
  "description": "Css for NAV Designsystem components",
6
6
  "author": "NAV Designsystem team",
@@ -21,11 +21,10 @@
21
21
  "watch": "postcss --watch --use postcss-import -o dist/index.css index.css"
22
22
  },
23
23
  "devDependencies": {
24
- "@navikt/ds-tokens": "^0.7.1",
24
+ "@navikt/ds-tokens": "^0.8.0",
25
25
  "normalize.css": "^8.0.1",
26
26
  "postcss": "^8.3.6",
27
27
  "postcss-cli": "^8.3.1",
28
28
  "postcss-import": "^14.0.2"
29
- },
30
- "gitHead": "474ea81bbdeb5d5f07f382f0c663757f30e21672"
29
+ }
31
30
  }
package/LICENCE DELETED
@@ -1,31 +0,0 @@
1
- Font License
2
-
3
- The Source Sans Pro font files in packages/node_modules/nav-frontend-typografi-style/assets are a subset of Source Sans Pro, licensed under the SIL Open Font License, and copyright Adobe Systems Incorporated, with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
4
-
5
- Icon License
6
-
7
- This project uses Streamline Icons. If you use nav-frontend-moduler in your project please adhere to the Streamline Icons license agreement found here: https://streamlineicons.com/ux/extended-license.html
8
-
9
- The rest of the codebase (excluding 3rd party dependencies):
10
-
11
- # The MIT License
12
-
13
- Copyright 2019 NAV (Arbeids- og velferdsdirektoratet) - The Norwegian Labour and Welfare Administration
14
-
15
- Permission is hereby granted, free of charge, to any person obtaining
16
- a copy of this software and associated documentation files (the "Software"),
17
- to deal in the Software without restriction, including without limitation
18
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
19
- and/or sell copies of the Software, and to permit persons to whom the
20
- Software is furnished to do so, subject to the following conditions:
21
-
22
- The above copyright notice and this permission notice shall be included
23
- in all copies or substantial portions of the Software.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
29
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
30
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
31
- USE OR OTHER DEALINGS IN THE SOFTWARE.