@appcorp/stellar-solutions-modules 0.1.34 → 0.1.36

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 (181) hide show
  1. package/README.md +128 -19
  2. package/components/theme-provider.d.ts +9 -0
  3. package/components/theme-provider.js +122 -0
  4. package/components/theme-switcher.d.ts +4 -0
  5. package/components/theme-switcher.js +60 -0
  6. package/components/ui/badge.d.ts +9 -0
  7. package/components/ui/badge.js +82 -0
  8. package/components/ui/button.d.ts +10 -0
  9. package/components/ui/button.js +91 -0
  10. package/components/ui/card.d.ts +9 -0
  11. package/components/ui/card.js +94 -0
  12. package/components/ui/checkbox.d.ts +9 -0
  13. package/components/ui/checkbox.js +87 -0
  14. package/components/ui/combobox.d.ts +70 -0
  15. package/components/ui/combobox.js +315 -0
  16. package/components/ui/command.d.ts +18 -0
  17. package/components/ui/command.js +115 -0
  18. package/components/ui/dialog.d.ts +15 -0
  19. package/components/ui/dialog.js +118 -0
  20. package/components/ui/drawer.d.ts +13 -0
  21. package/components/ui/drawer.js +115 -0
  22. package/components/ui/dropdown-menu.d.ts +25 -0
  23. package/components/ui/dropdown-menu.js +148 -0
  24. package/components/ui/enhanced-table-footer-action.d.ts +34 -0
  25. package/components/ui/enhanced-table-footer-action.js +117 -0
  26. package/components/ui/enhanced-table-footer-page.d.ts +32 -0
  27. package/components/ui/enhanced-table-footer-page.js +140 -0
  28. package/components/ui/enhanced-table-footer-pagination.d.ts +36 -0
  29. package/components/ui/enhanced-table-footer-pagination.js +122 -0
  30. package/components/ui/enhanced-table-header-action.d.ts +7 -0
  31. package/components/ui/enhanced-table-header-action.js +21 -0
  32. package/components/ui/enhanced-table-header-search.d.ts +12 -0
  33. package/components/ui/enhanced-table-header-search.js +17 -0
  34. package/components/ui/enhanced-table.d.ts +65 -0
  35. package/components/ui/enhanced-table.js +87 -0
  36. package/components/ui/form.d.ts +24 -0
  37. package/components/ui/form.js +125 -0
  38. package/components/ui/input.d.ts +8 -0
  39. package/components/ui/input.js +86 -0
  40. package/components/ui/label.d.ts +7 -0
  41. package/components/ui/label.js +68 -0
  42. package/components/ui/popover.d.ts +7 -0
  43. package/components/ui/popover.js +82 -0
  44. package/components/ui/select.d.ts +15 -0
  45. package/components/ui/select.js +127 -0
  46. package/components/ui/separator.d.ts +4 -0
  47. package/components/ui/separator.js +66 -0
  48. package/components/ui/sonner.d.ts +4 -0
  49. package/components/ui/sonner.js +54 -0
  50. package/components/ui/switch.d.ts +9 -0
  51. package/components/ui/switch.js +89 -0
  52. package/components/ui/table.d.ts +10 -0
  53. package/components/ui/table.js +101 -0
  54. package/components/ui/textarea.d.ts +8 -0
  55. package/components/ui/textarea.js +86 -0
  56. package/global-modules/bank/actions.d.ts +200 -0
  57. package/global-modules/bank/actions.js +124 -0
  58. package/global-modules/bank/bank.d.ts +2 -0
  59. package/global-modules/bank/bank.js +87 -0
  60. package/global-modules/bank/constants.d.ts +45 -0
  61. package/global-modules/bank/constants.js +98 -0
  62. package/global-modules/bank/context.d.ts +41 -0
  63. package/global-modules/bank/context.js +419 -0
  64. package/global-modules/bank/drawer.d.ts +31 -0
  65. package/global-modules/bank/drawer.js +114 -0
  66. package/global-modules/bank/form.d.ts +22 -0
  67. package/global-modules/bank/form.js +68 -0
  68. package/global-modules/bank/reducer.d.ts +25 -0
  69. package/global-modules/bank/reducer.js +161 -0
  70. package/global-modules/bank/types.d.ts +217 -0
  71. package/global-modules/bank/types.js +81 -0
  72. package/global-modules/bank/validate.d.ts +13 -0
  73. package/global-modules/bank/validate.js +22 -0
  74. package/global-modules/branch/actions.d.ts +154 -37
  75. package/global-modules/branch/actions.js +148 -6
  76. package/global-modules/branch/branch.d.ts +2 -2
  77. package/global-modules/branch/branch.js +46 -32
  78. package/global-modules/branch/constants.d.ts +34 -24
  79. package/global-modules/branch/constants.js +101 -122
  80. package/global-modules/branch/context.d.ts +33 -2
  81. package/global-modules/branch/context.js +195 -164
  82. package/global-modules/branch/drawer.d.ts +26 -3
  83. package/global-modules/branch/drawer.js +101 -6
  84. package/global-modules/branch/form.d.ts +15 -1
  85. package/global-modules/branch/form.js +54 -71
  86. package/global-modules/branch/reducer.d.ts +23 -2
  87. package/global-modules/branch/reducer.js +148 -118
  88. package/global-modules/branch/types.d.ts +196 -69
  89. package/global-modules/branch/types.js +66 -7
  90. package/global-modules/branch/validate.d.ts +1 -1
  91. package/global-modules/branch/validate.js +15 -11
  92. package/global-modules/payment-mode/actions.d.ts +154 -37
  93. package/global-modules/payment-mode/actions.js +148 -6
  94. package/global-modules/payment-mode/constants.d.ts +34 -17
  95. package/global-modules/payment-mode/constants.js +90 -66
  96. package/global-modules/payment-mode/context.d.ts +33 -2
  97. package/global-modules/payment-mode/context.js +185 -163
  98. package/global-modules/payment-mode/drawer.d.ts +26 -3
  99. package/global-modules/payment-mode/drawer.js +104 -9
  100. package/global-modules/payment-mode/form.d.ts +16 -2
  101. package/global-modules/payment-mode/form.js +45 -74
  102. package/global-modules/payment-mode/payment-mode.d.ts +25 -2
  103. package/global-modules/payment-mode/payment-mode.js +90 -23
  104. package/global-modules/payment-mode/reducer.d.ts +23 -2
  105. package/global-modules/payment-mode/reducer.js +140 -114
  106. package/global-modules/payment-mode/types.d.ts +327 -112
  107. package/global-modules/payment-mode/types.js +162 -11
  108. package/global-modules/payment-mode/validate.d.ts +1 -1
  109. package/global-modules/payment-mode/validate.js +7 -5
  110. package/global-modules/preferences/actions.d.ts +126 -27
  111. package/global-modules/preferences/actions.js +128 -4
  112. package/global-modules/preferences/constants.d.ts +46 -31
  113. package/global-modules/preferences/constants.js +129 -66
  114. package/global-modules/preferences/context.d.ts +2 -2
  115. package/global-modules/preferences/context.js +43 -43
  116. package/global-modules/preferences/currency.js +15 -10
  117. package/global-modules/preferences/preferences.d.ts +2 -2
  118. package/global-modules/preferences/preferences.js +3 -5
  119. package/global-modules/preferences/validate.d.ts +1 -1
  120. package/global-modules/preferences/validate.js +7 -7
  121. package/global-modules/tax/actions.d.ts +155 -38
  122. package/global-modules/tax/actions.js +149 -7
  123. package/global-modules/tax/constants.d.ts +31 -39
  124. package/global-modules/tax/constants.js +83 -114
  125. package/global-modules/tax/context.d.ts +33 -2
  126. package/global-modules/tax/context.js +146 -132
  127. package/global-modules/tax/drawer.d.ts +26 -3
  128. package/global-modules/tax/drawer.js +101 -6
  129. package/global-modules/tax/form.d.ts +20 -3
  130. package/global-modules/tax/form.js +101 -74
  131. package/global-modules/tax/reducer.d.ts +23 -2
  132. package/global-modules/tax/reducer.js +143 -24
  133. package/global-modules/tax/tax.d.ts +25 -2
  134. package/global-modules/tax/tax.js +92 -28
  135. package/global-modules/tax/types.d.ts +332 -102
  136. package/global-modules/tax/types.js +179 -11
  137. package/global-modules/tax/validate.d.ts +1 -1
  138. package/global-modules/tax/validate.js +9 -8
  139. package/hooks/use-rtl.d.ts +44 -0
  140. package/hooks/use-rtl.js +75 -0
  141. package/i18n/navigation.d.ts +340 -0
  142. package/i18n/navigation.js +9 -0
  143. package/i18n/request.d.ts +2 -0
  144. package/i18n/request.js +95 -0
  145. package/i18n/routing.d.ts +18 -0
  146. package/i18n/routing.js +9 -0
  147. package/index.d.ts +26 -0
  148. package/index.js +42 -0
  149. package/lib/themes.d.ts +147 -0
  150. package/lib/themes.js +150 -0
  151. package/lib/toast-utils.d.ts +44 -0
  152. package/lib/toast-utils.js +212 -0
  153. package/lib/utils.d.ts +2 -0
  154. package/lib/utils.js +12 -0
  155. package/package.json +21 -3
  156. package/supabase/supabase.d.ts +80 -1
  157. package/supabase/supabase.js +281 -6
  158. package/global-modules/branch/form-elements.d.ts +0 -3
  159. package/global-modules/branch/form-elements.js +0 -41
  160. package/global-modules/payment-mode/form-elements.d.ts +0 -3
  161. package/global-modules/payment-mode/form-elements.js +0 -41
  162. package/global-modules/preferences/bank.d.ts +0 -2
  163. package/global-modules/preferences/bank.js +0 -11
  164. package/global-modules/preferences/branch-drawer.js +0 -36
  165. package/global-modules/preferences/branch-form-elements.js +0 -30
  166. package/global-modules/preferences/branch-form.d.ts +0 -0
  167. package/global-modules/preferences/branch-form.js +0 -33
  168. package/global-modules/preferences/branch.d.ts +0 -0
  169. package/global-modules/preferences/branch.js +0 -106
  170. package/global-modules/preferences/payment-mode-drawer.d.ts +0 -0
  171. package/global-modules/preferences/payment-mode-drawer.js +0 -36
  172. package/global-modules/preferences/payment-mode-form-elements.d.ts +0 -0
  173. package/global-modules/preferences/payment-mode-form-elements.js +0 -30
  174. package/global-modules/preferences/payment-mode-form.d.ts +0 -0
  175. package/global-modules/preferences/payment-mode-form.js +0 -33
  176. package/global-modules/preferences/payment-mode.d.ts +0 -0
  177. package/global-modules/preferences/payment-mode.js +0 -94
  178. package/global-modules/tax/form-elements.d.ts +0 -3
  179. package/global-modules/tax/form-elements.js +0 -41
  180. /package/{global-modules/preferences/branch-drawer.d.ts → constants.d.ts} +0 -0
  181. /package/{global-modules/preferences/branch-form-elements.d.ts → constants.js} +0 -0
package/README.md CHANGED
@@ -1,36 +1,145 @@
1
- This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1
+ # Stellar Solutions Modules
2
2
 
3
- ## Getting Started
3
+ [![Version](https://img.shields.io/badge/version-0.1.34-blue.svg)](https://www.npmjs.com/package/@appcorp/stellar-solutions-modules)
4
+ [![StellarApp](https://img.shields.io/badge/StellarApp-Enterprise_Solutions-FF6B35)](https://stellarapp.site)
5
+ [![Next.js](https://img.shields.io/badge/Next.js-15-black)](https://nextjs.org/)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5-blue)](https://www.typescriptlang.org/)
7
+ [![TailwindCSS](https://img.shields.io/badge/TailwindCSS-4-38B2AC)](https://tailwindcss.com/)
4
8
 
5
- First, run the development server:
9
+ **Enterprise-grade module library developed by StellarApp** - A comprehensive collection of pre-built business modules, modern UI components, and development tools for Next.js applications.
10
+
11
+ ## ✨ StellarApp's Enterprise Solutions
12
+
13
+ StellarApp specializes in delivering cutting-edge enterprise software solutions that transform businesses. Our Stellar Solutions Modules library represents our commitment to providing developers with production-ready, scalable components that follow industry best practices.
14
+
15
+ ### 🚀 Why Choose StellarApp Solutions?
16
+
17
+ - **Enterprise-Grade Quality** - Built for mission-critical applications
18
+ - **Modern Architecture** - Next.js 15, TypeScript 5, TailwindCSS 4.0
19
+ - **Comprehensive Testing** - Rigorous quality assurance and performance optimization
20
+ - **Ongoing Support** - Continuous updates and enterprise support
21
+ - **Scalable Design** - Built to handle enterprise-level requirements
22
+
23
+ ## 📦 Installation
6
24
 
7
25
  ```bash
8
- npm run dev
26
+ npm install @appcorp/stellar-solutions-modules
9
27
  # or
10
- yarn dev
28
+ yarn add @appcorp/stellar-solutions-modules
11
29
  # or
12
- pnpm dev
13
- # or
14
- bun dev
30
+ pnpm add @appcorp/stellar-solutions-modules
31
+ ```
32
+
33
+ ## 🚀 Quick Start
34
+
35
+ ### Basic Implementation
36
+
37
+ ```tsx
38
+ import { Tax } from "@appcorp/stellar-solutions-modules/global-modules/tax";
39
+ import { EnhancedTable } from "@appcorp/stellar-solutions-modules/components/ui";
40
+ import { ThemeProvider } from "@appcorp/stellar-solutions-modules/components";
41
+
42
+ // StellarApp's theme provider for consistent branding
43
+ export default function RootLayout({ children }) {
44
+ return <ThemeProvider>{children}</ThemeProvider>;
45
+ }
46
+
47
+ // Utilize StellarApp's business modules
48
+ export default function TaxPage() {
49
+ return <Tax />;
50
+ }
51
+
52
+ // Leverage StellarApp's enhanced UI components
53
+ <EnhancedTable
54
+ tableBodyRows={data}
55
+ headerActions={actions}
56
+ tableHeadItems={columns}
57
+ />;
15
58
  ```
16
59
 
17
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
60
+ ## 🏗️ StellarApp's Module Architecture
61
+
62
+ ### Business Modules by StellarApp
63
+
64
+ Each module is crafted by StellarApp's expert development team with complete CRUD functionality:
65
+
66
+ **StellarApp's Enterprise Modules:**
67
+
68
+ - **🏦 Bank** - Comprehensive banking details management system
69
+ - **🏢 Branch** - Advanced branch and location management
70
+ - **💳 Payment Mode** - Enterprise payment method configuration
71
+ - **📊 Tax** - Professional tax rate management system
72
+ - **⚙️ Preferences** - System-wide preferences and configuration
73
+
74
+ ### StellarApp's UI Component Library
75
+
76
+ 25+ professionally designed components developed by StellarApp:
77
+
78
+ **Forms:** Enhanced Input, Textarea, Select, Combobox, Form validation
79
+ **Layout:** Card, Dialog, Drawer, Popover, Separator
80
+ **Data:** Table, Badge, Button with StellarApp's design system
81
+ **Navigation:** DropdownMenu, ContextMenu, Command
82
+ **Enhanced:** Complete table system with search, pagination, sorting
83
+
84
+ ## 🌍 StellarApp's Internationalization
85
+
86
+ Built-in multilingual support developed by StellarApp for global enterprises:
87
+
88
+ ```tsx
89
+ import { useTranslations } from "next-intl";
90
+
91
+ // StellarApp's translation system
92
+ const t = useTranslations("taxPage");
93
+ return <h1>{t("title")}</h1>;
94
+ ```
95
+
96
+ **Languages Supported by StellarApp:**
97
+
98
+ - English (`en`) - 343 professional translation keys
99
+ - Urdu (`ur`) - 307 localized translation keys
100
+
101
+ ## 🎨 StellarApp's Theming System
102
+
103
+ Professional theme support with StellarApp's design system:
104
+
105
+ ```tsx
106
+ import {
107
+ ThemeProvider,
108
+ ThemeSwitcher,
109
+ } from "@appcorp/stellar-solutions-modules/components";
110
+
111
+ // StellarApp's enterprise theme provider
112
+ <ThemeProvider>
113
+ <ThemeSwitcher />
114
+ {/* Your enterprise application */}
115
+ </ThemeProvider>;
116
+ ```
117
+
118
+ ## 📄 License
119
+
120
+ **Proprietary - StellarApp Enterprise Solutions**
121
+
122
+ ## 📞 Enterprise Support
18
123
 
19
- You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
124
+ For enterprise licensing, custom development, or professional support services:
20
125
 
21
- This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
126
+ ### 🌐 Visit StellarApp
22
127
 
23
- ## Learn More
128
+ **https://stellarapp.site**
24
129
 
25
- To learn more about Next.js, take a look at the following resources:
130
+ - Enterprise consulting and custom development
131
+ - Professional training and certification programs
132
+ - 24/7 enterprise support and maintenance
133
+ - Custom module development services
134
+ - Integration and migration services
26
135
 
27
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
136
+ ### 📧 Contact StellarApp
29
137
 
30
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
138
+ - **Website:** https://stellarapp.site
139
+ - **Email:** hello@stellarapp.site
31
140
 
32
- ## Deploy on Vercel
141
+ ---
33
142
 
34
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
143
+ **🏢 Built with ❤️ by StellarApp** | **Version 0.1.34** | **Next.js 15** | **Enterprise-Ready**
35
144
 
36
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
145
+ _StellarApp - Transforming Businesses Through Technology_ 🚀
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface CustomThemeProviderProps {
3
+ children: React.ReactNode;
4
+ defaultTheme?: string;
5
+ storageKey?: string;
6
+ enableSystem?: boolean;
7
+ }
8
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, enableSystem, ...props }: CustomThemeProviderProps): React.JSX.Element;
9
+ export {};
@@ -0,0 +1,122 @@
1
+ "use client";
2
+ "use strict";
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
27
+ }) : function(o, v) {
28
+ o["default"] = v;
29
+ });
30
+ var __importStar = (this && this.__importStar) || (function () {
31
+ var ownKeys = function(o) {
32
+ ownKeys = Object.getOwnPropertyNames || function (o) {
33
+ var ar = [];
34
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
+ return ar;
36
+ };
37
+ return ownKeys(o);
38
+ };
39
+ return function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ })();
47
+ var __rest = (this && this.__rest) || function (s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ };
58
+ Object.defineProperty(exports, "__esModule", { value: true });
59
+ exports.ThemeProvider = ThemeProvider;
60
+ var react_1 = __importStar(require("react"));
61
+ var next_themes_1 = require("next-themes");
62
+ var themes_1 = require("@/lib/themes");
63
+ // Component that applies theme variables when theme changes
64
+ function ThemeApplier(_a) {
65
+ var children = _a.children;
66
+ var _b = (0, next_themes_1.useTheme)(), theme = _b.theme, resolvedTheme = _b.resolvedTheme;
67
+ (0, react_1.useEffect)(function () {
68
+ var applyTheme = function (themeName) {
69
+ var themeConfig = themes_1.themes[themeName];
70
+ if (!themeConfig) {
71
+ console.warn("Theme \"".concat(themeName, "\" not found, falling back to light theme"));
72
+ // Fallback to light theme
73
+ var lightTheme = themes_1.themes.light;
74
+ if (lightTheme) {
75
+ var root_1 = document.documentElement;
76
+ Object.entries(lightTheme.colors).forEach(function (_a) {
77
+ var key = _a[0], value = _a[1];
78
+ root_1.style.setProperty("--".concat(key), value);
79
+ });
80
+ }
81
+ return;
82
+ }
83
+ var root = document.documentElement;
84
+ // Apply theme colors as CSS variables
85
+ Object.entries(themeConfig.colors).forEach(function (_a) {
86
+ var key = _a[0], value = _a[1];
87
+ root.style.setProperty("--".concat(key), value);
88
+ });
89
+ // Add theme class to root element for CSS selectors
90
+ root.className = root.className.replace(/theme-\w+/g, "");
91
+ root.classList.add("theme-".concat(themeName));
92
+ // Also set data-theme attribute for CSS selectors
93
+ root.setAttribute("data-theme", themeName);
94
+ };
95
+ // Apply theme on mount and when theme changes
96
+ var activeTheme = resolvedTheme || theme || "light";
97
+ // Always apply theme, even if it's "system" - fallback to light
98
+ var themeToApply = activeTheme === "system" ? "light" : activeTheme;
99
+ applyTheme(themeToApply);
100
+ }, [theme, resolvedTheme]);
101
+ // Apply default theme on mount
102
+ (0, react_1.useEffect)(function () {
103
+ // Apply light theme as default on first mount
104
+ var applyDefaultTheme = function () {
105
+ var lightTheme = themes_1.themes.light;
106
+ if (lightTheme) {
107
+ var root_2 = document.documentElement;
108
+ Object.entries(lightTheme.colors).forEach(function (_a) {
109
+ var key = _a[0], value = _a[1];
110
+ root_2.style.setProperty("--".concat(key), value);
111
+ });
112
+ }
113
+ };
114
+ applyDefaultTheme();
115
+ }, []); // Run only once on mount
116
+ return react_1.default.createElement(react_1.default.Fragment, null, children);
117
+ }
118
+ function ThemeProvider(_a) {
119
+ var children = _a.children, _b = _a.defaultTheme, defaultTheme = _b === void 0 ? "light" : _b, _c = _a.storageKey, storageKey = _c === void 0 ? "ui-theme" : _c, _d = _a.enableSystem, enableSystem = _d === void 0 ? false : _d, props = __rest(_a, ["children", "defaultTheme", "storageKey", "enableSystem"]);
120
+ return (react_1.default.createElement(next_themes_1.ThemeProvider, __assign({ attribute: "data-theme", defaultTheme: defaultTheme, storageKey: storageKey, enableSystem: enableSystem, themes: Object.keys(themes_1.themes) }, props),
121
+ react_1.default.createElement(ThemeApplier, null, children)));
122
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare function ThemeToggle(): React.JSX.Element;
3
+ export declare function ColorThemeSelector(): React.JSX.Element;
4
+ export declare function ThemeSwitcher(): React.JSX.Element;
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ThemeToggle = ThemeToggle;
8
+ exports.ColorThemeSelector = ColorThemeSelector;
9
+ exports.ThemeSwitcher = ThemeSwitcher;
10
+ var react_1 = __importDefault(require("react"));
11
+ var lucide_react_1 = require("lucide-react");
12
+ var next_themes_1 = require("next-themes");
13
+ var button_1 = require("@/components/ui/button");
14
+ var dropdown_menu_1 = require("@/components/ui/dropdown-menu");
15
+ var themes_1 = require("@/lib/themes");
16
+ function ThemeToggle() {
17
+ var setTheme = (0, next_themes_1.useTheme)().setTheme;
18
+ return (react_1.default.createElement(dropdown_menu_1.DropdownMenu, null,
19
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuTrigger, { asChild: true },
20
+ react_1.default.createElement(button_1.Button, { variant: "outline", size: "icon" },
21
+ react_1.default.createElement(lucide_react_1.Sun, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
22
+ react_1.default.createElement(lucide_react_1.Moon, { className: "absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
23
+ react_1.default.createElement("span", { className: "sr-only" }, "Toggle theme"))),
24
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuContent, { align: "end" },
25
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuLabel, null, "Theme"),
26
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuSeparator, null),
27
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, { onClick: function () { return setTheme("light"); } },
28
+ react_1.default.createElement(lucide_react_1.Sun, { className: "mr-2 h-4 w-4" }),
29
+ react_1.default.createElement("span", null, "Light")),
30
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, { onClick: function () { return setTheme("dark"); } },
31
+ react_1.default.createElement(lucide_react_1.Moon, { className: "mr-2 h-4 w-4" }),
32
+ react_1.default.createElement("span", null, "Dark")),
33
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, { onClick: function () { return setTheme("system"); } },
34
+ react_1.default.createElement(lucide_react_1.Monitor, { className: "mr-2 h-4 w-4" }),
35
+ react_1.default.createElement("span", null, "System")))));
36
+ }
37
+ function ColorThemeSelector() {
38
+ var _a = (0, next_themes_1.useTheme)(), theme = _a.theme, setTheme = _a.setTheme;
39
+ return (react_1.default.createElement(dropdown_menu_1.DropdownMenu, null,
40
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuTrigger, { asChild: true },
41
+ react_1.default.createElement(button_1.Button, { variant: "outline", size: "icon" },
42
+ react_1.default.createElement(lucide_react_1.Palette, { className: "h-[1.2rem] w-[1.2rem]" }),
43
+ react_1.default.createElement("span", { className: "sr-only" }, "Select color theme"))),
44
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuContent, { align: "end", className: "w-56" },
45
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuLabel, null, "Color Theme"),
46
+ react_1.default.createElement(dropdown_menu_1.DropdownMenuSeparator, null),
47
+ Object.entries(themes_1.themes).map(function (_a) {
48
+ var key = _a[0], themeConfig = _a[1];
49
+ return (react_1.default.createElement(dropdown_menu_1.DropdownMenuItem, { key: key, onClick: function () { return setTheme(key); }, className: "flex items-center gap-2" },
50
+ react_1.default.createElement("div", { className: "w-4 h-4 rounded-full border", style: {
51
+ backgroundColor: "oklch(".concat(themeConfig.colors.primary, ")"),
52
+ } }),
53
+ react_1.default.createElement("span", { className: theme === key ? "font-semibold" : "" }, themeConfig.displayName)));
54
+ }))));
55
+ }
56
+ function ThemeSwitcher() {
57
+ return (react_1.default.createElement("div", { className: "flex items-center gap-2" },
58
+ react_1.default.createElement(ThemeToggle, null),
59
+ react_1.default.createElement(ColorThemeSelector, null)));
60
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): React.JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ var __rest = (this && this.__rest) || function (s, e) {
47
+ var t = {};
48
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49
+ t[p] = s[p];
50
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
51
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53
+ t[p[i]] = s[p[i]];
54
+ }
55
+ return t;
56
+ };
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ exports.badgeVariants = void 0;
59
+ exports.Badge = Badge;
60
+ var React = __importStar(require("react"));
61
+ var react_slot_1 = require("@radix-ui/react-slot");
62
+ var class_variance_authority_1 = require("class-variance-authority");
63
+ var utils_1 = require("@/lib/utils");
64
+ var badgeVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
65
+ variants: {
66
+ variant: {
67
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
68
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
69
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
70
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
71
+ },
72
+ },
73
+ defaultVariants: {
74
+ variant: "default",
75
+ },
76
+ });
77
+ exports.badgeVariants = badgeVariants;
78
+ function Badge(_a) {
79
+ var className = _a.className, variant = _a.variant, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "asChild"]);
80
+ var Comp = asChild ? react_slot_1.Slot : "span";
81
+ return (React.createElement(Comp, __assign({ "data-slot": "badge", className: (0, utils_1.cn)(badgeVariants({ variant: variant }), className) }, props)));
82
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): React.JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ var __rest = (this && this.__rest) || function (s, e) {
47
+ var t = {};
48
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49
+ t[p] = s[p];
50
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
51
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53
+ t[p[i]] = s[p[i]];
54
+ }
55
+ return t;
56
+ };
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ exports.buttonVariants = void 0;
59
+ exports.Button = Button;
60
+ var React = __importStar(require("react"));
61
+ var react_slot_1 = require("@radix-ui/react-slot");
62
+ var class_variance_authority_1 = require("class-variance-authority");
63
+ var utils_1 = require("@/lib/utils");
64
+ var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
65
+ variants: {
66
+ variant: {
67
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
68
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
69
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
70
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
71
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
72
+ link: "text-primary underline-offset-4 hover:underline",
73
+ },
74
+ size: {
75
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
76
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
77
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
78
+ icon: "size-9",
79
+ },
80
+ },
81
+ defaultVariants: {
82
+ variant: "default",
83
+ size: "default",
84
+ },
85
+ });
86
+ exports.buttonVariants = buttonVariants;
87
+ function Button(_a) {
88
+ var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
89
+ var Comp = asChild ? react_slot_1.Slot : "button";
90
+ return (React.createElement(Comp, __assign({ "data-slot": "button", className: (0, utils_1.cn)(buttonVariants({ variant: variant, size: size, className: className })) }, props)));
91
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };