@lets-events/react 12.3.0 → 12.3.1
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 +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
- package/src/components/Button/index.tsx +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@12.3.
|
|
2
|
+
> @lets-events/react@12.3.1 build
|
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
[34mCLI[39m Target: es6
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
12
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m381.68 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 235ms
|
|
14
|
+
[32mCJS[39m [1mdist\index.js [22m[32m395.71 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 236ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 4578ms
|
|
18
18
|
[32mDTS[39m [1mdist\index.d.mts [22m[32m398.68 KB[39m
|
|
19
19
|
[32mDTS[39m [1mdist\index.d.ts [22m[32m398.68 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1862,7 +1862,7 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
|
1862
1862
|
function Button(_a) {
|
|
1863
1863
|
var _b = _a, { asChild, children, loading } = _b, props = __objRest(_b, ["asChild", "children", "loading"]);
|
|
1864
1864
|
const Component = asChild ? import_themes3.Button : "button";
|
|
1865
|
-
const { size } = props;
|
|
1865
|
+
const { size, disabled } = props;
|
|
1866
1866
|
const spinnerSize = (0, import_react2.useMemo)(() => {
|
|
1867
1867
|
switch (size) {
|
|
1868
1868
|
case "small":
|
|
@@ -1874,10 +1874,10 @@ function Button(_a) {
|
|
|
1874
1874
|
case "large":
|
|
1875
1875
|
return "xl";
|
|
1876
1876
|
default:
|
|
1877
|
-
return "
|
|
1877
|
+
return "md";
|
|
1878
1878
|
}
|
|
1879
1879
|
}, [size]);
|
|
1880
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ButtonStyled, __spreadProps(__spreadValues({ as: Component }, props), { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SpinningDiv, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "circle-notch", size: spinnerSize }) }) : children }));
|
|
1880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ButtonStyled, __spreadProps(__spreadValues({ as: Component, disabled: disabled || loading }, props), { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SpinningDiv, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "circle-notch", size: spinnerSize }) }) : children }));
|
|
1881
1881
|
}
|
|
1882
1882
|
|
|
1883
1883
|
// src/components/ButtonGroup.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -1746,7 +1746,7 @@ import { jsx as jsx3 } from "react/jsx-runtime";
|
|
|
1746
1746
|
function Button(_a) {
|
|
1747
1747
|
var _b = _a, { asChild, children, loading } = _b, props = __objRest(_b, ["asChild", "children", "loading"]);
|
|
1748
1748
|
const Component = asChild ? ButtonRadix2 : "button";
|
|
1749
|
-
const { size } = props;
|
|
1749
|
+
const { size, disabled } = props;
|
|
1750
1750
|
const spinnerSize = useMemo(() => {
|
|
1751
1751
|
switch (size) {
|
|
1752
1752
|
case "small":
|
|
@@ -1758,10 +1758,10 @@ function Button(_a) {
|
|
|
1758
1758
|
case "large":
|
|
1759
1759
|
return "xl";
|
|
1760
1760
|
default:
|
|
1761
|
-
return "
|
|
1761
|
+
return "md";
|
|
1762
1762
|
}
|
|
1763
1763
|
}, [size]);
|
|
1764
|
-
return /* @__PURE__ */ jsx3(ButtonStyled, __spreadProps(__spreadValues({ as: Component }, props), { children: loading ? /* @__PURE__ */ jsx3(SpinningDiv, { children: /* @__PURE__ */ jsx3(Icon_default, { name: "circle-notch", size: spinnerSize }) }) : children }));
|
|
1764
|
+
return /* @__PURE__ */ jsx3(ButtonStyled, __spreadProps(__spreadValues({ as: Component, disabled: disabled || loading }, props), { children: loading ? /* @__PURE__ */ jsx3(SpinningDiv, { children: /* @__PURE__ */ jsx3(Icon_default, { name: "circle-notch", size: spinnerSize }) }) : children }));
|
|
1765
1765
|
}
|
|
1766
1766
|
|
|
1767
1767
|
// src/components/ButtonGroup.tsx
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ export interface ButtonProps
|
|
|
14
14
|
|
|
15
15
|
export function Button({ asChild, children, loading, ...props }: ButtonProps) {
|
|
16
16
|
const Component = asChild ? ButtonRadix : "button";
|
|
17
|
-
const { size } = props;
|
|
17
|
+
const { size, disabled } = props;
|
|
18
18
|
|
|
19
19
|
const spinnerSize = useMemo((): IconProps["size"] => {
|
|
20
20
|
switch (size) {
|
|
@@ -27,12 +27,12 @@ export function Button({ asChild, children, loading, ...props }: ButtonProps) {
|
|
|
27
27
|
case "large":
|
|
28
28
|
return "xl";
|
|
29
29
|
default:
|
|
30
|
-
return "
|
|
30
|
+
return "md";
|
|
31
31
|
}
|
|
32
32
|
}, [size]);
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
|
-
<ButtonStyled as={Component} {...props}>
|
|
35
|
+
<ButtonStyled as={Component} disabled={disabled || loading} {...props}>
|
|
36
36
|
{loading ? (
|
|
37
37
|
<SpinningDiv>
|
|
38
38
|
<Icon name="circle-notch" size={spinnerSize} />
|