@amboss/design-system 1.5.13 → 1.5.15

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.
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { VerticalPosition, HorizontalPosition } from "../../shared/useAutoPosition";
2
3
  import { MenuItemProps } from "./MenuItem";
3
4
  import { IconName } from "../Icon/Icon";
4
5
  import { ButtonSize } from "../../types";
@@ -24,7 +25,8 @@ export declare type DropdownMenuProps = {
24
25
  "data-e2e-test-id"?: string;
25
26
  };
26
27
  export declare type MenuPositionProps = {
27
- verticalPosition: "up" | "down";
28
+ verticalPosition: VerticalPosition;
29
+ horizontalPosition: HorizontalPosition;
28
30
  };
29
31
  export declare function DropdownMenu({ menuItems, menuItemTextVariant, label, iconName, size, disabled, onMenuOpen, onMenuClose, privateProps: { dropdownSquareCorners }, "data-e2e-test-id": dataE2eTestId, }: DropdownMenuProps): React.ReactElement;
30
32
  export declare namespace DropdownMenu {
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ export declare type MediaItemProps = {
3
+ src: string;
4
+ title: string;
5
+ /** Sets the height of the media to equal the width value making a square <br/>
6
+ */
7
+ squareFromWidth?: boolean;
8
+ /** Specify fit of the media background. <br/>
9
+ * "contain" - the media keeps its aspect ratio, but is resized to fit within the given dimension. <br/>
10
+ * "cover" - the media keeps its aspect ratio and fills the given dimension. The media will be clipped to fit.
11
+ */
12
+ fit: "cover" | "contain";
13
+ };
14
+ export declare function MediaItem({ src, title, squareFromWidth, fit, }: MediaItemProps): React.ReactElement;
15
+ export declare namespace MediaItem {
16
+ var defaultProps: {
17
+ mediaCover: boolean;
18
+ squareFromWidth: boolean;
19
+ fit: string;
20
+ };
21
+ }
@@ -38,3 +38,4 @@ export { PasswordInput } from "./components/Form/PasswordInput/PasswordInput";
38
38
  export { Collapsible, CollapsibleHeader, } from "./components/Collapsible/Collapsible";
39
39
  export { RoundButton } from "./components/RoundButton/RoundButton";
40
40
  export { Notification } from "./components/Notification/Notification";
41
+ export { MediaItem } from "./components/MediaItem/MediaItem";
@@ -8,5 +8,4 @@ declare type EmotionCssValue = string | number;
8
8
  declare type EmotionCssDescription = Record<EmotionCssPropertyName, EmotionCssValue>;
9
9
  declare type MqFunc = (rules: Record<string, MqProp<any>>) => Record<string, EmotionCssValue | EmotionCssDescription>;
10
10
  export declare const mq: MqFunc;
11
- export declare function getMediaQueryClasses<T>(s: T | MQ<T> | undefined, styles: Record<string, string>, prefix?: string): string[];
12
11
  export {};
@@ -1,3 +1,5 @@
1
1
  import { RefObject } from "react";
2
- export declare type Position = "down" | "up";
3
- export declare const useAutoPosition: (anchorRef: RefObject<any>, contentRef: RefObject<any>, isActive: boolean) => Position;
2
+ export declare type VerticalPosition = "up" | "down";
3
+ export declare type HorizontalPosition = "left" | "right";
4
+ export declare type Position = [VerticalPosition, HorizontalPosition];
5
+ export declare const useAutoPosition: (anchorRef: RefObject<HTMLElement>, contentRef: RefObject<HTMLElement>, isActive: boolean) => Position;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amboss/design-system",
3
- "version": "1.5.13",
3
+ "version": "1.5.15",
4
4
  "description": "the design system for AMBOSS products",
5
5
  "author": "Bagrat Gobedashvili",
6
6
  "license": "ISC",