@omer-x/tailwind-ui-kit 1.0.0-alpha.8 → 1.0.0-alpha.9

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.
@@ -3,6 +3,6 @@ import { ComponentProps } from 'react';
3
3
  import { Button } from '@base-ui/react/button';
4
4
 
5
5
  type PulseButtonProps = ComponentProps<typeof Button> & {};
6
- declare const PulseButton: ({ type, onClick, children, ...otherProps }: PulseButtonProps) => react.JSX.Element;
6
+ declare const PulseButton: ({ type, disabled, onClick, children, ...otherProps }: PulseButtonProps) => react.JSX.Element;
7
7
 
8
8
  export { PulseButton as default };
@@ -6,6 +6,7 @@ import { useFormStatus } from "react-dom";
6
6
  import { useRipples } from "../../hooks/useRipples.js";
7
7
  const PulseButton = ({
8
8
  type,
9
+ disabled,
9
10
  onClick,
10
11
  children,
11
12
  ...otherProps
@@ -14,14 +15,17 @@ const PulseButton = ({
14
15
  const [triggerRippleEffect, ripples] = useRipples();
15
16
  const submitting = type === "submit" && pending;
16
17
  const handleClick = (e) => {
17
- triggerRippleEffect(e);
18
18
  onClick?.(e);
19
+ if (!e.defaultPrevented) {
20
+ triggerRippleEffect(e);
21
+ }
19
22
  };
20
23
  return /* @__PURE__ */ jsxs(
21
24
  Button,
22
25
  {
23
26
  ...otherProps,
24
27
  type,
28
+ disabled: submitting || disabled,
25
29
  onClick: handleClick,
26
30
  "data-submitting": submitting ? "" : void 0,
27
31
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omer-x/tailwind-ui-kit",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-alpha.9",
4
4
  "description": "Tailwind CSS-based React component library for building user interfaces",
5
5
  "keywords": [
6
6
  "tailwind",