@loafmarkets/ui 0.1.425 → 0.1.426
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/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1288,8 +1288,10 @@ type AssetSelectorBarProps = {
|
|
|
1288
1288
|
* ("YONG") and hovering it pops an instant tooltip with the full name. Falls back to the
|
|
1289
1289
|
* full name when no ticker is known. Ignored when `tickerPrimary` is set. */
|
|
1290
1290
|
compactName?: boolean;
|
|
1291
|
+
/** Fires on every open/close of the asset list (not on mount) — hosts defer per-row market data until the first open. */
|
|
1292
|
+
onOpenChange?: (open: boolean) => void;
|
|
1291
1293
|
};
|
|
1292
|
-
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, afterName, imageUrl, badgeLabel, tickerPrimary, compactName, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1294
|
+
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, afterName, imageUrl, badgeLabel, tickerPrimary, compactName, onOpenChange, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1293
1295
|
|
|
1294
1296
|
type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
|
|
1295
1297
|
type ToastData = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1288,8 +1288,10 @@ type AssetSelectorBarProps = {
|
|
|
1288
1288
|
* ("YONG") and hovering it pops an instant tooltip with the full name. Falls back to the
|
|
1289
1289
|
* full name when no ticker is known. Ignored when `tickerPrimary` is set. */
|
|
1290
1290
|
compactName?: boolean;
|
|
1291
|
+
/** Fires on every open/close of the asset list (not on mount) — hosts defer per-row market data until the first open. */
|
|
1292
|
+
onOpenChange?: (open: boolean) => void;
|
|
1291
1293
|
};
|
|
1292
|
-
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, afterName, imageUrl, badgeLabel, tickerPrimary, compactName, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1294
|
+
declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, afterName, imageUrl, badgeLabel, tickerPrimary, compactName, onOpenChange, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
|
|
1293
1295
|
|
|
1294
1296
|
type ToastVariant = 'success' | 'error' | 'info' | 'pending' | 'sell';
|
|
1295
1297
|
type ToastData = {
|
package/dist/index.js
CHANGED
|
@@ -13871,9 +13871,20 @@ function AssetSelectorBar({
|
|
|
13871
13871
|
imageUrl,
|
|
13872
13872
|
badgeLabel,
|
|
13873
13873
|
tickerPrimary,
|
|
13874
|
-
compactName
|
|
13874
|
+
compactName,
|
|
13875
|
+
onOpenChange
|
|
13875
13876
|
}) {
|
|
13876
13877
|
const [isDropdownOpen, setIsDropdownOpen] = React9.useState(false);
|
|
13878
|
+
const openChangeRef = React9.useRef(onOpenChange);
|
|
13879
|
+
openChangeRef.current = onOpenChange;
|
|
13880
|
+
const openSeenRef = React9.useRef(false);
|
|
13881
|
+
React9.useEffect(() => {
|
|
13882
|
+
if (!openSeenRef.current) {
|
|
13883
|
+
openSeenRef.current = true;
|
|
13884
|
+
return;
|
|
13885
|
+
}
|
|
13886
|
+
openChangeRef.current?.(isDropdownOpen);
|
|
13887
|
+
}, [isDropdownOpen]);
|
|
13877
13888
|
const [nameTip, setNameTip] = React9.useState(null);
|
|
13878
13889
|
const anchorRef = React9.useRef(null);
|
|
13879
13890
|
const [dropdownPos, setDropdownPos] = React9.useState(null);
|