@appcorp/stellar-solutions-modules 0.1.33 → 0.1.35
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/README.md +128 -19
- package/components/theme-switcher.d.ts +4 -0
- package/components/theme-switcher.js +60 -0
- package/components/ui/badge.d.ts +9 -0
- package/components/ui/badge.js +82 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +91 -0
- package/components/ui/checkbox.d.ts +9 -0
- package/components/ui/checkbox.js +87 -0
- package/components/ui/drawer.d.ts +13 -0
- package/components/ui/drawer.js +115 -0
- package/components/ui/dropdown-menu.d.ts +25 -0
- package/components/ui/dropdown-menu.js +148 -0
- package/components/ui/enhanced-table-footer-action.d.ts +34 -0
- package/components/ui/enhanced-table-footer-action.js +117 -0
- package/components/ui/enhanced-table-footer-page.d.ts +32 -0
- package/components/ui/enhanced-table-footer-page.js +140 -0
- package/components/ui/enhanced-table-footer-pagination.d.ts +38 -0
- package/components/ui/enhanced-table-footer-pagination.js +122 -0
- package/components/ui/enhanced-table-header-action.d.ts +7 -0
- package/components/ui/enhanced-table-header-action.js +21 -0
- package/components/ui/enhanced-table-header-search.d.ts +12 -0
- package/components/ui/enhanced-table-header-search.js +17 -0
- package/components/ui/enhanced-table.d.ts +65 -0
- package/components/ui/enhanced-table.js +87 -0
- package/components/ui/input.d.ts +8 -0
- package/components/ui/input.js +86 -0
- package/components/ui/label.d.ts +7 -0
- package/components/ui/label.js +68 -0
- package/components/ui/popover.d.ts +7 -0
- package/components/ui/popover.js +82 -0
- package/components/ui/select.d.ts +15 -0
- package/components/ui/select.js +127 -0
- package/components/ui/sonner.d.ts +4 -0
- package/components/ui/sonner.js +54 -0
- package/components/ui/switch.d.ts +9 -0
- package/components/ui/switch.js +89 -0
- package/components/ui/table.d.ts +10 -0
- package/components/ui/table.js +101 -0
- package/global-modules/bank/actions.d.ts +200 -0
- package/global-modules/bank/actions.js +124 -0
- package/global-modules/bank/bank.d.ts +2 -0
- package/global-modules/bank/bank.js +87 -0
- package/global-modules/bank/constants.d.ts +45 -0
- package/global-modules/bank/constants.js +98 -0
- package/global-modules/bank/context.d.ts +41 -0
- package/global-modules/bank/context.js +419 -0
- package/global-modules/bank/drawer.d.ts +31 -0
- package/global-modules/bank/drawer.js +114 -0
- package/global-modules/bank/form.d.ts +22 -0
- package/global-modules/bank/form.js +68 -0
- package/global-modules/bank/reducer.d.ts +25 -0
- package/global-modules/bank/reducer.js +161 -0
- package/global-modules/bank/types.d.ts +217 -0
- package/global-modules/bank/types.js +81 -0
- package/global-modules/bank/validate.d.ts +13 -0
- package/global-modules/bank/validate.js +22 -0
- package/global-modules/branch/actions.d.ts +154 -37
- package/global-modules/branch/actions.js +148 -6
- package/global-modules/branch/branch.d.ts +2 -2
- package/global-modules/branch/branch.js +46 -32
- package/global-modules/branch/constants.d.ts +34 -24
- package/global-modules/branch/constants.js +101 -122
- package/global-modules/branch/context.d.ts +33 -2
- package/global-modules/branch/context.js +195 -164
- package/global-modules/branch/drawer.d.ts +26 -3
- package/global-modules/branch/drawer.js +101 -6
- package/global-modules/branch/form.d.ts +15 -1
- package/global-modules/branch/form.js +54 -71
- package/global-modules/branch/reducer.d.ts +23 -2
- package/global-modules/branch/reducer.js +148 -118
- package/global-modules/branch/types.d.ts +196 -69
- package/global-modules/branch/types.js +66 -7
- package/global-modules/branch/validate.d.ts +1 -1
- package/global-modules/branch/validate.js +15 -11
- package/global-modules/payment-mode/actions.d.ts +154 -37
- package/global-modules/payment-mode/actions.js +148 -6
- package/global-modules/payment-mode/constants.d.ts +34 -17
- package/global-modules/payment-mode/constants.js +90 -66
- package/global-modules/payment-mode/context.d.ts +33 -2
- package/global-modules/payment-mode/context.js +185 -163
- package/global-modules/payment-mode/drawer.d.ts +26 -3
- package/global-modules/payment-mode/drawer.js +104 -9
- package/global-modules/payment-mode/form.d.ts +16 -2
- package/global-modules/payment-mode/form.js +45 -74
- package/global-modules/payment-mode/payment-mode.d.ts +25 -2
- package/global-modules/payment-mode/payment-mode.js +90 -23
- package/global-modules/payment-mode/reducer.d.ts +23 -2
- package/global-modules/payment-mode/reducer.js +140 -114
- package/global-modules/payment-mode/types.d.ts +327 -112
- package/global-modules/payment-mode/types.js +162 -11
- package/global-modules/payment-mode/validate.d.ts +1 -1
- package/global-modules/payment-mode/validate.js +7 -5
- package/global-modules/preferences/actions.d.ts +126 -27
- package/global-modules/preferences/actions.js +128 -4
- package/global-modules/preferences/constants.d.ts +46 -31
- package/global-modules/preferences/constants.js +129 -66
- package/global-modules/preferences/context.d.ts +2 -2
- package/global-modules/preferences/context.js +43 -43
- package/global-modules/preferences/currency.js +15 -10
- package/global-modules/preferences/preferences.d.ts +2 -2
- package/global-modules/preferences/preferences.js +3 -5
- package/global-modules/preferences/validate.d.ts +1 -1
- package/global-modules/preferences/validate.js +7 -7
- package/global-modules/tax/actions.d.ts +155 -38
- package/global-modules/tax/actions.js +149 -7
- package/global-modules/tax/constants.d.ts +31 -39
- package/global-modules/tax/constants.js +83 -114
- package/global-modules/tax/context.d.ts +33 -2
- package/global-modules/tax/context.js +146 -132
- package/global-modules/tax/drawer.d.ts +26 -3
- package/global-modules/tax/drawer.js +101 -6
- package/global-modules/tax/form.d.ts +20 -3
- package/global-modules/tax/form.js +101 -74
- package/global-modules/tax/reducer.d.ts +23 -2
- package/global-modules/tax/reducer.js +143 -24
- package/global-modules/tax/tax.d.ts +25 -2
- package/global-modules/tax/tax.js +92 -28
- package/global-modules/tax/types.d.ts +332 -102
- package/global-modules/tax/types.js +179 -11
- package/global-modules/tax/validate.d.ts +1 -1
- package/global-modules/tax/validate.js +9 -8
- package/hooks/use-rtl.d.ts +44 -0
- package/hooks/use-rtl.js +75 -0
- package/lib/themes.d.ts +147 -0
- package/lib/themes.js +150 -0
- package/lib/toast-utils.d.ts +44 -0
- package/lib/toast-utils.js +212 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +12 -0
- package/package.json +21 -4
- package/supabase/supabase.d.ts +80 -1
- package/supabase/supabase.js +281 -6
- package/global-modules/branch/form-elements.d.ts +0 -3
- package/global-modules/branch/form-elements.js +0 -41
- package/global-modules/payment-mode/form-elements.d.ts +0 -3
- package/global-modules/payment-mode/form-elements.js +0 -41
- package/global-modules/preferences/bank.d.ts +0 -2
- package/global-modules/preferences/bank.js +0 -11
- package/global-modules/preferences/branch-drawer.js +0 -36
- package/global-modules/preferences/branch-form-elements.js +0 -30
- package/global-modules/preferences/branch-form.d.ts +0 -0
- package/global-modules/preferences/branch-form.js +0 -33
- package/global-modules/preferences/branch.d.ts +0 -0
- package/global-modules/preferences/branch.js +0 -106
- package/global-modules/preferences/payment-mode-drawer.d.ts +0 -0
- package/global-modules/preferences/payment-mode-drawer.js +0 -36
- package/global-modules/preferences/payment-mode-form-elements.d.ts +0 -0
- package/global-modules/preferences/payment-mode-form-elements.js +0 -30
- package/global-modules/preferences/payment-mode-form.d.ts +0 -0
- package/global-modules/preferences/payment-mode-form.js +0 -33
- package/global-modules/preferences/payment-mode.d.ts +0 -0
- package/global-modules/preferences/payment-mode.js +0 -94
- package/global-modules/tax/form-elements.d.ts +0 -3
- package/global-modules/tax/form-elements.js +0 -41
- /package/{global-modules/preferences/branch-drawer.d.ts → constants.d.ts} +0 -0
- /package/{global-modules/preferences/branch-form-elements.d.ts → constants.js} +0 -0
package/README.md
CHANGED
|
@@ -1,36 +1,145 @@
|
|
|
1
|
-
|
|
1
|
+
# Stellar Solutions Modules
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@appcorp/stellar-solutions-modules)
|
|
4
|
+
[](https://stellarapp.site)
|
|
5
|
+
[](https://nextjs.org/)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://tailwindcss.com/)
|
|
4
8
|
|
|
5
|
-
|
|
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
|
|
26
|
+
npm install @appcorp/stellar-solutions-modules
|
|
9
27
|
# or
|
|
10
|
-
yarn
|
|
28
|
+
yarn add @appcorp/stellar-solutions-modules
|
|
11
29
|
# or
|
|
12
|
-
pnpm
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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
|
-
|
|
124
|
+
For enterprise licensing, custom development, or professional support services:
|
|
20
125
|
|
|
21
|
-
|
|
126
|
+
### 🌐 Visit StellarApp
|
|
22
127
|
|
|
23
|
-
|
|
128
|
+
**https://stellarapp.site**
|
|
24
129
|
|
|
25
|
-
|
|
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
|
-
|
|
28
|
-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
136
|
+
### 📧 Contact StellarApp
|
|
29
137
|
|
|
30
|
-
|
|
138
|
+
- **Website:** https://stellarapp.site
|
|
139
|
+
- **Email:** hello@stellarapp.site
|
|
31
140
|
|
|
32
|
-
|
|
141
|
+
---
|
|
33
142
|
|
|
34
|
-
|
|
143
|
+
**🏢 Built with ❤️ by StellarApp** | **Version 0.1.34** | **Next.js 15** | **Enterprise-Ready**
|
|
35
144
|
|
|
36
|
-
|
|
145
|
+
_StellarApp - Transforming Businesses Through Technology_ 🚀
|
|
@@ -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
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
interface CheckboxProps extends React.ComponentProps<typeof CheckboxPrimitive.Root> {
|
|
4
|
+
error?: string;
|
|
5
|
+
info?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function Checkbox({ className, error, info, label, id, ...props }: CheckboxProps): React.JSX.Element;
|
|
9
|
+
export { Checkbox };
|
|
@@ -0,0 +1,87 @@
|
|
|
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.Checkbox = Checkbox;
|
|
60
|
+
var React = __importStar(require("react"));
|
|
61
|
+
var CheckboxPrimitive = __importStar(require("@radix-ui/react-checkbox"));
|
|
62
|
+
var lucide_react_1 = require("lucide-react");
|
|
63
|
+
var utils_1 = require("@/lib/utils");
|
|
64
|
+
var label_1 = require("@/components/ui/label");
|
|
65
|
+
function Checkbox(_a) {
|
|
66
|
+
var className = _a.className, error = _a.error, info = _a.info, label = _a.label, id = _a.id, props = __rest(_a, ["className", "error", "info", "label", "id"]);
|
|
67
|
+
// Determine if there's an error (for aria-invalid and styling)
|
|
68
|
+
var hasError = Boolean(error);
|
|
69
|
+
var checkboxElement = (React.createElement(CheckboxPrimitive.Root, __assign({ id: id, "data-slot": "checkbox", "aria-invalid": hasError, className: (0, utils_1.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
70
|
+
// Error state styling
|
|
71
|
+
hasError &&
|
|
72
|
+
"data-[state=checked]:bg-destructive data-[state=unchecked]:bg-destructive/20 border-destructive focus-visible:border-destructive focus-visible:ring-destructive/20", className) }, props),
|
|
73
|
+
React.createElement(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current transition-none" },
|
|
74
|
+
React.createElement(lucide_react_1.CheckIcon, { className: "size-3.5" }))));
|
|
75
|
+
// If label is provided, render the complete checkbox with label structure
|
|
76
|
+
if (label) {
|
|
77
|
+
return (React.createElement("div", { className: "w-full space-y-2" },
|
|
78
|
+
React.createElement("div", { className: "flex items-center space-x-2" },
|
|
79
|
+
checkboxElement,
|
|
80
|
+
React.createElement(label_1.Label, { htmlFor: id, className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, label)),
|
|
81
|
+
(error || info) && (React.createElement("div", null, error ? (React.createElement("p", { className: "text-xs text-destructive" }, error)) : info ? (React.createElement("p", { className: "text-xs text-blue-600 dark:text-blue-400" }, info)) : null))));
|
|
82
|
+
}
|
|
83
|
+
// If no label, render just the checkbox with messages (backward compatibility)
|
|
84
|
+
return (React.createElement("div", { className: "w-full" },
|
|
85
|
+
checkboxElement,
|
|
86
|
+
(error || info) && (React.createElement("div", null, error ? (React.createElement("p", { className: "text-xs text-destructive" }, error)) : info ? (React.createElement("p", { className: "text-xs text-blue-600 dark:text-blue-400" }, info)) : null))));
|
|
87
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
+
declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): React.JSX.Element;
|
|
6
|
+
declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): React.JSX.Element;
|
|
7
|
+
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): React.JSX.Element;
|
|
8
|
+
declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): React.JSX.Element;
|
|
9
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): React.JSX.Element;
|
|
12
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): React.JSX.Element;
|
|
13
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|