@babylonjs/shared-ui-components 8.21.0 → 8.21.1
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.
@@ -1,14 +1,15 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { Dropdown } from "../../primitives/dropdown.js";
|
3
3
|
import { PropertyLine } from "./propertyLine.js";
|
4
|
+
import { forwardRef } from "react";
|
4
5
|
/**
|
5
6
|
* Wraps a dropdown in a property line
|
6
7
|
* @param props - PropertyLineProps and DropdownProps
|
7
8
|
* @returns property-line wrapped dropdown
|
8
9
|
*/
|
9
|
-
const DropdownPropertyLine = (props) => {
|
10
|
-
return (_jsx(PropertyLine, { ...props, children: _jsx(Dropdown, { ...props }) }));
|
11
|
-
};
|
10
|
+
const DropdownPropertyLine = forwardRef((props, ref) => {
|
11
|
+
return (_jsx(PropertyLine, { ...props, ref: ref, children: _jsx(Dropdown, { ...props }) }));
|
12
|
+
});
|
12
13
|
/**
|
13
14
|
* Dropdown component for number values.
|
14
15
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dropdownPropertyLine.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/fluent/hoc/propertyLines/dropdownPropertyLine.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"dropdownPropertyLine.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/fluent/hoc/propertyLines/dropdownPropertyLine.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAMnC;;;;GAIG;AAEH,MAAM,oBAAoB,GAAG,UAAU,CAAkG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACpJ,OAAO,CACH,KAAC,YAAY,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,YAC7B,KAAC,QAAQ,OAAK,KAAK,GAAI,GACZ,CAClB,CAAC;AACN,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAA4E,CAAC;AACvH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAA4E,CAAC","sourcesContent":["import { Dropdown } from \"../../primitives/dropdown\";\r\nimport type { AcceptedDropdownValue, DropdownProps } from \"../../primitives/dropdown\";\r\nimport { PropertyLine } from \"./propertyLine\";\r\nimport type { PropertyLineProps } from \"./propertyLine\";\r\nimport { forwardRef } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\n\r\n// In a follow-up PR i will remove the nullAs concept from dropdown\r\ntype DropdownPropertyLineProps<V extends AcceptedDropdownValue> = Omit<DropdownProps<V>, \"includeNullAs\"> & PropertyLineProps<AcceptedDropdownValue>;\r\n\r\n/**\r\n * Wraps a dropdown in a property line\r\n * @param props - PropertyLineProps and DropdownProps\r\n * @returns property-line wrapped dropdown\r\n */\r\n\r\nconst DropdownPropertyLine = forwardRef<HTMLDivElement, DropdownProps<AcceptedDropdownValue> & PropertyLineProps<AcceptedDropdownValue>>((props, ref) => {\r\n return (\r\n <PropertyLine {...props} ref={ref}>\r\n <Dropdown {...props} />\r\n </PropertyLine>\r\n );\r\n});\r\n\r\n/**\r\n * Dropdown component for number values.\r\n */\r\nexport const NumberDropdownPropertyLine = DropdownPropertyLine as FunctionComponent<DropdownPropertyLineProps<number>>;\r\n/**\r\n * Dropdown component for string values\r\n */\r\nexport const StringDropdownPropertyLine = DropdownPropertyLine as FunctionComponent<DropdownPropertyLineProps<string>>;\r\n"]}
|