@omer-x/tailwind-ui-kit 1.0.0-alpha.5 → 1.0.0-alpha.6
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/dist/components/button/BaseButton.d.ts +2 -2
- package/dist/components/button/PulseButton.d.ts +3 -3
- package/dist/components/button/index.d.ts +0 -1
- package/dist/components/form/BaseInput.d.ts +10 -0
- package/dist/components/form/BaseInput.js +32 -0
- package/dist/components/form/FormField.d.ts +10 -0
- package/dist/components/form/FormField.js +19 -0
- package/dist/components/form/index.d.ts +4 -0
- package/dist/components/form/index.js +4 -0
- package/dist/components/layout/Container.d.ts +2 -2
- package/dist/components/layout/index.d.ts +0 -1
- package/dist/components/table/Tdx.d.ts +2 -2
- package/dist/components/table/index.d.ts +0 -1
- package/dist/hooks/useRipples.d.ts +2 -2
- package/dist/hooks/useRipples.js +1 -1
- package/package.json +16 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import { Button } from '@base-ui/react/button';
|
|
4
4
|
|
|
@@ -7,6 +7,6 @@ type BaseButtonProps = ComponentProps<typeof Button> & {
|
|
|
7
7
|
pending?: boolean;
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
};
|
|
10
|
-
declare const BaseButton: ({ size, pending, disabled, focusableWhenDisabled, className, children, ...otherProps }: BaseButtonProps) =>
|
|
10
|
+
declare const BaseButton: ({ size, pending, disabled, focusableWhenDisabled, className, children, ...otherProps }: BaseButtonProps) => react.JSX.Element;
|
|
11
11
|
|
|
12
12
|
export { BaseButton as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Button } from '@base-ui/react/button';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { Button } from '@base-ui/react/button';
|
|
4
4
|
|
|
5
5
|
type PulseButtonProps = ComponentProps<typeof Button> & {
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare const PulseButton: ({ children, onClick, ...otherProps }: PulseButtonProps) =>
|
|
8
|
+
declare const PulseButton: ({ children, onClick, ...otherProps }: PulseButtonProps) => react.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { PulseButton as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Input } from '@base-ui/react/input';
|
|
4
|
+
|
|
5
|
+
type BaseInputProps = Omit<ComponentProps<typeof Input>, "size"> & {
|
|
6
|
+
size?: "lg" | "md" | "sm" | "xs";
|
|
7
|
+
};
|
|
8
|
+
declare const BaseInput: ({ size, className, ...otherProps }: BaseInputProps) => react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { BaseInput as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Input } from "@base-ui/react/input";
|
|
3
|
+
import {} from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
const BaseInput = ({
|
|
6
|
+
size = "md",
|
|
7
|
+
className,
|
|
8
|
+
...otherProps
|
|
9
|
+
}) => /* @__PURE__ */ jsx(
|
|
10
|
+
Input,
|
|
11
|
+
{
|
|
12
|
+
className: cn({
|
|
13
|
+
// Size
|
|
14
|
+
"h-12 px-5 text-base": size === "lg",
|
|
15
|
+
"h-9 px-3 text-sm": size === "md",
|
|
16
|
+
"h-8 px-2.5 text-sm": size === "sm",
|
|
17
|
+
"h-7 px-2 text-xs": size === "xs"
|
|
18
|
+
}, [
|
|
19
|
+
// Base
|
|
20
|
+
"rounded-md",
|
|
21
|
+
"outline-2",
|
|
22
|
+
"outline-offset-2",
|
|
23
|
+
"outline-transparent",
|
|
24
|
+
"transition-colors"
|
|
25
|
+
], className),
|
|
26
|
+
...otherProps
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
var BaseInput_default = BaseInput;
|
|
30
|
+
export {
|
|
31
|
+
BaseInput_default as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { ZodType } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface FormFieldProps extends useRender.ComponentProps<"input"> {
|
|
6
|
+
schema: ZodType;
|
|
7
|
+
}
|
|
8
|
+
declare const FormField: ({ schema, render, ...otherProps }: FormFieldProps) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
9
|
+
|
|
10
|
+
export { FormField as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { getFieldConstraints } from "@omer-x/zod-to-form-constraints";
|
|
4
|
+
import {} from "zod";
|
|
5
|
+
const FormField = ({
|
|
6
|
+
schema,
|
|
7
|
+
render,
|
|
8
|
+
...otherProps
|
|
9
|
+
}) => {
|
|
10
|
+
return useRender({
|
|
11
|
+
defaultTagName: "input",
|
|
12
|
+
render,
|
|
13
|
+
props: mergeProps(getFieldConstraints(schema), otherProps)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var FormField_default = FormField;
|
|
17
|
+
export {
|
|
18
|
+
FormField_default as default
|
|
19
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type ContainerProps = ComponentProps<"div"> & {
|
|
5
5
|
className?: string;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare const Container: ({ className, children, }: ContainerProps) =>
|
|
8
|
+
declare const Container: ({ className, children, }: ContainerProps) => react.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { Container as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type TdxProps = {
|
|
5
5
|
className?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare const Tdx: ({ className, children, }: TdxProps) =>
|
|
8
|
+
declare const Tdx: ({ className, children, }: TdxProps) => react.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { Tdx as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
|
-
declare function useRipples(): readonly [(e: React.MouseEvent<Element>) => void,
|
|
3
|
+
declare function useRipples(): readonly [(e: React.MouseEvent<Element>) => void, react.JSX.Element];
|
|
4
4
|
|
|
5
5
|
export { useRipples };
|
package/dist/hooks/useRipples.js
CHANGED
|
@@ -15,7 +15,7 @@ function useRipples() {
|
|
|
15
15
|
setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));
|
|
16
16
|
}, 600);
|
|
17
17
|
};
|
|
18
|
-
const ripplesNode = /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none overflow-hidden rounded-
|
|
18
|
+
const ripplesNode = /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none overflow-hidden rounded-[inherit]", children: ripples.map((ripple) => /* @__PURE__ */ jsx(
|
|
19
19
|
"span",
|
|
20
20
|
{
|
|
21
21
|
className: cn(styles.animation, "absolute rounded-full bg-current opacity-10"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omer-x/tailwind-ui-kit",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.6",
|
|
4
4
|
"description": "Tailwind CSS-based React component library for building user interfaces",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tailwind",
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"types": "./dist/components/dialog/index.d.ts",
|
|
46
46
|
"import": "./dist/components/dialog/index.js"
|
|
47
47
|
},
|
|
48
|
+
"./form": {
|
|
49
|
+
"types": "./dist/components/form/index.d.ts",
|
|
50
|
+
"import": "./dist/components/form/index.js"
|
|
51
|
+
},
|
|
48
52
|
"./table": {
|
|
49
53
|
"types": "./dist/components/table/index.d.ts",
|
|
50
54
|
"import": "./dist/components/table/index.js"
|
|
@@ -62,6 +66,9 @@
|
|
|
62
66
|
"dev": "vite --port 3000",
|
|
63
67
|
"build": "tsup"
|
|
64
68
|
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@omer-x/zod-to-form-constraints": "^1.0.0"
|
|
71
|
+
},
|
|
65
72
|
"peerDependencies": {
|
|
66
73
|
"@base-ui/react": "^1",
|
|
67
74
|
"@fortawesome/free-brands-svg-icons": "^7",
|
|
@@ -75,20 +82,20 @@
|
|
|
75
82
|
},
|
|
76
83
|
"devDependencies": {
|
|
77
84
|
"@omer-x/eslint-config": "^2.3.2",
|
|
78
|
-
"@tailwindcss/vite": "^4.3.
|
|
79
|
-
"@types/node": "^
|
|
80
|
-
"@types/react": "^19.2.
|
|
85
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
86
|
+
"@types/node": "^26.0.0",
|
|
87
|
+
"@types/react": "^19.2.17",
|
|
81
88
|
"@types/react-dom": "^19.2.3",
|
|
82
|
-
"@vitejs/plugin-react": "^6.0.
|
|
83
|
-
"@vitest/coverage-v8": "^4.1.
|
|
89
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
90
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
84
91
|
"esbuild-fix-imports-plugin": "^1.0.23",
|
|
85
92
|
"eslint": "^9.37.0",
|
|
86
93
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
87
94
|
"eslint-plugin-react": "^7.37.5",
|
|
88
|
-
"semantic-release": "^25.0.
|
|
95
|
+
"semantic-release": "^25.0.5",
|
|
89
96
|
"tsup": "^8.5.1",
|
|
90
97
|
"typescript": "^5",
|
|
91
|
-
"vite": "^8.0.
|
|
92
|
-
"vitest": "^4.1.
|
|
98
|
+
"vite": "^8.0.16",
|
|
99
|
+
"vitest": "^4.1.9"
|
|
93
100
|
}
|
|
94
101
|
}
|