@geomak/ui 1.6.1 → 1.7.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/dist/index.d.cts CHANGED
@@ -1,8 +1,80 @@
1
1
  export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-CvyV3YPI.cjs';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import React$1 from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
 
6
+ interface PortalProps {
7
+ /** Content to render at the target node. */
8
+ children: React$1.ReactNode;
9
+ /**
10
+ * Where to mount the portal.
11
+ * - omitted / undefined → `document.body` (the safe default for viewport-anchored UI)
12
+ * - HTMLElement → that exact node
13
+ * - () => HTMLElement → resolved at mount time (lets you query the DOM after layout)
14
+ * - null → portal is disabled and renders nothing
15
+ */
16
+ target?: HTMLElement | (() => HTMLElement | null) | null;
17
+ }
18
+ /**
19
+ * SSR-safe portal helper. Renders `children` at a detached DOM node — by
20
+ * default `document.body` — so that any `position: fixed` descendant resolves
21
+ * against the real viewport, never against a transformed, filtered, or
22
+ * contained ancestor.
23
+ *
24
+ * ## Why this exists
25
+ *
26
+ * Per CSS spec, **any ancestor with `transform`, `filter`, `perspective`,
27
+ * `will-change`, or `contain: layout|paint|strict` creates a new containing
28
+ * block for `position: fixed` descendants**. The fixed element then resolves
29
+ * its coordinates against that ancestor, not the viewport — silently breaking
30
+ * full-screen overlays, toast viewports, mobile drawers, and loading screens
31
+ * whenever the consumer wraps the component in:
32
+ * - a page-transition library (Framer Motion, view transitions)
33
+ * - a modal/drawer (Storybook's centered-layout wrapper hits this too)
34
+ * - a card with `contain: layout` or `will-change: transform`
35
+ * - a CSS filter (backdrop-blur, drop-shadow on a card)
36
+ *
37
+ * Portaling to `document.body` makes the component **immune** to any
38
+ * styling its consumer applies to ancestor elements. This is the same
39
+ * pattern Radix UI uses internally for every overlay primitive
40
+ * (`Dialog.Portal`, `Tooltip.Portal`, `Popover.Portal`, etc.).
41
+ *
42
+ * ## When to use it
43
+ *
44
+ * Wrap any element that uses `position: fixed` to anchor itself to the
45
+ * viewport — full-screen overlays, toast viewports, drawers, loading
46
+ * screens, command palettes. If you're using a Radix primitive, prefer
47
+ * its built-in `*.Portal` component (they're equivalent but match the
48
+ * primitive's lifecycle).
49
+ *
50
+ * ## SSR / hydration
51
+ *
52
+ * `document.body` isn't available during SSR or the very first client
53
+ * render. The component renders `null` until `useEffect` resolves the
54
+ * target post-mount, then re-renders with the portal in place. Content
55
+ * that needs to appear immediately on mount will paint one frame later
56
+ * — acceptable for overlays (the trigger interaction is what kicks them
57
+ * off anyway).
58
+ *
59
+ * @example Full-screen loading overlay
60
+ * <Portal>
61
+ * <div className="fixed inset-0 bg-black/40 z-overlay">
62
+ * <Spinner />
63
+ * </div>
64
+ * </Portal>
65
+ *
66
+ * @example Mount to a specific element
67
+ * <Portal target={() => document.getElementById('app-root')}>
68
+ * <Drawer />
69
+ * </Portal>
70
+ *
71
+ * @example Conditionally disable (e.g. SSR-only render)
72
+ * <Portal target={shouldPortal ? undefined : null}>
73
+ * <Banner />
74
+ * </Portal>
75
+ */
76
+ declare function Portal({ children, target }: PortalProps): React$1.ReactPortal;
77
+
6
78
  declare const Icon: {
7
79
  (): react_jsx_runtime.JSX.Element;
8
80
  Moon: ({ color }: {
@@ -1596,4 +1668,4 @@ declare const Temporal: {
1596
1668
  TemporalPicker: typeof TemporalPickerBase;
1597
1669
  };
1598
1670
 
1599
- export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
1671
+ export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, Portal, type PortalProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,80 @@
1
1
  export { C as COLORS, S as SemanticColorKey, a as SemanticSharedKey, V as VarColorKey, b as VarDensityKey, c as VarMotionKey, d as VarRadiusKey, e as VarShadowKey, f as VarTypoKey, g as VarZIndexKey, P as palette, s as semanticTokens, v as vars } from './index-CvyV3YPI.js';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import React$1 from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
5
5
 
6
+ interface PortalProps {
7
+ /** Content to render at the target node. */
8
+ children: React$1.ReactNode;
9
+ /**
10
+ * Where to mount the portal.
11
+ * - omitted / undefined → `document.body` (the safe default for viewport-anchored UI)
12
+ * - HTMLElement → that exact node
13
+ * - () => HTMLElement → resolved at mount time (lets you query the DOM after layout)
14
+ * - null → portal is disabled and renders nothing
15
+ */
16
+ target?: HTMLElement | (() => HTMLElement | null) | null;
17
+ }
18
+ /**
19
+ * SSR-safe portal helper. Renders `children` at a detached DOM node — by
20
+ * default `document.body` — so that any `position: fixed` descendant resolves
21
+ * against the real viewport, never against a transformed, filtered, or
22
+ * contained ancestor.
23
+ *
24
+ * ## Why this exists
25
+ *
26
+ * Per CSS spec, **any ancestor with `transform`, `filter`, `perspective`,
27
+ * `will-change`, or `contain: layout|paint|strict` creates a new containing
28
+ * block for `position: fixed` descendants**. The fixed element then resolves
29
+ * its coordinates against that ancestor, not the viewport — silently breaking
30
+ * full-screen overlays, toast viewports, mobile drawers, and loading screens
31
+ * whenever the consumer wraps the component in:
32
+ * - a page-transition library (Framer Motion, view transitions)
33
+ * - a modal/drawer (Storybook's centered-layout wrapper hits this too)
34
+ * - a card with `contain: layout` or `will-change: transform`
35
+ * - a CSS filter (backdrop-blur, drop-shadow on a card)
36
+ *
37
+ * Portaling to `document.body` makes the component **immune** to any
38
+ * styling its consumer applies to ancestor elements. This is the same
39
+ * pattern Radix UI uses internally for every overlay primitive
40
+ * (`Dialog.Portal`, `Tooltip.Portal`, `Popover.Portal`, etc.).
41
+ *
42
+ * ## When to use it
43
+ *
44
+ * Wrap any element that uses `position: fixed` to anchor itself to the
45
+ * viewport — full-screen overlays, toast viewports, drawers, loading
46
+ * screens, command palettes. If you're using a Radix primitive, prefer
47
+ * its built-in `*.Portal` component (they're equivalent but match the
48
+ * primitive's lifecycle).
49
+ *
50
+ * ## SSR / hydration
51
+ *
52
+ * `document.body` isn't available during SSR or the very first client
53
+ * render. The component renders `null` until `useEffect` resolves the
54
+ * target post-mount, then re-renders with the portal in place. Content
55
+ * that needs to appear immediately on mount will paint one frame later
56
+ * — acceptable for overlays (the trigger interaction is what kicks them
57
+ * off anyway).
58
+ *
59
+ * @example Full-screen loading overlay
60
+ * <Portal>
61
+ * <div className="fixed inset-0 bg-black/40 z-overlay">
62
+ * <Spinner />
63
+ * </div>
64
+ * </Portal>
65
+ *
66
+ * @example Mount to a specific element
67
+ * <Portal target={() => document.getElementById('app-root')}>
68
+ * <Drawer />
69
+ * </Portal>
70
+ *
71
+ * @example Conditionally disable (e.g. SSR-only render)
72
+ * <Portal target={shouldPortal ? undefined : null}>
73
+ * <Banner />
74
+ * </Portal>
75
+ */
76
+ declare function Portal({ children, target }: PortalProps): React$1.ReactPortal;
77
+
6
78
  declare const Icon: {
7
79
  (): react_jsx_runtime.JSX.Element;
8
80
  Moon: ({ color }: {
@@ -1596,4 +1668,4 @@ declare const Temporal: {
1596
1668
  TemporalPicker: typeof TemporalPickerBase;
1597
1669
  };
1598
1670
 
1599
- export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
1671
+ export { AppShell, type AppShellProps, AutoComplete, type AutoCompleteProps, Button, type ButtonProps, Catalog, CatalogCarousel, type CatalogCarouselProps, CatalogGrid, type CatalogGridProps, type CatalogProps, Checkbox, type CheckboxProps, ContextMenu, type ContextMenuActionItem, type ContextMenuPosition, type ContextMenuProps, type DatePickerProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownPill, type DropdownPillProps, type DropdownProps, type ExpandRowOptions, FadingBase, type FadingBaseProps, FileInput, type FileInputProps, GridCard, type GridCardItem, type GridCardProps, Icon, IconButton, type IconButtonProps, List, type ListItem, type ListProps, LoadingSpinner, type LoadingSpinnerProps, MenuBar, MenuBarItem, type MenuBarItemConfig, type MenuBarItemProps, type MenuBarProps, Modal, type ModalProps, type NotificationPayload, NotificationProvider, NumberInput, type NumberInputProps, OpaqueGridCard, type OpaqueGridCardProps, type PaginationOptions, Password, type PasswordProps, Portal, type PortalProps, ScalableContainer, type ScalableContainerProps, SearchInput, type SearchInputProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SkeletonBox, type SkeletonBoxProps, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, SkeletonText, type SkeletonTextProps, Switch, type SwitchInputProps, type TabItem, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Temporal, type TemporalPickerProps, TextInput, type TextInputProps, type ThemeColors, type ThemeConfig, type ThemeDensity, type ThemeMotion, ThemeProvider, type ThemeProviderProps, type ThemeRadius, type ThemeShadows, ThemeSwitch, type ThemeSwitchProps, type ThemeTypography, ToggleButton, type ToggleButtonProps, type ToggleItem, Tooltip, type TooltipProps, TooltipProvider, TopBar, type TopBarProps, Tree, type TreeItemClickPayload, type TreeNode, type TreeProps, TreeSelect, type TreeSelectProps, Wizard, type WizardProps, type WizardStep, useNotification };
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { colors_default } from './chunk-GKXP6OJJ.js';
2
2
  export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-GKXP6OJJ.js';
3
+ import React10, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, useId } from 'react';
4
+ import { createPortal } from 'react-dom';
3
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import React9, { createContext, useMemo, useState, useEffect, useContext, useRef, useCallback, useId } from 'react';
5
6
  import * as Dialog from '@radix-ui/react-dialog';
6
7
  import { useReducedMotion, AnimatePresence, motion } from 'framer-motion';
7
8
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -13,6 +14,18 @@ import * as Popover from '@radix-ui/react-popover';
13
14
  import * as SwitchPrimitive from '@radix-ui/react-switch';
14
15
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
15
16
 
17
+ function Portal({ children, target }) {
18
+ const [resolved, setResolved] = useState(null);
19
+ useEffect(() => {
20
+ if (target === null) {
21
+ setResolved(null);
22
+ return;
23
+ }
24
+ const node = typeof target === "function" ? target() : target ?? document.body;
25
+ setResolved(node ?? null);
26
+ }, [target]);
27
+ return resolved ? createPortal(children, resolved) : null;
28
+ }
16
29
  var Moon = ({ color = "gray" }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: color, viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: "w-8 h-8", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z" }) });
17
30
  var Sun = ({ color = "yellow" }) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: color, viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: "w-8 h-8", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z" }) });
18
31
  var CheckCircle = ({ color = "#fff", size = 28 }) => /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 28 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14 0.25C6.40625 0.25 0.25 6.40625 0.25 14C0.25 21.5937 6.40625 27.75 14 27.75C21.5937 27.75 27.75 21.5937 27.75 14C27.75 6.40625 21.5937 0.25 14 0.25ZM19.96 11.675C20.0697 11.5496 20.1533 11.4034 20.2057 11.2452C20.2582 11.087 20.2784 10.9199 20.2653 10.7537C20.2522 10.5876 20.206 10.4257 20.1295 10.2777C20.0529 10.1296 19.9475 9.99838 19.8194 9.89168C19.6914 9.78497 19.5433 9.70495 19.3839 9.65633C19.2244 9.6077 19.0569 9.59145 18.8911 9.60853C18.7253 9.62562 18.5646 9.67568 18.4184 9.75579C18.2723 9.8359 18.1436 9.94443 18.04 10.075L12.665 16.5237L9.88375 13.7412C9.648 13.5136 9.33224 13.3876 9.0045 13.3904C8.67675 13.3933 8.36324 13.5247 8.13148 13.7565C7.89972 13.9882 7.76825 14.3018 7.76541 14.6295C7.76256 14.9572 7.88855 15.273 8.11625 15.5087L11.8662 19.2587C11.9891 19.3815 12.1361 19.4773 12.298 19.5401C12.4599 19.6028 12.6331 19.6312 12.8066 19.6233C12.98 19.6154 13.15 19.5715 13.3055 19.4943C13.4611 19.4171 13.5988 19.3084 13.71 19.175L19.96 11.675Z", fill: color }) });
@@ -735,11 +748,11 @@ var TYPE_BG = {
735
748
  danger: "bg-status-error"
736
749
  };
737
750
  var VIEWPORT_CLASSES = {
738
- "top-right": "fixed top-14 right-0 flex flex-col items-end",
739
- "top-left": "fixed top-14 left-0 flex flex-col items-start",
740
- "top-center": "fixed top-14 left-1/2 flex flex-col items-center -translate-x-1/2",
741
- "bottom-right": "fixed bottom-4 right-0 flex flex-col-reverse items-end",
742
- "bottom-left": "fixed bottom-4 left-0 flex flex-col-reverse items-start",
751
+ "top-right": "fixed top-4 right-4 flex flex-col items-end",
752
+ "top-left": "fixed top-4 left-4 flex flex-col items-start",
753
+ "top-center": "fixed top-4 left-1/2 flex flex-col items-center -translate-x-1/2",
754
+ "bottom-right": "fixed bottom-4 right-4 flex flex-col-reverse items-end",
755
+ "bottom-left": "fixed bottom-4 left-4 flex flex-col-reverse items-start",
743
756
  "bottom-center": "fixed bottom-4 left-1/2 flex flex-col-reverse items-center -translate-x-1/2"
744
757
  };
745
758
  function getInitialMotion(pos, reduced) {
@@ -747,9 +760,9 @@ function getInitialMotion(pos, reduced) {
747
760
  const bottom = pos.startsWith("bottom");
748
761
  return {
749
762
  opacity: 0,
750
- y: bottom ? 10 : -10,
751
- // drop in from above (top) or rise from below (bottom)
752
- scale: 0.94
763
+ y: bottom ? 24 : -24,
764
+ // rise from below (bottom) or drop from above (top)
765
+ scale: 0.92
753
766
  };
754
767
  }
755
768
  function TypeIcon({ type }) {
@@ -790,15 +803,25 @@ function NotificationItem({
790
803
  return /* @__PURE__ */ jsx(
791
804
  motion.div,
792
805
  {
793
- layout: true,
806
+ className: "pointer-events-auto",
794
807
  initial,
795
808
  animate: { opacity: 1, y: 0, scale: 1 },
796
- exit: initial,
809
+ exit: {
810
+ opacity: 0,
811
+ y: pos.startsWith("bottom") ? 16 : -16,
812
+ scale: 0.94,
813
+ transition: reduced ? { duration: 0 } : {
814
+ opacity: { duration: 0.14, delay: 0.06 },
815
+ y: { type: "tween", duration: 0.22, ease: [0.4, 0, 1, 1] },
816
+ scale: { type: "tween", duration: 0.22, ease: [0.4, 0, 1, 1] }
817
+ }
818
+ },
797
819
  transition: reduced ? { duration: 0 } : {
798
- opacity: { duration: 0.18 },
799
- y: { type: "tween", duration: 0.24, ease: [0.16, 1, 0.3, 1] },
800
- scale: { type: "tween", duration: 0.24, ease: [0.16, 1, 0.3, 1] },
801
- layout: { duration: 0.2, ease: [0.16, 1, 0.3, 1] }
820
+ // Opacity finishes in 0.15 s — card is fully opaque while y/scale
821
+ // still have ~55 % of their travel left movement is clearly visible.
822
+ opacity: { duration: 0.15 },
823
+ y: { type: "tween", duration: 0.34, ease: [0.16, 1, 0.3, 1] },
824
+ scale: { type: "tween", duration: 0.34, ease: [0.16, 1, 0.3, 1] }
802
825
  },
803
826
  onMouseEnter: () => setHovered(true),
804
827
  onMouseLeave: () => setHovered(false),
@@ -866,13 +889,13 @@ function NotificationProvider({
866
889
  };
867
890
  return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: { open, close }, children: /* @__PURE__ */ jsxs(Toast.Provider, { swipeDirection: position.endsWith("right") ? "right" : position.endsWith("left") ? "left" : "up", children: [
868
891
  children,
869
- /* @__PURE__ */ jsx(
892
+ /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
870
893
  Toast.Viewport,
871
894
  {
872
895
  asChild: true,
873
896
  className: [
874
897
  VIEWPORT_CLASSES[position],
875
- "z-[500000] gap-2 w-[332px] p-4 outline-none"
898
+ "z-[500000] gap-2 w-[332px] outline-none pointer-events-none"
876
899
  ].join(" "),
877
900
  children: /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: notifications.map((n) => /* @__PURE__ */ jsx(
878
901
  NotificationItem,
@@ -885,7 +908,7 @@ function NotificationProvider({
885
908
  n.id
886
909
  )) }) })
887
910
  }
888
- )
911
+ ) })
889
912
  ] }) });
890
913
  }
891
914
  function useNotification() {
@@ -912,20 +935,24 @@ function LoadingSpinner({ prompt }) {
912
935
  }
913
936
  return () => timeouts.forEach(clearTimeout);
914
937
  }, [letterRefs, letters.length]);
915
- return /* @__PURE__ */ jsxs("div", { className: "fixed top-0 bottom-0 right-0 left-0 bg-oxford-blue-700-opaque z-[8000000] flex flex-col gap-5 items-center justify-start pt-80", children: [
916
- /* @__PURE__ */ jsx("div", { className: "border-r-prussian-blue border-l-prussian-blue border-t-white border-b-white border-[10px] w-[80px] h-[80px] rounded-xl shapeshift" }),
917
- /* @__PURE__ */ jsx("div", { className: "text-prussian-blue dark:text-white text-3xl font-bold", children: letters.map((letter, index) => /* @__PURE__ */ jsx(
918
- "span",
919
- {
920
- className: "select-none",
921
- ref: (ref) => {
922
- letterRefs[index] = ref;
938
+ return (
939
+ // Portaled so the full-screen overlay always covers the real viewport,
940
+ // not whatever container the consumer renders LoadingSpinner inside.
941
+ /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsxs("div", { className: "fixed top-0 bottom-0 right-0 left-0 bg-oxford-blue-700-opaque z-[8000000] flex flex-col gap-5 items-center justify-start pt-80", children: [
942
+ /* @__PURE__ */ jsx("div", { className: "border-r-prussian-blue border-l-prussian-blue border-t-white border-b-white border-[10px] w-[80px] h-[80px] rounded-xl shapeshift" }),
943
+ /* @__PURE__ */ jsx("div", { className: "text-prussian-blue dark:text-white text-3xl font-bold", children: letters.map((letter, index) => /* @__PURE__ */ jsx(
944
+ "span",
945
+ {
946
+ className: "select-none",
947
+ ref: (ref) => {
948
+ letterRefs[index] = ref;
949
+ },
950
+ children: letter
923
951
  },
924
- children: letter
925
- },
926
- index
927
- )) })
928
- ] });
952
+ index
953
+ )) })
954
+ ] }) })
955
+ );
929
956
  }
930
957
  function FadingBase({
931
958
  className = "",
@@ -1395,7 +1422,7 @@ function Wizard({ children, steps, storageKey = "po_wizard" }) {
1395
1422
  children
1396
1423
  ] });
1397
1424
  }
1398
- var SearchInput = React9.forwardRef(function SearchInput2({
1425
+ var SearchInput = React10.forwardRef(function SearchInput2({
1399
1426
  value,
1400
1427
  onChange,
1401
1428
  disabled,
@@ -1659,7 +1686,7 @@ function TableBody({
1659
1686
  setVisibleRows(initial);
1660
1687
  }
1661
1688
  }, [rows]);
1662
- return /* @__PURE__ */ jsx("tbody", { className: "w-full", children: rows.map((row, i) => /* @__PURE__ */ jsxs(React9.Fragment, { children: [
1689
+ return /* @__PURE__ */ jsx("tbody", { className: "w-full", children: rows.map((row, i) => /* @__PURE__ */ jsxs(React10.Fragment, { children: [
1663
1690
  /* @__PURE__ */ jsxs(
1664
1691
  "tr",
1665
1692
  {
@@ -2109,7 +2136,7 @@ function AppShell({
2109
2136
  footer: sidebarFooter
2110
2137
  }
2111
2138
  ),
2112
- hasSidebar && isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [
2139
+ hasSidebar && isMobile && /* @__PURE__ */ jsxs(Portal, { children: [
2113
2140
  /* @__PURE__ */ jsx(AnimatePresence, { children: mobileOpen && /* @__PURE__ */ jsx(
2114
2141
  motion.div,
2115
2142
  {
@@ -2240,7 +2267,7 @@ function ThemeProvider({
2240
2267
  className = "",
2241
2268
  style
2242
2269
  }) {
2243
- const id = React9.useId().replace(/:/g, "");
2270
+ const id = React10.useId().replace(/:/g, "");
2244
2271
  const scopeClass = `geo-th-${id}`;
2245
2272
  const divRef = useRef(null);
2246
2273
  useEffect(() => {
@@ -3272,6 +3299,6 @@ Temporal.DatePicker = DatePickerBase;
3272
3299
  Temporal.TemporalPicker = TemporalPickerBase;
3273
3300
  var DatePicker_default = Temporal;
3274
3301
 
3275
- export { AppShell, AutoComplete, Button, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ContextMenu, Drawer, Dropdown, DropdownPill, FadingBase, FileInput, GridCard, icons_default as Icon, IconButton, List2 as List, LoadingSpinner, MenuBar, MenuBarItem, Modal, NotificationProvider, NumberInput, OpaqueGridCard, Password, ScalableContainer, SearchInput_default as SearchInput, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Switch, Table, Tabs, DatePicker_default as Temporal, TextInput, ThemeProvider, ThemeSwitch, ToggleButton, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Wizard, useNotification };
3302
+ export { AppShell, AutoComplete, Button, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ContextMenu, Drawer, Dropdown, DropdownPill, FadingBase, FileInput, GridCard, icons_default as Icon, IconButton, List2 as List, LoadingSpinner, MenuBar, MenuBarItem, Modal, NotificationProvider, NumberInput, OpaqueGridCard, Password, Portal, ScalableContainer, SearchInput_default as SearchInput, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Switch, Table, Tabs, DatePicker_default as Temporal, TextInput, ThemeProvider, ThemeSwitch, ToggleButton, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Wizard, useNotification };
3276
3303
  //# sourceMappingURL=index.js.map
3277
3304
  //# sourceMappingURL=index.js.map