noph-ui 0.25.2 → 0.25.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/menu/Menu.svelte
CHANGED
|
@@ -142,19 +142,24 @@
|
|
|
142
142
|
inset: auto;
|
|
143
143
|
transition:
|
|
144
144
|
display 0.2s allow-discrete,
|
|
145
|
+
overlay 0.2s allow-discrete,
|
|
145
146
|
opacity 0.2s linear;
|
|
146
147
|
opacity: 0;
|
|
147
148
|
justify-self: var(--np-menu-justify-self, anchor-center);
|
|
148
149
|
position-area: var(--np-menu-position-area, bottom center);
|
|
149
150
|
position-try: normal flip-block;
|
|
150
|
-
z-index: 1000;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
.np-menu-container:popover-open {
|
|
153
|
+
.np-menu-container[popover]:popover-open {
|
|
154
154
|
opacity: 1;
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
animation: fadeIn 0.2s linear;
|
|
156
|
+
}
|
|
157
|
+
@keyframes fadeIn {
|
|
158
|
+
0% {
|
|
157
159
|
opacity: 0;
|
|
158
160
|
}
|
|
161
|
+
100% {
|
|
162
|
+
opacity: 1;
|
|
163
|
+
}
|
|
159
164
|
}
|
|
160
165
|
</style>
|
|
@@ -48,9 +48,6 @@
|
|
|
48
48
|
padding: 0;
|
|
49
49
|
background-color: transparent;
|
|
50
50
|
}
|
|
51
|
-
.np-navigation-drawer-container-modal {
|
|
52
|
-
z-index: 1000;
|
|
53
|
-
}
|
|
54
51
|
.np-navigation-wrapper {
|
|
55
52
|
background-color: var(--np-navigation-drawer-background, var(--np-color-surface-container-low));
|
|
56
53
|
border-top-right-radius: var(--np-shape-corner-large);
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
anchor.style.setProperty('anchor-name', generatedId)
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
anchor.addEventListener('
|
|
53
|
-
anchor.addEventListener('
|
|
52
|
+
anchor.addEventListener('mouseenter', showPopover)
|
|
53
|
+
anchor.addEventListener('mouseleave', onLeave)
|
|
54
54
|
anchor.addEventListener('focus', onAnchorFocus)
|
|
55
55
|
anchor.addEventListener('blur', hidePopover)
|
|
56
56
|
}
|
|
@@ -70,11 +70,19 @@
|
|
|
70
70
|
element?.hidePopover()
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
const onLeave = () => {
|
|
74
|
+
hidePopover()
|
|
75
|
+
// TODO Use delay as soons as popover="hint" is supported in all browsers
|
|
76
|
+
// setTimeout(() => {
|
|
77
|
+
// hidePopover()
|
|
78
|
+
// }, 500)
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
onMount(() => {
|
|
74
82
|
return () => {
|
|
75
83
|
if (anchor) {
|
|
76
|
-
anchor.removeEventListener('
|
|
77
|
-
anchor.removeEventListener('
|
|
84
|
+
anchor.removeEventListener('mouseenter', showPopover)
|
|
85
|
+
anchor.removeEventListener('mouseleave', onLeave)
|
|
78
86
|
anchor.removeEventListener('focus', onAnchorFocus)
|
|
79
87
|
anchor.removeEventListener('blur', hidePopover)
|
|
80
88
|
}
|
|
@@ -91,7 +99,7 @@
|
|
|
91
99
|
{@attach attachAnchor}
|
|
92
100
|
class={['np-tooltip', attributes.class]}
|
|
93
101
|
role="tooltip"
|
|
94
|
-
popover="
|
|
102
|
+
popover="hint"
|
|
95
103
|
bind:this={element}
|
|
96
104
|
bind:clientWidth
|
|
97
105
|
bind:clientHeight
|
|
@@ -117,9 +125,9 @@
|
|
|
117
125
|
line-height: 1rem;
|
|
118
126
|
font-size: 0.75rem;
|
|
119
127
|
opacity: 0;
|
|
120
|
-
z-index: 1000;
|
|
121
128
|
transition:
|
|
122
129
|
display 0.3s allow-discrete,
|
|
130
|
+
overlay 0.2s allow-discrete,
|
|
123
131
|
opacity 0.3s ease;
|
|
124
132
|
justify-self: var(--np-tooltip-justify-self, anchor-center);
|
|
125
133
|
position-area: var(--np-tooltip-position-area, top);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noph-ui",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://noph.dev",
|
|
6
6
|
"repository": {
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@material/material-color-utilities": "^0.3.0",
|
|
59
59
|
"@playwright/test": "^1.55.0",
|
|
60
60
|
"@sveltejs/adapter-vercel": "^5.10.2",
|
|
61
|
-
"@sveltejs/kit": "^2.39.
|
|
62
|
-
"@sveltejs/package": "^2.5.
|
|
61
|
+
"@sveltejs/kit": "^2.39.1",
|
|
62
|
+
"@sveltejs/package": "^2.5.1",
|
|
63
63
|
"@sveltejs/vite-plugin-svelte": "^6.2.0",
|
|
64
64
|
"@types/eslint": "^9.6.1",
|
|
65
65
|
"eslint": "^9.35.0",
|