@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/README.md
CHANGED
|
@@ -1,89 +1,233 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
**
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
# Beyond-UI
|
|
2
|
+
|
|
3
|
+
**A full-fledged React + TailwindCSS component library. Theme-agnostic, reusable, type-safe, and built for productive UIs.**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚀 Overview
|
|
8
|
+
|
|
9
|
+
Beyond-UI is a comprehensive collection of ready-to-use, themeable React UI components and hooks, built with TypeScript, TailwindCSS, and Vite. Inspired by the best of modern design systems, it’s built to be both design-consistent (via semantic theming) and easily composable for dashboards, apps, platforms, and SaaS.
|
|
10
|
+
|
|
11
|
+
- **Built for teams:** Use everywhere React and TailwindCSS run—admin panels, SaaS, dashboards, internal tools, consumer apps.
|
|
12
|
+
- **Theme-agnostic:** Every style resolves to semantic Tailwind tokens (e.g., `bg-primary`), not hardcoded colors.
|
|
13
|
+
- **Reusable hooks:** Utilities like `useDarkMode`, `useDebounce`, and more included.
|
|
14
|
+
- **Customizable:** Extend via className or swap out theme tokens, with Storybook-ready demos.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 📦 Features
|
|
19
|
+
|
|
20
|
+
- **20+ reusable, composable components:** Button, Input, Card, Modal, Navbar, Sidebar, Tabs, Table, Alert, Spinner, Badge... (see below)
|
|
21
|
+
- **Variants/Theme support with [class-variance-authority (CVA)](https://cva.style/)**
|
|
22
|
+
- **Super-charged hooks:** `useDarkMode`, `useDebounce`, `useLocalStorage`, `useToggle`, `useBreakpoint`
|
|
23
|
+
- **Utility functions:** `cn()` (merge class names safely), default semantic `theme/default.ts`
|
|
24
|
+
- **Storybook documentation for every component**
|
|
25
|
+
- **Typed end-to-end (TypeScript)**
|
|
26
|
+
- **Testing with Jest & React Testing Library**
|
|
27
|
+
- **Easy Tailwind integration & custom theming**
|
|
28
|
+
- **Out-of-the-box default theme/fallback**
|
|
29
|
+
- **First-class DX: Vite, modern structure, peer deps for React/Tailwind**
|
|
30
|
+
- **NPM published, ready for mass reuse**
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🛠 Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @beyondcorp/beyond-ui
|
|
38
|
+
# or
|
|
39
|
+
yarn add @beyondcorp/beyond-ui
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You must also have `react`, `react-dom`, and `tailwindcss` as peer dependencies.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🎨 Theming
|
|
47
|
+
|
|
48
|
+
Beyond-UI is **completely theme-agnostic**:
|
|
49
|
+
|
|
50
|
+
- Uses tokens like `bg-primary` not `bg-blue-500`.
|
|
51
|
+
- Pulls colors from the consumer project’s `tailwind.config.js`.
|
|
52
|
+
- Ships with a fallback default theme (`theme/default.ts`) for portability.
|
|
53
|
+
|
|
54
|
+
To customize theme colors, add to your `tailwind.config.js`:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
theme: {
|
|
58
|
+
extend: {
|
|
59
|
+
colors: {
|
|
60
|
+
primary: { ... },
|
|
61
|
+
secondary: { ... },
|
|
62
|
+
danger: { ... },
|
|
63
|
+
// ...refer to theme/default.ts for full palette
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
No configuration? The default theme covers you out of the box.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 🧩 Components
|
|
74
|
+
|
|
75
|
+
| Name | Features / Variants |
|
|
76
|
+
|---------------|---------------------------------|
|
|
77
|
+
| Button | Variants (primary, secondary, danger, ghost), Sizes (sm, md, lg), Full type safety |
|
|
78
|
+
| Input | Variants (default, error, success), Sizes, Icon support |
|
|
79
|
+
| Textarea | Auto-resize, char counter |
|
|
80
|
+
| Select | Dropdown, search, async |
|
|
81
|
+
| Checkbox | Label, indeterminate |
|
|
82
|
+
| Radio | Group support |
|
|
83
|
+
| Switch | Animation, boolean toggle |
|
|
84
|
+
| Card | Header, body, footer slots |
|
|
85
|
+
| Modal | Overlay, keyboard dismiss |
|
|
86
|
+
| Badge | Variants (info, warning, error) |
|
|
87
|
+
| Tabs | Horizontal/vertical, variants |
|
|
88
|
+
| Table | Sortable, customized cells |
|
|
89
|
+
| Alert | Info/success/warning/danger |
|
|
90
|
+
| Toast | Notifications, timeouts |
|
|
91
|
+
| Skeleton | Loading states |
|
|
92
|
+
| Spinner | Loader, multiple sizes |
|
|
93
|
+
| Navbar, Sidebar | Layout primitives |
|
|
94
|
+
| StatsCard | Dashboard blocks |
|
|
95
|
+
| ChartWrapper | Recharts integration |
|
|
96
|
+
| ... | More (see Storybook) |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🧵 Hooks & Utilities
|
|
101
|
+
|
|
102
|
+
| Hook | Purpose |
|
|
103
|
+
|---------------------|----------------------------------|
|
|
104
|
+
| useDarkMode | Toggle and persist theme |
|
|
105
|
+
| useDebounce | Debounce values/input |
|
|
106
|
+
| useLocalStorage | Persistent state |
|
|
107
|
+
| useToggle | Boolean flip and set |
|
|
108
|
+
| useBreakpoint | Responsive breakpoint API |
|
|
109
|
+
|
|
110
|
+
| Utility | Description |
|
|
111
|
+
|---------|--------------|
|
|
112
|
+
| cn() | Merges class names with tailwind-merge |
|
|
113
|
+
| defaultTheme | Fallback theme definitions |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 🧑💻 Usage Example
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
import { Button, Card, useBreakpoint } from '@beyondcorp/beyond-ui';
|
|
121
|
+
|
|
122
|
+
export default function Demo() {
|
|
123
|
+
const { isAbove } = useBreakpoint();
|
|
124
|
+
return (
|
|
125
|
+
<Card>
|
|
126
|
+
<Button variant="primary" size={isAbove('md') ? "lg" : "sm"}>
|
|
127
|
+
Click me
|
|
128
|
+
</Button>
|
|
129
|
+
</Card>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## ⚡️ Getting Started (Tailwind Setup)
|
|
137
|
+
|
|
138
|
+
1. **Configure Tailwind in your app:**
|
|
139
|
+
Extend the `content` array in `tailwind.config.js`:
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
content: [
|
|
143
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
144
|
+
"./node_modules/@beyondcorp/beyond-ui/dist/components/**/*.{js,jsx}"
|
|
145
|
+
]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
2. **Import Tailwind CSS:**
|
|
149
|
+
In your app entry (`src/main.tsx` or `index.js`):
|
|
150
|
+
```js
|
|
151
|
+
import './index.css'; // or your Tailwind stylesheet
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
3. **(Optional) Extend Theme:**
|
|
155
|
+
Define or override theme tokens for your brand.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 📖 Documentation & Storybook
|
|
160
|
+
|
|
161
|
+
Every component and hook has a demo, props table, variant showcase, and usage guide—launch Storybook locally, or check the online docs (URL).
|
|
162
|
+
|
|
163
|
+
- `npm run storybook` (from the repo)
|
|
164
|
+
- Getting Started, Theming, and API docs included
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 🧪 Testing & CI
|
|
169
|
+
|
|
170
|
+
- Automated unit tests with Jest + React Testing Library
|
|
171
|
+
- Snapshot and accessibility tests
|
|
172
|
+
- See `/tests` directory for sample tests
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 🛠 Project Structure
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
beyond-ui/
|
|
180
|
+
├─ src/
|
|
181
|
+
│ ├─ components/
|
|
182
|
+
│ ├─ hooks/
|
|
183
|
+
│ ├─ utils/
|
|
184
|
+
│ ├─ theme/
|
|
185
|
+
│ └─ index.ts
|
|
186
|
+
├─ .storybook/
|
|
187
|
+
├─ tests/
|
|
188
|
+
├─ tailwind.config.js
|
|
189
|
+
├─ tsconfig.json
|
|
190
|
+
├─ vite.config.ts
|
|
191
|
+
├─ package.json
|
|
192
|
+
└─ README.md
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 🛤 Roadmap & Milestones
|
|
198
|
+
|
|
199
|
+
- M1: Project setup, theme, utilities
|
|
200
|
+
- M2: Core components (Button, Input, Card, Modal, Badge, ... )
|
|
201
|
+
- M3: All reusable hooks
|
|
202
|
+
- M4: Storybook & docs
|
|
203
|
+
- M5: Complete Jest test coverage & accessibility
|
|
204
|
+
- M6: npm package v1 stable release
|
|
205
|
+
- M7: Dashboard, charts, advanced table, improved theming
|
|
206
|
+
|
|
207
|
+
See `roadmap.md` for complete breakdown.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 🤝 Contributing
|
|
212
|
+
|
|
213
|
+
- Contributions, PRs, and issues welcome!
|
|
214
|
+
- Please see `/CONTRIBUTING.md` for details, coding standards, and branch workflow.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 📝 License
|
|
219
|
+
|
|
220
|
+
MIT © Beyond Corp, Soi Technology Solutions 2025
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 📑 References
|
|
225
|
+
|
|
226
|
+
- initialprompt.md, roadmap.md, technicalspecification.md (see repo)
|
|
227
|
+
- [TailwindCSS](https://tailwindcss.com/docs)
|
|
228
|
+
- [class-variance-authority](https://cva.style/)
|
|
229
|
+
- [Storybook](https://storybook.js.org/)
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
# Beyond-UI: Build clean, scalable UIs faster, with every detail documented and ready to use.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-jsx-runtime.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-jsx-runtime.production.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
7
|
+
variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
export { Alert, AlertTitle, AlertDescription, alertVariants };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
|
|
6
|
+
const alertVariants = cva("relative w-full rounded-lg border p-4", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-white text-gray-950 border-gray-200",
|
|
10
|
+
success: "bg-success-50 text-success-800 border-success-200",
|
|
11
|
+
warning: "bg-warning-50 text-warning-800 border-warning-200",
|
|
12
|
+
danger: "bg-danger-50 text-danger-800 border-danger-200",
|
|
13
|
+
info: "bg-primary-50 text-primary-800 border-primary-200",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (jsxRuntimeExports.jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
|
|
21
|
+
Alert.displayName = "Alert";
|
|
22
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("h5", { ref: ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })));
|
|
23
|
+
AlertTitle.displayName = "AlertTitle";
|
|
24
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("div", { ref: ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })));
|
|
25
|
+
AlertDescription.displayName = "AlertDescription";
|
|
26
|
+
|
|
27
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants };
|
|
28
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4\",\n {\n variants: {\n variant: {\n default: \"bg-white text-gray-950 border-gray-200\",\n success: \"bg-success-50 text-success-800 border-success-200\",\n warning: \"bg-warning-50 text-warning-800 border-warning-200\",\n danger: \"bg-danger-50 text-danger-800 border-danger-200\",\n info: \"bg-primary-50 text-primary-800 border-primary-200\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants };"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,aAAa,GAAG,GAAG,CACvB,uCAAuC,EACvC;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,wCAAwC;AACjD,YAAA,OAAO,EAAE,mDAAmD;AAC5D,YAAA,OAAO,EAAE,mDAAmD;AAC5D,YAAA,MAAM,EAAE,gDAAgD;AACxD,YAAA,IAAI,EAAE,mDAAmD;AAC1D,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AAGH,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACtCA,qBAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,EAAA,CACT,CACH;AACD,KAAK,CAAC,WAAW,GAAG,OAAO;AAE3B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,EAAA,GACpE,KAAK,EAAA,CACT,CACH;AACD,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,EAAA,GACrD,KAAK,EAAA,CACT,CACH;AACD,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const avatarVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const Avatar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<React.ImgHTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLImageElement>>;
|
|
10
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { Avatar, AvatarImage, AvatarFallback, avatarVariants };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../../utils/cn.js';
|
|
5
|
+
|
|
6
|
+
const avatarVariants = cva("relative flex shrink-0 overflow-hidden rounded-full", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: "h-8 w-8",
|
|
10
|
+
md: "h-10 w-10",
|
|
11
|
+
lg: "h-16 w-16",
|
|
12
|
+
xl: "h-20 w-20",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: "md",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const Avatar = React.forwardRef(({ className, size, ...props }, ref) => (jsxRuntimeExports.jsx("div", { ref: ref, className: cn(avatarVariants({ size }), className), ...props })));
|
|
20
|
+
Avatar.displayName = "Avatar";
|
|
21
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("img", { ref: ref, className: cn("aspect-square h-full w-full object-cover", className), ...props })));
|
|
22
|
+
AvatarImage.displayName = "AvatarImage";
|
|
23
|
+
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("div", { ref: ref, className: cn("flex h-full w-full items-center justify-center rounded-full bg-gray-100 text-gray-600 font-medium", className), ...props })));
|
|
24
|
+
AvatarFallback.displayName = "AvatarFallback";
|
|
25
|
+
|
|
26
|
+
export { Avatar, AvatarFallback, AvatarImage, avatarVariants };
|
|
27
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst avatarVariants = cva(\n \"relative flex shrink-0 overflow-hidden rounded-full\",\n {\n variants: {\n size: {\n sm: \"h-8 w-8\",\n md: \"h-10 w-10\",\n lg: \"h-16 w-16\",\n xl: \"h-20 w-20\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n);\n\nconst Avatar = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof avatarVariants>\n>(({ className, size, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(avatarVariants({ size }), className)}\n {...props}\n />\n));\nAvatar.displayName = \"Avatar\";\n\nconst AvatarImage = React.forwardRef<\n HTMLImageElement,\n React.ImgHTMLAttributes<HTMLImageElement>\n>(({ className, ...props }, ref) => (\n <img\n ref={ref}\n className={cn(\"aspect-square h-full w-full object-cover\", className)}\n {...props}\n />\n));\nAvatarImage.displayName = \"AvatarImage\";\n\nconst AvatarFallback = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-gray-100 text-gray-600 font-medium\",\n className\n )}\n {...props}\n />\n));\nAvatarFallback.displayName = \"AvatarFallback\";\n\nexport { Avatar, AvatarImage, AvatarFallback, avatarVariants };"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,cAAc,GAAG,GAAG,CACxB,qDAAqD,EACrD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AAChB,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAGH,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACnCA,qBAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EAAA,GAC9C,KAAK,EAAA,CACT,CACH;AACD,MAAM,CAAC,WAAW,GAAG,QAAQ;AAE7B,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0CAA0C,EAAE,SAAS,CAAC,EAAA,GAChE,KAAK,EAAA,CACT,CACH;AACD,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,mGAAmG,EACnG,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "success" | "warning" | "danger" | "secondary" | "outline" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { cn } from '../../utils/cn.js';
|
|
4
|
+
|
|
5
|
+
const badgeVariants = cva("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", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "border-transparent bg-primary-600 text-white hover:bg-primary-700",
|
|
9
|
+
secondary: "border-transparent bg-secondary-600 text-white hover:bg-secondary-700",
|
|
10
|
+
success: "border-transparent bg-success-600 text-white hover:bg-success-700",
|
|
11
|
+
danger: "border-transparent bg-danger-600 text-white hover:bg-danger-700",
|
|
12
|
+
warning: "border-transparent bg-warning-600 text-white hover:bg-warning-700",
|
|
13
|
+
outline: "text-gray-700 border-gray-300",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
function Badge({ className, variant, ...props }) {
|
|
21
|
+
return (jsxRuntimeExports.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { Badge, badgeVariants };
|
|
25
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst badgeVariants = cva(\n \"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\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary-600 text-white hover:bg-primary-700\",\n secondary: \"border-transparent bg-secondary-600 text-white hover:bg-secondary-700\",\n success: \"border-transparent bg-success-600 text-white hover:bg-success-700\",\n danger: \"border-transparent bg-danger-600 text-white hover:bg-danger-700\",\n warning: \"border-transparent bg-warning-600 text-white hover:bg-warning-700\",\n outline: \"text-gray-700 border-gray-300\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };"],"names":["_jsx"],"mappings":";;;;AAIA,MAAM,aAAa,GAAG,GAAG,CACvB,+KAA+K,EAC/K;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,SAAS,EAAE,uEAAuE;AAClF,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,MAAM,EAAE,iEAAiE;AACzE,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,OAAO,EAAE,+BAA+B;AACzC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AAOH,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAc,EAAA;AACzD,IAAA,QACEA,qBAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,EAAA,CAAI;AAE5E;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "warning" | "danger" | "link" | "secondary" | "outline" | "primary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from '../../_virtual/jsx-runtime.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Root as Slot } from '../../node_modules/@radix-ui/react-slot/dist/index.js';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { cn } from '../../utils/cn.js';
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva("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", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
primary: "bg-primary-600 text-white hover:bg-primary-700",
|
|
11
|
+
secondary: "bg-secondary-600 text-white hover:bg-secondary-700",
|
|
12
|
+
danger: "bg-danger-600 text-white hover:bg-danger-700",
|
|
13
|
+
success: "bg-success-600 text-white hover:bg-success-700",
|
|
14
|
+
warning: "bg-warning-600 text-white hover:bg-warning-700",
|
|
15
|
+
outline: "border border-primary-300 bg-white hover:bg-primary-50",
|
|
16
|
+
ghost: "bg-transparent hover:bg-primary-50",
|
|
17
|
+
link: "text-primary-600 underline-offset-4 hover:underline",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
sm: "h-8 px-3 text-xs",
|
|
21
|
+
md: "h-10 px-4 py-2",
|
|
22
|
+
lg: "h-11 px-8",
|
|
23
|
+
xl: "h-12 px-10 text-base",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "primary",
|
|
28
|
+
size: "md",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
32
|
+
const Comp = asChild ? Slot : "button";
|
|
33
|
+
return (jsxRuntimeExports.jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
34
|
+
});
|
|
35
|
+
Button.displayName = "Button";
|
|
36
|
+
|
|
37
|
+
export { Button, buttonVariants };
|
|
38
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst buttonVariants = cva(\n \"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\",\n {\n variants: {\n variant: {\n primary: \"bg-primary-600 text-white hover:bg-primary-700\",\n secondary: \"bg-secondary-600 text-white hover:bg-secondary-700\",\n danger: \"bg-danger-600 text-white hover:bg-danger-700\",\n success: \"bg-success-600 text-white hover:bg-success-700\",\n warning: \"bg-warning-600 text-white hover:bg-warning-700\",\n outline: \"border border-primary-300 bg-white hover:bg-primary-50\",\n ghost: \"bg-transparent hover:bg-primary-50\",\n link: \"text-primary-600 underline-offset-4 hover:underline\",\n },\n size: {\n sm: \"h-8 px-3 text-xs\",\n md: \"h-10 px-4 py-2\",\n lg: \"h-11 px-8\",\n xl: \"h-12 px-10 text-base\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };"],"names":["_jsx"],"mappings":";;;;;;AAKA,MAAM,cAAc,GAAG,GAAG,CACxB,0RAA0R,EAC1R;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,SAAS,EAAE,oDAAoD;AAC/D,YAAA,MAAM,EAAE,8CAA8C;AACtD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,KAAK,EAAE,oCAAoC;AAC3C,YAAA,IAAI,EAAE,qDAAqD;AAC5D,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,kBAAkB;AACtB,YAAA,EAAE,EAAE,gBAAgB;AACpB,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,sBAAsB;AAC3B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AASH,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IAC/D,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ;IACtC,QACEA,qBAAA,CAAC,IAAI,EAAA,EACH,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAC3D,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EAAA,CACT;AAEN,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|