@wavv/ui 1.8.20 → 1.8.21

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,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ThemeProp } from '../theme';
3
- import { FlexPosition, Height, Margin, Padding, WidthHeight } from './types';
3
+ import { FlexPosition, Height, Margin, Padding, PositionType, WidthHeight } from './types';
4
4
  type ModalProps = {
5
5
  children: ReactNode;
6
6
  /** The selector (id or className) of the app's root element */
@@ -25,6 +25,8 @@ type ModalProps = {
25
25
  centerX?: boolean;
26
26
  /** Centers the vertical position of the Modal. Used in conjunction with `noOverlay` */
27
27
  centerY?: boolean;
28
+ /** Sets the position of the modal container */
29
+ position?: PositionType;
28
30
  /** Sets the `top` position of the modal. Used in conjunction with `noOverlay` */
29
31
  top?: number | string;
30
32
  /** Sets the `bottom` position of the modal. Used in conjunction with `noOverlay` */
@@ -37,7 +39,7 @@ type ModalProps = {
37
39
  zIndex?: number;
38
40
  } & WidthHeight & Padding;
39
41
  declare const Modal: {
40
- ({ children, rootSelector, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayColor, backgroundColor, small, noOverlay, centerX, centerY, top, bottom, right, left, padding, paddingTop, paddingBottom, paddingRight, paddingLeft, zIndex, }: ModalProps): import("react").ReactPortal | null;
42
+ ({ children, rootSelector, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayColor, backgroundColor, small, noOverlay, centerX, centerY, position, top, bottom, right, left, padding, paddingTop, paddingBottom, paddingRight, paddingLeft, zIndex, }: ModalProps): import("react").ReactPortal | null;
41
43
  Header: import("@emotion/styled").StyledComponent<{
42
44
  theme?: import("@emotion/react").Theme | undefined;
43
45
  as?: import("react").ElementType<any> | undefined;
@@ -18,7 +18,7 @@ export declare const marginProps: ({ margin, marginTop, marginBottom, marginRigh
18
18
  marginLeft: string | number | undefined;
19
19
  };
20
20
  export declare const positionProps: ({ position, top, bottom, right, left }: Position) => {
21
- position: "static" | "relative" | "absolute" | "sticky" | "fixed" | undefined;
21
+ position: import("../types").PositionType | undefined;
22
22
  top: string | number | undefined;
23
23
  bottom: string | number | undefined;
24
24
  right: string | number | undefined;
@@ -14,8 +14,9 @@ export type Padding = {
14
14
  paddingRight?: number | string;
15
15
  paddingLeft?: number | string;
16
16
  };
17
+ export type PositionType = 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed';
17
18
  export type Position = {
18
- position?: 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed';
19
+ position?: PositionType;
19
20
  top?: number | string;
20
21
  bottom?: number | string;
21
22
  right?: number | string;
package/build/index.d.ts CHANGED
@@ -522,8 +522,9 @@ type Padding = {
522
522
  paddingRight?: number | string;
523
523
  paddingLeft?: number | string;
524
524
  };
525
+ type PositionType = 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed';
525
526
  type Position = {
526
- position?: 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed';
527
+ position?: PositionType;
527
528
  top?: number | string;
528
529
  bottom?: number | string;
529
530
  right?: number | string;
@@ -2158,6 +2159,8 @@ type ModalProps = {
2158
2159
  centerX?: boolean;
2159
2160
  /** Centers the vertical position of the Modal. Used in conjunction with `noOverlay` */
2160
2161
  centerY?: boolean;
2162
+ /** Sets the position of the modal container */
2163
+ position?: PositionType;
2161
2164
  /** Sets the `top` position of the modal. Used in conjunction with `noOverlay` */
2162
2165
  top?: number | string;
2163
2166
  /** Sets the `bottom` position of the modal. Used in conjunction with `noOverlay` */
@@ -2170,7 +2173,7 @@ type ModalProps = {
2170
2173
  zIndex?: number;
2171
2174
  } & WidthHeight & Padding;
2172
2175
  declare const Modal: {
2173
- ({ children, rootSelector, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayColor, backgroundColor, small, noOverlay, centerX, centerY, top, bottom, right, left, padding, paddingTop, paddingBottom, paddingRight, paddingLeft, zIndex, }: ModalProps): react.ReactPortal | null;
2176
+ ({ children, rootSelector, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayColor, backgroundColor, small, noOverlay, centerX, centerY, position, top, bottom, right, left, padding, paddingTop, paddingBottom, paddingRight, paddingLeft, zIndex, }: ModalProps): react.ReactPortal | null;
2174
2177
  Header: _emotion_styled.StyledComponent<{
2175
2178
  theme?: _emotion_react.Theme | undefined;
2176
2179
  as?: react.ElementType<any> | undefined;
@@ -2616,7 +2619,7 @@ declare const marginProps: ({ margin, marginTop, marginBottom, marginRight, marg
2616
2619
  marginLeft: string | number | undefined;
2617
2620
  };
2618
2621
  declare const positionProps: ({ position, top, bottom, right, left }: Position) => {
2619
- position: "static" | "relative" | "absolute" | "sticky" | "fixed" | undefined;
2622
+ position: PositionType | undefined;
2620
2623
  top: string | number | undefined;
2621
2624
  bottom: string | number | undefined;
2622
2625
  right: string | number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "1.8.20",
3
+ "version": "1.8.21",
4
4
  "files": [
5
5
  "build/**/*"
6
6
  ],