@beyondcorp/beyond-ui 1.0.6 → 1.0.9
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 +233 -89
- package/dist/_virtual/jsx-runtime.js +6 -0
- package/dist/_virtual/jsx-runtime.js.map +1 -0
- package/dist/_virtual/jsx-runtime2.js +4 -0
- package/dist/_virtual/jsx-runtime2.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.js +4 -0
- package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/components/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/Alert.js +28 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.js +2 -0
- package/dist/components/Alert/index.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +11 -0
- package/dist/components/Avatar/Avatar.js +27 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Badge/Badge.js +25 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Button/Button.d.ts +11 -0
- package/dist/components/Button/Button.js +38 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Card/Card.d.ts +15 -0
- package/dist/components/Card/Card.js +39 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +2 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox/Checkbox.js +25 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/ComponentShowcase/ComponentShowcase.d.ts +6 -0
- package/dist/components/ComponentShowcase/ComponentShowcase.js +540 -0
- package/dist/components/ComponentShowcase/ComponentShowcase.js.map +1 -0
- package/dist/components/ComponentShowcase/index.d.ts +1 -0
- package/dist/components/ComponentShowcase/index.js +2 -0
- package/dist/components/ComponentShowcase/index.js.map +1 -0
- package/dist/components/DashboardGrid/DashboardGrid.d.ts +16 -0
- package/dist/components/DashboardGrid/DashboardGrid.js +54 -0
- package/dist/components/DashboardGrid/DashboardGrid.js.map +1 -0
- package/dist/components/DashboardGrid/index.d.ts +1 -0
- package/dist/components/DashboardGrid/index.js +2 -0
- package/dist/components/DashboardGrid/index.js.map +1 -0
- package/dist/components/DashboardHeader/DashboardHeader.d.ts +16 -0
- package/dist/components/DashboardHeader/DashboardHeader.js +25 -0
- package/dist/components/DashboardHeader/DashboardHeader.js.map +1 -0
- package/dist/components/DashboardHeader/index.d.ts +1 -0
- package/dist/components/DashboardHeader/index.js +2 -0
- package/dist/components/DashboardHeader/index.js.map +1 -0
- package/dist/components/DashboardLayout/DashboardLayout.d.ts +18 -0
- package/dist/components/DashboardLayout/DashboardLayout.js +19 -0
- package/dist/components/DashboardLayout/DashboardLayout.js.map +1 -0
- package/dist/components/DashboardLayout/index.d.ts +1 -0
- package/dist/components/DashboardLayout/index.js +2 -0
- package/dist/components/DashboardLayout/index.js.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts +5 -0
- package/dist/components/DataTable/DataTable.js +246 -0
- package/dist/components/DataTable/DataTable.js.map +1 -0
- package/dist/components/DataTable/DataTable.types.d.ts +70 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +2 -0
- package/dist/components/DataTable/DataTableShowcase.js +348 -0
- package/dist/components/DataTable/DataTableShowcase.js.map +1 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +2 -0
- package/dist/components/DataTable/index.js.map +1 -0
- package/dist/components/Input/Input.d.ts +10 -0
- package/dist/components/Input/Input.js +30 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/Modal/Modal.d.ts +17 -0
- package/dist/components/Modal/Modal.js +35 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Navbar/Navbar.d.ts +13 -0
- package/dist/components/Navbar/Navbar.js +35 -0
- package/dist/components/Navbar/Navbar.js.map +1 -0
- package/dist/components/Navbar/index.d.ts +1 -0
- package/dist/components/Navbar/index.js +2 -0
- package/dist/components/Navbar/index.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +22 -0
- package/dist/components/Sidebar/Sidebar.js +129 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Sidebar/index.js +2 -0
- package/dist/components/Sidebar/index.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +9 -0
- package/dist/components/Skeleton/Skeleton.js +23 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +2 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/Spinner.js +32 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Spinner/index.js +2 -0
- package/dist/components/Spinner/index.js.map +1 -0
- package/dist/components/StatsCard/StatsCard.d.ts +19 -0
- package/dist/components/StatsCard/StatsCard.js +56 -0
- package/dist/components/StatsCard/StatsCard.js.map +1 -0
- package/dist/components/StatsCard/index.d.ts +1 -0
- package/dist/components/StatsCard/index.js +2 -0
- package/dist/components/StatsCard/index.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +11 -0
- package/dist/components/Switch/Switch.js +39 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +25 -0
- package/dist/components/Tabs/Tabs.js +60 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +9 -0
- package/dist/components/Textarea/Textarea.js +24 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Textarea/index.js +2 -0
- package/dist/components/Textarea/index.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/Toast.js +75 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/hooks/useBreakpoint.d.ts +14 -0
- package/dist/hooks/useBreakpoint.js +40 -0
- package/dist/hooks/useBreakpoint.js.map +1 -0
- package/dist/hooks/useDarkMode.d.ts +4 -0
- package/dist/hooks/useDarkMode.js +29 -0
- package/dist/hooks/useDarkMode.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useDebounce.js +17 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +44 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/hooks/useToggle.js +11 -0
- package/dist/hooks/useToggle.js.map +1 -0
- package/dist/index.d.ts +29 -424
- package/dist/index.js +30 -3375
- package/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +91 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/goober/dist/goober.modern.js +4 -0
- package/dist/node_modules/goober/dist/goober.modern.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +48 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/alert-circle.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/alert-circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/alert-triangle.js +24 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/alert-triangle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bar-chart-3.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bar-chart-3.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bell.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bell.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/book.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/book.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check-circle.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check-circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-left.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-left.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/code.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/code.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/dollar-sign.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/dollar-sign.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/filter.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/filter.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/home.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/home.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mail.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mail.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/menu.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/menu.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/moon.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/moon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mouse-pointer.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mouse-pointer.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/palette.js +26 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/palette.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/settings.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/settings.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/smartphone.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/smartphone.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-pen.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-pen.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sun.js +24 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sun.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tablet.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tablet.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trash-2.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trash-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/user.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1326 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +25 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.js +20 -0
- package/dist/node_modules/react/jsx-runtime.js.map +1 -0
- package/dist/node_modules/react-hot-toast/dist/index.js +184 -0
- package/dist/node_modules/react-hot-toast/dist/index.js.map +1 -0
- package/dist/theme/default.d.ts +69 -0
- package/dist/theme/default.js +72 -0
- package/dist/theme/default.js.map +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/package.json +8 -4
- package/dist/index.cjs +0 -3467
- package/dist/index.d.cts +0 -424
package/dist/index.cjs
DELETED
|
@@ -1,3467 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React11 = require('react');
|
|
4
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
|
-
var tailwindMerge = require('tailwind-merge');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var lucideReact = require('lucide-react');
|
|
10
|
-
var toast = require('react-hot-toast');
|
|
11
|
-
|
|
12
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
16
|
-
var n = Object.create(null);
|
|
17
|
-
if (e) {
|
|
18
|
-
Object.keys(e).forEach(function (k) {
|
|
19
|
-
if (k !== 'default') {
|
|
20
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return e[k]; }
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
n.default = e;
|
|
29
|
-
return Object.freeze(n);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var React11__namespace = /*#__PURE__*/_interopNamespace(React11);
|
|
33
|
-
var toast__default = /*#__PURE__*/_interopDefault(toast);
|
|
34
|
-
|
|
35
|
-
// src/components/Button/Button.tsx
|
|
36
|
-
function cn(...inputs) {
|
|
37
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
38
|
-
}
|
|
39
|
-
var buttonVariants = classVarianceAuthority.cva(
|
|
40
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
41
|
-
{
|
|
42
|
-
variants: {
|
|
43
|
-
variant: {
|
|
44
|
-
primary: "bg-primary-600 text-white hover:bg-primary-700",
|
|
45
|
-
secondary: "bg-secondary-600 text-white hover:bg-secondary-700",
|
|
46
|
-
danger: "bg-danger-600 text-white hover:bg-danger-700",
|
|
47
|
-
success: "bg-success-600 text-white hover:bg-success-700",
|
|
48
|
-
warning: "bg-warning-600 text-white hover:bg-warning-700",
|
|
49
|
-
outline: "border border-primary-300 bg-white hover:bg-primary-50",
|
|
50
|
-
ghost: "bg-transparent hover:bg-primary-50",
|
|
51
|
-
link: "text-primary-600 underline-offset-4 hover:underline"
|
|
52
|
-
},
|
|
53
|
-
size: {
|
|
54
|
-
sm: "h-8 px-3 text-xs",
|
|
55
|
-
md: "h-10 px-4 py-2",
|
|
56
|
-
lg: "h-11 px-8",
|
|
57
|
-
xl: "h-12 px-10 text-base"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
defaultVariants: {
|
|
61
|
-
variant: "primary",
|
|
62
|
-
size: "md"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
var Button = React11__namespace.forwardRef(
|
|
67
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
68
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
69
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
70
|
-
Comp,
|
|
71
|
-
{
|
|
72
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
73
|
-
ref,
|
|
74
|
-
...props
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
Button.displayName = "Button";
|
|
80
|
-
var inputVariants = classVarianceAuthority.cva(
|
|
81
|
-
"flex w-full rounded-md border bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
82
|
-
{
|
|
83
|
-
variants: {
|
|
84
|
-
variant: {
|
|
85
|
-
default: "border-gray-300",
|
|
86
|
-
error: "border-danger-500 focus-visible:ring-danger-500",
|
|
87
|
-
success: "border-success-500 focus-visible:ring-success-500"
|
|
88
|
-
},
|
|
89
|
-
inputSize: {
|
|
90
|
-
sm: "h-8 px-2 text-xs",
|
|
91
|
-
md: "h-10 px-3",
|
|
92
|
-
lg: "h-12 px-4 text-base"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
defaultVariants: {
|
|
96
|
-
variant: "default",
|
|
97
|
-
inputSize: "md"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
var Input = React11__namespace.forwardRef(
|
|
102
|
-
({ className, variant, inputSize, type, ...props }, ref) => {
|
|
103
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
-
"input",
|
|
105
|
-
{
|
|
106
|
-
type,
|
|
107
|
-
className: cn(inputVariants({ variant, inputSize, className })),
|
|
108
|
-
ref,
|
|
109
|
-
...props
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
Input.displayName = "Input";
|
|
115
|
-
var cardVariants = classVarianceAuthority.cva(
|
|
116
|
-
"rounded-lg border bg-white text-gray-950 shadow-sm",
|
|
117
|
-
{
|
|
118
|
-
variants: {
|
|
119
|
-
variant: {
|
|
120
|
-
default: "border-gray-200",
|
|
121
|
-
elevated: "border-gray-200 shadow-md",
|
|
122
|
-
outlined: "border-2 border-primary-200"
|
|
123
|
-
},
|
|
124
|
-
padding: {
|
|
125
|
-
none: "p-0",
|
|
126
|
-
sm: "p-4",
|
|
127
|
-
md: "p-6",
|
|
128
|
-
lg: "p-8"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
defaultVariants: {
|
|
132
|
-
variant: "default",
|
|
133
|
-
padding: "md"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
var Card = React11__namespace.forwardRef(
|
|
138
|
-
({ className, variant, padding, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
139
|
-
"div",
|
|
140
|
-
{
|
|
141
|
-
ref,
|
|
142
|
-
className: cn(cardVariants({ variant, padding, className })),
|
|
143
|
-
...props
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
);
|
|
147
|
-
Card.displayName = "Card";
|
|
148
|
-
var CardHeader = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
149
|
-
"div",
|
|
150
|
-
{
|
|
151
|
-
ref,
|
|
152
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
153
|
-
...props
|
|
154
|
-
}
|
|
155
|
-
));
|
|
156
|
-
CardHeader.displayName = "CardHeader";
|
|
157
|
-
var CardTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
158
|
-
"h3",
|
|
159
|
-
{
|
|
160
|
-
ref,
|
|
161
|
-
className: cn(
|
|
162
|
-
"text-2xl font-semibold leading-none tracking-tight",
|
|
163
|
-
className
|
|
164
|
-
),
|
|
165
|
-
...props
|
|
166
|
-
}
|
|
167
|
-
));
|
|
168
|
-
CardTitle.displayName = "CardTitle";
|
|
169
|
-
var CardDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
170
|
-
"p",
|
|
171
|
-
{
|
|
172
|
-
ref,
|
|
173
|
-
className: cn("text-sm text-gray-500", className),
|
|
174
|
-
...props
|
|
175
|
-
}
|
|
176
|
-
));
|
|
177
|
-
CardDescription.displayName = "CardDescription";
|
|
178
|
-
var CardContent = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
179
|
-
CardContent.displayName = "CardContent";
|
|
180
|
-
var CardFooter = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
181
|
-
"div",
|
|
182
|
-
{
|
|
183
|
-
ref,
|
|
184
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
185
|
-
...props
|
|
186
|
-
}
|
|
187
|
-
));
|
|
188
|
-
CardFooter.displayName = "CardFooter";
|
|
189
|
-
var badgeVariants = classVarianceAuthority.cva(
|
|
190
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",
|
|
191
|
-
{
|
|
192
|
-
variants: {
|
|
193
|
-
variant: {
|
|
194
|
-
default: "border-transparent bg-primary-600 text-white hover:bg-primary-700",
|
|
195
|
-
secondary: "border-transparent bg-secondary-600 text-white hover:bg-secondary-700",
|
|
196
|
-
success: "border-transparent bg-success-600 text-white hover:bg-success-700",
|
|
197
|
-
danger: "border-transparent bg-danger-600 text-white hover:bg-danger-700",
|
|
198
|
-
warning: "border-transparent bg-warning-600 text-white hover:bg-warning-700",
|
|
199
|
-
outline: "text-gray-700 border-gray-300"
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
defaultVariants: {
|
|
203
|
-
variant: "default"
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
function Badge({ className, variant, ...props }) {
|
|
208
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
209
|
-
}
|
|
210
|
-
var alertVariants = classVarianceAuthority.cva(
|
|
211
|
-
"relative w-full rounded-lg border p-4",
|
|
212
|
-
{
|
|
213
|
-
variants: {
|
|
214
|
-
variant: {
|
|
215
|
-
default: "bg-white text-gray-950 border-gray-200",
|
|
216
|
-
success: "bg-success-50 text-success-800 border-success-200",
|
|
217
|
-
warning: "bg-warning-50 text-warning-800 border-warning-200",
|
|
218
|
-
danger: "bg-danger-50 text-danger-800 border-danger-200",
|
|
219
|
-
info: "bg-primary-50 text-primary-800 border-primary-200"
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
defaultVariants: {
|
|
223
|
-
variant: "default"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
);
|
|
227
|
-
var Alert = React11__namespace.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
228
|
-
"div",
|
|
229
|
-
{
|
|
230
|
-
ref,
|
|
231
|
-
role: "alert",
|
|
232
|
-
className: cn(alertVariants({ variant }), className),
|
|
233
|
-
...props
|
|
234
|
-
}
|
|
235
|
-
));
|
|
236
|
-
Alert.displayName = "Alert";
|
|
237
|
-
var AlertTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
-
"h5",
|
|
239
|
-
{
|
|
240
|
-
ref,
|
|
241
|
-
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
242
|
-
...props
|
|
243
|
-
}
|
|
244
|
-
));
|
|
245
|
-
AlertTitle.displayName = "AlertTitle";
|
|
246
|
-
var AlertDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
|
-
"div",
|
|
248
|
-
{
|
|
249
|
-
ref,
|
|
250
|
-
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
251
|
-
...props
|
|
252
|
-
}
|
|
253
|
-
));
|
|
254
|
-
AlertDescription.displayName = "AlertDescription";
|
|
255
|
-
var avatarVariants = classVarianceAuthority.cva(
|
|
256
|
-
"relative flex shrink-0 overflow-hidden rounded-full",
|
|
257
|
-
{
|
|
258
|
-
variants: {
|
|
259
|
-
size: {
|
|
260
|
-
sm: "h-8 w-8",
|
|
261
|
-
md: "h-10 w-10",
|
|
262
|
-
lg: "h-16 w-16",
|
|
263
|
-
xl: "h-20 w-20"
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
defaultVariants: {
|
|
267
|
-
size: "md"
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
var Avatar = React11__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
272
|
-
"div",
|
|
273
|
-
{
|
|
274
|
-
ref,
|
|
275
|
-
className: cn(avatarVariants({ size }), className),
|
|
276
|
-
...props
|
|
277
|
-
}
|
|
278
|
-
));
|
|
279
|
-
Avatar.displayName = "Avatar";
|
|
280
|
-
var AvatarImage = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
281
|
-
"img",
|
|
282
|
-
{
|
|
283
|
-
ref,
|
|
284
|
-
className: cn("aspect-square h-full w-full object-cover", className),
|
|
285
|
-
...props
|
|
286
|
-
}
|
|
287
|
-
));
|
|
288
|
-
AvatarImage.displayName = "AvatarImage";
|
|
289
|
-
var AvatarFallback = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
290
|
-
"div",
|
|
291
|
-
{
|
|
292
|
-
ref,
|
|
293
|
-
className: cn(
|
|
294
|
-
"flex h-full w-full items-center justify-center rounded-full bg-gray-100 text-gray-600 font-medium",
|
|
295
|
-
className
|
|
296
|
-
),
|
|
297
|
-
...props
|
|
298
|
-
}
|
|
299
|
-
));
|
|
300
|
-
AvatarFallback.displayName = "AvatarFallback";
|
|
301
|
-
var spinnerVariants = classVarianceAuthority.cva(
|
|
302
|
-
"animate-spin rounded-full border-2 border-current border-t-transparent",
|
|
303
|
-
{
|
|
304
|
-
variants: {
|
|
305
|
-
size: {
|
|
306
|
-
sm: "h-4 w-4",
|
|
307
|
-
md: "h-6 w-6",
|
|
308
|
-
lg: "h-8 w-8",
|
|
309
|
-
xl: "h-12 w-12"
|
|
310
|
-
},
|
|
311
|
-
variant: {
|
|
312
|
-
primary: "text-primary-600",
|
|
313
|
-
secondary: "text-secondary-600",
|
|
314
|
-
white: "text-white",
|
|
315
|
-
current: "text-current"
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
defaultVariants: {
|
|
319
|
-
size: "md",
|
|
320
|
-
variant: "primary"
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
);
|
|
324
|
-
var Spinner = React11__namespace.forwardRef(
|
|
325
|
-
({ className, size, variant, ...props }, ref) => {
|
|
326
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
327
|
-
"div",
|
|
328
|
-
{
|
|
329
|
-
ref,
|
|
330
|
-
className: cn(spinnerVariants({ size, variant }), className),
|
|
331
|
-
...props
|
|
332
|
-
}
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
);
|
|
336
|
-
Spinner.displayName = "Spinner";
|
|
337
|
-
var skeletonVariants = classVarianceAuthority.cva(
|
|
338
|
-
"animate-pulse rounded-md bg-gray-200",
|
|
339
|
-
{
|
|
340
|
-
variants: {
|
|
341
|
-
variant: {
|
|
342
|
-
default: "bg-gray-200",
|
|
343
|
-
darker: "bg-gray-300"
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
defaultVariants: {
|
|
347
|
-
variant: "default"
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
);
|
|
351
|
-
var Skeleton = React11__namespace.forwardRef(
|
|
352
|
-
({ className, variant, ...props }, ref) => {
|
|
353
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
354
|
-
"div",
|
|
355
|
-
{
|
|
356
|
-
ref,
|
|
357
|
-
className: cn(skeletonVariants({ variant }), className),
|
|
358
|
-
...props
|
|
359
|
-
}
|
|
360
|
-
);
|
|
361
|
-
}
|
|
362
|
-
);
|
|
363
|
-
Skeleton.displayName = "Skeleton";
|
|
364
|
-
var textareaVariants = classVarianceAuthority.cva(
|
|
365
|
-
"flex min-h-[80px] w-full rounded-md border bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-gray-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
366
|
-
{
|
|
367
|
-
variants: {
|
|
368
|
-
variant: {
|
|
369
|
-
default: "border-gray-300",
|
|
370
|
-
error: "border-danger-500 focus-visible:ring-danger-500",
|
|
371
|
-
success: "border-success-500 focus-visible:ring-success-500"
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
defaultVariants: {
|
|
375
|
-
variant: "default"
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
);
|
|
379
|
-
var Textarea = React11__namespace.forwardRef(
|
|
380
|
-
({ className, variant, ...props }, ref) => {
|
|
381
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
|
-
"textarea",
|
|
383
|
-
{
|
|
384
|
-
className: cn(textareaVariants({ variant, className })),
|
|
385
|
-
ref,
|
|
386
|
-
...props
|
|
387
|
-
}
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
);
|
|
391
|
-
Textarea.displayName = "Textarea";
|
|
392
|
-
var switchVariants = classVarianceAuthority.cva(
|
|
393
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-600 data-[state=unchecked]:bg-gray-200",
|
|
394
|
-
{
|
|
395
|
-
variants: {
|
|
396
|
-
size: {
|
|
397
|
-
sm: "h-5 w-9",
|
|
398
|
-
md: "h-6 w-11",
|
|
399
|
-
lg: "h-7 w-13"
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
defaultVariants: {
|
|
403
|
-
size: "md"
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
);
|
|
407
|
-
var switchThumbVariants = classVarianceAuthority.cva(
|
|
408
|
-
"pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform",
|
|
409
|
-
{
|
|
410
|
-
variants: {
|
|
411
|
-
size: {
|
|
412
|
-
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
413
|
-
md: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
414
|
-
lg: "h-6 w-6 data-[state=checked]:translate-x-6 data-[state=unchecked]:translate-x-0"
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
defaultVariants: {
|
|
418
|
-
size: "md"
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
);
|
|
422
|
-
var Switch = React11__namespace.forwardRef(
|
|
423
|
-
({ className, size, checked = false, onCheckedChange, ...props }, ref) => {
|
|
424
|
-
const handleClick = () => {
|
|
425
|
-
onCheckedChange?.(!checked);
|
|
426
|
-
};
|
|
427
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
428
|
-
"button",
|
|
429
|
-
{
|
|
430
|
-
type: "button",
|
|
431
|
-
role: "switch",
|
|
432
|
-
"aria-checked": checked,
|
|
433
|
-
"data-state": checked ? "checked" : "unchecked",
|
|
434
|
-
className: cn(switchVariants({ size }), className),
|
|
435
|
-
onClick: handleClick,
|
|
436
|
-
ref,
|
|
437
|
-
...props,
|
|
438
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
439
|
-
"span",
|
|
440
|
-
{
|
|
441
|
-
"data-state": checked ? "checked" : "unchecked",
|
|
442
|
-
className: cn(switchThumbVariants({ size }))
|
|
443
|
-
}
|
|
444
|
-
)
|
|
445
|
-
}
|
|
446
|
-
);
|
|
447
|
-
}
|
|
448
|
-
);
|
|
449
|
-
Switch.displayName = "Switch";
|
|
450
|
-
var checkboxVariants = classVarianceAuthority.cva(
|
|
451
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-gray-300 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-600 data-[state=checked]:text-white data-[state=checked]:border-primary-600",
|
|
452
|
-
{
|
|
453
|
-
variants: {
|
|
454
|
-
size: {
|
|
455
|
-
sm: "h-3 w-3",
|
|
456
|
-
md: "h-4 w-4",
|
|
457
|
-
lg: "h-5 w-5"
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
defaultVariants: {
|
|
461
|
-
size: "md"
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
);
|
|
465
|
-
var Checkbox = React11__namespace.forwardRef(
|
|
466
|
-
({ className, size, ...props }, ref) => {
|
|
467
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative inline-flex items-center", children: [
|
|
468
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
469
|
-
"input",
|
|
470
|
-
{
|
|
471
|
-
type: "checkbox",
|
|
472
|
-
className: cn(checkboxVariants({ size }), "appearance-none", className),
|
|
473
|
-
ref,
|
|
474
|
-
"data-state": props.checked ? "checked" : "unchecked",
|
|
475
|
-
...props
|
|
476
|
-
}
|
|
477
|
-
),
|
|
478
|
-
props.checked && /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
-
lucideReact.Check,
|
|
480
|
-
{
|
|
481
|
-
className: cn(
|
|
482
|
-
"absolute pointer-events-none text-current",
|
|
483
|
-
size === "sm" && "h-2 w-2",
|
|
484
|
-
size === "md" && "h-3 w-3",
|
|
485
|
-
size === "lg" && "h-4 w-4"
|
|
486
|
-
)
|
|
487
|
-
}
|
|
488
|
-
)
|
|
489
|
-
] });
|
|
490
|
-
}
|
|
491
|
-
);
|
|
492
|
-
Checkbox.displayName = "Checkbox";
|
|
493
|
-
var modalVariants = classVarianceAuthority.cva(
|
|
494
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 sm:rounded-lg",
|
|
495
|
-
{
|
|
496
|
-
variants: {
|
|
497
|
-
size: {
|
|
498
|
-
sm: "max-w-sm",
|
|
499
|
-
md: "max-w-lg",
|
|
500
|
-
lg: "max-w-2xl",
|
|
501
|
-
xl: "max-w-4xl",
|
|
502
|
-
full: "max-w-[95vw] max-h-[95vh]"
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
|
-
defaultVariants: {
|
|
506
|
-
size: "md"
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
);
|
|
510
|
-
var Modal = ({
|
|
511
|
-
open,
|
|
512
|
-
onOpenChange,
|
|
513
|
-
children,
|
|
514
|
-
size
|
|
515
|
-
}) => {
|
|
516
|
-
const handleClose = () => {
|
|
517
|
-
onOpenChange?.(false);
|
|
518
|
-
};
|
|
519
|
-
if (!open) return null;
|
|
520
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
521
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
522
|
-
"div",
|
|
523
|
-
{
|
|
524
|
-
className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
525
|
-
onClick: handleClose
|
|
526
|
-
}
|
|
527
|
-
),
|
|
528
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(modalVariants({ size })), children: [
|
|
529
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
530
|
-
"button",
|
|
531
|
-
{
|
|
532
|
-
onClick: handleClose,
|
|
533
|
-
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:pointer-events-none",
|
|
534
|
-
children: [
|
|
535
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
536
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
537
|
-
]
|
|
538
|
-
}
|
|
539
|
-
),
|
|
540
|
-
children
|
|
541
|
-
] })
|
|
542
|
-
] });
|
|
543
|
-
};
|
|
544
|
-
var ModalHeader = ({
|
|
545
|
-
className,
|
|
546
|
-
...props
|
|
547
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
548
|
-
"div",
|
|
549
|
-
{
|
|
550
|
-
className: cn(
|
|
551
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
552
|
-
className
|
|
553
|
-
),
|
|
554
|
-
...props
|
|
555
|
-
}
|
|
556
|
-
);
|
|
557
|
-
var ModalTitle = ({
|
|
558
|
-
className,
|
|
559
|
-
...props
|
|
560
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
-
"h2",
|
|
562
|
-
{
|
|
563
|
-
className: cn(
|
|
564
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
565
|
-
className
|
|
566
|
-
),
|
|
567
|
-
...props
|
|
568
|
-
}
|
|
569
|
-
);
|
|
570
|
-
var ModalDescription = ({
|
|
571
|
-
className,
|
|
572
|
-
...props
|
|
573
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
574
|
-
"p",
|
|
575
|
-
{
|
|
576
|
-
className: cn("text-sm text-gray-500", className),
|
|
577
|
-
...props
|
|
578
|
-
}
|
|
579
|
-
);
|
|
580
|
-
var ModalContent = ({
|
|
581
|
-
className,
|
|
582
|
-
...props
|
|
583
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-4 py-4", className), ...props });
|
|
584
|
-
var ModalFooter = ({
|
|
585
|
-
className,
|
|
586
|
-
...props
|
|
587
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
588
|
-
"div",
|
|
589
|
-
{
|
|
590
|
-
className: cn(
|
|
591
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
592
|
-
className
|
|
593
|
-
),
|
|
594
|
-
...props
|
|
595
|
-
}
|
|
596
|
-
);
|
|
597
|
-
var toastVariants = classVarianceAuthority.cva(
|
|
598
|
-
"flex items-center gap-2 p-4 rounded-lg shadow-lg border max-w-md",
|
|
599
|
-
{
|
|
600
|
-
variants: {
|
|
601
|
-
variant: {
|
|
602
|
-
default: "bg-white border-gray-200 text-gray-900",
|
|
603
|
-
success: "bg-success-50 border-success-200 text-success-800",
|
|
604
|
-
error: "bg-danger-50 border-danger-200 text-danger-800",
|
|
605
|
-
warning: "bg-warning-50 border-warning-200 text-warning-800",
|
|
606
|
-
info: "bg-primary-50 border-primary-200 text-primary-800"
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
|
-
defaultVariants: {
|
|
610
|
-
variant: "default"
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
);
|
|
614
|
-
var getIcon = (variant) => {
|
|
615
|
-
switch (variant) {
|
|
616
|
-
case "success":
|
|
617
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-5 w-5 text-success-600" });
|
|
618
|
-
case "error":
|
|
619
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-5 w-5 text-danger-600" });
|
|
620
|
-
case "warning":
|
|
621
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "h-5 w-5 text-warning-600" });
|
|
622
|
-
case "info":
|
|
623
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "h-5 w-5 text-primary-600" });
|
|
624
|
-
default:
|
|
625
|
-
return null;
|
|
626
|
-
}
|
|
627
|
-
};
|
|
628
|
-
var showToast = {
|
|
629
|
-
success: (message, options) => toast__default.default.success(message, {
|
|
630
|
-
duration: options?.duration || 4e3
|
|
631
|
-
}),
|
|
632
|
-
error: (message, options) => toast__default.default.error(message, {
|
|
633
|
-
duration: options?.duration || 5e3
|
|
634
|
-
}),
|
|
635
|
-
warning: (message, options) => toast__default.default(message, {
|
|
636
|
-
icon: "\u26A0\uFE0F",
|
|
637
|
-
duration: options?.duration || 4e3
|
|
638
|
-
}),
|
|
639
|
-
info: (message, options) => toast__default.default(message, {
|
|
640
|
-
icon: "\u2139\uFE0F",
|
|
641
|
-
duration: options?.duration || 4e3
|
|
642
|
-
}),
|
|
643
|
-
default: (message, options) => toast__default.default(message, {
|
|
644
|
-
duration: options?.duration || 4e3
|
|
645
|
-
})
|
|
646
|
-
};
|
|
647
|
-
var Toast = () => {
|
|
648
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
649
|
-
toast.Toaster,
|
|
650
|
-
{
|
|
651
|
-
position: "top-right",
|
|
652
|
-
toastOptions: {
|
|
653
|
-
duration: 4e3,
|
|
654
|
-
className: "",
|
|
655
|
-
style: {
|
|
656
|
-
background: "transparent",
|
|
657
|
-
boxShadow: "none",
|
|
658
|
-
padding: 0
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
children: (t) => /* @__PURE__ */ jsxRuntime.jsx(toast.ToastBar, { toast: t, children: ({ icon, message }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
662
|
-
"div",
|
|
663
|
-
{
|
|
664
|
-
className: cn(
|
|
665
|
-
toastVariants({
|
|
666
|
-
variant: t.type === "success" ? "success" : t.type === "error" ? "error" : "default"
|
|
667
|
-
})
|
|
668
|
-
),
|
|
669
|
-
children: [
|
|
670
|
-
getIcon(t.type === "success" ? "success" : t.type === "error" ? "error" : "default") || icon,
|
|
671
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 text-sm font-medium", children: message }),
|
|
672
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
673
|
-
"button",
|
|
674
|
-
{
|
|
675
|
-
onClick: () => toast__default.default.dismiss(t.id),
|
|
676
|
-
className: "inline-flex h-5 w-5 items-center justify-center rounded-full hover:bg-black/10",
|
|
677
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
|
|
678
|
-
}
|
|
679
|
-
)
|
|
680
|
-
]
|
|
681
|
-
}
|
|
682
|
-
) })
|
|
683
|
-
}
|
|
684
|
-
);
|
|
685
|
-
};
|
|
686
|
-
var tabsListVariants = classVarianceAuthority.cva(
|
|
687
|
-
"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 p-1 text-gray-500",
|
|
688
|
-
{
|
|
689
|
-
variants: {
|
|
690
|
-
variant: {
|
|
691
|
-
default: "bg-gray-100",
|
|
692
|
-
pills: "bg-transparent gap-2",
|
|
693
|
-
underline: "bg-transparent border-b border-gray-200"
|
|
694
|
-
}
|
|
695
|
-
},
|
|
696
|
-
defaultVariants: {
|
|
697
|
-
variant: "default"
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
);
|
|
701
|
-
var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
702
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
703
|
-
{
|
|
704
|
-
variants: {
|
|
705
|
-
variant: {
|
|
706
|
-
default: "data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm",
|
|
707
|
-
pills: "data-[state=active]:bg-primary-100 data-[state=active]:text-primary-700 hover:bg-gray-100",
|
|
708
|
-
underline: "data-[state=active]:border-b-2 data-[state=active]:border-primary-600 data-[state=active]:text-primary-600 hover:text-gray-900 rounded-none border-b-2 border-transparent"
|
|
709
|
-
}
|
|
710
|
-
},
|
|
711
|
-
defaultVariants: {
|
|
712
|
-
variant: "default"
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
);
|
|
716
|
-
var TabsContext = React11__namespace.createContext(void 0);
|
|
717
|
-
var Tabs = ({ value, onValueChange, variant, children, className }) => {
|
|
718
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { value, onValueChange, variant }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), children }) });
|
|
719
|
-
};
|
|
720
|
-
var TabsList = React11__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
721
|
-
const context = React11__namespace.useContext(TabsContext);
|
|
722
|
-
if (!context) throw new Error("TabsList must be used within Tabs");
|
|
723
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
724
|
-
"div",
|
|
725
|
-
{
|
|
726
|
-
ref,
|
|
727
|
-
className: cn(tabsListVariants({ variant: context.variant }), className),
|
|
728
|
-
...props
|
|
729
|
-
}
|
|
730
|
-
);
|
|
731
|
-
});
|
|
732
|
-
TabsList.displayName = "TabsList";
|
|
733
|
-
var TabsTrigger = React11__namespace.forwardRef(
|
|
734
|
-
({ className, value, ...props }, ref) => {
|
|
735
|
-
const context = React11__namespace.useContext(TabsContext);
|
|
736
|
-
if (!context) throw new Error("TabsTrigger must be used within Tabs");
|
|
737
|
-
const isActive = context.value === value;
|
|
738
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
739
|
-
"button",
|
|
740
|
-
{
|
|
741
|
-
ref,
|
|
742
|
-
className: cn(
|
|
743
|
-
tabsTriggerVariants({ variant: context.variant }),
|
|
744
|
-
className
|
|
745
|
-
),
|
|
746
|
-
"data-state": isActive ? "active" : "inactive",
|
|
747
|
-
onClick: () => context.onValueChange(value),
|
|
748
|
-
...props
|
|
749
|
-
}
|
|
750
|
-
);
|
|
751
|
-
}
|
|
752
|
-
);
|
|
753
|
-
TabsTrigger.displayName = "TabsTrigger";
|
|
754
|
-
var TabsContent = React11__namespace.forwardRef(
|
|
755
|
-
({ className, value, ...props }, ref) => {
|
|
756
|
-
const context = React11__namespace.useContext(TabsContext);
|
|
757
|
-
if (!context) throw new Error("TabsContent must be used within Tabs");
|
|
758
|
-
if (context.value !== value) return null;
|
|
759
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
760
|
-
"div",
|
|
761
|
-
{
|
|
762
|
-
ref,
|
|
763
|
-
className: cn(
|
|
764
|
-
"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2",
|
|
765
|
-
className
|
|
766
|
-
),
|
|
767
|
-
...props
|
|
768
|
-
}
|
|
769
|
-
);
|
|
770
|
-
}
|
|
771
|
-
);
|
|
772
|
-
TabsContent.displayName = "TabsContent";
|
|
773
|
-
var statsCardVariants = classVarianceAuthority.cva(
|
|
774
|
-
"relative overflow-hidden",
|
|
775
|
-
{
|
|
776
|
-
variants: {
|
|
777
|
-
variant: {
|
|
778
|
-
default: "",
|
|
779
|
-
gradient: "bg-gradient-to-br"
|
|
780
|
-
},
|
|
781
|
-
color: {
|
|
782
|
-
primary: "from-primary-500 to-primary-600 text-white",
|
|
783
|
-
secondary: "from-secondary-500 to-secondary-600 text-white",
|
|
784
|
-
success: "from-success-500 to-success-600 text-white",
|
|
785
|
-
warning: "from-warning-500 to-warning-600 text-white",
|
|
786
|
-
danger: "from-danger-500 to-danger-600 text-white"
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
|
-
defaultVariants: {
|
|
790
|
-
variant: "default"
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
);
|
|
794
|
-
var StatsCard = React11__namespace.forwardRef(
|
|
795
|
-
({ className, variant, color, title, value, trend, icon, ...props }, ref) => {
|
|
796
|
-
const getTrendIcon = (direction) => {
|
|
797
|
-
switch (direction) {
|
|
798
|
-
case "up":
|
|
799
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4" });
|
|
800
|
-
case "down":
|
|
801
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-4 w-4" });
|
|
802
|
-
default:
|
|
803
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "h-4 w-4" });
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
const getTrendColor = (direction) => {
|
|
807
|
-
if (variant === "gradient") return "text-white/80";
|
|
808
|
-
switch (direction) {
|
|
809
|
-
case "up":
|
|
810
|
-
return "text-success-600";
|
|
811
|
-
case "down":
|
|
812
|
-
return "text-danger-600";
|
|
813
|
-
default:
|
|
814
|
-
return "text-gray-600";
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
818
|
-
Card,
|
|
819
|
-
{
|
|
820
|
-
ref,
|
|
821
|
-
className: cn(statsCardVariants({ variant, color }), className),
|
|
822
|
-
padding: "none",
|
|
823
|
-
...props,
|
|
824
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
825
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
826
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
827
|
-
"text-sm font-medium",
|
|
828
|
-
variant === "gradient" ? "text-white/80" : "text-gray-600"
|
|
829
|
-
), children: title }),
|
|
830
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2", children: [
|
|
831
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
832
|
-
"text-3xl font-bold",
|
|
833
|
-
variant === "gradient" ? "text-white" : "text-gray-900"
|
|
834
|
-
), children: value }),
|
|
835
|
-
trend && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
836
|
-
"flex items-center gap-1 mt-1 text-sm",
|
|
837
|
-
getTrendColor(trend.direction)
|
|
838
|
-
), children: [
|
|
839
|
-
getTrendIcon(trend.direction),
|
|
840
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: trend.value }),
|
|
841
|
-
trend.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
842
|
-
variant === "gradient" ? "text-white/60" : "text-gray-500"
|
|
843
|
-
), children: trend.label })
|
|
844
|
-
] })
|
|
845
|
-
] })
|
|
846
|
-
] }),
|
|
847
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
848
|
-
"p-3 rounded-full",
|
|
849
|
-
variant === "gradient" ? "bg-white/20" : "bg-gray-100"
|
|
850
|
-
), children: icon })
|
|
851
|
-
] }) })
|
|
852
|
-
}
|
|
853
|
-
);
|
|
854
|
-
}
|
|
855
|
-
);
|
|
856
|
-
StatsCard.displayName = "StatsCard";
|
|
857
|
-
var navbarVariants = classVarianceAuthority.cva(
|
|
858
|
-
"flex items-center justify-between w-full px-4 py-3 bg-white border-b border-gray-200",
|
|
859
|
-
{
|
|
860
|
-
variants: {
|
|
861
|
-
variant: {
|
|
862
|
-
default: "bg-white border-gray-200",
|
|
863
|
-
dark: "bg-gray-900 border-gray-700 text-white",
|
|
864
|
-
transparent: "bg-transparent border-transparent"
|
|
865
|
-
},
|
|
866
|
-
size: {
|
|
867
|
-
sm: "px-4 py-2",
|
|
868
|
-
md: "px-6 py-3",
|
|
869
|
-
lg: "px-8 py-4"
|
|
870
|
-
}
|
|
871
|
-
},
|
|
872
|
-
defaultVariants: {
|
|
873
|
-
variant: "default",
|
|
874
|
-
size: "md"
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
);
|
|
878
|
-
var Navbar = React11__namespace.forwardRef(
|
|
879
|
-
({ className, variant, size, logo, children, ...props }, ref) => {
|
|
880
|
-
const [isOpen, setIsOpen] = React11__namespace.useState(false);
|
|
881
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
882
|
-
"nav",
|
|
883
|
-
{
|
|
884
|
-
ref,
|
|
885
|
-
className: cn(navbarVariants({ variant, size }), className),
|
|
886
|
-
...props,
|
|
887
|
-
children: [
|
|
888
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
889
|
-
logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: logo }),
|
|
890
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex items-center space-x-4 ml-auto", children }),
|
|
891
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
892
|
-
"button",
|
|
893
|
-
{
|
|
894
|
-
className: "md:hidden p-2 rounded-md hover:bg-gray-100",
|
|
895
|
-
onClick: () => setIsOpen(!isOpen),
|
|
896
|
-
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-6 w-6" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-6 w-6" })
|
|
897
|
-
}
|
|
898
|
-
)
|
|
899
|
-
] }),
|
|
900
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:hidden absolute top-full left-0 right-0 bg-white border-b border-gray-200 shadow-lg z-50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-2 space-y-2", children }) })
|
|
901
|
-
]
|
|
902
|
-
}
|
|
903
|
-
);
|
|
904
|
-
}
|
|
905
|
-
);
|
|
906
|
-
Navbar.displayName = "Navbar";
|
|
907
|
-
var NavItem = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
908
|
-
"a",
|
|
909
|
-
{
|
|
910
|
-
ref,
|
|
911
|
-
className: cn(
|
|
912
|
-
"text-gray-700 hover:text-primary-600 px-3 py-2 rounded-md text-sm font-medium transition-colors",
|
|
913
|
-
className
|
|
914
|
-
),
|
|
915
|
-
...props
|
|
916
|
-
}
|
|
917
|
-
));
|
|
918
|
-
NavItem.displayName = "NavItem";
|
|
919
|
-
var sidebarVariants = classVarianceAuthority.cva(
|
|
920
|
-
"fixed left-0 top-0 z-40 h-screen bg-white border-r border-gray-200 transition-all duration-300 ease-in-out",
|
|
921
|
-
{
|
|
922
|
-
variants: {
|
|
923
|
-
collapsed: {
|
|
924
|
-
false: "w-72",
|
|
925
|
-
true: "w-16"
|
|
926
|
-
}
|
|
927
|
-
},
|
|
928
|
-
defaultVariants: {
|
|
929
|
-
collapsed: false
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
);
|
|
933
|
-
var menuItemVariants = classVarianceAuthority.cva(
|
|
934
|
-
"flex items-center w-full px-3 py-2.5 text-sm font-medium rounded-lg transition-all duration-200 group",
|
|
935
|
-
{
|
|
936
|
-
variants: {
|
|
937
|
-
active: {
|
|
938
|
-
true: "bg-primary-50 text-primary-700 border-r-2 border-primary-600",
|
|
939
|
-
false: "text-gray-700 hover:bg-gray-50 hover:text-gray-900"
|
|
940
|
-
},
|
|
941
|
-
collapsed: {
|
|
942
|
-
true: "justify-center px-2",
|
|
943
|
-
false: "justify-start"
|
|
944
|
-
}
|
|
945
|
-
},
|
|
946
|
-
defaultVariants: {
|
|
947
|
-
active: false,
|
|
948
|
-
collapsed: false
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
);
|
|
952
|
-
var defaultMenuItems = [
|
|
953
|
-
{
|
|
954
|
-
id: "dashboard",
|
|
955
|
-
label: "Dashboard",
|
|
956
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Home, { className: "h-5 w-5" }),
|
|
957
|
-
href: "/dashboard"
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
id: "analytics",
|
|
961
|
-
label: "Analytics",
|
|
962
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-5 w-5" }),
|
|
963
|
-
href: "/analytics",
|
|
964
|
-
badge: "New"
|
|
965
|
-
},
|
|
966
|
-
{
|
|
967
|
-
id: "users",
|
|
968
|
-
label: "Users",
|
|
969
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "h-5 w-5" }),
|
|
970
|
-
children: [
|
|
971
|
-
{ id: "all-users", label: "All Users", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "h-4 w-4" }) },
|
|
972
|
-
{ id: "user-roles", label: "User Roles", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4" }) }
|
|
973
|
-
]
|
|
974
|
-
},
|
|
975
|
-
{
|
|
976
|
-
id: "reports",
|
|
977
|
-
label: "Reports",
|
|
978
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-5 w-5" }),
|
|
979
|
-
href: "/reports"
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
id: "calendar",
|
|
983
|
-
label: "Calendar",
|
|
984
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-5 w-5" }),
|
|
985
|
-
href: "/calendar"
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
id: "messages",
|
|
989
|
-
label: "Messages",
|
|
990
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "h-5 w-5" }),
|
|
991
|
-
href: "/messages",
|
|
992
|
-
badge: "3"
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
id: "notifications",
|
|
996
|
-
label: "Notifications",
|
|
997
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "h-5 w-5" }),
|
|
998
|
-
href: "/notifications"
|
|
999
|
-
},
|
|
1000
|
-
{
|
|
1001
|
-
id: "settings",
|
|
1002
|
-
label: "Settings",
|
|
1003
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-5 w-5" }),
|
|
1004
|
-
href: "/settings"
|
|
1005
|
-
}
|
|
1006
|
-
];
|
|
1007
|
-
var Sidebar = React11__namespace.forwardRef(
|
|
1008
|
-
({
|
|
1009
|
-
className,
|
|
1010
|
-
collapsed = false,
|
|
1011
|
-
onToggle,
|
|
1012
|
-
menuItems = defaultMenuItems,
|
|
1013
|
-
activeItem = "dashboard",
|
|
1014
|
-
onItemClick,
|
|
1015
|
-
...props
|
|
1016
|
-
}, ref) => {
|
|
1017
|
-
const [expandedItems, setExpandedItems] = React11__namespace.useState([]);
|
|
1018
|
-
const toggleExpanded = (itemId) => {
|
|
1019
|
-
setExpandedItems(
|
|
1020
|
-
(prev) => prev.includes(itemId) ? prev.filter((id) => id !== itemId) : [...prev, itemId]
|
|
1021
|
-
);
|
|
1022
|
-
};
|
|
1023
|
-
const handleItemClick = (item) => {
|
|
1024
|
-
if (item.children) {
|
|
1025
|
-
toggleExpanded(item.id);
|
|
1026
|
-
} else {
|
|
1027
|
-
onItemClick?.(item.id);
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1030
|
-
const renderMenuItem = (item, level = 0) => {
|
|
1031
|
-
const isActive = activeItem === item.id;
|
|
1032
|
-
const isExpanded = expandedItems.includes(item.id);
|
|
1033
|
-
const hasChildren = item.children && item.children.length > 0;
|
|
1034
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1035
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1036
|
-
"button",
|
|
1037
|
-
{
|
|
1038
|
-
onClick: () => handleItemClick(item),
|
|
1039
|
-
className: cn(
|
|
1040
|
-
menuItemVariants({ active: isActive, collapsed }),
|
|
1041
|
-
level > 0 && "ml-4 pl-8",
|
|
1042
|
-
"relative"
|
|
1043
|
-
),
|
|
1044
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center min-w-0 flex-1", children: [
|
|
1045
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: item.icon }),
|
|
1046
|
-
!collapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1047
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-3 truncate", children: item.label }),
|
|
1048
|
-
item.badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "danger", className: "ml-auto text-xs", children: item.badge }),
|
|
1049
|
-
hasChildren && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1050
|
-
lucideReact.ChevronDown,
|
|
1051
|
-
{
|
|
1052
|
-
className: cn(
|
|
1053
|
-
"ml-auto h-4 w-4 transition-transform duration-200",
|
|
1054
|
-
isExpanded && "rotate-180"
|
|
1055
|
-
)
|
|
1056
|
-
}
|
|
1057
|
-
)
|
|
1058
|
-
] })
|
|
1059
|
-
] })
|
|
1060
|
-
}
|
|
1061
|
-
),
|
|
1062
|
-
hasChildren && !collapsed && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 space-y-1", children: item.children?.map((child) => renderMenuItem(child, level + 1)) })
|
|
1063
|
-
] }, item.id);
|
|
1064
|
-
};
|
|
1065
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1066
|
-
"div",
|
|
1067
|
-
{
|
|
1068
|
-
ref,
|
|
1069
|
-
className: cn(sidebarVariants({ collapsed }), className),
|
|
1070
|
-
...props,
|
|
1071
|
-
children: [
|
|
1072
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-gray-200", children: [
|
|
1073
|
-
!collapsed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1074
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white font-bold text-sm", children: "B" }) }),
|
|
1075
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-xl text-gray-900", children: "Beyond" })
|
|
1076
|
-
] }),
|
|
1077
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1078
|
-
"button",
|
|
1079
|
-
{
|
|
1080
|
-
onClick: onToggle,
|
|
1081
|
-
className: "p-1.5 rounded-lg hover:bg-gray-100 transition-colors",
|
|
1082
|
-
children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 text-gray-600" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4 text-gray-600" })
|
|
1083
|
-
}
|
|
1084
|
-
)
|
|
1085
|
-
] }),
|
|
1086
|
-
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 px-4 py-6 space-y-2 overflow-y-auto", children: menuItems.map((item) => renderMenuItem(item)) }),
|
|
1087
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-gray-200 p-4", children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { size: "sm", children: [
|
|
1088
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: "https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&w=64" }),
|
|
1089
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: "JD" })
|
|
1090
|
-
] }) }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1091
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
1092
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { size: "sm", children: [
|
|
1093
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: "https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&w=64" }),
|
|
1094
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: "JD" })
|
|
1095
|
-
] }),
|
|
1096
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1097
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900 truncate", children: "John Doe" }),
|
|
1098
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 truncate", children: "john@company.com" })
|
|
1099
|
-
] })
|
|
1100
|
-
] }),
|
|
1101
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex space-x-2", children: [
|
|
1102
|
-
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: "flex-1 flex items-center justify-center px-3 py-2 text-xs font-medium text-gray-700 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors", children: [
|
|
1103
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-3 w-3 mr-1" }),
|
|
1104
|
-
"Profile"
|
|
1105
|
-
] }),
|
|
1106
|
-
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: "flex-1 flex items-center justify-center px-3 py-2 text-xs font-medium text-gray-700 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors", children: [
|
|
1107
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "h-3 w-3 mr-1" }),
|
|
1108
|
-
"Logout"
|
|
1109
|
-
] })
|
|
1110
|
-
] })
|
|
1111
|
-
] }) })
|
|
1112
|
-
]
|
|
1113
|
-
}
|
|
1114
|
-
);
|
|
1115
|
-
}
|
|
1116
|
-
);
|
|
1117
|
-
Sidebar.displayName = "Sidebar";
|
|
1118
|
-
var DashboardHeader = React11__namespace.forwardRef(
|
|
1119
|
-
({
|
|
1120
|
-
className,
|
|
1121
|
-
breadcrumbs = [{ label: "Dashboard" }],
|
|
1122
|
-
onMenuToggle,
|
|
1123
|
-
sidebarCollapsed = false,
|
|
1124
|
-
showSearch = true,
|
|
1125
|
-
searchPlaceholder = "Search...",
|
|
1126
|
-
onSearchChange,
|
|
1127
|
-
...props
|
|
1128
|
-
}, ref) => {
|
|
1129
|
-
const [searchValue, setSearchValue] = React11__namespace.useState("");
|
|
1130
|
-
const handleSearchChange = (e) => {
|
|
1131
|
-
const value = e.target.value;
|
|
1132
|
-
setSearchValue(value);
|
|
1133
|
-
onSearchChange?.(value);
|
|
1134
|
-
};
|
|
1135
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1136
|
-
"header",
|
|
1137
|
-
{
|
|
1138
|
-
ref,
|
|
1139
|
-
className: cn(
|
|
1140
|
-
"sticky top-0 z-30 bg-white border-b border-gray-200 transition-all duration-300",
|
|
1141
|
-
sidebarCollapsed ? "ml-16" : "ml-72",
|
|
1142
|
-
className
|
|
1143
|
-
),
|
|
1144
|
-
...props,
|
|
1145
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
1146
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
1147
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
|
-
Button,
|
|
1149
|
-
{
|
|
1150
|
-
variant: "ghost",
|
|
1151
|
-
size: "sm",
|
|
1152
|
-
onClick: onMenuToggle,
|
|
1153
|
-
className: "md:hidden",
|
|
1154
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-5 w-5" })
|
|
1155
|
-
}
|
|
1156
|
-
),
|
|
1157
|
-
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex items-center space-x-2 text-sm", children: breadcrumbs.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React11__namespace.Fragment, { children: [
|
|
1158
|
-
index > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: "/" }),
|
|
1159
|
-
item.href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
|
-
"a",
|
|
1161
|
-
{
|
|
1162
|
-
href: item.href,
|
|
1163
|
-
className: "text-gray-600 hover:text-gray-900 transition-colors",
|
|
1164
|
-
children: item.label
|
|
1165
|
-
}
|
|
1166
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-900 font-medium", children: item.label })
|
|
1167
|
-
] }, index)) })
|
|
1168
|
-
] }),
|
|
1169
|
-
showSearch && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 max-w-md mx-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1170
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
1171
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1172
|
-
Input,
|
|
1173
|
-
{
|
|
1174
|
-
type: "text",
|
|
1175
|
-
placeholder: searchPlaceholder,
|
|
1176
|
-
value: searchValue,
|
|
1177
|
-
onChange: handleSearchChange,
|
|
1178
|
-
className: "pl-10 bg-gray-50 border-gray-200 focus:bg-white"
|
|
1179
|
-
}
|
|
1180
|
-
)
|
|
1181
|
-
] }) }),
|
|
1182
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
1183
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "relative", children: [
|
|
1184
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "h-5 w-5" }),
|
|
1185
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1186
|
-
Badge,
|
|
1187
|
-
{
|
|
1188
|
-
variant: "danger",
|
|
1189
|
-
className: "absolute -top-1 -right-1 h-5 w-5 text-xs p-0 flex items-center justify-center",
|
|
1190
|
-
children: "3"
|
|
1191
|
-
}
|
|
1192
|
-
)
|
|
1193
|
-
] }) }),
|
|
1194
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-5 w-5" }) }),
|
|
1195
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 pl-3 border-l border-gray-200", children: [
|
|
1196
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:block text-right", children: [
|
|
1197
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900", children: "John Doe" }),
|
|
1198
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: "Administrator" })
|
|
1199
|
-
] }),
|
|
1200
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { size: "sm", children: [
|
|
1201
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: "https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&w=64" }),
|
|
1202
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: "JD" })
|
|
1203
|
-
] })
|
|
1204
|
-
] })
|
|
1205
|
-
] })
|
|
1206
|
-
] })
|
|
1207
|
-
}
|
|
1208
|
-
);
|
|
1209
|
-
}
|
|
1210
|
-
);
|
|
1211
|
-
DashboardHeader.displayName = "DashboardHeader";
|
|
1212
|
-
var DashboardLayout = React11__namespace.forwardRef(
|
|
1213
|
-
({
|
|
1214
|
-
children,
|
|
1215
|
-
className,
|
|
1216
|
-
sidebarMenuItems,
|
|
1217
|
-
activeSidebarItem,
|
|
1218
|
-
breadcrumbs,
|
|
1219
|
-
onSidebarItemClick,
|
|
1220
|
-
showSearch,
|
|
1221
|
-
searchPlaceholder,
|
|
1222
|
-
onSearchChange,
|
|
1223
|
-
...props
|
|
1224
|
-
}, ref) => {
|
|
1225
|
-
const [sidebarCollapsed, setSidebarCollapsed] = React11__namespace.useState(false);
|
|
1226
|
-
const toggleSidebar = () => {
|
|
1227
|
-
setSidebarCollapsed((prev) => !prev);
|
|
1228
|
-
};
|
|
1229
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("min-h-screen bg-gray-50", className), ...props, children: [
|
|
1230
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
-
Sidebar,
|
|
1232
|
-
{
|
|
1233
|
-
collapsed: sidebarCollapsed,
|
|
1234
|
-
onToggle: toggleSidebar,
|
|
1235
|
-
menuItems: sidebarMenuItems,
|
|
1236
|
-
activeItem: activeSidebarItem,
|
|
1237
|
-
onItemClick: onSidebarItemClick,
|
|
1238
|
-
className: props.sidebarClassName
|
|
1239
|
-
}
|
|
1240
|
-
),
|
|
1241
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-h-screen", children: [
|
|
1242
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
-
DashboardHeader,
|
|
1244
|
-
{
|
|
1245
|
-
sidebarCollapsed,
|
|
1246
|
-
onMenuToggle: toggleSidebar,
|
|
1247
|
-
breadcrumbs,
|
|
1248
|
-
showSearch,
|
|
1249
|
-
searchPlaceholder,
|
|
1250
|
-
onSearchChange
|
|
1251
|
-
}
|
|
1252
|
-
),
|
|
1253
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1254
|
-
"main",
|
|
1255
|
-
{
|
|
1256
|
-
className: cn(
|
|
1257
|
-
"flex-1 transition-all duration-300 p-6",
|
|
1258
|
-
props.disableSidebarMargin ? "" : sidebarCollapsed ? "ml-16" : "ml-72"
|
|
1259
|
-
),
|
|
1260
|
-
children
|
|
1261
|
-
}
|
|
1262
|
-
)
|
|
1263
|
-
] }),
|
|
1264
|
-
!sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1265
|
-
"div",
|
|
1266
|
-
{
|
|
1267
|
-
className: "fixed inset-0 bg-black bg-opacity-50 z-30 md:hidden",
|
|
1268
|
-
onClick: toggleSidebar
|
|
1269
|
-
}
|
|
1270
|
-
)
|
|
1271
|
-
] });
|
|
1272
|
-
}
|
|
1273
|
-
);
|
|
1274
|
-
DashboardLayout.displayName = "DashboardLayout";
|
|
1275
|
-
var gridVariants = classVarianceAuthority.cva(
|
|
1276
|
-
"grid gap-6",
|
|
1277
|
-
{
|
|
1278
|
-
variants: {
|
|
1279
|
-
columns: {
|
|
1280
|
-
1: "grid-cols-1",
|
|
1281
|
-
2: "grid-cols-1 md:grid-cols-2",
|
|
1282
|
-
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
1283
|
-
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
|
|
1284
|
-
6: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
|
|
1285
|
-
12: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-6 2xl:grid-cols-12"
|
|
1286
|
-
}
|
|
1287
|
-
},
|
|
1288
|
-
defaultVariants: {
|
|
1289
|
-
columns: 12
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
);
|
|
1293
|
-
var gridItemVariants = classVarianceAuthority.cva(
|
|
1294
|
-
"min-h-0",
|
|
1295
|
-
// Prevents grid items from growing unnecessarily
|
|
1296
|
-
{
|
|
1297
|
-
variants: {
|
|
1298
|
-
colSpan: {
|
|
1299
|
-
1: "col-span-1",
|
|
1300
|
-
2: "col-span-1 md:col-span-2",
|
|
1301
|
-
3: "col-span-1 md:col-span-2 lg:col-span-3",
|
|
1302
|
-
4: "col-span-1 md:col-span-2 lg:col-span-4",
|
|
1303
|
-
6: "col-span-1 md:col-span-2 lg:col-span-3 xl:col-span-6",
|
|
1304
|
-
12: "col-span-full"
|
|
1305
|
-
},
|
|
1306
|
-
rowSpan: {
|
|
1307
|
-
1: "row-span-1",
|
|
1308
|
-
2: "row-span-2",
|
|
1309
|
-
3: "row-span-3",
|
|
1310
|
-
4: "row-span-4"
|
|
1311
|
-
}
|
|
1312
|
-
},
|
|
1313
|
-
defaultVariants: {
|
|
1314
|
-
colSpan: 1,
|
|
1315
|
-
rowSpan: 1
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
);
|
|
1319
|
-
var DashboardGrid = React11__namespace.forwardRef(
|
|
1320
|
-
({ className, columns, ...props }, ref) => {
|
|
1321
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1322
|
-
"div",
|
|
1323
|
-
{
|
|
1324
|
-
ref,
|
|
1325
|
-
className: cn(gridVariants({ columns }), className),
|
|
1326
|
-
...props
|
|
1327
|
-
}
|
|
1328
|
-
);
|
|
1329
|
-
}
|
|
1330
|
-
);
|
|
1331
|
-
var DashboardGridItem = React11__namespace.forwardRef(
|
|
1332
|
-
({ className, colSpan, rowSpan, ...props }, ref) => {
|
|
1333
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1334
|
-
"div",
|
|
1335
|
-
{
|
|
1336
|
-
ref,
|
|
1337
|
-
className: cn(gridItemVariants({ colSpan, rowSpan }), className),
|
|
1338
|
-
...props
|
|
1339
|
-
}
|
|
1340
|
-
);
|
|
1341
|
-
}
|
|
1342
|
-
);
|
|
1343
|
-
DashboardGrid.displayName = "DashboardGrid";
|
|
1344
|
-
DashboardGridItem.displayName = "DashboardGridItem";
|
|
1345
|
-
var tableVariants = classVarianceAuthority.cva(
|
|
1346
|
-
"w-full border-collapse bg-white",
|
|
1347
|
-
{
|
|
1348
|
-
variants: {
|
|
1349
|
-
size: {
|
|
1350
|
-
small: "text-xs",
|
|
1351
|
-
middle: "text-sm",
|
|
1352
|
-
large: "text-base"
|
|
1353
|
-
},
|
|
1354
|
-
bordered: {
|
|
1355
|
-
true: "border border-gray-200",
|
|
1356
|
-
false: ""
|
|
1357
|
-
}
|
|
1358
|
-
},
|
|
1359
|
-
defaultVariants: {
|
|
1360
|
-
size: "middle",
|
|
1361
|
-
bordered: false
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
);
|
|
1365
|
-
var cellVariants = classVarianceAuthority.cva(
|
|
1366
|
-
"border-b border-gray-200 transition-colors",
|
|
1367
|
-
{
|
|
1368
|
-
variants: {
|
|
1369
|
-
size: {
|
|
1370
|
-
small: "px-2 py-1",
|
|
1371
|
-
middle: "px-4 py-3",
|
|
1372
|
-
large: "px-6 py-4"
|
|
1373
|
-
},
|
|
1374
|
-
align: {
|
|
1375
|
-
left: "text-left",
|
|
1376
|
-
center: "text-center",
|
|
1377
|
-
right: "text-right"
|
|
1378
|
-
},
|
|
1379
|
-
type: {
|
|
1380
|
-
header: "bg-gray-50 font-semibold text-gray-900 border-b-2 border-gray-200",
|
|
1381
|
-
body: "text-gray-700 hover:bg-gray-50"
|
|
1382
|
-
}
|
|
1383
|
-
},
|
|
1384
|
-
defaultVariants: {
|
|
1385
|
-
size: "middle",
|
|
1386
|
-
align: "left",
|
|
1387
|
-
type: "body"
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
);
|
|
1391
|
-
var ColumnFilter = ({
|
|
1392
|
-
column,
|
|
1393
|
-
value,
|
|
1394
|
-
onChange
|
|
1395
|
-
}) => {
|
|
1396
|
-
const [isOpen, setIsOpen] = React11.useState(false);
|
|
1397
|
-
const [tempValue, setTempValue] = React11.useState(value || "");
|
|
1398
|
-
const handleApply = () => {
|
|
1399
|
-
onChange(tempValue);
|
|
1400
|
-
setIsOpen(false);
|
|
1401
|
-
};
|
|
1402
|
-
const handleClear = () => {
|
|
1403
|
-
setTempValue("");
|
|
1404
|
-
onChange("");
|
|
1405
|
-
setIsOpen(false);
|
|
1406
|
-
};
|
|
1407
|
-
if (!column.filterable) return null;
|
|
1408
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative inline-block", children: [
|
|
1409
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1410
|
-
Button,
|
|
1411
|
-
{
|
|
1412
|
-
variant: "ghost",
|
|
1413
|
-
size: "sm",
|
|
1414
|
-
onClick: () => setIsOpen(!isOpen),
|
|
1415
|
-
className: cn(
|
|
1416
|
-
"p-1 h-6 w-6",
|
|
1417
|
-
value && "text-primary-600"
|
|
1418
|
-
),
|
|
1419
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-3 w-3" })
|
|
1420
|
-
}
|
|
1421
|
-
),
|
|
1422
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1423
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
|
-
"div",
|
|
1425
|
-
{
|
|
1426
|
-
className: "fixed inset-0 z-10",
|
|
1427
|
-
onClick: () => setIsOpen(false)
|
|
1428
|
-
}
|
|
1429
|
-
),
|
|
1430
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-full left-0 z-20 mt-1 bg-white border border-gray-200 rounded-lg shadow-lg p-3 min-w-[200px]", children: [
|
|
1431
|
-
column.filterType === "select" && column.filterOptions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: column.filterOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center space-x-2", children: [
|
|
1432
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1433
|
-
Checkbox,
|
|
1434
|
-
{
|
|
1435
|
-
checked: tempValue === option.value,
|
|
1436
|
-
onChange: () => setTempValue(
|
|
1437
|
-
tempValue === option.value ? "" : option.value
|
|
1438
|
-
)
|
|
1439
|
-
}
|
|
1440
|
-
),
|
|
1441
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: option.label })
|
|
1442
|
-
] }, option.value)) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1443
|
-
Input,
|
|
1444
|
-
{
|
|
1445
|
-
placeholder: `Filter ${column.title}`,
|
|
1446
|
-
value: tempValue,
|
|
1447
|
-
onChange: (e) => setTempValue(e.target.value),
|
|
1448
|
-
className: "mb-2"
|
|
1449
|
-
}
|
|
1450
|
-
),
|
|
1451
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end space-x-2 mt-3", children: [
|
|
1452
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleClear, children: "Clear" }),
|
|
1453
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "sm", onClick: handleApply, children: "Apply" })
|
|
1454
|
-
] })
|
|
1455
|
-
] })
|
|
1456
|
-
] })
|
|
1457
|
-
] });
|
|
1458
|
-
};
|
|
1459
|
-
var TablePagination = ({ pagination, onChange }) => {
|
|
1460
|
-
const { current, pageSize, total, showSizeChanger = true, pageSizeOptions = [10, 20, 50, 100] } = pagination;
|
|
1461
|
-
const totalPages = Math.ceil(total / pageSize);
|
|
1462
|
-
const startRecord = (current - 1) * pageSize + 1;
|
|
1463
|
-
const endRecord = Math.min(current * pageSize, total);
|
|
1464
|
-
const getPageNumbers = () => {
|
|
1465
|
-
const pages = [];
|
|
1466
|
-
const maxVisible = 5;
|
|
1467
|
-
if (totalPages <= maxVisible) {
|
|
1468
|
-
for (let i = 1; i <= totalPages; i++) {
|
|
1469
|
-
pages.push(i);
|
|
1470
|
-
}
|
|
1471
|
-
} else {
|
|
1472
|
-
const start = Math.max(1, current - 2);
|
|
1473
|
-
const end = Math.min(totalPages, start + maxVisible - 1);
|
|
1474
|
-
for (let i = start; i <= end; i++) {
|
|
1475
|
-
pages.push(i);
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
return pages;
|
|
1479
|
-
};
|
|
1480
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-3 bg-white border-t border-gray-200", children: [
|
|
1481
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
1482
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-700", children: [
|
|
1483
|
-
"Showing ",
|
|
1484
|
-
startRecord,
|
|
1485
|
-
" to ",
|
|
1486
|
-
endRecord,
|
|
1487
|
-
" of ",
|
|
1488
|
-
total,
|
|
1489
|
-
" results"
|
|
1490
|
-
] }),
|
|
1491
|
-
showSizeChanger && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1492
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-700", children: "Show" }),
|
|
1493
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1494
|
-
"select",
|
|
1495
|
-
{
|
|
1496
|
-
value: pageSize,
|
|
1497
|
-
onChange: (e) => onChange(1, Number(e.target.value)),
|
|
1498
|
-
className: "border border-gray-300 rounded px-2 py-1 text-sm",
|
|
1499
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: size, children: size }, size))
|
|
1500
|
-
}
|
|
1501
|
-
),
|
|
1502
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-700", children: "per page" })
|
|
1503
|
-
] })
|
|
1504
|
-
] }),
|
|
1505
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-1", children: [
|
|
1506
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1507
|
-
Button,
|
|
1508
|
-
{
|
|
1509
|
-
variant: "ghost",
|
|
1510
|
-
size: "sm",
|
|
1511
|
-
onClick: () => onChange(1, pageSize),
|
|
1512
|
-
disabled: current === 1,
|
|
1513
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsLeft, { className: "h-4 w-4" })
|
|
1514
|
-
}
|
|
1515
|
-
),
|
|
1516
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1517
|
-
Button,
|
|
1518
|
-
{
|
|
1519
|
-
variant: "ghost",
|
|
1520
|
-
size: "sm",
|
|
1521
|
-
onClick: () => onChange(current - 1, pageSize),
|
|
1522
|
-
disabled: current === 1,
|
|
1523
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" })
|
|
1524
|
-
}
|
|
1525
|
-
),
|
|
1526
|
-
getPageNumbers().map((page) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1527
|
-
Button,
|
|
1528
|
-
{
|
|
1529
|
-
variant: current === page ? "primary" : "ghost",
|
|
1530
|
-
size: "sm",
|
|
1531
|
-
onClick: () => onChange(page, pageSize),
|
|
1532
|
-
className: "min-w-[32px]",
|
|
1533
|
-
children: page
|
|
1534
|
-
},
|
|
1535
|
-
page
|
|
1536
|
-
)),
|
|
1537
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1538
|
-
Button,
|
|
1539
|
-
{
|
|
1540
|
-
variant: "ghost",
|
|
1541
|
-
size: "sm",
|
|
1542
|
-
onClick: () => onChange(current + 1, pageSize),
|
|
1543
|
-
disabled: current === totalPages,
|
|
1544
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
1545
|
-
}
|
|
1546
|
-
),
|
|
1547
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1548
|
-
Button,
|
|
1549
|
-
{
|
|
1550
|
-
variant: "ghost",
|
|
1551
|
-
size: "sm",
|
|
1552
|
-
onClick: () => onChange(totalPages, pageSize),
|
|
1553
|
-
disabled: current === totalPages,
|
|
1554
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRight, { className: "h-4 w-4" })
|
|
1555
|
-
}
|
|
1556
|
-
)
|
|
1557
|
-
] })
|
|
1558
|
-
] });
|
|
1559
|
-
};
|
|
1560
|
-
var DataTable = ({
|
|
1561
|
-
columns,
|
|
1562
|
-
dataSource,
|
|
1563
|
-
loading = false,
|
|
1564
|
-
rowKey = "id",
|
|
1565
|
-
pagination = { current: 1, pageSize: 10, total: 0 },
|
|
1566
|
-
rowSelection,
|
|
1567
|
-
size = "middle",
|
|
1568
|
-
bordered = false,
|
|
1569
|
-
showHeader = true,
|
|
1570
|
-
title,
|
|
1571
|
-
footer,
|
|
1572
|
-
className,
|
|
1573
|
-
onSort,
|
|
1574
|
-
onFilter,
|
|
1575
|
-
onChange,
|
|
1576
|
-
...props
|
|
1577
|
-
}) => {
|
|
1578
|
-
const [sortConfig, setSortConfig] = React11.useState({ key: "", direction: null });
|
|
1579
|
-
const [filters, setFilters] = React11.useState({});
|
|
1580
|
-
const [selectedRowKeys, setSelectedRowKeys] = React11.useState(
|
|
1581
|
-
rowSelection?.selectedRowKeys || []
|
|
1582
|
-
);
|
|
1583
|
-
const getRowKey = React11.useCallback((record, index) => {
|
|
1584
|
-
if (typeof rowKey === "function") {
|
|
1585
|
-
return rowKey(record);
|
|
1586
|
-
}
|
|
1587
|
-
return record[rowKey] || index;
|
|
1588
|
-
}, [rowKey]);
|
|
1589
|
-
const handleSort = React11.useCallback((columnKey) => {
|
|
1590
|
-
let newDirection;
|
|
1591
|
-
if (sortConfig.key !== columnKey) {
|
|
1592
|
-
newDirection = "asc";
|
|
1593
|
-
} else if (sortConfig.direction === "asc") {
|
|
1594
|
-
newDirection = "desc";
|
|
1595
|
-
} else if (sortConfig.direction === "desc") {
|
|
1596
|
-
newDirection = null;
|
|
1597
|
-
} else {
|
|
1598
|
-
newDirection = "asc";
|
|
1599
|
-
}
|
|
1600
|
-
const newSortConfig = { key: columnKey, direction: newDirection };
|
|
1601
|
-
setSortConfig(newSortConfig);
|
|
1602
|
-
onSort?.(newSortConfig);
|
|
1603
|
-
onChange?.(pagination, filters, newSortConfig);
|
|
1604
|
-
}, [sortConfig, pagination, filters, onSort, onChange]);
|
|
1605
|
-
const handleFilter = React11.useCallback((columnKey, value) => {
|
|
1606
|
-
const newFilters = { ...filters };
|
|
1607
|
-
if (value === "" || value === null || value === void 0) {
|
|
1608
|
-
delete newFilters[columnKey];
|
|
1609
|
-
} else {
|
|
1610
|
-
newFilters[columnKey] = value;
|
|
1611
|
-
}
|
|
1612
|
-
setFilters(newFilters);
|
|
1613
|
-
onFilter?.(newFilters);
|
|
1614
|
-
onChange?.(pagination, newFilters, sortConfig);
|
|
1615
|
-
}, [filters, pagination, sortConfig, onFilter, onChange]);
|
|
1616
|
-
const handleRowSelect = React11.useCallback((record, selected) => {
|
|
1617
|
-
const key = getRowKey(record, 0);
|
|
1618
|
-
let newSelectedKeys;
|
|
1619
|
-
if (rowSelection?.type === "radio") {
|
|
1620
|
-
newSelectedKeys = selected ? [key] : [];
|
|
1621
|
-
} else {
|
|
1622
|
-
newSelectedKeys = selected ? [...selectedRowKeys, key] : selectedRowKeys.filter((k) => k !== key);
|
|
1623
|
-
}
|
|
1624
|
-
setSelectedRowKeys(newSelectedKeys);
|
|
1625
|
-
const selectedRows = dataSource.filter(
|
|
1626
|
-
(item) => newSelectedKeys.includes(getRowKey(item, 0))
|
|
1627
|
-
);
|
|
1628
|
-
rowSelection?.onChange?.(newSelectedKeys, selectedRows);
|
|
1629
|
-
rowSelection?.onSelect?.(record, selected, selectedRows, {});
|
|
1630
|
-
}, [selectedRowKeys, rowSelection, dataSource, getRowKey]);
|
|
1631
|
-
const handleSelectAll = React11.useCallback((selected) => {
|
|
1632
|
-
const newSelectedKeys = selected ? dataSource.map((item, index) => getRowKey(item, index)) : [];
|
|
1633
|
-
setSelectedRowKeys(newSelectedKeys);
|
|
1634
|
-
const selectedRows = selected ? dataSource : [];
|
|
1635
|
-
rowSelection?.onChange?.(newSelectedKeys, selectedRows);
|
|
1636
|
-
rowSelection?.onSelectAll?.(selected, selectedRows, dataSource);
|
|
1637
|
-
}, [dataSource, rowSelection, getRowKey]);
|
|
1638
|
-
const processedData = React11.useMemo(() => {
|
|
1639
|
-
let result = [...dataSource];
|
|
1640
|
-
Object.entries(filters).forEach(([key, value]) => {
|
|
1641
|
-
if (value !== "" && value !== null && value !== void 0) {
|
|
1642
|
-
result = result.filter((item) => {
|
|
1643
|
-
const itemValue = item[key];
|
|
1644
|
-
if (typeof itemValue === "string") {
|
|
1645
|
-
return itemValue.toLowerCase().includes(String(value).toLowerCase());
|
|
1646
|
-
}
|
|
1647
|
-
return itemValue === value;
|
|
1648
|
-
});
|
|
1649
|
-
}
|
|
1650
|
-
});
|
|
1651
|
-
if (sortConfig.key && sortConfig.direction) {
|
|
1652
|
-
result.sort((a, b) => {
|
|
1653
|
-
const aValue = a[sortConfig.key];
|
|
1654
|
-
const bValue = b[sortConfig.key];
|
|
1655
|
-
if (aValue === bValue) return 0;
|
|
1656
|
-
const comparison = aValue < bValue ? -1 : 1;
|
|
1657
|
-
return sortConfig.direction === "asc" ? comparison : -comparison;
|
|
1658
|
-
});
|
|
1659
|
-
}
|
|
1660
|
-
return result;
|
|
1661
|
-
}, [dataSource, filters, sortConfig]);
|
|
1662
|
-
const paginatedData = React11.useMemo(() => {
|
|
1663
|
-
if (!pagination) return processedData;
|
|
1664
|
-
const { current, pageSize } = pagination;
|
|
1665
|
-
const startIndex = (current - 1) * pageSize;
|
|
1666
|
-
return processedData.slice(startIndex, startIndex + pageSize);
|
|
1667
|
-
}, [processedData, pagination]);
|
|
1668
|
-
const currentPagination = React11.useMemo(() => {
|
|
1669
|
-
if (!pagination) return false;
|
|
1670
|
-
return {
|
|
1671
|
-
...pagination,
|
|
1672
|
-
total: processedData.length
|
|
1673
|
-
};
|
|
1674
|
-
}, [pagination, processedData.length]);
|
|
1675
|
-
const isAllSelected = selectedRowKeys.length === dataSource.length && dataSource.length > 0;
|
|
1676
|
-
const isIndeterminate = selectedRowKeys.length > 0 && selectedRowKeys.length < dataSource.length;
|
|
1677
|
-
if (loading) {
|
|
1678
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), children: [
|
|
1679
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: title() }),
|
|
1680
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex space-x-4", children: [
|
|
1681
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-8" }),
|
|
1682
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 flex-1" }),
|
|
1683
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-24" }),
|
|
1684
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-16" })
|
|
1685
|
-
] }, i)) }) })
|
|
1686
|
-
] });
|
|
1687
|
-
}
|
|
1688
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), children: [
|
|
1689
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: title() }),
|
|
1690
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [
|
|
1691
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cn(tableVariants({ size, bordered })), children: [
|
|
1692
|
-
showHeader && /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
1693
|
-
rowSelection && /* @__PURE__ */ jsxRuntime.jsx("th", { className: cn(cellVariants({ size, type: "header" }), "w-12"), children: rowSelection.type !== "radio" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1694
|
-
Checkbox,
|
|
1695
|
-
{
|
|
1696
|
-
checked: isAllSelected,
|
|
1697
|
-
onChange: (e) => handleSelectAll(e.target.checked),
|
|
1698
|
-
className: cn(isIndeterminate && "indeterminate")
|
|
1699
|
-
}
|
|
1700
|
-
) }),
|
|
1701
|
-
columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1702
|
-
"th",
|
|
1703
|
-
{
|
|
1704
|
-
className: cn(
|
|
1705
|
-
cellVariants({
|
|
1706
|
-
size,
|
|
1707
|
-
align: column.align,
|
|
1708
|
-
type: "header"
|
|
1709
|
-
}),
|
|
1710
|
-
column.width && `w-[${column.width}]`
|
|
1711
|
-
),
|
|
1712
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1713
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1714
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: column.title }),
|
|
1715
|
-
column.sortable && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1716
|
-
"button",
|
|
1717
|
-
{
|
|
1718
|
-
onClick: () => handleSort(column.key),
|
|
1719
|
-
className: "flex flex-col items-center hover:text-primary-600",
|
|
1720
|
-
children: [
|
|
1721
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1722
|
-
lucideReact.ChevronUp,
|
|
1723
|
-
{
|
|
1724
|
-
className: cn(
|
|
1725
|
-
"h-3 w-3",
|
|
1726
|
-
sortConfig.key === column.key && sortConfig.direction === "asc" ? "text-primary-600" : "text-gray-400"
|
|
1727
|
-
)
|
|
1728
|
-
}
|
|
1729
|
-
),
|
|
1730
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1731
|
-
lucideReact.ChevronDown,
|
|
1732
|
-
{
|
|
1733
|
-
className: cn(
|
|
1734
|
-
"h-3 w-3 -mt-1",
|
|
1735
|
-
sortConfig.key === column.key && sortConfig.direction === "desc" ? "text-primary-600" : "text-gray-400"
|
|
1736
|
-
)
|
|
1737
|
-
}
|
|
1738
|
-
)
|
|
1739
|
-
]
|
|
1740
|
-
}
|
|
1741
|
-
)
|
|
1742
|
-
] }),
|
|
1743
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
-
ColumnFilter,
|
|
1745
|
-
{
|
|
1746
|
-
column,
|
|
1747
|
-
value: filters[column.key],
|
|
1748
|
-
onChange: (value) => handleFilter(column.key, value)
|
|
1749
|
-
}
|
|
1750
|
-
)
|
|
1751
|
-
] })
|
|
1752
|
-
},
|
|
1753
|
-
column.key
|
|
1754
|
-
))
|
|
1755
|
-
] }) }),
|
|
1756
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: paginatedData.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1757
|
-
"td",
|
|
1758
|
-
{
|
|
1759
|
-
colSpan: columns.length + (rowSelection ? 1 : 0),
|
|
1760
|
-
className: cn(cellVariants({ size, align: "center" }), "py-8"),
|
|
1761
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-gray-500", children: [
|
|
1762
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl mb-2", children: "\u{1F4CB}" }),
|
|
1763
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "No data available" })
|
|
1764
|
-
] })
|
|
1765
|
-
}
|
|
1766
|
-
) }) : paginatedData.map((record, index) => {
|
|
1767
|
-
const key = getRowKey(record, index);
|
|
1768
|
-
const isSelected = selectedRowKeys.includes(key);
|
|
1769
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1770
|
-
"tr",
|
|
1771
|
-
{
|
|
1772
|
-
className: cn(
|
|
1773
|
-
"hover:bg-gray-50 transition-colors",
|
|
1774
|
-
isSelected && "bg-primary-50"
|
|
1775
|
-
),
|
|
1776
|
-
...props.onRow?.(record, index) ?? {},
|
|
1777
|
-
children: [
|
|
1778
|
-
rowSelection && /* @__PURE__ */ jsxRuntime.jsx("td", { className: cn(cellVariants({ size })), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1779
|
-
Checkbox,
|
|
1780
|
-
{
|
|
1781
|
-
checked: isSelected,
|
|
1782
|
-
onChange: (e) => handleRowSelect(record, e.target.checked),
|
|
1783
|
-
...rowSelection.getCheckboxProps?.(record)
|
|
1784
|
-
}
|
|
1785
|
-
) }),
|
|
1786
|
-
columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1787
|
-
"td",
|
|
1788
|
-
{
|
|
1789
|
-
className: cn(cellVariants({
|
|
1790
|
-
size,
|
|
1791
|
-
align: column.align
|
|
1792
|
-
})),
|
|
1793
|
-
children: column.render ? column.render(record[column.dataIndex], record, index) : String(record[column.dataIndex] || "")
|
|
1794
|
-
},
|
|
1795
|
-
column.key
|
|
1796
|
-
))
|
|
1797
|
-
]
|
|
1798
|
-
},
|
|
1799
|
-
key
|
|
1800
|
-
);
|
|
1801
|
-
}) })
|
|
1802
|
-
] }) }),
|
|
1803
|
-
currentPagination && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1804
|
-
TablePagination,
|
|
1805
|
-
{
|
|
1806
|
-
pagination: currentPagination,
|
|
1807
|
-
onChange: (page, pageSize) => {
|
|
1808
|
-
const newPagination = { ...currentPagination, current: page, pageSize };
|
|
1809
|
-
onChange?.(newPagination, filters, sortConfig);
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
)
|
|
1813
|
-
] }),
|
|
1814
|
-
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: footer() })
|
|
1815
|
-
] });
|
|
1816
|
-
};
|
|
1817
|
-
DataTable.displayName = "DataTable";
|
|
1818
|
-
var generateUsers = () => {
|
|
1819
|
-
const roles = ["Admin", "Manager", "Developer", "Designer", "Analyst"];
|
|
1820
|
-
const departments = ["Engineering", "Design", "Marketing", "Sales", "HR"];
|
|
1821
|
-
const statuses = ["active", "inactive", "pending"];
|
|
1822
|
-
return Array.from({ length: 50 }, (_, i) => ({
|
|
1823
|
-
id: i + 1,
|
|
1824
|
-
name: `User ${i + 1}`,
|
|
1825
|
-
email: `user${i + 1}@company.com`,
|
|
1826
|
-
role: roles[Math.floor(Math.random() * roles.length)],
|
|
1827
|
-
status: statuses[Math.floor(Math.random() * statuses.length)],
|
|
1828
|
-
avatar: `https://images.pexels.com/photos/${774909 + i}/pexels-photo-${774909 + i}.jpeg?auto=compress&cs=tinysrgb&w=64`,
|
|
1829
|
-
joinDate: new Date(2020 + Math.floor(Math.random() * 4), Math.floor(Math.random() * 12), Math.floor(Math.random() * 28) + 1).toISOString().split("T")[0],
|
|
1830
|
-
lastLogin: new Date(Date.now() - Math.floor(Math.random() * 30) * 24 * 60 * 60 * 1e3).toISOString().split("T")[0],
|
|
1831
|
-
department: departments[Math.floor(Math.random() * departments.length)]
|
|
1832
|
-
}));
|
|
1833
|
-
};
|
|
1834
|
-
var generateSales = () => {
|
|
1835
|
-
const products = ["Pro Plan", "Basic Plan", "Enterprise", "Starter", "Premium"];
|
|
1836
|
-
const regions = ["North America", "Europe", "Asia Pacific", "Latin America"];
|
|
1837
|
-
const statuses = ["completed", "pending", "cancelled"];
|
|
1838
|
-
return Array.from({ length: 75 }, (_, i) => ({
|
|
1839
|
-
id: i + 1,
|
|
1840
|
-
product: products[Math.floor(Math.random() * products.length)],
|
|
1841
|
-
customer: `Customer ${i + 1}`,
|
|
1842
|
-
amount: Math.floor(Math.random() * 1e4) + 100,
|
|
1843
|
-
status: statuses[Math.floor(Math.random() * statuses.length)],
|
|
1844
|
-
date: new Date(2024, Math.floor(Math.random() * 12), Math.floor(Math.random() * 28) + 1).toISOString().split("T")[0],
|
|
1845
|
-
region: regions[Math.floor(Math.random() * regions.length)],
|
|
1846
|
-
salesperson: `Sales Rep ${Math.floor(Math.random() * 10) + 1}`
|
|
1847
|
-
}));
|
|
1848
|
-
};
|
|
1849
|
-
var generateTasks = () => {
|
|
1850
|
-
const priorities = ["low", "medium", "high", "urgent"];
|
|
1851
|
-
const statuses = ["todo", "in-progress", "review", "completed"];
|
|
1852
|
-
const projects = ["Website Redesign", "Mobile App", "API Integration", "Dashboard", "Marketing Campaign"];
|
|
1853
|
-
const tagOptions = ["frontend", "backend", "design", "testing", "documentation", "bug", "feature"];
|
|
1854
|
-
return Array.from({ length: 60 }, (_, i) => ({
|
|
1855
|
-
id: i + 1,
|
|
1856
|
-
title: `Task ${i + 1}: Implement feature`,
|
|
1857
|
-
assignee: `Developer ${Math.floor(Math.random() * 8) + 1}`,
|
|
1858
|
-
priority: priorities[Math.floor(Math.random() * priorities.length)],
|
|
1859
|
-
status: statuses[Math.floor(Math.random() * statuses.length)],
|
|
1860
|
-
dueDate: new Date(Date.now() + Math.floor(Math.random() * 60) * 24 * 60 * 60 * 1e3).toISOString().split("T")[0],
|
|
1861
|
-
project: projects[Math.floor(Math.random() * projects.length)],
|
|
1862
|
-
tags: Array.from(
|
|
1863
|
-
{ length: Math.floor(Math.random() * 3) + 1 },
|
|
1864
|
-
() => tagOptions[Math.floor(Math.random() * tagOptions.length)]
|
|
1865
|
-
).filter((tag, index, arr) => arr.indexOf(tag) === index)
|
|
1866
|
-
}));
|
|
1867
|
-
};
|
|
1868
|
-
var usersData = generateUsers();
|
|
1869
|
-
var salesData = generateSales();
|
|
1870
|
-
var tasksData = generateTasks();
|
|
1871
|
-
var DataTableShowcase = () => {
|
|
1872
|
-
const [selectedTab, setSelectedTab] = React11.useState("users");
|
|
1873
|
-
const [selectedRows, setSelectedRows] = React11.useState([]);
|
|
1874
|
-
const userColumns = [
|
|
1875
|
-
{
|
|
1876
|
-
key: "user",
|
|
1877
|
-
title: "User",
|
|
1878
|
-
dataIndex: "name",
|
|
1879
|
-
sortable: true,
|
|
1880
|
-
filterable: true,
|
|
1881
|
-
filterType: "text",
|
|
1882
|
-
render: (_, record) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
1883
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { size: "sm", children: [
|
|
1884
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: record.avatar }),
|
|
1885
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: record.name.split(" ").map((n) => n[0]).join("") })
|
|
1886
|
-
] }),
|
|
1887
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1888
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900", children: record.name }),
|
|
1889
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: record.email })
|
|
1890
|
-
] })
|
|
1891
|
-
] })
|
|
1892
|
-
},
|
|
1893
|
-
{
|
|
1894
|
-
key: "role",
|
|
1895
|
-
title: "Role",
|
|
1896
|
-
dataIndex: "role",
|
|
1897
|
-
sortable: true,
|
|
1898
|
-
filterable: true,
|
|
1899
|
-
filterType: "select",
|
|
1900
|
-
filterOptions: [
|
|
1901
|
-
{ label: "Admin", value: "Admin" },
|
|
1902
|
-
{ label: "Manager", value: "Manager" },
|
|
1903
|
-
{ label: "Developer", value: "Developer" },
|
|
1904
|
-
{ label: "Designer", value: "Designer" },
|
|
1905
|
-
{ label: "Analyst", value: "Analyst" }
|
|
1906
|
-
]
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
key: "department",
|
|
1910
|
-
title: "Department",
|
|
1911
|
-
dataIndex: "department",
|
|
1912
|
-
sortable: true,
|
|
1913
|
-
filterable: true,
|
|
1914
|
-
filterType: "select",
|
|
1915
|
-
filterOptions: [
|
|
1916
|
-
{ label: "Engineering", value: "Engineering" },
|
|
1917
|
-
{ label: "Design", value: "Design" },
|
|
1918
|
-
{ label: "Marketing", value: "Marketing" },
|
|
1919
|
-
{ label: "Sales", value: "Sales" },
|
|
1920
|
-
{ label: "HR", value: "HR" }
|
|
1921
|
-
]
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
key: "status",
|
|
1925
|
-
title: "Status",
|
|
1926
|
-
dataIndex: "status",
|
|
1927
|
-
sortable: true,
|
|
1928
|
-
filterable: true,
|
|
1929
|
-
filterType: "select",
|
|
1930
|
-
filterOptions: [
|
|
1931
|
-
{ label: "Active", value: "active" },
|
|
1932
|
-
{ label: "Inactive", value: "inactive" },
|
|
1933
|
-
{ label: "Pending", value: "pending" }
|
|
1934
|
-
],
|
|
1935
|
-
render: (status) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1936
|
-
Badge,
|
|
1937
|
-
{
|
|
1938
|
-
variant: status === "active" ? "success" : status === "inactive" ? "secondary" : "warning",
|
|
1939
|
-
children: status.charAt(0).toUpperCase() + status.slice(1)
|
|
1940
|
-
}
|
|
1941
|
-
)
|
|
1942
|
-
},
|
|
1943
|
-
{
|
|
1944
|
-
key: "joinDate",
|
|
1945
|
-
title: "Join Date",
|
|
1946
|
-
dataIndex: "joinDate",
|
|
1947
|
-
sortable: true,
|
|
1948
|
-
filterable: true,
|
|
1949
|
-
filterType: "date"
|
|
1950
|
-
},
|
|
1951
|
-
{
|
|
1952
|
-
key: "actions",
|
|
1953
|
-
title: "Actions",
|
|
1954
|
-
dataIndex: "id",
|
|
1955
|
-
align: "center",
|
|
1956
|
-
render: (_, record) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center space-x-1", children: [
|
|
1957
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: () => showToast.info(`View user ${record.name}`), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4" }) }),
|
|
1958
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: () => showToast.info(`Edit user ${record.name}`), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "h-4 w-4" }) }),
|
|
1959
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: () => showToast.warning(`Delete user ${record.name}`), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-4 w-4 text-danger-600" }) })
|
|
1960
|
-
] })
|
|
1961
|
-
}
|
|
1962
|
-
];
|
|
1963
|
-
const salesColumns = [
|
|
1964
|
-
{
|
|
1965
|
-
key: "product",
|
|
1966
|
-
title: "Product",
|
|
1967
|
-
dataIndex: "product",
|
|
1968
|
-
sortable: true,
|
|
1969
|
-
filterable: true,
|
|
1970
|
-
filterType: "text",
|
|
1971
|
-
render: (product) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900", children: product })
|
|
1972
|
-
},
|
|
1973
|
-
{
|
|
1974
|
-
key: "customer",
|
|
1975
|
-
title: "Customer",
|
|
1976
|
-
dataIndex: "customer",
|
|
1977
|
-
sortable: true,
|
|
1978
|
-
filterable: true,
|
|
1979
|
-
filterType: "text"
|
|
1980
|
-
},
|
|
1981
|
-
{
|
|
1982
|
-
key: "amount",
|
|
1983
|
-
title: "Amount",
|
|
1984
|
-
dataIndex: "amount",
|
|
1985
|
-
sortable: true,
|
|
1986
|
-
filterable: true,
|
|
1987
|
-
filterType: "number",
|
|
1988
|
-
align: "right",
|
|
1989
|
-
render: (amount) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end space-x-1", children: [
|
|
1990
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.DollarSign, { className: "h-4 w-4 text-gray-400" }),
|
|
1991
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: amount.toLocaleString() })
|
|
1992
|
-
] })
|
|
1993
|
-
},
|
|
1994
|
-
{
|
|
1995
|
-
key: "status",
|
|
1996
|
-
title: "Status",
|
|
1997
|
-
dataIndex: "status",
|
|
1998
|
-
sortable: true,
|
|
1999
|
-
filterable: true,
|
|
2000
|
-
filterType: "select",
|
|
2001
|
-
filterOptions: [
|
|
2002
|
-
{ label: "Completed", value: "completed" },
|
|
2003
|
-
{ label: "Pending", value: "pending" },
|
|
2004
|
-
{ label: "Cancelled", value: "cancelled" }
|
|
2005
|
-
],
|
|
2006
|
-
render: (status) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2007
|
-
Badge,
|
|
2008
|
-
{
|
|
2009
|
-
variant: status === "completed" ? "success" : status === "pending" ? "warning" : "danger",
|
|
2010
|
-
children: status.charAt(0).toUpperCase() + status.slice(1)
|
|
2011
|
-
}
|
|
2012
|
-
)
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
key: "region",
|
|
2016
|
-
title: "Region",
|
|
2017
|
-
dataIndex: "region",
|
|
2018
|
-
sortable: true,
|
|
2019
|
-
filterable: true,
|
|
2020
|
-
filterType: "select",
|
|
2021
|
-
filterOptions: [
|
|
2022
|
-
{ label: "North America", value: "North America" },
|
|
2023
|
-
{ label: "Europe", value: "Europe" },
|
|
2024
|
-
{ label: "Asia Pacific", value: "Asia Pacific" },
|
|
2025
|
-
{ label: "Latin America", value: "Latin America" }
|
|
2026
|
-
]
|
|
2027
|
-
},
|
|
2028
|
-
{
|
|
2029
|
-
key: "date",
|
|
2030
|
-
title: "Date",
|
|
2031
|
-
dataIndex: "date",
|
|
2032
|
-
sortable: true,
|
|
2033
|
-
filterable: true,
|
|
2034
|
-
filterType: "date"
|
|
2035
|
-
}
|
|
2036
|
-
];
|
|
2037
|
-
const taskColumns = [
|
|
2038
|
-
{
|
|
2039
|
-
key: "title",
|
|
2040
|
-
title: "Task",
|
|
2041
|
-
dataIndex: "title",
|
|
2042
|
-
sortable: true,
|
|
2043
|
-
filterable: true,
|
|
2044
|
-
filterType: "text",
|
|
2045
|
-
render: (title, record) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2046
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900", children: title }),
|
|
2047
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: record.project })
|
|
2048
|
-
] })
|
|
2049
|
-
},
|
|
2050
|
-
{
|
|
2051
|
-
key: "assignee",
|
|
2052
|
-
title: "Assignee",
|
|
2053
|
-
dataIndex: "assignee",
|
|
2054
|
-
sortable: true,
|
|
2055
|
-
filterable: true,
|
|
2056
|
-
filterType: "text"
|
|
2057
|
-
},
|
|
2058
|
-
{
|
|
2059
|
-
key: "priority",
|
|
2060
|
-
title: "Priority",
|
|
2061
|
-
dataIndex: "priority",
|
|
2062
|
-
sortable: true,
|
|
2063
|
-
filterable: true,
|
|
2064
|
-
filterType: "select",
|
|
2065
|
-
filterOptions: [
|
|
2066
|
-
{ label: "Low", value: "low" },
|
|
2067
|
-
{ label: "Medium", value: "medium" },
|
|
2068
|
-
{ label: "High", value: "high" },
|
|
2069
|
-
{ label: "Urgent", value: "urgent" }
|
|
2070
|
-
],
|
|
2071
|
-
render: (priority) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2072
|
-
Badge,
|
|
2073
|
-
{
|
|
2074
|
-
variant: priority === "urgent" ? "danger" : priority === "high" ? "warning" : priority === "medium" ? "secondary" : "outline",
|
|
2075
|
-
children: priority.charAt(0).toUpperCase() + priority.slice(1)
|
|
2076
|
-
}
|
|
2077
|
-
)
|
|
2078
|
-
},
|
|
2079
|
-
{
|
|
2080
|
-
key: "status",
|
|
2081
|
-
title: "Status",
|
|
2082
|
-
dataIndex: "status",
|
|
2083
|
-
sortable: true,
|
|
2084
|
-
filterable: true,
|
|
2085
|
-
filterType: "select",
|
|
2086
|
-
filterOptions: [
|
|
2087
|
-
{ label: "To Do", value: "todo" },
|
|
2088
|
-
{ label: "In Progress", value: "in-progress" },
|
|
2089
|
-
{ label: "Review", value: "review" },
|
|
2090
|
-
{ label: "Completed", value: "completed" }
|
|
2091
|
-
],
|
|
2092
|
-
render: (status) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2093
|
-
Badge,
|
|
2094
|
-
{
|
|
2095
|
-
variant: status === "completed" ? "success" : status === "in-progress" ? "warning" : status === "review" ? "secondary" : "outline",
|
|
2096
|
-
children: status.replace("-", " ").replace(/\b\w/g, (l) => l.toUpperCase())
|
|
2097
|
-
}
|
|
2098
|
-
)
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
key: "dueDate",
|
|
2102
|
-
title: "Due Date",
|
|
2103
|
-
dataIndex: "dueDate",
|
|
2104
|
-
sortable: true,
|
|
2105
|
-
filterable: true,
|
|
2106
|
-
filterType: "date"
|
|
2107
|
-
},
|
|
2108
|
-
{
|
|
2109
|
-
key: "tags",
|
|
2110
|
-
title: "Tags",
|
|
2111
|
-
dataIndex: "tags",
|
|
2112
|
-
render: (tags) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-1", children: [
|
|
2113
|
-
tags.slice(0, 2).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: "text-xs", children: tag }, tag)),
|
|
2114
|
-
tags.length > 2 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "outline", className: "text-xs", children: [
|
|
2115
|
-
"+",
|
|
2116
|
-
tags.length - 2
|
|
2117
|
-
] })
|
|
2118
|
-
] })
|
|
2119
|
-
}
|
|
2120
|
-
];
|
|
2121
|
-
const getCurrentData = () => {
|
|
2122
|
-
switch (selectedTab) {
|
|
2123
|
-
case "users":
|
|
2124
|
-
return usersData;
|
|
2125
|
-
case "sales":
|
|
2126
|
-
return salesData;
|
|
2127
|
-
case "tasks":
|
|
2128
|
-
return tasksData;
|
|
2129
|
-
default:
|
|
2130
|
-
return [];
|
|
2131
|
-
}
|
|
2132
|
-
};
|
|
2133
|
-
const getCurrentColumns = () => {
|
|
2134
|
-
switch (selectedTab) {
|
|
2135
|
-
case "users":
|
|
2136
|
-
return userColumns;
|
|
2137
|
-
case "sales":
|
|
2138
|
-
return salesColumns;
|
|
2139
|
-
case "tasks":
|
|
2140
|
-
return taskColumns;
|
|
2141
|
-
default:
|
|
2142
|
-
return [];
|
|
2143
|
-
}
|
|
2144
|
-
};
|
|
2145
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
2146
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2147
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2148
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold text-gray-900", children: "DataTable Component" }),
|
|
2149
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 mt-1", children: "A comprehensive table component with filtering, sorting, and pagination" })
|
|
2150
|
-
] }),
|
|
2151
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
2152
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: () => showToast.info("Export functionality"), children: [
|
|
2153
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4 mr-2" }),
|
|
2154
|
-
"Export"
|
|
2155
|
-
] }),
|
|
2156
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "primary", onClick: () => showToast.success("Add new item"), children: [
|
|
2157
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
|
|
2158
|
-
"Add New"
|
|
2159
|
-
] })
|
|
2160
|
-
] })
|
|
2161
|
-
] }),
|
|
2162
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "-mb-px flex space-x-8", children: [
|
|
2163
|
-
{ key: "users", label: "Users", icon: lucideReact.Users },
|
|
2164
|
-
{ key: "sales", label: "Sales", icon: lucideReact.DollarSign },
|
|
2165
|
-
{ key: "tasks", label: "Tasks", icon: lucideReact.Calendar }
|
|
2166
|
-
].map(({ key, label, icon: Icon }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2167
|
-
"button",
|
|
2168
|
-
{
|
|
2169
|
-
onClick: () => setSelectedTab(key),
|
|
2170
|
-
className: `
|
|
2171
|
-
flex items-center space-x-2 py-2 px-1 border-b-2 font-medium text-sm
|
|
2172
|
-
${selectedTab === key ? "border-primary-500 text-primary-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}
|
|
2173
|
-
`,
|
|
2174
|
-
children: [
|
|
2175
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4" }),
|
|
2176
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
2177
|
-
]
|
|
2178
|
-
},
|
|
2179
|
-
key
|
|
2180
|
-
)) }) }),
|
|
2181
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-4 gap-4", children: [
|
|
2182
|
-
/* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2183
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2184
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-600", children: "Total Records" }),
|
|
2185
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold text-gray-900", children: getCurrentData().length })
|
|
2186
|
-
] }),
|
|
2187
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 bg-primary-100 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "h-6 w-6 text-primary-600" }) })
|
|
2188
|
-
] }) }) }),
|
|
2189
|
-
/* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2190
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2191
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-600", children: "Selected" }),
|
|
2192
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold text-gray-900", children: selectedRows.length })
|
|
2193
|
-
] }),
|
|
2194
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 bg-success-100 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-6 w-6 text-success-600" }) })
|
|
2195
|
-
] }) }) }),
|
|
2196
|
-
/* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2197
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2198
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-600", children: "Active Filters" }),
|
|
2199
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold text-gray-900", children: "0" })
|
|
2200
|
-
] }),
|
|
2201
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 bg-warning-100 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-6 w-6 text-warning-600" }) })
|
|
2202
|
-
] }) }) }),
|
|
2203
|
-
/* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2204
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2205
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-600", children: "Performance" }),
|
|
2206
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-1", children: [
|
|
2207
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-success-600" }),
|
|
2208
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl font-bold text-gray-900", children: "Fast" })
|
|
2209
|
-
] })
|
|
2210
|
-
] }),
|
|
2211
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 bg-success-100 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-6 w-6 text-success-600" }) })
|
|
2212
|
-
] }) }) })
|
|
2213
|
-
] }),
|
|
2214
|
-
/* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2215
|
-
DataTable,
|
|
2216
|
-
{
|
|
2217
|
-
columns: getCurrentColumns(),
|
|
2218
|
-
dataSource: getCurrentData(),
|
|
2219
|
-
rowKey: "id",
|
|
2220
|
-
pagination: {
|
|
2221
|
-
current: 1,
|
|
2222
|
-
pageSize: 10,
|
|
2223
|
-
total: getCurrentData().length,
|
|
2224
|
-
showSizeChanger: true,
|
|
2225
|
-
pageSizeOptions: [5, 10, 20, 50]
|
|
2226
|
-
},
|
|
2227
|
-
rowSelection: {
|
|
2228
|
-
type: "checkbox",
|
|
2229
|
-
selectedRowKeys: selectedRows,
|
|
2230
|
-
onChange: (keys) => {
|
|
2231
|
-
setSelectedRows(keys);
|
|
2232
|
-
showToast.info(`Selected ${keys.length} items`);
|
|
2233
|
-
}
|
|
2234
|
-
},
|
|
2235
|
-
size: "middle",
|
|
2236
|
-
bordered: false,
|
|
2237
|
-
title: () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-gray-200", children: [
|
|
2238
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-lg font-semibold text-gray-900", children: [
|
|
2239
|
-
selectedTab.charAt(0).toUpperCase() + selectedTab.slice(1),
|
|
2240
|
-
" Data"
|
|
2241
|
-
] }),
|
|
2242
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
2243
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "outline", children: [
|
|
2244
|
-
getCurrentData().length,
|
|
2245
|
-
" total"
|
|
2246
|
-
] }),
|
|
2247
|
-
selectedRows.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "primary", children: [
|
|
2248
|
-
selectedRows.length,
|
|
2249
|
-
" selected"
|
|
2250
|
-
] })
|
|
2251
|
-
] })
|
|
2252
|
-
] }),
|
|
2253
|
-
onChange: (pagination, filters, sorter) => {
|
|
2254
|
-
console.log("Table changed:", { pagination, filters, sorter });
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
) }) }),
|
|
2258
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
2259
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Component Features" }) }),
|
|
2260
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
2261
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2262
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-gray-900 mb-2", children: "Core Features" }),
|
|
2263
|
-
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "space-y-1 text-sm text-gray-600", children: [
|
|
2264
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Sortable columns with visual indicators" }),
|
|
2265
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Advanced filtering (text, select, date)" }),
|
|
2266
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Pagination with configurable page sizes" }),
|
|
2267
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Row selection (single/multiple)" }),
|
|
2268
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Responsive design for all screen sizes" }),
|
|
2269
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Loading and empty states" })
|
|
2270
|
-
] })
|
|
2271
|
-
] }),
|
|
2272
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2273
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-gray-900 mb-2", children: "Advanced Features" }),
|
|
2274
|
-
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "space-y-1 text-sm text-gray-600", children: [
|
|
2275
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Custom cell renderers" }),
|
|
2276
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 TypeScript support with full typing" }),
|
|
2277
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Accessibility features (ARIA labels)" }),
|
|
2278
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Performance optimizations" }),
|
|
2279
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Customizable styling and themes" }),
|
|
2280
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "\u2022 Export and bulk actions support" })
|
|
2281
|
-
] })
|
|
2282
|
-
] })
|
|
2283
|
-
] }) })
|
|
2284
|
-
] })
|
|
2285
|
-
] });
|
|
2286
|
-
};
|
|
2287
|
-
function ShowcaseButtonDemo() {
|
|
2288
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [
|
|
2289
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", children: "Primary" }),
|
|
2290
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "secondary", children: "Secondary" }),
|
|
2291
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "danger", children: "Danger" }),
|
|
2292
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "success", children: "Success" }),
|
|
2293
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "warning", children: "Warning" }),
|
|
2294
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", children: "Outline" }),
|
|
2295
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", children: "Ghost" }),
|
|
2296
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", children: "Link" })
|
|
2297
|
-
] });
|
|
2298
|
-
}
|
|
2299
|
-
function ShowcaseInputDemo() {
|
|
2300
|
-
const [v, setV] = React11__namespace.useState("");
|
|
2301
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 max-w-md", children: [
|
|
2302
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Default input", value: v, onChange: (e) => setV(e.target.value) }),
|
|
2303
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Success state", variant: "success" }),
|
|
2304
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Error state", variant: "error" }),
|
|
2305
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2306
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Small", inputSize: "sm" }),
|
|
2307
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Medium", inputSize: "md" }),
|
|
2308
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { placeholder: "Large", inputSize: "lg" })
|
|
2309
|
-
] })
|
|
2310
|
-
] });
|
|
2311
|
-
}
|
|
2312
|
-
function ShowcaseTextareaDemo() {
|
|
2313
|
-
const [tv, setTv] = React11__namespace.useState("");
|
|
2314
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 max-w-md", children: [
|
|
2315
|
-
/* @__PURE__ */ jsxRuntime.jsx(Textarea, { placeholder: "Default textarea", value: tv, onChange: (e) => setTv(e.target.value) }),
|
|
2316
|
-
/* @__PURE__ */ jsxRuntime.jsx(Textarea, { placeholder: "Success state", variant: "success" }),
|
|
2317
|
-
/* @__PURE__ */ jsxRuntime.jsx(Textarea, { placeholder: "Error state", variant: "error" }),
|
|
2318
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2319
|
-
/* @__PURE__ */ jsxRuntime.jsx(Textarea, { placeholder: "Small (default)" }),
|
|
2320
|
-
/* @__PURE__ */ jsxRuntime.jsx(Textarea, { placeholder: "Disabled", disabled: true })
|
|
2321
|
-
] })
|
|
2322
|
-
] });
|
|
2323
|
-
}
|
|
2324
|
-
function ShowcaseSwitchDemo() {
|
|
2325
|
-
const [checked, setChecked] = React11__namespace.useState(false);
|
|
2326
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2327
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2328
|
-
/* @__PURE__ */ jsxRuntime.jsx(Switch, { checked, onCheckedChange: setChecked }),
|
|
2329
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Default" })
|
|
2330
|
-
] }),
|
|
2331
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2332
|
-
/* @__PURE__ */ jsxRuntime.jsx(Switch, { checked: true }),
|
|
2333
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Checked" })
|
|
2334
|
-
] }),
|
|
2335
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2336
|
-
/* @__PURE__ */ jsxRuntime.jsx(Switch, { disabled: true }),
|
|
2337
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Disabled" })
|
|
2338
|
-
] }),
|
|
2339
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2340
|
-
/* @__PURE__ */ jsxRuntime.jsx(Switch, { size: "sm" }),
|
|
2341
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Small" })
|
|
2342
|
-
] }),
|
|
2343
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2344
|
-
/* @__PURE__ */ jsxRuntime.jsx(Switch, { size: "lg" }),
|
|
2345
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Large" })
|
|
2346
|
-
] })
|
|
2347
|
-
] });
|
|
2348
|
-
}
|
|
2349
|
-
function ShowcaseCheckboxDemo() {
|
|
2350
|
-
const [checked, setChecked] = React11__namespace.useState(false);
|
|
2351
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2352
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2353
|
-
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked, onChange: () => setChecked(!checked) }),
|
|
2354
|
-
" ",
|
|
2355
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Default" })
|
|
2356
|
-
] }),
|
|
2357
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2358
|
-
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: true }),
|
|
2359
|
-
" ",
|
|
2360
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Checked" })
|
|
2361
|
-
] }),
|
|
2362
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2363
|
-
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { disabled: true }),
|
|
2364
|
-
" ",
|
|
2365
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Disabled" })
|
|
2366
|
-
] }),
|
|
2367
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2368
|
-
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { size: "sm" }),
|
|
2369
|
-
" ",
|
|
2370
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Small" })
|
|
2371
|
-
] }),
|
|
2372
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
|
|
2373
|
-
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { size: "lg" }),
|
|
2374
|
-
" ",
|
|
2375
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Large" })
|
|
2376
|
-
] })
|
|
2377
|
-
] });
|
|
2378
|
-
}
|
|
2379
|
-
function ShowcaseCardDemo() {
|
|
2380
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
2381
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
2382
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Default Card" }) }),
|
|
2383
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600", children: "This is a default card with standard styling." }) })
|
|
2384
|
-
] }),
|
|
2385
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Card, { variant: "elevated", children: [
|
|
2386
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Elevated Card" }) }),
|
|
2387
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600", children: "This card has elevated shadow styling." }) })
|
|
2388
|
-
] })
|
|
2389
|
-
] });
|
|
2390
|
-
}
|
|
2391
|
-
function ShowcaseBadgeDemo() {
|
|
2392
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
2393
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { children: "Default" }),
|
|
2394
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "secondary", children: "Secondary" }),
|
|
2395
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "success", children: "Success" }),
|
|
2396
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "danger", children: "Danger" }),
|
|
2397
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "warning", children: "Warning" }),
|
|
2398
|
-
/* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", children: "Outline" })
|
|
2399
|
-
] });
|
|
2400
|
-
}
|
|
2401
|
-
function ShowcaseAvatarDemo() {
|
|
2402
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
2403
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { children: [
|
|
2404
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: "https://randomuser.me/api/portraits/men/32.jpg" }),
|
|
2405
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: "AB" })
|
|
2406
|
-
] }),
|
|
2407
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { children: [
|
|
2408
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: "" }),
|
|
2409
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: "CD" })
|
|
2410
|
-
] }),
|
|
2411
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { children: [
|
|
2412
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: "https://randomuser.me/api/portraits/women/44.jpg" }),
|
|
2413
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: "EF" })
|
|
2414
|
-
] })
|
|
2415
|
-
] });
|
|
2416
|
-
}
|
|
2417
|
-
function ShowcaseModalDemo() {
|
|
2418
|
-
const [open, setOpen] = React11__namespace.useState(false);
|
|
2419
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2420
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => setOpen(true), children: "Show Modal" }),
|
|
2421
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Modal, { open, onOpenChange: setOpen, children: [
|
|
2422
|
-
/* @__PURE__ */ jsxRuntime.jsx(ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(ModalTitle, { children: "Demo Modal" }) }),
|
|
2423
|
-
/* @__PURE__ */ jsxRuntime.jsx(ModalContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "This is a basic modal dialog." }) }),
|
|
2424
|
-
/* @__PURE__ */ jsxRuntime.jsx(ModalFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", onClick: () => setOpen(false), children: "Close" }) })
|
|
2425
|
-
] })
|
|
2426
|
-
] });
|
|
2427
|
-
}
|
|
2428
|
-
function ShowcaseToastDemo() {
|
|
2429
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2430
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: () => showToast.success("This is a toast notification!"), children: "Show Toast" }),
|
|
2431
|
-
/* @__PURE__ */ jsxRuntime.jsx(Toast, {})
|
|
2432
|
-
] });
|
|
2433
|
-
}
|
|
2434
|
-
function ShowcaseSpinnerDemo() {
|
|
2435
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2436
|
-
/* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
|
|
2437
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
2438
|
-
/* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
|
|
2439
|
-
" ",
|
|
2440
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Loading data..." })
|
|
2441
|
-
] }),
|
|
2442
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "primary", disabled: true, children: [
|
|
2443
|
-
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: "mr-2 h-4 w-4" }),
|
|
2444
|
-
" Processing"
|
|
2445
|
-
] })
|
|
2446
|
-
] });
|
|
2447
|
-
}
|
|
2448
|
-
var showcasePreviewMap = {
|
|
2449
|
-
button: ShowcaseButtonDemo,
|
|
2450
|
-
input: ShowcaseInputDemo,
|
|
2451
|
-
textarea: ShowcaseTextareaDemo,
|
|
2452
|
-
checkbox: ShowcaseCheckboxDemo,
|
|
2453
|
-
switch: ShowcaseSwitchDemo,
|
|
2454
|
-
card: ShowcaseCardDemo,
|
|
2455
|
-
badge: ShowcaseBadgeDemo,
|
|
2456
|
-
avatar: ShowcaseAvatarDemo,
|
|
2457
|
-
alert: ShowcaseAlertDemo,
|
|
2458
|
-
statscard: ShowcaseStatsCardDemo,
|
|
2459
|
-
tabs: ShowcaseTabsDemo,
|
|
2460
|
-
modal: ShowcaseModalDemo,
|
|
2461
|
-
toast: ShowcaseToastDemo,
|
|
2462
|
-
spinner: ShowcaseSpinnerDemo,
|
|
2463
|
-
skeleton: function ShowcaseSkeletonDemo() {
|
|
2464
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 max-w-md", children: [
|
|
2465
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-1/2" }),
|
|
2466
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-3/4" }),
|
|
2467
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
2468
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-8 rounded-full" }),
|
|
2469
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-32" })
|
|
2470
|
-
] }),
|
|
2471
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-24 w-full" })
|
|
2472
|
-
] });
|
|
2473
|
-
},
|
|
2474
|
-
navbar: function ShowcaseNavbarDemo() {
|
|
2475
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Navbar, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between px-4", children: [
|
|
2476
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-lg", children: "Beyond UI" }),
|
|
2477
|
-
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex gap-4 ml-auto", children: [
|
|
2478
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "text-blue-500", children: "Home" }),
|
|
2479
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "text-blue-500", children: "Features" }),
|
|
2480
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "text-blue-500", children: "Pricing" })
|
|
2481
|
-
] }),
|
|
2482
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-6", children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: "rounded bg-primary-600 text-white px-3 py-1 text-sm", children: "Profile" }) })
|
|
2483
|
-
] }) });
|
|
2484
|
-
},
|
|
2485
|
-
sidebar: function ShowcaseSidebarDemo() {
|
|
2486
|
-
const menuItems = [
|
|
2487
|
-
{ id: "dashboard", label: "Dashboard", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-5 w-5" }) },
|
|
2488
|
-
{ id: "settings", label: "Settings", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-5 w-5" }) },
|
|
2489
|
-
{ id: "profile", label: "Profile", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-5 w-5" }) }
|
|
2490
|
-
];
|
|
2491
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[260px] h-[480px] bg-white border rounded overflow-auto flex items-stretch", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2492
|
-
Sidebar,
|
|
2493
|
-
{
|
|
2494
|
-
menuItems,
|
|
2495
|
-
className: "static relative w-full h-full border-none shadow-none"
|
|
2496
|
-
}
|
|
2497
|
-
) });
|
|
2498
|
-
},
|
|
2499
|
-
"dashboard-grid": function ShowcaseDashboardGridDemo() {
|
|
2500
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DashboardGrid, { children: [
|
|
2501
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 1" }),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 2" }),
|
|
2503
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 3" }),
|
|
2504
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 4" })
|
|
2505
|
-
] });
|
|
2506
|
-
},
|
|
2507
|
-
"dashboard-header": function ShowcaseDashboardHeaderDemo() {
|
|
2508
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center py-4 border-b", children: [
|
|
2509
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2510
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold", children: "Dashboard" }),
|
|
2511
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 text-sm", children: "Insights & analytics" })
|
|
2512
|
-
] }),
|
|
2513
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", children: "Settings" })
|
|
2514
|
-
] });
|
|
2515
|
-
},
|
|
2516
|
-
"dashboard-layout": function ShowcaseDashboardLayoutDemo() {
|
|
2517
|
-
const sidebarMenuItems = [
|
|
2518
|
-
{ id: "dashboard", label: "Dashboard", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-4 w-4" }) },
|
|
2519
|
-
{ id: "users", label: "Users", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "h-4 w-4" }) },
|
|
2520
|
-
{ id: "settings", label: "Settings", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4" }) }
|
|
2521
|
-
];
|
|
2522
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[600px] h-[480px] bg-white border rounded overflow-auto flex items-stretch", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2523
|
-
DashboardLayout,
|
|
2524
|
-
{
|
|
2525
|
-
sidebarMenuItems,
|
|
2526
|
-
className: "relative w-full min-h-0 h-full",
|
|
2527
|
-
sidebarClassName: "static relative w-full h-full border-none shadow-none",
|
|
2528
|
-
disableSidebarMargin: true,
|
|
2529
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 h-full", children: [
|
|
2530
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold mb-2", children: "Welcome to DashboardLayout" }),
|
|
2531
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4 text-gray-600", children: "Main content appears here. The sidebar and header are real reusable components." }),
|
|
2532
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", children: "Dashboard Action" })
|
|
2533
|
-
] })
|
|
2534
|
-
}
|
|
2535
|
-
) });
|
|
2536
|
-
},
|
|
2537
|
-
datatable: DataTableShowcase
|
|
2538
|
-
};
|
|
2539
|
-
function ShowcaseAlertDemo() {
|
|
2540
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2541
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "info", children: [
|
|
2542
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Information" }),
|
|
2543
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "This is an informational alert message." })
|
|
2544
|
-
] }),
|
|
2545
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "success", children: [
|
|
2546
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Success" }),
|
|
2547
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Operation completed successfully!" })
|
|
2548
|
-
] }),
|
|
2549
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "warning", children: [
|
|
2550
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Warning" }),
|
|
2551
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Please review your input before proceeding." })
|
|
2552
|
-
] }),
|
|
2553
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "danger", children: [
|
|
2554
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Error" }),
|
|
2555
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Something went wrong. Please try again." })
|
|
2556
|
-
] })
|
|
2557
|
-
] });
|
|
2558
|
-
}
|
|
2559
|
-
function ShowcaseStatsCardDemo() {
|
|
2560
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
2561
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2562
|
-
StatsCard,
|
|
2563
|
-
{
|
|
2564
|
-
title: "Total Users",
|
|
2565
|
-
value: "2,543",
|
|
2566
|
-
trend: {
|
|
2567
|
-
direction: "up",
|
|
2568
|
-
value: "+12%",
|
|
2569
|
-
label: "from last month"
|
|
2570
|
-
},
|
|
2571
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-6 w-6 text-primary-600" })
|
|
2572
|
-
}
|
|
2573
|
-
),
|
|
2574
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2575
|
-
StatsCard,
|
|
2576
|
-
{
|
|
2577
|
-
variant: "gradient",
|
|
2578
|
-
color: "success",
|
|
2579
|
-
title: "Revenue",
|
|
2580
|
-
value: "$45,231",
|
|
2581
|
-
trend: {
|
|
2582
|
-
direction: "up",
|
|
2583
|
-
value: "+8.2%",
|
|
2584
|
-
label: "from last month"
|
|
2585
|
-
},
|
|
2586
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-6 w-6" })
|
|
2587
|
-
}
|
|
2588
|
-
)
|
|
2589
|
-
] });
|
|
2590
|
-
}
|
|
2591
|
-
function ShowcaseTabsDemo() {
|
|
2592
|
-
const [activeTab, setActiveTab] = React11__namespace.useState("tab-1");
|
|
2593
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { value: activeTab, onValueChange: setActiveTab, children: [
|
|
2594
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { children: [
|
|
2595
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "tab-1", children: "Tab One" }),
|
|
2596
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "tab-2", children: "Tab Two" }),
|
|
2597
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "tab-3", children: "Tab Three" })
|
|
2598
|
-
] }),
|
|
2599
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "tab-1", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block p-4", children: "Content for Tab One" }) }),
|
|
2600
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "tab-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block p-4", children: "Content for Tab Two" }) }),
|
|
2601
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "tab-3", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block p-4", children: "Content for Tab Three" }) })
|
|
2602
|
-
] });
|
|
2603
|
-
}
|
|
2604
|
-
Object.assign(showcasePreviewMap, {
|
|
2605
|
-
alert: ShowcaseAlertDemo,
|
|
2606
|
-
statscard: ShowcaseStatsCardDemo,
|
|
2607
|
-
tabs: ShowcaseTabsDemo
|
|
2608
|
-
});
|
|
2609
|
-
var componentCategories = {
|
|
2610
|
-
"Forms": {
|
|
2611
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MousePointer, { className: "h-4 w-4" }),
|
|
2612
|
-
components: [
|
|
2613
|
-
{ name: "Button", id: "button" },
|
|
2614
|
-
{ name: "Input", id: "input" },
|
|
2615
|
-
{ name: "Textarea", id: "textarea" },
|
|
2616
|
-
{ name: "Checkbox", id: "checkbox" },
|
|
2617
|
-
{ name: "Switch", id: "switch" }
|
|
2618
|
-
]
|
|
2619
|
-
},
|
|
2620
|
-
"Data Display": {
|
|
2621
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-4 w-4" }),
|
|
2622
|
-
components: [
|
|
2623
|
-
{ name: "Card", id: "card" },
|
|
2624
|
-
{ name: "Badge", id: "badge" },
|
|
2625
|
-
{ name: "Avatar", id: "avatar" },
|
|
2626
|
-
{ name: "StatsCard", id: "statscard" },
|
|
2627
|
-
{ name: "Tabs", id: "tabs" },
|
|
2628
|
-
{ name: "DataTable", id: "datatable" }
|
|
2629
|
-
]
|
|
2630
|
-
},
|
|
2631
|
-
"Feedback": {
|
|
2632
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4" }),
|
|
2633
|
-
components: [
|
|
2634
|
-
{ name: "Alert", id: "alert" },
|
|
2635
|
-
{ name: "Toast", id: "toast" },
|
|
2636
|
-
{ name: "Modal", id: "modal" },
|
|
2637
|
-
{ name: "Spinner", id: "spinner" },
|
|
2638
|
-
{ name: "Skeleton", id: "skeleton" }
|
|
2639
|
-
]
|
|
2640
|
-
},
|
|
2641
|
-
"Layout": {
|
|
2642
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Layout, { className: "h-4 w-4" }),
|
|
2643
|
-
components: [
|
|
2644
|
-
{ name: "DashboardLayout", id: "dashboard-layout" },
|
|
2645
|
-
{ name: "DashboardGrid", id: "dashboard-grid" },
|
|
2646
|
-
{ name: "Sidebar", id: "sidebar" },
|
|
2647
|
-
{ name: "Navbar", id: "navbar" },
|
|
2648
|
-
{ name: "DataTable", id: "datatable" }
|
|
2649
|
-
]
|
|
2650
|
-
}
|
|
2651
|
-
};
|
|
2652
|
-
var componentDocs = {
|
|
2653
|
-
button: {
|
|
2654
|
-
name: "Button",
|
|
2655
|
-
description: "A versatile button component with multiple variants and sizes.",
|
|
2656
|
-
example: `<Button variant="primary" size="md">
|
|
2657
|
-
Click me
|
|
2658
|
-
</Button>`,
|
|
2659
|
-
props: [
|
|
2660
|
-
{ name: "variant", type: "string", default: "primary", description: "Button style variant" },
|
|
2661
|
-
{ name: "size", type: "string", default: "md", description: "Button size" },
|
|
2662
|
-
{ name: "disabled", type: "boolean", default: "false", description: "Disable the button" }
|
|
2663
|
-
],
|
|
2664
|
-
component: null
|
|
2665
|
-
},
|
|
2666
|
-
input: {
|
|
2667
|
-
name: "Input",
|
|
2668
|
-
description: "A flexible input component with validation states and different sizes.",
|
|
2669
|
-
example: `<Input
|
|
2670
|
-
placeholder="Enter your email"
|
|
2671
|
-
variant="default"
|
|
2672
|
-
inputSize="md"
|
|
2673
|
-
/>`,
|
|
2674
|
-
props: [
|
|
2675
|
-
{ name: "variant", type: "string", default: "default", description: "Input validation state" },
|
|
2676
|
-
{ name: "inputSize", type: "string", default: "md", description: "Input size" },
|
|
2677
|
-
{ name: "placeholder", type: "string", default: "", description: "Placeholder text" }
|
|
2678
|
-
],
|
|
2679
|
-
component: null
|
|
2680
|
-
},
|
|
2681
|
-
checkbox: {
|
|
2682
|
-
name: "Checkbox",
|
|
2683
|
-
description: "A standard checkbox component for forms. Supports checked, unchecked, disabled, and size variants.",
|
|
2684
|
-
example: `<Checkbox checked={true} onChange={() => {}} />`,
|
|
2685
|
-
props: [
|
|
2686
|
-
{ name: "checked", type: "boolean", default: "false", description: "Whether the checkbox is checked" },
|
|
2687
|
-
{ name: "onChange", type: "(event) => void", description: "Callback when checkbox changes" },
|
|
2688
|
-
{ name: "disabled", type: "boolean", default: "false", description: "Disable the checkbox" },
|
|
2689
|
-
{ name: "size", type: `"sm" | "md" | "lg"`, default: "md", description: "Size of the checkbox" }
|
|
2690
|
-
],
|
|
2691
|
-
component: showcasePreviewMap["checkbox"]
|
|
2692
|
-
},
|
|
2693
|
-
switch: {
|
|
2694
|
-
name: "Switch",
|
|
2695
|
-
description: "A toggle switch component for representing boolean states. Supports size variants and disabled state.",
|
|
2696
|
-
example: `<Switch checked={true} onCheckedChange={() => {}} />`,
|
|
2697
|
-
props: [
|
|
2698
|
-
{ name: "checked", type: "boolean", default: "false", description: "Whether the switch is on" },
|
|
2699
|
-
{ name: "onCheckedChange", type: "(checked: boolean) => void", description: "Callback when switch state changes" },
|
|
2700
|
-
{ name: "disabled", type: "boolean", default: "false", description: "Disable the switch" },
|
|
2701
|
-
{ name: "size", type: `"sm" | "md" | "lg"`, default: "md", description: "Size of the switch" }
|
|
2702
|
-
],
|
|
2703
|
-
component: showcasePreviewMap["switch"]
|
|
2704
|
-
},
|
|
2705
|
-
textarea: {
|
|
2706
|
-
name: "Textarea",
|
|
2707
|
-
description: "A multi-line input control suitable for entering longer blocks of text. Supports success/error states and various sizes.",
|
|
2708
|
-
example: `<Textarea placeholder="Enter your message..." variant="default" />`,
|
|
2709
|
-
props: [
|
|
2710
|
-
{ name: "variant", type: "string", default: "default", description: "Textarea validation state" },
|
|
2711
|
-
{ name: "rows", type: "number", default: "3", description: "Number of visible text lines" },
|
|
2712
|
-
{ name: "disabled", type: "boolean", default: "false", description: "Disabled state" },
|
|
2713
|
-
{ name: "placeholder", type: "string", default: "", description: "Placeholder text" }
|
|
2714
|
-
],
|
|
2715
|
-
component: showcasePreviewMap["textarea"]
|
|
2716
|
-
},
|
|
2717
|
-
card: {
|
|
2718
|
-
name: "Card",
|
|
2719
|
-
description: "A flexible container component for grouping related content.",
|
|
2720
|
-
example: `<Card>
|
|
2721
|
-
<CardHeader>
|
|
2722
|
-
<CardTitle>Card Title</CardTitle>
|
|
2723
|
-
</CardHeader>
|
|
2724
|
-
<CardContent>
|
|
2725
|
-
Card content goes here.
|
|
2726
|
-
</CardContent>
|
|
2727
|
-
</Card>`,
|
|
2728
|
-
props: [
|
|
2729
|
-
{ name: "variant", type: "string", default: "default", description: "Card style variant" },
|
|
2730
|
-
{ name: "padding", type: "string", default: "md", description: "Card padding size" }
|
|
2731
|
-
],
|
|
2732
|
-
component: null
|
|
2733
|
-
},
|
|
2734
|
-
avatar: {
|
|
2735
|
-
name: "Avatar",
|
|
2736
|
-
description: "Displays a user's profile image or initials, with customizable size and fallback.",
|
|
2737
|
-
example: '<Avatar size="sm"><AvatarImage src="https://randomuser.me/api/portraits/men/32.jpg" alt="User"/><AvatarFallback>AB</AvatarFallback></Avatar>',
|
|
2738
|
-
props: [
|
|
2739
|
-
{ name: "size", type: '"sm" | "md" | "lg"', default: "md", description: "Avatar size" },
|
|
2740
|
-
{ name: "children", type: "ReactNode", required: true, description: "Avatar image and fallback" }
|
|
2741
|
-
],
|
|
2742
|
-
component: showcasePreviewMap["avatar"]
|
|
2743
|
-
},
|
|
2744
|
-
badge: {
|
|
2745
|
-
name: "Badge",
|
|
2746
|
-
description: "A small, customizable tag for displaying statuses or labels.",
|
|
2747
|
-
example: `<Badge variant="default">Default</Badge>`,
|
|
2748
|
-
props: [
|
|
2749
|
-
{ name: "variant", type: `"default" | "secondary" | "success" | "danger" | "warning" | "outline"`, default: "default", description: "Badge color or style variant" },
|
|
2750
|
-
{ name: "children", type: "ReactNode", required: true, description: "Badge label content" }
|
|
2751
|
-
],
|
|
2752
|
-
component: showcasePreviewMap["badge"]
|
|
2753
|
-
},
|
|
2754
|
-
tabs: {
|
|
2755
|
-
name: "Tabs",
|
|
2756
|
-
description: "A flexible tabbed navigation component. Allows users to switch between views.",
|
|
2757
|
-
example: `<Tabs value="tab-1" onValueChange={() => {}}>
|
|
2758
|
-
<TabsList>
|
|
2759
|
-
<TabsTrigger value="tab-1">Tab 1</TabsTrigger>
|
|
2760
|
-
<TabsTrigger value="tab-2">Tab 2</TabsTrigger>
|
|
2761
|
-
</TabsList>
|
|
2762
|
-
<TabsContent value="tab-1">Content 1</TabsContent>
|
|
2763
|
-
<TabsContent value="tab-2">Content 2</TabsContent>
|
|
2764
|
-
</Tabs>`,
|
|
2765
|
-
props: [
|
|
2766
|
-
{ name: "value", type: "string", required: true, description: "The value of the currently selected tab" },
|
|
2767
|
-
{ name: "onValueChange", type: "(value: string) => void", description: "Called when a different tab is selected" },
|
|
2768
|
-
{ name: "children", type: "ReactNode", required: true, description: "Tab triggers and contents" }
|
|
2769
|
-
],
|
|
2770
|
-
component: showcasePreviewMap["tabs"]
|
|
2771
|
-
},
|
|
2772
|
-
toast: {
|
|
2773
|
-
name: "Toast",
|
|
2774
|
-
description: "A notification/toast component to display feedback messages over the UI.",
|
|
2775
|
-
example: `<Button onClick={() => showToast.success("Saved successfully!")}>Show Toast</Button>
|
|
2776
|
-
<Toast />`,
|
|
2777
|
-
props: [
|
|
2778
|
-
{ name: "children", type: "ReactNode", description: "Toast content (commonly used internally)" }
|
|
2779
|
-
],
|
|
2780
|
-
component: showcasePreviewMap["toast"]
|
|
2781
|
-
},
|
|
2782
|
-
modal: {
|
|
2783
|
-
name: "Modal",
|
|
2784
|
-
description: "A dialog/modal overlay component for displaying actions, forms, or confirmation content.",
|
|
2785
|
-
example: `<Modal open={open} onOpenChange={setOpen}>
|
|
2786
|
-
<ModalHeader>Modal Title</ModalHeader>
|
|
2787
|
-
<ModalContent>Modal body</ModalContent>
|
|
2788
|
-
<ModalFooter>
|
|
2789
|
-
<Button onClick={() => setOpen(false)}>Close</Button>
|
|
2790
|
-
</ModalFooter>
|
|
2791
|
-
</Modal>`,
|
|
2792
|
-
props: [
|
|
2793
|
-
{ name: "open", type: "boolean", required: true, description: "Whether the modal is open" },
|
|
2794
|
-
{ name: "onOpenChange", type: "(open: boolean) => void", required: true, description: "Called with new open state when modal is toggled" },
|
|
2795
|
-
{ name: "children", type: "ReactNode", required: true, description: "Content of the modal dialog" }
|
|
2796
|
-
],
|
|
2797
|
-
component: showcasePreviewMap["modal"]
|
|
2798
|
-
},
|
|
2799
|
-
spinner: {
|
|
2800
|
-
name: "Spinner",
|
|
2801
|
-
description: "A loading spinner to indicate ongoing processing or loading state.",
|
|
2802
|
-
example: `<Spinner size="md" />`,
|
|
2803
|
-
props: [
|
|
2804
|
-
{ name: "size", type: `"sm" | "md" | "lg"`, default: "md", description: "Spinner size" },
|
|
2805
|
-
{ name: "color", type: "string", default: "primary", description: "Spinner color (optional)" },
|
|
2806
|
-
{ name: "className", type: "string", description: "Custom CSS class for the spinner" }
|
|
2807
|
-
],
|
|
2808
|
-
component: showcasePreviewMap["spinner"]
|
|
2809
|
-
},
|
|
2810
|
-
skeleton: {
|
|
2811
|
-
name: "Skeleton",
|
|
2812
|
-
description: "A placeholder skeleton component for loading states. Use to display a placeholder UI while content loads.",
|
|
2813
|
-
example: `<Skeleton className="h-6 w-32" />`,
|
|
2814
|
-
props: [
|
|
2815
|
-
{ name: "className", type: "string", description: "Custom class for size and style" }
|
|
2816
|
-
],
|
|
2817
|
-
component: showcasePreviewMap["skeleton"]
|
|
2818
|
-
},
|
|
2819
|
-
alert: {
|
|
2820
|
-
name: "Alert",
|
|
2821
|
-
description: "Display important messages and notifications to users.",
|
|
2822
|
-
example: `<Alert variant="info">
|
|
2823
|
-
<AlertTitle>Information</AlertTitle>
|
|
2824
|
-
<AlertDescription>
|
|
2825
|
-
This is an informational alert.
|
|
2826
|
-
</AlertDescription>
|
|
2827
|
-
</Alert>`,
|
|
2828
|
-
props: [
|
|
2829
|
-
{ name: "variant", type: "string", default: "default", description: "Alert type variant" }
|
|
2830
|
-
],
|
|
2831
|
-
component: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
2832
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "info", children: [
|
|
2833
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Information" }),
|
|
2834
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "This is an informational alert message." })
|
|
2835
|
-
] }),
|
|
2836
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "success", children: [
|
|
2837
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Success" }),
|
|
2838
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Operation completed successfully!" })
|
|
2839
|
-
] }),
|
|
2840
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "warning", children: [
|
|
2841
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Warning" }),
|
|
2842
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Please review your input before proceeding." })
|
|
2843
|
-
] }),
|
|
2844
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "danger", children: [
|
|
2845
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Error" }),
|
|
2846
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Something went wrong. Please try again." })
|
|
2847
|
-
] })
|
|
2848
|
-
] })
|
|
2849
|
-
},
|
|
2850
|
-
statscard: {
|
|
2851
|
-
name: "StatsCard",
|
|
2852
|
-
description: "Display key metrics and statistics with trend indicators.",
|
|
2853
|
-
example: `<StatsCard
|
|
2854
|
-
title="Total Users"
|
|
2855
|
-
value="2,543"
|
|
2856
|
-
trend={{
|
|
2857
|
-
direction: "up",
|
|
2858
|
-
value: "+12%",
|
|
2859
|
-
label: "from last month"
|
|
2860
|
-
}}
|
|
2861
|
-
icon={<Users className="h-6 w-6" />}
|
|
2862
|
-
/>`,
|
|
2863
|
-
props: [
|
|
2864
|
-
{ name: "title", type: "string", required: true, description: "Card title" },
|
|
2865
|
-
{ name: "value", type: "string | number", required: true, description: "Main value to display" },
|
|
2866
|
-
{ name: "trend", type: "object", description: "Trend information" },
|
|
2867
|
-
{ name: "icon", type: "ReactNode", description: "Icon to display" }
|
|
2868
|
-
],
|
|
2869
|
-
component: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
2870
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2871
|
-
StatsCard,
|
|
2872
|
-
{
|
|
2873
|
-
title: "Total Users",
|
|
2874
|
-
value: "2,543",
|
|
2875
|
-
trend: {
|
|
2876
|
-
direction: "up",
|
|
2877
|
-
value: "+12%",
|
|
2878
|
-
label: "from last month"
|
|
2879
|
-
},
|
|
2880
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-6 w-6 text-primary-600" })
|
|
2881
|
-
}
|
|
2882
|
-
),
|
|
2883
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2884
|
-
StatsCard,
|
|
2885
|
-
{
|
|
2886
|
-
variant: "gradient",
|
|
2887
|
-
color: "success",
|
|
2888
|
-
title: "Revenue",
|
|
2889
|
-
value: "$45,231",
|
|
2890
|
-
trend: {
|
|
2891
|
-
direction: "up",
|
|
2892
|
-
value: "+8.2%",
|
|
2893
|
-
label: "from last month"
|
|
2894
|
-
},
|
|
2895
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "h-6 w-6" })
|
|
2896
|
-
}
|
|
2897
|
-
)
|
|
2898
|
-
] })
|
|
2899
|
-
},
|
|
2900
|
-
"dashboard-layout": {
|
|
2901
|
-
name: "DashboardLayout",
|
|
2902
|
-
description: "Layout component for admin dashboards and analytics panels. Useful for wrapping dashboard structure with sidebars and content.",
|
|
2903
|
-
example: `<DashboardLayout>
|
|
2904
|
-
<Sidebar />
|
|
2905
|
-
<main>
|
|
2906
|
-
Dashboard content here
|
|
2907
|
-
</main>
|
|
2908
|
-
</DashboardLayout>`,
|
|
2909
|
-
props: [
|
|
2910
|
-
{ name: "children", type: "ReactNode", required: true, description: "Dashboard page content" }
|
|
2911
|
-
],
|
|
2912
|
-
component: showcasePreviewMap["dashboard-layout"]
|
|
2913
|
-
},
|
|
2914
|
-
datatable: {
|
|
2915
|
-
name: "DataTable",
|
|
2916
|
-
description: "A comprehensive table component with filtering, sorting, pagination, and row selection capabilities.",
|
|
2917
|
-
example: `<DataTable
|
|
2918
|
-
columns={columns}
|
|
2919
|
-
dataSource={data}
|
|
2920
|
-
rowKey="id"
|
|
2921
|
-
pagination={{
|
|
2922
|
-
current: 1,
|
|
2923
|
-
pageSize: 10,
|
|
2924
|
-
total: data.length,
|
|
2925
|
-
}}
|
|
2926
|
-
rowSelection={{
|
|
2927
|
-
type: 'checkbox',
|
|
2928
|
-
onChange: (keys, rows) => console.log('Selected:', keys, rows),
|
|
2929
|
-
}}
|
|
2930
|
-
/>`,
|
|
2931
|
-
props: [
|
|
2932
|
-
{ name: "columns", type: "Column[]", required: true, description: "Table column configuration" },
|
|
2933
|
-
{ name: "dataSource", type: "T[]", required: true, description: "Data to display in the table" },
|
|
2934
|
-
{ name: "rowKey", type: "string | function", default: "id", description: "Unique key for each row" },
|
|
2935
|
-
{ name: "pagination", type: "PaginationConfig | false", description: "Pagination configuration" },
|
|
2936
|
-
{ name: "rowSelection", type: "RowSelection", description: "Row selection configuration" },
|
|
2937
|
-
{ name: "loading", type: "boolean", default: "false", description: "Loading state" },
|
|
2938
|
-
{ name: "size", type: `"small" | "middle" | "large"`, default: "middle", description: "Table size" },
|
|
2939
|
-
{ name: "bordered", type: "boolean", default: "false", description: "Show borders" }
|
|
2940
|
-
],
|
|
2941
|
-
component: /* @__PURE__ */ jsxRuntime.jsx(DataTableShowcase, {})
|
|
2942
|
-
},
|
|
2943
|
-
"dashboard-grid": {
|
|
2944
|
-
name: "DashboardGrid",
|
|
2945
|
-
description: "Grid container for dashboard widgets.",
|
|
2946
|
-
example: `<DashboardGrid>
|
|
2947
|
-
<Widget />
|
|
2948
|
-
<Widget />
|
|
2949
|
-
</DashboardGrid>`,
|
|
2950
|
-
props: [
|
|
2951
|
-
{ name: "children", type: "ReactNode", required: true, description: "Widgets to show in the grid" }
|
|
2952
|
-
],
|
|
2953
|
-
component: showcasePreviewMap["dashboard-grid"]
|
|
2954
|
-
},
|
|
2955
|
-
"sidebar": {
|
|
2956
|
-
name: "Sidebar",
|
|
2957
|
-
description: "Navigation sidebar for layouts. Supports menu items and responsive display.",
|
|
2958
|
-
example: `<Sidebar menuItems={menuItems} />`,
|
|
2959
|
-
props: [
|
|
2960
|
-
{ name: "menuItems", type: "Array", required: true, description: "Sidebar navigation items" }
|
|
2961
|
-
],
|
|
2962
|
-
component: showcasePreviewMap["sidebar"]
|
|
2963
|
-
},
|
|
2964
|
-
"navbar": {
|
|
2965
|
-
name: "Navbar",
|
|
2966
|
-
description: "Navigation bar for app layout. Add links, branding, user actions etc.",
|
|
2967
|
-
example: `<Navbar>
|
|
2968
|
-
<NavbarBrand>My App</NavbarBrand>
|
|
2969
|
-
<NavbarLinks>
|
|
2970
|
-
<a href="#">Home</a>
|
|
2971
|
-
<a href="#">About</a>
|
|
2972
|
-
</NavbarLinks>
|
|
2973
|
-
</Navbar>`,
|
|
2974
|
-
props: [
|
|
2975
|
-
{ name: "children", type: "ReactNode", required: true, description: "Navbar content (branding, links, actions)" }
|
|
2976
|
-
],
|
|
2977
|
-
component: showcasePreviewMap["navbar"]
|
|
2978
|
-
}
|
|
2979
|
-
};
|
|
2980
|
-
var ComponentShowcase = ({ className }) => {
|
|
2981
|
-
const [selectedComponent, setSelectedComponent] = React11.useState("button");
|
|
2982
|
-
const [searchQuery, setSearchQuery] = React11.useState("");
|
|
2983
|
-
const [sidebarCollapsed, setSidebarCollapsed] = React11.useState(false);
|
|
2984
|
-
const [expandedCategories, setExpandedCategories] = React11.useState(["Forms"]);
|
|
2985
|
-
const [viewMode, setViewMode] = React11.useState("desktop");
|
|
2986
|
-
const [darkMode, setDarkMode] = React11.useState(false);
|
|
2987
|
-
const [copiedCode, setCopiedCode] = React11.useState(null);
|
|
2988
|
-
const toggleCategory = (category) => {
|
|
2989
|
-
setExpandedCategories(
|
|
2990
|
-
(prev) => prev.includes(category) ? prev.filter((c) => c !== category) : [...prev, category]
|
|
2991
|
-
);
|
|
2992
|
-
};
|
|
2993
|
-
const copyToClipboard = async (code) => {
|
|
2994
|
-
try {
|
|
2995
|
-
await navigator.clipboard.writeText(code);
|
|
2996
|
-
setCopiedCode(code);
|
|
2997
|
-
showToast.success("Code copied to clipboard!");
|
|
2998
|
-
setTimeout(() => setCopiedCode(null), 2e3);
|
|
2999
|
-
} catch (err) {
|
|
3000
|
-
showToast.error("Failed to copy code");
|
|
3001
|
-
}
|
|
3002
|
-
};
|
|
3003
|
-
const filteredCategories = Object.entries(componentCategories).reduce((acc, [categoryName, categoryData]) => {
|
|
3004
|
-
const filteredComponents = categoryData.components.filter(
|
|
3005
|
-
(component) => component.name.toLowerCase().includes(searchQuery.toLowerCase())
|
|
3006
|
-
);
|
|
3007
|
-
if (filteredComponents.length > 0) {
|
|
3008
|
-
acc[categoryName] = {
|
|
3009
|
-
...categoryData,
|
|
3010
|
-
components: filteredComponents
|
|
3011
|
-
};
|
|
3012
|
-
}
|
|
3013
|
-
return acc;
|
|
3014
|
-
}, {});
|
|
3015
|
-
const currentDoc = componentDocs[selectedComponent];
|
|
3016
|
-
const getViewportClass = () => {
|
|
3017
|
-
switch (viewMode) {
|
|
3018
|
-
case "tablet":
|
|
3019
|
-
return "max-w-2xl";
|
|
3020
|
-
case "mobile":
|
|
3021
|
-
return "max-w-sm";
|
|
3022
|
-
default:
|
|
3023
|
-
return "w-full";
|
|
3024
|
-
}
|
|
3025
|
-
};
|
|
3026
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-screen bg-gray-50", className), children: [
|
|
3027
|
-
/* @__PURE__ */ jsxRuntime.jsx(Toast, {}),
|
|
3028
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
3029
|
-
"bg-white border-r border-gray-200 transition-all duration-300 flex flex-col",
|
|
3030
|
-
sidebarCollapsed ? "w-16" : "w-80"
|
|
3031
|
-
), children: [
|
|
3032
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border-b border-gray-200", children: [
|
|
3033
|
-
!sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
3034
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3035
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Palette, { className: "h-4 w-4 text-white" }) }),
|
|
3036
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-lg text-gray-900", children: "Beyond UI" })
|
|
3037
|
-
] }),
|
|
3038
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3039
|
-
Button,
|
|
3040
|
-
{
|
|
3041
|
-
variant: "ghost",
|
|
3042
|
-
size: "sm",
|
|
3043
|
-
onClick: () => setSidebarCollapsed(true),
|
|
3044
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
3045
|
-
}
|
|
3046
|
-
)
|
|
3047
|
-
] }),
|
|
3048
|
-
sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3049
|
-
Button,
|
|
3050
|
-
{
|
|
3051
|
-
variant: "ghost",
|
|
3052
|
-
size: "sm",
|
|
3053
|
-
onClick: () => setSidebarCollapsed(false),
|
|
3054
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Palette, { className: "h-4 w-4" })
|
|
3055
|
-
}
|
|
3056
|
-
) }),
|
|
3057
|
-
!sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3058
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
3059
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3060
|
-
Input,
|
|
3061
|
-
{
|
|
3062
|
-
placeholder: "Search components...",
|
|
3063
|
-
value: searchQuery,
|
|
3064
|
-
onChange: (e) => setSearchQuery(e.target.value),
|
|
3065
|
-
className: "pl-10"
|
|
3066
|
-
}
|
|
3067
|
-
)
|
|
3068
|
-
] })
|
|
3069
|
-
] }),
|
|
3070
|
-
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 p-4 overflow-y-auto", children: Object.entries(filteredCategories).map(([categoryName, categoryData]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
3071
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3072
|
-
"button",
|
|
3073
|
-
{
|
|
3074
|
-
onClick: () => !sidebarCollapsed && toggleCategory(categoryName),
|
|
3075
|
-
className: cn(
|
|
3076
|
-
"flex items-center w-full p-2 text-sm font-medium rounded-lg transition-colors",
|
|
3077
|
-
"hover:bg-gray-100 text-gray-700",
|
|
3078
|
-
sidebarCollapsed ? "justify-center" : "justify-between"
|
|
3079
|
-
),
|
|
3080
|
-
children: [
|
|
3081
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3082
|
-
categoryData.icon,
|
|
3083
|
-
!sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsx("span", { children: categoryName })
|
|
3084
|
-
] }),
|
|
3085
|
-
!sidebarCollapsed && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: cn(
|
|
3086
|
-
"h-4 w-4 transition-transform",
|
|
3087
|
-
expandedCategories.includes(categoryName) && "rotate-180"
|
|
3088
|
-
) })
|
|
3089
|
-
]
|
|
3090
|
-
}
|
|
3091
|
-
),
|
|
3092
|
-
!sidebarCollapsed && expandedCategories.includes(categoryName) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 ml-6 space-y-1", children: categoryData.components.map((component) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3093
|
-
"button",
|
|
3094
|
-
{
|
|
3095
|
-
onClick: () => setSelectedComponent(component.id),
|
|
3096
|
-
className: cn(
|
|
3097
|
-
"flex items-center w-full p-2 text-sm rounded-lg transition-colors",
|
|
3098
|
-
selectedComponent === component.id ? "bg-primary-50 text-primary-700 border-r-2 border-primary-600" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900"
|
|
3099
|
-
),
|
|
3100
|
-
children: component.name
|
|
3101
|
-
},
|
|
3102
|
-
component.id
|
|
3103
|
-
)) })
|
|
3104
|
-
] }, categoryName)) })
|
|
3105
|
-
] }),
|
|
3106
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
|
|
3107
|
-
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "bg-white border-b border-gray-200 p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3108
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
3109
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold text-gray-900", children: currentDoc?.name || "Component Showcase" }),
|
|
3110
|
-
currentDoc && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", children: currentDoc.name })
|
|
3111
|
-
] }),
|
|
3112
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3113
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center bg-gray-100 rounded-lg p-1", children: [
|
|
3114
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3115
|
-
Button,
|
|
3116
|
-
{
|
|
3117
|
-
variant: viewMode === "desktop" ? "primary" : "ghost",
|
|
3118
|
-
size: "sm",
|
|
3119
|
-
onClick: () => setViewMode("desktop"),
|
|
3120
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Monitor, { className: "h-4 w-4" })
|
|
3121
|
-
}
|
|
3122
|
-
),
|
|
3123
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3124
|
-
Button,
|
|
3125
|
-
{
|
|
3126
|
-
variant: viewMode === "tablet" ? "primary" : "ghost",
|
|
3127
|
-
size: "sm",
|
|
3128
|
-
onClick: () => setViewMode("tablet"),
|
|
3129
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Tablet, { className: "h-4 w-4" })
|
|
3130
|
-
}
|
|
3131
|
-
),
|
|
3132
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3133
|
-
Button,
|
|
3134
|
-
{
|
|
3135
|
-
variant: viewMode === "mobile" ? "primary" : "ghost",
|
|
3136
|
-
size: "sm",
|
|
3137
|
-
onClick: () => setViewMode("mobile"),
|
|
3138
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Smartphone, { className: "h-4 w-4" })
|
|
3139
|
-
}
|
|
3140
|
-
)
|
|
3141
|
-
] }),
|
|
3142
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3143
|
-
Button,
|
|
3144
|
-
{
|
|
3145
|
-
variant: "ghost",
|
|
3146
|
-
size: "sm",
|
|
3147
|
-
onClick: () => setDarkMode(!darkMode),
|
|
3148
|
-
children: darkMode ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { className: "h-4 w-4" })
|
|
3149
|
-
}
|
|
3150
|
-
)
|
|
3151
|
-
] })
|
|
3152
|
-
] }) }),
|
|
3153
|
-
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 overflow-auto p-6", children: currentDoc ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [
|
|
3154
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-gray-600", children: currentDoc.description }) }),
|
|
3155
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Tabs, { value: "preview", onValueChange: () => {
|
|
3156
|
-
}, children: [
|
|
3157
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { children: [
|
|
3158
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsTrigger, { value: "preview", children: [
|
|
3159
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "h-4 w-4 mr-2" }),
|
|
3160
|
-
"Preview"
|
|
3161
|
-
] }),
|
|
3162
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsTrigger, { value: "code", children: [
|
|
3163
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Code, { className: "h-4 w-4 mr-2" }),
|
|
3164
|
-
"Code"
|
|
3165
|
-
] }),
|
|
3166
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TabsTrigger, { value: "props", children: [
|
|
3167
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "h-4 w-4 mr-2" }),
|
|
3168
|
-
"Props"
|
|
3169
|
-
] })
|
|
3170
|
-
] }),
|
|
3171
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "preview", className: "mt-6", children: /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "p-8", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mx-auto transition-all duration-300", getViewportClass()), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(darkMode && "dark"), children: showcasePreviewMap[selectedComponent] ? React11__namespace.createElement(showcasePreviewMap[selectedComponent]) : null }) }) }) }) }),
|
|
3172
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "code", className: "mt-6", children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
3173
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [
|
|
3174
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-lg", children: "Usage Example" }),
|
|
3175
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3176
|
-
Button,
|
|
3177
|
-
{
|
|
3178
|
-
variant: "outline",
|
|
3179
|
-
size: "sm",
|
|
3180
|
-
onClick: () => copyToClipboard(currentDoc.example),
|
|
3181
|
-
children: [
|
|
3182
|
-
copiedCode === currentDoc.example ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 mr-2" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-4 w-4 mr-2" }),
|
|
3183
|
-
"Copy"
|
|
3184
|
-
]
|
|
3185
|
-
}
|
|
3186
|
-
)
|
|
3187
|
-
] }),
|
|
3188
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: currentDoc.example }) }) })
|
|
3189
|
-
] }) }),
|
|
3190
|
-
/* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "props", className: "mt-6", children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
3191
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-lg", children: "Component Props" }) }),
|
|
3192
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse", children: [
|
|
3193
|
-
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-gray-200", children: [
|
|
3194
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Prop" }),
|
|
3195
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Type" }),
|
|
3196
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Default" }),
|
|
3197
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Description" })
|
|
3198
|
-
] }) }),
|
|
3199
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: currentDoc.props?.map((prop, index) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-gray-100", children: [
|
|
3200
|
-
/* @__PURE__ */ jsxRuntime.jsxs("td", { className: "p-3", children: [
|
|
3201
|
-
/* @__PURE__ */ jsxRuntime.jsx("code", { className: "bg-gray-100 px-2 py-1 rounded text-sm", children: prop.name }),
|
|
3202
|
-
"required" in prop && prop.required && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "danger", className: "ml-2 text-xs", children: "Required" })
|
|
3203
|
-
] }),
|
|
3204
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "p-3 text-gray-600", children: prop.type }),
|
|
3205
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "p-3 text-gray-600", children: "default" in prop && prop.default ? /* @__PURE__ */ jsxRuntime.jsx("code", { className: "bg-gray-100 px-2 py-1 rounded text-sm", children: prop.default }) : null }),
|
|
3206
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "p-3 text-gray-600", children: prop.description })
|
|
3207
|
-
] }, index)) })
|
|
3208
|
-
] }) }) })
|
|
3209
|
-
] }) })
|
|
3210
|
-
] })
|
|
3211
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
3212
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Book, { className: "h-16 w-16 text-gray-400 mx-auto mb-4" }),
|
|
3213
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold text-gray-900 mb-2", children: "Select a Component" }),
|
|
3214
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600", children: "Choose a component from the sidebar to view its documentation and examples." })
|
|
3215
|
-
] }) }) })
|
|
3216
|
-
] })
|
|
3217
|
-
] });
|
|
3218
|
-
};
|
|
3219
|
-
function useDarkMode() {
|
|
3220
|
-
const [isDarkMode, setIsDarkMode] = React11.useState(() => {
|
|
3221
|
-
if (typeof window !== "undefined") {
|
|
3222
|
-
const stored = localStorage.getItem("darkMode");
|
|
3223
|
-
if (stored) {
|
|
3224
|
-
return JSON.parse(stored);
|
|
3225
|
-
}
|
|
3226
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
3227
|
-
}
|
|
3228
|
-
return false;
|
|
3229
|
-
});
|
|
3230
|
-
React11.useEffect(() => {
|
|
3231
|
-
const root = window.document.documentElement;
|
|
3232
|
-
if (isDarkMode) {
|
|
3233
|
-
root.classList.add("dark");
|
|
3234
|
-
} else {
|
|
3235
|
-
root.classList.remove("dark");
|
|
3236
|
-
}
|
|
3237
|
-
localStorage.setItem("darkMode", JSON.stringify(isDarkMode));
|
|
3238
|
-
}, [isDarkMode]);
|
|
3239
|
-
const toggle = () => setIsDarkMode((prev) => !prev);
|
|
3240
|
-
return { isDarkMode, toggle };
|
|
3241
|
-
}
|
|
3242
|
-
function useDebounce(value, delay) {
|
|
3243
|
-
const [debouncedValue, setDebouncedValue] = React11.useState(value);
|
|
3244
|
-
React11.useEffect(() => {
|
|
3245
|
-
const handler = setTimeout(() => {
|
|
3246
|
-
setDebouncedValue(value);
|
|
3247
|
-
}, delay);
|
|
3248
|
-
return () => {
|
|
3249
|
-
clearTimeout(handler);
|
|
3250
|
-
};
|
|
3251
|
-
}, [value, delay]);
|
|
3252
|
-
return debouncedValue;
|
|
3253
|
-
}
|
|
3254
|
-
function useLocalStorage(key, initialValue) {
|
|
3255
|
-
const [storedValue, setStoredValue] = React11.useState(() => {
|
|
3256
|
-
if (typeof window === "undefined") {
|
|
3257
|
-
return initialValue;
|
|
3258
|
-
}
|
|
3259
|
-
try {
|
|
3260
|
-
const item = window.localStorage.getItem(key);
|
|
3261
|
-
return item ? JSON.parse(item) : initialValue;
|
|
3262
|
-
} catch (error) {
|
|
3263
|
-
console.error(`Error reading localStorage key "${key}":`, error);
|
|
3264
|
-
return initialValue;
|
|
3265
|
-
}
|
|
3266
|
-
});
|
|
3267
|
-
const setValue = React11.useCallback((value) => {
|
|
3268
|
-
try {
|
|
3269
|
-
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
3270
|
-
setStoredValue(valueToStore);
|
|
3271
|
-
if (typeof window !== "undefined") {
|
|
3272
|
-
window.localStorage.setItem(key, JSON.stringify(valueToStore));
|
|
3273
|
-
}
|
|
3274
|
-
} catch (error) {
|
|
3275
|
-
console.error(`Error setting localStorage key "${key}":`, error);
|
|
3276
|
-
}
|
|
3277
|
-
}, [key, storedValue]);
|
|
3278
|
-
const removeValue = React11.useCallback(() => {
|
|
3279
|
-
try {
|
|
3280
|
-
setStoredValue(initialValue);
|
|
3281
|
-
if (typeof window !== "undefined") {
|
|
3282
|
-
window.localStorage.removeItem(key);
|
|
3283
|
-
}
|
|
3284
|
-
} catch (error) {
|
|
3285
|
-
console.error(`Error removing localStorage key "${key}":`, error);
|
|
3286
|
-
}
|
|
3287
|
-
}, [key, initialValue]);
|
|
3288
|
-
return [storedValue, setValue, removeValue];
|
|
3289
|
-
}
|
|
3290
|
-
function useToggle(initialValue = false) {
|
|
3291
|
-
const [value, setValue] = React11.useState(initialValue);
|
|
3292
|
-
const toggle = React11.useCallback(() => setValue((prev) => !prev), []);
|
|
3293
|
-
const setToggle = React11.useCallback((newValue) => setValue(newValue), []);
|
|
3294
|
-
return [value, toggle, setToggle];
|
|
3295
|
-
}
|
|
3296
|
-
var breakpoints = {
|
|
3297
|
-
sm: 640,
|
|
3298
|
-
md: 768,
|
|
3299
|
-
lg: 1024,
|
|
3300
|
-
xl: 1280,
|
|
3301
|
-
"2xl": 1536
|
|
3302
|
-
};
|
|
3303
|
-
function useBreakpoint() {
|
|
3304
|
-
const [currentBreakpoint, setCurrentBreakpoint] = React11.useState("sm");
|
|
3305
|
-
React11.useEffect(() => {
|
|
3306
|
-
const checkBreakpoint = () => {
|
|
3307
|
-
const width = window.innerWidth;
|
|
3308
|
-
let breakpoint = "sm";
|
|
3309
|
-
if (width >= breakpoints["2xl"]) breakpoint = "2xl";
|
|
3310
|
-
else if (width >= breakpoints.xl) breakpoint = "xl";
|
|
3311
|
-
else if (width >= breakpoints.lg) breakpoint = "lg";
|
|
3312
|
-
else if (width >= breakpoints.md) breakpoint = "md";
|
|
3313
|
-
setCurrentBreakpoint(breakpoint);
|
|
3314
|
-
};
|
|
3315
|
-
checkBreakpoint();
|
|
3316
|
-
window.addEventListener("resize", checkBreakpoint);
|
|
3317
|
-
return () => window.removeEventListener("resize", checkBreakpoint);
|
|
3318
|
-
}, []);
|
|
3319
|
-
const isAbove = (breakpoint) => {
|
|
3320
|
-
return breakpoints[currentBreakpoint] >= breakpoints[breakpoint];
|
|
3321
|
-
};
|
|
3322
|
-
const isBelow = (breakpoint) => {
|
|
3323
|
-
return breakpoints[currentBreakpoint] < breakpoints[breakpoint];
|
|
3324
|
-
};
|
|
3325
|
-
return { currentBreakpoint, isAbove, isBelow };
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
// src/theme/default.ts
|
|
3329
|
-
var defaultTheme = {
|
|
3330
|
-
colors: {
|
|
3331
|
-
primary: {
|
|
3332
|
-
50: "#eff6ff",
|
|
3333
|
-
100: "#dbeafe",
|
|
3334
|
-
200: "#bfdbfe",
|
|
3335
|
-
300: "#93c5fd",
|
|
3336
|
-
400: "#60a5fa",
|
|
3337
|
-
500: "#3b82f6",
|
|
3338
|
-
600: "#2563eb",
|
|
3339
|
-
700: "#1d4ed8",
|
|
3340
|
-
800: "#1e40af",
|
|
3341
|
-
900: "#1e3a8a",
|
|
3342
|
-
950: "#172554"
|
|
3343
|
-
},
|
|
3344
|
-
secondary: {
|
|
3345
|
-
50: "#f8fafc",
|
|
3346
|
-
100: "#f1f5f9",
|
|
3347
|
-
200: "#e2e8f0",
|
|
3348
|
-
300: "#cbd5e1",
|
|
3349
|
-
400: "#94a3b8",
|
|
3350
|
-
500: "#64748b",
|
|
3351
|
-
600: "#475569",
|
|
3352
|
-
700: "#334155",
|
|
3353
|
-
800: "#1e293b",
|
|
3354
|
-
900: "#0f172a",
|
|
3355
|
-
950: "#020617"
|
|
3356
|
-
},
|
|
3357
|
-
danger: {
|
|
3358
|
-
50: "#fef2f2",
|
|
3359
|
-
100: "#fee2e2",
|
|
3360
|
-
200: "#fecaca",
|
|
3361
|
-
300: "#fca5a5",
|
|
3362
|
-
400: "#f87171",
|
|
3363
|
-
500: "#ef4444",
|
|
3364
|
-
600: "#dc2626",
|
|
3365
|
-
700: "#b91c1c",
|
|
3366
|
-
800: "#991b1b",
|
|
3367
|
-
900: "#7f1d1d",
|
|
3368
|
-
950: "#450a0a"
|
|
3369
|
-
},
|
|
3370
|
-
success: {
|
|
3371
|
-
50: "#f0fdf4",
|
|
3372
|
-
100: "#dcfce7",
|
|
3373
|
-
200: "#bbf7d0",
|
|
3374
|
-
300: "#86efac",
|
|
3375
|
-
400: "#4ade80",
|
|
3376
|
-
500: "#22c55e",
|
|
3377
|
-
600: "#16a34a",
|
|
3378
|
-
700: "#15803d",
|
|
3379
|
-
800: "#166534",
|
|
3380
|
-
900: "#14532d",
|
|
3381
|
-
950: "#052e16"
|
|
3382
|
-
},
|
|
3383
|
-
warning: {
|
|
3384
|
-
50: "#fffbeb",
|
|
3385
|
-
100: "#fef3c7",
|
|
3386
|
-
200: "#fde68a",
|
|
3387
|
-
300: "#fcd34d",
|
|
3388
|
-
400: "#fbbf24",
|
|
3389
|
-
500: "#f59e0b",
|
|
3390
|
-
600: "#d97706",
|
|
3391
|
-
700: "#b45309",
|
|
3392
|
-
800: "#92400e",
|
|
3393
|
-
900: "#78350f",
|
|
3394
|
-
950: "#451a03"
|
|
3395
|
-
}
|
|
3396
|
-
}
|
|
3397
|
-
};
|
|
3398
|
-
|
|
3399
|
-
exports.Alert = Alert;
|
|
3400
|
-
exports.AlertDescription = AlertDescription;
|
|
3401
|
-
exports.AlertTitle = AlertTitle;
|
|
3402
|
-
exports.Avatar = Avatar;
|
|
3403
|
-
exports.AvatarFallback = AvatarFallback;
|
|
3404
|
-
exports.AvatarImage = AvatarImage;
|
|
3405
|
-
exports.Badge = Badge;
|
|
3406
|
-
exports.Button = Button;
|
|
3407
|
-
exports.Card = Card;
|
|
3408
|
-
exports.CardContent = CardContent;
|
|
3409
|
-
exports.CardDescription = CardDescription;
|
|
3410
|
-
exports.CardFooter = CardFooter;
|
|
3411
|
-
exports.CardHeader = CardHeader;
|
|
3412
|
-
exports.CardTitle = CardTitle;
|
|
3413
|
-
exports.Checkbox = Checkbox;
|
|
3414
|
-
exports.ComponentShowcase = ComponentShowcase;
|
|
3415
|
-
exports.DashboardGrid = DashboardGrid;
|
|
3416
|
-
exports.DashboardGridItem = DashboardGridItem;
|
|
3417
|
-
exports.DashboardHeader = DashboardHeader;
|
|
3418
|
-
exports.DashboardLayout = DashboardLayout;
|
|
3419
|
-
exports.DataTable = DataTable;
|
|
3420
|
-
exports.Input = Input;
|
|
3421
|
-
exports.Modal = Modal;
|
|
3422
|
-
exports.ModalContent = ModalContent;
|
|
3423
|
-
exports.ModalDescription = ModalDescription;
|
|
3424
|
-
exports.ModalFooter = ModalFooter;
|
|
3425
|
-
exports.ModalHeader = ModalHeader;
|
|
3426
|
-
exports.ModalTitle = ModalTitle;
|
|
3427
|
-
exports.NavItem = NavItem;
|
|
3428
|
-
exports.Navbar = Navbar;
|
|
3429
|
-
exports.Sidebar = Sidebar;
|
|
3430
|
-
exports.Skeleton = Skeleton;
|
|
3431
|
-
exports.Spinner = Spinner;
|
|
3432
|
-
exports.StatsCard = StatsCard;
|
|
3433
|
-
exports.Switch = Switch;
|
|
3434
|
-
exports.Tabs = Tabs;
|
|
3435
|
-
exports.TabsContent = TabsContent;
|
|
3436
|
-
exports.TabsList = TabsList;
|
|
3437
|
-
exports.TabsTrigger = TabsTrigger;
|
|
3438
|
-
exports.Textarea = Textarea;
|
|
3439
|
-
exports.Toast = Toast;
|
|
3440
|
-
exports.alertVariants = alertVariants;
|
|
3441
|
-
exports.avatarVariants = avatarVariants;
|
|
3442
|
-
exports.badgeVariants = badgeVariants;
|
|
3443
|
-
exports.buttonVariants = buttonVariants;
|
|
3444
|
-
exports.cardVariants = cardVariants;
|
|
3445
|
-
exports.checkboxVariants = checkboxVariants;
|
|
3446
|
-
exports.cn = cn;
|
|
3447
|
-
exports.defaultTheme = defaultTheme;
|
|
3448
|
-
exports.gridItemVariants = gridItemVariants;
|
|
3449
|
-
exports.gridVariants = gridVariants;
|
|
3450
|
-
exports.inputVariants = inputVariants;
|
|
3451
|
-
exports.modalVariants = modalVariants;
|
|
3452
|
-
exports.navbarVariants = navbarVariants;
|
|
3453
|
-
exports.showToast = showToast;
|
|
3454
|
-
exports.sidebarVariants = sidebarVariants;
|
|
3455
|
-
exports.skeletonVariants = skeletonVariants;
|
|
3456
|
-
exports.spinnerVariants = spinnerVariants;
|
|
3457
|
-
exports.statsCardVariants = statsCardVariants;
|
|
3458
|
-
exports.switchVariants = switchVariants;
|
|
3459
|
-
exports.tabsListVariants = tabsListVariants;
|
|
3460
|
-
exports.tabsTriggerVariants = tabsTriggerVariants;
|
|
3461
|
-
exports.textareaVariants = textareaVariants;
|
|
3462
|
-
exports.toastVariants = toastVariants;
|
|
3463
|
-
exports.useBreakpoint = useBreakpoint;
|
|
3464
|
-
exports.useDarkMode = useDarkMode;
|
|
3465
|
-
exports.useDebounce = useDebounce;
|
|
3466
|
-
exports.useLocalStorage = useLocalStorage;
|
|
3467
|
-
exports.useToggle = useToggle;
|