@rpg-engine/long-bow 0.8.40 → 0.8.41
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/long-bow.cjs.development.js +24 -6
- 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 +24 -6
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/shared/SearchHeader/SearchHeader.tsx +20 -10
package/dist/long-bow.esm.js
CHANGED
|
@@ -31035,17 +31035,23 @@ var SearchHeader = function SearchHeader(_ref) {
|
|
|
31035
31035
|
filterOptions = _ref.filterOptions,
|
|
31036
31036
|
className = _ref.className;
|
|
31037
31037
|
if (!searchOptions && !filterOptions) return null;
|
|
31038
|
+
var isMobile = isMobileOrTablet();
|
|
31039
|
+
var isSmallScreen = isMobile && window.innerWidth < 480;
|
|
31038
31040
|
return React.createElement(HeaderContainer$1, {
|
|
31039
31041
|
className: className
|
|
31040
|
-
}, React.createElement(HeaderContent,
|
|
31042
|
+
}, React.createElement(HeaderContent, {
|
|
31043
|
+
"$isSmallScreen": isSmallScreen
|
|
31044
|
+
}, searchOptions && React.createElement(SearchContainer$2, null, React.createElement(StyledSearchBar, {
|
|
31041
31045
|
value: searchOptions.value,
|
|
31042
31046
|
onChange: searchOptions.onChange,
|
|
31043
|
-
placeholder: searchOptions.placeholder || 'Search...',
|
|
31047
|
+
placeholder: isSmallScreen ? 'Search...' : searchOptions.placeholder || 'Search...',
|
|
31044
31048
|
rightElement: searchOptions.rightElement
|
|
31045
|
-
})), filterOptions && React.createElement(FilterContainer,
|
|
31049
|
+
})), filterOptions && React.createElement(FilterContainer, {
|
|
31050
|
+
"$isSmallScreen": isSmallScreen
|
|
31051
|
+
}, React.createElement(StyledDropdown, {
|
|
31046
31052
|
options: filterOptions.options,
|
|
31047
31053
|
onChange: filterOptions.onOptionChange,
|
|
31048
|
-
width:
|
|
31054
|
+
width: isSmallScreen ? '100%' : '200px'
|
|
31049
31055
|
}))));
|
|
31050
31056
|
};
|
|
31051
31057
|
var HeaderContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -31055,7 +31061,15 @@ var HeaderContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
31055
31061
|
var HeaderContent = /*#__PURE__*/styled.div.withConfig({
|
|
31056
31062
|
displayName: "SearchHeader__HeaderContent",
|
|
31057
31063
|
componentId: "sc-1xd17jb-1"
|
|
31058
|
-
})(["display:flex;justify-content:space-between;align-items:
|
|
31064
|
+
})(["display:flex;flex-direction:", ";justify-content:space-between;align-items:", ";gap:", ";background:rgba(0,0,0,0.2);padding:", ";border-radius:4px;"], function (props) {
|
|
31065
|
+
return props.$isSmallScreen ? 'column' : 'row';
|
|
31066
|
+
}, function (props) {
|
|
31067
|
+
return props.$isSmallScreen ? 'stretch' : 'center';
|
|
31068
|
+
}, function (props) {
|
|
31069
|
+
return props.$isSmallScreen ? '0.5rem' : '1rem';
|
|
31070
|
+
}, function (props) {
|
|
31071
|
+
return props.$isSmallScreen ? '0.5rem' : '1rem';
|
|
31072
|
+
});
|
|
31059
31073
|
var SearchContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
31060
31074
|
displayName: "SearchHeader__SearchContainer",
|
|
31061
31075
|
componentId: "sc-1xd17jb-2"
|
|
@@ -31063,7 +31077,11 @@ var SearchContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
31063
31077
|
var FilterContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31064
31078
|
displayName: "SearchHeader__FilterContainer",
|
|
31065
31079
|
componentId: "sc-1xd17jb-3"
|
|
31066
|
-
})(["display:flex;justify-content:
|
|
31080
|
+
})(["display:flex;justify-content:", ";width:", ";"], function (props) {
|
|
31081
|
+
return props.$isSmallScreen ? 'stretch' : 'flex-end';
|
|
31082
|
+
}, function (props) {
|
|
31083
|
+
return props.$isSmallScreen ? '100%' : 'auto';
|
|
31084
|
+
});
|
|
31067
31085
|
var StyledSearchBar = /*#__PURE__*/styled(SearchBar).withConfig({
|
|
31068
31086
|
displayName: "SearchHeader__StyledSearchBar",
|
|
31069
31087
|
componentId: "sc-1xd17jb-4"
|