@viasat/beam-shared 2.15.0 → 2.17.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="var(--bm-combobox-dropdown-max-items, 8)",m="var(--bm-comp-actionlist-size-height, 2.5rem)",t="var(--bm-sem-space-50, 0.5rem)",c="var(--bm-sem-space-100, 1rem)",a=e=>`min(calc(${e}px - ${c}), calc(${o} * ${m} + 2 * ${t}))`;exports.getDropdownMaxHeight=a;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a CSS `min()` expression that caps dropdown height to the smaller of:
|
|
3
|
+
* - the available viewport space (`availableHeight`)
|
|
4
|
+
* - a configurable number of items (via `--bm-combobox-dropdown-max-items`, default 8)
|
|
5
|
+
*
|
|
6
|
+
* Consumers can set `--bm-combobox-dropdown-max-items` on an ancestor element to override.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getDropdownMaxHeight: (availableHeight: number) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const o = "var(--bm-combobox-dropdown-max-items, 8)", e = "var(--bm-comp-actionlist-size-height, 2.5rem)", c = "var(--bm-sem-space-50, 0.5rem)", t = "var(--bm-sem-space-100, 1rem)", a = (m) => `min(calc(${m}px - ${t}), calc(${o} * ${e} + 2 * ${c}))`;
|
|
2
|
+
export {
|
|
3
|
+
a as getDropdownMaxHeight
|
|
4
|
+
};
|