@lets-events/react 12.10.14 → 12.10.15
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.d.mts +15 -4
- package/dist/index.d.ts +15 -4
- package/package.json +1 -1
- package/src/components/Button/index.tsx +17 -8
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@12.10.
|
|
2
|
+
> @lets-events/react@12.10.15 build
|
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[32mCJS[39m [1mdist\index.js [22m[32m432.14 KB[39m
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 302ms
|
|
14
14
|
[32mESM[39m [1mdist\index.mjs [22m[32m416.46 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 303ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist\index.d.mts [22m[32m409.
|
|
19
|
-
[32mDTS[39m [1mdist\index.d.ts [22m[32m409.
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 5091ms
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m409.63 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m409.63 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -5,11 +5,10 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
6
6
|
import * as _stitches_react_types_css_util from '@stitches/react/types/css-util';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
|
-
import React__default, { ElementType, ReactNode, CSSProperties, ComponentProps, MouseEvent, HTMLAttributes, JSX } from 'react';
|
|
8
|
+
import React__default, { ElementType, ReactNode, CSSProperties, ComponentProps, ButtonHTMLAttributes, MouseEvent, HTMLAttributes, JSX } from 'react';
|
|
9
9
|
import * as _radix_ui_themes from '@radix-ui/themes';
|
|
10
10
|
import { TextField as TextField$1, RadioGroup as RadioGroup$1, CheckboxGroup as CheckboxGroup$1, DropdownMenu as DropdownMenu$1, AlertDialog, Switch as Switch$1 } from '@radix-ui/themes';
|
|
11
11
|
import { Colors } from '@lets-events/tokens';
|
|
12
|
-
import { VariantProps } from '@stitches/react';
|
|
13
12
|
import { MaskOptions, format, unformat } from '@react-input/mask';
|
|
14
13
|
import { Dialog } from 'radix-ui';
|
|
15
14
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -955,10 +954,22 @@ declare const ButtonStyled: _stitches_react_types_styled_component.StyledCompone
|
|
|
955
954
|
zIndex: "zIndices";
|
|
956
955
|
}, {}>>;
|
|
957
956
|
|
|
958
|
-
type
|
|
959
|
-
interface ButtonProps extends
|
|
957
|
+
type TextAlign = "center" | "left" | "right";
|
|
958
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
959
|
+
color?: "brand" | "purple" | "error" | "info" | "success" | "warning" | "neutral" | "white";
|
|
960
|
+
size?: "extraSmall" | "small" | "medium" | "large";
|
|
961
|
+
variant?: "text" | "toggle" | "contained" | "outlined" | "menuDropdownItem" | "menuDropdownItemDelete";
|
|
962
|
+
fontWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
963
|
+
textAlign?: TextAlign;
|
|
964
|
+
outlinedBgColor?: "neutral" | "transparent";
|
|
965
|
+
radii?: "full";
|
|
966
|
+
isCircle?: boolean;
|
|
960
967
|
asChild?: boolean;
|
|
961
968
|
loading?: boolean;
|
|
969
|
+
children?: ReactNode;
|
|
970
|
+
className?: string;
|
|
971
|
+
style?: CSSProperties;
|
|
972
|
+
css?: ComponentProps<typeof ButtonStyled>["css"];
|
|
962
973
|
}
|
|
963
974
|
declare function Button({ asChild, children, loading, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
964
975
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5,11 +5,10 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
|
|
6
6
|
import * as _stitches_react_types_css_util from '@stitches/react/types/css-util';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
|
-
import React__default, { ElementType, ReactNode, CSSProperties, ComponentProps, MouseEvent, HTMLAttributes, JSX } from 'react';
|
|
8
|
+
import React__default, { ElementType, ReactNode, CSSProperties, ComponentProps, ButtonHTMLAttributes, MouseEvent, HTMLAttributes, JSX } from 'react';
|
|
9
9
|
import * as _radix_ui_themes from '@radix-ui/themes';
|
|
10
10
|
import { TextField as TextField$1, RadioGroup as RadioGroup$1, CheckboxGroup as CheckboxGroup$1, DropdownMenu as DropdownMenu$1, AlertDialog, Switch as Switch$1 } from '@radix-ui/themes';
|
|
11
11
|
import { Colors } from '@lets-events/tokens';
|
|
12
|
-
import { VariantProps } from '@stitches/react';
|
|
13
12
|
import { MaskOptions, format, unformat } from '@react-input/mask';
|
|
14
13
|
import { Dialog } from 'radix-ui';
|
|
15
14
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -955,10 +954,22 @@ declare const ButtonStyled: _stitches_react_types_styled_component.StyledCompone
|
|
|
955
954
|
zIndex: "zIndices";
|
|
956
955
|
}, {}>>;
|
|
957
956
|
|
|
958
|
-
type
|
|
959
|
-
interface ButtonProps extends
|
|
957
|
+
type TextAlign = "center" | "left" | "right";
|
|
958
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
959
|
+
color?: "brand" | "purple" | "error" | "info" | "success" | "warning" | "neutral" | "white";
|
|
960
|
+
size?: "extraSmall" | "small" | "medium" | "large";
|
|
961
|
+
variant?: "text" | "toggle" | "contained" | "outlined" | "menuDropdownItem" | "menuDropdownItemDelete";
|
|
962
|
+
fontWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
963
|
+
textAlign?: TextAlign;
|
|
964
|
+
outlinedBgColor?: "neutral" | "transparent";
|
|
965
|
+
radii?: "full";
|
|
966
|
+
isCircle?: boolean;
|
|
960
967
|
asChild?: boolean;
|
|
961
968
|
loading?: boolean;
|
|
969
|
+
children?: ReactNode;
|
|
970
|
+
className?: string;
|
|
971
|
+
style?: CSSProperties;
|
|
972
|
+
css?: ComponentProps<typeof ButtonStyled>["css"];
|
|
962
973
|
}
|
|
963
974
|
declare function Button({ asChild, children, loading, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
964
975
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { ComponentProps, useMemo } from "react";
|
|
1
|
+
import { ButtonHTMLAttributes, ComponentProps, CSSProperties, ReactNode, useMemo } from "react";
|
|
2
2
|
import { ButtonStyled, SpinningDiv } from "./styledComponents";
|
|
3
3
|
import { Button as ButtonRadix } from "@radix-ui/themes";
|
|
4
|
-
import type { VariantProps } from "@stitches/react";
|
|
5
4
|
import Icon, { IconProps } from "../Icon";
|
|
6
5
|
import { Flex } from "../Flex";
|
|
7
6
|
|
|
8
|
-
type
|
|
7
|
+
type TextAlign = "center" | "left" | "right";
|
|
9
8
|
|
|
10
|
-
const getJustifyByTextAlign = (textAlign:
|
|
9
|
+
const getJustifyByTextAlign = (textAlign: TextAlign) => {
|
|
11
10
|
switch (textAlign) {
|
|
12
11
|
case "left":
|
|
13
12
|
return "start";
|
|
@@ -18,11 +17,21 @@ const getJustifyByTextAlign = (textAlign: ButtonVariantProps["textAlign"]) => {
|
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
|
|
21
|
-
export interface ButtonProps
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
21
|
+
color?: "brand" | "purple" | "error" | "info" | "success" | "warning" | "neutral" | "white";
|
|
22
|
+
size?: "extraSmall" | "small" | "medium" | "large";
|
|
23
|
+
variant?: "text" | "toggle" | "contained" | "outlined" | "menuDropdownItem" | "menuDropdownItemDelete";
|
|
24
|
+
fontWeight?: "regular" | "medium" | "semibold" | "bold";
|
|
25
|
+
textAlign?: TextAlign;
|
|
26
|
+
outlinedBgColor?: "neutral" | "transparent";
|
|
27
|
+
radii?: "full";
|
|
28
|
+
isCircle?: boolean;
|
|
24
29
|
asChild?: boolean;
|
|
25
30
|
loading?: boolean;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
css?: ComponentProps<typeof ButtonStyled>["css"];
|
|
26
35
|
}
|
|
27
36
|
|
|
28
37
|
export function Button({ asChild, children, loading, ...props }: ButtonProps) {
|
|
@@ -45,7 +54,7 @@ export function Button({ asChild, children, loading, ...props }: ButtonProps) {
|
|
|
45
54
|
}, [size]);
|
|
46
55
|
|
|
47
56
|
return (
|
|
48
|
-
<ButtonStyled as={Component} {...props} disabled={disabled || loading}>
|
|
57
|
+
<ButtonStyled as={Component} {...(props as ComponentProps<typeof ButtonStyled>)} disabled={disabled || loading}>
|
|
49
58
|
<div style={{ position: "relative" }}>
|
|
50
59
|
<Flex
|
|
51
60
|
justify={getJustifyByTextAlign(textAlign)}
|