@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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +6 -0
- package/dist/index.js +12 -4
- package/dist/index.mjs +12 -4
- package/package.json +1 -1
- package/src/input/Input.tsx +1 -1
- package/src/input/PasswordInput.tsx +3 -1
- package/src/input/SearchInput.tsx +1 -1
- package/src/input/Textarea.tsx +5 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@11.1.
|
2
|
+
> @vygruppen/spor-react@11.1.3 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -9,10 +9,10 @@
|
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
11
|
[34mDTS[39m Build start
|
12
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
14
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m429.
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
12
|
+
[32mCJS[39m [1mdist/index.js [22m[32m449.00 KB[39m
|
13
|
+
[32mCJS[39m ⚡️ Build success in 1957ms
|
14
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m429.50 KB[39m
|
15
|
+
[32mESM[39m ⚡️ Build success in 1959ms
|
16
|
+
[32mDTS[39m ⚡️ Build success in 16234ms
|
17
17
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m343.31 KB[39m
|
18
18
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m343.31 KB[39m
|
package/CHANGELOG.md
CHANGED
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,
|
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,
|
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(
|
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,
|
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,
|
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(
|
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
package/src/input/Input.tsx
CHANGED
@@ -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 &&
|
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
|
package/src/input/Textarea.tsx
CHANGED
@@ -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
|
38
|
+
<FormLabel
|
39
|
+
htmlFor={inputId}
|
40
|
+
id={`${inputId}-label`}
|
41
|
+
pointerEvents="none"
|
42
|
+
>
|
39
43
|
{label}
|
40
44
|
</FormLabel>
|
41
45
|
)}
|