@star-insure/sdk 4.3.0 → 4.3.2

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/sdk.esm.js CHANGED
@@ -2615,7 +2615,7 @@ function Dropdown(_ref) {
2615
2615
  }
2616
2616
 
2617
2617
  function FilterItem(_ref) {
2618
- var _filter$options, _filter$options2, _filter$options3, _selected$, _selected$2;
2618
+ var _filter$options, _filter$options2, _filter$options3, _selected$, _selected$2, _selected$3;
2619
2619
 
2620
2620
  var filter = _ref.filter;
2621
2621
 
@@ -2753,6 +2753,16 @@ function FilterItem(_ref) {
2753
2753
  }
2754
2754
  }
2755
2755
 
2756
+ function handleText(e) {
2757
+ var value = e.currentTarget.value;
2758
+
2759
+ if (value) {
2760
+ setSelected([value]);
2761
+ } else {
2762
+ setSelected([]);
2763
+ }
2764
+ }
2765
+
2756
2766
  function handleApply(e) {
2757
2767
  e.preventDefault();
2758
2768
  var search = new URLSearchParams(window.location.search); // Reset the page in the query
@@ -2925,6 +2935,15 @@ function FilterItem(_ref) {
2925
2935
  })
2926
2936
  });
2927
2937
  }
2938
+ })), filter.type === 'text' && React__default.createElement("div", {
2939
+ className: 'w-full'
2940
+ }, React__default.createElement("input", {
2941
+ type: "text",
2942
+ name: filter.name,
2943
+ placeholder: filter.label,
2944
+ value: (_selected$3 = selected[0]) != null ? _selected$3 : '',
2945
+ onChange: handleText,
2946
+ className: "!p-2 text-sm w-full"
2928
2947
  }))), React__default.createElement("div", {
2929
2948
  className: "bg-gray-100 border-t border-gray-200 flex items-center gap-2 p-4 bottom-0 sticky"
2930
2949
  }, React__default.createElement(Button, {