@entur/dropdown 7.3.2-beta.9 → 7.3.3

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
@@ -1,4 +1,3 @@
1
- import './index.scss';
2
1
  export type { NormalizedDropdownItemType, DropdownItemType } from './types';
3
2
  export * from './SearchableDropdown';
4
3
  export * from './MultiSelect';
package/dist/styles.css CHANGED
@@ -1,4 +1,82 @@
1
- /* DO NOT CHANGE!*/
1
+ :root {
2
+ --eds-dropdown: 1;
3
+ }/* DO NOT CHANGE!*/
4
+ /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
5
+ .eds-dropdown__list {
6
+ position: absolute;
7
+ box-sizing: border-box;
8
+ max-height: 20rem;
9
+ overflow-y: auto;
10
+ padding: 0;
11
+ margin: 0;
12
+ list-style: none;
13
+ border: 0.125rem solid var(--components-form-basemenu-border);
14
+ border-radius: 0.25rem;
15
+ box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
16
+ cursor: default;
17
+ z-index: 20;
18
+ }
19
+ .eds-dropdown__list:focus {
20
+ outline: none;
21
+ }
22
+ .eds-dropdown__list__item {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: flex-start;
26
+ padding: 0.75rem 1rem;
27
+ font-family: inherit;
28
+ font-size: 1rem;
29
+ word-break: break-word;
30
+ line-height: 1.25rem;
31
+ overflow-x: hidden;
32
+ color: var(--components-form-basemenu-text);
33
+ background-color: var(--components-form-basemenu-fill-default);
34
+ }
35
+ .eds-dropdown__list__item:last-child {
36
+ border-bottom: none;
37
+ }
38
+ .eds-dropdown__list__item__text {
39
+ flex: 1;
40
+ cursor: default;
41
+ }
42
+ .eds-dropdown__list__item__icon {
43
+ margin-left: 0.75rem;
44
+ }
45
+ .eds-dropdown__list__item__checkbox {
46
+ pointer-events: none;
47
+ }
48
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon {
49
+ border-color: var(--components-form-checkbox-standard-border);
50
+ }
51
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
52
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon {
53
+ background-color: var(--components-form-checkbox-standard-fill-selected);
54
+ }
55
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon path,
56
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon path {
57
+ stroke: var(--components-form-checkbox-standard-icon);
58
+ }
59
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon rect,
60
+ .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon rect {
61
+ fill: var(--components-form-checkbox-standard-icon);
62
+ }
63
+ .eds-dropdown__list__item--highlighted {
64
+ background-color: var(--components-form-basemenu-fill-hover);
65
+ }
66
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
67
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon,
68
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:checked + .eds-checkbox__icon,
69
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:indeterminate + .eds-checkbox__icon {
70
+ background-color: var(--components-form-checkbox-standard-fill-selected);
71
+ border-color: transparent;
72
+ }
73
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon,
74
+ .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input + .eds-checkbox__icon {
75
+ border-color: var(--components-form-checkbox-standard-border);
76
+ }
77
+ .eds-dropdown__list__item--selected {
78
+ background-color: var(--components-form-basemenu-fill-hover);
79
+ }/* DO NOT CHANGE!*/
2
80
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
3
81
  .eds-contrast .eds-dropdown__selected-item-tag {
4
82
  background: var(--components-chip-standard-default);
@@ -109,85 +187,7 @@
109
187
  }
110
188
  .eds-contrast .eds-dropdown__appendix__toggle-button:focus-visible {
111
189
  outline-color: var(--basecolors-stroke-focus-standard);
112
- }
113
- /* DO NOT CHANGE!*/
114
- /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
115
- .eds-dropdown__list {
116
- position: absolute;
117
- box-sizing: border-box;
118
- max-height: 20rem;
119
- overflow-y: auto;
120
- padding: 0;
121
- margin: 0;
122
- list-style: none;
123
- border: 0.125rem solid var(--components-form-basemenu-border);
124
- border-radius: 0.25rem;
125
- box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
126
- cursor: default;
127
- z-index: 20;
128
- }
129
- .eds-dropdown__list:focus {
130
- outline: none;
131
- }
132
- .eds-dropdown__list__item {
133
- display: flex;
134
- align-items: center;
135
- justify-content: flex-start;
136
- padding: 0.75rem 1rem;
137
- font-family: inherit;
138
- font-size: 1rem;
139
- word-break: break-word;
140
- line-height: 1.25rem;
141
- overflow-x: hidden;
142
- color: var(--components-form-basemenu-text);
143
- background-color: var(--components-form-basemenu-fill-default);
144
- }
145
- .eds-dropdown__list__item:last-child {
146
- border-bottom: none;
147
- }
148
- .eds-dropdown__list__item__text {
149
- flex: 1;
150
- cursor: default;
151
- }
152
- .eds-dropdown__list__item__icon {
153
- margin-left: 0.75rem;
154
- }
155
- .eds-dropdown__list__item__checkbox {
156
- pointer-events: none;
157
- }
158
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon {
159
- border-color: var(--components-form-checkbox-standard-border);
160
- }
161
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
162
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon {
163
- background-color: var(--components-form-checkbox-standard-fill-selected);
164
- }
165
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon path,
166
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon path {
167
- stroke: var(--components-form-checkbox-standard-icon);
168
- }
169
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon rect,
170
- .eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon rect {
171
- fill: var(--components-form-checkbox-standard-icon);
172
- }
173
- .eds-dropdown__list__item--highlighted {
174
- background-color: var(--components-form-basemenu-fill-hover);
175
- }
176
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
177
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon,
178
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:checked + .eds-checkbox__icon,
179
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:indeterminate + .eds-checkbox__icon {
180
- background-color: var(--components-form-checkbox-standard-fill-selected);
181
- border-color: transparent;
182
- }
183
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon,
184
- .eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input + .eds-checkbox__icon {
185
- border-color: var(--components-form-checkbox-standard-border);
186
- }
187
- .eds-dropdown__list__item--selected {
188
- background-color: var(--components-form-basemenu-fill-hover);
189
- }
190
- /* DO NOT CHANGE!*/
190
+ }/* DO NOT CHANGE!*/
191
191
  /* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
192
192
  .eds-dropdown {
193
193
  cursor: pointer;
@@ -234,10 +234,6 @@
234
234
  .eds-dropdown--searchable__selected-item--hidden {
235
235
  flex: 0;
236
236
  }
237
- .eds-dropdown--searchable :not(.eds-dropdown--searchable__selected-item--hidden) + ::-moz-placeholder {
238
- -moz-transition: none;
239
- transition: none;
240
- }
241
237
  .eds-dropdown--searchable :not(.eds-dropdown--searchable__selected-item--hidden) + ::placeholder {
242
238
  transition: none;
243
239
  }
@@ -255,8 +251,7 @@
255
251
  padding: 1.25rem 0rem 0.25rem;
256
252
  }
257
253
  .eds-dropdown--multiselect__selected-items-and-input--filled .eds-dropdown__input {
258
- padding: 0;
259
- padding: initial;
254
+ padding: unset;
260
255
  min-height: 1.5rem;
261
256
  }
262
257
  .eds-dropdown--multiselect__selected-items-and-input--filled .eds-tag-chip:focus {
@@ -276,7 +271,4 @@
276
271
  }
277
272
  .eds-contrast .eds-dropdown--native option {
278
273
  color: var(--components-form-basemenu-text);
279
- }
280
- :root {
281
- --eds-dropdown: 1;
282
- }
274
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@entur/dropdown",
3
- "version": "7.3.2-beta.9",
3
+ "version": "7.3.3",
4
4
  "license": "EUPL-1.2",
5
- "main": "dist/index.js",
5
+ "main": "dist/dropdown.cjs.js",
6
6
  "module": "dist/dropdown.esm.js",
7
- "typings": "dist/index.d.ts",
7
+ "types": "dist/index.d.ts",
8
8
  "files": [
9
9
  "dist"
10
10
  ],
@@ -17,31 +17,41 @@
17
17
  "access": "public"
18
18
  },
19
19
  "scripts": {
20
- "start": "dts watch --noClean",
21
- "build": "dts build",
22
- "test": "dts test",
23
- "lint": "dts lint src"
20
+ "start": "vite build --watch",
21
+ "build": "vite build",
22
+ "test": "jest",
23
+ "lint": "eslint 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.99",
31
- "@entur/button": "^3.3.13-beta.9",
32
- "@entur/chip": "^0.9.1-beta.9",
33
- "@entur/form": "^8.3.2-beta.9",
34
- "@entur/icons": "^8.0.0",
35
- "@entur/loader": "^0.5.30-beta.9",
36
- "@entur/tokens": "^3.19.1",
37
- "@entur/tooltip": "^5.2.13-beta.9",
38
- "@entur/utils": "^0.12.3",
39
- "@floating-ui/react-dom": "^2.1.0",
40
- "classnames": "^2.3.1",
41
- "downshift": "^9.0.8"
30
+ "@entur/a11y": "^0.2.101",
31
+ "@entur/button": "^3.3.14",
32
+ "@entur/chip": "^0.9.2",
33
+ "@entur/form": "^8.3.3",
34
+ "@entur/icons": "^8.0.2",
35
+ "@entur/loader": "^0.5.31",
36
+ "@entur/tokens": "^3.19.3",
37
+ "@entur/tooltip": "^5.2.14",
38
+ "@entur/utils": "^0.12.5",
39
+ "@floating-ui/react-dom": "^2.1.6",
40
+ "classnames": "^2.5.1",
41
+ "downshift": "^9.0.10"
42
42
  },
43
43
  "devDependencies": {
44
- "dts-cli": "2.0.5"
44
+ "@testing-library/jest-dom": "^5.17.0",
45
+ "@testing-library/react": "^10.4.9",
46
+ "@testing-library/user-event": "14.6.1",
47
+ "@vitejs/plugin-react": "^5.0.1",
48
+ "eslint": "^7.32.0",
49
+ "jest": "^29.0.0",
50
+ "jest-environment-jsdom": "^29.0.0",
51
+ "ts-jest": "^29.0.0",
52
+ "typescript": "^5.9.2",
53
+ "vite": "^7.1.3",
54
+ "vite-plugin-dts": "^4.5.4"
45
55
  },
46
- "gitHead": "6f685d2e4ac13bdaf9c6480f9e7922c9d8f4619c"
56
+ "gitHead": "5dd9d318f1d79f6f522f978de27b551fda1e91cc"
47
57
  }