the-omelet-ui 0.1.0
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/index.cjs +52 -0
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +30 -0
- package/package.json +36 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
|
|
29
|
+
// src/button.tsx
|
|
30
|
+
var styles = classVarianceAuthority.cva(
|
|
31
|
+
"inline-flex items-center justify-center rounded-xl font-medium outline-none transition-colors focus-visible:ring-2 ring-black/20 disabled:opacity-50 disabled:pointer-events-none",
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
variant: {
|
|
35
|
+
solid: "bg-black text-white hover:bg-black/85",
|
|
36
|
+
outline: "border border-black text-black hover:bg-black/5",
|
|
37
|
+
ghost: "text-black hover:bg-black/5"
|
|
38
|
+
},
|
|
39
|
+
size: { sm: "h-9 px-3 text-sm", md: "h-10 px-4", lg: "h-11 px-5 text-base" }
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: { variant: "solid", size: "md" }
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
var Button = React__namespace.forwardRef(
|
|
45
|
+
({ className, variant, size, asChild, ...props }, ref) => {
|
|
46
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
47
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ref, className: tailwindMerge.twMerge(styles({ variant, size }), className), ...props });
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
Button.displayName = "Button";
|
|
51
|
+
|
|
52
|
+
exports.Button = Button;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const styles: (props?: ({
|
|
6
|
+
variant?: "solid" | "outline" | "ghost" | null | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof styles> {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
|
|
14
|
+
export { Button, type ButtonProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const styles: (props?: ({
|
|
6
|
+
variant?: "solid" | "outline" | "ghost" | null | undefined;
|
|
7
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof styles> {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
|
|
14
|
+
export { Button, type ButtonProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/button.tsx
|
|
8
|
+
var styles = cva(
|
|
9
|
+
"inline-flex items-center justify-center rounded-xl font-medium outline-none transition-colors focus-visible:ring-2 ring-black/20 disabled:opacity-50 disabled:pointer-events-none",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
solid: "bg-black text-white hover:bg-black/85",
|
|
14
|
+
outline: "border border-black text-black hover:bg-black/5",
|
|
15
|
+
ghost: "text-black hover:bg-black/5"
|
|
16
|
+
},
|
|
17
|
+
size: { sm: "h-9 px-3 text-sm", md: "h-10 px-4", lg: "h-11 px-5 text-base" }
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: { variant: "solid", size: "md" }
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
var Button = React.forwardRef(
|
|
23
|
+
({ className, variant, size, asChild, ...props }, ref) => {
|
|
24
|
+
const Comp = asChild ? Slot : "button";
|
|
25
|
+
return /* @__PURE__ */ jsx(Comp, { ref, className: twMerge(styles({ variant, size }), className), ...props });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
Button.displayName = "Button";
|
|
29
|
+
|
|
30
|
+
export { Button };
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "the-omelet-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"@radix-ui/react-slot": "^1.0.0",
|
|
19
|
+
"react": ">=18",
|
|
20
|
+
"react-dom": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/react": "^19.1.15",
|
|
24
|
+
"@types/react-dom": "^19.1.9",
|
|
25
|
+
"tsup": "^8.0.0",
|
|
26
|
+
"typescript": "^5.0.0"
|
|
27
|
+
},
|
|
28
|
+
"files": ["dist", "styles", "README.md", "LICENSE"],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsup"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"class-variance-authority": "^0.7.1",
|
|
34
|
+
"tailwind-merge": "^3.3.1"
|
|
35
|
+
}
|
|
36
|
+
}
|