@star-insure/sdk 3.2.11 → 3.2.13

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@star-insure/sdk",
3
3
  "description": "The SDK for Star Insure client apps with shared helper functions and TypeScript definitions.",
4
4
  "author": "alexclark_nz",
5
- "version": "3.2.11",
5
+ "version": "3.2.13",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -30,7 +30,11 @@ export default function Action({ title, href, as = 'Link', target = '_self', typ
30
30
  // Check if Ctrl (Windows) or Cmd (Mac) key is pressed
31
31
  const isCtrlOrCmdPressed = (e.ctrlKey || e.metaKey);
32
32
 
33
- if (e.key === shortcutKey && isCtrlOrCmdPressed) {
33
+ // Check if the focus is on an input element or inside a form
34
+ const isInInput = e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement;
35
+ const isInForm = (e.target instanceof Element && e.target.closest('form'));
36
+
37
+ if (isCtrlOrCmdPressed && !isInInput && !isInForm && e.key === shortcutKey) {
34
38
  e.preventDefault();
35
39
  runAction();
36
40
  }
@@ -198,7 +198,7 @@ export function FilterItem({ filter }: { filter: FilterOption, path?: string })
198
198
  </div>
199
199
  }>
200
200
  <form
201
- className={`mt-2 flex max-h-[350px] min-w-[200px] flex-col gap-2 rounded-md border border-gray-300 bg-white p-4 shadow-lg ${ filter.type && filter.type === 'select' ? '' : 'overflow-y-scroll'}`}
201
+ className={`mt-2 flex max-h-[350px] min-w-[200px] max-w-[220px] flex-col gap-2 rounded-md border border-gray-300 bg-white p-4 shadow-lg ${ filter.type && filter.type === 'select' ? '' : 'overflow-y-scroll'}`}
202
202
  onSubmit={handleApply}
203
203
  >
204
204
  <div className="flex flex-col items-start gap-1">
@@ -213,7 +213,7 @@ export function FilterItem({ filter }: { filter: FilterOption, path?: string })
213
213
  checked={selected.includes(option.value.toString())}
214
214
  onChange={handleInput}
215
215
  />
216
- <label className="whitespace-nowrap" htmlFor={option.label}>
216
+ <label className="leading-tight" htmlFor={option.label}>
217
217
  {option.label}
218
218
  </label>
219
219
  </div>