@longline/aqua-ui 1.0.25 → 1.0.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",
@@ -49,7 +49,7 @@ declare const Dialog: {
49
49
  * Dialog.Content contains main dialog body content.
50
50
  */
51
51
  Content: {
52
- (props: import("./DialogContent").IProps): React.JSX.Element;
52
+ ({ nopadding, maxHeight, ...props }: import("./DialogContent").IProps): React.JSX.Element;
53
53
  displayName: string;
54
54
  };
55
55
  /**
@@ -12,6 +12,11 @@ interface IProps {
12
12
  * @default 70
13
13
  */
14
14
  maxHeight?: number;
15
+ /**
16
+ * If set, no padding will be added around the content. *
17
+ * @default false
18
+ */
19
+ nopadding?: boolean;
15
20
  }
16
21
  /**
17
22
  * `Dialog.Content` is a content block for a `Dialog` component. The content
@@ -19,7 +24,7 @@ interface IProps {
19
24
  * can be adjusted with the `maxHeight` prop.
20
25
  */
21
26
  declare const DialogContent: {
22
- (props: IProps): React.JSX.Element;
27
+ ({ nopadding, maxHeight, ...props }: IProps): React.JSX.Element;
23
28
  displayName: string;
24
29
  };
25
30
  export { DialogContent, IProps };
@@ -13,26 +13,38 @@ var __assign = (this && this.__assign) || function () {
13
13
  };
14
14
  return __assign.apply(this, arguments);
15
15
  };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
16
27
  import * as React from 'react';
17
- import styled from 'styled-components';
28
+ import styled, { css } from 'styled-components';
18
29
  var DialogContentBase = function (props) {
19
30
  return React.createElement("div", { className: props.className }, props.children);
20
31
  };
21
- var DialogContentStyled = styled(DialogContentBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n padding: 0 20px 24px 20px;\n max-height: ", "vh;\n overflow-y: auto; \n"], ["\n position: relative;\n padding: 0 20px 24px 20px;\n max-height: ", "vh;\n overflow-y: auto; \n"
32
+ var DialogContentStyled = styled(DialogContentBase)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n ", "\n max-height: ", "vh;\n overflow-y: auto; \n"], ["\n position: relative;\n ", "\n max-height: ", "vh;\n overflow-y: auto; \n"
22
33
  /**
23
34
  * `Dialog.Content` is a content block for a `Dialog` component. The content
24
35
  * will auto-scroll when it is taller than 70% of the viewport. This percentage
25
36
  * can be adjusted with the `maxHeight` prop.
26
37
  */
27
- ])), function (p) { var _a; return (_a = p.maxHeight) !== null && _a !== void 0 ? _a : 70; });
38
+ ])), function (p) { return !p.nopadding && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["padding: 0 20px 24px 20px;"], ["padding: 0 20px 24px 20px;"]))); }, function (p) { return p.maxHeight; });
28
39
  /**
29
40
  * `Dialog.Content` is a content block for a `Dialog` component. The content
30
41
  * will auto-scroll when it is taller than 70% of the viewport. This percentage
31
42
  * can be adjusted with the `maxHeight` prop.
32
43
  */
33
- var DialogContent = function (props) {
34
- return React.createElement(DialogContentStyled, __assign({}, props));
44
+ var DialogContent = function (_a) {
45
+ var _b = _a.nopadding, nopadding = _b === void 0 ? false : _b, _c = _a.maxHeight, maxHeight = _c === void 0 ? 70 : _c, props = __rest(_a, ["nopadding", "maxHeight"]);
46
+ return React.createElement(DialogContentStyled, __assign({ nopadding: nopadding, maxHeight: maxHeight }, props));
35
47
  };
36
48
  DialogContent.displayName = "Dialog.Content";
37
49
  export { DialogContent };
38
- var templateObject_1;
50
+ var templateObject_1, templateObject_2;