@particle-network/ui-react 0.7.0-beta.11 → 0.7.0-beta.12

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.
@@ -56,7 +56,8 @@ const UXSimplePopover = (props)=>{
56
56
  };
57
57
  const popoverAnchorStyle = {
58
58
  positionAnchor: anchorName,
59
- positionArea: placement
59
+ positionArea: placement,
60
+ positionTryFallbacks: 'flip-block, flip-inline, flip-block flip-inline'
60
61
  };
61
62
  const isClick = 'click' === triggerType;
62
63
  const trigger = isClick ? /*#__PURE__*/ jsx("button", {
@@ -19,6 +19,7 @@ import { UXTooltip } from "../UXTooltip/index.js";
19
19
  import { CustomThemeConfig } from "./custom-theme-config.js";
20
20
  import { ThemeItem } from "./theme-item.js";
21
21
  import { useTheme } from "./use-theme.js";
22
+ import { preloadFonts } from "./utils.js";
22
23
  const FONT_EXAMPLES = [
23
24
  {
24
25
  title: 'Manrope',
@@ -40,6 +41,11 @@ const UXThemeSwitchModal = ({ as = 'modal', omitThemes = [], backdrop, isOpen, o
40
41
  useEffect(()=>{
41
42
  initTheme();
42
43
  }, []);
44
+ useEffect(()=>{
45
+ if (isOpen) preloadFonts();
46
+ }, [
47
+ isOpen
48
+ ]);
43
49
  const Component = 'modal' === as ? UXModal : UXDrawer;
44
50
  const themes = useMemo(()=>themeData.filter((theme)=>!omitThemes.includes(theme.id)), [
45
51
  omitThemes
@@ -42,7 +42,7 @@ const useTheme = ()=>{
42
42
  wait: 300
43
43
  });
44
44
  const initTheme = ()=>{
45
- preloadFonts();
45
+ if (theme.fontName || fontUrl) preloadFonts();
46
46
  applyTheme(theme);
47
47
  debouncedApplyFont(fontUrl, theme.fontName);
48
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.7.0-beta.11",
3
+ "version": "0.7.0-beta.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -37,8 +37,8 @@
37
37
  "@rslib/core": "^0.12.3",
38
38
  "@types/react": "^19.1.10",
39
39
  "react": "^19.1.0",
40
- "@particle-network/lintstaged-config": "0.1.0",
41
- "@particle-network/eslint-config": "0.3.0"
40
+ "@particle-network/eslint-config": "0.3.0",
41
+ "@particle-network/lintstaged-config": "0.1.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=16.9.0",