@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @lets-events/react@12.10.14 build
2
+ > @lets-events/react@12.10.15 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -10,10 +10,10 @@
10
10
  ESM Build start
11
11
  CJS Build start
12
12
  CJS dist\index.js 432.14 KB
13
- CJS ⚡️ Build success in 266ms
13
+ CJS ⚡️ Build success in 302ms
14
14
  ESM dist\index.mjs 416.46 KB
15
- ESM ⚡️ Build success in 267ms
15
+ ESM ⚡️ Build success in 303ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 5207ms
18
- DTS dist\index.d.mts 409.13 KB
19
- DTS dist\index.d.ts 409.13 KB
17
+ DTS ⚡️ Build success in 5091ms
18
+ DTS dist\index.d.mts 409.63 KB
19
+ DTS dist\index.d.ts 409.63 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.10.15
4
+
5
+ ### Patch Changes
6
+
7
+ - fix button props
8
+
3
9
  ## 12.10.14
4
10
 
5
11
  ### Patch Changes
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 ButtonVariantProps = VariantProps<typeof ButtonStyled>;
959
- interface ButtonProps extends ComponentProps<typeof ButtonStyled>, ButtonVariantProps {
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 ButtonVariantProps = VariantProps<typeof ButtonStyled>;
959
- interface ButtonProps extends ComponentProps<typeof ButtonStyled>, ButtonVariantProps {
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.10.14",
3
+ "version": "12.10.15",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -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 ButtonVariantProps = VariantProps<typeof ButtonStyled>;
7
+ type TextAlign = "center" | "left" | "right";
9
8
 
10
- const getJustifyByTextAlign = (textAlign: ButtonVariantProps["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
- extends ComponentProps<typeof ButtonStyled>,
23
- ButtonVariantProps {
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)}