@entur/dropdown 3.0.27 → 3.0.29

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/dist/styles.css CHANGED
@@ -2,69 +2,17 @@
2
2
  --eds-dropdown: 1;
3
3
  }/* DO NOT CHANGE!*/
4
4
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
5
- .eds-dropdown-list {
6
- border-radius: 0.25rem;
7
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
8
- display: none;
9
- list-style: none;
10
- margin: 0;
11
- max-height: 50vh;
12
- padding: 0;
13
- position: relative;
14
- overflow-y: auto;
15
- width: 100%;
16
- z-index: 20;
17
- }
18
- .eds-contrast .eds-dropdown-list {
19
- box-shadow: 0 0.0625rem 0.1875rem #393d79;
20
- }
21
- .eds-dropdown-list--open {
22
- display: inline-block;
23
- }
24
- .eds-dropdown-list:focus {
25
- outline: none;
26
- }
27
- @media all and (min-width: 50rem) {
28
- .eds-dropdown-list {
29
- max-height: 30vh;
30
- }
5
+ .eds-dropdown + .eds-form-control__append {
6
+ margin-left: -2em;
7
+ pointer-events: none;
31
8
  }
32
9
 
33
- .eds-dropdown-list__item {
34
- align-items: center;
35
- background-color: #f8f8f8;
36
- border-bottom: 0.125rem solid #e9e9e9;
37
- border-left: 0.125rem solid #e9e9e9;
38
- border-right: 0.125rem solid #e9e9e9;
39
- color: #181c56;
40
- display: flex;
41
- justify-content: space-between;
42
- font-family: inherit;
43
- font-size: 1rem;
44
- line-height: 1.25rem;
45
- padding: 0.75rem 1rem;
46
- width: 100%;
47
- }
48
- .eds-dropdown-list__item:first-child {
49
- border-top: 0.125rem solid #e9e9e9;
50
- }
51
- .eds-dropdown-list__item:last-child {
52
- border-bottom: none;
53
- }
54
- .eds-contrast .eds-dropdown-list__item {
10
+ .eds-dropdown option {
55
11
  color: #181c56;
56
- border-color: #54568c;
57
12
  background-color: #ffffff;
58
13
  }
59
- .eds-dropdown-list__item--highlighted {
60
- background-color: #d1d4e3;
61
- }
62
- .eds-contrast .eds-dropdown-list__item--highlighted {
63
- background-color: #d1d4e3;
64
- }
65
-
66
- .eds-dropdown-list__item-icon {
67
- margin-left: 0.75rem;
14
+ .eds-contrast .eds-dropdown option {
15
+ color: #181c56;
68
16
  }/* DO NOT CHANGE!*/
69
17
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
70
18
  .eds-multi-select {
@@ -148,14 +96,7 @@
148
96
  }
149
97
  .eds-multiselect-checkbox--checked .eds-checkbox-icon__path {
150
98
  stroke: #ffffff;
151
- -webkit-animation: stroke ease-in-out 0.2s 0.1s forwards;
152
- animation: stroke ease-in-out 0.2s 0.1s forwards;
153
- }
154
-
155
- @-webkit-keyframes stroke {
156
- 100% {
157
- stroke-dashoffset: 0;
158
- }
99
+ animation: stroke ease-in-out 0.2s 0.1s forwards;
159
100
  }
160
101
 
161
102
  @keyframes stroke {
@@ -164,17 +105,69 @@
164
105
  }
165
106
  }/* DO NOT CHANGE!*/
166
107
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
167
- .eds-dropdown + .eds-form-control__append {
168
- margin-left: -2em;
169
- pointer-events: none;
108
+ .eds-dropdown-list {
109
+ border-radius: 0.25rem;
110
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
111
+ display: none;
112
+ list-style: none;
113
+ margin: 0;
114
+ max-height: 50vh;
115
+ padding: 0;
116
+ position: relative;
117
+ overflow-y: auto;
118
+ width: 100%;
119
+ z-index: 20;
120
+ }
121
+ .eds-contrast .eds-dropdown-list {
122
+ box-shadow: 0 0.0625rem 0.1875rem #393d79;
123
+ }
124
+ .eds-dropdown-list--open {
125
+ display: inline-block;
126
+ }
127
+ .eds-dropdown-list:focus {
128
+ outline: none;
129
+ }
130
+ @media all and (min-width: 50rem) {
131
+ .eds-dropdown-list {
132
+ max-height: 30vh;
133
+ }
170
134
  }
171
135
 
172
- .eds-dropdown option {
136
+ .eds-dropdown-list__item {
137
+ align-items: center;
138
+ background-color: #f8f8f8;
139
+ border-bottom: 0.125rem solid #e9e9e9;
140
+ border-left: 0.125rem solid #e9e9e9;
141
+ border-right: 0.125rem solid #e9e9e9;
173
142
  color: #181c56;
174
- background-color: #ffffff;
143
+ display: flex;
144
+ justify-content: space-between;
145
+ font-family: inherit;
146
+ font-size: 1rem;
147
+ line-height: 1.25rem;
148
+ padding: 0.75rem 1rem;
149
+ width: 100%;
175
150
  }
176
- .eds-contrast .eds-dropdown option {
151
+ .eds-dropdown-list__item:first-child {
152
+ border-top: 0.125rem solid #e9e9e9;
153
+ }
154
+ .eds-dropdown-list__item:last-child {
155
+ border-bottom: none;
156
+ }
157
+ .eds-contrast .eds-dropdown-list__item {
177
158
  color: #181c56;
159
+ border-color: #54568c;
160
+ background-color: #ffffff;
161
+ }
162
+ .eds-dropdown-list__item--highlighted {
163
+ background-color: #d1d4e3;
164
+ }
165
+ .eds-contrast .eds-dropdown-list__item--highlighted {
166
+ background-color: #d1d4e3;
167
+ }
168
+
169
+ .eds-dropdown-list__item-icon {
170
+ margin-left: 0.75rem;
178
171
  }/* DO NOT CHANGE!*/
179
172
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
180
173
  .eds-dropdown__searchable-selected-item {
@@ -197,11 +190,6 @@
197
190
  transition: none;
198
191
  }
199
192
 
200
- .eds-form-control.eds-dropdown__input:-ms-input-placeholder {
201
- -ms-transition: none;
202
- transition: none;
203
- }
204
-
205
193
  .eds-form-control.eds-dropdown__input::placeholder {
206
194
  transition: none;
207
195
  }/* DO NOT CHANGE!*/
@@ -335,13 +323,6 @@
335
323
  bottom: 1px;
336
324
  }
337
325
 
338
- .eds-form-control.eds-searchable-dropdown__input:-ms-input-placeholder {
339
- -ms-transition: none;
340
- transition: none;
341
- position: relative;
342
- bottom: 1px;
343
- }
344
-
345
326
  .eds-form-control.eds-searchable-dropdown__input::placeholder {
346
327
  transition: none;
347
328
  position: relative;
@@ -363,10 +344,6 @@
363
344
  color: #656782;
364
345
  }
365
346
 
366
- .eds-dropdown__input:-ms-input-placeholder {
367
- color: #656782;
368
- }
369
-
370
347
  .eds-dropdown__input::placeholder {
371
348
  color: #656782;
372
349
  }
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  /** A dropdown item has a string label and a string value */
3
- export declare type NormalizedDropdownItemType = {
3
+ export type NormalizedDropdownItemType = {
4
4
  value: string;
5
5
  label: string;
6
6
  icons?: React.ComponentType<any>[];
7
7
  };
8
- export declare type DropdownItemType = {
8
+ export type DropdownItemType = {
9
9
  value?: string;
10
10
  label: string;
11
11
  icons?: React.ComponentType<any>[];
@@ -1,7 +1,7 @@
1
1
  import { DropdownItemType, NormalizedDropdownItemType } from './useNormalizedItems';
2
- declare type AsyncDropdownItemType = (inputType: string) => Promise<DropdownItemType[]>;
3
- declare type SyncDropdownItemType = (inputType: string) => DropdownItemType[];
4
- export declare type PotentiallyAsyncDropdownItemType = DropdownItemType[] | SyncDropdownItemType | AsyncDropdownItemType;
2
+ type AsyncDropdownItemType = (inputType: string) => Promise<DropdownItemType[]>;
3
+ type SyncDropdownItemType = (inputType: string) => DropdownItemType[];
4
+ export type PotentiallyAsyncDropdownItemType = DropdownItemType[] | SyncDropdownItemType | AsyncDropdownItemType;
5
5
  export declare const useResolvedItems: (itemsOrItemsResolver: PotentiallyAsyncDropdownItemType, debounceTimeout?: number) => {
6
6
  fetchItems: (arg: string) => void;
7
7
  loading: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/dropdown",
3
- "version": "3.0.27",
3
+ "version": "3.0.29",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/dropdown.esm.js",
@@ -20,24 +20,24 @@
20
20
  "start": "dts watch --noClean",
21
21
  "build": "dts build",
22
22
  "test": "dts test",
23
- "lint": "dts lint"
23
+ "lint": "dts lint src"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": ">=16.8.0",
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@entur/a11y": "^0.2.54",
31
- "@entur/button": "^2.10.9",
32
- "@entur/chip": "^0.6.17",
33
- "@entur/form": "^5.4.14",
34
- "@entur/icons": "^5.4.2",
35
- "@entur/loader": "^0.4.17",
36
- "@entur/tokens": "^3.4.4",
37
- "@entur/tooltip": "^2.6.1",
38
- "@entur/utils": "^0.5.0",
30
+ "@entur/a11y": "^0.2.56",
31
+ "@entur/button": "^2.10.11",
32
+ "@entur/chip": "^0.6.19",
33
+ "@entur/form": "^5.4.16",
34
+ "@entur/icons": "^5.5.0",
35
+ "@entur/loader": "^0.4.19",
36
+ "@entur/tokens": "^3.5.0",
37
+ "@entur/tooltip": "^2.6.3",
38
+ "@entur/utils": "^0.5.2",
39
39
  "classnames": "^2.3.1",
40
40
  "downshift": "^6.1.7"
41
41
  },
42
- "gitHead": "36772ae4f2d8375622acff19736c07d15435cb95"
42
+ "gitHead": "30b38034aaafba9fb308fb3d8c8bfaab9608d720"
43
43
  }