@jameskyeong/uix 0.1.6

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 JamesKyeong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { confirmCreateDir, confirmOverwrite, printHeader, printSuccess, printThemeList, selectOutputPath, selectTheme, } from './prompts.js';
6
+ import { themeNames } from './themes.js';
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
9
+ function getThemeCssPath(themeName) {
10
+ return path.join(__dirname, 'themes', `${themeName}.css`);
11
+ }
12
+ function parseArgs(args) {
13
+ const result = { command: 'init' };
14
+ for (let i = 0; i < args.length; i++) {
15
+ const arg = args[i];
16
+ if (arg === 'init' || arg === 'theme') {
17
+ result.command = arg;
18
+ }
19
+ else if (arg === '--auto') {
20
+ result.auto = true;
21
+ }
22
+ else if (arg === '--list') {
23
+ result.list = true;
24
+ }
25
+ else if (arg.startsWith('--theme=')) {
26
+ result.theme = arg.split('=')[1];
27
+ }
28
+ else if (arg.startsWith('--output=')) {
29
+ result.output = arg.split('=')[1];
30
+ }
31
+ }
32
+ return result;
33
+ }
34
+ async function writeThemeFile(themeName, outputPath) {
35
+ const themeCssPath = getThemeCssPath(themeName);
36
+ if (!fs.existsSync(themeCssPath)) {
37
+ console.error(`Theme "${themeName}" not found.`);
38
+ return false;
39
+ }
40
+ const outputDir = path.dirname(outputPath);
41
+ // Check if directory exists
42
+ if (!fs.existsSync(outputDir)) {
43
+ const shouldCreate = await confirmCreateDir(outputDir);
44
+ if (!shouldCreate) {
45
+ return false;
46
+ }
47
+ fs.mkdirSync(outputDir, { recursive: true });
48
+ }
49
+ // Check if file exists
50
+ if (fs.existsSync(outputPath)) {
51
+ const action = await confirmOverwrite(outputPath);
52
+ if (action === 'cancel' || action === null) {
53
+ console.log('Cancelled.');
54
+ return false;
55
+ }
56
+ if (action !== 'overwrite') {
57
+ outputPath = action;
58
+ }
59
+ }
60
+ // Copy theme file
61
+ const themeContent = fs.readFileSync(themeCssPath, 'utf-8');
62
+ fs.writeFileSync(outputPath, themeContent, 'utf-8');
63
+ return true;
64
+ }
65
+ async function runInteractive() {
66
+ printHeader();
67
+ const themeName = await selectTheme();
68
+ if (!themeName) {
69
+ console.log('Cancelled.');
70
+ return;
71
+ }
72
+ const outputPath = await selectOutputPath();
73
+ if (!outputPath) {
74
+ console.log('Cancelled.');
75
+ return;
76
+ }
77
+ const success = await writeThemeFile(themeName, outputPath);
78
+ if (success) {
79
+ printSuccess(themeName, outputPath);
80
+ }
81
+ }
82
+ async function runNonInteractive(theme, output) {
83
+ if (!themeNames.includes(theme)) {
84
+ console.error(`Invalid theme: ${theme}`);
85
+ console.error(`Available themes: ${themeNames.join(', ')}`);
86
+ process.exit(1);
87
+ }
88
+ const outputDir = path.dirname(output);
89
+ if (!fs.existsSync(outputDir)) {
90
+ fs.mkdirSync(outputDir, { recursive: true });
91
+ }
92
+ const themeCssPath = getThemeCssPath(theme);
93
+ const themeContent = fs.readFileSync(themeCssPath, 'utf-8');
94
+ fs.writeFileSync(output, themeContent, 'utf-8');
95
+ printSuccess(theme, output);
96
+ }
97
+ async function main() {
98
+ const args = parseArgs(process.argv.slice(2));
99
+ // Handle --list flag
100
+ if (args.list) {
101
+ printThemeList();
102
+ return;
103
+ }
104
+ // Handle non-interactive mode
105
+ if (args.theme && args.output) {
106
+ await runNonInteractive(args.theme, args.output);
107
+ return;
108
+ }
109
+ // Handle auto mode (postinstall) - skip if not in a TTY
110
+ if (args.auto && !process.stdin.isTTY) {
111
+ console.log('@jameskyeong/uix installed.');
112
+ console.log('Run "npx @jameskyeong/uix init" to set up your theme.');
113
+ return;
114
+ }
115
+ // Run interactive mode
116
+ await runInteractive();
117
+ }
118
+ main().catch((error) => {
119
+ console.error('Error:', error.message);
120
+ process.exit(1);
121
+ });
@@ -0,0 +1,122 @@
1
+ import prompts from 'prompts';
2
+ import { themeNames, themes } from './themes.js';
3
+ // ANSI color codes
4
+ const colors = {
5
+ reset: '\x1b[0m',
6
+ bold: '\x1b[1m',
7
+ dim: '\x1b[2m',
8
+ green: '\x1b[32m',
9
+ cyan: '\x1b[36m',
10
+ white: '\x1b[37m',
11
+ };
12
+ function hexToAnsi(hex) {
13
+ const r = parseInt(hex.slice(1, 3), 16);
14
+ const g = parseInt(hex.slice(3, 5), 16);
15
+ const b = parseInt(hex.slice(5, 7), 16);
16
+ return `\x1b[38;2;${r};${g};${b}m`;
17
+ }
18
+ function colorBlock(hex) {
19
+ return `${hexToAnsi(hex)}\u25A0${colors.reset}`;
20
+ }
21
+ function formatThemeChoice(theme) {
22
+ const { prime, sub1, sub2 } = theme.colors;
23
+ return `${theme.displayName.padEnd(10)} ${colorBlock(prime)} ${colorBlock(sub1)} ${colorBlock(sub2)} ${colors.dim}${theme.description}${colors.reset}`;
24
+ }
25
+ export async function selectTheme() {
26
+ const choices = themeNames.map((name) => ({
27
+ title: formatThemeChoice(themes[name]),
28
+ value: name,
29
+ }));
30
+ const response = await prompts({
31
+ type: 'select',
32
+ name: 'theme',
33
+ message: 'Select a theme',
34
+ choices,
35
+ initial: 0,
36
+ });
37
+ return response.theme ?? null;
38
+ }
39
+ export async function selectOutputPath() {
40
+ const defaultPaths = ['./src/styles/uix-theme.css', './src/uix-theme.css', './uix-theme.css'];
41
+ const response = await prompts({
42
+ type: 'select',
43
+ name: 'path',
44
+ message: 'Theme file output path',
45
+ choices: [
46
+ ...defaultPaths.map((p) => ({ title: p, value: p })),
47
+ { title: 'Custom path...', value: '__custom__' },
48
+ ],
49
+ initial: 0,
50
+ });
51
+ if (response.path === '__custom__') {
52
+ const customResponse = await prompts({
53
+ type: 'text',
54
+ name: 'customPath',
55
+ message: 'Enter custom path',
56
+ initial: './uix-theme.css',
57
+ });
58
+ return customResponse.customPath ?? null;
59
+ }
60
+ return response.path ?? null;
61
+ }
62
+ export async function confirmOverwrite(filePath) {
63
+ const response = await prompts({
64
+ type: 'select',
65
+ name: 'action',
66
+ message: `${filePath} already exists`,
67
+ choices: [
68
+ { title: 'Overwrite', value: 'overwrite' },
69
+ { title: 'Save with different name', value: 'rename' },
70
+ { title: 'Cancel', value: 'cancel' },
71
+ ],
72
+ initial: 0,
73
+ });
74
+ if (response.action === 'rename') {
75
+ const renameResponse = await prompts({
76
+ type: 'text',
77
+ name: 'newPath',
78
+ message: 'Enter new file path',
79
+ initial: filePath.replace('.css', '-new.css'),
80
+ });
81
+ return renameResponse.newPath ?? null;
82
+ }
83
+ return response.action ?? null;
84
+ }
85
+ export async function confirmCreateDir(dirPath) {
86
+ const response = await prompts({
87
+ type: 'select',
88
+ name: 'action',
89
+ message: `Directory ${dirPath} does not exist`,
90
+ choices: [
91
+ { title: 'Create directory and continue', value: 'create' },
92
+ { title: 'Choose different path', value: 'different' },
93
+ { title: 'Cancel', value: 'cancel' },
94
+ ],
95
+ initial: 0,
96
+ });
97
+ return response.action === 'create';
98
+ }
99
+ export function printSuccess(_themeName, outputPath) {
100
+ console.log();
101
+ console.log(`${colors.green}\u2713${colors.reset} Theme file created successfully!`);
102
+ console.log();
103
+ console.log(`${colors.dim}Add the following imports to your project:${colors.reset}`);
104
+ console.log();
105
+ console.log(` ${colors.cyan}import "@jameskyeong/uix/styles.css";${colors.reset}`);
106
+ console.log(` ${colors.cyan}import "${outputPath}";${colors.reset}`);
107
+ console.log();
108
+ }
109
+ export function printThemeList() {
110
+ console.log();
111
+ console.log(`${colors.bold}Available themes:${colors.reset}`);
112
+ console.log();
113
+ for (const name of themeNames) {
114
+ console.log(` ${formatThemeChoice(themes[name])}`);
115
+ }
116
+ console.log();
117
+ }
118
+ export function printHeader() {
119
+ console.log();
120
+ console.log(`${colors.bold}@jameskyeong/uix${colors.reset} Theme Setup`);
121
+ console.log();
122
+ }
@@ -0,0 +1,44 @@
1
+ /* @jameskyeong/uix Theme: BlackSun */
2
+ /* Vibrant and sophisticated with coral pink accent */
3
+
4
+ :root {
5
+ /* Prime - Coral Pink */
6
+ --uix-prime-100: #ffd4d4;
7
+ --uix-prime-200: #ff9f9f;
8
+ --uix-prime-300: #ff6b7a;
9
+ --uix-prime-400: #e85566;
10
+ --uix-prime-500: #c94455;
11
+
12
+ /* Sub1 - Navy */
13
+ --uix-sub1-100: #4a5a7a;
14
+ --uix-sub1-200: #344263;
15
+ --uix-sub1-300: #1e2a4a;
16
+ --uix-sub1-400: #141d35;
17
+ --uix-sub1-500: #0a1020;
18
+
19
+ /* Sub2 - Mint */
20
+ --uix-sub2-100: #c8f5eb;
21
+ --uix-sub2-200: #9eebd8;
22
+ --uix-sub2-300: #7dd3c0;
23
+ --uix-sub2-400: #5bbaa8;
24
+ --uix-sub2-500: #3d9a8a;
25
+ }
26
+
27
+ .dark {
28
+ /* Dark mode surface - Dark Navy */
29
+ --uix-black-100: #3a4a6a;
30
+ --uix-black-200: #2a3a5a;
31
+ --uix-black-300: #1e2a4a;
32
+ --uix-black-400: #141d35;
33
+ --uix-black-500: #0a1020;
34
+
35
+ --uix-surface-100: var(--uix-black-300);
36
+ --uix-surface-200: var(--uix-black-400);
37
+ --uix-surface-300: var(--uix-black-400);
38
+ --uix-surface-400: var(--uix-black-500);
39
+ --uix-surface-500: var(--uix-black-500);
40
+
41
+ --uix-border-100: var(--uix-black-400);
42
+ --uix-border-200: var(--uix-black-300);
43
+ --uix-border-300: var(--uix-black-200);
44
+ }
@@ -0,0 +1,44 @@
1
+ /* @jameskyeong/uix Theme: Emerald */
2
+ /* Luxurious and natural jewel-like feel */
3
+
4
+ :root {
5
+ /* Prime - Emerald */
6
+ --uix-prime-100: #a8e6cf;
7
+ --uix-prime-200: #7cd4b8;
8
+ --uix-prime-300: #50c4a1;
9
+ --uix-prime-400: #3aa888;
10
+ --uix-prime-500: #2d8f72;
11
+
12
+ /* Sub1 - Gold */
13
+ --uix-sub1-100: #ffe4a0;
14
+ --uix-sub1-200: #f5d070;
15
+ --uix-sub1-300: #e5b84c;
16
+ --uix-sub1-400: #d4a43a;
17
+ --uix-sub1-500: #b8922e;
18
+
19
+ /* Sub2 - Deep Teal */
20
+ --uix-sub2-100: #7ab8a8;
21
+ --uix-sub2-200: #5a9a8a;
22
+ --uix-sub2-300: #2d6e5e;
23
+ --uix-sub2-400: #225a4c;
24
+ --uix-sub2-500: #1a4a3e;
25
+ }
26
+
27
+ .dark {
28
+ /* Dark mode surface - Cool Gray */
29
+ --uix-black-100: #3a3c42;
30
+ --uix-black-200: #2a2c32;
31
+ --uix-black-300: #1a1c20;
32
+ --uix-black-400: #121418;
33
+ --uix-black-500: #0a0c0e;
34
+
35
+ --uix-surface-100: var(--uix-black-300);
36
+ --uix-surface-200: var(--uix-black-400);
37
+ --uix-surface-300: var(--uix-black-400);
38
+ --uix-surface-400: var(--uix-black-500);
39
+ --uix-surface-500: var(--uix-black-500);
40
+
41
+ --uix-border-100: var(--uix-black-400);
42
+ --uix-border-200: var(--uix-black-300);
43
+ --uix-border-300: var(--uix-black-200);
44
+ }
@@ -0,0 +1,44 @@
1
+ /* @jameskyeong/uix Theme: JSK */
2
+ /* Warm and soft feel with lavender blue accent */
3
+
4
+ :root {
5
+ /* Prime - Lavender Blue */
6
+ --uix-prime-100: #c4c4eb;
7
+ --uix-prime-200: #a3a3e0;
8
+ --uix-prime-300: #8383d6;
9
+ --uix-prime-400: #6363cb;
10
+ --uix-prime-500: #4a4ab0;
11
+
12
+ /* Sub1 - Coral */
13
+ --uix-sub1-100: #f5c4b8;
14
+ --uix-sub1-200: #f0a08b;
15
+ --uix-sub1-300: #e87c5d;
16
+ --uix-sub1-400: #d9593a;
17
+ --uix-sub1-500: #b84526;
18
+
19
+ /* Sub2 - Beige */
20
+ --uix-sub2-100: #f5ebe0;
21
+ --uix-sub2-200: #e6d5c3;
22
+ --uix-sub2-300: #d4bc9a;
23
+ --uix-sub2-400: #c4a67a;
24
+ --uix-sub2-500: #a8895e;
25
+ }
26
+
27
+ .dark {
28
+ /* Dark mode surface - Warm Gray */
29
+ --uix-black-100: #4a4644;
30
+ --uix-black-200: #393634;
31
+ --uix-black-300: #282524;
32
+ --uix-black-400: #1a1817;
33
+ --uix-black-500: #0d0c0b;
34
+
35
+ --uix-surface-100: var(--uix-black-300);
36
+ --uix-surface-200: var(--uix-black-400);
37
+ --uix-surface-300: var(--uix-black-400);
38
+ --uix-surface-400: var(--uix-black-500);
39
+ --uix-surface-500: var(--uix-black-500);
40
+
41
+ --uix-border-100: var(--uix-black-400);
42
+ --uix-border-200: var(--uix-black-300);
43
+ --uix-border-300: var(--uix-black-200);
44
+ }
@@ -0,0 +1,33 @@
1
+ export const themes = {
2
+ jsk: {
3
+ name: 'jsk',
4
+ displayName: 'JSK',
5
+ description: 'Lavender Blue + Warm Gray',
6
+ colors: {
7
+ prime: '#8383d6',
8
+ sub1: '#e87c5d',
9
+ sub2: '#d4bc9a',
10
+ },
11
+ },
12
+ blacksun: {
13
+ name: 'blacksun',
14
+ displayName: 'BlackSun',
15
+ description: 'Coral Pink + Dark Navy',
16
+ colors: {
17
+ prime: '#ff6b7a',
18
+ sub1: '#1e2a4a',
19
+ sub2: '#7dd3c0',
20
+ },
21
+ },
22
+ emerald: {
23
+ name: 'emerald',
24
+ displayName: 'Emerald',
25
+ description: 'Emerald + Cool Gray',
26
+ colors: {
27
+ prime: '#50c4a1',
28
+ sub1: '#e5b84c',
29
+ sub2: '#2d6e5e',
30
+ },
31
+ },
32
+ };
33
+ export const themeNames = Object.keys(themes);
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),m=require("motion/react"),n=require("react"),v=require("clsx"),re=require("tailwind-merge"),y=require("lucide-react"),se=require("shiki"),ie=require("react-dom");function c(...e){return re.twMerge(v.clsx(e))}const w=n.forwardRef(({className:e,variant:t="default",size:r="sm",children:s,...o},a)=>{const l=t==="default"?"uix-convex-colored-sm":"uix-convex-sm",u={default:"bg-uix-prime-300 backdrop-blur-sm text-uix-white-100",secondary:"bg-uix-surface-300/80 backdrop-blur-sm text-uix-text-100",outline:"border border-uix-border-200 bg-uix-surface-100/50 backdrop-blur-sm text-uix-text-300"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm"},{onDrag:g,onDragStart:d,onDragEnd:p,...b}=o;return i.jsx(m.motion.span,{ref:a,className:c("inline-flex items-center rounded-xl font-medium",l,u[t],x[r],e),whileHover:{scale:1.05},whileTap:{scale:.97},transition:{type:"tween",duration:.1,ease:"linear"},...b,children:s})});w.displayName="Badge";const j=n.forwardRef(({className:e,variant:t,color:r="prime",size:s="md",children:o,...a},l)=>{const x=`inline-flex items-center justify-center rounded-full font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300 disabled:pointer-events-none disabled:opacity-50 cursor-pointer backdrop-blur-sm ${t==="filled"?"uix-convex-colored-sm":"uix-convex-sm"}`,g="bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80",d={prime:"bg-uix-prime-300 text-uix-white-100 hover:bg-uix-prime-400",sub1:"bg-uix-sub1-300 text-uix-white-100 hover:bg-uix-sub1-400",sub2:"bg-uix-sub2-300 text-uix-black-300 hover:bg-uix-sub2-400"},p={prime:"border border-uix-prime-300/50 text-uix-prime-300 bg-uix-surface-100/20 hover:bg-uix-prime-300 hover:text-uix-white-100 hover:border-transparent",sub1:"border border-uix-sub1-300/50 text-uix-sub1-300 bg-uix-surface-100/20 hover:bg-uix-sub1-300 hover:text-uix-white-100 hover:border-transparent",sub2:"border border-uix-sub2-300/50 text-uix-sub2-400 bg-uix-surface-100/20 hover:bg-uix-sub2-300 hover:text-uix-black-300 hover:border-transparent"},b={prime:"bg-transparent text-uix-prime-300 hover:bg-uix-prime-100/15",sub1:"bg-transparent text-uix-sub1-300 hover:bg-uix-sub1-100/15",sub2:"bg-transparent text-uix-sub2-400 hover:bg-uix-sub2-100/15"},f={filled:d[r],outline:p[r],ghost:b[r]},h={sm:"px-4 py-2 text-sm",md:"px-6 py-3 text-base",lg:"px-8 py-4 text-lg"},te=t?f[t]:g;return i.jsx(m.motion.button,{ref:l,className:c(x,te,h[s],e),whileHover:{scale:1.03,y:-1},whileTap:{scale:.96},transition:{duration:.06,ease:[0,0,1,1]},...a,children:o})});j.displayName="Button";const T=n.forwardRef(({className:e,children:t,hover:r=!0,accentColor:s="none",accentPosition:o="none",...a},l)=>{const u={prime:"bg-uix-prime-300",sub1:"bg-uix-sub1-300",sub2:"bg-uix-sub2-300",none:""};return i.jsxs(m.motion.div,{ref:l,className:c("relative bg-uix-surface-100/80 backdrop-blur-xl backdrop-saturate-150 uix-glass-border rounded-[2rem] overflow-hidden uix-convex",e),initial:!1,whileHover:r?{y:-4,scale:1.01}:void 0,transition:{type:"tween",duration:.15,ease:"linear"},...a,children:[o==="top"&&s!=="none"&&i.jsx("div",{className:c("absolute top-0 left-0 right-0 h-1",u[s])}),o==="left"&&s!=="none"&&i.jsx("div",{className:c("absolute top-0 left-0 bottom-0 w-1",u[s])}),t]})});T.displayName="Card";const C=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("p-6 xl:p-8",e),...r,children:t}));C.displayName="CardContent";const k=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("flex items-center gap-4 mb-4",e),...r,children:t}));k.displayName="CardHeader";const R=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("h3",{ref:s,className:c("text-xl xl:text-2xl font-bold text-uix-text-100",e),...r,children:t}));R.displayName="CardTitle";const E=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("p",{ref:s,className:c("text-uix-gray-200 leading-relaxed",e),...r,children:t}));E.displayName="CardDescription";const D=n.forwardRef(({className:e,code:t,language:r="tsx",showLineNumbers:s=!1,...o},a)=>{const[l,u]=n.useState(!1),[x,g]=n.useState("");n.useEffect(()=>{(async()=>{const b=await se.codeToHtml(t.trim(),{lang:r,theme:"github-dark"});g(b)})()},[t,r]);const d=async()=>{await navigator.clipboard.writeText(t.trim()),u(!0),setTimeout(()=>u(!1),2e3)};return i.jsxs("div",{ref:a,className:c("relative rounded-2xl bg-uix-black-400 overflow-hidden uix-convex",e),...o,children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-uix-black-200",children:[i.jsx(w,{variant:"secondary",size:"sm",children:r}),i.jsx("button",{type:"button",onClick:d,className:"p-1.5 rounded-xl hover:bg-uix-black-200 transition-colors","aria-label":"Copy code",children:l?i.jsx(y.Check,{size:14,className:"text-green-400"}):i.jsx(y.Copy,{size:14,className:"text-uix-gray-100"})})]}),i.jsx("div",{className:c("p-4 overflow-x-auto text-sm","[&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-0","[&_code]:!bg-transparent",s&&"[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"),dangerouslySetInnerHTML:{__html:x}})]})});D.displayName="CodeBlock";const ne={prime:"var(--uix-prime-300)",sub1:"var(--uix-sub1-300)",sub2:"var(--uix-sub2-300)"},oe={prime:"bg-gradient-to-br from-uix-prime-400 via-uix-prime-300 to-uix-prime-400",sub1:"bg-gradient-to-br from-uix-sub1-400 via-uix-sub1-300 to-uix-sub1-400",sub2:"bg-gradient-to-br from-uix-sub2-400 via-uix-sub2-300 to-uix-sub2-400"};function ae({children:e,className:t="",color:r="prime",gradient:s=!1,delay:o=0,charDelay:a=.04}){const l=n.useRef(null),u=m.useInView(l,{once:!0,margin:"-50px"}),[x,g]=n.useState(!1),d=1,p=e.length,b=d+o+p*a+.25;return n.useEffect(()=>{if(s&&u&&!x){const f=setTimeout(()=>{g(!0)},b*1e3);return()=>clearTimeout(f)}},[s,u,x,b]),s&&x?i.jsx("span",{ref:l,className:`inline-block bg-clip-text text-transparent ${oe[r]} ${t}`,children:e}):i.jsx("span",{ref:l,className:`inline-block ${t}`,children:e.split("").map((f,h)=>i.jsx(m.motion.span,{className:"inline-block",style:{color:"var(--uix-text-100)"},animate:u?{color:ne[r]}:{},transition:{duration:.25,delay:d+o+h*a,ease:[.1,.1,.9,.9]},children:f===" "?" ":f},h))})}const L=n.createContext(null);function S(){const e=n.useContext(L);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e}function le({children:e,open:t,onOpenChange:r,className:s,...o}){const[a,l]=n.useState(!1),u=n.useRef(null),x=t??a,g=d=>{l(d),r==null||r(d)};return i.jsx(L.Provider,{value:{open:x,setOpen:g,triggerRef:u},children:i.jsx("div",{className:v.clsx("relative inline-block",s),...o,children:e})})}function ue({children:e,className:t,onClick:r,...s}){const{open:o,setOpen:a,triggerRef:l}=S();return i.jsxs("button",{ref:l,type:"button",className:v.clsx("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-sm font-medium","uix-glass uix-glass-border uix-convex-sm","text-uix-text-200 hover:text-uix-text-100 transition-colors",t),onClick:u=>{a(!o),r==null||r(u)},"aria-expanded":o,"aria-haspopup":"true",...s,children:[e,i.jsx("svg",{className:v.clsx("w-3.5 h-3.5 transition-transform duration-200",o&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]})}function ce({children:e,className:t,align:r="start"}){const{open:s,setOpen:o,triggerRef:a}=S(),l=n.useRef(null),[u,x]=n.useState({top:0,left:0});n.useLayoutEffect(()=>{if(!s||!a.current)return;const d=()=>{var f;const p=(f=a.current)==null?void 0:f.getBoundingClientRect();if(!p)return;let b=p.left;r==="center"?b=p.left+p.width/2:r==="end"&&(b=p.right),x({top:p.bottom+8,left:b})};return d(),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[s,a,r]),n.useEffect(()=>{if(!s)return;const d=b=>{l.current&&!l.current.contains(b.target)&&a.current&&!a.current.contains(b.target)&&o(!1)},p=b=>{var f;b.key==="Escape"&&(o(!1),(f=a.current)==null||f.focus())};return document.addEventListener("mousedown",d),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",p)}},[s,o,a]);const g={start:{transform:"translateX(0)"},center:{transform:"translateX(-50%)"},end:{transform:"translateX(-100%)"}};return typeof document>"u"?null:ie.createPortal(i.jsx(m.AnimatePresence,{children:s&&i.jsx(m.motion.div,{ref:l,initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:400,damping:25,mass:.8},className:v.clsx("fixed z-50 min-w-[180px]","uix-glass uix-glass-border uix-convex uix-glass-noise rounded-2xl","p-1.5 shadow-xl",t),style:{top:u.top,left:u.left,...g[r]},role:"menu",children:e})}),document.body)}function de({children:e,className:t,disabled:r,onClick:s,...o}){const{setOpen:a}=S();return i.jsx("button",{type:"button",role:"menuitem",disabled:r,className:v.clsx("w-full flex items-center gap-2 px-3 py-2 rounded-xl text-sm text-left","transition-colors duration-100",r?"text-uix-text-300 cursor-not-allowed":"text-uix-text-200 hover:text-uix-text-100 hover:bg-uix-surface-300/60",t),onClick:l=>{r||(s==null||s(l),a(!1))},...o,children:e})}function xe({className:e,...t}){return i.jsx("hr",{className:v.clsx("my-1.5 h-px border-0 bg-uix-border-100",e),...t})}const N=n.forwardRef(({className:e,orientation:t="vertical",children:r,...s},o)=>{const a={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"};return i.jsx("div",{ref:o,className:c("relative",a[t],"[&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-uix-gray-300/50","[&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb]:hover:bg-uix-gray-300",e),...s,children:r})});N.displayName="ScrollArea";function be({threshold:e=500,className:t}){const[r,s]=n.useState(!1);n.useEffect(()=>{const a=()=>{s(window.scrollY>e)};return window.addEventListener("scroll",a,{passive:!0}),()=>window.removeEventListener("scroll",a)},[e]);const o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return i.jsx(m.AnimatePresence,{children:r&&i.jsx(m.motion.button,{initial:{opacity:0,scale:.5,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.5,y:20},whileHover:{scale:1.1,y:-2},whileTap:{scale:.9},transition:{default:{type:"spring",stiffness:300,damping:20,mass:.8},scale:{duration:.06,ease:[0,0,1,1]}},onClick:o,className:c("fixed bottom-6 right-6 z-50 p-3 rounded-full bg-uix-prime-300 backdrop-blur-sm text-uix-white-100 hover:bg-uix-prime-400 cursor-pointer uix-convex-colored",t),"aria-label":"Scroll to top",children:i.jsx(y.ChevronUp,{size:24})})})}const H=n.forwardRef(({className:e,children:t,variant:r="default",container:s=!0,animate:o=!0,id:a,...l},u)=>{const x=n.useRef(null),g=m.useInView(x,{once:!0,margin:"-100px"}),d="backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex",p={default:`bg-uix-surface-200/50 ${d}`,secondary:`bg-uix-surface-300/50 ${d}`,accent:`bg-uix-prime-300/60 ${d} text-uix-white-100`},b=s?i.jsx("div",{className:"max-w-4xl mx-auto px-6 xl:px-12",children:t}):t;return i.jsx("section",{ref:f=>{x.current=f,typeof u=="function"?u(f):u&&(u.current=f)},id:a,className:c("relative py-16 xl:py-24 rounded-[2.5rem]",p[r],e),...l,children:o?i.jsx(m.motion.div,{initial:{opacity:0,y:40},animate:g?{opacity:1,y:0}:{opacity:0,y:40},transition:{type:"spring",stiffness:200,damping:25,mass:1},children:b}):b})});H.displayName="Section";const I=n.forwardRef(({className:e,children:t,subtitle:r,...s},o)=>i.jsxs("div",{className:"text-center mb-14 xl:mb-20",children:[i.jsx("h2",{ref:o,className:c("text-4xl xl:text-6xl font-bold text-uix-text-100 mb-6 tracking-tight",e),...s,children:t}),r&&i.jsx("p",{className:"text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed",children:r})]}));I.displayName="SectionTitle";const P=n.createContext(null),me=()=>{const e=n.useContext(P);if(!e)throw new Error("Sheet components must be used within a Sheet provider");return e},z=({open:e,onOpenChange:t,children:r})=>(n.useEffect(()=>{const s=o=>{o.key==="Escape"&&e&&t(!1)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),n.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),i.jsx(P.Provider,{value:{open:e,onOpenChange:t},children:r}));z.displayName="Sheet";const B=n.forwardRef(({className:e,side:t="left",children:r},s)=>{const{open:o,onOpenChange:a}=me(),l={left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}}},u={left:"left-0",right:"right-0"};return i.jsx(m.AnimatePresence,{children:o&&i.jsxs(i.Fragment,{children:[i.jsx(m.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:()=>a(!1)}),i.jsx(m.motion.div,{ref:s,initial:l[t].initial,animate:l[t].animate,exit:l[t].exit,transition:{type:"spring",damping:25,stiffness:300},className:c("fixed top-0 z-50 h-full w-72 bg-uix-surface-100/90 backdrop-blur-xl backdrop-saturate-150 border-r border-black/[0.3] dark:border-white/[0.03] rounded-r-3xl uix-convex-lg",u[t],e),children:r})]})})});B.displayName="SheetContent";const M=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("flex flex-col gap-2 p-6 border-b border-uix-border-100",e),...r,children:t}));M.displayName="SheetHeader";const A=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("h2",{ref:s,className:c("text-lg font-semibold text-uix-text-100",e),...r,children:t}));A.displayName="SheetTitle";const pe="relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl",V=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("aside",{ref:s,className:c("hidden xl:flex flex-col w-60 h-full",pe,e),...r,children:t}));V.displayName="Sidebar";const _=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("flex flex-col gap-1 p-6",e),...r,children:t}));_.displayName="SidebarHeader";const $=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx(N,{ref:s,className:c("flex-1 p-4",e),...r,children:t}));$.displayName="SidebarContent";const q=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("mb-6",e),...r,children:t}));q.displayName="SidebarGroup";const G=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("px-3 mb-3 text-xs font-semibold uppercase tracking-widest text-uix-sub1-300/80",e),...r,children:t}));G.displayName="SidebarGroupLabel";const O=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("ul",{ref:s,className:c("space-y-1",e),...r,children:t}));O.displayName="SidebarMenu";const X=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("li",{ref:s,className:c("",e),...r,children:t}));X.displayName="SidebarMenuItem";const F=n.forwardRef(({className:e,isActive:t=!1,children:r,...s},o)=>{const{onDrag:a,onDragStart:l,onDragEnd:u,...x}=s;return i.jsxs(m.motion.button,{ref:o,type:"button",className:c("relative flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-base font-medium","hover:bg-uix-surface-300/50 hover:text-uix-text-100",t?"text-uix-prime-300 bg-uix-prime-100/15":"text-uix-text-300",e),whileHover:{x:4,scale:1.01},whileTap:{scale:.97},transition:{duration:.08,ease:[0,0,1,1]},...x,children:[t&&i.jsx(m.motion.span,{className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-uix-prime-300 rounded-r-full",layoutId:"sidebar-active-indicator",transition:{type:"spring",stiffness:300,damping:20,mass:.8}}),r]})});F.displayName="SidebarMenuButton";const U=n.forwardRef(({className:e,variant:t="default",rounded:r="3xl",children:s,...o},a)=>{const l="relative uix-glass uix-glass-border uix-convex uix-glass-noise",u={default:"",subtle:"uix-convex-subtle",strong:"uix-convex-lg"},x={none:"rounded-none",sm:"rounded-lg",md:"rounded-xl",lg:"rounded-2xl",xl:"rounded-[1.5rem]","2xl":"rounded-[2rem]","3xl":"rounded-3xl",full:"rounded-full"};return i.jsx("div",{ref:a,className:c(l,u[t],x[r],e),...o,children:s})});U.displayName="Surface";const W=n.createContext(null),Y=()=>{const e=n.useContext(W);if(!e)throw new Error("Tabs components must be used within a Tabs provider");return e},J=n.forwardRef(({className:e,defaultValue:t,children:r,...s},o)=>{const[a,l]=n.useState(t),u=n.useId();return i.jsx(W.Provider,{value:{activeTab:a,setActiveTab:l,tabsId:u},children:i.jsx("div",{ref:o,className:c("w-full",e),...s,children:r})})});J.displayName="Tabs";const K=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("inline-flex items-center gap-1 rounded-2xl bg-uix-surface-300/50 backdrop-blur-xl backdrop-saturate-150 uix-glass-border p-1.5 uix-convex",e),...r,children:t}));K.displayName="TabsList";const Q=n.forwardRef(({className:e,value:t,children:r,...s},o)=>{const{activeTab:a,setActiveTab:l,tabsId:u}=Y(),x=a===t,{onDrag:g,onDragStart:d,onDragEnd:p,...b}=s;return i.jsxs(m.motion.button,{ref:o,type:"button",onClick:()=>l(t),className:c("relative inline-flex items-center justify-center px-4 py-2 text-base font-medium rounded-xl","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",x?"text-uix-text-100":"text-uix-text-300 hover:text-uix-text-100",e),whileHover:{scale:1.02},whileTap:{scale:.96},transition:{duration:.06,ease:[0,0,1,1]},...b,children:[x&&i.jsx(m.motion.span,{layoutId:`tabs-indicator-${u}`,className:"absolute inset-0 bg-uix-surface-100 rounded-xl uix-convex-sm",transition:{type:"spring",stiffness:300,damping:20,mass:.8}}),i.jsx("span",{className:"relative z-10",children:r})]})});Q.displayName="TabsTrigger";const Z=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("relative mt-4",e),...r,children:i.jsx("div",{className:"grid [&>*]:col-start-1 [&>*]:row-start-1",children:t})}));Z.displayName="TabsPanels";const ee=n.forwardRef(({className:e,value:t,children:r,...s},o)=>{const{activeTab:a}=Y(),l=a===t;return i.jsx(m.motion.div,{ref:o,className:c(e),initial:!1,animate:{opacity:l?1:0,scale:l?1:.98,y:l?0:8,visibility:l?"visible":"hidden"},transition:{type:"spring",stiffness:400,damping:25,mass:.8},"aria-hidden":!l,children:i.jsx("div",{...s,children:r})})});ee.displayName="TabsContent";exports.Badge=w;exports.Button=j;exports.Card=T;exports.CardContent=C;exports.CardDescription=E;exports.CardHeader=k;exports.CardTitle=R;exports.CodeBlock=D;exports.ColorSwipeText=ae;exports.Dropdown=le;exports.DropdownContent=ce;exports.DropdownItem=de;exports.DropdownSeparator=xe;exports.DropdownTrigger=ue;exports.ScrollArea=N;exports.ScrollToTop=be;exports.Section=H;exports.SectionTitle=I;exports.Sheet=z;exports.SheetContent=B;exports.SheetHeader=M;exports.SheetTitle=A;exports.Sidebar=V;exports.SidebarContent=$;exports.SidebarGroup=q;exports.SidebarGroupLabel=G;exports.SidebarHeader=_;exports.SidebarMenu=O;exports.SidebarMenuButton=F;exports.SidebarMenuItem=X;exports.Surface=U;exports.Tabs=J;exports.TabsContent=ee;exports.TabsList=K;exports.TabsPanels=Z;exports.TabsTrigger=Q;exports.cn=c;