@entur/dropdown 7.2.3-beta.0 → 7.3.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/dist/dropdown.cjs.development.js +50 -61
- package/dist/dropdown.cjs.development.js.map +1 -1
- package/dist/dropdown.cjs.production.min.js +1 -1
- package/dist/dropdown.cjs.production.min.js.map +1 -1
- package/dist/dropdown.esm.js +50 -61
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +77 -77
- package/dist/utils.d.ts +1 -1
- package/package.json +4 -4
package/dist/styles.css
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
/* DO NOT CHANGE!*/
|
|
2
2
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
3
|
+
.eds-dropdown__list {
|
|
4
|
+
position: absolute;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
max-height: 20rem;
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin: 0;
|
|
10
|
+
list-style: none;
|
|
11
|
+
border: 0.125rem solid var(--components-form-basemenu-border);
|
|
12
|
+
border-radius: 0.25rem;
|
|
13
|
+
box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.25);
|
|
14
|
+
cursor: default;
|
|
15
|
+
z-index: 20;
|
|
16
|
+
}
|
|
17
|
+
.eds-dropdown__list:focus {
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
20
|
+
.eds-dropdown__list__item {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
padding: 0.75rem 1rem;
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
font-size: 1rem;
|
|
27
|
+
word-break: break-word;
|
|
28
|
+
line-height: 1.25rem;
|
|
29
|
+
overflow-x: hidden;
|
|
30
|
+
color: var(--components-form-basemenu-text);
|
|
31
|
+
background-color: var(--components-form-basemenu-fill-default);
|
|
32
|
+
}
|
|
33
|
+
.eds-dropdown__list__item:last-child {
|
|
34
|
+
border-bottom: none;
|
|
35
|
+
}
|
|
36
|
+
.eds-dropdown__list__item__text {
|
|
37
|
+
flex: 1;
|
|
38
|
+
cursor: default;
|
|
39
|
+
}
|
|
40
|
+
.eds-dropdown__list__item__icon {
|
|
41
|
+
margin-left: 0.75rem;
|
|
42
|
+
}
|
|
43
|
+
.eds-dropdown__list__item__checkbox {
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon {
|
|
47
|
+
border-color: var(--components-form-checkbox-standard-border);
|
|
48
|
+
}
|
|
49
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
|
|
50
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon {
|
|
51
|
+
background-color: var(--components-form-checkbox-standard-fill-selected);
|
|
52
|
+
}
|
|
53
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon path,
|
|
54
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon path {
|
|
55
|
+
stroke: var(--components-form-checkbox-standard-icon);
|
|
56
|
+
}
|
|
57
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon rect,
|
|
58
|
+
.eds-contrast .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon rect {
|
|
59
|
+
fill: var(--components-form-checkbox-standard-icon);
|
|
60
|
+
}
|
|
61
|
+
.eds-dropdown__list__item--highlighted {
|
|
62
|
+
background-color: var(--components-form-basemenu-fill-hover);
|
|
63
|
+
}
|
|
64
|
+
.eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:checked + .eds-checkbox__icon,
|
|
65
|
+
.eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input:indeterminate + .eds-checkbox__icon,
|
|
66
|
+
.eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:checked + .eds-checkbox__icon,
|
|
67
|
+
.eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input:indeterminate + .eds-checkbox__icon {
|
|
68
|
+
background-color: var(--components-form-checkbox-standard-fill-selected);
|
|
69
|
+
border-color: transparent;
|
|
70
|
+
}
|
|
71
|
+
.eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container > input + .eds-checkbox__icon,
|
|
72
|
+
.eds-dropdown__list__item--highlighted .eds-dropdown__list__item__checkbox.eds-checkbox__container:hover > input + .eds-checkbox__icon {
|
|
73
|
+
border-color: var(--components-form-checkbox-standard-border);
|
|
74
|
+
}
|
|
75
|
+
.eds-dropdown__list__item--selected {
|
|
76
|
+
background-color: var(--components-form-basemenu-fill-hover);
|
|
77
|
+
}
|
|
78
|
+
/* DO NOT CHANGE!*/
|
|
79
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
3
80
|
.eds-contrast .eds-dropdown__selected-item-tag {
|
|
4
81
|
background: var(--components-chip-standard-default);
|
|
5
82
|
border: 0.0625rem solid var(--components-chip-standard-border);
|
|
@@ -112,83 +189,6 @@
|
|
|
112
189
|
}
|
|
113
190
|
/* DO NOT CHANGE!*/
|
|
114
191
|
/* 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!*/
|
|
191
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
192
192
|
.eds-dropdown {
|
|
193
193
|
cursor: pointer;
|
|
194
194
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const useMultiselectUtils: <ValueType>({ listItems, selectedItems
|
|
|
19
19
|
addClickedItemToSelectedItems: (clickedItem: NormalizedDropdownItemType<ValueType>, onChange: (value: NormalizedDropdownItemType<ValueType>[]) => void) => void;
|
|
20
20
|
allListItemsAreSelected: boolean;
|
|
21
21
|
clickedItemIsInSelectedItems: (clickedItem: NormalizedDropdownItemType<ValueType>) => boolean;
|
|
22
|
-
clickedItemIsSelectAll: (clickedItem: NormalizedDropdownItemType<string | ValueType>) =>
|
|
22
|
+
clickedItemIsSelectAll: (clickedItem: NormalizedDropdownItemType<string | ValueType>) => clickedItem is NormalizedDropdownItemType<string>;
|
|
23
23
|
handleListItemClicked: ({ clickedItem, onChange, }: {
|
|
24
24
|
clickedItem: NormalizedDropdownItemType<any>;
|
|
25
25
|
onChange: (value: NormalizedDropdownItemType<ValueType>[]) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/dropdown",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/dropdown.esm.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@entur/a11y": "^0.2.99",
|
|
31
31
|
"@entur/button": "^3.3.12",
|
|
32
|
-
"@entur/chip": "^0.
|
|
33
|
-
"@entur/form": "^8.3.
|
|
32
|
+
"@entur/chip": "^0.9.0",
|
|
33
|
+
"@entur/form": "^8.3.1",
|
|
34
34
|
"@entur/icons": "^8.0.0",
|
|
35
35
|
"@entur/loader": "^0.5.29",
|
|
36
36
|
"@entur/tokens": "^3.19.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"dts-cli": "2.0.5"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "f332d7ab2cffcbf373183520965f838daf64e8c5"
|
|
47
47
|
}
|