@linzjs/lui 17.5.1 → 17.5.4
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/CHANGELOG.md +22 -0
- package/dist/assets/icons/balance_parcel.svg +1 -0
- package/dist/assets/icons/double_arrow_left.svg +1 -0
- package/dist/assets/icons/double_arrow_right.svg +1 -0
- package/dist/assets/icons/vector_sequence.svg +1 -0
- package/dist/assets/svg-content.tsx +24 -0
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +15 -1
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -169,6 +169,8 @@ iconMap['ic_attach_file'] = (React__default.createElement("svg", { viewBox: "0 0
|
|
|
169
169
|
React__default.createElement("path", { d: "m19.571 10.586-8.132 8.132a3.999 3.999 0 0 1-5.657 0 3.999 3.999 0 0 1 0-5.657l8.84-8.84a2.501 2.501 0 0 1 3.535 3.536l-7.425 7.425a1.003 1.003 0 0 1-1.414 0 1.003 1.003 0 0 1 0-1.414l6.717-6.718-1.06-1.06-6.718 6.717a2.501 2.501 0 0 0 3.536 3.536l7.425-7.425a3.999 3.999 0 0 0 0-5.657 3.999 3.999 0 0 0-5.657 0L4.72 12a5.497 5.497 0 0 0 0 7.778 5.497 5.497 0 0 0 7.779 0l8.132-8.131-1.06-1.061Z" })));
|
|
170
170
|
iconMap['ic_attachment'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
171
171
|
React__default.createElement("path", { d: "M2.016 12.023c0-1.531.531-2.836 1.594-3.914C4.673 7.03 5.97 6.492 7.501 6.492h10.5c1.094 0 2.032.398 2.813 1.195.781.797 1.172 1.742 1.172 2.836 0 1.094-.39 2.032-1.172 2.813-.781.781-1.719 1.172-2.813 1.172H9.517a2.472 2.472 0 0 1-1.781-.727c-.5-.485-.75-1.07-.75-1.758 0-.687.25-1.281.75-1.781s1.094-.75 1.781-.75h7.5v2.016H9.423c-.281 0-.422.164-.422.492 0 .328.14.492.422.492h8.578c.531 0 1-.195 1.406-.586.406-.39.609-.852.609-1.383s-.203-1-.609-1.406c-.406-.406-.875-.61-1.406-.61h-10.5c-.969 0-1.797.345-2.484 1.032a3.386 3.386 0 0 0-1.031 2.484c0 .969.344 1.789 1.031 2.46a3.425 3.425 0 0 0 2.484 1.009h9.516v2.016H7.501c-1.531 0-2.828-.531-3.891-1.594-1.063-1.063-1.594-2.36-1.594-3.891Z" })));
|
|
172
|
+
iconMap['ic_balance_parcel'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
173
|
+
React__default.createElement("path", { d: "M23 15h-2v2h2v-2Zm0-4h-2v2h2v-2Zm0 8h-2v2c1 0 2-1 2-2ZM15 3h-2v2h2V3Zm8 4h-2v2h2V7Zm-2-4v2h2c0-1-1-2-2-2ZM3 21h8v-6H1v4c0 1.1.9 2 2 2ZM3 7H1v2h2V7Zm12 12h-2v2h2v-2Zm4-16h-2v2h2V3Zm0 16h-2v2h2v-2ZM3 3C2 3 1 4 1 5h2V3Zm0 8H1v2h2v-2Zm8-8H9v2h2V3ZM7 3H5v2h2V3Z" })));
|
|
172
174
|
iconMap['ic_blocked'] = (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
173
175
|
React__default.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2ZM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9A7.902 7.902 0 0 1 4 12Zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1A7.902 7.902 0 0 1 20 12c0 4.42-3.58 8-8 8Z" })));
|
|
174
176
|
iconMap['ic_border_color'] = (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
@@ -203,6 +205,10 @@ iconMap['ic_delete_outline'] = (React__default.createElement("svg", { viewBox: "
|
|
|
203
205
|
React__default.createElement("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10ZM9 9h6c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H9c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1Zm6.5-5-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5Z" })));
|
|
204
206
|
iconMap['ic_delete_solid'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
205
207
|
React__default.createElement("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12ZM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4Z" })));
|
|
208
|
+
iconMap['ic_double_arrow_left'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
209
|
+
React__default.createElement("path", { d: "M18.29 17.29a.996.996 0 0 0 0-1.41L14.42 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L12.3 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01Z M11.7 17.29a.996.996 0 0 0 0-1.41L7.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L5.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01Z" })));
|
|
210
|
+
iconMap['ic_double_arrow_right'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
211
|
+
React__default.createElement("path", { d: "M5.7 6.71a.996.996 0 0 0 0 1.41L9.58 12 5.7 15.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L7.12 6.71c-.39-.39-1.03-.39-1.42 0Z M12.29 6.71a.996.996 0 0 0 0 1.41L16.17 12l-3.88 3.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L13.7 6.7c-.38-.38-1.02-.38-1.41.01Z" })));
|
|
206
212
|
iconMap['ic_drag_handle'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
207
213
|
React__default.createElement("path", { d: "M20 9H4v2h16V9ZM4 15h16v-2H4v2Z" })));
|
|
208
214
|
iconMap['ic_drag_indicator'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -371,6 +377,8 @@ iconMap['ic_unlink'] = (React__default.createElement("svg", { xmlns: "http://www
|
|
|
371
377
|
React__default.createElement("path", { d: "m14.39 11.065 1.61 1.61v-1.61h-1.61zm2.61-4h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.27-.77 2.37-1.87 2.84l1.4 1.4a4.986 4.986 0 0 0 2.37-4.24c0-2.76-2.24-5-5-5zM2 4.335l3.11 3.11A4.991 4.991 0 0 0 2 12.065c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07l2.07 2.07H8v2h2.73l2.27 2.27v1.73h1.73l4.01 4.01 1.41-1.41L3.41 2.925 2 4.335z" })));
|
|
372
378
|
iconMap['ic_upload'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
373
379
|
React__default.createElement("path", { d: "M5 4h14v2H5V4Zm0 10h4v6h6v-6h4l-7-7-7 7Zm8-2v6h-2v-6H9.83L12 9.83 14.17 12H13Z" })));
|
|
380
|
+
iconMap['ic_vector_sequence'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
381
|
+
React__default.createElement("path", { d: "M15 21h2v-2h-2v2Zm4 0h2v-2h-2v2ZM7 21h2v-2H7v2Zm4 0h2v-2h-2v2Zm8-4h2v-2h-2v2Zm0-4h2v-2h-2v2ZM3 5v15c0 .55.45 1 1 1s1-.45 1-1V6c0-.55.45-1 1-1h14c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.1 0-2 .9-2 2Zm16 4h2V7h-2v2Z" })));
|
|
374
382
|
iconMap['ic_view'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
375
383
|
React__default.createElement("path", { d: "M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4Zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5Zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3Z" })));
|
|
376
384
|
iconMap['ic_view_list'] = (React__default.createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -55882,6 +55890,10 @@ var LuiSearchInput = function (props) {
|
|
|
55882
55890
|
var _e = useState(false), isLoading = _e[0], setIsLoading = _e[1];
|
|
55883
55891
|
var inputRef = useRef(null);
|
|
55884
55892
|
var selectedRef = useRef(null);
|
|
55893
|
+
//clear result after search types changed
|
|
55894
|
+
useEffect(function () {
|
|
55895
|
+
setResults([]);
|
|
55896
|
+
}, [props.getOptions]);
|
|
55885
55897
|
function setInputValue(value) {
|
|
55886
55898
|
setTypedValue(props.inputTransformer ? props.inputTransformer(value) : value);
|
|
55887
55899
|
}
|
|
@@ -56008,8 +56020,9 @@ var LuiSearchInput = function (props) {
|
|
|
56008
56020
|
return (React__default.createElement("div", { className: "LuiSearchInput" },
|
|
56009
56021
|
React__default.createElement("span", { className: "LuiSearchInput-inputWrapper" },
|
|
56010
56022
|
searchIcon,
|
|
56011
|
-
React__default.createElement("input", { type: "text", className: clsx('LuiSearchInput-input'), ref: inputRef, value: typedValue, placeholder: props.placeholderText,
|
|
56023
|
+
React__default.createElement("input", { type: "text", className: clsx('LuiSearchInput-input'), ref: inputRef, value: typedValue, placeholder: props.placeholderText, "aria-label": "Search", onChange: function (e) { return setInputValue(e.target.value); }, onKeyDown: handleKeyDown, onFocus: function (e) {
|
|
56012
56024
|
e.target.select();
|
|
56025
|
+
retrieveResults(typedValue);
|
|
56013
56026
|
setHaveFocus(true);
|
|
56014
56027
|
},
|
|
56015
56028
|
// This timeout could be a little brittle but allows the menu to stay open long enough to click it
|
|
@@ -56020,6 +56033,7 @@ var LuiSearchInput = function (props) {
|
|
|
56020
56033
|
props.name &&
|
|
56021
56034
|
haveFocus &&
|
|
56022
56035
|
results.length === 0 &&
|
|
56036
|
+
!isLoading &&
|
|
56023
56037
|
noOptionsMessage(typedValue) && (React__default.createElement(React__default.Fragment, null,
|
|
56024
56038
|
React__default.createElement("hr", { className: "LuiSearchInput-resultSeparator" }),
|
|
56025
56039
|
React__default.createElement("div", { "data-testid": "no-result-msg", className: "LuiSearchInput-disclaimer" }, noOptionsMessage(typedValue)))),
|