@neovici/cosmoz-dropdown 1.5.3 → 1.6.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/package.json +1 -1
- package/src/cosmoz-dropdown.js +8 -2
package/package.json
CHANGED
package/src/cosmoz-dropdown.js
CHANGED
|
@@ -62,7 +62,10 @@ const preventDefault = e => e.preventDefault(),
|
|
|
62
62
|
</button>
|
|
63
63
|
</div>
|
|
64
64
|
${ active && html`
|
|
65
|
-
<cosmoz-dropdown-content
|
|
65
|
+
<cosmoz-dropdown-content
|
|
66
|
+
id="dropdown" part="dropdown" exportparts="content: dropdown-content"
|
|
67
|
+
.anchor=${ anchor } .placement=${ placement } .render=${ render }
|
|
68
|
+
>
|
|
66
69
|
<slot></slot>
|
|
67
70
|
</cosmoz-dropdown-content>` || [] }
|
|
68
71
|
`;
|
|
@@ -86,6 +89,7 @@ const preventDefault = e => e.preventDefault(),
|
|
|
86
89
|
margin: 0;
|
|
87
90
|
width: 100%;
|
|
88
91
|
}
|
|
92
|
+
|
|
89
93
|
::slotted(:not(slot):hover) {
|
|
90
94
|
background: var(--cosmoz-dropdown-menu-hover-color, var(--cosmoz-selection-color, rgba(58, 145, 226, 0.1)));
|
|
91
95
|
}
|
|
@@ -98,7 +102,9 @@ const preventDefault = e => e.preventDefault(),
|
|
|
98
102
|
<slot></slot>
|
|
99
103
|
`,
|
|
100
104
|
Menu = host => html`
|
|
101
|
-
<cosmoz-dropdown .placement=${ host.placement }
|
|
105
|
+
<cosmoz-dropdown .placement=${ host.placement }
|
|
106
|
+
part="dropdown"
|
|
107
|
+
exportparts=${ ['anchor', 'button', 'dropdown'].map(p => `${ p }: dropdown-${ p }`).concat(['dropdown-content']).join(', ') }>
|
|
102
108
|
<slot name="button" slot="button"></slot>
|
|
103
109
|
<cosmoz-dropdown-list><slot></slot></cosmoz-dropdown-list>
|
|
104
110
|
</cosmoz-dropdown>`;
|