@a2v2ai/uikit 0.0.22 → 0.0.24

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.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type TextVariant, type TextColor } from "../lib/typography-types";
2
3
  type InputSize = "mini" | "small" | "regular" | "large";
3
4
  type InputRoundness = "default" | "round";
4
5
  type InputVariant = "default" | "error";
@@ -11,6 +12,9 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
11
12
  size?: InputSize;
12
13
  roundness?: InputRoundness;
13
14
  variant?: InputVariant;
15
+ label?: string;
16
+ labelVariant?: TextVariant;
17
+ labelColor?: TextColor;
14
18
  leftIcon?: React.ReactNode;
15
19
  rightIcon?: React.ReactNode;
16
20
  leftAddon?: React.ReactNode;
package/Input/Input.js CHANGED
@@ -39,6 +39,7 @@ const React = __importStar(require("react"));
39
39
  const class_variance_authority_1 = require("class-variance-authority");
40
40
  const utils_1 = require("../lib/utils");
41
41
  const Typography_1 = require("../Typography/Typography");
42
+ const Label_1 = require("../Label/Label");
42
43
  const inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white border font-normal font-sans transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
43
44
  variants: {
44
45
  size: {
@@ -63,15 +64,15 @@ const inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white
63
64
  },
64
65
  });
65
66
  exports.inputVariants = inputVariants;
66
- const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, ...props }, ref) => {
67
+ const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, label, labelVariant, labelColor, leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, id, ...props }, ref) => {
67
68
  const hasAddons = leftIcon || rightIcon || leftAddon || rightAddon || rightElement;
68
69
  const computedVariant = error ? "error" : variant;
69
70
  if (hasAddons) {
70
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(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, 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
72
  ? "border-error-500 focus-within:border-error-500 focus-within:ring-error-200"
72
- : "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, 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 }))] }));
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 }))] }));
73
74
  }
74
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsx)("input", { type: type, 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, 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
76
  });
76
77
  exports.Input = Input;
77
78
  Input.displayName = "Input";
package/Label/Label.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import * as React from "react";
2
2
  import * as LabelPrimitive from "@radix-ui/react-label";
3
- type LabelVariant = "default" | "muted" | "error";
3
+ import { type TextVariant, type TextColor } from "../lib/typography-types";
4
4
  declare const labelVariants: (props?: ({
5
- variant?: "default" | "error" | "muted" | null | undefined;
5
+ textVariant?: TextVariant | null | undefined;
6
+ color?: TextColor | null | undefined;
6
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
8
  export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
8
- variant?: LabelVariant;
9
+ textVariant?: TextVariant;
10
+ color?: TextColor;
9
11
  }
10
12
  declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
11
13
  export { Label, labelVariants };
12
- export type { LabelVariant };
package/Label/Label.js CHANGED
@@ -39,19 +39,18 @@ const React = __importStar(require("react"));
39
39
  const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
40
40
  const class_variance_authority_1 = require("class-variance-authority");
41
41
  const utils_1 = require("../lib/utils");
42
- const labelVariants = (0, class_variance_authority_1.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", {
42
+ const typography_types_1 = require("../lib/typography-types");
43
+ const labelVariants = (0, class_variance_authority_1.cva)("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", {
43
44
  variants: {
44
- variant: {
45
- default: "text-main-950",
46
- muted: "text-grey-500",
47
- error: "text-error-600",
48
- },
45
+ textVariant: typography_types_1.textVariantClasses,
46
+ color: typography_types_1.textColorClasses,
49
47
  },
50
48
  defaultVariants: {
51
- variant: "default",
49
+ textVariant: undefined,
50
+ color: "main-950",
52
51
  },
53
52
  });
54
53
  exports.labelVariants = labelVariants;
55
- const Label = React.forwardRef(({ className, variant, ...props }, ref) => ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(labelVariants({ variant }), className), ...props })));
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 })));
56
55
  exports.Label = Label;
57
56
  Label.displayName = LabelPrimitive.Root.displayName;
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { type TextVariant, type TextColor } from "../lib/typography-types";
3
4
  type SelectTriggerSize = "small" | "regular" | "large";
4
5
  type SelectTriggerVariant = "default" | "error";
5
6
  declare const Select: React.FC<SelectPrimitive.SelectProps>;
@@ -12,6 +13,9 @@ declare const selectTriggerVariants: (props?: ({
12
13
  export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
13
14
  size?: SelectTriggerSize;
14
15
  variant?: SelectTriggerVariant;
16
+ label?: string;
17
+ labelVariant?: TextVariant;
18
+ labelColor?: TextColor;
15
19
  error?: string;
16
20
  }
17
21
  declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
package/Select/Select.js CHANGED
@@ -41,6 +41,7 @@ const lucide_react_1 = require("lucide-react");
41
41
  const class_variance_authority_1 = require("class-variance-authority");
42
42
  const utils_1 = require("../lib/utils");
43
43
  const Typography_1 = require("../Typography/Typography");
44
+ const Label_1 = require("../Label/Label");
44
45
  const Select = SelectPrimitive.Root;
45
46
  exports.Select = Select;
46
47
  const SelectGroup = SelectPrimitive.Group;
@@ -65,9 +66,9 @@ const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full i
65
66
  },
66
67
  });
67
68
  exports.selectTriggerVariants = selectTriggerVariants;
68
- const SelectTrigger = React.forwardRef(({ className, size, variant, error, children, ...props }, ref) => {
69
+ const SelectTrigger = React.forwardRef(({ className, size, variant, label, labelVariant, labelColor, error, children, id, ...props }, ref) => {
69
70
  const computedVariant = error ? "error" : variant;
70
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, 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, 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
72
  });
72
73
  exports.SelectTrigger = SelectTrigger;
73
74
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ interface SidebarContextValue {
4
+ collapsed: boolean;
5
+ setCollapsed: (collapsed: boolean) => void;
6
+ }
7
+ declare function useSidebar(): SidebarContextValue;
8
+ export interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ collapsed?: boolean;
10
+ onCollapsedChange?: (collapsed: boolean) => void;
11
+ defaultCollapsed?: boolean;
12
+ }
13
+ declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLDivElement>>;
14
+ export type SidebarHeaderProps = React.HTMLAttributes<HTMLDivElement>;
15
+ declare const SidebarHeader: React.ForwardRefExoticComponent<SidebarHeaderProps & React.RefAttributes<HTMLDivElement>>;
16
+ export type SidebarContentProps = React.HTMLAttributes<HTMLDivElement>;
17
+ declare const SidebarContent: React.ForwardRefExoticComponent<SidebarContentProps & React.RefAttributes<HTMLDivElement>>;
18
+ export type SidebarFooterProps = React.HTMLAttributes<HTMLDivElement>;
19
+ declare const SidebarFooter: React.ForwardRefExoticComponent<SidebarFooterProps & React.RefAttributes<HTMLDivElement>>;
20
+ export type SidebarGroupProps = React.HTMLAttributes<HTMLDivElement>;
21
+ declare const SidebarGroup: React.ForwardRefExoticComponent<SidebarGroupProps & React.RefAttributes<HTMLDivElement>>;
22
+ export type SidebarGroupLabelProps = React.HTMLAttributes<HTMLDivElement>;
23
+ declare const SidebarGroupLabel: React.ForwardRefExoticComponent<SidebarGroupLabelProps & React.RefAttributes<HTMLDivElement>>;
24
+ declare const sidebarMenuItemVariants: (props?: ({
25
+ active?: boolean | null | undefined;
26
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
27
+ export interface SidebarMenuItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sidebarMenuItemVariants> {
28
+ icon?: React.ReactNode;
29
+ label: string;
30
+ badge?: React.ReactNode;
31
+ hasChildren?: boolean;
32
+ expanded?: boolean;
33
+ onExpandedChange?: (expanded: boolean) => void;
34
+ }
35
+ declare const SidebarMenuItem: React.ForwardRefExoticComponent<SidebarMenuItemProps & React.RefAttributes<HTMLDivElement>>;
36
+ declare const sidebarSubMenuItemVariants: (props?: ({
37
+ active?: boolean | null | undefined;
38
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
39
+ export interface SidebarSubMenuItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sidebarSubMenuItemVariants> {
40
+ label: string;
41
+ }
42
+ declare const SidebarSubMenuItem: React.ForwardRefExoticComponent<SidebarSubMenuItemProps & React.RefAttributes<HTMLDivElement>>;
43
+ export type SidebarSeparatorProps = React.HTMLAttributes<HTMLDivElement>;
44
+ declare const SidebarSeparator: React.ForwardRefExoticComponent<SidebarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
45
+ export type SidebarToggleProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
46
+ declare const SidebarToggle: React.ForwardRefExoticComponent<SidebarToggleProps & React.RefAttributes<HTMLButtonElement>>;
47
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, };
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.sidebarSubMenuItemVariants = exports.sidebarMenuItemVariants = exports.SidebarToggle = exports.SidebarSeparator = exports.SidebarSubMenuItem = exports.SidebarMenuItem = exports.SidebarGroupLabel = exports.SidebarGroup = exports.SidebarFooter = exports.SidebarContent = exports.SidebarHeader = exports.Sidebar = void 0;
37
+ exports.useSidebar = useSidebar;
38
+ const jsx_runtime_1 = require("react/jsx-runtime");
39
+ const React = __importStar(require("react"));
40
+ const class_variance_authority_1 = require("class-variance-authority");
41
+ const lucide_react_1 = require("lucide-react");
42
+ const utils_1 = require("../lib/utils");
43
+ const SidebarContext = React.createContext(undefined);
44
+ function useSidebar() {
45
+ const context = React.useContext(SidebarContext);
46
+ if (!context) {
47
+ throw new Error("useSidebar must be used within a Sidebar");
48
+ }
49
+ return context;
50
+ }
51
+ const Sidebar = React.forwardRef(({ className, collapsed: controlledCollapsed, onCollapsedChange, defaultCollapsed = false, children, ...props }, ref) => {
52
+ const [uncontrolledCollapsed, setUncontrolledCollapsed] = React.useState(defaultCollapsed);
53
+ const isControlled = controlledCollapsed !== undefined;
54
+ const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
55
+ const setCollapsed = React.useCallback((value) => {
56
+ if (!isControlled) {
57
+ setUncontrolledCollapsed(value);
58
+ }
59
+ onCollapsedChange?.(value);
60
+ }, [isControlled, onCollapsedChange]);
61
+ return ((0, jsx_runtime_1.jsx)(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: (0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar", "data-collapsed": collapsed, className: (0, utils_1.cn)("flex h-full flex-col bg-white border-r border-grey-200 transition-all duration-300", collapsed ? "w-[52px]" : "w-[240px]", className), ...props, children: children }) }));
62
+ });
63
+ exports.Sidebar = Sidebar;
64
+ Sidebar.displayName = "Sidebar";
65
+ const SidebarHeader = React.forwardRef(({ className, children, ...props }, ref) => {
66
+ const { collapsed } = useSidebar();
67
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-header", className: (0, utils_1.cn)("flex shrink-0 items-center", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
68
+ });
69
+ exports.SidebarHeader = SidebarHeader;
70
+ SidebarHeader.displayName = "SidebarHeader";
71
+ const SidebarContent = React.forwardRef(({ className, children, ...props }, ref) => {
72
+ const { collapsed } = useSidebar();
73
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-content", className: (0, utils_1.cn)("flex-1 overflow-y-auto", collapsed ? "px-2 py-4" : "p-4", className), ...props, children: children }));
74
+ });
75
+ exports.SidebarContent = SidebarContent;
76
+ SidebarContent.displayName = "SidebarContent";
77
+ const SidebarFooter = React.forwardRef(({ className, children, ...props }, ref) => {
78
+ const { collapsed } = useSidebar();
79
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-footer", className: (0, utils_1.cn)("flex shrink-0 items-center border-t border-grey-200", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
80
+ });
81
+ exports.SidebarFooter = SidebarFooter;
82
+ SidebarFooter.displayName = "SidebarFooter";
83
+ const SidebarGroup = React.forwardRef(({ className, children, ...props }, ref) => {
84
+ const { collapsed } = useSidebar();
85
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-group", className: (0, utils_1.cn)("flex flex-col", collapsed ? "gap-1" : "gap-0.5", className), ...props, children: children }));
86
+ });
87
+ exports.SidebarGroup = SidebarGroup;
88
+ SidebarGroup.displayName = "SidebarGroup";
89
+ const SidebarGroupLabel = React.forwardRef(({ className, children, ...props }, ref) => {
90
+ const { collapsed } = useSidebar();
91
+ if (collapsed)
92
+ return null;
93
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-group-label", className: (0, utils_1.cn)("px-3 py-2 text-xs font-normal text-grey-500", className), ...props, children: children }));
94
+ });
95
+ exports.SidebarGroupLabel = SidebarGroupLabel;
96
+ SidebarGroupLabel.displayName = "SidebarGroupLabel";
97
+ /* -----------------------------------------------------------------------------
98
+ * SidebarMenuItem
99
+ * -------------------------------------------------------------------------- */
100
+ const sidebarMenuItemVariants = (0, class_variance_authority_1.cva)("flex items-center gap-2 px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
101
+ variants: {
102
+ active: {
103
+ true: "bg-grey-100 text-grey-900",
104
+ false: "text-grey-600 hover:bg-grey-50",
105
+ },
106
+ },
107
+ defaultVariants: {
108
+ active: false,
109
+ },
110
+ });
111
+ exports.sidebarMenuItemVariants = sidebarMenuItemVariants;
112
+ const SidebarMenuItem = React.forwardRef(({ className, icon, label, badge, active, hasChildren, expanded, onExpandedChange, children, onClick, ...props }, ref) => {
113
+ const { collapsed } = useSidebar();
114
+ const [internalExpanded, setInternalExpanded] = React.useState(expanded ?? false);
115
+ const isExpanded = expanded !== undefined ? expanded : internalExpanded;
116
+ const handleClick = (e) => {
117
+ if (hasChildren) {
118
+ const newExpanded = !isExpanded;
119
+ setInternalExpanded(newExpanded);
120
+ onExpandedChange?.(newExpanded);
121
+ }
122
+ onClick?.(e);
123
+ };
124
+ if (collapsed) {
125
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-menu-item", className: (0, utils_1.cn)("flex items-center justify-center size-9 rounded-lg cursor-pointer transition-colors mx-auto", active ? "bg-grey-100 text-grey-900" : "text-grey-600 hover:bg-grey-50", className), onClick: onClick, ...props, children: icon && (0, jsx_runtime_1.jsx)("span", { className: "size-4", children: icon }) }));
126
+ }
127
+ return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "sidebar-menu-item-wrapper", children: [(0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-slot": "sidebar-menu-item", className: (0, utils_1.cn)(sidebarMenuItemVariants({ active }), className), onClick: handleClick, ...props, children: [icon && (0, jsx_runtime_1.jsx)("span", { className: "size-4 shrink-0", children: icon }), (0, jsx_runtime_1.jsx)("span", { className: "flex-1 truncate", children: label }), badge && (0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: badge }), hasChildren && ((0, jsx_runtime_1.jsx)("span", { className: "size-4 shrink-0 text-grey-400", children: isExpanded ? (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4" }) : (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "size-4" }) }))] }), hasChildren && isExpanded && children && ((0, jsx_runtime_1.jsx)("div", { className: "ml-6 mt-1 flex flex-col", children: children }))] }));
128
+ });
129
+ exports.SidebarMenuItem = SidebarMenuItem;
130
+ SidebarMenuItem.displayName = "SidebarMenuItem";
131
+ /* -----------------------------------------------------------------------------
132
+ * SidebarSubMenuItem
133
+ * -------------------------------------------------------------------------- */
134
+ const sidebarSubMenuItemVariants = (0, class_variance_authority_1.cva)("flex items-center px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
135
+ variants: {
136
+ active: {
137
+ true: "bg-grey-100 text-grey-900",
138
+ false: "text-grey-500 hover:bg-grey-50 hover:text-grey-700",
139
+ },
140
+ },
141
+ defaultVariants: {
142
+ active: false,
143
+ },
144
+ });
145
+ exports.sidebarSubMenuItemVariants = sidebarSubMenuItemVariants;
146
+ const SidebarSubMenuItem = React.forwardRef(({ className, label, active, ...props }, ref) => {
147
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-sub-menu-item", className: (0, utils_1.cn)(sidebarSubMenuItemVariants({ active }), className), ...props, children: (0, jsx_runtime_1.jsx)("span", { className: "truncate", children: label }) }));
148
+ });
149
+ exports.SidebarSubMenuItem = SidebarSubMenuItem;
150
+ SidebarSubMenuItem.displayName = "SidebarSubMenuItem";
151
+ const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => {
152
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-separator", className: (0, utils_1.cn)("my-2 h-px bg-grey-200", className), ...props }));
153
+ });
154
+ exports.SidebarSeparator = SidebarSeparator;
155
+ SidebarSeparator.displayName = "SidebarSeparator";
156
+ const SidebarToggle = React.forwardRef(({ className, children, ...props }, ref) => {
157
+ const { collapsed, setCollapsed } = useSidebar();
158
+ return ((0, jsx_runtime_1.jsx)("button", { ref: ref, "data-slot": "sidebar-toggle", type: "button", className: (0, utils_1.cn)("flex items-center justify-center p-2 rounded-md text-grey-500 hover:bg-grey-100 hover:text-grey-700 transition-colors", className), onClick: () => setCollapsed(!collapsed), ...props, children: children }));
159
+ });
160
+ exports.SidebarToggle = SidebarToggle;
161
+ SidebarToggle.displayName = "SidebarToggle";
@@ -0,0 +1,2 @@
1
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, } from "./Sidebar";
2
+ export type { SidebarProps, SidebarHeaderProps, SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarGroupLabelProps, SidebarMenuItemProps, SidebarSubMenuItemProps, SidebarSeparatorProps, SidebarToggleProps, } from "./Sidebar";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sidebarSubMenuItemVariants = exports.sidebarMenuItemVariants = exports.useSidebar = exports.SidebarToggle = exports.SidebarSeparator = exports.SidebarSubMenuItem = exports.SidebarMenuItem = exports.SidebarGroupLabel = exports.SidebarGroup = exports.SidebarFooter = exports.SidebarContent = exports.SidebarHeader = exports.Sidebar = void 0;
4
+ var Sidebar_1 = require("./Sidebar");
5
+ Object.defineProperty(exports, "Sidebar", { enumerable: true, get: function () { return Sidebar_1.Sidebar; } });
6
+ Object.defineProperty(exports, "SidebarHeader", { enumerable: true, get: function () { return Sidebar_1.SidebarHeader; } });
7
+ Object.defineProperty(exports, "SidebarContent", { enumerable: true, get: function () { return Sidebar_1.SidebarContent; } });
8
+ Object.defineProperty(exports, "SidebarFooter", { enumerable: true, get: function () { return Sidebar_1.SidebarFooter; } });
9
+ Object.defineProperty(exports, "SidebarGroup", { enumerable: true, get: function () { return Sidebar_1.SidebarGroup; } });
10
+ Object.defineProperty(exports, "SidebarGroupLabel", { enumerable: true, get: function () { return Sidebar_1.SidebarGroupLabel; } });
11
+ Object.defineProperty(exports, "SidebarMenuItem", { enumerable: true, get: function () { return Sidebar_1.SidebarMenuItem; } });
12
+ Object.defineProperty(exports, "SidebarSubMenuItem", { enumerable: true, get: function () { return Sidebar_1.SidebarSubMenuItem; } });
13
+ Object.defineProperty(exports, "SidebarSeparator", { enumerable: true, get: function () { return Sidebar_1.SidebarSeparator; } });
14
+ Object.defineProperty(exports, "SidebarToggle", { enumerable: true, get: function () { return Sidebar_1.SidebarToggle; } });
15
+ Object.defineProperty(exports, "useSidebar", { enumerable: true, get: function () { return Sidebar_1.useSidebar; } });
16
+ Object.defineProperty(exports, "sidebarMenuItemVariants", { enumerable: true, get: function () { return Sidebar_1.sidebarMenuItemVariants; } });
17
+ Object.defineProperty(exports, "sidebarSubMenuItemVariants", { enumerable: true, get: function () { return Sidebar_1.sidebarSubMenuItemVariants; } });
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type TextVariant, type TextColor } from "../lib/typography-types";
2
3
  type TextareaVariant = "default" | "error";
3
4
  type TextareaResize = "none" | "vertical" | "horizontal" | "both";
4
5
  declare const textareaVariants: (props?: ({
@@ -8,6 +9,9 @@ declare const textareaVariants: (props?: ({
8
9
  export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
9
10
  variant?: TextareaVariant;
10
11
  resize?: TextareaResize;
12
+ label?: string;
13
+ labelVariant?: TextVariant;
14
+ labelColor?: TextColor;
11
15
  }
12
16
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
13
17
  export { Textarea, textareaVariants };
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const React = __importStar(require("react"));
39
39
  const class_variance_authority_1 = require("class-variance-authority");
40
40
  const utils_1 = require("../lib/utils");
41
+ const Label_1 = require("../Label/Label");
41
42
  const textareaVariants = (0, class_variance_authority_1.cva)("flex min-h-[80px] w-full rounded-lg border bg-white px-3 py-2 text-sm font-normal font-sans transition-colors placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
42
43
  variants: {
43
44
  variant: {
@@ -57,8 +58,8 @@ const textareaVariants = (0, class_variance_authority_1.cva)("flex min-h-[80px]
57
58
  },
58
59
  });
59
60
  exports.textareaVariants = textareaVariants;
60
- const Textarea = React.forwardRef(({ className, variant, resize, ...props }, ref) => {
61
- return ((0, jsx_runtime_1.jsx)("textarea", { className: (0, utils_1.cn)(textareaVariants({ variant, resize }), className), ref: ref, ...props }));
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 })] }));
62
63
  });
63
64
  exports.Textarea = Textarea;
64
65
  Textarea.displayName = "Textarea";
@@ -1,11 +1,12 @@
1
1
  import * as React from "react";
2
+ import { type TextVariant, type TextColor } from "../lib/typography-types";
2
3
  declare const typographyVariants: (props?: ({
3
4
  align?: "center" | "left" | "right" | "justify" | null | undefined;
4
- variant?: "h5" | "h2" | "h3" | "caption" | "h1" | "h4" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "body3" | "subtitle3" | null | undefined;
5
- color?: "default" | "main-50" | "main-100" | "main-200" | "main-300" | "main-400" | "main-500" | "main-600" | "main-700" | "main-800" | "main-900" | "main-950" | "success-50" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "success-950" | "accent-50" | "accent-100" | "accent-200" | "accent-300" | "accent-400" | "accent-500" | "accent-600" | "accent-700" | "accent-800" | "accent-900" | "accent-950" | "error-50" | "error-100" | "error-200" | "error-300" | "error-400" | "error-500" | "error-600" | "error-700" | "error-800" | "error-900" | "error-950" | "warning-50" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "warning-950" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900" | "grey-950" | null | undefined;
5
+ variant?: TextVariant | null | undefined;
6
+ color?: TextColor | null | undefined;
6
7
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "subtitle3" | "body1" | "body2" | "body3" | "caption";
8
- type TypographyColor = "default" | "main-50" | "main-100" | "main-200" | "main-300" | "main-400" | "main-500" | "main-600" | "main-700" | "main-800" | "main-900" | "main-950" | "success-50" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "success-950" | "accent-50" | "accent-100" | "accent-200" | "accent-300" | "accent-400" | "accent-500" | "accent-600" | "accent-700" | "accent-800" | "accent-900" | "accent-950" | "error-50" | "error-100" | "error-200" | "error-300" | "error-400" | "error-500" | "error-600" | "error-700" | "error-800" | "error-900" | "error-950" | "warning-50" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "warning-950" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900" | "grey-950";
8
+ type TypographyVariant = TextVariant;
9
+ type TypographyColor = TextColor;
9
10
  type TypographyAlign = "left" | "center" | "right" | "justify";
10
11
  type TypographyProps<T extends React.ElementType = "p"> = {
11
12
  as?: T;
@@ -6,6 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const react_slot_1 = require("@radix-ui/react-slot");
7
7
  const class_variance_authority_1 = require("class-variance-authority");
8
8
  const utils_1 = require("../lib/utils");
9
+ const typography_types_1 = require("../lib/typography-types");
9
10
  const typographyVariants = (0, class_variance_authority_1.cva)("", {
10
11
  variants: {
11
12
  align: {
@@ -14,96 +15,8 @@ const typographyVariants = (0, class_variance_authority_1.cva)("", {
14
15
  right: "text-right",
15
16
  justify: "text-justify",
16
17
  },
17
- variant: {
18
- h1: "font-extrabold text-[64px] leading-none tracking-normal font-sans",
19
- h2: "font-bold text-[48px] leading-none tracking-normal font-sans",
20
- h3: "font-bold text-[32px] leading-none tracking-normal font-sans",
21
- h4: "font-bold text-[24px] leading-[1.2] tracking-[-0.48px] font-sans",
22
- h5: "font-bold text-[20px] leading-none tracking-normal font-sans",
23
- h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
24
- subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
25
- subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
26
- subtitle3: "font-semibold text-[16px] leading-none tracking-normal font-sans",
27
- body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
28
- body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
29
- body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
30
- caption: "font-light text-[12px] leading-none tracking-normal font-sans",
31
- },
32
- color: {
33
- default: "text-foreground",
34
- // Main colors
35
- "main-50": "text-main-50",
36
- "main-100": "text-main-100",
37
- "main-200": "text-main-200",
38
- "main-300": "text-main-300",
39
- "main-400": "text-main-400",
40
- "main-500": "text-main-500",
41
- "main-600": "text-main-600",
42
- "main-700": "text-main-700",
43
- "main-800": "text-main-800",
44
- "main-900": "text-main-900",
45
- "main-950": "text-main-950",
46
- // Success colors
47
- "success-50": "text-success-50",
48
- "success-100": "text-success-100",
49
- "success-200": "text-success-200",
50
- "success-300": "text-success-300",
51
- "success-400": "text-success-400",
52
- "success-500": "text-success-500",
53
- "success-600": "text-success-600",
54
- "success-700": "text-success-700",
55
- "success-800": "text-success-800",
56
- "success-900": "text-success-900",
57
- "success-950": "text-success-950",
58
- // Accent colors
59
- "accent-50": "text-accent-50",
60
- "accent-100": "text-accent-100",
61
- "accent-200": "text-accent-200",
62
- "accent-300": "text-accent-300",
63
- "accent-400": "text-accent-400",
64
- "accent-500": "text-accent-500",
65
- "accent-600": "text-accent-600",
66
- "accent-700": "text-accent-700",
67
- "accent-800": "text-accent-800",
68
- "accent-900": "text-accent-900",
69
- "accent-950": "text-accent-950",
70
- // Error colors
71
- "error-50": "text-error-50",
72
- "error-100": "text-error-100",
73
- "error-200": "text-error-200",
74
- "error-300": "text-error-300",
75
- "error-400": "text-error-400",
76
- "error-500": "text-error-500",
77
- "error-600": "text-error-600",
78
- "error-700": "text-error-700",
79
- "error-800": "text-error-800",
80
- "error-900": "text-error-900",
81
- "error-950": "text-error-950",
82
- // Warning colors
83
- "warning-50": "text-warning-50",
84
- "warning-100": "text-warning-100",
85
- "warning-200": "text-warning-200",
86
- "warning-300": "text-warning-300",
87
- "warning-400": "text-warning-400",
88
- "warning-500": "text-warning-500",
89
- "warning-600": "text-warning-600",
90
- "warning-700": "text-warning-700",
91
- "warning-800": "text-warning-800",
92
- "warning-900": "text-warning-900",
93
- "warning-950": "text-warning-950",
94
- // Grey colors
95
- "grey-50": "text-grey-50",
96
- "grey-100": "text-grey-100",
97
- "grey-200": "text-grey-200",
98
- "grey-300": "text-grey-300",
99
- "grey-400": "text-grey-400",
100
- "grey-500": "text-grey-500",
101
- "grey-600": "text-grey-600",
102
- "grey-700": "text-grey-700",
103
- "grey-800": "text-grey-800",
104
- "grey-900": "text-grey-900",
105
- "grey-950": "text-grey-950",
106
- },
18
+ variant: typography_types_1.textVariantClasses,
19
+ color: typography_types_1.textColorClasses,
107
20
  },
108
21
  defaultVariants: {
109
22
  variant: "body1",
package/index.d.ts CHANGED
@@ -17,13 +17,14 @@ export { Flex, flexVariants, type FlexProps, type FlexDirection, type FlexAlign,
17
17
  export { IconButton, iconButtonVariants, type IconButtonProps, type IconButtonVariant, type IconButtonSize, type IconButtonRoundness } from "./IconButton/IconButton";
18
18
  export { Input, inputVariants, type InputProps, type InputSize, type InputRoundness, type InputVariant } from "./Input/Input";
19
19
  export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, inputOTPVariants, inputOTPSlotVariants, type InputOTPProps, type InputOTPSlotProps, type InputOTPSlotSize, } from "./InputOTP/InputOTP";
20
- export { Label, labelVariants, type LabelProps, type LabelVariant } from "./Label/Label";
20
+ export { Label, labelVariants, type LabelProps } from "./Label/Label";
21
21
  export { Loader, loaderVariants, type LoaderProps, type LoaderSize, type LoaderColor } from "./Loader/Loader";
22
22
  export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, } from "./Menubar/Menubar";
23
23
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from "./Popover/Popover";
24
24
  export { Progress, progressVariants, progressIndicatorVariants, type ProgressProps, type ProgressSize, type ProgressVariant } from "./Progress/Progress";
25
25
  export { RadioGroup, RadioGroupItem, radioGroupItemVariants, type RadioGroupItemProps, type RadioGroupItemSize } from "./RadioGroup/RadioGroup";
26
26
  export { ScrollArea, ScrollBar } from "./ScrollArea/ScrollArea";
27
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, type SidebarProps, type SidebarHeaderProps, type SidebarContentProps, type SidebarFooterProps, type SidebarGroupProps, type SidebarGroupLabelProps, type SidebarMenuItemProps, type SidebarSubMenuItemProps, type SidebarSeparatorProps, type SidebarToggleProps, } from "./Sidebar/Sidebar";
27
28
  export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, selectTriggerVariants, type SelectTriggerProps, type SelectTriggerSize, } from "./Select/Select";
28
29
  export { Separator } from "./Separator/Separator";
29
30
  export { Skeleton, type SkeletonProps } from "./Skeleton/Skeleton";
package/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialog = exports.checkboxVariants = exports.Checkbox = exports.bubbleContentVariants = exports.chatBubbleVariants = exports.ChatBubble = exports.useCarousel = exports.carouselItemVariants = exports.carouselContentVariants = exports.carouselVariants = exports.CarouselNext = exports.CarouselPrevious = exports.CarouselItem = exports.CarouselContent = exports.Carousel = exports.cardVariants = exports.CardContent = exports.CardDescription = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = exports.CalendarDayButton = exports.Calendar = exports.buttonVariants = exports.Button = exports.BreadcrumbEllipsis = exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbList = exports.Breadcrumb = exports.badgeVariants = exports.Badge = exports.avatarVariants = exports.AvatarFallback = exports.AvatarImage = exports.Avatar = exports.alertVariants = exports.AlertDescription = exports.AlertTitle = exports.Alert = void 0;
4
4
  exports.labelVariants = exports.Label = exports.inputOTPSlotVariants = exports.inputOTPVariants = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.inputVariants = exports.Input = exports.iconButtonVariants = exports.IconButton = exports.flexVariants = exports.Flex = exports.ErrorMessage = exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = exports.drawerOverlayVariants = exports.drawerContentVariants = exports.DrawerDescription = exports.DrawerTitle = exports.DrawerBody = exports.DrawerFooter = exports.DrawerHeader = exports.DrawerContent = exports.DrawerClose = exports.DrawerTrigger = exports.DrawerOverlay = exports.DrawerPortal = exports.Drawer = exports.alertDialogFooterVariants = exports.alertDialogHeaderVariants = exports.alertDialogContentVariants = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogBody = exports.AlertDialogDescription = void 0;
5
- exports.TabsTrigger = exports.TabsList = exports.Tabs = exports.switchVariants = exports.Switch = exports.spinnerVariants = exports.Spinner = exports.Skeleton = exports.Separator = exports.selectTriggerVariants = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = exports.ScrollBar = exports.ScrollArea = exports.radioGroupItemVariants = exports.RadioGroupItem = exports.RadioGroup = exports.progressIndicatorVariants = exports.progressVariants = exports.Progress = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.MenubarSubContent = exports.MenubarSubTrigger = exports.MenubarSub = exports.MenubarRadioItem = exports.MenubarRadioGroup = exports.MenubarCheckboxItem = exports.MenubarShortcut = exports.MenubarItem = exports.MenubarLabel = exports.MenubarSeparator = exports.MenubarGroup = exports.MenubarContent = exports.MenubarTrigger = exports.MenubarMenu = exports.MenubarPortal = exports.Menubar = exports.loaderVariants = exports.Loader = void 0;
6
- exports.copyToClipboard = exports.cn = exports.typographyVariants = exports.Typography = exports.tooltipContentVariants = exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = exports.toast = exports.Toaster = exports.textareaVariants = exports.Textarea = exports.tabsListVariants = exports.TabsContent = void 0;
5
+ exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = exports.sidebarSubMenuItemVariants = exports.sidebarMenuItemVariants = exports.useSidebar = exports.SidebarToggle = exports.SidebarSeparator = exports.SidebarSubMenuItem = exports.SidebarMenuItem = exports.SidebarGroupLabel = exports.SidebarGroup = exports.SidebarFooter = exports.SidebarContent = exports.SidebarHeader = exports.Sidebar = exports.ScrollBar = exports.ScrollArea = exports.radioGroupItemVariants = exports.RadioGroupItem = exports.RadioGroup = exports.progressIndicatorVariants = exports.progressVariants = exports.Progress = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.MenubarSubContent = exports.MenubarSubTrigger = exports.MenubarSub = exports.MenubarRadioItem = exports.MenubarRadioGroup = exports.MenubarCheckboxItem = exports.MenubarShortcut = exports.MenubarItem = exports.MenubarLabel = exports.MenubarSeparator = exports.MenubarGroup = exports.MenubarContent = exports.MenubarTrigger = exports.MenubarMenu = exports.MenubarPortal = exports.Menubar = exports.loaderVariants = exports.Loader = void 0;
6
+ exports.copyToClipboard = exports.cn = exports.typographyVariants = exports.Typography = exports.tooltipContentVariants = exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = exports.toast = exports.Toaster = exports.textareaVariants = exports.Textarea = exports.tabsListVariants = exports.TabsContent = exports.TabsTrigger = exports.TabsList = exports.Tabs = exports.switchVariants = exports.Switch = exports.spinnerVariants = exports.Spinner = exports.Skeleton = exports.Separator = exports.selectTriggerVariants = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = void 0;
7
7
  // Styles
8
8
  require("./index.css");
9
9
  // Components
@@ -162,6 +162,20 @@ Object.defineProperty(exports, "radioGroupItemVariants", { enumerable: true, get
162
162
  var ScrollArea_1 = require("./ScrollArea/ScrollArea");
163
163
  Object.defineProperty(exports, "ScrollArea", { enumerable: true, get: function () { return ScrollArea_1.ScrollArea; } });
164
164
  Object.defineProperty(exports, "ScrollBar", { enumerable: true, get: function () { return ScrollArea_1.ScrollBar; } });
165
+ var Sidebar_1 = require("./Sidebar/Sidebar");
166
+ Object.defineProperty(exports, "Sidebar", { enumerable: true, get: function () { return Sidebar_1.Sidebar; } });
167
+ Object.defineProperty(exports, "SidebarHeader", { enumerable: true, get: function () { return Sidebar_1.SidebarHeader; } });
168
+ Object.defineProperty(exports, "SidebarContent", { enumerable: true, get: function () { return Sidebar_1.SidebarContent; } });
169
+ Object.defineProperty(exports, "SidebarFooter", { enumerable: true, get: function () { return Sidebar_1.SidebarFooter; } });
170
+ Object.defineProperty(exports, "SidebarGroup", { enumerable: true, get: function () { return Sidebar_1.SidebarGroup; } });
171
+ Object.defineProperty(exports, "SidebarGroupLabel", { enumerable: true, get: function () { return Sidebar_1.SidebarGroupLabel; } });
172
+ Object.defineProperty(exports, "SidebarMenuItem", { enumerable: true, get: function () { return Sidebar_1.SidebarMenuItem; } });
173
+ Object.defineProperty(exports, "SidebarSubMenuItem", { enumerable: true, get: function () { return Sidebar_1.SidebarSubMenuItem; } });
174
+ Object.defineProperty(exports, "SidebarSeparator", { enumerable: true, get: function () { return Sidebar_1.SidebarSeparator; } });
175
+ Object.defineProperty(exports, "SidebarToggle", { enumerable: true, get: function () { return Sidebar_1.SidebarToggle; } });
176
+ Object.defineProperty(exports, "useSidebar", { enumerable: true, get: function () { return Sidebar_1.useSidebar; } });
177
+ Object.defineProperty(exports, "sidebarMenuItemVariants", { enumerable: true, get: function () { return Sidebar_1.sidebarMenuItemVariants; } });
178
+ Object.defineProperty(exports, "sidebarSubMenuItemVariants", { enumerable: true, get: function () { return Sidebar_1.sidebarSubMenuItemVariants; } });
165
179
  var Select_1 = require("./Select/Select");
166
180
  Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return Select_1.Select; } });
167
181
  Object.defineProperty(exports, "SelectGroup", { enumerable: true, get: function () { return Select_1.SelectGroup; } });
@@ -0,0 +1,4 @@
1
+ export type TextVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "subtitle3" | "body1" | "body2" | "body3" | "caption";
2
+ export type TextColor = "default" | "main-50" | "main-100" | "main-200" | "main-300" | "main-400" | "main-500" | "main-600" | "main-700" | "main-800" | "main-900" | "main-950" | "success-50" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "success-950" | "accent-50" | "accent-100" | "accent-200" | "accent-300" | "accent-400" | "accent-500" | "accent-600" | "accent-700" | "accent-800" | "accent-900" | "accent-950" | "error-50" | "error-100" | "error-200" | "error-300" | "error-400" | "error-500" | "error-600" | "error-700" | "error-800" | "error-900" | "error-950" | "warning-50" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "warning-950" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900" | "grey-950";
3
+ export declare const textVariantClasses: Record<TextVariant, string>;
4
+ export declare const textColorClasses: Record<TextColor, string>;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.textColorClasses = exports.textVariantClasses = void 0;
4
+ exports.textVariantClasses = {
5
+ h1: "font-extrabold text-[64px] leading-none tracking-normal font-sans",
6
+ h2: "font-bold text-[48px] leading-none tracking-normal font-sans",
7
+ h3: "font-bold text-[32px] leading-none tracking-normal font-sans",
8
+ h4: "font-bold text-[24px] leading-[1.2] tracking-[-0.48px] font-sans",
9
+ h5: "font-bold text-[20px] leading-none tracking-normal font-sans",
10
+ h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
11
+ subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
12
+ subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
13
+ subtitle3: "font-semibold text-[16px] leading-none tracking-normal font-sans",
14
+ body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
15
+ body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
16
+ body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
17
+ caption: "font-light text-[12px] leading-none tracking-normal font-sans",
18
+ };
19
+ exports.textColorClasses = {
20
+ default: "text-foreground",
21
+ // Main colors
22
+ "main-50": "text-main-50",
23
+ "main-100": "text-main-100",
24
+ "main-200": "text-main-200",
25
+ "main-300": "text-main-300",
26
+ "main-400": "text-main-400",
27
+ "main-500": "text-main-500",
28
+ "main-600": "text-main-600",
29
+ "main-700": "text-main-700",
30
+ "main-800": "text-main-800",
31
+ "main-900": "text-main-900",
32
+ "main-950": "text-main-950",
33
+ // Success colors
34
+ "success-50": "text-success-50",
35
+ "success-100": "text-success-100",
36
+ "success-200": "text-success-200",
37
+ "success-300": "text-success-300",
38
+ "success-400": "text-success-400",
39
+ "success-500": "text-success-500",
40
+ "success-600": "text-success-600",
41
+ "success-700": "text-success-700",
42
+ "success-800": "text-success-800",
43
+ "success-900": "text-success-900",
44
+ "success-950": "text-success-950",
45
+ // Accent colors
46
+ "accent-50": "text-accent-50",
47
+ "accent-100": "text-accent-100",
48
+ "accent-200": "text-accent-200",
49
+ "accent-300": "text-accent-300",
50
+ "accent-400": "text-accent-400",
51
+ "accent-500": "text-accent-500",
52
+ "accent-600": "text-accent-600",
53
+ "accent-700": "text-accent-700",
54
+ "accent-800": "text-accent-800",
55
+ "accent-900": "text-accent-900",
56
+ "accent-950": "text-accent-950",
57
+ // Error colors
58
+ "error-50": "text-error-50",
59
+ "error-100": "text-error-100",
60
+ "error-200": "text-error-200",
61
+ "error-300": "text-error-300",
62
+ "error-400": "text-error-400",
63
+ "error-500": "text-error-500",
64
+ "error-600": "text-error-600",
65
+ "error-700": "text-error-700",
66
+ "error-800": "text-error-800",
67
+ "error-900": "text-error-900",
68
+ "error-950": "text-error-950",
69
+ // Warning colors
70
+ "warning-50": "text-warning-50",
71
+ "warning-100": "text-warning-100",
72
+ "warning-200": "text-warning-200",
73
+ "warning-300": "text-warning-300",
74
+ "warning-400": "text-warning-400",
75
+ "warning-500": "text-warning-500",
76
+ "warning-600": "text-warning-600",
77
+ "warning-700": "text-warning-700",
78
+ "warning-800": "text-warning-800",
79
+ "warning-900": "text-warning-900",
80
+ "warning-950": "text-warning-950",
81
+ // Grey colors
82
+ "grey-50": "text-grey-50",
83
+ "grey-100": "text-grey-100",
84
+ "grey-200": "text-grey-200",
85
+ "grey-300": "text-grey-300",
86
+ "grey-400": "text-grey-400",
87
+ "grey-500": "text-grey-500",
88
+ "grey-600": "text-grey-600",
89
+ "grey-700": "text-grey-700",
90
+ "grey-800": "text-grey-800",
91
+ "grey-900": "text-grey-900",
92
+ "grey-950": "text-grey-950",
93
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2v2ai/uikit",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
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",