ui-lab-registry 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.
Files changed (153) hide show
  1. package/README.md +145 -0
  2. package/dist/categories.d.ts +5 -0
  3. package/dist/categories.d.ts.map +1 -0
  4. package/dist/categories.js +81 -0
  5. package/dist/categories.js.map +1 -0
  6. package/dist/components/badge.d.ts +15 -0
  7. package/dist/components/badge.d.ts.map +1 -0
  8. package/dist/components/badge.js +31 -0
  9. package/dist/components/badge.js.map +1 -0
  10. package/dist/components/button-group.d.ts +27 -0
  11. package/dist/components/button-group.d.ts.map +1 -0
  12. package/dist/components/button-group.js +99 -0
  13. package/dist/components/button-group.js.map +1 -0
  14. package/dist/components/button.d.ts +13 -0
  15. package/dist/components/button.d.ts.map +1 -0
  16. package/dist/components/button.js +26 -0
  17. package/dist/components/button.js.map +1 -0
  18. package/dist/components/card.d.ts +19 -0
  19. package/dist/components/card.d.ts.map +1 -0
  20. package/dist/components/card.js +20 -0
  21. package/dist/components/card.js.map +1 -0
  22. package/dist/components/checkbox.d.ts +21 -0
  23. package/dist/components/checkbox.d.ts.map +1 -0
  24. package/dist/components/checkbox.js +69 -0
  25. package/dist/components/checkbox.js.map +1 -0
  26. package/dist/components/command-palette.d.ts +32 -0
  27. package/dist/components/command-palette.d.ts.map +1 -0
  28. package/dist/components/command-palette.js +256 -0
  29. package/dist/components/command-palette.js.map +1 -0
  30. package/dist/components/confirmation.d.ts +25 -0
  31. package/dist/components/confirmation.d.ts.map +1 -0
  32. package/dist/components/confirmation.js +120 -0
  33. package/dist/components/confirmation.js.map +1 -0
  34. package/dist/components/context-menu.d.ts +28 -0
  35. package/dist/components/context-menu.d.ts.map +1 -0
  36. package/dist/components/context-menu.js +36 -0
  37. package/dist/components/context-menu.js.map +1 -0
  38. package/dist/components/divider.d.ts +19 -0
  39. package/dist/components/divider.d.ts.map +1 -0
  40. package/dist/components/divider.js +240 -0
  41. package/dist/components/divider.js.map +1 -0
  42. package/dist/components/form-wrapper.d.ts +48 -0
  43. package/dist/components/form-wrapper.d.ts.map +1 -0
  44. package/dist/components/form-wrapper.js +122 -0
  45. package/dist/components/form-wrapper.js.map +1 -0
  46. package/dist/components/index.d.ts +24 -0
  47. package/dist/components/index.d.ts.map +1 -0
  48. package/dist/components/index.js +24 -0
  49. package/dist/components/index.js.map +1 -0
  50. package/dist/components/input.d.ts +17 -0
  51. package/dist/components/input.d.ts.map +1 -0
  52. package/dist/components/input.js +38 -0
  53. package/dist/components/input.js.map +1 -0
  54. package/dist/components/label.d.ts +17 -0
  55. package/dist/components/label.d.ts.map +1 -0
  56. package/dist/components/label.js +31 -0
  57. package/dist/components/label.js.map +1 -0
  58. package/dist/components/logo.d.ts +2 -0
  59. package/dist/components/logo.d.ts.map +1 -0
  60. package/dist/components/logo.js +6 -0
  61. package/dist/components/logo.js.map +1 -0
  62. package/dist/components/modal.d.ts +21 -0
  63. package/dist/components/modal.d.ts.map +1 -0
  64. package/dist/components/modal.js +67 -0
  65. package/dist/components/modal.js.map +1 -0
  66. package/dist/components/popover.d.ts +18 -0
  67. package/dist/components/popover.d.ts.map +1 -0
  68. package/dist/components/popover.js +243 -0
  69. package/dist/components/popover.js.map +1 -0
  70. package/dist/components/progress.d.ts +19 -0
  71. package/dist/components/progress.d.ts.map +1 -0
  72. package/dist/components/progress.js +38 -0
  73. package/dist/components/progress.js.map +1 -0
  74. package/dist/components/radio.d.ts +17 -0
  75. package/dist/components/radio.d.ts.map +1 -0
  76. package/dist/components/radio.js +62 -0
  77. package/dist/components/radio.js.map +1 -0
  78. package/dist/components/select.d.ts +13 -0
  79. package/dist/components/select.d.ts.map +1 -0
  80. package/dist/components/select.js +26 -0
  81. package/dist/components/select.js.map +1 -0
  82. package/dist/components/slider.d.ts +9 -0
  83. package/dist/components/slider.d.ts.map +1 -0
  84. package/dist/components/slider.js +32 -0
  85. package/dist/components/slider.js.map +1 -0
  86. package/dist/components/switch.d.ts +24 -0
  87. package/dist/components/switch.d.ts.map +1 -0
  88. package/dist/components/switch.js +92 -0
  89. package/dist/components/switch.js.map +1 -0
  90. package/dist/components/tabs.d.ts +20 -0
  91. package/dist/components/tabs.d.ts.map +1 -0
  92. package/dist/components/tabs.js +85 -0
  93. package/dist/components/tabs.js.map +1 -0
  94. package/dist/components/textarea.d.ts +17 -0
  95. package/dist/components/textarea.d.ts.map +1 -0
  96. package/dist/components/textarea.js +62 -0
  97. package/dist/components/textarea.js.map +1 -0
  98. package/dist/components/toast/index.d.ts +5 -0
  99. package/dist/components/toast/index.d.ts.map +1 -0
  100. package/dist/components/toast/index.js +4 -0
  101. package/dist/components/toast/index.js.map +1 -0
  102. package/dist/components/toast/store.d.ts +55 -0
  103. package/dist/components/toast/store.d.ts.map +1 -0
  104. package/dist/components/toast/store.js +76 -0
  105. package/dist/components/toast/store.js.map +1 -0
  106. package/dist/components/toast/toast.d.ts +10 -0
  107. package/dist/components/toast/toast.d.ts.map +1 -0
  108. package/dist/components/toast/toast.js +148 -0
  109. package/dist/components/toast/toast.js.map +1 -0
  110. package/dist/components/toast/toaster.d.ts +2 -0
  111. package/dist/components/toast/toaster.d.ts.map +1 -0
  112. package/dist/components/toast/toaster.js +391 -0
  113. package/dist/components/toast/toaster.js.map +1 -0
  114. package/dist/components/toast/use-toast.d.ts +9 -0
  115. package/dist/components/toast/use-toast.d.ts.map +1 -0
  116. package/dist/components/toast/use-toast.js +17 -0
  117. package/dist/components/toast/use-toast.js.map +1 -0
  118. package/dist/components/tooltip.d.ts +17 -0
  119. package/dist/components/tooltip.d.ts.map +1 -0
  120. package/dist/components/tooltip.js +227 -0
  121. package/dist/components/tooltip.js.map +1 -0
  122. package/dist/helpers.d.ts +9 -0
  123. package/dist/helpers.d.ts.map +1 -0
  124. package/dist/helpers.js +36 -0
  125. package/dist/helpers.js.map +1 -0
  126. package/dist/index.d.ts +6 -0
  127. package/dist/index.d.ts.map +1 -0
  128. package/dist/index.js +9 -0
  129. package/dist/index.js.map +1 -0
  130. package/dist/lib/utils.d.ts +3 -0
  131. package/dist/lib/utils.d.ts.map +1 -0
  132. package/dist/lib/utils.js +5 -0
  133. package/dist/lib/utils.js.map +1 -0
  134. package/dist/registry.d.ts +10 -0
  135. package/dist/registry.d.ts.map +1 -0
  136. package/dist/registry.js +418 -0
  137. package/dist/registry.js.map +1 -0
  138. package/dist/starters/presets.d.ts +4 -0
  139. package/dist/starters/presets.d.ts.map +1 -0
  140. package/dist/starters/presets.js +49 -0
  141. package/dist/starters/presets.js.map +1 -0
  142. package/dist/types.d.ts +35 -0
  143. package/dist/types.d.ts.map +1 -0
  144. package/dist/types.js +2 -0
  145. package/dist/types.js.map +1 -0
  146. package/package.json +66 -0
  147. package/src/categories.ts +84 -0
  148. package/src/helpers.ts +44 -0
  149. package/src/index.ts +29 -0
  150. package/src/lib/utils.ts +5 -0
  151. package/src/registry.ts +443 -0
  152. package/src/starters/presets.ts +51 -0
  153. package/src/types.ts +48 -0
package/README.md ADDED
@@ -0,0 +1,145 @@
1
+ # @ui-lab/registry
2
+
3
+ A centralized, framework-agnostic component registry for the UI Lab ecosystem.
4
+
5
+ ## Overview
6
+
7
+ This package serves as the single source of truth for:
8
+ - Component metadata (names, descriptions, categories)
9
+ - Component source code references
10
+ - Component relationships and dependencies
11
+ - Category definitions and organization
12
+ - Starter template component mappings
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @ui-lab/registry
18
+ # or
19
+ pnpm add @ui-lab/registry
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ### Basic Registry Access
25
+
26
+ ```typescript
27
+ import {
28
+ componentRegistry,
29
+ getComponentById,
30
+ getComponentsByCategory,
31
+ categories
32
+ } from '@ui-lab/registry';
33
+
34
+ // Get a single component
35
+ const button = getComponentById('button');
36
+
37
+ // Get all components in a category
38
+ const inputComponents = getComponentsByCategory('input');
39
+
40
+ // Get all categories
41
+ console.log(categories);
42
+ ```
43
+
44
+ ### Helper Functions
45
+
46
+ ```typescript
47
+ import {
48
+ searchComponents,
49
+ getRelatedComponents,
50
+ getComponentsGroupedByCategory,
51
+ getAllComponentIds,
52
+ getComponentCount
53
+ } from '@ui-lab/registry';
54
+
55
+ // Search components by name, description, or tags
56
+ const results = searchComponents('button');
57
+
58
+ // Get related components
59
+ const relatedToButton = getRelatedComponents('button');
60
+
61
+ // Get components grouped by category
62
+ const grouped = getComponentsGroupedByCategory();
63
+
64
+ // Get all component IDs
65
+ const ids = getAllComponentIds();
66
+
67
+ // Get component count
68
+ const count = getComponentCount(); // 23
69
+ ```
70
+
71
+ ### Starter Presets
72
+
73
+ ```typescript
74
+ import { starterPresets, getStarterComponents } from '@ui-lab/registry';
75
+
76
+ // Get components for a specific starter template
77
+ const nextComponents = getStarterComponents('next');
78
+
79
+ // Access preset metadata
80
+ const preset = starterPresets.vite;
81
+ console.log(preset.description); // "Lightweight components for Vite-based applications"
82
+ ```
83
+
84
+ ### Types
85
+
86
+ ```typescript
87
+ import type {
88
+ ComponentMetadata,
89
+ ComponentCategory,
90
+ ComponentSource,
91
+ CategoryDefinition,
92
+ StarterPreset
93
+ } from '@ui-lab/registry';
94
+
95
+ function processComponent(comp: ComponentMetadata): void {
96
+ console.log(comp.name, comp.category);
97
+ }
98
+ ```
99
+
100
+ ## Component Categories
101
+
102
+ The registry organizes components into 8 categories:
103
+
104
+ - **input** - Form inputs and data entry
105
+ - **display** - Information display
106
+ - **feedback** - User feedback
107
+ - **navigation** - Navigation elements
108
+ - **container** - Container components
109
+ - **action** - Action components
110
+ - **composition** - Composed components
111
+ - **layout** - Layout utilities
112
+
113
+ ## All 23 Components
114
+
115
+ 1. **button** - Clickable element that triggers an action
116
+ 2. **button-group** - Group of related buttons
117
+ 3. **input** - Text input field
118
+ 4. **label** - Text label for form elements
119
+ 5. **select** - Dropdown select component
120
+ 6. **textarea** - Multi-line text input
121
+ 7. **checkbox** - Checkbox input
122
+ 8. **radio** - Radio button
123
+ 9. **badge** - Badge component for labels
124
+ 10. **tooltip** - Tooltip component
125
+ 11. **popover** - Popover component
126
+ 12. **form-wrapper** - Form wrapper component
127
+ 13. **toast** - Toast notification component
128
+ 14. **modal** - Modal dialog component
129
+ 15. **tabs** - Tabbed interface
130
+ 16. **context-menu** - Context menu
131
+ 17. **switch** - Toggle switch
132
+ 18. **slider** - Range slider
133
+ 19. **progress** - Progress bar
134
+ 20. **card** - Card component
135
+ 21. **command-palette** - Command palette
136
+ 22. **confirmation** - Confirmation dialog
137
+ 23. **divider** - Divider component
138
+
139
+ ## TypeScript Support
140
+
141
+ This package includes full TypeScript support with strict typing. All types are exported from the main entry point.
142
+
143
+ ## License
144
+
145
+ MIT
@@ -0,0 +1,5 @@
1
+ import type { CategoryDefinition, ComponentCategory } from './types';
2
+ export declare const categories: CategoryDefinition[];
3
+ export declare const categoryMap: Record<ComponentCategory, CategoryDefinition>;
4
+ export declare const categoryOrder: ComponentCategory[];
5
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAErE,eAAO,MAAM,UAAU,EAAE,kBAAkB,EAgE1C,CAAC;AAEF,eAAO,MAAM,WAAW,+CAG+B,CAAC;AAExD,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAU5C,CAAC"}
@@ -0,0 +1,81 @@
1
+ export const categories = [
2
+ {
3
+ id: 'input',
4
+ name: 'Input Components',
5
+ label: 'Input',
6
+ description: 'Form inputs for capturing user data',
7
+ icon: '⌨️'
8
+ },
9
+ {
10
+ id: 'display',
11
+ name: 'Display Components',
12
+ label: 'Display',
13
+ description: 'Components for presenting information',
14
+ icon: '👁️'
15
+ },
16
+ {
17
+ id: 'feedback',
18
+ name: 'Feedback Components',
19
+ label: 'Feedback',
20
+ description: 'Components for system notifications and feedback',
21
+ icon: '💬'
22
+ },
23
+ {
24
+ id: 'navigation',
25
+ name: 'Navigation Components',
26
+ label: 'Navigation',
27
+ description: 'Components for organizing and navigating content',
28
+ icon: '🧭'
29
+ },
30
+ {
31
+ id: 'container',
32
+ name: 'Container Components',
33
+ label: 'Container',
34
+ description: 'Components for wrapping and structuring content',
35
+ icon: '📦'
36
+ },
37
+ {
38
+ id: 'action',
39
+ name: 'Action Components',
40
+ label: 'Action',
41
+ description: 'Components for triggering user actions',
42
+ icon: '⚡'
43
+ },
44
+ {
45
+ id: 'composition',
46
+ name: 'Composition Components',
47
+ label: 'Composition',
48
+ description: 'Components that combine other components',
49
+ icon: '🧩'
50
+ },
51
+ {
52
+ id: 'layout',
53
+ name: 'Layout Components',
54
+ label: 'Layout',
55
+ description: 'Components for organizing and separating content',
56
+ icon: '📐'
57
+ },
58
+ {
59
+ id: 'data',
60
+ name: 'Data Components',
61
+ label: 'Data',
62
+ description: 'Components for displaying and managing data like tables and visualizations',
63
+ icon: '📊'
64
+ }
65
+ ];
66
+ export const categoryMap = categories.reduce((acc, cat) => {
67
+ acc[cat.id] = cat;
68
+ return acc;
69
+ }, {});
70
+ export const categoryOrder = [
71
+ 'action',
72
+ 'input',
73
+ 'display',
74
+ 'feedback',
75
+ 'navigation',
76
+ 'container',
77
+ 'composition',
78
+ 'layout',
79
+ 'data'
80
+ ];
81
+ //# sourceMappingURL=categories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.js","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAyB;IAC9C;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,qCAAqC;QAClD,IAAI,EAAE,IAAI;KACX;IACD;QACE,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,KAAK;KACZ;IACD;QACE,EAAE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UAAU;IACV,YAAY;IACZ,WAAW;IACX,aAAa;IACb,QAAQ;IACR,MAAM;CACP,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
8
+ icon?: React.ReactNode;
9
+ dismissible?: boolean;
10
+ onDismiss?: () => void;
11
+ pill?: boolean;
12
+ }
13
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
14
+ export { Badge, badgeVariants };
15
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,aAAa;;;8EA0BlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC5C,YAAY,CAAC,OAAO,aAAa,CAAC;IAClC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,KAAK,mFAoDV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../lib/utils";
4
+ import React from "react";
5
+ const badgeVariants = cva("inline-flex items-center justify-center gap-2 font-medium transition-all rounded-md", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-background-700 text-background-300 border border-background-600",
9
+ success: "bg-success-100 text-success-900 border border-success-300",
10
+ warning: "bg-warning-100 text-warning-900 border border-warning-300",
11
+ danger: "bg-danger-100 text-danger-900 border border-danger-300",
12
+ info: "bg-info-100 text-info-900 border border-info-300",
13
+ },
14
+ size: {
15
+ sm: "p-1 text-sm",
16
+ md: "px-3 py-1.5 text-sm",
17
+ lg: "px-4 py-2 text-base",
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ size: "md",
23
+ },
24
+ });
25
+ const Badge = React.forwardRef(({ variant, size, icon, dismissible = false, onDismiss, pill = false, children, className, // ← this will now properly override padding, etc.
26
+ ...props }, ref) => (_jsxs("div", { ref: ref, className: cn(badgeVariants({ variant, size }), // ← only variants here
27
+ pill && "rounded-full", className // ← custom classes last = highest priority
28
+ ), ...props, children: [icon && _jsx("span", { className: "flex items-center", children: icon }), _jsx("span", { children: children }), dismissible && (_jsx("button", { onClick: onDismiss, className: "ml-1 flex items-center justify-center hover:opacity-70 transition-opacity focus:outline-none", "aria-label": "Dismiss", type: "button", children: _jsx("svg", { className: cn(size === "sm" ? "w-3 h-3" : size === "lg" ? "w-5 h-5" : "w-4 h-4"), fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }))] })));
29
+ Badge.displayName = "Badge";
30
+ export { Badge, badgeVariants };
31
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CA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AAC,SAAS,CAClE,EACD,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,YAEnB,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,sBAAsB,GACxB,GACE,GACC,CACV,IACG,CACP,CACF,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import * as React from "react";
3
+ declare const buttonGroupVariants: (props?: ({
4
+ orientation?: "horizontal" | "vertical" | null | undefined;
5
+ spacing?: "normal" | "tight" | "relaxed" | null | undefined;
6
+ variant?: "default" | "secondary" | "outline" | "ghost" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare const buttonItemVariants: (props?: ({
9
+ variant?: "default" | "secondary" | "outline" | "ghost" | null | undefined;
10
+ size?: "sm" | "md" | "lg" | "icon" | null | undefined;
11
+ isSelected?: boolean | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof buttonGroupVariants> {
14
+ children?: React.ReactNode;
15
+ showDividers?: boolean;
16
+ variant?: "default" | "secondary" | "outline" | "ghost";
17
+ orientation?: "horizontal" | "vertical";
18
+ spacing?: "tight" | "normal" | "relaxed";
19
+ }
20
+ declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
21
+ interface ButtonGroupItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonItemVariants> {
22
+ isSelected?: boolean;
23
+ icon?: React.ReactNode;
24
+ }
25
+ declare const ButtonGroupItem: React.ForwardRefExoticComponent<ButtonGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
26
+ export { ButtonGroup, ButtonGroupItem, buttonGroupVariants, buttonItemVariants };
27
+ //# sourceMappingURL=button-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/components/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,mBAAmB;;;;8EA0BxB,CAAA;AAED,QAAA,MAAM,kBAAkB;;;;8EAsDvB,CAAA;AAED,UAAU,gBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC5C,YAAY,CAAC,OAAO,mBAAmB,CAAC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAA;IACvD,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAA;CACzC;AAED,QAAA,MAAM,WAAW,yFAqCf,CAAA;AAGF,UAAU,oBACR,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACrD,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,eAAe,gGAanB,CAAA;AAGF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,99 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import * as React from "react";
5
+ import { cn } from "../lib/utils";
6
+ import { Divider } from "./divider";
7
+ const buttonGroupVariants = cva("flex w-fit items-center justify-between rounded-lg", {
8
+ variants: {
9
+ orientation: {
10
+ horizontal: "flex-row",
11
+ vertical: "flex-col",
12
+ },
13
+ spacing: {
14
+ tight: "gap-0",
15
+ normal: "gap-1",
16
+ relaxed: "gap-2",
17
+ },
18
+ variant: {
19
+ default: "bg-background-950 border border-background-700",
20
+ secondary: "bg-background-950 border border-background-700",
21
+ outline: "bg-background-950 border border-background-700",
22
+ ghost: "",
23
+ },
24
+ },
25
+ defaultVariants: {
26
+ orientation: "horizontal",
27
+ spacing: "normal",
28
+ variant: "default",
29
+ },
30
+ });
31
+ const buttonItemVariants = cva("cursor-pointer text-sm font-medium transition-colors", {
32
+ variants: {
33
+ variant: {
34
+ default: "text-foreground-50 hover:bg-background-800 active:bg-background-700",
35
+ secondary: "bg-background-800 text-foreground-50 hover:bg-background-700 active:bg-background-600",
36
+ outline: "border border-background-700 text-foreground-50 hover:bg-background-800 active:border-background-600",
37
+ ghost: "text-foreground-50",
38
+ },
39
+ size: {
40
+ sm: "h-6 px-3 text-sm rounded-lg",
41
+ md: "h-8 px-4 text-sm rounded-lg",
42
+ lg: "h-9 px-6 text-md rounded-lg",
43
+ icon: "h-9 w-10 p-0 rounded-lg flex items-center justify-center",
44
+ },
45
+ isSelected: {
46
+ true: "",
47
+ false: "",
48
+ },
49
+ },
50
+ defaultVariants: {
51
+ variant: "default",
52
+ size: "md",
53
+ isSelected: false,
54
+ },
55
+ compoundVariants: [
56
+ {
57
+ variant: "default",
58
+ isSelected: true,
59
+ className: "bg-background-800 text-foreground-50",
60
+ },
61
+ {
62
+ variant: "secondary",
63
+ isSelected: true,
64
+ className: "bg-background-700 text-foreground-50",
65
+ },
66
+ {
67
+ variant: "outline",
68
+ isSelected: true,
69
+ className: "border-accent-500 bg-accent-500/10 text-accent-500",
70
+ },
71
+ {
72
+ variant: "ghost",
73
+ isSelected: true,
74
+ className: "text-foreground-50",
75
+ },
76
+ {
77
+ variant: "ghost",
78
+ size: "icon",
79
+ className: "h-auto w-auto p-0 rounded-none",
80
+ },
81
+ ],
82
+ });
83
+ const ButtonGroup = React.forwardRef(({ className, orientation, spacing, variant, children, showDividers = false, ...props }, ref) => {
84
+ const isVertical = orientation === "vertical";
85
+ const childrenArray = React.Children.toArray(children).filter((child) => child !== null && child !== undefined);
86
+ return (_jsx("div", { ref: ref, className: cn(buttonGroupVariants({ orientation, spacing, variant, className })), role: "group", ...props, children: childrenArray.map((child, index) => {
87
+ const isFirst = index === 0;
88
+ const isLast = index === childrenArray.length - 1;
89
+ const marginClass = isVertical
90
+ ? cn("mx-1", isFirst && "mt-1", isLast && "mb-1")
91
+ : cn("my-1", isFirst && "ml-1", isLast && "mr-1");
92
+ return (_jsxs(React.Fragment, { children: [_jsx("div", { className: marginClass, children: child }), showDividers && index < childrenArray.length - 1 && (_jsx(Divider, { orientation: isVertical ? "horizontal" : "vertical", size: "sm" }))] }, index));
93
+ }) }));
94
+ });
95
+ ButtonGroup.displayName = "ButtonGroup";
96
+ const ButtonGroupItem = React.forwardRef(({ className, variant, size, isSelected, icon, children, ...props }, ref) => (_jsxs("button", { ref: ref, className: cn(buttonItemVariants({ variant, size, isSelected, className })), "aria-pressed": isSelected, ...props, children: [icon && _jsx("span", { className: "flex items-center justify-center", children: icon }), children && size !== "icon" && _jsx("span", { children: children })] })));
97
+ ButtonGroupItem.displayName = "ButtonGroupItem";
98
+ export { ButtonGroup, ButtonGroupItem, buttonGroupVariants, buttonItemVariants };
99
+ //# sourceMappingURL=button-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../src/components/button-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,E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CAAC,CAAA;YACnD,OAAO,CACL,MAAC,KAAK,CAAC,QAAQ,eACb,cAAK,SAAS,EAAE,WAAW,YACxB,KAAK,GACF,EACL,YAAY,IAAI,KAAK,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,CACnD,KAAC,OAAO,IAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,EAAC,IAAI,GACrE,CACH,KAPkB,KAAK,CAQT,CAClB,CAAA;QACH,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AACF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AASvC,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC7E,kBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,kBAC7D,UAAU,KACpB,KAAK,aAER,IAAI,IAAI,eAAM,SAAS,EAAC,kCAAkC,YAAE,IAAI,GAAQ,EACxE,QAAQ,IAAI,IAAI,KAAK,MAAM,IAAI,yBAAO,QAAQ,GAAQ,IAChD,CACV,CAAC,CAAA;AACF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ declare const buttonVariants: (props?: ({
3
+ variant?: "default" | "secondary" | "outline" | "ghost" | null | undefined;
4
+ size?: "sm" | "md" | "lg" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
7
+ }
8
+ declare const Button: {
9
+ ({ className, variant, size, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export { Button, buttonVariants };
13
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;8EAqBnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACrD,YAAY,CAAC,OAAO,cAAc,CAAC;CAAI;AAEzC,QAAA,MAAM,MAAM;6CAKT,WAAW;;CAKb,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../lib/utils";
4
+ const buttonVariants = cva("inline-flex cursor-pointer items-center justify-center rounded-lg text-sm px-4 py-2", {
5
+ variants: {
6
+ variant: {
7
+ default: "bg-accent-500 text-accent-50 hover:bg-accent-500 active:bg-accent-500",
8
+ secondary: "bg-background-800 text-foreground-50 hover:bg-background-700 active:bg-background-600",
9
+ outline: "border border-background-700 text-foreground-50 hover:bg-background-800 active:border-background-600",
10
+ ghost: "text-foreground-50 hover:bg-background-800 active:bg-background-700",
11
+ },
12
+ size: {
13
+ sm: "h-8 px-3 text-sm",
14
+ md: "h-10 px-6 text-sm",
15
+ lg: "h-12 px-6 text-md",
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ variant: "default",
20
+ size: "md",
21
+ },
22
+ });
23
+ const Button = ({ className, variant, size, ...props }) => (_jsx("button", { className: cn(buttonVariants({ variant, size, className })), ...props }));
24
+ Button.displayName = "Button";
25
+ export { Button, buttonVariants };
26
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,cAAc,GAAG,GAAG,CACxB,qFAAqF,EACrF;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,uEAAuE;YAChF,SAAS,EAAE,uFAAuF;YAClG,OAAO,EAAE,sGAAsG;YAC/G,KAAK,EAAE,qEAAqE;SAC7E;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,kBAAkB;YACtB,EAAE,EAAE,mBAAmB;YACvB,EAAE,EAAE,mBAAmB;SACxB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAC;AAMF,MAAM,MAAM,GAAG,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACI,EAAE,EAAE,CAAC,CACjB,iBACE,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ }
6
+ interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ }
8
+ interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ }
10
+ declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
11
+ declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
12
+ declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
13
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> & {
14
+ Header: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
15
+ Body: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
16
+ Footer: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
17
+ };
18
+ export { Card, CardHeader, CardBody, CardFooter };
19
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAI;AAEpE,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAI;AAE1E,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAI;AAExE,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAI;AAgB1E,QAAA,MAAM,UAAU,wFAWf,CAAC;AAGF,QAAA,MAAM,QAAQ,sFAWb,CAAC;AAGF,QAAA,MAAM,UAAU,wFAWf,CAAC;AAIF,QAAA,MAAM,IAAI;;;;CAIR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import { cn } from "../lib/utils";
5
+ const CardRoot = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("bg-background-800 border border-background-700 rounded-lg overflow-hidden", className), ...props })));
6
+ CardRoot.displayName = "Card";
7
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("p-4 border-b border-background-700", className), ...props })));
8
+ CardHeader.displayName = "Card.Header";
9
+ const CardBody = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("px-4 py-2", className), ...props })));
10
+ CardBody.displayName = "Card.Body";
11
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("px-2 py-2 border-t border-background-700 bg-background-900/50", className), ...props })));
12
+ CardFooter.displayName = "Card.Footer";
13
+ // Compound component
14
+ const Card = Object.assign(CardRoot, {
15
+ Header: CardHeader,
16
+ Body: CardBody,
17
+ Footer: CardFooter,
18
+ });
19
+ export { Card, CardHeader, CardBody, CardFooter };
20
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAUlC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,2EAA2E,EAC3E,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,MAAM,CAAC;AAE9B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,oCAAoC,EACpC,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,aAAa,CAAC;AAEvC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,WAAW,EACX,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,WAAW,CAAC;AAEnC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,aAAa,CAAC;AAEvC,qBAAqB;AACrB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,UAAU;CACnB,CAAC,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const checkboxVariants: (props?: ({
4
+ size?: "sm" | "md" | "lg" | null | undefined;
5
+ checked?: boolean | null | undefined;
6
+ indeterminate?: boolean | null | undefined;
7
+ disabled?: boolean | null | undefined;
8
+ error?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "checked" | "indeterminate" | "disabled" | "error">, VariantProps<typeof checkboxVariants> {
11
+ label?: React.ReactNode;
12
+ helperText?: React.ReactNode;
13
+ helperTextError?: boolean;
14
+ indeterminate?: boolean;
15
+ checked?: boolean;
16
+ disabled?: boolean;
17
+ error?: boolean;
18
+ }
19
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
20
+ export { Checkbox, checkboxVariants };
21
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,gBAAgB;;;;;;8EAkCrB,CAAC;AAEF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,UAAU,GAAG,OAAO,CAAC,EAC/H,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,QAAQ,wFAoHb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React, { useState, useId } from "react";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils";
6
+ import { FaCheck } from "react-icons/fa6";
7
+ const checkboxVariants = cva("inline-flex items-center justify-center rounded-md border-2 transition-all cursor-pointer flex-shrink-0", {
8
+ variants: {
9
+ size: {
10
+ sm: "w-4 h-4",
11
+ md: "w-5 h-5",
12
+ lg: "w-6 h-6",
13
+ },
14
+ checked: {
15
+ true: "bg-accent-500 border-accent-500",
16
+ false: "bg-background-800 border-background-700",
17
+ },
18
+ indeterminate: {
19
+ true: "bg-background-100 border-accent-500",
20
+ false: "",
21
+ },
22
+ disabled: {
23
+ true: "opacity-60 cursor-not-allowed",
24
+ false: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-500/50",
25
+ },
26
+ error: {
27
+ true: "border-danger-600 bg-danger-600/10",
28
+ false: "",
29
+ },
30
+ },
31
+ defaultVariants: {
32
+ size: "md",
33
+ checked: false,
34
+ indeterminate: false,
35
+ disabled: false,
36
+ error: false,
37
+ },
38
+ });
39
+ const Checkbox = React.forwardRef(({ className, size = "md", disabled = false, error = false, label, helperText, helperTextError = false, indeterminate = false, checked: checkedProp, onChange, id, ...props }, ref) => {
40
+ const [internalChecked, setInternalChecked] = useState(checkedProp === true);
41
+ const generatedId = useId();
42
+ const isControlled = checkedProp !== undefined;
43
+ const checked = isControlled ? checkedProp : internalChecked;
44
+ const handleChange = (e) => {
45
+ if (!isControlled) {
46
+ setInternalChecked(e.target.checked);
47
+ }
48
+ onChange?.(e);
49
+ };
50
+ const checkboxId = id || `checkbox-${generatedId}`;
51
+ return (_jsxs("div", { className: "w-full", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx("input", { ref: ref, type: "checkbox", id: checkboxId, checked: checked, onChange: handleChange, disabled: disabled, className: "hidden", "aria-label": typeof label === "string" ? label : undefined, suppressHydrationWarning: true, ...props }), _jsxs("div", { className: cn(checkboxVariants({
52
+ size,
53
+ checked: checked && !indeterminate,
54
+ indeterminate,
55
+ disabled,
56
+ error,
57
+ className,
58
+ })), onClick: () => {
59
+ if (!disabled) {
60
+ const input = document.getElementById(checkboxId);
61
+ if (input) {
62
+ input.click();
63
+ }
64
+ }
65
+ }, role: "presentation", children: [checked && !indeterminate && (_jsx(FaCheck, { className: cn("text-accent-50 transition-all", size === "sm" && "w-2.5 h-2.5", size === "md" && "w-3 h-3", size === "lg" && "w-4 h-4") })), indeterminate && (_jsx("div", { className: cn("bg-background-400", size === "sm" && "w-2 h-0.5", size === "md" && "w-2.5 h-0.5", size === "lg" && "w-3 h-0.5") }))] }), label && (_jsx("label", { htmlFor: checkboxId, className: cn("text-foreground-300 transition-colors cursor-pointer select-none pt-1", disabled && "opacity-60 cursor-not-allowed text-foreground-500", size === "sm" && "text-xs", size === "md" && "text-sm", size === "lg" && "text-base"), suppressHydrationWarning: true, children: label }))] }), helperText && (_jsx("p", { className: cn("text-xs mt-2 ml-8 transition-colors", helperTextError ? "text-danger-600" : "text-foreground-500"), children: helperText }))] }));
66
+ });
67
+ Checkbox.displayName = "Checkbox";
68
+ export { Checkbox, checkboxVariants };
69
+ //# sourceMappingURL=checkbox.js.map