@omer-x/tailwind-ui-kit 1.0.0-alpha.3 → 1.0.0-alpha.31

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 (122) hide show
  1. package/MIGRATION.md +283 -0
  2. package/README.md +792 -0
  3. package/dist/components/button/BaseButton.d.ts +39 -12
  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/BaseAlertDialog.d.ts +49 -0
  8. package/dist/components/dialog/BaseAlertDialog.js +27 -0
  9. package/dist/components/dialog/BaseAlertDialogTrigger.d.ts +16 -0
  10. package/dist/components/dialog/BaseAlertDialogTrigger.js +11 -0
  11. package/dist/components/dialog/BaseDialog.d.ts +58 -0
  12. package/dist/components/dialog/BaseDialog.js +24 -0
  13. package/dist/components/dialog/BaseDialogClose.d.ts +13 -0
  14. package/dist/components/dialog/BaseDialogClose.js +7 -0
  15. package/dist/components/dialog/BaseDialogDescription.d.ts +8 -0
  16. package/dist/components/dialog/BaseDialogDescription.js +7 -0
  17. package/dist/components/dialog/BaseDialogPopup.d.ts +41 -0
  18. package/dist/components/dialog/BaseDialogPopup.js +42 -0
  19. package/dist/components/dialog/BaseDialogTitle.d.ts +8 -0
  20. package/dist/components/dialog/BaseDialogTitle.js +11 -0
  21. package/dist/components/dialog/BaseDialogTrigger.d.ts +20 -0
  22. package/dist/components/dialog/BaseDialogTrigger.js +11 -0
  23. package/dist/components/dialog/createAlertDialogHandle.d.ts +14 -0
  24. package/dist/components/dialog/createAlertDialogHandle.js +11 -0
  25. package/dist/components/dialog/createDialogHandle.d.ts +36 -0
  26. package/dist/components/dialog/createDialogHandle.js +31 -0
  27. package/dist/components/dialog/index.d.ts +8 -5
  28. package/dist/components/dialog/index.js +5 -8
  29. package/dist/components/disclosure/BaseAccordion.d.ts +48 -0
  30. package/dist/components/disclosure/BaseAccordion.js +18 -0
  31. package/dist/components/disclosure/BaseAccordionItem.d.ts +20 -0
  32. package/dist/components/disclosure/BaseAccordionItem.js +10 -0
  33. package/dist/components/disclosure/BaseAccordionPanel.d.ts +20 -0
  34. package/dist/components/disclosure/BaseAccordionPanel.js +15 -0
  35. package/dist/components/disclosure/BaseAccordionTrigger.d.ts +22 -0
  36. package/dist/components/disclosure/BaseAccordionTrigger.js +23 -0
  37. package/dist/components/disclosure/index.d.ts +4 -0
  38. package/dist/components/disclosure/index.js +1 -0
  39. package/dist/components/disclosure/panelTransition.d.ts +7 -0
  40. package/dist/components/disclosure/panelTransition.js +9 -0
  41. package/dist/components/display/BaseAvatar.d.ts +24 -0
  42. package/dist/components/display/BaseAvatar.js +35 -0
  43. package/dist/components/display/BaseAvatarFallback.d.ts +14 -0
  44. package/dist/components/display/BaseAvatarFallback.js +14 -0
  45. package/dist/components/display/BaseAvatarImage.d.ts +23 -0
  46. package/dist/components/display/BaseAvatarImage.js +14 -0
  47. package/dist/components/display/index.d.ts +3 -0
  48. package/dist/components/display/index.js +1 -0
  49. package/dist/components/elements/JustAnchor.d.ts +7 -0
  50. package/dist/components/elements/JustAnchor.js +11 -0
  51. package/dist/components/elements/JustButton.d.ts +7 -0
  52. package/dist/components/elements/JustButton.js +11 -0
  53. package/dist/components/elements/JustDiv.d.ts +7 -0
  54. package/dist/components/elements/JustDiv.js +11 -0
  55. package/dist/components/elements/JustInput.d.ts +7 -0
  56. package/dist/components/elements/JustInput.js +11 -0
  57. package/dist/components/elements/JustSpan.d.ts +7 -0
  58. package/dist/components/elements/JustSpan.js +11 -0
  59. package/dist/components/elements/index.d.ts +6 -0
  60. package/dist/components/elements/index.js +6 -0
  61. package/dist/components/form/BaseCheckbox.d.ts +44 -0
  62. package/dist/components/form/BaseCheckbox.js +24 -0
  63. package/dist/components/form/BaseForm.d.ts +13 -0
  64. package/dist/components/form/BaseForm.js +78 -0
  65. package/dist/components/form/BaseFormField.d.ts +24 -0
  66. package/dist/components/form/BaseFormField.js +33 -0
  67. package/dist/components/form/BaseInput.d.ts +7 -0
  68. package/dist/components/form/BaseInput.js +22 -0
  69. package/dist/components/form/BaseSwitch.d.ts +35 -0
  70. package/dist/components/form/BaseSwitch.js +21 -0
  71. package/dist/components/form/ClientSideError.d.ts +9 -0
  72. package/dist/components/form/ClientSideError.js +39 -0
  73. package/dist/components/form/FieldRoot.d.ts +8 -0
  74. package/dist/components/form/FieldRoot.js +21 -0
  75. package/dist/components/form/FormContext.d.ts +28 -0
  76. package/dist/components/form/FormContext.js +12 -0
  77. package/dist/components/form/ServerSideError.d.ts +8 -0
  78. package/dist/components/form/ServerSideError.js +15 -0
  79. package/dist/components/form/index.d.ts +8 -0
  80. package/dist/components/form/index.js +7 -0
  81. package/dist/components/form/useFormMessages.d.ts +10 -0
  82. package/dist/components/form/useFormMessages.js +16 -0
  83. package/dist/components/layout/Container.d.ts +4 -10
  84. package/dist/components/layout/Container.js +9 -10
  85. package/dist/components/layout/index.d.ts +2 -3
  86. package/dist/components/layout/index.js +1 -4
  87. package/dist/components/page/Pagination.d.ts +27 -0
  88. package/dist/components/page/Pagination.js +68 -0
  89. package/dist/components/page/index.d.ts +3 -0
  90. package/dist/components/page/index.js +3 -0
  91. package/dist/components/page/usePagination.d.ts +30 -0
  92. package/dist/components/page/usePagination.js +41 -0
  93. package/dist/components/table/TableCell.d.ts +13 -0
  94. package/dist/components/table/TableCell.js +17 -0
  95. package/dist/components/table/Tdx.d.ts +6 -10
  96. package/dist/components/table/Tdx.js +11 -9
  97. package/dist/components/table/index.d.ts +3 -3
  98. package/dist/components/table/index.js +3 -4
  99. package/dist/hooks/index.d.ts +2 -0
  100. package/dist/hooks/index.js +1 -0
  101. package/dist/hooks/useRipples.d.ts +2 -5
  102. package/dist/hooks/useRipples.js +44 -32
  103. package/dist/utils/cn.d.ts +6 -5
  104. package/dist/utils/cn.js +8 -6
  105. package/dist/utils/dirty-form.d.ts +7 -0
  106. package/dist/utils/dirty-form.js +40 -0
  107. package/dist/utils/index.d.ts +3 -2
  108. package/dist/utils/index.js +2 -3
  109. package/dist/utils/render.d.ts +31 -0
  110. package/dist/utils/render.js +24 -0
  111. package/package.json +60 -26
  112. package/typescript-badge.d.ts +4 -0
  113. package/dist/components/button/PulseButton.d.ts +0 -10
  114. package/dist/components/button/PulseButton.js +0 -24
  115. package/dist/components/dialog/AnimatedPopup.d.ts +0 -6
  116. package/dist/components/dialog/AnimatedPopup.js +0 -34
  117. package/dist/components/dialog/DialogBackdrop.d.ts +0 -6
  118. package/dist/components/dialog/DialogBackdrop.js +0 -26
  119. package/dist/components/dialog/DialogTitle.d.ts +0 -6
  120. package/dist/components/dialog/DialogTitle.js +0 -19
  121. package/dist/styles/ripple.module.css +0 -10
  122. package/dist/styles/ripple.module.d.ts +0 -2
@@ -0,0 +1,13 @@
1
+ import { ComponentProps } from "react";
2
+ export type TableCellOverflow = "wrap" | "truncate";
3
+ type TableCellProps = ComponentProps<"td"> & {
4
+ /**
5
+ * How content wider than the column is handled.
6
+ * - `"wrap"` (default): a normal `<td>`, content wraps.
7
+ * - `"truncate"`: one line, cut with an ellipsis instead of widening the column.
8
+ */
9
+ overflow?: TableCellOverflow;
10
+ };
11
+ /** A `<td>` that takes all `<td>` props. Exposes `data-overflow`. */
12
+ declare const TableCell: ({ overflow, children, ...props }: TableCellProps) => import("react").JSX.Element;
13
+ export { TableCell as default };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/components/table/TableCell.tsx
5
+ /** A `<td>` that takes all `<td>` props. Exposes `data-overflow`. */
6
+ const TableCell = ({ overflow = "wrap", children, ...props }) => /* @__PURE__ */ jsx("td", {
7
+ "data-overflow": overflow,
8
+ ...props,
9
+ children: overflow === "truncate" ? /* @__PURE__ */ jsx("div", {
10
+ className: "table w-full table-fixed",
11
+ children: /* @__PURE__ */ jsx("span", {
12
+ className: "table-cell truncate",
13
+ children
14
+ })
15
+ }) : children
16
+ });
17
+ export { TableCell as default };
@@ -1,10 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
-
4
- type TdxProps = {
5
- className?: string;
6
- children?: ReactNode;
7
- };
8
- declare const Tdx: ({ className, children, }: TdxProps) => react_jsx_runtime.JSX.Element;
9
-
10
- export { Tdx as default };
1
+ import { ComponentProps } from "react";
2
+ /**
3
+ * @deprecated Use `<TableCell overflow="truncate">` instead.
4
+ */
5
+ declare const Tdx: (props: ComponentProps<"td">) => import("react").JSX.Element;
6
+ export { Tdx as default };
@@ -1,10 +1,12 @@
1
+ "use client";
2
+ import TableCell from "./TableCell.js";
1
3
  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
- };
4
+ // src/components/table/Tdx.tsx
5
+ /**
6
+ * @deprecated Use `<TableCell overflow="truncate">` instead.
7
+ */
8
+ const Tdx = (props) => /* @__PURE__ */ jsx(TableCell, {
9
+ overflow: "truncate",
10
+ ...props
11
+ });
12
+ export { Tdx as default };
@@ -1,3 +1,3 @@
1
- export { default as Tdx } from './Tdx.js';
2
- import 'react/jsx-runtime';
3
- import 'react';
1
+ import TableCell, { TableCellOverflow } from "./TableCell.js";
2
+ import Tdx from "./Tdx.js";
3
+ export { TableCell, type TableCellOverflow, Tdx };
@@ -1,4 +1,3 @@
1
- import { default as default2 } from "./Tdx.js";
2
- export {
3
- default2 as Tdx
4
- };
1
+ import TableCell from "./TableCell.js";
2
+ import Tdx from "./Tdx.js";
3
+ export { TableCell, Tdx };
@@ -0,0 +1,2 @@
1
+ import { useRipples } from "./useRipples.js";
2
+ export { useRipples };
@@ -0,0 +1 @@
1
+ export { useRipples } from "./useRipples.js";
@@ -1,5 +1,2 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function useRipples(): readonly [(e: React.MouseEvent<Element>) => void, react_jsx_runtime.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,35 +1,47 @@
1
+ import { useEffect, useRef, useState } from "react";
1
2
  import { jsx } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import styles from "../styles/ripple.module.css";
4
- import { cn } from "../utils/cn.js";
3
+ // src/hooks/useRipples.tsx
4
+ const RIPPLE_DURATION = 600;
5
5
  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 x = e.clientX - rect.left - size / 2;
11
- const y = e.clientY - rect.top - size / 2;
12
- const newRipple = { x, y, size, id: Date.now() };
13
- setRipples((prev) => [...prev, newRipple]);
14
- setTimeout(() => {
15
- setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));
16
- }, 600);
17
- };
18
- const ripplesNode = /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none overflow-hidden rounded-md", children: ripples.map((ripple) => /* @__PURE__ */ jsx(
19
- "span",
20
- {
21
- className: cn(styles.animation, "absolute rounded-full bg-current opacity-10"),
22
- style: {
23
- left: ripple.x,
24
- top: ripple.y,
25
- width: ripple.size,
26
- height: ripple.size
27
- }
28
- },
29
- ripple.id
30
- )) });
31
- return [handleClick, ripplesNode];
6
+ const [ripples, setRipples] = useState([]);
7
+ const nextId = useRef(0);
8
+ const timeouts = useRef(/* @__PURE__ */ new Set());
9
+ useEffect(() => {
10
+ const pending = timeouts.current;
11
+ return () => {
12
+ pending.forEach(clearTimeout);
13
+ };
14
+ }, []);
15
+ const handleClick = (e) => {
16
+ const rect = e.currentTarget.getBoundingClientRect();
17
+ const size = Math.max(rect.width, rect.height);
18
+ const fromKeyboard = e.detail === 0;
19
+ const x = fromKeyboard ? rect.width / 2 - size / 2 : e.clientX - rect.left - size / 2;
20
+ const y = fromKeyboard ? rect.height / 2 - size / 2 : e.clientY - rect.top - size / 2;
21
+ const id = nextId.current++;
22
+ setRipples((prev) => [...prev, {
23
+ x,
24
+ y,
25
+ size,
26
+ id
27
+ }]);
28
+ const timeout = setTimeout(() => {
29
+ timeouts.current.delete(timeout);
30
+ setRipples((prev) => prev.filter((r) => r.id !== id));
31
+ }, RIPPLE_DURATION);
32
+ timeouts.current.add(timeout);
33
+ };
34
+ return [handleClick, /* @__PURE__ */ jsx("div", {
35
+ className: "absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit] motion-reduce:hidden",
36
+ children: ripples.map((ripple) => /* @__PURE__ */ jsx("span", {
37
+ className: "absolute rounded-full bg-current scale-400 opacity-0 transition-[scale,opacity] duration-600 ease-linear starting:scale-0 starting:opacity-10",
38
+ style: {
39
+ left: ripple.x,
40
+ top: ripple.y,
41
+ width: ripple.size,
42
+ height: ripple.size
43
+ }
44
+ }, ripple.id))
45
+ })];
32
46
  }
33
- export {
34
- useRipples
35
- };
47
+ export { useRipples };
@@ -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 };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Builds the form data of the fields whose value differs from `defaultValues`.
3
+ * Fields are compared by name, so multi-selects, checkbox groups and file inputs are handled as a whole.
4
+ * A changed field with no value (an unchecked checkbox, a cleared multi-select) is sent as an empty value,
5
+ * so the server can tell it apart from an unchanged field.
6
+ */
7
+ export declare function getDirtyFormData(form: HTMLFormElement, defaultValues: Record<string, unknown>): FormData;
@@ -0,0 +1,40 @@
1
+ // src/utils/dirty-form.ts
2
+ function hasValue(value) {
3
+ return typeof value === "string" ? value !== "" : value.name !== "";
4
+ }
5
+ function normalizeDefault(defaultValue) {
6
+ if (defaultValue === void 0 || defaultValue === null) return [];
7
+ return (Array.isArray(defaultValue) ? defaultValue : [defaultValue]).map((value) => typeof value === "object" && value !== null ? JSON.stringify(value) : String(value)).filter((value) => value !== "");
8
+ }
9
+ function isChecked(form, name) {
10
+ return Array.from(form.elements).some((e) => e instanceof HTMLInputElement && e.name === name && (e.type === "checkbox" || e.type === "radio") && e.checked);
11
+ }
12
+ function isDirty(form, name, defaultValue, values) {
13
+ if (typeof defaultValue === "boolean") return isChecked(form, name) !== defaultValue;
14
+ if (values.some((value) => typeof value !== "string")) return true;
15
+ const current = values.toSorted();
16
+ const defaults = normalizeDefault(defaultValue).toSorted();
17
+ return current.length !== defaults.length || current.some((value, index) => value !== defaults[index]);
18
+ }
19
+ /**
20
+ * Builds the form data of the fields whose value differs from `defaultValues`.
21
+ * Fields are compared by name, so multi-selects, checkbox groups and file inputs are handled as a whole.
22
+ * A changed field with no value (an unchecked checkbox, a cleared multi-select) is sent as an empty value,
23
+ * so the server can tell it apart from an unchanged field.
24
+ */
25
+ function getDirtyFormData(form, defaultValues) {
26
+ const formData = new FormData(form);
27
+ const names = /* @__PURE__ */ new Set();
28
+ for (const e of Array.from(form.elements)) if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) {
29
+ if (e.name) names.add(e.name);
30
+ }
31
+ const dirty = new FormData();
32
+ for (const name of names) {
33
+ const values = formData.getAll(name).filter(hasValue);
34
+ if (!isDirty(form, name, defaultValues[name], values)) continue;
35
+ if (values.length === 0) dirty.append(name, "");
36
+ for (const value of values) dirty.append(name, value);
37
+ }
38
+ return dirty;
39
+ }
40
+ export { getDirtyFormData };
@@ -1,2 +1,3 @@
1
- export { cn } from './cn.js';
2
- import 'clsx';
1
+ import { cn } from "./cn.js";
2
+ import { IntrinsicTag, RenderProp, UseRenderOptions, mergeProps, useRender } from "./render.js";
3
+ export { type IntrinsicTag, type RenderProp, type UseRenderOptions, cn, mergeProps, useRender };
@@ -1,4 +1,3 @@
1
1
  import { cn } from "./cn.js";
2
- export {
3
- cn
4
- };
2
+ import { mergeProps, useRender } from "./render.js";
3
+ export { cn, mergeProps, useRender };
@@ -0,0 +1,31 @@
1
+ import { ComponentPropsWithRef, JSX, ReactElement } from "react";
2
+ export type IntrinsicTag = keyof JSX.IntrinsicElements;
3
+ type RenderFunction<Tag extends IntrinsicTag, State> = (props: ComponentPropsWithRef<Tag>, state: State) => ReactElement;
4
+ /**
5
+ * Replaces the element a component renders.
6
+ * An element is rendered with the component's props merged into it.
7
+ * A function gets those props (spread them onto your element) and the component's state.
8
+ */
9
+ export type RenderProp<Tag extends IntrinsicTag, State = object> = ReactElement | RenderFunction<Tag, State>;
10
+ export type UseRenderOptions<Tag extends IntrinsicTag, State extends object> = {
11
+ /** The element rendered when `render` is missing. */
12
+ defaultTagName: Tag;
13
+ render?: RenderProp<Tag, State>;
14
+ /** Props of the rendered element. They are merged into the `render` element's own props. */
15
+ props?: ComponentPropsWithRef<Tag>;
16
+ /** Passed to a `render` function, and set as data attributes (`{ checked: true }` → `data-checked`). */
17
+ state?: State;
18
+ };
19
+ /**
20
+ * Renders `defaultTagName`, or the element given by `render`, with `props` merged into it.
21
+ * Build a component that takes a `render` prop with it.
22
+ */
23
+ export declare function useRender<Tag extends IntrinsicTag, State extends object = object>({ defaultTagName, render, props, state }: UseRenderOptions<Tag, State>): ReactElement;
24
+ type Props<Tag extends IntrinsicTag> = ComponentPropsWithRef<Tag>;
25
+ /**
26
+ * Merges props for one element, later ones winning.
27
+ * Event handlers are chained (later ones run first), `className`s are joined and `style`s are merged.
28
+ * `ref` is not merged.
29
+ */
30
+ export declare function mergeProps<Tag extends IntrinsicTag>(...props: (Props<Tag> | undefined)[]): Props<Tag>;
31
+ export {};
@@ -0,0 +1,24 @@
1
+ import { mergePropsN } from "@base-ui/react/merge-props";
2
+ import { useRender as useRender$1 } from "@base-ui/react/use-render";
3
+ // src/utils/render.ts
4
+ /**
5
+ * Renders `defaultTagName`, or the element given by `render`, with `props` merged into it.
6
+ * Build a component that takes a `render` prop with it.
7
+ */
8
+ function useRender({ defaultTagName, render, props, state }) {
9
+ return useRender$1({
10
+ defaultTagName,
11
+ render,
12
+ props,
13
+ state
14
+ });
15
+ }
16
+ /**
17
+ * Merges props for one element, later ones winning.
18
+ * Event handlers are chained (later ones run first), `className`s are joined and `style`s are merged.
19
+ * `ref` is not merged.
20
+ */
21
+ function mergeProps(...props) {
22
+ return mergePropsN(props);
23
+ }
24
+ export { mergeProps, useRender };
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@omer-x/tailwind-ui-kit",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.31",
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": {
@@ -27,12 +26,14 @@
27
26
  },
28
27
  "license": "MIT",
29
28
  "type": "module",
30
- "main": "./dist/index.js",
31
- "types": "./dist/index.d.ts",
29
+ "types": "./typescript-badge.d.ts",
32
30
  "files": [
33
- "dist/"
31
+ "dist/",
32
+ "MIGRATION.md",
33
+ "typescript-badge.d.ts"
34
34
  ],
35
35
  "exports": {
36
+ "./package.json": "./package.json",
36
37
  "./layout": {
37
38
  "types": "./dist/components/layout/index.d.ts",
38
39
  "import": "./dist/components/layout/index.js"
@@ -45,10 +46,34 @@
45
46
  "types": "./dist/components/dialog/index.d.ts",
46
47
  "import": "./dist/components/dialog/index.js"
47
48
  },
49
+ "./disclosure": {
50
+ "types": "./dist/components/disclosure/index.d.ts",
51
+ "import": "./dist/components/disclosure/index.js"
52
+ },
53
+ "./display": {
54
+ "types": "./dist/components/display/index.d.ts",
55
+ "import": "./dist/components/display/index.js"
56
+ },
57
+ "./form": {
58
+ "types": "./dist/components/form/index.d.ts",
59
+ "import": "./dist/components/form/index.js"
60
+ },
48
61
  "./table": {
49
62
  "types": "./dist/components/table/index.d.ts",
50
63
  "import": "./dist/components/table/index.js"
51
64
  },
65
+ "./page": {
66
+ "types": "./dist/components/page/index.d.ts",
67
+ "import": "./dist/components/page/index.js"
68
+ },
69
+ "./elements": {
70
+ "types": "./dist/components/elements/index.d.ts",
71
+ "import": "./dist/components/elements/index.js"
72
+ },
73
+ "./hooks": {
74
+ "types": "./dist/hooks/index.d.ts",
75
+ "import": "./dist/hooks/index.js"
76
+ },
52
77
  "./utils": {
53
78
  "types": "./dist/utils/index.d.ts",
54
79
  "import": "./dist/utils/index.js"
@@ -59,36 +84,45 @@
59
84
  "lint:fix": "eslint --fix --flag unstable_native_nodejs_ts_config",
60
85
  "test": "vitest run --coverage",
61
86
  "test:watch": "vitest --coverage",
62
- "dev": "vite --port 3000",
63
- "build": "tsup"
87
+ "dev": "storybook dev -p 3000",
88
+ "build": "tsdown",
89
+ "postbuild": "node scripts/check-public-types.ts",
90
+ "build-storybook": "storybook build"
91
+ },
92
+ "dependencies": {
93
+ "@omer-x/zod-to-form-constraints": "^1.1.3",
94
+ "cn": "^0.5.2"
64
95
  },
65
96
  "peerDependencies": {
66
97
  "@base-ui/react": "^1",
67
- "@fortawesome/react-fontawesome": "^3",
68
- "clsx": "^2",
98
+ "@omer-x/next-form-actions": "^2.0.0-alpha.1",
69
99
  "react": "^19",
70
100
  "react-dom": "^19",
71
- "tailwind-merge": "^3",
72
- "tailwindcss": "^4"
101
+ "tailwindcss": "^4",
102
+ "zod": "^4"
73
103
  },
74
104
  "devDependencies": {
75
- "@fortawesome/free-brands-svg-icons": "^7.2.0",
76
- "@fortawesome/free-solid-svg-icons": "^7.2.0",
77
- "@omer-x/eslint-config": "^2.3.2",
78
- "@tailwindcss/vite": "^4.3.0",
79
- "@types/node": "^25.7.0",
80
- "@types/react": "^19.2.14",
81
- "@types/react-dom": "^19.2.3",
82
- "@vitejs/plugin-react": "^6.0.1",
83
- "@vitest/coverage-v8": "^4.1.6",
84
- "esbuild-fix-imports-plugin": "^1.0.23",
105
+ "@omer-x/eslint-config": "^2.3.3",
106
+ "@omer-x/next-form-actions": "^2.0.0-alpha.1",
107
+ "@storybook/addon-vitest": "^10.6.9",
108
+ "@storybook/react-vite": "^10.6.9",
109
+ "@tailwindcss/vite": "^4.3.5",
110
+ "@types/node": "^26.6.11",
111
+ "@types/react": "^19.3.3",
112
+ "@types/react-dom": "^19.3.0",
113
+ "@vitejs/plugin-react": "^6.3.0",
114
+ "@vitest/browser-playwright": "^5.1.2",
115
+ "@vitest/coverage-v8": "^5.1.2",
85
116
  "eslint": "^9.37.0",
86
117
  "eslint-plugin-jsx-a11y": "^6.10.2",
87
118
  "eslint-plugin-react": "^7.37.5",
88
- "semantic-release": "^25.0.3",
89
- "tsup": "^8.5.1",
90
- "typescript": "^5",
91
- "vite": "^8.0.12",
92
- "vitest": "^4.1.6"
119
+ "playwright": "^1.65.1",
120
+ "semantic-release": "^26.0.1",
121
+ "storybook": "^10.6.9",
122
+ "tsdown": "^0.23.7",
123
+ "typescript": "^6.0.3",
124
+ "vite": "^8.4.0",
125
+ "vitest": "^5.1.2",
126
+ "zod": "^4.6.7"
93
127
  }
94
128
  }
@@ -0,0 +1,4 @@
1
+ // Placeholder: npmjs.com shows the "TS" badge only when package.json has a
2
+ // top-level "types" field. This package has no root entry point; real types
3
+ // come from the "types" condition of each subpath in "exports".
4
+ export {};
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Button } from '@base-ui/react/button';
3
- import { ComponentProps, ReactNode } from 'react';
4
-
5
- type PulseButtonProps = ComponentProps<typeof Button> & {
6
- children: ReactNode;
7
- };
8
- declare const PulseButton: ({ children, onClick, ...otherProps }: PulseButtonProps) => react_jsx_runtime.JSX.Element;
9
-
10
- export { PulseButton as default };
@@ -1,24 +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 { useRipples } from "../../hooks/useRipples.js";
6
- const PulseButton = ({
7
- children,
8
- onClick,
9
- ...otherProps
10
- }) => {
11
- const [triggerRippleEffect, ripples] = useRipples();
12
- const handleClick = (e) => {
13
- triggerRippleEffect(e);
14
- onClick?.(e);
15
- };
16
- return /* @__PURE__ */ jsxs(Button, { ...otherProps, onClick: handleClick, children: [
17
- ripples,
18
- children
19
- ] });
20
- };
21
- var PulseButton_default = PulseButton;
22
- export {
23
- PulseButton_default as default
24
- };
@@ -1,6 +0,0 @@
1
- import * as react from 'react';
2
- import { useRender } from '@base-ui/react/use-render';
3
-
4
- declare const AnimatedPopup: ({ render, ...otherProps }: useRender.ComponentProps<"div">) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
-
6
- export { AnimatedPopup as default };
@@ -1,34 +0,0 @@
1
- import { mergeProps } from "@base-ui/react/merge-props";
2
- import { useRender } from "@base-ui/react/use-render";
3
- import { cn } from "../../utils/cn.js";
4
- const AnimatedPopup = ({ render, ...otherProps }) => useRender({
5
- defaultTagName: "div",
6
- render,
7
- props: mergeProps({
8
- className: cn(
9
- "fixed",
10
- "top-[calc(50%+1.25rem*var(--nested-dialogs))]",
11
- "left-1/2",
12
- "-mt-8",
13
- "w-96",
14
- "max-w-[calc(100vw-3rem)]",
15
- "-translate-x-1/2",
16
- "-translate-y-1/2",
17
- "scale-[calc(1-0.1*var(--nested-dialogs))]",
18
- "transition-all",
19
- "duration-150",
20
- "data-[ending-style]:scale-90",
21
- "data-[ending-style]:opacity-0",
22
- "data-[nested-dialog-open]:after:absolute",
23
- "data-[nested-dialog-open]:after:inset-0",
24
- "data-[nested-dialog-open]:after:rounded-[inherit]",
25
- "data-[nested-dialog-open]:after:bg-black/5",
26
- "data-[starting-style]:scale-90",
27
- "data-[starting-style]:opacity-0"
28
- )
29
- }, otherProps)
30
- });
31
- var AnimatedPopup_default = AnimatedPopup;
32
- export {
33
- AnimatedPopup_default as default
34
- };
@@ -1,6 +0,0 @@
1
- import * as react from 'react';
2
- import { useRender } from '@base-ui/react/use-render';
3
-
4
- declare const DialogBackdrop: ({ render, ...otherProps }: useRender.ComponentProps<"div">) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
-
6
- export { DialogBackdrop as default };
@@ -1,26 +0,0 @@
1
- import { mergeProps } from "@base-ui/react/merge-props";
2
- import { useRender } from "@base-ui/react/use-render";
3
- import { cn } from "../../utils/cn.js";
4
- const DialogBackdrop = ({ render, ...otherProps }) => useRender({
5
- defaultTagName: "div",
6
- render,
7
- props: mergeProps({
8
- className: cn(
9
- "fixed",
10
- "inset-0",
11
- "min-h-dvh",
12
- "bg-black",
13
- "opacity-20",
14
- "transition-all",
15
- "duration-150",
16
- "data-[ending-style]:opacity-0",
17
- "data-[starting-style]:opacity-0",
18
- "dark:opacity-70",
19
- "supports-[-webkit-touch-callout:none]:absolute"
20
- )
21
- }, otherProps)
22
- });
23
- var DialogBackdrop_default = DialogBackdrop;
24
- export {
25
- DialogBackdrop_default as default
26
- };
@@ -1,6 +0,0 @@
1
- import * as react from 'react';
2
- import { useRender } from '@base-ui/react/use-render';
3
-
4
- declare const DialogTitle: ({ render, ...otherProps }: useRender.ComponentProps<"h2">) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
5
-
6
- export { DialogTitle as default };
@@ -1,19 +0,0 @@
1
- import { mergeProps } from "@base-ui/react/merge-props";
2
- import { useRender } from "@base-ui/react/use-render";
3
- import { cn } from "../../utils/cn.js";
4
- const DialogTitle = ({ render, ...otherProps }) => useRender({
5
- defaultTagName: "h2",
6
- render,
7
- props: mergeProps({
8
- className: cn(
9
- "-mt-1.5",
10
- "mb-1",
11
- "text-xl",
12
- "font-semibold"
13
- )
14
- }, otherProps)
15
- });
16
- var DialogTitle_default = DialogTitle;
17
- export {
18
- DialogTitle_default as default
19
- };
@@ -1,10 +0,0 @@
1
- @keyframes ripple {
2
- to {
3
- transform: scale(4);
4
- opacity: 0;
5
- }
6
- }
7
- .animation {
8
- animation: ripple 600ms linear;
9
- transform: scale(0);
10
- }
@@ -1,2 +0,0 @@
1
-
2
- export { }