@micromag/core 0.3.15 → 0.3.19

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.
@@ -5,7 +5,6 @@
5
5
 
6
6
  .micromag-core-menus-breadcrumb-container .micromag-core-menus-breadcrumb-arrow+.micromag-core-menus-breadcrumb-arrow:before{content:">"}
7
7
 
8
-
9
8
  .micromag-core-menus-tabs-container{display:inline-block;position:relative}
10
9
  .micromag-core-modals-container{position:static}.micromag-core-modals-modals.micromag-core-modals-hasModals{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;background-color:rgba(28,28,28,.2)}
11
10
  .micromag-core-modals-modal-container{position:absolute;top:0;left:0;width:100%;height:100%;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow-y:auto}.micromag-core-modals-modal-container.micromag-core-modals-modal-center>.micromag-core-modals-modal-inner{margin:auto}.micromag-core-modals-modal-container.micromag-core-modals-modal-top>.micromag-core-modals-modal-inner{margin:0 auto;padding:1.75rem 0}
package/es/components.js CHANGED
@@ -1011,7 +1011,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
1011
1011
  Breadcrumb.propTypes = propTypes$A;
1012
1012
  Breadcrumb.defaultProps = defaultProps$A;
1013
1013
 
1014
- var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
1014
+ var _excluded$3 = ["type", "className", "label", "children", "onClick", "active"];
1015
1015
  var propTypes$z = {
1016
1016
  items: PropTypes.menuItems,
1017
1017
  children: PropTypes$1.node,
@@ -1051,14 +1051,15 @@ var Dropdown = function Dropdown(_ref) {
1051
1051
  }
1052
1052
  }, [refContainer.current, onClickOutside]);
1053
1053
  useDocumentEvent('click', onDocumentClick, visible);
1054
+ console.log('visible', visible); // eslint-disable-line
1055
+
1054
1056
  return /*#__PURE__*/React.createElement("div", {
1055
1057
  className: classNames(['dropdown-menu', (_ref2 = {}, _defineProperty(_ref2, "dropdown-menu-".concat(align), align !== null), _defineProperty(_ref2, "show", visible), _defineProperty(_ref2, className, className !== null), _ref2)]),
1056
1058
  ref: refContainer
1057
1059
  }, children !== null ? children : items.map(function (it, index) {
1058
1060
  var _ref3;
1059
1061
 
1060
- it.id;
1061
- var _it$type = it.type,
1062
+ var _it$type = it.type,
1062
1063
  type = _it$type === void 0 ? 'link' : _it$type,
1063
1064
  _it$className = it.className,
1064
1065
  customClassName = _it$className === void 0 ? null : _it$className,
@@ -3495,7 +3496,11 @@ var Screen = function Screen(_ref) {
3495
3496
  onEnableInteraction = _ref.onEnableInteraction,
3496
3497
  onDisableInteraction = _ref.onDisableInteraction,
3497
3498
  getMediaRef = _ref.getMediaRef;
3498
- var type = screen.type;
3499
+
3500
+ var _ref2 = screen || {},
3501
+ _ref2$type = _ref2.type,
3502
+ type = _ref2$type === void 0 ? null : _ref2$type;
3503
+
3499
3504
  var CustomScreenComponent = components !== null ? getComponentFromName(type, components) || null : null;
3500
3505
  var ContextScreenComponent = useScreenComponent(type);
3501
3506
  var ScreenComponent = CustomScreenComponent || ContextScreenComponent;
package/es/hooks.js CHANGED
@@ -1130,11 +1130,11 @@ var useScreenSizeFromElement = function useScreenSizeFromElement() {
1130
1130
  _ref6$landscapeMinHei = _ref6.landscapeMinHeight,
1131
1131
  landscapeMinHeight = _ref6$landscapeMinHei === void 0 ? 600 : _ref6$landscapeMinHei,
1132
1132
  _ref6$landscapeHeight = _ref6.landscapeHeightRatio,
1133
- landscapeHeightRatio = _ref6$landscapeHeight === void 0 ? 3 / 4 : _ref6$landscapeHeight,
1133
+ landscapeHeightRatio = _ref6$landscapeHeight === void 0 ? 2 / 3 : _ref6$landscapeHeight,
1134
1134
  _ref6$screenRatio = _ref6.screenRatio,
1135
- screenRatio = _ref6$screenRatio === void 0 ? 360 / 480 : _ref6$screenRatio,
1135
+ screenRatio = _ref6$screenRatio === void 0 ? 320 / 480 : _ref6$screenRatio,
1136
1136
  _ref6$landscapeMinRat = _ref6.landscapeMinRatio,
1137
- landscapeMinRatio = _ref6$landscapeMinRat === void 0 ? 3 / 4 : _ref6$landscapeMinRat;
1137
+ landscapeMinRatio = _ref6$landscapeMinRat === void 0 ? 2 / 3 : _ref6$landscapeMinRat;
1138
1138
 
1139
1139
  var elementRatio = fullWidth / fullHeight;
1140
1140
  var landscape = fullHeight > 0 && elementRatio > (landscapeMinRatio || screenRatio);
package/lib/components.js CHANGED
@@ -1034,7 +1034,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
1034
1034
  Breadcrumb.propTypes = propTypes$A;
1035
1035
  Breadcrumb.defaultProps = defaultProps$A;
1036
1036
 
1037
- var _excluded$3 = ["id", "type", "className", "label", "children", "onClick", "active"];
1037
+ var _excluded$3 = ["type", "className", "label", "children", "onClick", "active"];
1038
1038
  var propTypes$z = {
1039
1039
  items: core.PropTypes.menuItems,
1040
1040
  children: PropTypes__default["default"].node,
@@ -1074,14 +1074,15 @@ var Dropdown = function Dropdown(_ref) {
1074
1074
  }
1075
1075
  }, [refContainer.current, onClickOutside]);
1076
1076
  hooks.useDocumentEvent('click', onDocumentClick, visible);
1077
+ console.log('visible', visible); // eslint-disable-line
1078
+
1077
1079
  return /*#__PURE__*/React__default["default"].createElement("div", {
1078
1080
  className: classNames__default["default"](['dropdown-menu', (_ref2 = {}, _defineProperty__default["default"](_ref2, "dropdown-menu-".concat(align), align !== null), _defineProperty__default["default"](_ref2, "show", visible), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
1079
1081
  ref: refContainer
1080
1082
  }, children !== null ? children : items.map(function (it, index) {
1081
1083
  var _ref3;
1082
1084
 
1083
- it.id;
1084
- var _it$type = it.type,
1085
+ var _it$type = it.type,
1085
1086
  type = _it$type === void 0 ? 'link' : _it$type,
1086
1087
  _it$className = it.className,
1087
1088
  customClassName = _it$className === void 0 ? null : _it$className,
@@ -3518,7 +3519,11 @@ var Screen = function Screen(_ref) {
3518
3519
  onEnableInteraction = _ref.onEnableInteraction,
3519
3520
  onDisableInteraction = _ref.onDisableInteraction,
3520
3521
  getMediaRef = _ref.getMediaRef;
3521
- var type = screen.type;
3522
+
3523
+ var _ref2 = screen || {},
3524
+ _ref2$type = _ref2.type,
3525
+ type = _ref2$type === void 0 ? null : _ref2$type;
3526
+
3522
3527
  var CustomScreenComponent = components !== null ? utils.getComponentFromName(type, components) || null : null;
3523
3528
  var ContextScreenComponent = contexts.useScreenComponent(type);
3524
3529
  var ScreenComponent = CustomScreenComponent || ContextScreenComponent;
package/lib/hooks.js CHANGED
@@ -1166,11 +1166,11 @@ var useScreenSizeFromElement = function useScreenSizeFromElement() {
1166
1166
  _ref6$landscapeMinHei = _ref6.landscapeMinHeight,
1167
1167
  landscapeMinHeight = _ref6$landscapeMinHei === void 0 ? 600 : _ref6$landscapeMinHei,
1168
1168
  _ref6$landscapeHeight = _ref6.landscapeHeightRatio,
1169
- landscapeHeightRatio = _ref6$landscapeHeight === void 0 ? 3 / 4 : _ref6$landscapeHeight,
1169
+ landscapeHeightRatio = _ref6$landscapeHeight === void 0 ? 2 / 3 : _ref6$landscapeHeight,
1170
1170
  _ref6$screenRatio = _ref6.screenRatio,
1171
- screenRatio = _ref6$screenRatio === void 0 ? 360 / 480 : _ref6$screenRatio,
1171
+ screenRatio = _ref6$screenRatio === void 0 ? 320 / 480 : _ref6$screenRatio,
1172
1172
  _ref6$landscapeMinRat = _ref6.landscapeMinRatio,
1173
- landscapeMinRatio = _ref6$landscapeMinRat === void 0 ? 3 / 4 : _ref6$landscapeMinRat;
1173
+ landscapeMinRatio = _ref6$landscapeMinRat === void 0 ? 2 / 3 : _ref6$landscapeMinRat;
1174
1174
 
1175
1175
  var elementRatio = fullWidth / fullHeight;
1176
1176
  var landscape = fullHeight > 0 && elementRatio > (landscapeMinRatio || screenRatio);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.15",
3
+ "version": "0.3.19",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -132,5 +132,5 @@
132
132
  "publishConfig": {
133
133
  "access": "public"
134
134
  },
135
- "gitHead": "a0d731425a45515bba7628ebc8c546c2f2e0f0d4"
135
+ "gitHead": "567326b79369a96c8c4cfed8ec08a3e67114261f"
136
136
  }