@elliemae/ds-dialog 2.3.0-next.7 → 2.3.0-rc.2

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/cjs/DSDialog.js CHANGED
@@ -79,7 +79,7 @@ const DSDialog = props => {
79
79
 
80
80
  const body = document.getElementsByTagName('body')[0];
81
81
  const {
82
- offsetHeight,
82
+ clientHeight,
83
83
  scrollHeight
84
84
  } = body;
85
85
  const padding = (_window$getComputedSt = window.getComputedStyle(body, null)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.getPropertyValue('padding-right');
@@ -88,7 +88,7 @@ const DSDialog = props => {
88
88
  padding: '0px'
89
89
  });
90
90
  return setBodyInfo({
91
- overflow: offsetHeight < scrollHeight,
91
+ overflow: scrollHeight > clientHeight,
92
92
  padding
93
93
  });
94
94
  }, [isOpen]);
package/cjs/propTypes.js CHANGED
@@ -18,14 +18,13 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
18
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
19
 
20
20
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
- const propTypes = _objectSpread(_objectSpread({
21
+ const propTypes = _objectSpread(_objectSpread({}, dsPropsHelpers.globalAttributesPropTypes), {}, {
22
22
  isOpen: dsPropsHelpers.PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),
23
23
  children: dsPropsHelpers.PropTypes.node.description('Nested components.').isRequired,
24
24
  centered: dsPropsHelpers.PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
25
25
  removeAutoFocus: dsPropsHelpers.PropTypes.bool.description('Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.').defaultValue(false),
26
26
  onClickOutside: dsPropsHelpers.PropTypes.func.description('Callback that should be used to close the modal when the user clicks outside.').defaultValue(() => {}),
27
- onClose: dsPropsHelpers.PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {})
28
- }, dsPropsHelpers.globalAttributesPropTypes), {}, {
27
+ onClose: dsPropsHelpers.PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {}),
29
28
  size: dsPropsHelpers.PropTypes.oneOf(utils.DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(utils.DSDialogSizes.DEFAULT)
30
29
  });
31
30
 
package/esm/DSDialog.js CHANGED
@@ -68,7 +68,7 @@ const DSDialog = props => {
68
68
 
69
69
  const body = document.getElementsByTagName('body')[0];
70
70
  const {
71
- offsetHeight,
71
+ clientHeight,
72
72
  scrollHeight
73
73
  } = body;
74
74
  const padding = (_window$getComputedSt = window.getComputedStyle(body, null)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.getPropertyValue('padding-right');
@@ -77,7 +77,7 @@ const DSDialog = props => {
77
77
  padding: '0px'
78
78
  });
79
79
  return setBodyInfo({
80
- overflow: offsetHeight < scrollHeight,
80
+ overflow: scrollHeight > clientHeight,
81
81
  padding
82
82
  });
83
83
  }, [isOpen]);
package/esm/propTypes.js CHANGED
@@ -10,14 +10,13 @@ import { DSDialogSizesArrayValues, DSDialogSizes } from './utils.js';
10
10
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
11
 
12
12
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
13
- const propTypes = _objectSpread(_objectSpread({
13
+ const propTypes = _objectSpread(_objectSpread({}, globalAttributesPropTypes), {}, {
14
14
  isOpen: PropTypes.bool.description('Whether the Dialog is open or not.').defaultValue(false),
15
15
  children: PropTypes.node.description('Nested components.').isRequired,
16
16
  centered: PropTypes.bool.description('Centers the Dialog.').defaultValue(false),
17
17
  removeAutoFocus: PropTypes.bool.description('Removes focus in the Dialog container when is open. If you want to focus an specific element in the Dialog, it should be set to true.').defaultValue(false),
18
18
  onClickOutside: PropTypes.func.description('Callback that should be used to close the modal when the user clicks outside.').defaultValue(() => {}),
19
- onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {})
20
- }, globalAttributesPropTypes), {}, {
19
+ onClose: PropTypes.func.description('Callback triggered with ESC key.').defaultValue(() => {}),
21
20
  size: PropTypes.oneOf(DSDialogSizesArrayValues).description("Dialog's width size.").defaultValue(DSDialogSizes.DEFAULT)
22
21
  });
23
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-dialog",
3
- "version": "2.3.0-next.7",
3
+ "version": "2.3.0-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Dialog",
6
6
  "module": "./esm/index.js",
@@ -60,8 +60,10 @@
60
60
  "build": "node ../../scripts/build/build.js"
61
61
  },
62
62
  "dependencies": {
63
- "@elliemae/ds-props-helpers": "2.3.0-next.7",
64
- "@elliemae/ds-system": "2.3.0-next.7",
63
+ "@elliemae/ds-button": "2.3.0-rc.2",
64
+ "@elliemae/ds-icons": "2.3.0-rc.2",
65
+ "@elliemae/ds-props-helpers": "2.3.0-rc.2",
66
+ "@elliemae/ds-system": "2.3.0-rc.2",
65
67
  "@xstyled/styled-components": "~3.1.1",
66
68
  "react-desc": "~4.1.3"
67
69
  },
@@ -3,6 +3,12 @@ import type { DSDialogT } from './propTypes';
3
3
  declare const DSDialog: {
4
4
  (props: DSDialogT.Props): React.ReactPortal | null;
5
5
  propTypes: {
6
+ isOpen: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
7
+ children: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
8
+ centered: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
9
+ removeAutoFocus: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
10
+ onClickOutside: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
11
+ onClose: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
6
12
  size: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
7
13
  'aria-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
8
14
  'on-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
@@ -364,12 +370,6 @@ declare const DSDialog: {
364
370
  width: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
365
371
  wmode: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
366
372
  wrap: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
367
- isOpen: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
368
- children: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
369
- centered: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
370
- removeAutoFocus: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
371
- onClickOutside: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
372
- onClose: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
373
373
  };
374
374
  };
375
375
  declare const DSDialogWithSchema: import("@elliemae/ds-props-helpers/types/propTypes/types").DocumentedReactComponent<DSDialogT.Props>;
@@ -18,6 +18,12 @@ export declare namespace DSDialogT {
18
18
  }
19
19
  }
20
20
  export declare const propTypes: {
21
+ isOpen: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
22
+ children: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
23
+ centered: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
24
+ removeAutoFocus: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
25
+ onClickOutside: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
26
+ onClose: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
21
27
  size: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
22
28
  'aria-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
23
29
  'on-*': import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
@@ -379,10 +385,4 @@ export declare const propTypes: {
379
385
  width: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
380
386
  wmode: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
381
387
  wrap: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
382
- isOpen: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
383
- children: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
384
- centered: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
385
- removeAutoFocus: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
386
- onClickOutside: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
387
- onClose: import("@elliemae/ds-props-helpers/types/propTypes/types").ReactDescT;
388
388
  };