@vygruppen/spor-react 11.1.2 → 11.1.3

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@11.1.2 build
2
+ > @vygruppen/spor-react@11.1.3 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,10 +9,10 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
- CJS dist/index.js 448.88 KB
13
- CJS ⚡️ Build success in 2008ms
14
- ESM dist/index.mjs 429.38 KB
15
- ESM ⚡️ Build success in 2009ms
16
- DTS ⚡️ Build success in 16043ms
12
+ CJS dist/index.js 449.00 KB
13
+ CJS ⚡️ Build success in 1957ms
14
+ ESM dist/index.mjs 429.50 KB
15
+ ESM ⚡️ Build success in 1959ms
16
+ DTS ⚡️ Build success in 16234ms
17
17
  DTS dist/index.d.ts 343.31 KB
18
18
  DTS dist/index.d.mts 343.31 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 11.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - edb4b4d: Disable pointer-events on input labels
8
+
3
9
  ## 11.1.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1505,7 +1505,7 @@ var Input = react.forwardRef(
1505
1505
  overflow: "hidden",
1506
1506
  placeholder: " "
1507
1507
  }
1508
- ), /* @__PURE__ */ React86__namespace.default.createElement(react.FormLabel, { htmlFor: inputId, id: labelId }, label), rightIcon && /* @__PURE__ */ React86__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
1508
+ ), /* @__PURE__ */ React86__namespace.default.createElement(react.FormLabel, { htmlFor: inputId, id: labelId, pointerEvents: "none" }, label), rightIcon && /* @__PURE__ */ React86__namespace.default.createElement(react.InputRightElement, { pointerEvents: "none" }, rightIcon));
1509
1509
  }
1510
1510
  );
1511
1511
  var InputLeftElement2 = react.forwardRef(
@@ -1731,7 +1731,7 @@ var PasswordInput = react.forwardRef(
1731
1731
  const formControlProps = react.useFormControlContext();
1732
1732
  const autoGeneratedId = `password-input-${React86.useId()}`;
1733
1733
  const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
1734
- return /* @__PURE__ */ React86__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React86__namespace.default.createElement(InputLeftElement2, null, leftIcon), /* @__PURE__ */ React86__namespace.default.createElement(
1734
+ return /* @__PURE__ */ React86__namespace.default.createElement(react.InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React86__namespace.default.createElement(InputLeftElement2, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React86__namespace.default.createElement(
1735
1735
  react.Input,
1736
1736
  {
1737
1737
  ...props,
@@ -1900,7 +1900,7 @@ var SearchInput = react.forwardRef(
1900
1900
  const autoGeneratedId = React86.useId();
1901
1901
  const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
1902
1902
  const { outerProps, innerProps } = getOuterProps(props);
1903
- return /* @__PURE__ */ React86__namespace.default.createElement(react.InputGroup, { position: "relative", ...outerProps }, /* @__PURE__ */ React86__namespace.default.createElement(InputLeftElement2, null, /* @__PURE__ */ React86__namespace.default.createElement(sporIconReact.SearchOutline24Icon, null)), /* @__PURE__ */ React86__namespace.default.createElement(
1903
+ return /* @__PURE__ */ React86__namespace.default.createElement(react.InputGroup, { position: "relative", ...outerProps }, /* @__PURE__ */ React86__namespace.default.createElement(InputLeftElement2, { pointerEvents: "none" }, /* @__PURE__ */ React86__namespace.default.createElement(sporIconReact.SearchOutline24Icon, null)), /* @__PURE__ */ React86__namespace.default.createElement(
1904
1904
  react.Input,
1905
1905
  {
1906
1906
  paddingLeft: 7,
@@ -1992,7 +1992,15 @@ var Textarea = react.forwardRef((props, ref) => {
1992
1992
  const formControlProps = react.useFormControlContext();
1993
1993
  const fallbackId = `textarea-${React86.useId()}`;
1994
1994
  const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
1995
- return /* @__PURE__ */ React86__namespace.default.createElement(react.InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React86__namespace.default.createElement(react.Textarea, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React86__namespace.default.createElement(react.FormLabel, { htmlFor: inputId, id: `${inputId}-label` }, label));
1995
+ return /* @__PURE__ */ React86__namespace.default.createElement(react.InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React86__namespace.default.createElement(react.Textarea, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React86__namespace.default.createElement(
1996
+ react.FormLabel,
1997
+ {
1998
+ htmlFor: inputId,
1999
+ id: `${inputId}-label`,
2000
+ pointerEvents: "none"
2001
+ },
2002
+ label
2003
+ ));
1996
2004
  });
1997
2005
  function getSpacingProps(props) {
1998
2006
  const {
package/dist/index.mjs CHANGED
@@ -1485,7 +1485,7 @@ var Input = forwardRef(
1485
1485
  overflow: "hidden",
1486
1486
  placeholder: " "
1487
1487
  }
1488
- ), /* @__PURE__ */ React86__default.createElement(FormLabel$1, { htmlFor: inputId, id: labelId }, label), rightIcon && /* @__PURE__ */ React86__default.createElement(InputRightElement, { pointerEvents: "none" }, rightIcon));
1488
+ ), /* @__PURE__ */ React86__default.createElement(FormLabel$1, { htmlFor: inputId, id: labelId, pointerEvents: "none" }, label), rightIcon && /* @__PURE__ */ React86__default.createElement(InputRightElement, { pointerEvents: "none" }, rightIcon));
1489
1489
  }
1490
1490
  );
1491
1491
  var InputLeftElement2 = forwardRef(
@@ -1711,7 +1711,7 @@ var PasswordInput = forwardRef(
1711
1711
  const formControlProps = useFormControlContext();
1712
1712
  const autoGeneratedId = `password-input-${useId()}`;
1713
1713
  const inputId = id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
1714
- return /* @__PURE__ */ React86__default.createElement(InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React86__default.createElement(InputLeftElement2, null, leftIcon), /* @__PURE__ */ React86__default.createElement(
1714
+ return /* @__PURE__ */ React86__default.createElement(InputGroup, { position: "relative" }, leftIcon && /* @__PURE__ */ React86__default.createElement(InputLeftElement2, { pointerEvents: "none" }, leftIcon), /* @__PURE__ */ React86__default.createElement(
1715
1715
  Input$1,
1716
1716
  {
1717
1717
  ...props,
@@ -1880,7 +1880,7 @@ var SearchInput = forwardRef(
1880
1880
  const autoGeneratedId = useId();
1881
1881
  const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? autoGeneratedId;
1882
1882
  const { outerProps, innerProps } = getOuterProps(props);
1883
- return /* @__PURE__ */ React86__default.createElement(InputGroup, { position: "relative", ...outerProps }, /* @__PURE__ */ React86__default.createElement(InputLeftElement2, null, /* @__PURE__ */ React86__default.createElement(SearchOutline24Icon, null)), /* @__PURE__ */ React86__default.createElement(
1883
+ return /* @__PURE__ */ React86__default.createElement(InputGroup, { position: "relative", ...outerProps }, /* @__PURE__ */ React86__default.createElement(InputLeftElement2, { pointerEvents: "none" }, /* @__PURE__ */ React86__default.createElement(SearchOutline24Icon, null)), /* @__PURE__ */ React86__default.createElement(
1884
1884
  Input$1,
1885
1885
  {
1886
1886
  paddingLeft: 7,
@@ -1972,7 +1972,15 @@ var Textarea = forwardRef((props, ref) => {
1972
1972
  const formControlProps = useFormControlContext();
1973
1973
  const fallbackId = `textarea-${useId()}`;
1974
1974
  const inputId = props.id ?? (formControlProps == null ? void 0 : formControlProps.id) ?? fallbackId;
1975
- return /* @__PURE__ */ React86__default.createElement(InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React86__default.createElement(Textarea$1, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React86__default.createElement(FormLabel$1, { htmlFor: inputId, id: `${inputId}-label` }, label));
1975
+ return /* @__PURE__ */ React86__default.createElement(InputGroup, { position: "relative", ...spacingProps }, /* @__PURE__ */ React86__default.createElement(Textarea$1, { ...rest, id: inputId, ref, placeholder: " " }), label && /* @__PURE__ */ React86__default.createElement(
1976
+ FormLabel$1,
1977
+ {
1978
+ htmlFor: inputId,
1979
+ id: `${inputId}-label`,
1980
+ pointerEvents: "none"
1981
+ },
1982
+ label
1983
+ ));
1976
1984
  });
1977
1985
  function getSpacingProps(props) {
1978
1986
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "11.1.2",
3
+ "version": "11.1.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -61,7 +61,7 @@ export const Input = forwardRef<InputProps, "input">(
61
61
  overflow="hidden"
62
62
  placeholder=" " // This is needed to make the label work as expected
63
63
  />
64
- <FormLabel htmlFor={inputId} id={labelId}>
64
+ <FormLabel htmlFor={inputId} id={labelId} pointerEvents="none">
65
65
  {label}
66
66
  </FormLabel>
67
67
  {rightIcon && (
@@ -25,7 +25,9 @@ export const PasswordInput = forwardRef<PasswordInputProps, "input">(
25
25
  const inputId = id ?? formControlProps?.id ?? autoGeneratedId;
26
26
  return (
27
27
  <InputGroup position="relative">
28
- {leftIcon && <InputLeftElement>{leftIcon}</InputLeftElement>}
28
+ {leftIcon && (
29
+ <InputLeftElement pointerEvents="none">{leftIcon}</InputLeftElement>
30
+ )}
29
31
  <ChakraInput
30
32
  {...props}
31
33
  id={inputId}
@@ -39,7 +39,7 @@ export const SearchInput = forwardRef<SearchInputProps, "input">(
39
39
 
40
40
  return (
41
41
  <InputGroup position="relative" {...outerProps}>
42
- <InputLeftElement>
42
+ <InputLeftElement pointerEvents="none">
43
43
  <SearchOutline24Icon />
44
44
  </InputLeftElement>
45
45
  <ChakraInput
@@ -35,7 +35,11 @@ export const Textarea = forwardRef<TextareaProps, "textarea">((props, ref) => {
35
35
  <InputGroup position="relative" {...spacingProps}>
36
36
  <ChakraTextarea {...rest} id={inputId} ref={ref} placeholder=" " />
37
37
  {label && (
38
- <FormLabel htmlFor={inputId} id={`${inputId}-label`}>
38
+ <FormLabel
39
+ htmlFor={inputId}
40
+ id={`${inputId}-label`}
41
+ pointerEvents="none"
42
+ >
39
43
  {label}
40
44
  </FormLabel>
41
45
  )}