@rpg-engine/long-bow 0.5.76 → 0.5.77

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.
@@ -9,5 +9,6 @@ export interface IAsyncDropdownProps {
9
9
  width?: string;
10
10
  onChange: (value: string) => void;
11
11
  defaultValue?: string;
12
+ opensUp?: boolean;
12
13
  }
13
14
  export declare const AsyncDropdown: React.FC<IAsyncDropdownProps>;
@@ -50,7 +50,9 @@ var AsyncDropdown = function AsyncDropdown(_ref) {
50
50
  var options = _ref.options,
51
51
  width = _ref.width,
52
52
  onChange = _ref.onChange,
53
- defaultValue = _ref.defaultValue;
53
+ defaultValue = _ref.defaultValue,
54
+ _ref$opensUp = _ref.opensUp,
55
+ opensUp = _ref$opensUp === void 0 ? false : _ref$opensUp;
54
56
  var dropdownId = uuid.v4();
55
57
  var _useState = React.useState(defaultValue || (options == null ? void 0 : (_options$ = options[0]) == null ? void 0 : _options$.value)),
56
58
  selectedValue = _useState[0],
@@ -101,7 +103,8 @@ var AsyncDropdown = function AsyncDropdown(_ref) {
101
103
  color: uiColors.white
102
104
  }))), React__default.createElement(DropdownOptions, {
103
105
  className: "rpgui-dropdown-imp",
104
- opened: opened
106
+ opened: opened,
107
+ opensUp: opensUp
105
108
  }, options == null ? void 0 : options.map(function (option) {
106
109
  return React__default.createElement("li", {
107
110
  key: option.id,
@@ -133,8 +136,12 @@ var DropdownSelect = /*#__PURE__*/styled__default.p.withConfig({
133
136
  var DropdownOptions = /*#__PURE__*/styled__default.ul.withConfig({
134
137
  displayName: "AsyncDropdown__DropdownOptions",
135
138
  componentId: "sc-lk409c-4"
136
- })(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
139
+ })(["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) {
137
140
  return props.opened ? 'block' : 'none';
141
+ }, function (props) {
142
+ return props.opensUp ? '100%' : 'auto';
143
+ }, function (props) {
144
+ return props.opensUp ? 'auto' : '100%';
138
145
  });
139
146
 
140
147
  function _extends() {