@budibase/bbui 2.5.6-alpha.2 → 2.5.6-alpha.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "2.5.6-alpha.2",
4
+ "version": "2.5.6-alpha.3",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -38,8 +38,8 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@adobe/spectrum-css-workflow-icons": "1.2.1",
41
- "@budibase/shared-core": "2.5.6-alpha.2",
42
- "@budibase/string-templates": "2.5.6-alpha.2",
41
+ "@budibase/shared-core": "2.5.6-alpha.3",
42
+ "@budibase/string-templates": "2.5.6-alpha.3",
43
43
  "@spectrum-css/accordion": "3.0.24",
44
44
  "@spectrum-css/actionbutton": "1.0.1",
45
45
  "@spectrum-css/actiongroup": "1.0.1",
@@ -90,5 +90,5 @@
90
90
  "resolutions": {
91
91
  "loader-utils": "1.4.1"
92
92
  },
93
- "gitHead": "af0bc0890fbe45ca786366c72a754c2202277a54"
93
+ "gitHead": "38b2a2407eeb58c3f143c1d91d517e38b27cdd89"
94
94
  }
@@ -10,7 +10,14 @@ export default function positionDropdown(element, opts) {
10
10
 
11
11
  // Updates the position of the dropdown
12
12
  const updatePosition = opts => {
13
- const { anchor, align, maxWidth, useAnchorWidth, offset = 5 } = opts
13
+ const {
14
+ anchor,
15
+ align,
16
+ maxHeight,
17
+ maxWidth,
18
+ useAnchorWidth,
19
+ offset = 5,
20
+ } = opts
14
21
  if (!anchor) {
15
22
  return
16
23
  }
@@ -31,10 +38,11 @@ export default function positionDropdown(element, opts) {
31
38
  styles.top = anchorBounds.top
32
39
  } else if (window.innerHeight - anchorBounds.bottom < 100) {
33
40
  styles.top = anchorBounds.top - elementBounds.height - offset
34
- styles.maxHeight = 240
41
+ styles.maxHeight = maxHeight || 240
35
42
  } else {
36
43
  styles.top = anchorBounds.bottom + offset
37
- styles.maxHeight = window.innerHeight - anchorBounds.bottom - 20
44
+ styles.maxHeight =
45
+ maxHeight || window.innerHeight - anchorBounds.bottom - 20
38
46
  }
39
47
 
40
48
  // Determine horizontal styles
@@ -14,6 +14,7 @@
14
14
  export let align = "right"
15
15
  export let portalTarget
16
16
  export let maxWidth
17
+ export let maxHeight
17
18
  export let open = false
18
19
  export let useAnchorWidth = false
19
20
  export let dismissible = true
@@ -64,6 +65,7 @@
64
65
  use:positionDropdown={{
65
66
  anchor,
66
67
  align,
68
+ maxHeight,
67
69
  maxWidth,
68
70
  useAnchorWidth,
69
71
  offset,