@entur/dropdown 5.2.1-beta.0 → 5.3.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.
package/dist/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from './SearchableDropdown';
5
5
  export * from './MultiSelect';
6
6
  export * from './Dropdown';
7
7
  export * from './NativeDropdown';
8
+ export * from './types';
package/dist/styles.css CHANGED
@@ -1,38 +1,99 @@
1
- /* DO NOT CHANGE!*/
2
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
3
- .eds-dropdown__toggle-button {
4
- -webkit-appearance: none;
5
- -moz-appearance: none;
6
- appearance: none;
7
- background: none;
8
- border: none;
9
- border-radius: 0;
10
- color: inherit;
11
- font-size: inherit;
12
- font-family: inherit;
13
- margin-right: -0.75rem;
14
- padding: 0.5rem;
1
+ .eds-inline-spinner {
2
+ align-items: center;
15
3
  display: flex;
16
4
  justify-content: center;
5
+ height: 100%;
6
+ width: 100%;
17
7
  }
18
- .eds-dropdown__toggle-button--open svg {
19
- transform: rotate(180deg);
8
+ /* DO NOT CHANGE!*/
9
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
10
+ .eds-dropdown-list {
11
+ border-radius: 0.25rem;
12
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
13
+ display: none;
14
+ list-style: none;
15
+ margin: 0;
16
+ max-height: 50vh;
17
+ padding: 0;
18
+ position: relative;
19
+ overflow-y: auto;
20
+ width: 100%;
21
+ z-index: 20;
20
22
  }
21
- .eds-dropdown__toggle-button:focus {
22
- outline-offset: 0.125rem;
23
+ .eds-contrast .eds-dropdown-list {
24
+ box-shadow: 0 0.0625rem 0.1875rem rgb(57, 61, 121);
25
+ }
26
+ .eds-dropdown-list--open {
27
+ display: inline-block;
28
+ }
29
+ .eds-dropdown-list:focus {
23
30
  outline: none;
24
- box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
25
31
  }
26
- .eds-contrast .eds-dropdown__toggle-button:focus {
27
- box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
32
+ @media all and (min-width: 50rem) {
33
+ .eds-dropdown-list {
34
+ max-height: 30vh;
35
+ }
28
36
  }
29
- .eds-inline-spinner {
37
+ .eds-dropdown-list__item {
30
38
  align-items: center;
39
+ background-color: #f8f8f8;
40
+ border-bottom: 0.125rem solid #e9e9e9;
41
+ border-left: 0.125rem solid #e9e9e9;
42
+ border-right: 0.125rem solid #e9e9e9;
43
+ color: #181c56;
31
44
  display: flex;
32
- justify-content: center;
33
- height: 100%;
45
+ justify-content: space-between;
46
+ font-family: inherit;
47
+ font-size: 1rem;
48
+ line-height: 1.25rem;
49
+ padding: 0.75rem 1rem;
34
50
  width: 100%;
35
51
  }
52
+ .eds-dropdown-list__item:first-child {
53
+ border-top: 0.125rem solid #e9e9e9;
54
+ }
55
+ .eds-dropdown-list__item:last-child {
56
+ border-bottom: none;
57
+ }
58
+ .eds-contrast .eds-dropdown-list__item {
59
+ color: #181c56;
60
+ border-color: #54568c;
61
+ background-color: #ffffff;
62
+ }
63
+ .eds-dropdown-list__item--highlighted {
64
+ background-color: #d1d4e3;
65
+ }
66
+ .eds-contrast .eds-dropdown-list__item--highlighted {
67
+ background-color: #d1d4e3;
68
+ }
69
+ .eds-dropdown-list-icon {
70
+ margin-left: 0.75rem;
71
+ }
72
+ /* DO NOT CHANGE!*/
73
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
74
+ .eds-dropdown__searchable-selected-item {
75
+ display: block;
76
+ font-size: 1rem;
77
+ line-height: 1rem;
78
+ margin-right: -1rem;
79
+ padding: calc(1rem + 0.25rem) 0 0.25rem 1rem;
80
+ font-family: inherit;
81
+ overflow-x: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+ }
85
+ .eds-dropdown__searchable-selected-item__wrapper {
86
+ max-width: 65%;
87
+ }
88
+
89
+ .eds-form-control.eds-dropdown__input::-moz-placeholder {
90
+ -moz-transition: none;
91
+ transition: none;
92
+ }
93
+
94
+ .eds-form-control.eds-dropdown__input::placeholder {
95
+ transition: none;
96
+ }
36
97
  /* DO NOT CHANGE!*/
37
98
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
38
99
  .eds-dropdown-wrapper {
@@ -93,92 +154,31 @@
93
154
  }
94
155
  /* DO NOT CHANGE!*/
95
156
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
96
- .eds-dropdown__searchable-selected-item {
97
- display: block;
98
- font-size: 1rem;
99
- line-height: 1rem;
100
- margin-right: -1rem;
101
- padding: calc(1rem + 0.25rem) 0 0.25rem 1rem;
157
+ .eds-dropdown__toggle-button {
158
+ -webkit-appearance: none;
159
+ -moz-appearance: none;
160
+ appearance: none;
161
+ background: none;
162
+ border: none;
163
+ border-radius: 0;
164
+ color: inherit;
165
+ font-size: inherit;
102
166
  font-family: inherit;
103
- overflow-x: hidden;
104
- text-overflow: ellipsis;
105
- white-space: nowrap;
106
- }
107
- .eds-dropdown__searchable-selected-item__wrapper {
108
- max-width: 65%;
109
- }
110
-
111
- .eds-form-control.eds-dropdown__input::-moz-placeholder {
112
- -moz-transition: none;
113
- transition: none;
114
- }
115
-
116
- .eds-form-control.eds-dropdown__input::placeholder {
117
- transition: none;
118
- }
119
- /* DO NOT CHANGE!*/
120
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
121
- .eds-dropdown-list {
122
- border-radius: 0.25rem;
123
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
124
- display: none;
125
- list-style: none;
126
- margin: 0;
127
- max-height: 50vh;
128
- padding: 0;
129
- position: relative;
130
- overflow-y: auto;
131
- width: 100%;
132
- z-index: 20;
133
- }
134
- .eds-contrast .eds-dropdown-list {
135
- box-shadow: 0 0.0625rem 0.1875rem rgb(57, 61, 121);
136
- }
137
- .eds-dropdown-list--open {
138
- display: inline-block;
139
- }
140
- .eds-dropdown-list:focus {
141
- outline: none;
142
- }
143
- @media all and (min-width: 50rem) {
144
- .eds-dropdown-list {
145
- max-height: 30vh;
146
- }
147
- }
148
- .eds-dropdown-list__item {
149
- align-items: center;
150
- background-color: #f8f8f8;
151
- border-bottom: 0.125rem solid #e9e9e9;
152
- border-left: 0.125rem solid #e9e9e9;
153
- border-right: 0.125rem solid #e9e9e9;
154
- color: #181c56;
167
+ margin-right: -0.75rem;
168
+ padding: 0.5rem;
155
169
  display: flex;
156
- justify-content: space-between;
157
- font-family: inherit;
158
- font-size: 1rem;
159
- line-height: 1.25rem;
160
- padding: 0.75rem 1rem;
161
- width: 100%;
162
- }
163
- .eds-dropdown-list__item:first-child {
164
- border-top: 0.125rem solid #e9e9e9;
165
- }
166
- .eds-dropdown-list__item:last-child {
167
- border-bottom: none;
168
- }
169
- .eds-contrast .eds-dropdown-list__item {
170
- color: #181c56;
171
- border-color: #54568c;
172
- background-color: #ffffff;
170
+ justify-content: center;
173
171
  }
174
- .eds-dropdown-list__item--highlighted {
175
- background-color: #d1d4e3;
172
+ .eds-dropdown__toggle-button--open svg {
173
+ transform: rotate(180deg);
176
174
  }
177
- .eds-contrast .eds-dropdown-list__item--highlighted {
178
- background-color: #d1d4e3;
175
+ .eds-dropdown__toggle-button:focus {
176
+ outline-offset: 0.125rem;
177
+ outline: none;
178
+ box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
179
179
  }
180
- .eds-dropdown-list-icon {
181
- margin-left: 0.75rem;
180
+ .eds-contrast .eds-dropdown__toggle-button:focus {
181
+ box-shadow: 0 0 0 0.125rem #181c56, 0 0 0 0.25rem #ffffff;
182
182
  }
183
183
  /* DO NOT CHANGE!*/
184
184
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { A11yRemovalMessage, A11yStatusMessageOptions } from 'downshift';
2
2
  import { NormalizedDropdownItemType } from './types';
3
- import React from 'react';
4
3
  export declare const EMPTY_INPUT = "";
5
4
  export declare function lowerCaseFilterTest(item: NormalizedDropdownItemType<any>, input: string | undefined): boolean;
6
5
  export declare function noFilter<ValueType>(item: NormalizedDropdownItemType<ValueType>, input: string | undefined): boolean;
@@ -43,8 +42,4 @@ type getA11yRemovalMessageType<Item> = A11yRemovalMessage<Item> & {
43
42
  removedItem?: NormalizedDropdownItemType<any>;
44
43
  };
45
44
  export declare function getA11yRemovalMessage(options: getA11yRemovalMessageType<NormalizedDropdownItemType<any>>): string;
46
- /**A VoiceOver click is always preformed in the center of the clicked element.
47
- This functions expolits that to check if the performed click likely is
48
- made by VoiceOver. */
49
- export declare const isVoiceOverClick: (clickEvent: React.MouseEvent) => boolean;
50
45
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur/dropdown",
3
- "version": "5.2.1-beta.0",
3
+ "version": "5.3.1",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/dropdown.esm.js",
@@ -27,17 +27,17 @@
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "dependencies": {
30
- "@entur/a11y": "^0.2.75",
31
- "@entur/button": "^3.2.10",
32
- "@entur/chip": "^0.6.66-beta.0",
33
- "@entur/form": "^7.0.38-beta.0",
34
- "@entur/icons": "^6.15.0",
35
- "@entur/loader": "^0.4.54",
36
- "@entur/tokens": "^3.12.0",
37
- "@entur/tooltip": "^2.6.47-beta.0",
30
+ "@entur/a11y": "^0.2.76",
31
+ "@entur/button": "^3.2.11",
32
+ "@entur/chip": "^0.6.67",
33
+ "@entur/form": "^7.0.39",
34
+ "@entur/icons": "^6.15.1",
35
+ "@entur/loader": "^0.4.55",
36
+ "@entur/tokens": "^3.13.0",
37
+ "@entur/tooltip": "^2.6.48",
38
38
  "@entur/utils": "^0.10.0",
39
39
  "classnames": "^2.3.1",
40
- "downshift": "^7.6.1"
40
+ "downshift": "^8.3.3"
41
41
  },
42
- "gitHead": "453c823f5b935959f701f0c777236a8e0c23601e"
42
+ "gitHead": "450b88a0baca11352d329ffa3fcd6c003ec1d338"
43
43
  }