@me1a/ui 2.0.12 → 2.0.13
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/chunk-472YNZU2.mjs +2 -0
- package/dist/chunk-472YNZU2.mjs.map +1 -0
- package/dist/chunk-FWZYVYLU.mjs +2 -0
- package/dist/chunk-FWZYVYLU.mjs.map +1 -0
- package/dist/chunk-GH5JAZCC.js +2 -0
- package/dist/chunk-GH5JAZCC.js.map +1 -0
- package/dist/chunk-H3TEQK57.mjs +2 -0
- package/dist/chunk-H3TEQK57.mjs.map +1 -0
- package/dist/chunk-IPKT3LIP.js +2 -0
- package/dist/chunk-IPKT3LIP.js.map +1 -0
- package/dist/chunk-KITWXTCP.js +2 -0
- package/dist/chunk-KITWXTCP.js.map +1 -0
- package/dist/chunk-NCY2ZNET.js +2 -0
- package/dist/chunk-NCY2ZNET.js.map +1 -0
- package/dist/chunk-OAVWSSYJ.mjs +2 -0
- package/dist/chunk-OAVWSSYJ.mjs.map +1 -0
- package/dist/chunk-Q6STEQO7.js +2 -0
- package/dist/chunk-Q6STEQO7.js.map +1 -0
- package/dist/chunk-QY2HB6BB.mjs +2 -0
- package/dist/chunk-QY2HB6BB.mjs.map +1 -0
- package/dist/chunk-XY7LUWOK.mjs +2 -0
- package/dist/chunk-XY7LUWOK.mjs.map +1 -0
- package/dist/chunk-ZEUOBWG4.js +2 -0
- package/dist/chunk-ZEUOBWG4.js.map +1 -0
- package/dist/components/atoms/index.d.mts +483 -0
- package/dist/components/atoms/index.d.ts +483 -0
- package/dist/components/atoms/index.js +2 -0
- package/dist/components/atoms/index.js.map +1 -0
- package/dist/components/atoms/index.mjs +2 -0
- package/dist/components/atoms/index.mjs.map +1 -0
- package/dist/components/molecules/index.d.mts +368 -0
- package/dist/components/molecules/index.d.ts +368 -0
- package/dist/components/molecules/index.js +2 -0
- package/dist/components/molecules/index.js.map +1 -0
- package/dist/components/molecules/index.mjs +2 -0
- package/dist/components/molecules/index.mjs.map +1 -0
- package/dist/components/organisms/index.d.mts +531 -0
- package/dist/components/organisms/index.d.ts +531 -0
- package/dist/components/organisms/index.js +2 -0
- package/dist/components/organisms/index.js.map +1 -0
- package/dist/components/organisms/index.mjs +2 -0
- package/dist/components/organisms/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +3 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +2 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/input-TJ_d3ROF.d.mts +12 -0
- package/dist/input-TJ_d3ROF.d.ts +12 -0
- package/dist/tooltip-Bam0zJCO.d.mts +104 -0
- package/dist/tooltip-Bam0zJCO.d.ts +104 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/utils/index.d.mts +5 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +38 -1
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
- package/dist/index.d.mts +0 -1475
- package/dist/index.d.ts +0 -1475
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props interface for the Button component.
|
|
8
|
+
* Extends the native button HTML attributes and adds support for variants and asChild prop.
|
|
9
|
+
* Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.
|
|
10
|
+
*
|
|
11
|
+
* @interface ButtonProps
|
|
12
|
+
* @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}
|
|
13
|
+
* @extends {VariantProps<typeof buttonVariants>}
|
|
14
|
+
*
|
|
15
|
+
* @property {boolean} [asChild] - When true, renders the button as a child component using Radix UI's Slot.
|
|
16
|
+
* @property {ButtonVariant} [variant] - The visual style variant of the button.
|
|
17
|
+
* @property {ButtonSize} [size] - The size variant of the button.
|
|
18
|
+
* @property {string} [className] - Additional CSS classes to apply to the button.
|
|
19
|
+
* @property {React.ReactNode} [startIcon] - Icon to display before the button text.
|
|
20
|
+
* @property {React.ReactNode} [endIcon] - Icon to display after the button text.
|
|
21
|
+
* @property {boolean} [loading] - Whether the button is in a loading state.
|
|
22
|
+
* @property {string} [type] - The type of button (button, submit, reset). Defaults to "button".
|
|
23
|
+
* @property {string} [aria-label] - Accessible label for the button. Falls back to button text if not provided.
|
|
24
|
+
*/
|
|
25
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
startIcon?: React.ReactNode;
|
|
28
|
+
endIcon?: React.ReactNode;
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
type?: "button" | "submit" | "reset";
|
|
31
|
+
"aria-label"?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Button variant styles using class-variance-authority.
|
|
36
|
+
* Defines the visual styles for different button variants and sizes.
|
|
37
|
+
* Follows WCAG 2.1 Level AA guidelines for accessibility.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Button variant="primary" size="lg">Click me</Button>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const buttonVariants: (props?: ({
|
|
45
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
46
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
47
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
48
|
+
/**
|
|
49
|
+
* A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.
|
|
50
|
+
* Built on top of Radix UI's Slot primitive for maximum flexibility.
|
|
51
|
+
* Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.
|
|
52
|
+
*
|
|
53
|
+
* @url https://segiimelnykov.github.io/ui/?path=/docs/atoms-button--docs
|
|
54
|
+
*
|
|
55
|
+
* @component
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* // Default button
|
|
59
|
+
* <Button>Click me</Button>
|
|
60
|
+
*
|
|
61
|
+
* // Destructive button with small size
|
|
62
|
+
* <Button variant="destructive" size="sm">Delete</Button>
|
|
63
|
+
*
|
|
64
|
+
* // As a link
|
|
65
|
+
* <Button variant="link" asChild>
|
|
66
|
+
* <a href="/about">About</a>
|
|
67
|
+
* </Button>
|
|
68
|
+
*
|
|
69
|
+
* // With icons
|
|
70
|
+
* <Button startIcon={<Icon />}>With Start Icon</Button>
|
|
71
|
+
* <Button endIcon={<Icon />}>With End Icon</Button>
|
|
72
|
+
*
|
|
73
|
+
* // Loading state
|
|
74
|
+
* <Button loading>Loading</Button>
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @param {ButtonProps} props - The component props
|
|
78
|
+
* @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref
|
|
79
|
+
* @returns {JSX.Element} A button element
|
|
80
|
+
*/
|
|
81
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* TooltipProvider component for creating accessible tooltips.
|
|
85
|
+
* Built on top of Radix UI's Tooltip primitive.
|
|
86
|
+
*
|
|
87
|
+
* @url https://segiimelnykov.github.io/ui/?path=/docs/atoms-tooltip--docs
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```tsx
|
|
91
|
+
* <TooltipProvider>
|
|
92
|
+
* <Tooltip>
|
|
93
|
+
* <TooltipTrigger>Hover me</TooltipTrigger>
|
|
94
|
+
* <TooltipContent>Tooltip content</TooltipContent>
|
|
95
|
+
* </Tooltip>
|
|
96
|
+
* </TooltipProvider>
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
100
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
101
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
102
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
|
|
104
|
+
export { type ButtonProps as B, TooltipContent as T, Button as a, buttonVariants as b, Tooltip as c, TooltipTrigger as d, TooltipProvider as e };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@me1a/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./atoms": {
|
|
15
|
+
"types": "./dist/atoms.d.ts",
|
|
16
|
+
"import": "./dist/atoms.mjs",
|
|
17
|
+
"require": "./dist/atoms.js"
|
|
18
|
+
},
|
|
19
|
+
"./molecules": {
|
|
20
|
+
"types": "./dist/molecules.d.ts",
|
|
21
|
+
"import": "./dist/molecules.mjs",
|
|
22
|
+
"require": "./dist/molecules.js"
|
|
23
|
+
},
|
|
24
|
+
"./organisms": {
|
|
25
|
+
"types": "./dist/organisms.d.ts",
|
|
26
|
+
"import": "./dist/organisms.mjs",
|
|
27
|
+
"require": "./dist/organisms.js"
|
|
28
|
+
},
|
|
29
|
+
"./hooks": {
|
|
30
|
+
"types": "./dist/hooks.d.ts",
|
|
31
|
+
"import": "./dist/hooks.mjs",
|
|
32
|
+
"require": "./dist/hooks.js"
|
|
33
|
+
},
|
|
34
|
+
"./utils": {
|
|
35
|
+
"types": "./dist/utils.d.ts",
|
|
36
|
+
"import": "./dist/utils.mjs",
|
|
37
|
+
"require": "./dist/utils.js"
|
|
38
|
+
},
|
|
39
|
+
"./types": {
|
|
40
|
+
"types": "./dist/types.d.ts",
|
|
41
|
+
"import": "./dist/types.mjs",
|
|
42
|
+
"require": "./dist/types.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
8
45
|
"sideEffects": false,
|
|
9
46
|
"files": [
|
|
10
47
|
"dist/**"
|
package/dist/index.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
@tailwind base;@tailwind components;@tailwind utilities;@layer base{:root{--background: 0 0% 100%;--foreground: 0 0% 3.9%;--card: 0 0% 100%;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--primary: 0 0% 9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--sidebar-background: 0 0% 98%;--sidebar-foreground: 240 5.3% 26.1%;--sidebar-primary: 240 5.9% 10%;--sidebar-primary-foreground: 0 0% 98%;--sidebar-accent: 240 4.8% 95.9%;--sidebar-accent-foreground: 240 5.9% 10%;--sidebar-border: 220 13% 91%;--sidebar-ring: 217.2 91.2% 59.8%}.dark{--background: 0 0% 3.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%;--sidebar-background: 240 5.9% 10%;--sidebar-foreground: 240 4.8% 95.9%;--sidebar-primary: 224.3 76.3% 48%;--sidebar-primary-foreground: 0 0% 100%;--sidebar-accent: 240 3.7% 15.9%;--sidebar-accent-foreground: 240 4.8% 95.9%;--sidebar-border: 240 3.7% 15.9%;--sidebar-ring: 217.2 91.2% 59.8%}}@layer base{*{@apply border-border;}body{@apply bg-background text-foreground;}}
|
|
2
|
-
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles/globals.css"],"sourcesContent":["@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n --background: 0 0% 100%;\n --foreground: 0 0% 3.9%;\n\n --card: 0 0% 100%;\n --card-foreground: 0 0% 3.9%;\n \n --popover: 0 0% 100%;\n --popover-foreground: 0 0% 3.9%;\n \n --primary: 0 0% 9%;\n --primary-foreground: 0 0% 98%;\n \n --secondary: 0 0% 96.1%;\n --secondary-foreground: 0 0% 9%;\n \n --muted: 0 0% 96.1%;\n --muted-foreground: 0 0% 45.1%;\n \n --accent: 0 0% 96.1%;\n --accent-foreground: 0 0% 9%;\n \n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n\n --border: 0 0% 89.8%;\n --input: 0 0% 89.8%;\n --ring: 0 0% 3.9%;\n \n --radius: 0.5rem;\n \n --chart-1: 12 76% 61%;\n \n --chart-2: 173 58% 39%;\n \n --chart-3: 197 37% 24%;\n \n --chart-4: 43 74% 66%;\n \n --chart-5: 27 87% 67%;\n \n --sidebar-background: 0 0% 98%;\n \n --sidebar-foreground: 240 5.3% 26.1%;\n \n --sidebar-primary: 240 5.9% 10%;\n \n --sidebar-primary-foreground: 0 0% 98%;\n \n --sidebar-accent: 240 4.8% 95.9%;\n \n --sidebar-accent-foreground: 240 5.9% 10%;\n \n --sidebar-border: 220 13% 91%;\n \n --sidebar-ring: 217.2 91.2% 59.8%;\n }\n \n .dark {\n --background: 0 0% 3.9%;\n --foreground: 0 0% 98%;\n \n --card: 0 0% 3.9%;\n --card-foreground: 0 0% 98%;\n \n --popover: 0 0% 3.9%;\n --popover-foreground: 0 0% 98%;\n \n --primary: 0 0% 98%;\n --primary-foreground: 0 0% 9%;\n \n --secondary: 0 0% 14.9%;\n --secondary-foreground: 0 0% 98%;\n \n --muted: 0 0% 14.9%;\n --muted-foreground: 0 0% 63.9%;\n \n --accent: 0 0% 14.9%;\n --accent-foreground: 0 0% 98%;\n \n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n \n --border: 0 0% 14.9%;\n --input: 0 0% 14.9%;\n --ring: 0 0% 83.1%;\n --chart-1: 220 70% 50%;\n --chart-2: 160 60% 45%;\n --chart-3: 30 80% 55%;\n --chart-4: 280 65% 60%;\n --chart-5: 340 75% 55%;\n --sidebar-background: 240 5.9% 10%;\n --sidebar-foreground: 240 4.8% 95.9%;\n --sidebar-primary: 224.3 76.3% 48%;\n --sidebar-primary-foreground: 0 0% 100%;\n --sidebar-accent: 240 3.7% 15.9%;\n --sidebar-accent-foreground: 240 4.8% 95.9%;\n --sidebar-border: 240 3.7% 15.9%;\n --sidebar-ring: 217.2 91.2% 59.8%;\n }\n}\n \n@layer base {\n * {\n @apply border-border;\n }\n body {\n @apply bg-background text-foreground;\n }\n} "],"mappings":"AAAA,UAAU,KACV,UAAU,WACV,UAAU,UAEV,YACE,MACE,cAAc,EAAE,GAAG,KACnB,cAAc,EAAE,GAAG,KAEnB,QAAQ,EAAE,GAAG,KACb,mBAAmB,EAAE,GAAG,KAExB,WAAW,EAAE,GAAG,KAChB,sBAAsB,EAAE,GAAG,KAE3B,WAAW,EAAE,GAAG,GAChB,sBAAsB,EAAE,GAAG,IAE3B,aAAa,EAAE,GAAG,MAClB,wBAAwB,EAAE,GAAG,GAE7B,SAAS,EAAE,GAAG,MACd,oBAAoB,EAAE,GAAG,MAEzB,UAAU,EAAE,GAAG,MACf,qBAAqB,EAAE,GAAG,GAE1B,eAAe,EAAE,MAAM,MACvB,0BAA0B,EAAE,GAAG,IAE/B,UAAU,EAAE,GAAG,MACf,SAAS,EAAE,GAAG,MACd,QAAQ,EAAE,GAAG,KAEb,UAAU,MAEV,WAAW,GAAG,IAAI,IAElB,WAAW,IAAI,IAAI,IAEnB,WAAW,IAAI,IAAI,IAEnB,WAAW,GAAG,IAAI,IAElB,WAAW,GAAG,IAAI,IAElB,sBAAsB,EAAE,GAAG,IAE3B,sBAAsB,IAAI,KAAK,MAE/B,mBAAmB,IAAI,KAAK,IAE5B,8BAA8B,EAAE,GAAG,IAEnC,kBAAkB,IAAI,KAAK,MAE3B,6BAA6B,IAAI,KAAK,IAEtC,kBAAkB,IAAI,IAAI,IAE1B,gBAAgB,MAAM,MAAM,KAC9B,CAEA,CAAC,KACC,cAAc,EAAE,GAAG,KACnB,cAAc,EAAE,GAAG,IAEnB,QAAQ,EAAE,GAAG,KACb,mBAAmB,EAAE,GAAG,IAExB,WAAW,EAAE,GAAG,KAChB,sBAAsB,EAAE,GAAG,IAE3B,WAAW,EAAE,GAAG,IAChB,sBAAsB,EAAE,GAAG,GAE3B,aAAa,EAAE,GAAG,MAClB,wBAAwB,EAAE,GAAG,IAE7B,SAAS,EAAE,GAAG,MACd,oBAAoB,EAAE,GAAG,MAEzB,UAAU,EAAE,GAAG,MACf,qBAAqB,EAAE,GAAG,IAE1B,eAAe,EAAE,MAAM,MACvB,0BAA0B,EAAE,GAAG,IAE/B,UAAU,EAAE,GAAG,MACf,SAAS,EAAE,GAAG,MACd,QAAQ,EAAE,GAAG,MACb,WAAW,IAAI,IAAI,IACnB,WAAW,IAAI,IAAI,IACnB,WAAW,GAAG,IAAI,IAClB,WAAW,IAAI,IAAI,IACnB,WAAW,IAAI,IAAI,IACnB,sBAAsB,IAAI,KAAK,IAC/B,sBAAsB,IAAI,KAAK,MAC/B,mBAAmB,MAAM,MAAM,IAC/B,8BAA8B,EAAE,GAAG,KACnC,kBAAkB,IAAI,KAAK,MAC3B,6BAA6B,IAAI,KAAK,MACtC,kBAAkB,IAAI,KAAK,MAC3B,gBAAgB,MAAM,MAAM,KAC9B,CACF,CAEA,YACE,EACE,OAAO,cACT,CACA,KACE,OAAO,cAAc,gBACvB,CACF","names":[]}
|