@amboss/design-system 3.13.8 → 3.13.10

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.
@@ -5,12 +5,6 @@ export declare const DISTANCE_FROM_TRIGGER = 4;
5
5
  export declare const ANIMATION_DISTANCE = 8;
6
6
  export declare const ARROW_SIZE = 6;
7
7
  export declare const ARROW_SIZE_BIG = 8;
8
- /**
9
- * Additional offset for placement calculations to account for fixed position
10
- * elements (e.g., navigation bars, toolbars) that may not be included in viewport height.
11
- * This prevents tooltips from being positioned behind these fixed elements.
12
- */
13
- export declare const FIXED_ELEMENT_OFFSET = 56;
14
8
  export declare const getArrowOffset: (size: number) => number;
15
9
  type GetTooltipStyleParams = {
16
10
  placement: TooltipProps["placement"];
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get ANIMATION_DISTANCE(){return ANIMATION_DISTANCE},get ARROW_SIZE(){return ARROW_SIZE},get ARROW_SIZE_BIG(){return ARROW_SIZE_BIG},get DISTANCE_FROM_TRIGGER(){return DISTANCE_FROM_TRIGGER},get FIXED_ELEMENT_OFFSET(){return FIXED_ELEMENT_OFFSET},get getArrowOffset(){return getArrowOffset},get getTooltipStyle(){return getTooltipStyle}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const DISTANCE_FROM_TRIGGER=4,ANIMATION_DISTANCE=8,ARROW_SIZE=6,ARROW_SIZE_BIG=8,FIXED_ELEMENT_OFFSET=56,getArrowOffset=size=>2*size;function getTooltipStyle({placement,defaultVerticalPlacement="top",triggerRef,tooltipRef,document,window,arrowSize,onOverflowViewport}){let triggerRect=triggerRef.current.getBoundingClientRect(),tooltipRect=tooltipRef.current.getBoundingClientRect(),viewportWidth=document.documentElement.clientWidth,viewportHeight=document.documentElement.clientHeight,top=0,left=0,verticalPlacement=defaultVerticalPlacement,horizontalPlacement="center",arrowOffset=getArrowOffset(arrowSize),tooltipMargin=arrowSize+ANIMATION_DISTANCE+DISTANCE_FROM_TRIGGER;switch(placement){case"top":case"bottom":verticalPlacement=placement;break;case"top-left":case"top-right":case"bottom-left":case"bottom-right":{let placements=placement.split("-");verticalPlacement=placements[0],horizontalPlacement=placements[1];break}default:{let canPlaceAboveTrigger=triggerRect.top>=tooltipRect.height+FIXED_ELEMENT_OFFSET,canPlaceBelowTrigger=triggerRect.bottom+tooltipRect.height+FIXED_ELEMENT_OFFSET<viewportHeight;canPlaceBelowTrigger||canPlaceAboveTrigger||onOverflowViewport?.(triggerRect,tooltipRect,viewportHeight),"top"===verticalPlacement&&!canPlaceAboveTrigger&&canPlaceBelowTrigger?verticalPlacement="bottom":"bottom"!==verticalPlacement||canPlaceBelowTrigger||(verticalPlacement="top"),triggerRect.left>=tooltipRect.width/2?triggerRect.left+triggerRect.width/2+tooltipRect.width/2>=viewportWidth&&(horizontalPlacement="left"):horizontalPlacement="right"}}switch(top="top"===verticalPlacement?triggerRect.top-tooltipRect.height-tooltipMargin:triggerRect.bottom+tooltipMargin,horizontalPlacement){case"left":left=arrowSize?triggerRect.left+triggerRect.width/2-tooltipRect.width+arrowOffset+arrowSize:triggerRect.right-tooltipRect.width;break;case"right":left=arrowSize?triggerRect.left+triggerRect.width/2-arrowOffset-arrowSize:triggerRect.left;break;default:left=triggerRect.left+triggerRect.width/2}return{top:top+window.scrollY,left:left+window.scrollX,horizontalPlacement,verticalPlacement}}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get ANIMATION_DISTANCE(){return ANIMATION_DISTANCE},get ARROW_SIZE(){return ARROW_SIZE},get ARROW_SIZE_BIG(){return ARROW_SIZE_BIG},get DISTANCE_FROM_TRIGGER(){return DISTANCE_FROM_TRIGGER},get getArrowOffset(){return getArrowOffset},get getTooltipStyle(){return getTooltipStyle}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const DISTANCE_FROM_TRIGGER=4,ANIMATION_DISTANCE=8,ARROW_SIZE=6,ARROW_SIZE_BIG=8,getArrowOffset=size=>2*size;function getTooltipStyle({placement,defaultVerticalPlacement="top",triggerRef,tooltipRef,document,window,arrowSize,onOverflowViewport}){let triggerRect=triggerRef.current.getBoundingClientRect(),tooltipRect=tooltipRef.current.getBoundingClientRect(),viewportWidth=document.documentElement.clientWidth,viewportHeight=document.documentElement.clientHeight,top=0,left=0,verticalPlacement=defaultVerticalPlacement,horizontalPlacement="center",arrowOffset=getArrowOffset(arrowSize),tooltipMargin=arrowSize+ANIMATION_DISTANCE+DISTANCE_FROM_TRIGGER;switch(placement){case"top":case"bottom":verticalPlacement=placement;break;case"top-left":case"top-right":case"bottom-left":case"bottom-right":{let placements=placement.split("-");verticalPlacement=placements[0],horizontalPlacement=placements[1];break}default:{let canPlaceAboveTrigger=triggerRect.top>=tooltipRect.height,canPlaceBelowTrigger=triggerRect.bottom+tooltipRect.height<viewportHeight;canPlaceBelowTrigger||canPlaceAboveTrigger||onOverflowViewport?.(triggerRect,tooltipRect,viewportHeight),"top"===verticalPlacement&&!canPlaceAboveTrigger&&canPlaceBelowTrigger?verticalPlacement="bottom":"bottom"!==verticalPlacement||canPlaceBelowTrigger||(verticalPlacement="top"),triggerRect.left>=tooltipRect.width/2?triggerRect.left+triggerRect.width/2+tooltipRect.width/2>=viewportWidth&&(horizontalPlacement="left"):horizontalPlacement="right"}}switch(top="top"===verticalPlacement?triggerRect.top-tooltipRect.height-tooltipMargin:triggerRect.bottom+tooltipMargin,horizontalPlacement){case"left":left=arrowSize?triggerRect.left+triggerRect.width/2-tooltipRect.width+arrowOffset+arrowSize:triggerRect.right-tooltipRect.width;break;case"right":left=arrowSize?triggerRect.left+triggerRect.width/2-arrowOffset-arrowSize:triggerRect.left;break;default:left=triggerRect.left+triggerRect.width/2}return{top:top+window.scrollY,left:left+window.scrollX,horizontalPlacement,verticalPlacement}}
@@ -130,6 +130,7 @@
130
130
  "meditricks": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"m5.784 18.226 1.926 1.541 3.484-4.758c.188-.257.525-.39.806-.409a1 1 0 0 1 .802.402l3.482 4.67 1.941-1.553-3.33-4.527a1.002 1.002 0 0 1 .475-1.536l5.35-1.868-.819-2.295-5.45 2.043A.997.997 0 0 1 13.101 9V3h-2.3v6a.998.998 0 0 1-1.357.934L4.098 7.897l-.82 2.299 5.461 1.963a1.002 1.002 0 0 1 .46 1.544zM7.9 22.2c-.225 0-.446-.077-.624-.219l-3.5-2.8a1 1 0 0 1-.174-1.384l3.182-4.216-5.122-1.84a1 1 0 0 1-.604-1.278l1.5-4.2c.091-.253.28-.459.524-.572.244-.111.523-.121.774-.026L8.8 7.549V2a1 1 0 0 1 1-1h4.3a1 1 0 0 1 1 1v5.557l5.05-1.894a1 1 0 0 1 1.292.6l1.5 4.2a1 1 0 0 1-.612 1.281l-5.022 1.753 3.098 4.209a1 1 0 0 1-.18 1.374l-3.5 2.801a1 1 0 0 1-1.427-.183l-3.29-4.415-3.302 4.507a1 1 0 0 1-.807.41\"/></svg>",
131
131
  "menu": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path d=\"M3 12h18M3 6h18M3 18h18\"/></svg>",
132
132
  "message-circle": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path d=\"M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8z\"/></svg>",
133
+ "mic-off": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path fill-rule=\"evenodd\" d=\"M.293.293a1 1 0 0 1 1.414 0l15.79 15.79a1 1 0 0 1 .37.37l5.84 5.84a1 1 0 0 1-1.414 1.414l-5.36-5.36A8 8 0 0 1 13 19.987V22h3a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h3v-2.013a8 8 0 0 1-7-7.994V10a1 1 0 0 1 2 0v2.007a6 6 0 0 0 9.505 4.912l-1.477-1.477A4 4 0 0 1 8 12.001V9.414L.293 1.707a1 1 0 0 1 0-1.414M10 11.999l.006.151a2 2 0 0 0 2.509 1.779L10 11.414z\" clip-rule=\"evenodd\"/><path d=\"M19 9a1 1 0 0 1 1 1v2.001c0 .471-.043.942-.126 1.405a1 1 0 0 1-1.968-.352Q18 12.53 18 12v-2a1 1 0 0 1 1-1M8.08 3.201A4 4 0 0 1 16 4v5.34a1 1 0 0 1-2 0V4a2 2 0 0 0-3.96-.4 1 1 0 0 1-1.96-.4\"/></svg>",
133
134
  "mic": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path d=\"M19 9a1 1 0 0 1 1 1v2a8 8 0 0 1-7 7.936V22h3a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h3v-2.064A8 8 0 0 1 4 12v-2a1 1 0 1 1 2 0v2a6 6 0 0 0 12 0v-2a1 1 0 0 1 1-1\"/><path fill-rule=\"evenodd\" d=\"M12 0a4 4 0 0 1 4 4v8a4 4 0 0 1-8 0V4a4 4 0 0 1 4-4m0 2a2 2 0 0 0-2 2v8a2 2 0 1 0 4 0V4a2 2 0 0 0-2-2\" clip-rule=\"evenodd\"/></svg>",
134
135
  "minimize": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3 14a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-5H4a1 1 0 0 1-1-1M14 3a1 1 0 0 1 1 1v5h5a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1\" clip-rule=\"evenodd\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M21.707 2.293a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0m-11 11a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0\" clip-rule=\"evenodd\"/></svg>",
135
136
  "minus": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path d=\"M5 12h14\"/></svg>",
@@ -130,7 +130,8 @@
130
130
  "meditricks": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-width=\"2\" d=\"M5.39 15a.62.62 0 0 1-.396-.145l-2.227-1.849a.68.68 0 0 1-.111-.914L5 9l-3.579-.907a.67.67 0 0 1-.384-.844l.955-2.773a.66.66 0 0 1 .333-.378.62.62 0 0 1 .493-.017L6 5V1.66c0-.364.285-.66.636-.66h2.728c.352 0 .636.296.636.66V5l3.185-.92a.6.6 0 0 1 .492.018.66.66 0 0 1 .331.378l.955 2.773a.68.68 0 0 1-.025.507.65.65 0 0 1-.365.34L11.125 9l2.224 3.032a.68.68 0 0 1-.115.908l-2.227 1.85a.63.63 0 0 1-.479.139.63.63 0 0 1-.43-.26L8.005 11.5l-2.1 3.23a.63.63 0 0 1-.514.27z\"/></svg>",
131
131
  "menu": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\" d=\"M2 8h12M2 12h12M2 4h12\"/></svg>",
132
132
  "message-circle": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14 7.667a5.6 5.6 0 0 1-.6 2.533 5.67 5.67 0 0 1-5.067 3.133 5.6 5.6 0 0 1-2.533-.6L2 14l1.267-3.8a5.6 5.6 0 0 1-.6-2.533A5.67 5.67 0 0 1 5.8 2.6 5.6 5.6 0 0 1 8.333 2h.334A5.653 5.653 0 0 1 14 7.333z\" clip-rule=\"evenodd\"/></svg>",
133
- "mic": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M12.666 5.667a1 1 0 0 1 1 1V8a5.67 5.67 0 0 1-1.66 4.007A5.67 5.67 0 0 1 9 13.575V14h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-.425a5.666 5.666 0 0 1-4.66-5.294L2.333 8V6.667a1 1 0 0 1 2 0V8l.005.183A3.667 3.667 0 0 0 11.666 8V6.667a1 1 0 0 1 1-1\"/><path fill-rule=\"evenodd\" d=\"M8 0c.784 0 1.543.3 2.108.845.567.546.892 1.295.892 2.084V8.07c0 .789-.325 1.538-.892 2.084A3.04 3.04 0 0 1 8 11c-.784 0-1.543-.3-2.108-.845a2.9 2.9 0 0 1-.888-1.936L5 8.07V2.93c0-.789.325-1.538.892-2.084A3.04 3.04 0 0 1 8 0m0 2a1.04 1.04 0 0 0-.72.285.9.9 0 0 0-.28.645v5.14l.005.088a.9.9 0 0 0 .275.556c.185.178.443.285.72.285s.535-.107.72-.285A.9.9 0 0 0 9 8.07V2.93a.9.9 0 0 0-.28-.644A1.04 1.04 0 0 0 8 2\" clip-rule=\"evenodd\"/></svg>",
133
+ "mic-off": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"m15.707 14.293-1.414 1.414-3.058-3.058A5.7 5.7 0 0 1 9 13.575V14h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-.425a5.666 5.666 0 0 1-4.66-5.294L2.333 8V7a1 1 0 0 1 2 0v1l.005.183A3.667 3.667 0 0 0 9.786 11.2l-.491-.491a3.04 3.04 0 0 1-3.403-.554 2.9 2.9 0 0 1-.888-1.936L5 8.07V6.414L.293 1.707 1.707.293zM7.166 8.58a1 1 0 0 0 .228.228z\" clip-rule=\"evenodd\"/><path d=\"M12.666 6a1 1 0 0 1 1 1v1c0 .66-.116 1.308-.335 1.917l-1.675-1.675q.01-.12.01-.242V7a1 1 0 0 1 1-1M8 0c.784 0 1.543.3 2.108.845.567.546.892 1.295.892 2.084v4.657l-2-2V2.929a.9.9 0 0 0-.28-.644A1.04 1.04 0 0 0 8 2a1.04 1.04 0 0 0-.72.285.9.9 0 0 0-.28.645v.657L5.227 1.813a2.9 2.9 0 0 1 .665-.968A3.04 3.04 0 0 1 8 0\"/></svg>",
134
+ "mic": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M12.666 6a1 1 0 0 1 1 1v1a5.67 5.67 0 0 1-1.66 4.007A5.67 5.67 0 0 1 9 13.575V14h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-.425a5.666 5.666 0 0 1-4.66-5.294L2.333 8V7a1 1 0 0 1 2 0v1l.005.183A3.667 3.667 0 0 0 11.666 8V7a1 1 0 0 1 1-1\"/><path fill-rule=\"evenodd\" d=\"M8 0c.784 0 1.543.3 2.108.845.567.546.892 1.295.892 2.084V8.07c0 .789-.325 1.538-.892 2.084A3.04 3.04 0 0 1 8 11c-.784 0-1.543-.3-2.108-.845a2.9 2.9 0 0 1-.888-1.936L5 8.07V2.93c0-.789.325-1.538.892-2.084A3.04 3.04 0 0 1 8 0m0 2a1.04 1.04 0 0 0-.72.285.9.9 0 0 0-.28.645v5.14l.005.088a.9.9 0 0 0 .275.556c.185.178.443.285.72.285s.535-.107.72-.285A.9.9 0 0 0 9 8.07V2.93a.9.9 0 0 0-.28-.644A1.04 1.04 0 0 0 8 2\" clip-rule=\"evenodd\"/></svg>",
134
135
  "minimize": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"m4.576 10-3.293 3.293 1.414 1.414 3.293-3.293V13a1 1 0 1 0 2 0V9a1 1 0 0 0-1-1h-4a1 1 0 0 0 0 2zM13 7.99a1 1 0 1 0 0-2h-1.586l3.293-3.293-1.414-1.414L10 4.576V2.99a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1z\"/></svg>",
135
136
  "minus": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"bevel\" stroke-width=\"2\" d=\"M4 8h8\"/></svg>",
136
137
  "monitor": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M13.67 1A2.33 2.33 0 0 1 16 3.33v6.34A2.33 2.33 0 0 1 13.67 12H9v1h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-1H2.33A2.33 2.33 0 0 1 0 9.67V3.33A2.33 2.33 0 0 1 2.33 1zM2.33 3a.33.33 0 0 0-.33.33v6.34c0 .182.148.33.33.33h11.34a.33.33 0 0 0 .33-.33V3.33a.33.33 0 0 0-.33-.33z\" clip-rule=\"evenodd\"/></svg>",
@@ -5,12 +5,6 @@ export declare const DISTANCE_FROM_TRIGGER = 4;
5
5
  export declare const ANIMATION_DISTANCE = 8;
6
6
  export declare const ARROW_SIZE = 6;
7
7
  export declare const ARROW_SIZE_BIG = 8;
8
- /**
9
- * Additional offset for placement calculations to account for fixed position
10
- * elements (e.g., navigation bars, toolbars) that may not be included in viewport height.
11
- * This prevents tooltips from being positioned behind these fixed elements.
12
- */
13
- export declare const FIXED_ELEMENT_OFFSET = 56;
14
8
  export declare const getArrowOffset: (size: number) => number;
15
9
  type GetTooltipStyleParams = {
16
10
  placement: TooltipProps["placement"];
@@ -1 +1 @@
1
- export const DISTANCE_FROM_TRIGGER=4;export const ANIMATION_DISTANCE=8;export const ARROW_SIZE=6;export const ARROW_SIZE_BIG=8;export const FIXED_ELEMENT_OFFSET=56;export const getArrowOffset=size=>2*size;export function getTooltipStyle({placement,defaultVerticalPlacement="top",triggerRef,tooltipRef,document,window,arrowSize,onOverflowViewport}){let triggerRect=triggerRef.current.getBoundingClientRect(),tooltipRect=tooltipRef.current.getBoundingClientRect(),viewportWidth=document.documentElement.clientWidth,viewportHeight=document.documentElement.clientHeight,top=0,left=0,verticalPlacement=defaultVerticalPlacement,horizontalPlacement="center",arrowOffset=getArrowOffset(arrowSize),tooltipMargin=arrowSize+8+4;switch(placement){case"top":case"bottom":verticalPlacement=placement;break;case"top-left":case"top-right":case"bottom-left":case"bottom-right":{let placements=placement.split("-");verticalPlacement=placements[0],horizontalPlacement=placements[1];break}default:{let canPlaceAboveTrigger=triggerRect.top>=tooltipRect.height+56,canPlaceBelowTrigger=triggerRect.bottom+tooltipRect.height+56<viewportHeight;canPlaceBelowTrigger||canPlaceAboveTrigger||onOverflowViewport?.(triggerRect,tooltipRect,viewportHeight),"top"===verticalPlacement&&!canPlaceAboveTrigger&&canPlaceBelowTrigger?verticalPlacement="bottom":"bottom"!==verticalPlacement||canPlaceBelowTrigger||(verticalPlacement="top"),triggerRect.left>=tooltipRect.width/2?triggerRect.left+triggerRect.width/2+tooltipRect.width/2>=viewportWidth&&(horizontalPlacement="left"):horizontalPlacement="right"}}switch(top="top"===verticalPlacement?triggerRect.top-tooltipRect.height-tooltipMargin:triggerRect.bottom+tooltipMargin,horizontalPlacement){case"left":left=arrowSize?triggerRect.left+triggerRect.width/2-tooltipRect.width+arrowOffset+arrowSize:triggerRect.right-tooltipRect.width;break;case"right":left=arrowSize?triggerRect.left+triggerRect.width/2-arrowOffset-arrowSize:triggerRect.left;break;default:left=triggerRect.left+triggerRect.width/2}return{top:top+window.scrollY,left:left+window.scrollX,horizontalPlacement,verticalPlacement}}
1
+ export const DISTANCE_FROM_TRIGGER=4;export const ANIMATION_DISTANCE=8;export const ARROW_SIZE=6;export const ARROW_SIZE_BIG=8;export const getArrowOffset=size=>2*size;export function getTooltipStyle({placement,defaultVerticalPlacement="top",triggerRef,tooltipRef,document,window,arrowSize,onOverflowViewport}){let triggerRect=triggerRef.current.getBoundingClientRect(),tooltipRect=tooltipRef.current.getBoundingClientRect(),viewportWidth=document.documentElement.clientWidth,viewportHeight=document.documentElement.clientHeight,top=0,left=0,verticalPlacement=defaultVerticalPlacement,horizontalPlacement="center",arrowOffset=getArrowOffset(arrowSize),tooltipMargin=arrowSize+8+4;switch(placement){case"top":case"bottom":verticalPlacement=placement;break;case"top-left":case"top-right":case"bottom-left":case"bottom-right":{let placements=placement.split("-");verticalPlacement=placements[0],horizontalPlacement=placements[1];break}default:{let canPlaceAboveTrigger=triggerRect.top>=tooltipRect.height,canPlaceBelowTrigger=triggerRect.bottom+tooltipRect.height<viewportHeight;canPlaceBelowTrigger||canPlaceAboveTrigger||onOverflowViewport?.(triggerRect,tooltipRect,viewportHeight),"top"===verticalPlacement&&!canPlaceAboveTrigger&&canPlaceBelowTrigger?verticalPlacement="bottom":"bottom"!==verticalPlacement||canPlaceBelowTrigger||(verticalPlacement="top"),triggerRect.left>=tooltipRect.width/2?triggerRect.left+triggerRect.width/2+tooltipRect.width/2>=viewportWidth&&(horizontalPlacement="left"):horizontalPlacement="right"}}switch(top="top"===verticalPlacement?triggerRect.top-tooltipRect.height-tooltipMargin:triggerRect.bottom+tooltipMargin,horizontalPlacement){case"left":left=arrowSize?triggerRect.left+triggerRect.width/2-tooltipRect.width+arrowOffset+arrowSize:triggerRect.right-tooltipRect.width;break;case"right":left=arrowSize?triggerRect.left+triggerRect.width/2-arrowOffset-arrowSize:triggerRect.left;break;default:left=triggerRect.left+triggerRect.width/2}return{top:top+window.scrollY,left:left+window.scrollX,horizontalPlacement,verticalPlacement}}
@@ -130,6 +130,7 @@
130
130
  "meditricks": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"m5.784 18.226 1.926 1.541 3.484-4.758c.188-.257.525-.39.806-.409a1 1 0 0 1 .802.402l3.482 4.67 1.941-1.553-3.33-4.527a1.002 1.002 0 0 1 .475-1.536l5.35-1.868-.819-2.295-5.45 2.043A.997.997 0 0 1 13.101 9V3h-2.3v6a.998.998 0 0 1-1.357.934L4.098 7.897l-.82 2.299 5.461 1.963a1.002 1.002 0 0 1 .46 1.544zM7.9 22.2c-.225 0-.446-.077-.624-.219l-3.5-2.8a1 1 0 0 1-.174-1.384l3.182-4.216-5.122-1.84a1 1 0 0 1-.604-1.278l1.5-4.2c.091-.253.28-.459.524-.572.244-.111.523-.121.774-.026L8.8 7.549V2a1 1 0 0 1 1-1h4.3a1 1 0 0 1 1 1v5.557l5.05-1.894a1 1 0 0 1 1.292.6l1.5 4.2a1 1 0 0 1-.612 1.281l-5.022 1.753 3.098 4.209a1 1 0 0 1-.18 1.374l-3.5 2.801a1 1 0 0 1-1.427-.183l-3.29-4.415-3.302 4.507a1 1 0 0 1-.807.41\"/></svg>",
131
131
  "menu": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path d=\"M3 12h18M3 6h18M3 18h18\"/></svg>",
132
132
  "message-circle": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path d=\"M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8z\"/></svg>",
133
+ "mic-off": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path fill-rule=\"evenodd\" d=\"M.293.293a1 1 0 0 1 1.414 0l15.79 15.79a1 1 0 0 1 .37.37l5.84 5.84a1 1 0 0 1-1.414 1.414l-5.36-5.36A8 8 0 0 1 13 19.987V22h3a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h3v-2.013a8 8 0 0 1-7-7.994V10a1 1 0 0 1 2 0v2.007a6 6 0 0 0 9.505 4.912l-1.477-1.477A4 4 0 0 1 8 12.001V9.414L.293 1.707a1 1 0 0 1 0-1.414M10 11.999l.006.151a2 2 0 0 0 2.509 1.779L10 11.414z\" clip-rule=\"evenodd\"/><path d=\"M19 9a1 1 0 0 1 1 1v2.001c0 .471-.043.942-.126 1.405a1 1 0 0 1-1.968-.352Q18 12.53 18 12v-2a1 1 0 0 1 1-1M8.08 3.201A4 4 0 0 1 16 4v5.34a1 1 0 0 1-2 0V4a2 2 0 0 0-3.96-.4 1 1 0 0 1-1.96-.4\"/></svg>",
133
134
  "mic": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path d=\"M19 9a1 1 0 0 1 1 1v2a8 8 0 0 1-7 7.936V22h3a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h3v-2.064A8 8 0 0 1 4 12v-2a1 1 0 1 1 2 0v2a6 6 0 0 0 12 0v-2a1 1 0 0 1 1-1\"/><path fill-rule=\"evenodd\" d=\"M12 0a4 4 0 0 1 4 4v8a4 4 0 0 1-8 0V4a4 4 0 0 1 4-4m0 2a2 2 0 0 0-2 2v8a2 2 0 1 0 4 0V4a2 2 0 0 0-2-2\" clip-rule=\"evenodd\"/></svg>",
134
135
  "minimize": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M3 14a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-5H4a1 1 0 0 1-1-1M14 3a1 1 0 0 1 1 1v5h5a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1\" clip-rule=\"evenodd\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M21.707 2.293a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0m-11 11a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414l7-7a1 1 0 0 1 1.414 0\" clip-rule=\"evenodd\"/></svg>",
135
136
  "minus": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\"><path d=\"M5 12h14\"/></svg>",
@@ -130,7 +130,8 @@
130
130
  "meditricks": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-width=\"2\" d=\"M5.39 15a.62.62 0 0 1-.396-.145l-2.227-1.849a.68.68 0 0 1-.111-.914L5 9l-3.579-.907a.67.67 0 0 1-.384-.844l.955-2.773a.66.66 0 0 1 .333-.378.62.62 0 0 1 .493-.017L6 5V1.66c0-.364.285-.66.636-.66h2.728c.352 0 .636.296.636.66V5l3.185-.92a.6.6 0 0 1 .492.018.66.66 0 0 1 .331.378l.955 2.773a.68.68 0 0 1-.025.507.65.65 0 0 1-.365.34L11.125 9l2.224 3.032a.68.68 0 0 1-.115.908l-2.227 1.85a.63.63 0 0 1-.479.139.63.63 0 0 1-.43-.26L8.005 11.5l-2.1 3.23a.63.63 0 0 1-.514.27z\"/></svg>",
131
131
  "menu": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\" d=\"M2 8h12M2 12h12M2 4h12\"/></svg>",
132
132
  "message-circle": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14 7.667a5.6 5.6 0 0 1-.6 2.533 5.67 5.67 0 0 1-5.067 3.133 5.6 5.6 0 0 1-2.533-.6L2 14l1.267-3.8a5.6 5.6 0 0 1-.6-2.533A5.67 5.67 0 0 1 5.8 2.6 5.6 5.6 0 0 1 8.333 2h.334A5.653 5.653 0 0 1 14 7.333z\" clip-rule=\"evenodd\"/></svg>",
133
- "mic": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M12.666 5.667a1 1 0 0 1 1 1V8a5.67 5.67 0 0 1-1.66 4.007A5.67 5.67 0 0 1 9 13.575V14h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-.425a5.666 5.666 0 0 1-4.66-5.294L2.333 8V6.667a1 1 0 0 1 2 0V8l.005.183A3.667 3.667 0 0 0 11.666 8V6.667a1 1 0 0 1 1-1\"/><path fill-rule=\"evenodd\" d=\"M8 0c.784 0 1.543.3 2.108.845.567.546.892 1.295.892 2.084V8.07c0 .789-.325 1.538-.892 2.084A3.04 3.04 0 0 1 8 11c-.784 0-1.543-.3-2.108-.845a2.9 2.9 0 0 1-.888-1.936L5 8.07V2.93c0-.789.325-1.538.892-2.084A3.04 3.04 0 0 1 8 0m0 2a1.04 1.04 0 0 0-.72.285.9.9 0 0 0-.28.645v5.14l.005.088a.9.9 0 0 0 .275.556c.185.178.443.285.72.285s.535-.107.72-.285A.9.9 0 0 0 9 8.07V2.93a.9.9 0 0 0-.28-.644A1.04 1.04 0 0 0 8 2\" clip-rule=\"evenodd\"/></svg>",
133
+ "mic-off": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"m15.707 14.293-1.414 1.414-3.058-3.058A5.7 5.7 0 0 1 9 13.575V14h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-.425a5.666 5.666 0 0 1-4.66-5.294L2.333 8V7a1 1 0 0 1 2 0v1l.005.183A3.667 3.667 0 0 0 9.786 11.2l-.491-.491a3.04 3.04 0 0 1-3.403-.554 2.9 2.9 0 0 1-.888-1.936L5 8.07V6.414L.293 1.707 1.707.293zM7.166 8.58a1 1 0 0 0 .228.228z\" clip-rule=\"evenodd\"/><path d=\"M12.666 6a1 1 0 0 1 1 1v1c0 .66-.116 1.308-.335 1.917l-1.675-1.675q.01-.12.01-.242V7a1 1 0 0 1 1-1M8 0c.784 0 1.543.3 2.108.845.567.546.892 1.295.892 2.084v4.657l-2-2V2.929a.9.9 0 0 0-.28-.644A1.04 1.04 0 0 0 8 2a1.04 1.04 0 0 0-.72.285.9.9 0 0 0-.28.645v.657L5.227 1.813a2.9 2.9 0 0 1 .665-.968A3.04 3.04 0 0 1 8 0\"/></svg>",
134
+ "mic": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M12.666 6a1 1 0 0 1 1 1v1a5.67 5.67 0 0 1-1.66 4.007A5.67 5.67 0 0 1 9 13.575V14h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-.425a5.666 5.666 0 0 1-4.66-5.294L2.333 8V7a1 1 0 0 1 2 0v1l.005.183A3.667 3.667 0 0 0 11.666 8V7a1 1 0 0 1 1-1\"/><path fill-rule=\"evenodd\" d=\"M8 0c.784 0 1.543.3 2.108.845.567.546.892 1.295.892 2.084V8.07c0 .789-.325 1.538-.892 2.084A3.04 3.04 0 0 1 8 11c-.784 0-1.543-.3-2.108-.845a2.9 2.9 0 0 1-.888-1.936L5 8.07V2.93c0-.789.325-1.538.892-2.084A3.04 3.04 0 0 1 8 0m0 2a1.04 1.04 0 0 0-.72.285.9.9 0 0 0-.28.645v5.14l.005.088a.9.9 0 0 0 .275.556c.185.178.443.285.72.285s.535-.107.72-.285A.9.9 0 0 0 9 8.07V2.93a.9.9 0 0 0-.28-.644A1.04 1.04 0 0 0 8 2\" clip-rule=\"evenodd\"/></svg>",
134
135
  "minimize": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"m4.576 10-3.293 3.293 1.414 1.414 3.293-3.293V13a1 1 0 1 0 2 0V9a1 1 0 0 0-1-1h-4a1 1 0 0 0 0 2zM13 7.99a1 1 0 1 0 0-2h-1.586l3.293-3.293-1.414-1.414L10 4.576V2.99a1 1 0 1 0-2 0v4a1 1 0 0 0 1 1z\"/></svg>",
135
136
  "minus": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"bevel\" stroke-width=\"2\" d=\"M4 8h8\"/></svg>",
136
137
  "monitor": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" d=\"M13.67 1A2.33 2.33 0 0 1 16 3.33v6.34A2.33 2.33 0 0 1 13.67 12H9v1h1.666a1 1 0 1 1 0 2H5.333a1 1 0 0 1 0-2H7v-1H2.33A2.33 2.33 0 0 1 0 9.67V3.33A2.33 2.33 0 0 1 2.33 1zM2.33 3a.33.33 0 0 0-.33.33v6.34c0 .182.148.33.33.33h11.34a.33.33 0 0 0 .33-.33V3.33a.33.33 0 0 0-.33-.33z\" clip-rule=\"evenodd\"/></svg>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amboss/design-system",
3
- "version": "3.13.8",
3
+ "version": "3.13.10",
4
4
  "description": "the design system for AMBOSS products",
5
5
  "author": "AMBOSS",
6
6
  "license": "ISC",