@progressive-development/pd-calendar 0.5.3 → 0.5.4
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/src/PdYearPopup.js +38 -17
- package/package.json +1 -1
package/dist/src/PdYearPopup.js
CHANGED
|
@@ -14,39 +14,60 @@ class PdYearPopup extends LitElement {
|
|
|
14
14
|
css`
|
|
15
15
|
:host {
|
|
16
16
|
position: absolute;
|
|
17
|
-
z-index:
|
|
17
|
+
z-index: 10;
|
|
18
18
|
top: 25px;
|
|
19
19
|
right: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
ul {
|
|
22
|
+
ul {
|
|
23
23
|
list-style: none;
|
|
24
|
-
max-
|
|
24
|
+
max-height: 250px;
|
|
25
|
+
overflow-y: auto;
|
|
26
|
+
|
|
25
27
|
margin: 0;
|
|
26
|
-
padding: 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
padding: 4px 0;
|
|
29
|
+
width: 90px;
|
|
30
|
+
background: var(--pd-default-light-col, #ffffff);
|
|
31
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
32
|
+
border-radius: 8px;
|
|
33
|
+
border: 1px solid var(--pd-default-border-col, #ddd);
|
|
30
34
|
|
|
31
35
|
display: flex;
|
|
32
36
|
flex-direction: column;
|
|
33
37
|
|
|
38
|
+
scrollbar-width: thin;
|
|
34
39
|
}
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
ul::-webkit-scrollbar {
|
|
42
|
+
width: 6px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ul::-webkit-scrollbar-thumb {
|
|
46
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
47
|
+
border-radius: 3px;
|
|
41
48
|
}
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
|
|
50
|
+
li {
|
|
51
|
+
text-align: center;
|
|
52
|
+
padding: 8px 0;
|
|
53
|
+
margin: 0 4px;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
border-radius: 4px;
|
|
56
|
+
color: var(--pd-default-dark-col, #333);
|
|
57
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
44
58
|
}
|
|
45
59
|
|
|
46
|
-
.selectable:hover {
|
|
60
|
+
li.selectable:hover {
|
|
61
|
+
background-color: var(--pd-default-hover-bg, #f0f0f0);
|
|
62
|
+
color: var(--pd-default-hover-col, #000);
|
|
47
63
|
cursor: pointer;
|
|
48
64
|
}
|
|
49
65
|
|
|
66
|
+
li.current {
|
|
67
|
+
background-color: var(--pd-default-primary-col, #007acc);
|
|
68
|
+
color: white;
|
|
69
|
+
font-weight: bold;
|
|
70
|
+
}
|
|
50
71
|
`
|
|
51
72
|
];
|
|
52
73
|
}
|
|
@@ -57,8 +78,8 @@ class PdYearPopup extends LitElement {
|
|
|
57
78
|
render() {
|
|
58
79
|
return html`
|
|
59
80
|
<ul>
|
|
60
|
-
${this.yearSelection.map((year) => html`
|
|
61
|
-
|
|
81
|
+
${this.yearSelection.map((year) => html`
|
|
82
|
+
<li class="${this.currentYear === year ? "current" : "selectable"}" data-year="${year}" @click="${this._yearSelection}">${year}</li>
|
|
62
83
|
`)}
|
|
63
84
|
</ul>
|
|
64
85
|
`;
|
package/package.json
CHANGED