@amboss/design-system 4.4.3 → 4.4.4
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.
|
@@ -18,6 +18,8 @@ export type RangePopoverProps = {
|
|
|
18
18
|
contentPadding?: "s" | "m";
|
|
19
19
|
/** Maximum width of the popover surface. */
|
|
20
20
|
maxWidth?: number;
|
|
21
|
+
/** When true, the arrow pointing at the range is not rendered. */
|
|
22
|
+
hideArrow?: boolean;
|
|
21
23
|
/** ARIA role for the popover surface. */
|
|
22
24
|
role?: string;
|
|
23
25
|
/**
|
|
@@ -53,9 +55,10 @@ export type RangePopoverProps = {
|
|
|
53
55
|
* @param portalContainer - Portal target; falls back to the document body.
|
|
54
56
|
* @param contentPadding - Inner padding of the popover surface.
|
|
55
57
|
* @param maxWidth - Maximum width of the popover surface.
|
|
58
|
+
* @param hideArrow - When true, the arrow pointing at the range is not rendered.
|
|
56
59
|
* @param role - ARIA role for the popover surface.
|
|
57
60
|
* @param aria-label - Accessible name for the popover surface.
|
|
58
61
|
* @param disableInitialFocus - When true, does not move focus into the popover.
|
|
59
62
|
*/
|
|
60
|
-
export declare function RangePopover({ content, range, isVisible, onClose, placement, portalContainer, contentPadding, maxWidth, role, "aria-label": ariaLabel, disableInitialFocus, "data-e2e-test-id": dataE2eTestId, }: RangePopoverProps): React.ReactElement;
|
|
63
|
+
export declare function RangePopover({ content, range, isVisible, onClose, placement, portalContainer, contentPadding, maxWidth, hideArrow, role, "aria-label": ariaLabel, disableInitialFocus, "data-e2e-test-id": dataE2eTestId, }: RangePopoverProps): React.ReactElement;
|
|
61
64
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RangePopover",{enumerable:!0,get:function(){return RangePopover}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_TooltipContent=require("../Tooltip/TooltipContent"),_FocusTrapWrapper=require("../../shared/FocusTrapWrapper"),StyledContent=(0,_styled.default)("div",{target:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RangePopover",{enumerable:!0,get:function(){return RangePopover}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_TooltipContent=require("../Tooltip/TooltipContent"),_FocusTrapWrapper=require("../../shared/FocusTrapWrapper"),StyledContent=(0,_styled.default)("div",{target:"e115t0yz0",label:"StyledContent"})(({theme,contentPadding})=>({padding:"m"===contentPadding?theme.variables.size.spacing.s:theme.variables.size.spacing.xxs}));function RangePopover({content,range,isVisible,onClose,placement="top",portalContainer,contentPadding="s",maxWidth,hideArrow=!1,role="dialog","aria-label":ariaLabel,disableInitialFocus=!1,"data-e2e-test-id":dataE2eTestId}){let tooltipId=(0,_react.useId)(),rangeRef=(0,_react.useRef)(null);rangeRef.current=range;let contentRef=(0,_react.useRef)(null),trappedContent=_react.default.createElement(_FocusTrapWrapper.FocusTrapWrapper,{active:isVisible,focusTrapOptions:{allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0,fallbackFocus:()=>contentRef.current,initialFocus:!disableInitialFocus&&void 0,onPostDeactivate:onClose,preventScroll:!0,returnFocusOnDeactivate:!disableInitialFocus}},_react.default.createElement(StyledContent,{ref:contentRef,tabIndex:-1,contentPadding:contentPadding},content));return _react.default.createElement(_TooltipContent.TooltipContent,{"aria-label":ariaLabel,content:trappedContent,dataDSId:"RangePopover",dataE2eTestId:dataE2eTestId,hideArrow:hideArrow,isVisible:isVisible,maxWidth:maxWidth,placement:placement,portalContainer:portalContainer,role:role,tooltipId:tooltipId,triggerRef:rangeRef})}
|
|
@@ -18,6 +18,8 @@ export type RangePopoverProps = {
|
|
|
18
18
|
contentPadding?: "s" | "m";
|
|
19
19
|
/** Maximum width of the popover surface. */
|
|
20
20
|
maxWidth?: number;
|
|
21
|
+
/** When true, the arrow pointing at the range is not rendered. */
|
|
22
|
+
hideArrow?: boolean;
|
|
21
23
|
/** ARIA role for the popover surface. */
|
|
22
24
|
role?: string;
|
|
23
25
|
/**
|
|
@@ -53,9 +55,10 @@ export type RangePopoverProps = {
|
|
|
53
55
|
* @param portalContainer - Portal target; falls back to the document body.
|
|
54
56
|
* @param contentPadding - Inner padding of the popover surface.
|
|
55
57
|
* @param maxWidth - Maximum width of the popover surface.
|
|
58
|
+
* @param hideArrow - When true, the arrow pointing at the range is not rendered.
|
|
56
59
|
* @param role - ARIA role for the popover surface.
|
|
57
60
|
* @param aria-label - Accessible name for the popover surface.
|
|
58
61
|
* @param disableInitialFocus - When true, does not move focus into the popover.
|
|
59
62
|
*/
|
|
60
|
-
export declare function RangePopover({ content, range, isVisible, onClose, placement, portalContainer, contentPadding, maxWidth, role, "aria-label": ariaLabel, disableInitialFocus, "data-e2e-test-id": dataE2eTestId, }: RangePopoverProps): React.ReactElement;
|
|
63
|
+
export declare function RangePopover({ content, range, isVisible, onClose, placement, portalContainer, contentPadding, maxWidth, hideArrow, role, "aria-label": ariaLabel, disableInitialFocus, "data-e2e-test-id": dataE2eTestId, }: RangePopoverProps): React.ReactElement;
|
|
61
64
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useId,useRef}from"react";import styled from"@emotion/styled";import{TooltipContent}from"../Tooltip/TooltipContent";import{FocusTrapWrapper}from"../../shared/FocusTrapWrapper";let StyledContent=styled("div",{target:"
|
|
1
|
+
import React,{useId,useRef}from"react";import styled from"@emotion/styled";import{TooltipContent}from"../Tooltip/TooltipContent";import{FocusTrapWrapper}from"../../shared/FocusTrapWrapper";let StyledContent=styled("div",{target:"e115t0yz0",label:"StyledContent"})(({theme,contentPadding})=>({padding:"m"===contentPadding?theme.variables.size.spacing.s:theme.variables.size.spacing.xxs}));export function RangePopover({content,range,isVisible,onClose,placement="top",portalContainer,contentPadding="s",maxWidth,hideArrow=!1,role="dialog","aria-label":ariaLabel,disableInitialFocus=!1,"data-e2e-test-id":dataE2eTestId}){let tooltipId=useId(),rangeRef=useRef(null);rangeRef.current=range;let contentRef=useRef(null),trappedContent=React.createElement(FocusTrapWrapper,{active:isVisible,focusTrapOptions:{allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0,fallbackFocus:()=>contentRef.current,initialFocus:!disableInitialFocus&&void 0,onPostDeactivate:onClose,preventScroll:!0,returnFocusOnDeactivate:!disableInitialFocus}},React.createElement(StyledContent,{ref:contentRef,tabIndex:-1,contentPadding:contentPadding},content));return React.createElement(TooltipContent,{"aria-label":ariaLabel,content:trappedContent,dataDSId:"RangePopover",dataE2eTestId:dataE2eTestId,hideArrow:hideArrow,isVisible:isVisible,maxWidth:maxWidth,placement:placement,portalContainer:portalContainer,role:role,tooltipId:tooltipId,triggerRef:rangeRef})}
|