@mailstep/design-system 0.8.39 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.8.39",
3
+ "version": "0.8.41",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -16,11 +16,12 @@
16
16
  "build:win": "tsdown && tsc --emitDeclarationOnly && copy package.json build && copy README.md build",
17
17
  "build-storybook": "storybook build",
18
18
  "deploy": "npm run build && npm publish ./build",
19
+ "deploy:beta": "npm run build && npm publish ./build --tag beta",
19
20
  "deploy:win": "npm run build:win && npm publish ./build",
20
21
  "dev": "yarn storybook",
21
22
  "test": "echo \"The tests are still waiting to be written, but it seems like they're really good at procrastinating!\"",
22
23
  "lint": "eslint ./packages/ui/**/*.{ts,tsx}",
23
- "prepare": "husky install"
24
+ "prepare": "husky"
24
25
  },
25
26
  "lint-staged": {
26
27
  "*.{js,ts,tsx}": "yarn eslint --fix"
@@ -39,7 +39,11 @@ const Input = ({ appearance = "primary", type, name, label, value, icon, variant
39
39
  ]);
40
40
  const handleBlur = useCallback((event) => {
41
41
  onBlur?.(event);
42
- if (forceFocus && (event.relatedTarget?.tagName?.toLowerCase() !== "input" || !allowedInputTypes.includes(event.relatedTarget?.type?.toLowerCase()))) event.target?.focus();
42
+ if (forceFocus) {
43
+ const relatedTag = event.relatedTarget?.tagName?.toLowerCase();
44
+ const relatedType = event.relatedTarget?.type?.toLowerCase();
45
+ if (!(relatedTag === "input" && allowedInputTypes.includes(relatedType)) && !(relatedTag === "textarea")) event.target?.focus();
46
+ }
43
47
  }, [forceFocus, onBlur]);
44
48
  const handleKeyDown = useCallback((event) => {
45
49
  if (event.key === "Enter") onEnter?.();