@jetbrains/ring-ui 5.1.9 → 5.1.10

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.
@@ -99,7 +99,10 @@ export function maxHeightForDirection(direction, anchorNode, containerNode) {
99
99
  const container = containerNode || document.documentElement;
100
100
  const domRect = anchorNode.getBoundingClientRect();
101
101
  const containerRect = container.getBoundingClientRect();
102
- const topMaxHeight = Math.max(domRect.top - containerRect.top, 0);
102
+ const containerTop = domRect.top < 0
103
+ ? containerRect.top
104
+ : Math.max(containerRect.top, 0);
105
+ const topMaxHeight = Math.max(domRect.top - containerTop, 0);
103
106
  const containerHeight = Math.max(containerRect.height,
104
107
  // XXX
105
108
  // If container is the document element
@@ -138,7 +138,8 @@ function maxHeightForDirection(direction, anchorNode, containerNode) {
138
138
  var container = containerNode || document.documentElement;
139
139
  var domRect = anchorNode.getBoundingClientRect();
140
140
  var containerRect = container.getBoundingClientRect();
141
- var topMaxHeight = Math.max(domRect.top - containerRect.top, 0);
141
+ var containerTop = domRect.top < 0 ? containerRect.top : Math.max(containerRect.top, 0);
142
+ var topMaxHeight = Math.max(domRect.top - containerTop, 0);
142
143
  var containerHeight = Math.max(containerRect.height,
143
144
  // XXX
144
145
  // If container is the document element
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.1.9",
3
+ "version": "5.1.10",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -81,36 +81,36 @@
81
81
  "@jetbrains/eslint-config": "^5.4.1",
82
82
  "@jetbrains/stylelint-config": "^4.0.1",
83
83
  "@primer/octicons": "^19.8.0",
84
- "@rollup/plugin-babel": "^6.0.3",
85
- "@rollup/plugin-json": "^6.0.0",
86
- "@rollup/plugin-node-resolve": "^15.2.1",
87
- "@rollup/plugin-replace": "^5.0.2",
84
+ "@rollup/plugin-babel": "^6.0.4",
85
+ "@rollup/plugin-json": "^6.0.1",
86
+ "@rollup/plugin-node-resolve": "^15.2.3",
87
+ "@rollup/plugin-replace": "^5.0.3",
88
88
  "@storybook/addon-a11y": "7.4.6",
89
- "@storybook/addon-docs": "7.4.5",
90
- "@storybook/addon-essentials": "7.4.5",
89
+ "@storybook/addon-docs": "7.4.6",
90
+ "@storybook/addon-essentials": "7.4.6",
91
91
  "@storybook/addon-storyshots": "7.4.5",
92
92
  "@storybook/addon-storyshots-puppeteer": "7.4.6",
93
- "@storybook/addon-storysource": "7.4.5",
94
- "@storybook/addons": "7.4.5",
93
+ "@storybook/addon-storysource": "7.4.6",
94
+ "@storybook/addons": "7.4.6",
95
95
  "@storybook/html": "7.4.5",
96
- "@storybook/html-webpack5": "^7.4.5",
96
+ "@storybook/html-webpack5": "^7.4.6",
97
97
  "@storybook/preview-api": "7.4.5",
98
- "@storybook/react": "7.4.5",
99
- "@storybook/source-loader": "7.4.5",
100
- "@storybook/theming": "7.4.5",
98
+ "@storybook/react": "7.4.6",
99
+ "@storybook/source-loader": "7.4.6",
100
+ "@storybook/theming": "7.4.6",
101
101
  "@testing-library/react": "^14.0.0",
102
102
  "@testing-library/user-event": "^14.5.1",
103
- "@types/chai": "^4.3.6",
103
+ "@types/chai": "^4.3.7",
104
104
  "@types/chai-as-promised": "^7.1.6",
105
105
  "@types/chai-dom": "0.0.10",
106
106
  "@types/chai-enzyme": "^0.6.11",
107
107
  "@types/enzyme": "^3.10.14",
108
- "@types/react": "^18.2.24",
109
- "@types/react-dom": "^18.2.8",
110
- "@types/sinon": "^10.0.18",
108
+ "@types/react": "^18.2.27",
109
+ "@types/react-dom": "^18.2.12",
110
+ "@types/sinon": "^10.0.19",
111
111
  "@types/sinon-chai": "^3.2.10",
112
- "@typescript-eslint/eslint-plugin": "^6.7.4",
113
- "@typescript-eslint/parser": "^6.7.4",
112
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
113
+ "@typescript-eslint/parser": "^6.7.5",
114
114
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
115
115
  "acorn": "^8.10.0",
116
116
  "angular": "^1.8.3",
@@ -118,7 +118,7 @@
118
118
  "angular-route": "^1.8.3",
119
119
  "babel-plugin-react-docgen": "^4.2.1",
120
120
  "babel-plugin-require-context-hook": "^1.0.0",
121
- "caniuse-lite": "^1.0.30001543",
121
+ "caniuse-lite": "^1.0.30001547",
122
122
  "chai": "^4.3.10",
123
123
  "chai-as-promised": "^7.1.1",
124
124
  "chai-dom": "^1.10.0",
@@ -127,14 +127,14 @@
127
127
  "core-js": "^3.33.0",
128
128
  "cpy-cli": "^3.1.1",
129
129
  "enzyme": "^3.11.0",
130
- "eslint": "^8.50.0",
130
+ "eslint": "^8.51.0",
131
131
  "eslint-import-resolver-webpack": "^0.13.7",
132
132
  "eslint-plugin-angular": "^4.1.0",
133
133
  "eslint-plugin-bdd": "^2.1.1",
134
134
  "eslint-plugin-import": "^2.28.1",
135
135
  "eslint-plugin-jsx-a11y": "^6.7.1",
136
136
  "eslint-plugin-react": "^7.33.2",
137
- "eslint-plugin-storybook": "^0.6.14",
137
+ "eslint-plugin-storybook": "^0.6.15",
138
138
  "events": "^3.3.0",
139
139
  "glob": "^10.3.10",
140
140
  "html-webpack-plugin": "^5.5.3",
@@ -165,7 +165,7 @@
165
165
  "rollup": "^3.29.4",
166
166
  "rollup-plugin-clear": "^2.0.7",
167
167
  "rollup-plugin-styles": "^4.0.0",
168
- "sinon": "^16.0.0",
168
+ "sinon": "^16.1.0",
169
169
  "sinon-chai": "^3.7.0",
170
170
  "storage-mock": "^2.1.0",
171
171
  "storybook": "^7.4.6",
@@ -204,8 +204,8 @@
204
204
  "@babel/core": "^7.23.0",
205
205
  "@babel/preset-typescript": "^7.23.0",
206
206
  "@jetbrains/babel-preset-jetbrains": "^2.3.2",
207
- "@jetbrains/icons": "^3.21.0",
208
- "@jetbrains/logos": "^2.2.21",
207
+ "@jetbrains/icons": "^3.22.0",
208
+ "@jetbrains/logos": "^2.2.22",
209
209
  "@jetbrains/postcss-require-hover": "^0.1.2",
210
210
  "@types/combokeys": "^2.4.7",
211
211
  "@types/deep-equal": "^1.0.2",
@@ -244,7 +244,7 @@
244
244
  "postcss-font-family-system-ui": "^5.0.0",
245
245
  "postcss-loader": "^7.3.3",
246
246
  "postcss-modules-values-replace": "^4.1.0",
247
- "postcss-preset-env": "^9.1.4",
247
+ "postcss-preset-env": "^9.2.0",
248
248
  "prop-types": "^15.8.1",
249
249
  "react-markdown": "^8.0.7",
250
250
  "react-movable": "^3.0.4",