@lemonadejs/dropdown 3.1.12 → 3.2.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/style.css CHANGED
@@ -1,308 +1,374 @@
1
- .lm-dropdown {
2
- display: inline-block;
3
- user-select: none;
4
- cursor: pointer;
5
- box-sizing: border-box;
6
- outline-offset: 1px;
7
- }
8
-
9
- .lm-dropdown-header {
10
- display: flex;
11
- position: relative;
12
- align-items: center;
13
- }
14
-
15
- .lm-dropdown-header button {
16
- display: none;
17
- border: 1px solid transparent;
18
- background-color: transparent;
19
- text-transform: uppercase;
20
- cursor: pointer;
21
- padding: 15px;
22
- font-weight: bold;
23
- outline: 0;
24
- }
25
-
26
- .lm-dropdown .lm-modal {
27
- padding: 0;
28
- min-width: initial;
29
- min-height: 5px;
30
- border: 1px solid #ccc;
31
- border-radius: 0;
32
- }
33
-
34
- .lm-dropdown .lm-lazy {
35
- max-height: 300px;
36
- }
37
-
38
- .lm-dropdown-input {
39
- padding: 5px 24px 5px 10px;
40
- white-space: nowrap;
41
- overflow: hidden;
42
- text-overflow: ellipsis;
43
- appearance: none;
44
- cursor: pointer;
45
- box-sizing: border-box;
46
- width: 100%;
47
- border: 1px solid #ccc;
48
- min-height: 1em;
49
- }
50
-
51
- .lm-dropdown-input::after {
52
- content: '';
53
- position: absolute;
54
- width: 24px;
55
- height: 100%;
56
- top: 0;
57
- right: 4px;
58
- background-repeat: no-repeat;
59
- background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0V0z'/%3E%3Cpath d='M7 10l5 5 5-5H7z' fill='gray'/%3E%3C/svg%3E");
60
- background-position: center;
61
- transition: transform .1s ease-in-out;
62
- }
63
-
64
- .lm-dropdown-add {
65
- position: absolute;
66
- padding: 12px;
67
- right: 20px;
68
- display: none;
69
- }
70
-
71
- .lm-dropdown-add::after {
72
- content: '+';
73
- }
74
-
75
- .lm-dropdown[data-insert="true"] .lm-dropdown-input {
76
- padding-right: 35px;
77
- }
78
-
79
- .lm-dropdown[data-state="true"][data-insert="true"] .lm-dropdown-add {
80
- display: initial;
81
- }
82
-
83
- .lm-dropdown[data-state="true"] .lm-dropdown-input::after {
84
- transform: rotate(-180deg);
85
- }
86
-
87
- .lm-dropdown-input:empty::before {
88
- content: "\00a0";
89
- }
90
-
91
- .lm-dropdown[data-state="true"] .lm-dropdown-input[placeholder]:empty::before {
92
- content: "\00a0" attr(placeholder);
93
- color: #aaa;
94
- }
95
-
96
- .lm-dropdown-options {
97
- width: 100%;
98
- }
99
-
100
- .lm-dropdown-item {
101
- box-sizing: border-box;
102
- }
103
-
104
- .lm-dropdown-item[data-group]::before {
105
- content: attr(data-group);
106
- display: block;
107
- padding: 8px;
108
- font-weight: bold;
109
- width: 100%;
110
- background-color: #FFF;
111
- color: #000;
112
- box-sizing: border-box;
113
- }
114
-
115
- .lm-dropdown-item > div {
116
- white-space: nowrap;
117
- text-align: left;
118
- text-overflow: ellipsis;
119
- overflow: hidden;
120
- color: #000;
121
- display: flex;
122
- align-items: center;
123
- padding: 4px 40px 4px 16px;
124
- position: relative;
125
- box-sizing: border-box;
126
- }
127
-
128
- .lm-dropdown-item > div > img {
129
- width: 24px;
130
- height: 24px;
131
- margin-left: -6px;
132
- margin-right: 6px;
133
- }
134
-
135
- .lm-dropdown-item > div > img[src=''] {
136
- display: none;
137
- }
138
-
139
- .lm-dropdown-item > div:hover {
140
- background-color: dodgerblue !important;
141
- color: white;
142
- }
143
-
144
- .lm-dropdown-item[data-cursor="true"] > div {
145
- background-color: #eee;
146
- }
147
-
148
- .lm-dropdown-item[data-cursor="true"]:hover > div {
149
- background-color: dodgerblue;
150
- }
151
-
152
- .lm-dropdown-item[data-selected="true"] > div {
153
- background-color: dodgerblue;
154
- color: white;
155
- }
156
-
157
- .lm-dropdown-item[data-selected="true"] > div::after {
158
- content: '✓';
159
- position: absolute;
160
- right: 10px;
161
- line-height: 24px;
162
- }
163
-
164
- /** Picker */
165
-
166
- .lm-dropdown[data-type="picker"][data-state="true"] .lm-dropdown-header button {
167
- display: initial;
168
- position: absolute;
169
- border: 1px solid #ccc;
170
- text-align: right;
171
- bottom: 300px;
172
- left: 0;
173
- width: 100% !important;
174
- }
175
-
176
- .lm-dropdown[data-type="picker"] .lm-modal {
177
- position: absolute;
178
- bottom: 0;
179
- left: 0;
180
- width: 100% !important;
181
- height: 300px !important;
182
- }
183
-
184
- .lm-dropdown[data-type="picker"] .lm-dropdown-item > div {
185
- border-bottom: solid 1px rgba(0, 0, 0, 0.2);
186
- text-transform: uppercase;
187
- font-size: 1.1em;
188
- padding: 16px;
189
- }
190
-
191
- .lm-dropdown[data-type="picker"] .lm-dropdown-item[data-group]::before {
192
- text-align: center;
193
- border-bottom: solid 1px rgba(0, 0, 0, 0.2);
194
- padding: 16px;
195
- }
196
-
197
- /** Searchbar */
198
-
199
- .lm-dropdown[data-type="searchbar"][data-state="true"] {
200
- position: absolute;
201
- top: 0;
202
- left: 0;
203
- width: 100% !important;
204
- height: 100% !important;
205
- display: flex;
206
- flex-direction: column;
207
- background-color: #fff;
208
- }
209
-
210
- .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-done {
211
- display: initial;
212
- border-left: 1px solid #ccc;
213
- border-bottom: 1px solid #eee;
214
- height: 100%;
215
- }
216
-
217
- .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-input {
218
- font-size: 1.5em;
219
- border-radius: 0;
220
- border: 0;
221
- border-bottom: 1px solid #eee;
222
- outline: none;
223
- background-color: #fff;
224
- padding-top: 0;
225
- padding-bottom: 0;
226
- line-height: 60px;
227
- height: 60px;
228
- }
229
-
230
- .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-input::after {
231
- background: initial;
232
- }
233
-
234
- .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-add {
235
- right: 100px;
236
- }
237
-
238
- .lm-dropdown[data-type="searchbar"] .lm-modal {
239
- max-height: initial;
240
- bottom: 0;
241
- width: 100% !important;
242
- height: calc(100% - 60px) !important;
243
- border: 0;
244
- }
245
-
246
- .lm-dropdown[data-type="searchbar"] .lm-dropdown-item > div {
247
- border-bottom: solid 1px rgba(0, 0, 0, 0.2);
248
- text-transform: uppercase;
249
- font-size: 1.1em;
250
- padding: 16px;
251
- }
252
-
253
- .lm-dropdown[data-type="searchbar"] .lm-dropdown-item[data-group]::before {
254
- text-align: center;
255
- border-bottom: solid 1px rgba(0, 0, 0, 0.2);
256
- padding: 16px;
257
- }
258
-
259
- .lm-dropdown[data-type="searchbar"] .lm-lazy {
260
- max-height: initial;
261
- }
262
-
263
- /** Lazyloading */
264
-
265
- .lm-lazy {
266
- position: relative;
267
- overflow-y: auto;
268
- overflow-x: hidden;
269
- display: flex;
270
- box-sizing: border-box;
271
- height: 100%;
272
- }
273
-
274
- .lm-lazy-scroll {
275
- position: absolute;
276
- width: 1px;
277
- }
278
-
279
- .lm-lazy-items {
280
- position: sticky;
281
- top: 0;
282
- box-sizing: border-box;
283
- width: 100%;
284
- }
285
-
286
- .lm-dropdown-loading .lm-dropdown-add::after {
287
- content: '';
288
- position: absolute;
289
- width: 12px;
290
- height: 12px;
291
- margin-top: -7px;
292
- margin-left: -12px;
293
- border-style: solid;
294
- border-color: #888;
295
- border-top-color: transparent;
296
- border-width: 1px;
297
- border-radius: 50%;
298
- animation: spin .8s linear infinite;
299
- }
300
-
301
- @keyframes spin {
302
- from {
303
- transform:rotate(0deg);
304
- }
305
- to {
306
- transform:rotate(360deg);
307
- }
1
+ .lm-dropdown {
2
+ display: inline-block;
3
+ user-select: none;
4
+ cursor: pointer;
5
+ box-sizing: border-box;
6
+ outline-offset: 1px;
7
+ }
8
+
9
+ .lm-dropdown-header {
10
+ display: flex;
11
+ position: relative;
12
+ align-items: center;
13
+ }
14
+
15
+ .lm-dropdown-header-controls {
16
+ display: none;
17
+ }
18
+
19
+ .lm-application .lm-dropdown-header-controls button,
20
+ .lm-dropdown-header-controls button {
21
+ background-color: transparent;
22
+ text-transform: uppercase;
23
+ cursor: pointer;
24
+ padding: 15px;
25
+ font-weight: bold;
26
+ outline: 0;
27
+ border: 0;
28
+ color: var(--lm-main-color);
29
+ }
30
+
31
+ .lm-dropdown-content {
32
+ position: relative;
33
+ }
34
+
35
+ .lm-dropdown .lm-modal {
36
+ padding: 0;
37
+ min-width: initial;
38
+ min-height: 5px;
39
+ border: 1px solid var(--lm-border-color, #ccc);
40
+ border-radius: 0;
41
+ }
42
+
43
+ .lm-dropdown .lm-lazy {
44
+ max-height: 300px;
45
+ }
46
+
47
+ .lm-dropdown-input {
48
+ padding: 5px 24px 5px 10px;
49
+ white-space: nowrap;
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ appearance: none;
53
+ cursor: pointer;
54
+ box-sizing: border-box;
55
+ width: 100%;
56
+ background: var(--lm-background-color, #fff);
57
+ border: 1px solid var(--lm-border-color, #ccc);
58
+ min-height: 1em;
59
+ border-radius: 2px;
60
+ }
61
+
62
+ .lm-dropdown-input:focus {
63
+ outline: 2px solid var(--lm-border-outline, #000);
64
+ outline-offset: -1px;
65
+ }
66
+
67
+ .lm-dropdown-input::after {
68
+ content: '';
69
+ position: absolute;
70
+ width: 24px;
71
+ height: 100%;
72
+ top: 0;
73
+ right: 4px;
74
+ background-repeat: no-repeat;
75
+ background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M0 0h24v24H0V0z'/%3E%3Cpath d='M7 10l5 5 5-5H7z' fill='gray'/%3E%3C/svg%3E");
76
+ background-position: center;
77
+ transition: transform .1s ease-in-out;
78
+ }
79
+
80
+ .lm-dropdown-add {
81
+ position: absolute;
82
+ padding: 12px;
83
+ right: 20px;
84
+ display: none;
85
+ }
86
+
87
+ .lm-dropdown-add::after {
88
+ content: '+';
89
+ }
90
+
91
+ .lm-dropdown[data-insert="true"] .lm-dropdown-input {
92
+ padding-right: 35px;
93
+ }
94
+
95
+ .lm-dropdown[data-state="true"][data-insert="true"] .lm-dropdown-add {
96
+ display: initial;
97
+ }
98
+
99
+ .lm-dropdown[data-state="true"] .lm-dropdown-input::after {
100
+ transform: rotate(-180deg);
101
+ }
102
+
103
+ .lm-dropdown-input:empty::before {
104
+ content: "\00a0";
105
+ }
106
+
107
+ .lm-dropdown[data-state="true"] .lm-dropdown-input[placeholder]:empty::before {
108
+ content: "\00a0" attr(placeholder);
109
+ color: #aaa;
110
+ }
111
+
112
+ .lm-dropdown-options {
113
+ width: 100%;
114
+ }
115
+
116
+ .lm-dropdown-item {
117
+ box-sizing: border-box;
118
+ }
119
+
120
+ .lm-dropdown-item[data-group]::before {
121
+ content: attr(data-group);
122
+ display: block;
123
+ padding: 8px;
124
+ font-weight: bold;
125
+ width: 100%;
126
+ background-color: #FFF;
127
+ color: #000;
128
+ box-sizing: border-box;
129
+ }
130
+
131
+ .lm-dropdown-item > div {
132
+ white-space: nowrap;
133
+ text-align: left;
134
+ text-overflow: ellipsis;
135
+ overflow: hidden;
136
+ color: #000;
137
+ display: flex;
138
+ align-items: center;
139
+ padding: 4px 40px 4px 16px;
140
+ position: relative;
141
+ box-sizing: border-box;
142
+ }
143
+
144
+ .lm-dropdown-item > div > span:empty::before {
145
+ content: "\00a0";
146
+ }
147
+
148
+ .lm-dropdown-item > div > img {
149
+ width: 24px;
150
+ height: 24px;
151
+ margin-left: -6px;
152
+ margin-right: 6px;
153
+ }
154
+
155
+ .lm-dropdown-item > div > img[src=''] {
156
+ display: none;
157
+ }
158
+
159
+ .lm-dropdown-item > div:hover {
160
+ background-color: dodgerblue !important;
161
+ color: white;
162
+ }
163
+
164
+ .lm-dropdown-item[data-cursor="true"] > div {
165
+ background-color: #eee;
166
+ }
167
+
168
+ .lm-dropdown-item[data-cursor="true"]:hover > div {
169
+ background-color: dodgerblue;
170
+ }
171
+
172
+ .lm-dropdown-item[data-selected="true"] > div {
173
+ background-color: dodgerblue;
174
+ color: white;
175
+ }
176
+
177
+ .lm-dropdown-item[data-selected="true"] > div::after {
178
+ content: '✓';
179
+ position: absolute;
180
+ right: 10px;
181
+ line-height: 24px;
182
+ }
183
+
184
+ /** Picker */
185
+
186
+ .lm-dropdown[data-type="picker"][data-state="true"] .lm-dropdown-content .lm-modal {
187
+ box-shadow: initial;
188
+ border: initial;
189
+ }
190
+
191
+ .lm-dropdown[data-type="picker"][data-state="true"] .lm-dropdown-content {
192
+ position: initial;
193
+ }
194
+
195
+ .lm-dropdown[data-type="picker"][data-state="true"] .lm-dropdown-header-controls {
196
+ display: flex;
197
+ position: fixed;
198
+ bottom: 300px;
199
+ left: 0;
200
+ width: 100% !important;
201
+ background-color: #fff;
202
+ z-index: 1;
203
+ box-sizing: border-box;
204
+ border-top: 1px solid var(--lm-border-color);
205
+ border-bottom: 1px solid var(--lm-border-color);
206
+ box-shadow: 0 0 12px rgb(0 0 0 / 22%);
207
+ justify-content: right;
208
+ }
209
+
210
+ .lm-dropdown[data-type="picker"] .lm-modal {
211
+ position: fixed;
212
+ bottom: 0;
213
+ left: 0;
214
+ width: 100% !important;
215
+ height: 300px !important;
216
+ }
217
+
218
+ .lm-dropdown[data-type="picker"] .lm-dropdown-item > div {
219
+ border-bottom: solid 1px rgba(0, 0, 0, 0.2);
220
+ text-transform: uppercase;
221
+ font-size: 1.1em;
222
+ padding: 16px;
223
+ }
224
+
225
+ .lm-dropdown[data-type="picker"] .lm-dropdown-item[data-group]::before {
226
+ text-align: center;
227
+ border-bottom: solid 1px rgba(0, 0, 0, 0.2);
228
+ padding: 16px;
229
+ }
230
+
231
+ /** Searchbar */
232
+
233
+ .lm-dropdown[data-type="searchbar"][data-state="true"] {
234
+ position: fixed;
235
+ top: 0;
236
+ left: 0;
237
+ width: 100% !important;
238
+ height: 100% !important;
239
+ display: flex;
240
+ flex-direction: column;
241
+ background-color: #fff;
242
+ z-index: 1;
243
+ box-sizing: border-box;
244
+ }
245
+
246
+ .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-content .lm-modal {
247
+ box-shadow: initial;
248
+ border: initial;
249
+ border-top: 1px solid var(--lm-border-color);
250
+ }
251
+
252
+ .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-content {
253
+ position: initial;
254
+ }
255
+
256
+ .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-header-controls {
257
+ display: initial;
258
+ position: fixed;
259
+ right: 0;
260
+ top: 0;
261
+ background-color: #fff;
262
+ z-index: 1;
263
+ padding-top: 5px;
264
+ box-sizing: border-box;
265
+ }
266
+
267
+ .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-input {
268
+ font-size: 1.5em;
269
+ border-radius: 0;
270
+ border: 0;
271
+ border-bottom: 1px solid #eee;
272
+ outline: none;
273
+ background-color: #fff;
274
+ padding-top: 0;
275
+ padding-bottom: 0;
276
+ line-height: 60px;
277
+ height: 60px;
278
+ }
279
+
280
+ .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-input::after {
281
+ background: initial;
282
+ }
283
+
284
+ .lm-dropdown[data-type="searchbar"][data-state="true"] .lm-dropdown-add {
285
+ right: 100px;
286
+ }
287
+
288
+ .lm-dropdown[data-type="searchbar"] .lm-modal {
289
+ max-height: initial;
290
+ bottom: 0;
291
+ width: 100% !important;
292
+ height: calc(100% - 60px) !important;
293
+ border: 0;
294
+ }
295
+
296
+ .lm-dropdown[data-type="searchbar"] .lm-dropdown-item > div {
297
+ border-bottom: solid 1px rgba(0, 0, 0, 0.2);
298
+ text-transform: uppercase;
299
+ font-size: 1.1em;
300
+ padding: 16px;
301
+ }
302
+
303
+ .lm-dropdown[data-type="searchbar"] .lm-dropdown-item[data-group]::before {
304
+ text-align: center;
305
+ border-bottom: solid 1px rgba(0, 0, 0, 0.2);
306
+ padding: 16px;
307
+ }
308
+
309
+ .lm-dropdown[data-type="searchbar"] .lm-lazy {
310
+ max-height: initial;
311
+ }
312
+
313
+ .lm-dropdown .lm-lazy {
314
+ scrollbar-width: thin;
315
+ }
316
+
317
+ .lm-dropdown .lm-lazy::-webkit-scrollbar {
318
+ height: 12px;
319
+ }
320
+
321
+ .lm-dropdown .lm-lazy::-webkit-scrollbar {
322
+ width: 12px;
323
+ }
324
+
325
+ .lm-dropdown-loading .lm-dropdown-add::after {
326
+ content: '';
327
+ position: absolute;
328
+ width: 12px;
329
+ height: 12px;
330
+ margin-top: -7px;
331
+ margin-left: -12px;
332
+ border-style: solid;
333
+ border-color: #888;
334
+ border-top-color: transparent;
335
+ border-width: 1px;
336
+ border-radius: 50%;
337
+ animation: lm-dropdown-spin .8s linear infinite;
338
+ }
339
+
340
+ @keyframes lm-dropdown-spin {
341
+ from {
342
+ transform: rotate(0deg);
343
+ }
344
+ to {
345
+ transform: rotate(360deg);
346
+ }
347
+ }
348
+
349
+ .lm-dark-mode .lm-dropdown-item > div {
350
+ color: white;
351
+ }
352
+
353
+ /** Lazyloading */
354
+
355
+ .lm-lazy {
356
+ position: relative;
357
+ overflow-y: auto;
358
+ overflow-x: hidden;
359
+ display: flex;
360
+ box-sizing: border-box;
361
+ height: 100%;
362
+ }
363
+
364
+ .lm-lazy-scroll {
365
+ position: absolute;
366
+ width: 1px;
367
+ }
368
+
369
+ .lm-lazy-items {
370
+ position: sticky;
371
+ top: 0;
372
+ box-sizing: border-box;
373
+ width: 100%;
308
374
  }