@academy-sdk/sdk 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.
@@ -0,0 +1,318 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/atoms/index.ts
60
+ var atoms_exports = {};
61
+ __export(atoms_exports, {
62
+ Avatar: () => Avatar,
63
+ Badge: () => Badge,
64
+ Button: () => Button,
65
+ Card: () => Card,
66
+ CardContent: () => CardContent,
67
+ CardDescription: () => CardDescription,
68
+ CardFooter: () => CardFooter,
69
+ CardHeader: () => CardHeader,
70
+ CardTitle: () => CardTitle,
71
+ Input: () => Input,
72
+ ProgressBar: () => ProgressBar,
73
+ Tabs: () => Tabs,
74
+ badgeVariants: () => badgeVariants,
75
+ buttonVariants: () => buttonVariants
76
+ });
77
+ module.exports = __toCommonJS(atoms_exports);
78
+
79
+ // src/components/atoms/Button.tsx
80
+ var React = __toESM(require("react"));
81
+ var import_class_variance_authority = require("class-variance-authority");
82
+
83
+ // src/components/utils.ts
84
+ var import_clsx = require("clsx");
85
+ var import_tailwind_merge = require("tailwind-merge");
86
+ function cn(...inputs) {
87
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
88
+ }
89
+
90
+ // src/components/atoms/Button.tsx
91
+ var import_jsx_runtime = require("react/jsx-runtime");
92
+ var buttonVariants = (0, import_class_variance_authority.cva)(
93
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",
94
+ {
95
+ variants: {
96
+ variant: {
97
+ default: "bg-theme-accent-primary text-white hover:opacity-90",
98
+ destructive: "bg-red-600 text-white hover:bg-red-700",
99
+ outline: "border border-theme-border-primary bg-theme-bg-secondary hover:bg-theme-bg-tertiary text-theme-text-primary",
100
+ secondary: "bg-theme-bg-tertiary text-theme-text-primary hover:opacity-80",
101
+ ghost: "hover:bg-theme-bg-tertiary text-theme-text-primary",
102
+ link: "text-[rgb(var(--accent-primary))] underline-offset-4 hover:underline"
103
+ },
104
+ size: {
105
+ default: "h-10 px-4 py-2",
106
+ sm: "h-9 rounded-md px-3",
107
+ lg: "h-11 rounded-md px-8",
108
+ icon: "h-10 w-10"
109
+ }
110
+ },
111
+ defaultVariants: {
112
+ variant: "default",
113
+ size: "default"
114
+ }
115
+ }
116
+ );
117
+ var Button = React.forwardRef(
118
+ (_a, ref) => {
119
+ var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
120
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
121
+ "button",
122
+ __spreadValues({
123
+ className: cn(buttonVariants({ variant, size, className })),
124
+ ref
125
+ }, props)
126
+ );
127
+ }
128
+ );
129
+ Button.displayName = "Button";
130
+
131
+ // src/components/atoms/Input.tsx
132
+ var React2 = __toESM(require("react"));
133
+ var import_jsx_runtime2 = require("react/jsx-runtime");
134
+ var Input = React2.forwardRef(
135
+ (_a, ref) => {
136
+ var _b = _a, { className, type, label } = _b, props = __objRest(_b, ["className", "type", "label"]);
137
+ const inputElement = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
138
+ "input",
139
+ __spreadValues({
140
+ type,
141
+ className: cn(
142
+ "flex h-10 w-full rounded-md border border-theme-border-primary bg-theme-bg-primary px-3 py-2 text-sm text-theme-text-primary file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-[rgb(var(--text-muted))] focus-visible:outline-none focus-visible:border-theme-accent-primary transition-colors disabled:cursor-not-allowed disabled:opacity-50",
143
+ className
144
+ ),
145
+ ref
146
+ }, props)
147
+ );
148
+ if (label) {
149
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-2", children: [
150
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "text-sm font-medium text-theme-text-primary", children: [
151
+ label,
152
+ props.required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500 ml-1", children: "*" })
153
+ ] }),
154
+ inputElement
155
+ ] });
156
+ }
157
+ return inputElement;
158
+ }
159
+ );
160
+ Input.displayName = "Input";
161
+
162
+ // src/components/atoms/Card.tsx
163
+ var import_jsx_runtime3 = require("react/jsx-runtime");
164
+ function Card(_a) {
165
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
166
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
167
+ "div",
168
+ __spreadValues({
169
+ className: cn("rounded-lg border border-theme-border-primary bg-theme-bg-primary shadow-sm", className)
170
+ }, props)
171
+ );
172
+ }
173
+ function CardHeader(_a) {
174
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
175
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", __spreadValues({ className: cn("flex flex-col space-y-1.5 p-6", className) }, props));
176
+ }
177
+ function CardTitle(_a) {
178
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
179
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", __spreadValues({ className: cn("text-2xl font-semibold leading-none tracking-tight", className) }, props));
180
+ }
181
+ function CardDescription(_a) {
182
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
183
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", __spreadValues({ className: cn("text-sm text-theme-text-secondary", className) }, props));
184
+ }
185
+ function CardContent(_a) {
186
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
187
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", __spreadValues({ className: cn("p-6 pt-0", className) }, props));
188
+ }
189
+ function CardFooter(_a) {
190
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
191
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", __spreadValues({ className: cn("flex items-center p-6 pt-0", className) }, props));
192
+ }
193
+
194
+ // src/components/atoms/Badge.tsx
195
+ var import_class_variance_authority2 = require("class-variance-authority");
196
+ var import_jsx_runtime4 = require("react/jsx-runtime");
197
+ var badgeVariants = (0, import_class_variance_authority2.cva)(
198
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
199
+ {
200
+ variants: {
201
+ variant: {
202
+ default: "bg-theme-accent-primary text-white",
203
+ secondary: "bg-theme-bg-tertiary text-theme-text-primary",
204
+ success: "border-transparent bg-green-600 text-white",
205
+ warning: "border-transparent bg-yellow-500 text-white",
206
+ destructive: "border-transparent bg-red-600 text-white",
207
+ outline: "text-theme-text-primary border-theme-border-primary"
208
+ }
209
+ },
210
+ defaultVariants: {
211
+ variant: "default"
212
+ }
213
+ }
214
+ );
215
+ function Badge(_a) {
216
+ var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
217
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", __spreadValues({ className: cn(badgeVariants({ variant }), className) }, props));
218
+ }
219
+
220
+ // src/components/atoms/Avatar.tsx
221
+ var React3 = __toESM(require("react"));
222
+ var import_jsx_runtime5 = require("react/jsx-runtime");
223
+ var Avatar = React3.forwardRef(
224
+ (_a, ref) => {
225
+ var _b = _a, { className, src, alt, fallback } = _b, props = __objRest(_b, ["className", "src", "alt", "fallback"]);
226
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
227
+ "div",
228
+ __spreadProps(__spreadValues({
229
+ ref,
230
+ className: cn(
231
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
232
+ className
233
+ )
234
+ }, props), {
235
+ children: src ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
236
+ "img",
237
+ {
238
+ src,
239
+ alt: alt || "Avatar",
240
+ className: "aspect-square h-full w-full object-cover"
241
+ }
242
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-full w-full items-center justify-center bg-gray-200 text-gray-600 text-sm font-medium", children: fallback || "?" })
243
+ })
244
+ );
245
+ }
246
+ );
247
+ Avatar.displayName = "Avatar";
248
+
249
+ // src/components/atoms/ProgressBar.tsx
250
+ var import_jsx_runtime6 = require("react/jsx-runtime");
251
+ var sizeClasses = {
252
+ sm: "h-1.5",
253
+ md: "h-2.5",
254
+ lg: "h-3.5"
255
+ };
256
+ var variantClasses = {
257
+ default: "bg-theme-accent-primary",
258
+ success: "bg-green-600",
259
+ warning: "bg-yellow-500",
260
+ error: "bg-red-600"
261
+ };
262
+ function ProgressBar(_a) {
263
+ var _b = _a, {
264
+ value,
265
+ max = 100,
266
+ showLabel = false,
267
+ size = "md",
268
+ variant = "default",
269
+ className
270
+ } = _b, props = __objRest(_b, [
271
+ "value",
272
+ "max",
273
+ "showLabel",
274
+ "size",
275
+ "variant",
276
+ "className"
277
+ ]);
278
+ const percentage = Math.min(Math.max(value / max * 100, 0), 100);
279
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
280
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mb-1 flex items-center justify-between text-sm", children: [
281
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-theme-text-secondary", children: "Progress" }),
282
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-medium text-theme-text-primary", children: [
283
+ Math.round(percentage),
284
+ "%"
285
+ ] })
286
+ ] }),
287
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("w-full overflow-hidden rounded-full bg-theme-bg-tertiary", sizeClasses[size]), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
288
+ "div",
289
+ {
290
+ className: cn("h-full transition-all duration-300 ease-in-out", variantClasses[variant]),
291
+ style: { width: `${percentage}%` }
292
+ }
293
+ ) })
294
+ ] }));
295
+ }
296
+
297
+ // src/components/atoms/Tabs.tsx
298
+ var import_jsx_runtime7 = require("react/jsx-runtime");
299
+ function Tabs({ tabs, activeTab, onTabChange, className, actions }) {
300
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("border-b border-theme-border-primary", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-4 sm:px-6 pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "p-0.5 flex items-center justify-between overflow-x-auto", children: [
301
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("nav", { className: "flex gap-4 sm:gap-8 min-w-min", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
302
+ "button",
303
+ {
304
+ onClick: () => onTabChange(tab.id),
305
+ className: cn(
306
+ "pb-3 px-1 text-sm font-medium border-b-2 transition-all flex items-center gap-2 cursor-pointer whitespace-nowrap",
307
+ activeTab === tab.id ? "border-theme-accent-primary text-theme-accent-primary" : "border-transparent text-theme-text-secondary hover:text-theme-text-primary hover:border-theme-accent-primary/40"
308
+ ),
309
+ children: [
310
+ tab.icon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "flex-shrink-0", children: tab.icon }),
311
+ tab.label
312
+ ]
313
+ },
314
+ tab.id
315
+ )) }),
316
+ actions && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "pb-3", children: actions })
317
+ ] }) }) });
318
+ }
@@ -0,0 +1,288 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/components/atoms/Button.tsx
34
+ import * as React from "react";
35
+ import { cva } from "class-variance-authority";
36
+
37
+ // src/components/utils.ts
38
+ import { clsx } from "clsx";
39
+ import { twMerge } from "tailwind-merge";
40
+ function cn(...inputs) {
41
+ return twMerge(clsx(inputs));
42
+ }
43
+
44
+ // src/components/atoms/Button.tsx
45
+ import { jsx } from "react/jsx-runtime";
46
+ var buttonVariants = cva(
47
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",
48
+ {
49
+ variants: {
50
+ variant: {
51
+ default: "bg-theme-accent-primary text-white hover:opacity-90",
52
+ destructive: "bg-red-600 text-white hover:bg-red-700",
53
+ outline: "border border-theme-border-primary bg-theme-bg-secondary hover:bg-theme-bg-tertiary text-theme-text-primary",
54
+ secondary: "bg-theme-bg-tertiary text-theme-text-primary hover:opacity-80",
55
+ ghost: "hover:bg-theme-bg-tertiary text-theme-text-primary",
56
+ link: "text-[rgb(var(--accent-primary))] underline-offset-4 hover:underline"
57
+ },
58
+ size: {
59
+ default: "h-10 px-4 py-2",
60
+ sm: "h-9 rounded-md px-3",
61
+ lg: "h-11 rounded-md px-8",
62
+ icon: "h-10 w-10"
63
+ }
64
+ },
65
+ defaultVariants: {
66
+ variant: "default",
67
+ size: "default"
68
+ }
69
+ }
70
+ );
71
+ var Button = React.forwardRef(
72
+ (_a, ref) => {
73
+ var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
74
+ return /* @__PURE__ */ jsx(
75
+ "button",
76
+ __spreadValues({
77
+ className: cn(buttonVariants({ variant, size, className })),
78
+ ref
79
+ }, props)
80
+ );
81
+ }
82
+ );
83
+ Button.displayName = "Button";
84
+
85
+ // src/components/atoms/Input.tsx
86
+ import * as React2 from "react";
87
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
88
+ var Input = React2.forwardRef(
89
+ (_a, ref) => {
90
+ var _b = _a, { className, type, label } = _b, props = __objRest(_b, ["className", "type", "label"]);
91
+ const inputElement = /* @__PURE__ */ jsx2(
92
+ "input",
93
+ __spreadValues({
94
+ type,
95
+ className: cn(
96
+ "flex h-10 w-full rounded-md border border-theme-border-primary bg-theme-bg-primary px-3 py-2 text-sm text-theme-text-primary file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-[rgb(var(--text-muted))] focus-visible:outline-none focus-visible:border-theme-accent-primary transition-colors disabled:cursor-not-allowed disabled:opacity-50",
97
+ className
98
+ ),
99
+ ref
100
+ }, props)
101
+ );
102
+ if (label) {
103
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
104
+ /* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-theme-text-primary", children: [
105
+ label,
106
+ props.required && /* @__PURE__ */ jsx2("span", { className: "text-red-500 ml-1", children: "*" })
107
+ ] }),
108
+ inputElement
109
+ ] });
110
+ }
111
+ return inputElement;
112
+ }
113
+ );
114
+ Input.displayName = "Input";
115
+
116
+ // src/components/atoms/Card.tsx
117
+ import { jsx as jsx3 } from "react/jsx-runtime";
118
+ function Card(_a) {
119
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
120
+ return /* @__PURE__ */ jsx3(
121
+ "div",
122
+ __spreadValues({
123
+ className: cn("rounded-lg border border-theme-border-primary bg-theme-bg-primary shadow-sm", className)
124
+ }, props)
125
+ );
126
+ }
127
+ function CardHeader(_a) {
128
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
129
+ return /* @__PURE__ */ jsx3("div", __spreadValues({ className: cn("flex flex-col space-y-1.5 p-6", className) }, props));
130
+ }
131
+ function CardTitle(_a) {
132
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
133
+ return /* @__PURE__ */ jsx3("h3", __spreadValues({ className: cn("text-2xl font-semibold leading-none tracking-tight", className) }, props));
134
+ }
135
+ function CardDescription(_a) {
136
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
137
+ return /* @__PURE__ */ jsx3("p", __spreadValues({ className: cn("text-sm text-theme-text-secondary", className) }, props));
138
+ }
139
+ function CardContent(_a) {
140
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
141
+ return /* @__PURE__ */ jsx3("div", __spreadValues({ className: cn("p-6 pt-0", className) }, props));
142
+ }
143
+ function CardFooter(_a) {
144
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
145
+ return /* @__PURE__ */ jsx3("div", __spreadValues({ className: cn("flex items-center p-6 pt-0", className) }, props));
146
+ }
147
+
148
+ // src/components/atoms/Badge.tsx
149
+ import { cva as cva2 } from "class-variance-authority";
150
+ import { jsx as jsx4 } from "react/jsx-runtime";
151
+ var badgeVariants = cva2(
152
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
153
+ {
154
+ variants: {
155
+ variant: {
156
+ default: "bg-theme-accent-primary text-white",
157
+ secondary: "bg-theme-bg-tertiary text-theme-text-primary",
158
+ success: "border-transparent bg-green-600 text-white",
159
+ warning: "border-transparent bg-yellow-500 text-white",
160
+ destructive: "border-transparent bg-red-600 text-white",
161
+ outline: "text-theme-text-primary border-theme-border-primary"
162
+ }
163
+ },
164
+ defaultVariants: {
165
+ variant: "default"
166
+ }
167
+ }
168
+ );
169
+ function Badge(_a) {
170
+ var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
171
+ return /* @__PURE__ */ jsx4("div", __spreadValues({ className: cn(badgeVariants({ variant }), className) }, props));
172
+ }
173
+
174
+ // src/components/atoms/Avatar.tsx
175
+ import * as React3 from "react";
176
+ import { jsx as jsx5 } from "react/jsx-runtime";
177
+ var Avatar = React3.forwardRef(
178
+ (_a, ref) => {
179
+ var _b = _a, { className, src, alt, fallback } = _b, props = __objRest(_b, ["className", "src", "alt", "fallback"]);
180
+ return /* @__PURE__ */ jsx5(
181
+ "div",
182
+ __spreadProps(__spreadValues({
183
+ ref,
184
+ className: cn(
185
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
186
+ className
187
+ )
188
+ }, props), {
189
+ children: src ? /* @__PURE__ */ jsx5(
190
+ "img",
191
+ {
192
+ src,
193
+ alt: alt || "Avatar",
194
+ className: "aspect-square h-full w-full object-cover"
195
+ }
196
+ ) : /* @__PURE__ */ jsx5("div", { className: "flex h-full w-full items-center justify-center bg-gray-200 text-gray-600 text-sm font-medium", children: fallback || "?" })
197
+ })
198
+ );
199
+ }
200
+ );
201
+ Avatar.displayName = "Avatar";
202
+
203
+ // src/components/atoms/ProgressBar.tsx
204
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
205
+ var sizeClasses = {
206
+ sm: "h-1.5",
207
+ md: "h-2.5",
208
+ lg: "h-3.5"
209
+ };
210
+ var variantClasses = {
211
+ default: "bg-theme-accent-primary",
212
+ success: "bg-green-600",
213
+ warning: "bg-yellow-500",
214
+ error: "bg-red-600"
215
+ };
216
+ function ProgressBar(_a) {
217
+ var _b = _a, {
218
+ value,
219
+ max = 100,
220
+ showLabel = false,
221
+ size = "md",
222
+ variant = "default",
223
+ className
224
+ } = _b, props = __objRest(_b, [
225
+ "value",
226
+ "max",
227
+ "showLabel",
228
+ "size",
229
+ "variant",
230
+ "className"
231
+ ]);
232
+ const percentage = Math.min(Math.max(value / max * 100, 0), 100);
233
+ return /* @__PURE__ */ jsxs2("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
234
+ showLabel && /* @__PURE__ */ jsxs2("div", { className: "mb-1 flex items-center justify-between text-sm", children: [
235
+ /* @__PURE__ */ jsx6("span", { className: "text-theme-text-secondary", children: "Progress" }),
236
+ /* @__PURE__ */ jsxs2("span", { className: "font-medium text-theme-text-primary", children: [
237
+ Math.round(percentage),
238
+ "%"
239
+ ] })
240
+ ] }),
241
+ /* @__PURE__ */ jsx6("div", { className: cn("w-full overflow-hidden rounded-full bg-theme-bg-tertiary", sizeClasses[size]), children: /* @__PURE__ */ jsx6(
242
+ "div",
243
+ {
244
+ className: cn("h-full transition-all duration-300 ease-in-out", variantClasses[variant]),
245
+ style: { width: `${percentage}%` }
246
+ }
247
+ ) })
248
+ ] }));
249
+ }
250
+
251
+ // src/components/atoms/Tabs.tsx
252
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
253
+ function Tabs({ tabs, activeTab, onTabChange, className, actions }) {
254
+ return /* @__PURE__ */ jsx7("div", { className: cn("border-b border-theme-border-primary", className), children: /* @__PURE__ */ jsx7("div", { className: "px-4 sm:px-6 pt-4", children: /* @__PURE__ */ jsxs3("div", { className: "p-0.5 flex items-center justify-between overflow-x-auto", children: [
255
+ /* @__PURE__ */ jsx7("nav", { className: "flex gap-4 sm:gap-8 min-w-min", children: tabs.map((tab) => /* @__PURE__ */ jsxs3(
256
+ "button",
257
+ {
258
+ onClick: () => onTabChange(tab.id),
259
+ className: cn(
260
+ "pb-3 px-1 text-sm font-medium border-b-2 transition-all flex items-center gap-2 cursor-pointer whitespace-nowrap",
261
+ activeTab === tab.id ? "border-theme-accent-primary text-theme-accent-primary" : "border-transparent text-theme-text-secondary hover:text-theme-text-primary hover:border-theme-accent-primary/40"
262
+ ),
263
+ children: [
264
+ tab.icon && /* @__PURE__ */ jsx7("span", { className: "flex-shrink-0", children: tab.icon }),
265
+ tab.label
266
+ ]
267
+ },
268
+ tab.id
269
+ )) }),
270
+ actions && /* @__PURE__ */ jsx7("div", { className: "pb-3", children: actions })
271
+ ] }) }) });
272
+ }
273
+ export {
274
+ Avatar,
275
+ Badge,
276
+ Button,
277
+ Card,
278
+ CardContent,
279
+ CardDescription,
280
+ CardFooter,
281
+ CardHeader,
282
+ CardTitle,
283
+ Input,
284
+ ProgressBar,
285
+ Tabs,
286
+ badgeVariants,
287
+ buttonVariants
288
+ };