@milktop/react-ui 0.3.12 → 0.3.14
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/avatar/avatar.css
CHANGED
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
&[data-spacing=tight] { --overlap-scale: 1.5; }
|
|
62
62
|
&[data-spacing=loose] { --overlap-scale: 0.4; }
|
|
63
63
|
& > :is([data-scope=avatar], [data-part=more]) { box-shadow: 0 0 0 2px var(--ui-avatar-ring); }
|
|
64
|
-
& > :is([data-scope=avatar], [data-part=more]):not(:first-child) { margin-left: calc(var(--overlap) * -1); }
|
|
64
|
+
& > :is([data-scope=avatar], [data-part=more]):not(:first-child) { margin-left: calc(var(--overlap) * -1); }
|
|
65
|
+
/* Each dot stays in view over the next avatar's edge */
|
|
66
|
+
& [data-scope=avatar][data-part=status] { z-index: 1; } }
|
|
65
67
|
[data-scope=avatar-group][data-part=more] {
|
|
66
68
|
display: inline-grid; place-items: center; flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 9999px; box-sizing: border-box;
|
|
67
69
|
background: var(--ui-hover); color: var(--ui-muted); font-family: var(--ui-font); font-size: 12px; font-weight: 600; cursor: default;
|
package/dist/command/Command.js
CHANGED
|
@@ -144,12 +144,13 @@ export function Command({ items = [], load = null, debounce = 200, onSelect, tri
|
|
|
144
144
|
scrollToItem(listEl.current?.querySelector('[data-part=item][data-highlighted]') ?? null);
|
|
145
145
|
}, [list.highlightedValue]);
|
|
146
146
|
// Each time it opens (from the trigger, the hotkey or `open`): an empty
|
|
147
|
-
// search over all the commands.
|
|
147
|
+
// search over all the commands. Emptied as it closes too, so a scope that
|
|
148
|
+
// changes as it opens again (below) doesn't bring back the last query.
|
|
148
149
|
const latestSearch = useRef(search);
|
|
149
150
|
useEffect(() => { latestSearch.current = search; });
|
|
150
151
|
useEffect(() => {
|
|
151
152
|
if (!open)
|
|
152
|
-
return;
|
|
153
|
+
return setQuery('');
|
|
153
154
|
setLoaded([]);
|
|
154
155
|
latestSearch.current('');
|
|
155
156
|
}, [open]);
|