@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 CHANGED
@@ -1,3 +1,25 @@
1
+ ## [17.5.4](https://github.com/linz/lui/compare/v17.5.3...v17.5.4) (2022-06-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * adding ic_double_arrow_left ic_double_arrow_right ([#697](https://github.com/linz/lui/issues/697)) ([6bc3ff2](https://github.com/linz/lui/commit/6bc3ff259f007a84b3b308635b73c87332a3e9eb))
7
+
8
+ ## [17.5.3](https://github.com/linz/lui/compare/v17.5.2...v17.5.3) (2022-06-13)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **LuiSearchInput:** trigger dataload when focused. ([#695](https://github.com/linz/lui/issues/695)) ([e87b3a9](https://github.com/linz/lui/commit/e87b3a9298a10d1b0bc2441c8e94f520e481167f))
14
+ * Adding balance parcel and vector sequence ([#693](https://github.com/linz/lui/issues/693)) ([c88f18b](https://github.com/linz/lui/commit/c88f18b9d74a806198287f9a3f418880ad7a0df3))
15
+
16
+ ## [17.5.2](https://github.com/linz/lui/compare/v17.5.1...v17.5.2) (2022-06-02)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * clear search input after search type changed. ([#692](https://github.com/linz/lui/issues/692)) ([9c4138c](https://github.com/linz/lui/commit/9c4138c335b92788cb8e3420fdcc45a6d3f80658))
22
+
1
23
  ## [17.5.1](https://github.com/linz/lui/compare/v17.5.0...v17.5.1) (2022-06-01)
2
24
 
3
25
 
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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" fill="#000"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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" fill="#000"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><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" fill="#000"/></svg>
@@ -117,6 +117,12 @@ iconMap['ic_attachment'] = (
117
117
  </svg>
118
118
  );
119
119
 
120
+ iconMap['ic_balance_parcel'] = (
121
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
122
+ <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" />
123
+ </svg>
124
+ );
125
+
120
126
  iconMap['ic_blocked'] = (
121
127
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
122
128
  <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" />
@@ -215,6 +221,18 @@ iconMap['ic_delete_solid'] = (
215
221
  </svg>
216
222
  );
217
223
 
224
+ iconMap['ic_double_arrow_left'] = (
225
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
226
+ <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" />
227
+ </svg>
228
+ );
229
+
230
+ iconMap['ic_double_arrow_right'] = (
231
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
232
+ <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" />
233
+ </svg>
234
+ );
235
+
218
236
  iconMap['ic_drag_handle'] = (
219
237
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
220
238
  <path d="M20 9H4v2h16V9ZM4 15h16v-2H4v2Z" />
@@ -703,6 +721,12 @@ iconMap['ic_upload'] = (
703
721
  </svg>
704
722
  );
705
723
 
724
+ iconMap['ic_vector_sequence'] = (
725
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
726
+ <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" />
727
+ </svg>
728
+ );
729
+
706
730
  iconMap['ic_view'] = (
707
731
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
708
732
  <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" />
package/dist/index.js CHANGED
@@ -197,6 +197,8 @@ iconMap['ic_attach_file'] = (React__default["default"].createElement("svg", { vi
197
197
  React__default["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" })));
198
198
  iconMap['ic_attachment'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
199
199
  React__default["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" })));
200
+ iconMap['ic_balance_parcel'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
201
+ React__default["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" })));
200
202
  iconMap['ic_blocked'] = (React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
201
203
  React__default["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" })));
202
204
  iconMap['ic_border_color'] = (React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
@@ -231,6 +233,10 @@ iconMap['ic_delete_outline'] = (React__default["default"].createElement("svg", {
231
233
  React__default["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" })));
232
234
  iconMap['ic_delete_solid'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
233
235
  React__default["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" })));
236
+ iconMap['ic_double_arrow_left'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
237
+ React__default["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" })));
238
+ iconMap['ic_double_arrow_right'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
239
+ React__default["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" })));
234
240
  iconMap['ic_drag_handle'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
235
241
  React__default["default"].createElement("path", { d: "M20 9H4v2h16V9ZM4 15h16v-2H4v2Z" })));
236
242
  iconMap['ic_drag_indicator'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
@@ -399,6 +405,8 @@ iconMap['ic_unlink'] = (React__default["default"].createElement("svg", { xmlns:
399
405
  React__default["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" })));
400
406
  iconMap['ic_upload'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
401
407
  React__default["default"].createElement("path", { d: "M5 4h14v2H5V4Zm0 10h4v6h6v-6h4l-7-7-7 7Zm8-2v6h-2v-6H9.83L12 9.83 14.17 12H13Z" })));
408
+ iconMap['ic_vector_sequence'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
409
+ React__default["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" })));
402
410
  iconMap['ic_view'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
403
411
  React__default["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" })));
404
412
  iconMap['ic_view_list'] = (React__default["default"].createElement("svg", { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
@@ -55910,6 +55918,10 @@ var LuiSearchInput = function (props) {
55910
55918
  var _e = React.useState(false), isLoading = _e[0], setIsLoading = _e[1];
55911
55919
  var inputRef = React.useRef(null);
55912
55920
  var selectedRef = React.useRef(null);
55921
+ //clear result after search types changed
55922
+ React.useEffect(function () {
55923
+ setResults([]);
55924
+ }, [props.getOptions]);
55913
55925
  function setInputValue(value) {
55914
55926
  setTypedValue(props.inputTransformer ? props.inputTransformer(value) : value);
55915
55927
  }
@@ -56036,8 +56048,9 @@ var LuiSearchInput = function (props) {
56036
56048
  return (React__default["default"].createElement("div", { className: "LuiSearchInput" },
56037
56049
  React__default["default"].createElement("span", { className: "LuiSearchInput-inputWrapper" },
56038
56050
  searchIcon,
56039
- React__default["default"].createElement("input", { type: "text", className: clsx('LuiSearchInput-input'), ref: inputRef, value: typedValue, placeholder: props.placeholderText, autoFocus: true, "aria-label": "Search", onChange: function (e) { return setInputValue(e.target.value); }, onKeyDown: handleKeyDown, onFocus: function (e) {
56051
+ React__default["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) {
56040
56052
  e.target.select();
56053
+ retrieveResults(typedValue);
56041
56054
  setHaveFocus(true);
56042
56055
  },
56043
56056
  // This timeout could be a little brittle but allows the menu to stay open long enough to click it
@@ -56048,6 +56061,7 @@ var LuiSearchInput = function (props) {
56048
56061
  props.name &&
56049
56062
  haveFocus &&
56050
56063
  results.length === 0 &&
56064
+ !isLoading &&
56051
56065
  noOptionsMessage(typedValue) && (React__default["default"].createElement(React__default["default"].Fragment, null,
56052
56066
  React__default["default"].createElement("hr", { className: "LuiSearchInput-resultSeparator" }),
56053
56067
  React__default["default"].createElement("div", { "data-testid": "no-result-msg", className: "LuiSearchInput-disclaimer" }, noOptionsMessage(typedValue)))),