@navikt/ds-css 0.15.12 → 0.16.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/form/index.css CHANGED
@@ -11,4 +11,4 @@
11
11
  @import "switch.css";
12
12
  @import "text-field.css";
13
13
  @import "textarea.css";
14
- @import "search-field.css";
14
+ @import "search.css";
@@ -0,0 +1,118 @@
1
+ :root {
2
+ --navds-search-color-border: var(--navds-semantic-color-border);
3
+ --navds-search-color-border-hover: var(
4
+ --navds-semantic-color-interaction-primary
5
+ );
6
+ }
7
+
8
+ .navds-search__wrapper-inner {
9
+ position: relative;
10
+ }
11
+
12
+ .navds-search__wrapper {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ }
16
+
17
+ .navds-search__input {
18
+ padding-right: var(--navds-spacing-12);
19
+ border-top-right-radius: 0;
20
+ border-bottom-right-radius: 0;
21
+ }
22
+
23
+ .navds-form-field--small .navds-search__input {
24
+ min-height: 32px;
25
+ padding: 0.15rem;
26
+ padding-right: var(--navds-spacing-8);
27
+ }
28
+
29
+ .navds-search__button-clear {
30
+ position: absolute;
31
+ right: 0.75rem;
32
+ border-radius: var(--navds-border-radius-medium);
33
+ color: var(--navds-semantic-color-text);
34
+ height: 32px;
35
+ width: 32px;
36
+ top: 50%;
37
+ transform: translateY(-50%);
38
+ display: flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ cursor: pointer;
42
+ background: none;
43
+ border: none;
44
+ font-size: 1rem;
45
+ padding: 0;
46
+ }
47
+
48
+ .navds-form-field--small .navds-search__button-clear {
49
+ right: 0.5rem;
50
+ height: 24px;
51
+ width: 24px;
52
+ }
53
+
54
+ .navds-search__button-clear:hover {
55
+ color: var(--navds-global-color-blue-500);
56
+ }
57
+
58
+ .navds-search__button-clear:focus {
59
+ box-shadow: var(--navds-shadow-focus);
60
+ outline: none;
61
+ }
62
+
63
+ .navds-search__button-search {
64
+ flex-shrink: 0;
65
+ min-width: 64px;
66
+ min-height: 32px;
67
+ border-radius: 0;
68
+ border-top-right-radius: var(--navds-border-radius-medium);
69
+ border-bottom-right-radius: var(--navds-border-radius-medium);
70
+ }
71
+
72
+ .navds-form-field--small .navds-search__button-search svg {
73
+ font-size: 1rem;
74
+ }
75
+
76
+ .navds-form-field--small .navds-search__button-search {
77
+ min-width: 40px;
78
+ }
79
+
80
+ .navds-search__button-search.navds-button--tertiary {
81
+ box-shadow: -1px 0 0 0 var(--navds-search-color-border) inset,
82
+ 0 1px 0 0 var(--navds-search-color-border) inset,
83
+ 0 -1px 0 0 var(--navds-search-color-border) inset;
84
+ }
85
+
86
+ .navds-search__button-search.navds-button--tertiary:hover {
87
+ box-shadow: -1px 0 0 0 var(--navds-search-color-border-hover) inset,
88
+ 0 1px 0 0 var(--navds-search-color-border-hover) inset,
89
+ 0 -1px 0 0 var(--navds-search-color-border-hover) inset,
90
+ -1px 0 0 0 var(--navds-search-color-border-hover);
91
+ z-index: 1;
92
+ }
93
+
94
+ .navds-search__wrapper-inner:focus-within
95
+ + .navds-search__button-search.navds-button--tertiary:hover {
96
+ z-index: auto;
97
+ }
98
+
99
+ .navds-search__button-search.navds-button--tertiary:focus {
100
+ box-shadow: 0 0 0 1px var(--navds-search-color-border) inset,
101
+ var(--navds-shadow-focus);
102
+ }
103
+
104
+ .navds-search__button-search.navds-button--tertiary:focus:hover {
105
+ box-shadow: 0 0 0 1px var(--navds-search-color-border-hover) inset,
106
+ var(--navds-shadow-focus);
107
+ }
108
+
109
+ .navds-search__button-search.navds-button--tertiary:focus:active {
110
+ box-shadow: 0 0 0 1px white inset, var(--navds-shadow-focus);
111
+ }
112
+
113
+ /* Focus layering */
114
+ .navds-search__input:focus,
115
+ .navds-search__button-clear,
116
+ .navds-search__button-search:focus {
117
+ z-index: 1;
118
+ }
@@ -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.15.12",
3
+ "version": "0.16.0",
4
4
  "private": false,
5
5
  "description": "Css for NAV Designsystem components",
6
6
  "author": "NAV Designsystem team",
@@ -27,5 +27,5 @@
27
27
  "postcss-cli": "^8.3.1",
28
28
  "postcss-import": "^14.0.2"
29
29
  },
30
- "gitHead": "f1c2c718e53324d18efb1c03483d0c75be2b386d"
30
+ "gitHead": "d2d08f58ceefbd34b35655bfa17bf509ef1da2e0"
31
31
  }
@@ -1,59 +0,0 @@
1
- :root {
2
- --navds-search-field-color-shadow-error: var(
3
- --navds-semantic-color-interaction-danger
4
- );
5
- --navds-search-field-color-border-error: var(
6
- --navds-semantic-color-interaction-danger
7
- );
8
- --navds-search-field-color-clearbutton-border: var(
9
- --navds-semantic-color-border
10
- );
11
- }
12
-
13
- .navds-search-field__input-wrapper {
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- }
18
-
19
- .navds-form-field--small .navds-search-field__input {
20
- padding: 0.15rem;
21
- min-height: 32px;
22
- }
23
-
24
- .navds-search-field__input-wrapper > *:not(:first-child):not(:last-child) {
25
- border-radius: 0;
26
- }
27
-
28
- .navds-search-field__input-wrapper > :first-child {
29
- border-top-right-radius: 0;
30
- border-bottom-right-radius: 0;
31
- }
32
-
33
- .navds-search-field__input-wrapper > :last-child {
34
- border-top-left-radius: 0;
35
- border-bottom-left-radius: 0;
36
- }
37
-
38
- .navds-search-field__input-wrapper > :last-child:first-child {
39
- border-radius: 4px;
40
- }
41
-
42
- .navds-search-field__input-wrapper :focus {
43
- z-index: var(--navds-z-index-focus);
44
- }
45
-
46
- .navds-search-field__button,
47
- .navds-search-field__clear-button {
48
- flex-shrink: 0;
49
- }
50
-
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);
55
- }
56
-
57
- .navds-search-field--disabled {
58
- opacity: 0.3;
59
- }