@a2v2ai/uikit 0.0.24 → 0.0.25

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/Input/Input.js CHANGED
@@ -64,15 +64,15 @@ const inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white
64
64
  },
65
65
  });
66
66
  exports.inputVariants = inputVariants;
67
- const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, label, labelVariant, labelColor, leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, id, ...props }, ref) => {
67
+ const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, label, labelVariant = "body2", labelColor = "main-800", leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, id, ...props }, ref) => {
68
68
  const hasAddons = leftIcon || rightIcon || leftAddon || rightAddon || rightElement;
69
69
  const computedVariant = error ? "error" : variant;
70
70
  if (hasAddons) {
71
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, textVariant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
71
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
72
72
  ? "border-error-500 focus-within:border-error-500 focus-within:ring-error-200"
73
73
  : "border-grey-300 focus-within:border-grey-300 focus-within:ring-grey-300/50", size === "mini" && "h-6 pl-3 pr-0.5 text-xs rounded-md", size === "small" && "h-8 pl-3 pr-0.5 text-sm rounded-md", size === "regular" && "h-9 pl-3 pr-0.5 text-sm rounded-lg", size === "large" && "h-10 pl-3 pr-0.5 text-base rounded-lg", !size && "h-9 pl-3 pr-0.5 text-sm rounded-lg", !rightElement && "pr-3", roundness === "round" && "!rounded-full", props.disabled && "opacity-50 cursor-not-allowed bg-grey-50", className), children: [leftIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: leftIcon })), leftAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: leftAddon })), (0, jsx_runtime_1.jsx)("input", { type: type, id: id, className: (0, utils_1.cn)("flex-1 min-w-0 bg-transparent border-0 outline-none placeholder:text-grey-400", "disabled:cursor-not-allowed"), ref: ref, ...props }), rightAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: rightAddon })), rightIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: rightIcon })), rightElement && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: rightElement }))] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
74
74
  }
75
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, textVariant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("input", { type: type, id: id, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
75
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("input", { type: type, id: id, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
76
76
  });
77
77
  exports.Input = Input;
78
78
  Input.displayName = "Input";
package/Label/Label.d.ts CHANGED
@@ -6,7 +6,7 @@ declare const labelVariants: (props?: ({
6
6
  color?: TextColor | null | undefined;
7
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
8
  export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
9
- textVariant?: TextVariant;
9
+ variant?: TextVariant;
10
10
  color?: TextColor;
11
11
  }
12
12
  declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
package/Label/Label.js CHANGED
@@ -46,11 +46,11 @@ const labelVariants = (0, class_variance_authority_1.cva)("font-medium leading-n
46
46
  color: typography_types_1.textColorClasses,
47
47
  },
48
48
  defaultVariants: {
49
- textVariant: undefined,
49
+ textVariant: "body2",
50
50
  color: "main-950",
51
51
  },
52
52
  });
53
53
  exports.labelVariants = labelVariants;
54
- const Label = React.forwardRef(({ className, textVariant, color, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants({ textVariant, color }), className), ...props })));
54
+ const Label = React.forwardRef(({ className, variant, color, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants({ textVariant: variant, color }), className), ...props })));
55
55
  exports.Label = Label;
56
56
  Label.displayName = LabelPrimitive.Root.displayName;
package/Select/Select.js CHANGED
@@ -66,9 +66,9 @@ const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full i
66
66
  },
67
67
  });
68
68
  exports.selectTriggerVariants = selectTriggerVariants;
69
- const SelectTrigger = React.forwardRef(({ className, size, variant, label, labelVariant, labelColor, error, children, id, ...props }, ref) => {
69
+ const SelectTrigger = React.forwardRef(({ className, size, variant, label, labelVariant = "body2", labelColor = "main-800", error, children, id, ...props }, ref) => {
70
70
  const computedVariant = error ? "error" : variant;
71
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, textVariant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, id: id, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
71
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, id: id, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
72
72
  });
73
73
  exports.SelectTrigger = SelectTrigger;
74
74
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
@@ -58,8 +58,8 @@ const textareaVariants = (0, class_variance_authority_1.cva)("flex min-h-[80px]
58
58
  },
59
59
  });
60
60
  exports.textareaVariants = textareaVariants;
61
- const Textarea = React.forwardRef(({ className, variant, resize, label, labelVariant, labelColor, id, ...props }, ref) => {
62
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, textVariant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("textarea", { id: id, className: (0, utils_1.cn)(textareaVariants({ variant, resize }), className), ref: ref, ...props })] }));
61
+ const Textarea = React.forwardRef(({ className, variant, resize, label, labelVariant = "body2", labelColor = "main-800", id, ...props }, ref) => {
62
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("textarea", { id: id, className: (0, utils_1.cn)(textareaVariants({ variant, resize }), className), ref: ref, ...props })] }));
63
63
  });
64
64
  exports.Textarea = Textarea;
65
65
  Textarea.displayName = "Textarea";
@@ -17,7 +17,7 @@ exports.textVariantClasses = {
17
17
  caption: "font-light text-[12px] leading-none tracking-normal font-sans",
18
18
  };
19
19
  exports.textColorClasses = {
20
- default: "text-foreground",
20
+ default: "text-main-800",
21
21
  // Main colors
22
22
  "main-50": "text-main-50",
23
23
  "main-100": "text-main-100",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2v2ai/uikit",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "author": "Arulraj V & abofficial1997@gmail.com",
5
5
  "description": "A React UI component library built with shadcn/ui and Tailwind CSS",
6
6
  "license": "MIT",