@expofp/ui 3.39.1 → 3.40.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.
@@ -4,9 +4,8 @@ export interface MobileToggleButtonProps {
4
4
  mode: MobileToggleButtonMode;
5
5
  label: string;
6
6
  ariaLabel: string;
7
- withBanner?: boolean;
8
7
  onClick: () => void;
9
8
  }
10
- declare function MobileToggleButton({ mode, label, ariaLabel, withBanner, onClick, }: MobileToggleButtonProps): import("react").JSX.Element;
9
+ declare function MobileToggleButton({ mode, label, ariaLabel, onClick }: MobileToggleButtonProps): import("react").JSX.Element;
11
10
  export default MobileToggleButton;
12
11
  //# sourceMappingURL=MobileToggleButton.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import './MobileToggleButton.scss';
3
3
  import classNames from 'classnames';
4
- function MobileToggleButton({ mode, label, ariaLabel, withBanner, onClick, }) {
4
+ function MobileToggleButton({ mode, label, ariaLabel, onClick }) {
5
5
  const isListMode = mode === 'list';
6
- return (_jsxs("button", { className: classNames('efp-mobile-toggle-button', { 'efp-mobile-toggle-button--with-banner': withBanner }, isListMode ? 'efp-mobile-toggle-button--list' : 'efp-mobile-toggle-button--map'), onClick: onClick, type: "button", "aria-label": ariaLabel, children: [_jsx("i", { className: isListMode ? 'icon-list' : 'icon-map', "aria-hidden": "true" }), _jsx("span", { className: "efp-mobile-toggle-button__text", children: label })] }));
6
+ return (_jsxs("button", { className: classNames('efp-mobile-toggle-button', isListMode ? 'efp-mobile-toggle-button--list' : 'efp-mobile-toggle-button--map'), onClick: onClick, type: "button", "aria-label": ariaLabel, children: [_jsx("i", { className: isListMode ? 'icon-list' : 'icon-map', "aria-hidden": "true" }), _jsx("span", { className: "efp-mobile-toggle-button__text", children: label })] }));
7
7
  }
8
8
  export default MobileToggleButton;
@@ -19,11 +19,12 @@ export interface OverlayProps {
19
19
  mobileBreakpoint?: number;
20
20
  /** Shown when `children` is empty. */
21
21
  noContentLabel: string;
22
+ withFloatingButton?: boolean;
22
23
  onChangeSize?: (size: Size) => void;
23
24
  onScrollStateChange?: (isScrolled: boolean) => void;
24
25
  /** Fired (debounced) on scroll — lets the host react to user activity. */
25
26
  onScrollActivity?: () => void;
26
27
  }
27
- declare const Overlay: ({ children, open, size, particles, className, onChangeSize, onScrollStateChange, onScrollActivity, smallSizeMultiplier, mediumSizeMultiplier, fullSizeOffset, scrollThreshold, disableDrag, forceFull, scrollResetKey, mobileBreakpoint, noContentLabel, }: OverlayProps) => import("react").JSX.Element | null;
28
+ declare const Overlay: ({ children, open, size, particles, className, onChangeSize, onScrollStateChange, onScrollActivity, smallSizeMultiplier, mediumSizeMultiplier, fullSizeOffset, scrollThreshold, disableDrag, forceFull, scrollResetKey, mobileBreakpoint, noContentLabel, withFloatingButton, }: OverlayProps) => import("react").JSX.Element | null;
28
29
  export default Overlay;
29
30
  //# sourceMappingURL=Overlay.d.ts.map
@@ -22,7 +22,7 @@ const generateSizes = (height = getActualViewportHeight(), smallMultiplier, medi
22
22
  medium: height / mediumMultiplier,
23
23
  full: height - fullSizeOffset,
24
24
  });
25
- const Overlay = ({ children, open, size = 'medium', particles, className, onChangeSize, onScrollStateChange, onScrollActivity, smallSizeMultiplier = 12.6, mediumSizeMultiplier = 2.6, fullSizeOffset = 0, scrollThreshold = DEFAULT_SCROLL_THRESHOLD, disableDrag = false, forceFull = false, scrollResetKey, mobileBreakpoint = DEFAULT_MOBILE_BREAKPOINT, noContentLabel, }) => {
25
+ const Overlay = ({ children, open, size = 'medium', particles, className, onChangeSize, onScrollStateChange, onScrollActivity, smallSizeMultiplier = 12.6, mediumSizeMultiplier = 2.6, fullSizeOffset = 0, scrollThreshold = DEFAULT_SCROLL_THRESHOLD, disableDrag = false, forceFull = false, scrollResetKey, mobileBreakpoint = DEFAULT_MOBILE_BREAKPOINT, noContentLabel, withFloatingButton = false, }) => {
26
26
  const { width: windowWidth, height: windowHeight } = useWindowSize();
27
27
  // Pure derivations of the window size — computed in render, not stored/synced via an effect.
28
28
  const mobile = windowWidth <= mobileBreakpoint;
@@ -225,6 +225,7 @@ const Overlay = ({ children, open, size = 'medium', particles, className, onChan
225
225
  'efp-overlay--hidden': !mobile && !open,
226
226
  'efp-overlay--scrolled': isScrolled,
227
227
  'efp-overlay--forced-full': forceFull && mobile,
228
+ 'efp-overlay--button-inset': mobile && withFloatingButton,
228
229
  }, className), style: positioningStyles, ref: overlayPanelRef, onPointerDown: onPointerDown, children: [!disableDrag && _jsx("div", { className: "efp-overlay__draghandle", "data-sheet-handle": true }), _jsxs("div", { className: "efp-overlay__scroll", ref: attachScroll, onScroll: () => {
229
230
  handleScroll();
230
231
  debouncedScrollActivity();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/ui",
3
- "version": "3.39.1",
3
+ "version": "3.40.0",
4
4
  "type": "module",
5
5
  "description": "ExpoFP SDK internal: shared pure React UI components",
6
6
  "homepage": "https://developer.expofp.com/",