@omer-x/tailwind-ui-kit 1.0.0-alpha.17 → 1.0.0-alpha.19

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.
Files changed (67) hide show
  1. package/MIGRATION.md +164 -0
  2. package/README.md +390 -0
  3. package/dist/components/button/BaseButton.d.ts +27 -11
  4. package/dist/components/button/BaseButton.js +57 -51
  5. package/dist/components/button/index.d.ts +2 -4
  6. package/dist/components/button/index.js +1 -4
  7. package/dist/components/dialog/AnimatedPopup.d.ts +3 -6
  8. package/dist/components/dialog/AnimatedPopup.js +6 -31
  9. package/dist/components/dialog/DialogBackdrop.d.ts +3 -6
  10. package/dist/components/dialog/DialogBackdrop.js +6 -22
  11. package/dist/components/dialog/DialogTitle.d.ts +3 -6
  12. package/dist/components/dialog/DialogTitle.js +6 -15
  13. package/dist/components/dialog/index.d.ts +4 -5
  14. package/dist/components/dialog/index.js +4 -8
  15. package/dist/components/elements/JustAnchor.d.ts +3 -6
  16. package/dist/components/elements/JustAnchor.js +8 -13
  17. package/dist/components/elements/JustButton.d.ts +3 -6
  18. package/dist/components/elements/JustButton.js +8 -13
  19. package/dist/components/elements/JustDiv.d.ts +3 -6
  20. package/dist/components/elements/JustDiv.js +8 -13
  21. package/dist/components/elements/JustInput.d.ts +3 -6
  22. package/dist/components/elements/JustInput.js +8 -13
  23. package/dist/components/form/BaseForm.d.ts +12 -15
  24. package/dist/components/form/BaseForm.js +72 -70
  25. package/dist/components/form/BaseFormField.d.ts +12 -19
  26. package/dist/components/form/BaseFormField.js +29 -24
  27. package/dist/components/form/BaseInput.d.ts +5 -9
  28. package/dist/components/form/BaseInput.js +20 -31
  29. package/dist/components/form/BaseSwitch.d.ts +6 -9
  30. package/dist/components/form/BaseSwitch.js +18 -51
  31. package/dist/components/form/ClientSideError.d.ts +9 -0
  32. package/dist/components/form/ClientSideError.js +39 -0
  33. package/dist/components/form/FieldRoot.d.ts +6 -9
  34. package/dist/components/form/FieldRoot.js +16 -18
  35. package/dist/components/form/FormContext.d.ts +26 -9
  36. package/dist/components/form/FormContext.js +9 -7
  37. package/dist/components/form/ServerSideError.d.ts +6 -10
  38. package/dist/components/form/ServerSideError.js +10 -14
  39. package/dist/components/form/index.d.ts +7 -11
  40. package/dist/components/form/index.js +6 -10
  41. package/dist/components/form/useFormMessages.d.ts +10 -0
  42. package/dist/components/form/useFormMessages.js +16 -0
  43. package/dist/components/layout/Container.d.ts +5 -8
  44. package/dist/components/layout/Container.js +8 -10
  45. package/dist/components/layout/index.d.ts +2 -2
  46. package/dist/components/layout/index.js +1 -4
  47. package/dist/components/page/Pagination.d.ts +11 -15
  48. package/dist/components/page/Pagination.js +60 -48
  49. package/dist/components/page/index.d.ts +2 -5
  50. package/dist/components/page/index.js +1 -4
  51. package/dist/components/table/Tdx.d.ts +5 -8
  52. package/dist/components/table/Tdx.js +13 -9
  53. package/dist/components/table/index.d.ts +2 -2
  54. package/dist/components/table/index.js +1 -4
  55. package/dist/hooks/useRipples.d.ts +2 -5
  56. package/dist/hooks/useRipples.js +46 -33
  57. package/dist/styles/ripple.module.css +1 -0
  58. package/dist/utils/cn.d.ts +6 -5
  59. package/dist/utils/cn.js +8 -6
  60. package/dist/utils/dirty-form.d.ts +1 -3
  61. package/dist/utils/dirty-form.js +24 -39
  62. package/dist/utils/index.d.ts +2 -2
  63. package/dist/utils/index.js +1 -4
  64. package/package.json +27 -24
  65. package/dist/components/button/PulseButton.d.ts +0 -8
  66. package/dist/components/button/PulseButton.js +0 -41
  67. package/dist/styles/ripple.module.d.ts +0 -2
@@ -1,51 +1,63 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import {} from "react";
1
+ import "react";
3
2
  import JustAnchor from "../elements/JustAnchor.js";
4
3
  import JustButton from "../elements/JustButton.js";
5
- const Pagination = ({
6
- totalItems,
7
- itemsPerPage,
8
- currentPage,
9
- queryParams,
10
- renderButton,
11
- renderLink
12
- }) => {
13
- const totalPages = Math.ceil(totalItems / itemsPerPage);
14
- const buildHref = (page) => {
15
- const searchParams = new URLSearchParams();
16
- for (const [key, value] of Object.entries(queryParams)) {
17
- searchParams.append(key, `${value}`);
18
- }
19
- if (page === 1) {
20
- searchParams.delete("page");
21
- } else {
22
- searchParams.set("page", page.toString());
23
- }
24
- return `?${searchParams}`;
25
- };
26
- const Item = (props) => {
27
- if (props.active || props.disabled || typeof props.page === "undefined") {
28
- return /* @__PURE__ */ jsx(JustButton, { render: renderButton, disabled: true, children: /* @__PURE__ */ jsx(Fragment, { children: props.children || props.page }) });
29
- }
30
- return /* @__PURE__ */ jsx(JustAnchor, { render: renderLink, href: buildHref(props.page), children: /* @__PURE__ */ jsx(Fragment, { children: props.children || props.page }) });
31
- };
32
- return /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
33
- /* @__PURE__ */ jsx(Item, { page: currentPage - 1, disabled: currentPage <= 1, children: "\xAB" }),
34
- currentPage > 3 && /* @__PURE__ */ jsx(Item, { page: 1 }),
35
- currentPage === 5 && /* @__PURE__ */ jsx(Item, { page: 2 }),
36
- currentPage > 5 && /* @__PURE__ */ jsx(Item, { disabled: true, children: "\u2026" }),
37
- currentPage > 2 && /* @__PURE__ */ jsx(Item, { page: currentPage - 2 }),
38
- currentPage > 1 && /* @__PURE__ */ jsx(Item, { page: currentPage - 1 }),
39
- /* @__PURE__ */ jsx(Item, { active: true, children: currentPage }),
40
- currentPage <= totalPages - 1 && /* @__PURE__ */ jsx(Item, { page: currentPage + 1 }),
41
- currentPage <= totalPages - 2 && /* @__PURE__ */ jsx(Item, { page: currentPage + 2 }),
42
- currentPage <= totalPages - 5 && /* @__PURE__ */ jsx(Item, { disabled: true, children: "\u2026" }),
43
- currentPage === totalPages - 4 && /* @__PURE__ */ jsx(Item, { page: totalPages - 1 }),
44
- currentPage <= totalPages - 3 && /* @__PURE__ */ jsx(Item, { page: totalPages }),
45
- /* @__PURE__ */ jsx(Item, { page: currentPage + 1, disabled: currentPage >= totalPages, children: "\xBB" })
46
- ] });
47
- };
48
- var Pagination_default = Pagination;
49
- export {
50
- Pagination_default as default
4
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
+ // src/components/page/Pagination.tsx
6
+ const Pagination = ({ totalItems, itemsPerPage, currentPage, queryParams, renderButton, renderLink }) => {
7
+ const totalPages = Math.ceil(totalItems / itemsPerPage);
8
+ const buildHref = (page) => {
9
+ const searchParams = new URLSearchParams();
10
+ for (const [key, value] of Object.entries(queryParams)) searchParams.append(key, `${value}`);
11
+ if (page === 1) searchParams.delete("page");
12
+ else searchParams.set("page", page.toString());
13
+ return `?${searchParams}`;
14
+ };
15
+ const Item = (props) => {
16
+ if (props.active || props.disabled || typeof props.page === "undefined") return /* @__PURE__ */ jsx(JustButton, {
17
+ render: renderButton,
18
+ disabled: true,
19
+ children: /* @__PURE__ */ jsx(Fragment$1, { children: props.children || props.page })
20
+ });
21
+ return /* @__PURE__ */ jsx(JustAnchor, {
22
+ render: renderLink,
23
+ href: buildHref(props.page),
24
+ children: /* @__PURE__ */ jsx(Fragment$1, { children: props.children || props.page })
25
+ });
26
+ };
27
+ return /* @__PURE__ */ jsxs("div", {
28
+ className: "flex gap-3",
29
+ children: [
30
+ /* @__PURE__ */ jsx(Item, {
31
+ page: currentPage - 1,
32
+ disabled: currentPage <= 1,
33
+ children: "«"
34
+ }),
35
+ currentPage > 3 && /* @__PURE__ */ jsx(Item, { page: 1 }),
36
+ currentPage === 5 && /* @__PURE__ */ jsx(Item, { page: 2 }),
37
+ currentPage > 5 && /* @__PURE__ */ jsx(Item, {
38
+ disabled: true,
39
+ children: "…"
40
+ }),
41
+ currentPage > 2 && /* @__PURE__ */ jsx(Item, { page: currentPage - 2 }),
42
+ currentPage > 1 && /* @__PURE__ */ jsx(Item, { page: currentPage - 1 }),
43
+ /* @__PURE__ */ jsx(Item, {
44
+ active: true,
45
+ children: currentPage
46
+ }),
47
+ currentPage <= totalPages - 1 && /* @__PURE__ */ jsx(Item, { page: currentPage + 1 }),
48
+ currentPage <= totalPages - 2 && /* @__PURE__ */ jsx(Item, { page: currentPage + 2 }),
49
+ currentPage <= totalPages - 5 && /* @__PURE__ */ jsx(Item, {
50
+ disabled: true,
51
+ children: "…"
52
+ }),
53
+ currentPage === totalPages - 4 && /* @__PURE__ */ jsx(Item, { page: totalPages - 1 }),
54
+ currentPage <= totalPages - 3 && /* @__PURE__ */ jsx(Item, { page: totalPages }),
55
+ /* @__PURE__ */ jsx(Item, {
56
+ page: currentPage + 1,
57
+ disabled: currentPage >= totalPages,
58
+ children: "»"
59
+ })
60
+ ]
61
+ });
51
62
  };
63
+ export { Pagination as default };
@@ -1,5 +1,2 @@
1
- export { default as Pagination } from './Pagination.js';
2
- import 'react';
3
- import '../elements/JustAnchor.js';
4
- import '@base-ui/react/use-render';
5
- import '../elements/JustButton.js';
1
+ import Pagination from "./Pagination.js";
2
+ export { Pagination };
@@ -1,4 +1 @@
1
- import { default as default2 } from "./Pagination.js";
2
- export {
3
- default2 as Pagination
4
- };
1
+ export { default as Pagination } from "./Pagination.js";
@@ -1,10 +1,7 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
-
1
+ import { ReactNode } from "react";
4
2
  type TdxProps = {
5
- className?: string;
6
- children?: ReactNode;
3
+ className?: string;
4
+ children?: ReactNode;
7
5
  };
8
- declare const Tdx: ({ className, children, }: TdxProps) => react.JSX.Element;
9
-
10
- export { Tdx as default };
6
+ declare const Tdx: ({ className, children }: TdxProps) => import("react").JSX.Element;
7
+ export { Tdx as default };
@@ -1,10 +1,14 @@
1
+ import "react";
1
2
  import { jsx } from "react/jsx-runtime";
2
- import {} from "react";
3
- const Tdx = ({
4
- className,
5
- children
6
- }) => /* @__PURE__ */ jsx("td", { className, children: /* @__PURE__ */ jsx("div", { className: "table w-full table-fixed", children: /* @__PURE__ */ jsx("span", { className: "table-cell truncate", children }) }) });
7
- var Tdx_default = Tdx;
8
- export {
9
- Tdx_default as default
10
- };
3
+ // src/components/table/Tdx.tsx
4
+ const Tdx = ({ className, children }) => /* @__PURE__ */ jsx("td", {
5
+ className,
6
+ children: /* @__PURE__ */ jsx("div", {
7
+ className: "table w-full table-fixed",
8
+ children: /* @__PURE__ */ jsx("span", {
9
+ className: "table-cell truncate",
10
+ children
11
+ })
12
+ })
13
+ });
14
+ export { Tdx as default };
@@ -1,2 +1,2 @@
1
- export { default as Tdx } from './Tdx.js';
2
- import 'react';
1
+ import Tdx from "./Tdx.js";
2
+ export { Tdx };
@@ -1,4 +1 @@
1
- import { default as default2 } from "./Tdx.js";
2
- export {
3
- default2 as Tdx
4
- };
1
+ export { default as Tdx } from "./Tdx.js";
@@ -1,5 +1,2 @@
1
- import * as react from 'react';
2
-
3
- declare function useRipples(): readonly [(e: React.MouseEvent<Element>) => void, react.JSX.Element];
4
-
5
- export { useRipples };
1
+ import { MouseEvent } from "react";
2
+ export declare function useRipples(): readonly [(e: MouseEvent<Element>) => void, import("react").JSX.Element];
@@ -1,36 +1,49 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
1
+ import { cn } from "cn";
2
+ import { useEffect, useRef, useState } from "react";
3
3
  import styles from "../styles/ripple.module.css";
4
- import { cn } from "../utils/cn.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ // src/hooks/useRipples.tsx
6
+ const RIPPLE_DURATION = 600;
5
7
  function useRipples() {
6
- const [ripples, setRipples] = useState([]);
7
- const handleClick = (e) => {
8
- const rect = e.currentTarget.getBoundingClientRect();
9
- const size = Math.max(rect.width, rect.height);
10
- const hasValidPointer = typeof e.clientX === "number" && typeof e.clientY === "number" && (e.clientX !== 0 || e.clientY !== 0);
11
- const x = hasValidPointer ? e.clientX - rect.left - size / 2 : rect.width / 2 - size / 2;
12
- const y = hasValidPointer ? e.clientY - rect.top - size / 2 : rect.height / 2 - size / 2;
13
- const newRipple = { x, y, size, id: Date.now() };
14
- setRipples((prev) => [...prev, newRipple]);
15
- setTimeout(() => {
16
- setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));
17
- }, 600);
18
- };
19
- const ripplesNode = /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit]", children: ripples.map((ripple) => /* @__PURE__ */ jsx(
20
- "span",
21
- {
22
- className: cn(styles.animation, "absolute rounded-full bg-current opacity-10"),
23
- style: {
24
- left: ripple.x,
25
- top: ripple.y,
26
- width: ripple.size,
27
- height: ripple.size
28
- }
29
- },
30
- ripple.id
31
- )) });
32
- return [handleClick, ripplesNode];
8
+ const [ripples, setRipples] = useState([]);
9
+ const nextId = useRef(0);
10
+ const timeouts = useRef(/* @__PURE__ */ new Set());
11
+ useEffect(() => {
12
+ const pending = timeouts.current;
13
+ return () => {
14
+ pending.forEach(clearTimeout);
15
+ };
16
+ }, []);
17
+ const handleClick = (e) => {
18
+ const rect = e.currentTarget.getBoundingClientRect();
19
+ const size = Math.max(rect.width, rect.height);
20
+ const fromKeyboard = e.detail === 0;
21
+ const x = fromKeyboard ? rect.width / 2 - size / 2 : e.clientX - rect.left - size / 2;
22
+ const y = fromKeyboard ? rect.height / 2 - size / 2 : e.clientY - rect.top - size / 2;
23
+ const id = nextId.current++;
24
+ setRipples((prev) => [...prev, {
25
+ x,
26
+ y,
27
+ size,
28
+ id
29
+ }]);
30
+ const timeout = setTimeout(() => {
31
+ timeouts.current.delete(timeout);
32
+ setRipples((prev) => prev.filter((r) => r.id !== id));
33
+ }, RIPPLE_DURATION);
34
+ timeouts.current.add(timeout);
35
+ };
36
+ return [handleClick, /* @__PURE__ */ jsx("div", {
37
+ className: "absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit] motion-reduce:hidden",
38
+ children: ripples.map((ripple) => /* @__PURE__ */ jsx("span", {
39
+ className: cn(styles.animation, "absolute rounded-full bg-current opacity-10"),
40
+ style: {
41
+ left: ripple.x,
42
+ top: ripple.y,
43
+ width: ripple.size,
44
+ height: ripple.size
45
+ }
46
+ }, ripple.id))
47
+ })];
33
48
  }
34
- export {
35
- useRipples
36
- };
49
+ export { useRipples };
@@ -4,6 +4,7 @@
4
4
  opacity: 0;
5
5
  }
6
6
  }
7
+
7
8
  .animation {
8
9
  animation: ripple 600ms linear;
9
10
  transform: scale(0);
@@ -1,5 +1,6 @@
1
- import { ClassValue } from 'clsx';
2
-
3
- declare function cn(...inputs: ClassValue[]): string;
4
-
5
- export { cn };
1
+ import { cn as cn$1 } from "cn";
2
+ /**
3
+ * @deprecated Use `cn` from the `cn` package directly instead:
4
+ * `import { cn } from "cn";`
5
+ */
6
+ export declare function cn(...inputs: Parameters<typeof cn$1>): string;
package/dist/utils/cn.js CHANGED
@@ -1,8 +1,10 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
1
+ import { cn as cn$1 } from "cn";
2
+ // src/utils/cn.ts
3
+ /**
4
+ * @deprecated Use `cn` from the `cn` package directly instead:
5
+ * `import { cn } from "cn";`
6
+ */
3
7
  function cn(...inputs) {
4
- return twMerge(clsx(inputs));
8
+ return cn$1(...inputs);
5
9
  }
6
- export {
7
- cn
8
- };
10
+ export { cn };
@@ -1,3 +1 @@
1
- declare function getDirtyFormData(form: HTMLFormElement, defaultValues: Record<string, unknown>): FormData;
2
-
3
- export { getDirtyFormData };
1
+ export declare function getDirtyFormData(form: HTMLFormElement, defaultValues: Record<string, unknown>): FormData;
@@ -1,45 +1,30 @@
1
+ // src/utils/dirty-form.ts
1
2
  function getCurrentValue(el) {
2
- if (el instanceof HTMLSelectElement) {
3
- return Array.from(el.options).filter((o) => o.selected).map((o) => o.value).join(",");
4
- }
5
- if (el.type === "checkbox" || el.type === "radio") {
6
- return el.checked;
7
- }
8
- return el.value;
3
+ if (el instanceof HTMLSelectElement) return Array.from(el.options).filter((o) => o.selected).map((o) => o.value).join(",");
4
+ if (el.type === "checkbox" || el.type === "radio") return el.checked;
5
+ return el.value;
9
6
  }
10
7
  function isDirty(defaultValue, currentValue) {
11
- switch (typeof defaultValue) {
12
- case "undefined":
13
- return currentValue !== "";
14
- case "string":
15
- case "boolean":
16
- return defaultValue !== currentValue;
17
- case "bigint":
18
- case "number":
19
- case "object":
20
- return JSON.stringify(defaultValue) !== currentValue;
21
- default:
22
- return true;
23
- }
8
+ switch (typeof defaultValue) {
9
+ case "undefined": return currentValue !== "";
10
+ case "string":
11
+ case "boolean": return defaultValue !== currentValue;
12
+ case "bigint":
13
+ case "number":
14
+ case "object": return JSON.stringify(defaultValue) !== currentValue;
15
+ default: return true;
16
+ }
24
17
  }
25
18
  function getDirtyFormData(form, defaultValues) {
26
- const dirty = new FormData();
27
- for (const e of Array.from(form.elements)) {
28
- if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) {
29
- if (!e.name) continue;
30
- if (isDirty(defaultValues[e.name], getCurrentValue(e))) {
31
- if (e.type === "checkbox" || e.type === "radio") {
32
- if (e.checked) {
33
- dirty.append(e.name, e.value);
34
- }
35
- } else {
36
- dirty.append(e.name, e.value);
37
- }
38
- }
39
- }
40
- }
41
- return dirty;
19
+ const dirty = new FormData();
20
+ for (const e of Array.from(form.elements)) if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) {
21
+ if (!e.name) continue;
22
+ if (isDirty(defaultValues[e.name], getCurrentValue(e))) {
23
+ if (e.type === "checkbox" || e.type === "radio") {
24
+ if (e.checked) dirty.append(e.name, e.value);
25
+ } else dirty.append(e.name, e.value);
26
+ }
27
+ }
28
+ return dirty;
42
29
  }
43
- export {
44
- getDirtyFormData
45
- };
30
+ export { getDirtyFormData };
@@ -1,2 +1,2 @@
1
- export { cn } from './cn.js';
2
- import 'clsx';
1
+ import { cn } from "./cn.js";
2
+ export { cn };
@@ -1,4 +1 @@
1
- import { cn } from "./cn.js";
2
- export {
3
- cn
4
- };
1
+ export { cn } from "./cn.js";
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@omer-x/tailwind-ui-kit",
3
- "version": "1.0.0-alpha.17",
3
+ "version": "1.0.0-alpha.19",
4
4
  "description": "Tailwind CSS-based React component library for building user interfaces",
5
5
  "keywords": [
6
6
  "tailwind",
7
7
  "ui-kit",
8
- "font-awesome",
9
8
  "typescript"
10
9
  ],
11
10
  "repository": {
@@ -30,7 +29,8 @@
30
29
  "main": "./dist/index.js",
31
30
  "types": "./dist/index.d.ts",
32
31
  "files": [
33
- "dist/"
32
+ "dist/",
33
+ "MIGRATION.md"
34
34
  ],
35
35
  "exports": {
36
36
  "./layout": {
@@ -67,39 +67,42 @@
67
67
  "lint:fix": "eslint --fix --flag unstable_native_nodejs_ts_config",
68
68
  "test": "vitest run --coverage",
69
69
  "test:watch": "vitest --coverage",
70
- "dev": "vite --port 3000",
71
- "build": "tsup"
70
+ "dev": "storybook dev -p 3000",
71
+ "build": "tsdown",
72
+ "build-storybook": "storybook build"
72
73
  },
73
74
  "dependencies": {
74
- "@omer-x/zod-to-form-constraints": "^1.1.2"
75
+ "@omer-x/zod-to-form-constraints": "^1.1.3",
76
+ "cn": "^0.5.2"
75
77
  },
76
78
  "peerDependencies": {
77
79
  "@base-ui/react": "^1",
78
- "@fortawesome/free-brands-svg-icons": "^7",
79
- "@fortawesome/free-solid-svg-icons": "^7",
80
- "@fortawesome/react-fontawesome": "^3",
81
- "clsx": "^2",
80
+ "@omer-x/next-form-actions": "^2.0.0-alpha.1",
82
81
  "react": "^19",
83
82
  "react-dom": "^19",
84
- "tailwind-merge": "^3",
85
83
  "tailwindcss": "^4"
86
84
  },
87
85
  "devDependencies": {
88
- "@omer-x/eslint-config": "^2.3.2",
89
- "@tailwindcss/vite": "^4.3.2",
90
- "@types/node": "^26.1.0",
91
- "@types/react": "^19.2.17",
92
- "@types/react-dom": "^19.2.3",
93
- "@vitejs/plugin-react": "^6.0.3",
94
- "@vitest/coverage-v8": "^4.1.9",
95
- "esbuild-fix-imports-plugin": "^1.0.23",
86
+ "@omer-x/eslint-config": "^2.3.3",
87
+ "@omer-x/next-form-actions": "^2.0.0-alpha.1",
88
+ "@storybook/addon-vitest": "^10.6.9",
89
+ "@storybook/react-vite": "^10.6.9",
90
+ "@tailwindcss/vite": "^4.3.5",
91
+ "@types/node": "^26.6.11",
92
+ "@types/react": "^19.3.3",
93
+ "@types/react-dom": "^19.3.0",
94
+ "@vitejs/plugin-react": "^6.3.0",
95
+ "@vitest/browser-playwright": "^5.1.2",
96
+ "@vitest/coverage-v8": "^5.1.2",
96
97
  "eslint": "^9.37.0",
97
98
  "eslint-plugin-jsx-a11y": "^6.10.2",
98
99
  "eslint-plugin-react": "^7.37.5",
99
- "semantic-release": "^25.0.5",
100
- "tsup": "^8.5.1",
101
- "typescript": "^5",
102
- "vite": "^8.1.3",
103
- "vitest": "^4.1.9"
100
+ "playwright": "^1.65.1",
101
+ "semantic-release": "^26.0.1",
102
+ "storybook": "^10.6.9",
103
+ "tsdown": "^0.23.7",
104
+ "typescript": "^6.0.3",
105
+ "vite": "^8.4.0",
106
+ "vitest": "^5.1.2"
104
107
  }
105
108
  }
@@ -1,8 +0,0 @@
1
- import * as react from 'react';
2
- import { ComponentProps } from 'react';
3
- import { Button } from '@base-ui/react/button';
4
-
5
- type PulseButtonProps = ComponentProps<typeof Button> & {};
6
- declare const PulseButton: ({ type, disabled, onClick, children, ...otherProps }: PulseButtonProps) => react.JSX.Element;
7
-
8
- export { PulseButton as default };
@@ -1,41 +0,0 @@
1
- "use client";
2
- import { jsxs } from "react/jsx-runtime";
3
- import { Button } from "@base-ui/react/button";
4
- import {} from "react";
5
- import { useFormStatus } from "react-dom";
6
- import { useRipples } from "../../hooks/useRipples.js";
7
- const PulseButton = ({
8
- type,
9
- disabled,
10
- onClick,
11
- children,
12
- ...otherProps
13
- }) => {
14
- const { pending } = useFormStatus();
15
- const [triggerRippleEffect, ripples] = useRipples();
16
- const submitting = type === "submit" && pending;
17
- const handleClick = (e) => {
18
- onClick?.(e);
19
- if (!e.defaultPrevented) {
20
- triggerRippleEffect(e);
21
- }
22
- };
23
- return /* @__PURE__ */ jsxs(
24
- Button,
25
- {
26
- ...otherProps,
27
- type,
28
- disabled: submitting || disabled,
29
- onClick: handleClick,
30
- "data-submitting": submitting ? "" : void 0,
31
- children: [
32
- ripples,
33
- children
34
- ]
35
- }
36
- );
37
- };
38
- var PulseButton_default = PulseButton;
39
- export {
40
- PulseButton_default as default
41
- };
@@ -1,2 +0,0 @@
1
-
2
- export { }