@equinor/amplify-component-lib 8.10.2 → 8.10.3

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.
@@ -27,6 +27,7 @@ export interface DialogProps extends Omit<EDSDialogProps, 'title'> {
27
27
  actions?: DialogAction[];
28
28
  withContentPadding?: boolean;
29
29
  withBorders?: boolean;
30
+ contentMaxHeight?: string;
30
31
  }
31
32
  /**
32
33
  * @param title - String or up to 2 react elements in a flex-column
@@ -36,6 +37,7 @@ export interface DialogProps extends Omit<EDSDialogProps, 'title'> {
36
37
  * @param actions - Dialog actions, { position: "right" is default }
37
38
  * @param withContentPadding - Defaults to true
38
39
  * @param withBorders - Defaults to false
40
+ * @param contentMaxHeight - Defaults to '60vh'
39
41
  * Also inherits props from EDS dialog
40
42
  */
41
43
  export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- import{jsx as i,jsxs as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Typography as e,Button as n,Icon as r}from"@equinor/eds-core-react";import{close as d}from"@equinor/eds-icons";import{DialogElement as l,DialogTitle as s,DialogContent as c,DialogActions as h}from"./Dialog.styles.js";import{DialogAction as a}from"./DialogAction.js";const p=o((({title:o,children:p,width:g,actions:m,withContentPadding:f=!0,withBorders:w=!1,...y},x)=>{const v=m?.filter((i=>"left"===i.position)),$=m?.filter((i=>"center"===i.position)),u=m?.filter((i=>void 0===i.position||"right"===i.position)),C="string"==typeof o?i(e,{variant:"h6",children:o}):o,j="string"==typeof p?i(e,{variant:"body_long",children:p}):p;return t(l,{...y,ref:x,style:{width:g?`${g}px`:void 0,...y.style},children:[t(s,{$withBorders:w,style:{width:g?`${g}px`:void 0},children:[i("section",{children:C}),i(n,{variant:"ghost_icon",onClick:y.onClose,children:i(r,{data:d})})]}),i(c,{$withContentPadding:f,style:{width:g?`${g}px`:void 0},children:j}),m&&m.length>0&&t(h,{$withBorders:w,style:{width:g?`${g}px`:void 0},children:[v&&v.length>0&&i("section",{id:"dialog-actions-left",children:v.map((t=>i(a,{...t},t.text)))}),$&&$.length>0&&i("section",{id:"dialog-actions-center",children:$.map((t=>i(a,{...t},t.text)))}),u&&u.length>0&&i("section",{id:"dialog-actions-right",children:u.map((t=>i(a,{...t},t.text)))})]})]})}));p.displayName="Dialog";export{p as Dialog};
1
+ import{jsx as i,jsxs as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Typography as o,Button as n,Icon as r}from"@equinor/eds-core-react";import{close as d}from"@equinor/eds-icons";import{DialogElement as l,DialogTitle as s,DialogContent as c,DialogActions as h}from"./Dialog.styles.js";import{DialogAction as a}from"./DialogAction.js";const p=e((({title:e,children:p,width:g,actions:m,withContentPadding:f=!0,withBorders:x=!1,contentMaxHeight:w="60vh",...y},v)=>{const $=m?.filter((i=>"left"===i.position)),u=m?.filter((i=>"center"===i.position)),C=m?.filter((i=>void 0===i.position||"right"===i.position)),j="string"==typeof e?i(o,{variant:"h6",children:e}):e,B="string"==typeof p?i(o,{variant:"body_long",children:p}):p;return t(l,{...y,ref:v,style:{width:g?`${g}px`:void 0,...y.style},children:[t(s,{$withBorders:x,style:{width:g?`${g}px`:void 0},children:[i("section",{children:j}),i(n,{variant:"ghost_icon",onClick:y.onClose,children:i(r,{data:d})})]}),i(c,{$withContentPadding:f,style:{width:g?`${g}px`:void 0,maxHeight:w},children:B}),m&&m.length>0&&t(h,{$withBorders:x,style:{width:g?`${g}px`:void 0},children:[$&&$.length>0&&i("section",{id:"dialog-actions-left",children:$.map((t=>i(a,{...t},t.text)))}),u&&u.length>0&&i("section",{id:"dialog-actions-center",children:u.map((t=>i(a,{...t},t.text)))}),C&&C.length>0&&i("section",{id:"dialog-actions-right",children:C.map((t=>i(a,{...t},t.text)))})]})]})}));p.displayName="Dialog";export{p as Dialog};
@@ -16,6 +16,7 @@ import{Dialog as o}from"@equinor/eds-core-react";import{colors as t}from"../../a
16
16
  }
17
17
  `,s=e(o.CustomContent)`
18
18
  min-height: unset;
19
+ overflow: auto;
19
20
  ${({$withContentPadding:o})=>o?n`
20
21
  padding: ${i.medium};
21
22
  `:n`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/amplify-component-lib",
3
- "version": "8.10.2",
3
+ "version": "8.10.3",
4
4
  "description": "Frontend Typescript components for the Amplify team",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",