@oppulence/design-system 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +115 -0
  2. package/components.json +21 -0
  3. package/hooks/use-mobile.tsx +21 -0
  4. package/lib/utils.ts +6 -0
  5. package/package.json +104 -0
  6. package/postcss.config.mjs +8 -0
  7. package/src/components/atoms/aspect-ratio.tsx +21 -0
  8. package/src/components/atoms/avatar.tsx +91 -0
  9. package/src/components/atoms/badge.tsx +47 -0
  10. package/src/components/atoms/button.tsx +128 -0
  11. package/src/components/atoms/checkbox.tsx +24 -0
  12. package/src/components/atoms/container.tsx +42 -0
  13. package/src/components/atoms/heading.tsx +56 -0
  14. package/src/components/atoms/index.ts +21 -0
  15. package/src/components/atoms/input.tsx +18 -0
  16. package/src/components/atoms/kbd.tsx +23 -0
  17. package/src/components/atoms/label.tsx +15 -0
  18. package/src/components/atoms/logo.tsx +52 -0
  19. package/src/components/atoms/progress.tsx +79 -0
  20. package/src/components/atoms/separator.tsx +17 -0
  21. package/src/components/atoms/skeleton.tsx +13 -0
  22. package/src/components/atoms/slider.tsx +56 -0
  23. package/src/components/atoms/spinner.tsx +14 -0
  24. package/src/components/atoms/stack.tsx +126 -0
  25. package/src/components/atoms/switch.tsx +26 -0
  26. package/src/components/atoms/text.tsx +69 -0
  27. package/src/components/atoms/textarea.tsx +19 -0
  28. package/src/components/atoms/toggle.tsx +40 -0
  29. package/src/components/molecules/accordion.tsx +72 -0
  30. package/src/components/molecules/ai-chat.tsx +251 -0
  31. package/src/components/molecules/alert.tsx +131 -0
  32. package/src/components/molecules/breadcrumb.tsx +301 -0
  33. package/src/components/molecules/button-group.tsx +96 -0
  34. package/src/components/molecules/card.tsx +184 -0
  35. package/src/components/molecules/collapsible.tsx +21 -0
  36. package/src/components/molecules/command-search.tsx +148 -0
  37. package/src/components/molecules/empty.tsx +98 -0
  38. package/src/components/molecules/field.tsx +217 -0
  39. package/src/components/molecules/grid.tsx +141 -0
  40. package/src/components/molecules/hover-card.tsx +45 -0
  41. package/src/components/molecules/index.ts +29 -0
  42. package/src/components/molecules/input-group.tsx +151 -0
  43. package/src/components/molecules/input-otp.tsx +74 -0
  44. package/src/components/molecules/item.tsx +194 -0
  45. package/src/components/molecules/page-header.tsx +89 -0
  46. package/src/components/molecules/pagination.tsx +130 -0
  47. package/src/components/molecules/popover.tsx +96 -0
  48. package/src/components/molecules/radio-group.tsx +37 -0
  49. package/src/components/molecules/resizable.tsx +52 -0
  50. package/src/components/molecules/scroll-area.tsx +45 -0
  51. package/src/components/molecules/section.tsx +108 -0
  52. package/src/components/molecules/select.tsx +201 -0
  53. package/src/components/molecules/settings.tsx +197 -0
  54. package/src/components/molecules/table.tsx +111 -0
  55. package/src/components/molecules/tabs.tsx +74 -0
  56. package/src/components/molecules/theme-switcher.tsx +187 -0
  57. package/src/components/molecules/toggle-group.tsx +89 -0
  58. package/src/components/molecules/tooltip.tsx +66 -0
  59. package/src/components/organisms/alert-dialog.tsx +152 -0
  60. package/src/components/organisms/app-shell.tsx +939 -0
  61. package/src/components/organisms/calendar.tsx +212 -0
  62. package/src/components/organisms/carousel.tsx +230 -0
  63. package/src/components/organisms/chart.tsx +333 -0
  64. package/src/components/organisms/combobox.tsx +274 -0
  65. package/src/components/organisms/command.tsx +200 -0
  66. package/src/components/organisms/context-menu.tsx +229 -0
  67. package/src/components/organisms/dialog.tsx +134 -0
  68. package/src/components/organisms/drawer.tsx +123 -0
  69. package/src/components/organisms/dropdown-menu.tsx +256 -0
  70. package/src/components/organisms/index.ts +17 -0
  71. package/src/components/organisms/menubar.tsx +203 -0
  72. package/src/components/organisms/navigation-menu.tsx +143 -0
  73. package/src/components/organisms/page-layout.tsx +105 -0
  74. package/src/components/organisms/sheet.tsx +126 -0
  75. package/src/components/organisms/sidebar.tsx +723 -0
  76. package/src/components/organisms/sonner.tsx +41 -0
  77. package/src/components/ui/index.ts +3 -0
  78. package/src/index.ts +3 -0
  79. package/src/styles/globals.css +297 -0
  80. package/tailwind.config.ts +77 -0
@@ -0,0 +1,41 @@
1
+ import {
2
+ CircleCheckIcon,
3
+ InfoIcon,
4
+ Loader2Icon,
5
+ OctagonXIcon,
6
+ TriangleAlertIcon,
7
+ } from "lucide-react";
8
+ import { Toaster as Sonner, type ToasterProps } from "sonner";
9
+
10
+ const Toaster = ({ theme = "system", ...props }: ToasterProps) => {
11
+ return (
12
+ <Sonner
13
+ theme={theme}
14
+ className="toaster group"
15
+ icons={{
16
+ success: <CircleCheckIcon className="size-4 text-success" />,
17
+ info: <InfoIcon className="size-4 text-info" />,
18
+ warning: <TriangleAlertIcon className="size-4 text-warning" />,
19
+ error: <OctagonXIcon className="size-4 text-destructive" />,
20
+ loading: <Loader2Icon className="size-4 animate-spin" />,
21
+ }}
22
+ style={
23
+ {
24
+ "--normal-bg": "var(--popover)",
25
+ "--normal-text": "var(--popover-foreground)",
26
+ "--normal-border": "var(--border)",
27
+ "--border-radius": "var(--radius)",
28
+ } as React.CSSProperties
29
+ }
30
+ toastOptions={{
31
+ classNames: {
32
+ toast: "cn-toast",
33
+ description: "!text-muted-foreground",
34
+ },
35
+ }}
36
+ {...props}
37
+ />
38
+ );
39
+ };
40
+
41
+ export { Toaster };
@@ -0,0 +1,3 @@
1
+ export * from "../atoms";
2
+ export * from "../molecules";
3
+ export * from "../organisms";
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { cn } from "../lib/utils";
2
+
3
+ export * from "./components/ui";
@@ -0,0 +1,297 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @import "@fontsource-variable/plus-jakarta-sans";
4
+
5
+ /* Include design system components in Tailwind's content scan */
6
+ @source "../components/**/*.tsx";
7
+
8
+ @custom-variant dark (&:is(.dark *));
9
+
10
+ @layer base {
11
+ :root {
12
+ /* Modern monochrome light theme - clean whites and refined grays */
13
+ --background: oklch(0.995 0 0);
14
+ --foreground: oklch(0.09 0 0);
15
+ --card: oklch(1 0 0);
16
+ --card-foreground: oklch(0.09 0 0);
17
+ --popover: oklch(1 0 0);
18
+ --popover-foreground: oklch(0.09 0 0);
19
+
20
+ /* Pure black primary for bold, modern look */
21
+ --primary: oklch(0.09 0 0);
22
+ --primary-foreground: oklch(0.99 0 0);
23
+
24
+ /* Subtle gray secondary */
25
+ --secondary: oklch(0.96 0 0);
26
+ --secondary-foreground: oklch(0.15 0 0);
27
+
28
+ /* Refined muted tones */
29
+ --muted: oklch(0.965 0 0);
30
+ --muted-foreground: oklch(0.45 0 0);
31
+
32
+ /* Subtle accent */
33
+ --accent: oklch(0.955 0 0);
34
+ --accent-foreground: oklch(0.12 0 0);
35
+
36
+ /* Semantic colors - muted for elegance */
37
+ --destructive: oklch(0.55 0.2 25);
38
+ --success: oklch(0.55 0.15 145);
39
+ --warning: oklch(0.7 0.14 80);
40
+ --info: oklch(0.55 0.14 250);
41
+
42
+ /* Refined borders and inputs */
43
+ --border: oklch(0.91 0 0);
44
+ --input: oklch(0.91 0 0);
45
+ --ring: oklch(0.09 0 0);
46
+
47
+ /* Monochrome chart palette - grayscale gradient */
48
+ --chart-1: oklch(0.15 0 0);
49
+ --chart-2: oklch(0.35 0 0);
50
+ --chart-3: oklch(0.5 0 0);
51
+ --chart-4: oklch(0.65 0 0);
52
+ --chart-5: oklch(0.8 0 0);
53
+
54
+ /* Modern radius - slightly larger for softer feel */
55
+ --radius: 0.5rem;
56
+
57
+ /* Sidebar - clean separation */
58
+ --sidebar: oklch(0.985 0 0);
59
+ --sidebar-foreground: oklch(0.09 0 0);
60
+ --sidebar-primary: oklch(0.09 0 0);
61
+ --sidebar-primary-foreground: oklch(0.99 0 0);
62
+ --sidebar-accent: oklch(0.955 0 0);
63
+ --sidebar-accent-foreground: oklch(0.12 0 0);
64
+ --sidebar-border: oklch(0.92 0 0);
65
+ --sidebar-ring: oklch(0.09 0 0);
66
+ }
67
+
68
+ .dark {
69
+ /* Modern monochrome dark theme - deep blacks and refined grays */
70
+ --background: oklch(0.09 0 0);
71
+ --foreground: oklch(0.95 0 0);
72
+ --card: oklch(0.12 0 0);
73
+ --card-foreground: oklch(0.95 0 0);
74
+ --popover: oklch(0.12 0 0);
75
+ --popover-foreground: oklch(0.95 0 0);
76
+
77
+ /* Pure white primary for bold contrast */
78
+ --primary: oklch(0.99 0 0);
79
+ --primary-foreground: oklch(0.09 0 0);
80
+
81
+ /* Subtle gray secondary */
82
+ --secondary: oklch(0.18 0 0);
83
+ --secondary-foreground: oklch(0.92 0 0);
84
+
85
+ /* Refined muted tones */
86
+ --muted: oklch(0.18 0 0);
87
+ --muted-foreground: oklch(0.6 0 0);
88
+
89
+ /* Subtle accent */
90
+ --accent: oklch(0.2 0 0);
91
+ --accent-foreground: oklch(0.95 0 0);
92
+
93
+ /* Semantic colors - slightly brighter for dark mode */
94
+ --destructive: oklch(0.65 0.2 25);
95
+ --success: oklch(0.65 0.15 145);
96
+ --warning: oklch(0.75 0.14 80);
97
+ --info: oklch(0.65 0.14 250);
98
+
99
+ /* Refined borders and inputs - subtle white tint */
100
+ --border: oklch(1 0 0 / 12%);
101
+ --input: oklch(1 0 0 / 12%);
102
+ --ring: oklch(0.99 0 0);
103
+
104
+ /* Monochrome chart palette - inverted grayscale */
105
+ --chart-1: oklch(0.95 0 0);
106
+ --chart-2: oklch(0.75 0 0);
107
+ --chart-3: oklch(0.55 0 0);
108
+ --chart-4: oklch(0.4 0 0);
109
+ --chart-5: oklch(0.25 0 0);
110
+
111
+ /* Sidebar - subtle separation */
112
+ --sidebar: oklch(0.11 0 0);
113
+ --sidebar-foreground: oklch(0.95 0 0);
114
+ --sidebar-primary: oklch(0.99 0 0);
115
+ --sidebar-primary-foreground: oklch(0.09 0 0);
116
+ --sidebar-accent: oklch(0.18 0 0);
117
+ --sidebar-accent-foreground: oklch(0.95 0 0);
118
+ --sidebar-border: oklch(1 0 0 / 10%);
119
+ --sidebar-ring: oklch(0.99 0 0);
120
+ }
121
+ }
122
+
123
+ @theme inline {
124
+ --font-sans:
125
+ "Plus Jakarta Sans Variable", ui-sans-serif, system-ui, sans-serif,
126
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
127
+
128
+ /* Letter spacing tokens */
129
+ --tracking-tighter: -0.05em;
130
+ --tracking-tight: -0.025em;
131
+ --tracking-normal: 0;
132
+ --tracking-wide: 0.025em;
133
+ --color-background: var(--background);
134
+ --color-foreground: var(--foreground);
135
+ --color-card: var(--card);
136
+ --color-card-foreground: var(--card-foreground);
137
+ --color-popover: var(--popover);
138
+ --color-popover-foreground: var(--popover-foreground);
139
+ --color-primary: var(--primary);
140
+ --color-primary-foreground: var(--primary-foreground);
141
+ --color-secondary: var(--secondary);
142
+ --color-secondary-foreground: var(--secondary-foreground);
143
+ --color-muted: var(--muted);
144
+ --color-muted-foreground: var(--muted-foreground);
145
+ --color-accent: var(--accent);
146
+ --color-accent-foreground: var(--accent-foreground);
147
+ --color-destructive: var(--destructive);
148
+ --color-destructive-foreground: var(--destructive-foreground);
149
+ --color-success: var(--success);
150
+ --color-warning: var(--warning);
151
+ --color-info: var(--info);
152
+ --color-border: var(--border);
153
+ --color-input: var(--input);
154
+ --color-ring: var(--ring);
155
+ --color-chart-1: var(--chart-1);
156
+ --color-chart-2: var(--chart-2);
157
+ --color-chart-3: var(--chart-3);
158
+ --color-chart-4: var(--chart-4);
159
+ --color-chart-5: var(--chart-5);
160
+ --radius-sm: calc(var(--radius) - 4px);
161
+ --radius-md: calc(var(--radius) - 2px);
162
+ --radius-lg: var(--radius);
163
+ --radius-xl: calc(var(--radius) + 4px);
164
+ --color-sidebar: var(--sidebar);
165
+ --color-sidebar-foreground: var(--sidebar-foreground);
166
+ --color-sidebar-primary: var(--sidebar-primary);
167
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
168
+ --color-sidebar-accent: var(--sidebar-accent);
169
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
170
+ --color-sidebar-border: var(--sidebar-border);
171
+ --color-sidebar-ring: var(--sidebar-ring);
172
+ }
173
+
174
+ @layer base {
175
+ * {
176
+ @apply border-border outline-ring/50;
177
+ }
178
+
179
+ html {
180
+ -webkit-font-smoothing: antialiased;
181
+ -moz-osx-font-smoothing: grayscale;
182
+ text-rendering: optimizeLegibility;
183
+ }
184
+
185
+ body {
186
+ @apply bg-background text-foreground;
187
+ font-feature-settings: "cv02", "cv03", "cv04", "cv11";
188
+ line-height: 1.6;
189
+ }
190
+
191
+ /* Refined focus states for accessibility */
192
+ :focus-visible {
193
+ @apply outline-2 outline-offset-2 outline-ring;
194
+ }
195
+
196
+ /* Smooth scrolling */
197
+ @media (prefers-reduced-motion: no-preference) {
198
+ html {
199
+ scroll-behavior: smooth;
200
+ }
201
+ }
202
+
203
+ /* Selection styling */
204
+ ::selection {
205
+ @apply bg-foreground/10;
206
+ }
207
+
208
+ /* Typography - refined headings */
209
+ h1,
210
+ h2,
211
+ h3,
212
+ h4,
213
+ h5,
214
+ h6 {
215
+ @apply font-semibold;
216
+ text-wrap: balance;
217
+ }
218
+
219
+ h1 {
220
+ @apply text-4xl;
221
+ letter-spacing: -0.05em;
222
+ }
223
+ h2 {
224
+ @apply text-3xl;
225
+ letter-spacing: -0.025em;
226
+ }
227
+ h3 {
228
+ @apply text-2xl;
229
+ letter-spacing: -0.025em;
230
+ }
231
+ h4 {
232
+ @apply text-xl;
233
+ }
234
+ h5 {
235
+ @apply text-lg;
236
+ }
237
+ h6 {
238
+ @apply text-base font-medium;
239
+ }
240
+
241
+ /* Paragraphs */
242
+ p {
243
+ text-wrap: pretty;
244
+ }
245
+ }
246
+
247
+ /* View Transitions API for smooth page transitions */
248
+ @view-transition {
249
+ navigation: auto;
250
+ }
251
+
252
+ ::view-transition-old(page-content) {
253
+ animation: fade-out 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
254
+ }
255
+
256
+ ::view-transition-new(page-content) {
257
+ animation: fade-in 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
258
+ }
259
+
260
+ @keyframes fade-out {
261
+ from {
262
+ opacity: 1;
263
+ transform: translateY(0);
264
+ }
265
+ to {
266
+ opacity: 0;
267
+ transform: translateY(-4px);
268
+ }
269
+ }
270
+
271
+ @keyframes fade-in {
272
+ from {
273
+ opacity: 0;
274
+ transform: translateY(4px);
275
+ }
276
+ to {
277
+ opacity: 1;
278
+ transform: translateY(0);
279
+ }
280
+ }
281
+
282
+ /* Page content animation fallback for non-View Transitions browsers */
283
+ [data-slot="page-layout"] {
284
+ view-transition-name: page-content;
285
+ animation: page-enter 200ms cubic-bezier(0.4, 0, 0.2, 1);
286
+ }
287
+
288
+ @keyframes page-enter {
289
+ from {
290
+ opacity: 0;
291
+ transform: translateY(4px);
292
+ }
293
+ to {
294
+ opacity: 1;
295
+ transform: translateY(0);
296
+ }
297
+ }
@@ -0,0 +1,77 @@
1
+ import type { Config } from "tailwindcss";
2
+
3
+ export default {
4
+ darkMode: "class",
5
+ content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
6
+ theme: {
7
+ extend: {
8
+ borderRadius: {
9
+ sm: "var(--radius-sm)",
10
+ md: "var(--radius-md)",
11
+ lg: "var(--radius-lg)",
12
+ xl: "var(--radius-xl)",
13
+ },
14
+ colors: {
15
+ border: "var(--border)",
16
+ input: "var(--input)",
17
+ ring: "var(--ring)",
18
+ background: "var(--background)",
19
+ foreground: "var(--foreground)",
20
+ primary: {
21
+ DEFAULT: "var(--primary)",
22
+ foreground: "var(--primary-foreground)",
23
+ },
24
+ secondary: {
25
+ DEFAULT: "var(--secondary)",
26
+ foreground: "var(--secondary-foreground)",
27
+ },
28
+ destructive: "var(--destructive)",
29
+ muted: {
30
+ DEFAULT: "var(--muted)",
31
+ foreground: "var(--muted-foreground)",
32
+ },
33
+ accent: {
34
+ DEFAULT: "var(--accent)",
35
+ foreground: "var(--accent-foreground)",
36
+ },
37
+ popover: {
38
+ DEFAULT: "var(--popover)",
39
+ foreground: "var(--popover-foreground)",
40
+ },
41
+ card: {
42
+ DEFAULT: "var(--card)",
43
+ foreground: "var(--card-foreground)",
44
+ },
45
+ sidebar: {
46
+ DEFAULT: "var(--sidebar)",
47
+ foreground: "var(--sidebar-foreground)",
48
+ primary: "var(--sidebar-primary)",
49
+ "primary-foreground": "var(--sidebar-primary-foreground)",
50
+ accent: "var(--sidebar-accent)",
51
+ "accent-foreground": "var(--sidebar-accent-foreground)",
52
+ border: "var(--sidebar-border)",
53
+ ring: "var(--sidebar-ring)",
54
+ },
55
+ },
56
+ boxShadow: {
57
+ // Modern, subtle shadows for depth
58
+ subtle: "0 1px 2px 0 rgb(0 0 0 / 0.03)",
59
+ soft: "0 2px 8px -2px rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.03)",
60
+ elevated:
61
+ "0 4px 16px -4px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04)",
62
+ float:
63
+ "0 8px 32px -8px rgb(0 0 0 / 0.12), 0 4px 8px -4px rgb(0 0 0 / 0.06)",
64
+ },
65
+ transitionTimingFunction: {
66
+ // Modern easing curves
67
+ smooth: "cubic-bezier(0.4, 0, 0.2, 1)",
68
+ bounce: "cubic-bezier(0.34, 1.56, 0.64, 1)",
69
+ },
70
+ transitionDuration: {
71
+ "150": "150ms",
72
+ "200": "200ms",
73
+ },
74
+ },
75
+ },
76
+ plugins: [],
77
+ } satisfies Config;