@rpg-engine/long-bow 0.5.75 → 0.5.76

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.
@@ -8,5 +8,6 @@ export interface IDropdownProps {
8
8
  options: IOptionsProps[];
9
9
  width?: string;
10
10
  onChange: (value: string) => void;
11
+ opensUp?: boolean;
11
12
  }
12
13
  export declare const Dropdown: React.FC<IDropdownProps>;
@@ -14892,7 +14892,9 @@ var ItemTypes = /*#__PURE__*/styled__default.div.withConfig({
14892
14892
  var Dropdown = function Dropdown(_ref) {
14893
14893
  var options = _ref.options,
14894
14894
  width = _ref.width,
14895
- onChange = _ref.onChange;
14895
+ onChange = _ref.onChange,
14896
+ _ref$opensUp = _ref.opensUp,
14897
+ opensUp = _ref$opensUp === void 0 ? false : _ref$opensUp;
14896
14898
  var dropdownId = uuid.v4();
14897
14899
  var _useState = React.useState(''),
14898
14900
  selectedValue = _useState[0],
@@ -14912,10 +14914,6 @@ var Dropdown = function Dropdown(_ref) {
14912
14914
  return o.value === selectedValue;
14913
14915
  }).length < 1;
14914
14916
  }
14915
- /**
14916
- * make a selection if there is no selected value already present
14917
- * or if there is a selected value but its not in new options
14918
- */
14919
14917
  if (change) {
14920
14918
  setSelectedValue(firstOption.value);
14921
14919
  setSelectedOption(firstOption.option);
@@ -14942,7 +14940,8 @@ var Dropdown = function Dropdown(_ref) {
14942
14940
  }
14943
14941
  }, React__default.createElement("label", null, "\u25BC"), " ", selectedOption), React__default.createElement(DropdownOptions$1, {
14944
14942
  className: "rpgui-dropdown-imp",
14945
- opened: opened
14943
+ opened: opened,
14944
+ opensUp: opensUp
14946
14945
  }, options.map(function (option) {
14947
14946
  return React__default.createElement("li", {
14948
14947
  key: option.id,
@@ -14967,8 +14966,12 @@ var DropdownSelect$1 = /*#__PURE__*/styled__default.p.withConfig({
14967
14966
  var DropdownOptions$1 = /*#__PURE__*/styled__default.ul.withConfig({
14968
14967
  displayName: "Dropdown__DropdownOptions",
14969
14968
  componentId: "sc-8arn65-2"
14970
- })(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
14969
+ })(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;bottom:", ";top:", ";margin:0;padding:0;@media (max-width:768px){padding:8px 0;}"], function (props) {
14971
14970
  return props.opened ? 'block' : 'none';
14971
+ }, function (props) {
14972
+ return props.opensUp ? '100%' : 'auto';
14973
+ }, function (props) {
14974
+ return props.opensUp ? 'auto' : '100%';
14972
14975
  });
14973
14976
 
14974
14977
  var DropdownSelectorContainer = function DropdownSelectorContainer(_ref) {