@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.
- package/dist/components/AsyncDropdown.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +10 -3
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +10 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AsyncDropdown.tsx +14 -1
package/dist/long-bow.esm.js
CHANGED
|
@@ -42,7 +42,9 @@ var AsyncDropdown = function AsyncDropdown(_ref) {
|
|
|
42
42
|
var options = _ref.options,
|
|
43
43
|
width = _ref.width,
|
|
44
44
|
onChange = _ref.onChange,
|
|
45
|
-
defaultValue = _ref.defaultValue
|
|
45
|
+
defaultValue = _ref.defaultValue,
|
|
46
|
+
_ref$opensUp = _ref.opensUp,
|
|
47
|
+
opensUp = _ref$opensUp === void 0 ? false : _ref$opensUp;
|
|
46
48
|
var dropdownId = v4();
|
|
47
49
|
var _useState = useState(defaultValue || (options == null ? void 0 : (_options$ = options[0]) == null ? void 0 : _options$.value)),
|
|
48
50
|
selectedValue = _useState[0],
|
|
@@ -93,7 +95,8 @@ var AsyncDropdown = function AsyncDropdown(_ref) {
|
|
|
93
95
|
color: uiColors.white
|
|
94
96
|
}))), React.createElement(DropdownOptions, {
|
|
95
97
|
className: "rpgui-dropdown-imp",
|
|
96
|
-
opened: opened
|
|
98
|
+
opened: opened,
|
|
99
|
+
opensUp: opensUp
|
|
97
100
|
}, options == null ? void 0 : options.map(function (option) {
|
|
98
101
|
return React.createElement("li", {
|
|
99
102
|
key: option.id,
|
|
@@ -125,8 +128,12 @@ var DropdownSelect = /*#__PURE__*/styled.p.withConfig({
|
|
|
125
128
|
var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
126
129
|
displayName: "AsyncDropdown__DropdownOptions",
|
|
127
130
|
componentId: "sc-lk409c-4"
|
|
128
|
-
})(["position:absolute;width:100%;max-height:300px;overflow-y:auto;display:", ";box-sizing:border-box;@media (max-width:768px){padding:8px 0;}"], function (props) {
|
|
131
|
+
})(["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) {
|
|
129
132
|
return props.opened ? 'block' : 'none';
|
|
133
|
+
}, function (props) {
|
|
134
|
+
return props.opensUp ? '100%' : 'auto';
|
|
135
|
+
}, function (props) {
|
|
136
|
+
return props.opensUp ? 'auto' : '100%';
|
|
130
137
|
});
|
|
131
138
|
|
|
132
139
|
function _extends() {
|