ui-arreya-components 0.0.1

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 (87) hide show
  1. package/.storybook/main.ts +18 -0
  2. package/.storybook/preview.ts +16 -0
  3. package/.storybook/vitest.setup.ts +9 -0
  4. package/README.md +54 -0
  5. package/components.json +21 -0
  6. package/dist/styles.css +3 -0
  7. package/dist/ui.cjs.js +31 -0
  8. package/dist/ui.es.js +3060 -0
  9. package/dist/ui.umd.js +31 -0
  10. package/eslint.config.js +28 -0
  11. package/package.json +120 -0
  12. package/postcss.config.js +6 -0
  13. package/scripts/template.sh +57 -0
  14. package/src/components/feature/login-form.stories.tsx +35 -0
  15. package/src/components/feature/login-form.tsx +97 -0
  16. package/src/components/index.ts +1 -0
  17. package/src/components/ui/accordion.stories.tsx.disabled +36 -0
  18. package/src/components/ui/accordion.tsx +55 -0
  19. package/src/components/ui/alert-dialog.stories.tsx +46 -0
  20. package/src/components/ui/alert-dialog.tsx +139 -0
  21. package/src/components/ui/alert.stories.tsx +45 -0
  22. package/src/components/ui/alert.tsx +59 -0
  23. package/src/components/ui/aspect-ratio.stories.tsx +24 -0
  24. package/src/components/ui/aspect-ratio.tsx +5 -0
  25. package/src/components/ui/avatar.stories.tsx +29 -0
  26. package/src/components/ui/avatar.tsx +48 -0
  27. package/src/components/ui/badge.stories.tsx +43 -0
  28. package/src/components/ui/badge.tsx +36 -0
  29. package/src/components/ui/breadcrumb.stories.tsx +146 -0
  30. package/src/components/ui/breadcrumb.tsx +115 -0
  31. package/src/components/ui/button.stories.tsx +87 -0
  32. package/src/components/ui/button.tsx +57 -0
  33. package/src/components/ui/card.stories.tsx +99 -0
  34. package/src/components/ui/card.tsx +76 -0
  35. package/src/components/ui/carousel.stories.tsx +47 -0
  36. package/src/components/ui/carousel.tsx +260 -0
  37. package/src/components/ui/chart.tsx +363 -0
  38. package/src/components/ui/checkbox.tsx +28 -0
  39. package/src/components/ui/collapsible.tsx +9 -0
  40. package/src/components/ui/context-menu.tsx +198 -0
  41. package/src/components/ui/dialog.tsx +120 -0
  42. package/src/components/ui/drawer.tsx +116 -0
  43. package/src/components/ui/dropdown-menu.stories.tsx +92 -0
  44. package/src/components/ui/dropdown-menu.tsx +199 -0
  45. package/src/components/ui/form.tsx +176 -0
  46. package/src/components/ui/hover-card.tsx +27 -0
  47. package/src/components/ui/index.ts +1 -0
  48. package/src/components/ui/input-otp.tsx +69 -0
  49. package/src/components/ui/input.tsx +22 -0
  50. package/src/components/ui/label.tsx +24 -0
  51. package/src/components/ui/menubar.tsx +254 -0
  52. package/src/components/ui/navigation-menu.tsx +128 -0
  53. package/src/components/ui/pagination.tsx +117 -0
  54. package/src/components/ui/popover.tsx +31 -0
  55. package/src/components/ui/progress.tsx +26 -0
  56. package/src/components/ui/radio-group.tsx +42 -0
  57. package/src/components/ui/resizable.tsx +43 -0
  58. package/src/components/ui/scroll-area.tsx +46 -0
  59. package/src/components/ui/select.tsx +157 -0
  60. package/src/components/ui/separator.tsx +29 -0
  61. package/src/components/ui/sheet.tsx +140 -0
  62. package/src/components/ui/sidebar.tsx +771 -0
  63. package/src/components/ui/skeleton.tsx +15 -0
  64. package/src/components/ui/slider.tsx +26 -0
  65. package/src/components/ui/sonner.tsx +29 -0
  66. package/src/components/ui/switch.tsx +27 -0
  67. package/src/components/ui/table.tsx +120 -0
  68. package/src/components/ui/tabs.tsx +53 -0
  69. package/src/components/ui/textarea.tsx +22 -0
  70. package/src/components/ui/toast.tsx +127 -0
  71. package/src/components/ui/toaster.tsx +33 -0
  72. package/src/components/ui/toggle-group.tsx +59 -0
  73. package/src/components/ui/toggle.tsx +43 -0
  74. package/src/components/ui/tooltip.tsx +30 -0
  75. package/src/hooks/use-mobile.tsx +19 -0
  76. package/src/hooks/use-toast.ts +194 -0
  77. package/src/index.css +3484 -0
  78. package/src/index.ts +1 -0
  79. package/src/lib/types.ts +5 -0
  80. package/src/lib/utils.ts +6 -0
  81. package/src/styles/tailwind.css +86 -0
  82. package/tailwind.config.js +96 -0
  83. package/tsconfig.app.json +30 -0
  84. package/tsconfig.json +13 -0
  85. package/tsconfig.node.json +24 -0
  86. package/vite.config.ts +33 -0
  87. package/vitest.workspace.ts +32 -0
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { Button } from './components/ui/button'
@@ -0,0 +1,5 @@
1
+ export type AccordionProps = {
2
+ title: string,
3
+ children: {}
4
+ }
5
+
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from "clsx"
2
+ import { twMerge } from "tailwind-merge"
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
@@ -0,0 +1,86 @@
1
+ @layer theme, base, components, utilities;
2
+
3
+ @tailwind base;
4
+ @tailwind components;
5
+ @tailwind utilities;
6
+
7
+ @layer base {
8
+ :root {
9
+ --background: 0 0% 100%;
10
+ --foreground: 0 0% 3.9%;
11
+ --card: 0 0% 100%;
12
+ --card-foreground: 0 0% 3.9%;
13
+ --popover: 0 0% 100%;
14
+ --popover-foreground: 0 0% 3.9%;
15
+ --primary: 0 0% 9%;
16
+ --primary-foreground: 0 0% 98%;
17
+ --secondary: 0 0% 96.1%;
18
+ --secondary-foreground: 0 0% 9%;
19
+ --muted: 0 0% 96.1%;
20
+ --muted-foreground: 0 0% 45.1%;
21
+ --accent: 0 0% 96.1%;
22
+ --accent-foreground: 0 0% 9%;
23
+ --destructive: 0 84.2% 60.2%;
24
+ --destructive-foreground: 0 0% 98%;
25
+ --border: 0 0% 89.8%;
26
+ --input: 0 0% 89.8%;
27
+ --ring: 0 0% 3.9%;
28
+ --chart-1: 12 76% 61%;
29
+ --chart-2: 173 58% 39%;
30
+ --chart-3: 197 37% 24%;
31
+ --chart-4: 43 74% 66%;
32
+ --chart-5: 27 87% 67%;
33
+ --radius: 0.5rem
34
+ ;
35
+ --sidebar-background: 0 0% 98%;
36
+ --sidebar-foreground: 240 5.3% 26.1%;
37
+ --sidebar-primary: 240 5.9% 10%;
38
+ --sidebar-primary-foreground: 0 0% 98%;
39
+ --sidebar-accent: 240 4.8% 95.9%;
40
+ --sidebar-accent-foreground: 240 5.9% 10%;
41
+ --sidebar-border: 220 13% 91%;
42
+ --sidebar-ring: 217.2 91.2% 59.8%}
43
+ .dark {
44
+ --background: 0 0% 3.9%;
45
+ --foreground: 0 0% 98%;
46
+ --card: 0 0% 3.9%;
47
+ --card-foreground: 0 0% 98%;
48
+ --popover: 0 0% 3.9%;
49
+ --popover-foreground: 0 0% 98%;
50
+ --primary: 0 0% 98%;
51
+ --primary-foreground: 0 0% 9%;
52
+ --secondary: 0 0% 14.9%;
53
+ --secondary-foreground: 0 0% 98%;
54
+ --muted: 0 0% 14.9%;
55
+ --muted-foreground: 0 0% 63.9%;
56
+ --accent: 0 0% 14.9%;
57
+ --accent-foreground: 0 0% 98%;
58
+ --destructive: 0 62.8% 30.6%;
59
+ --destructive-foreground: 0 0% 98%;
60
+ --border: 0 0% 14.9%;
61
+ --input: 0 0% 14.9%;
62
+ --ring: 0 0% 83.1%;
63
+ --chart-1: 220 70% 50%;
64
+ --chart-2: 160 60% 45%;
65
+ --chart-3: 30 80% 55%;
66
+ --chart-4: 280 65% 60%;
67
+ --chart-5: 340 75% 55%
68
+ ;
69
+ --sidebar-background: 240 5.9% 10%;
70
+ --sidebar-foreground: 240 4.8% 95.9%;
71
+ --sidebar-primary: 224.3 76.3% 48%;
72
+ --sidebar-primary-foreground: 0 0% 100%;
73
+ --sidebar-accent: 240 3.7% 15.9%;
74
+ --sidebar-accent-foreground: 240 4.8% 95.9%;
75
+ --sidebar-border: 240 3.7% 15.9%;
76
+ --sidebar-ring: 217.2 91.2% 59.8%}
77
+ }
78
+
79
+ @layer base {
80
+ * {
81
+ @apply border-border;
82
+ }
83
+ body {
84
+ @apply bg-background text-foreground;
85
+ }
86
+ }
@@ -0,0 +1,96 @@
1
+ import type { Config } from "tailwindcss"
2
+
3
+ const config: Config = {
4
+ darkMode: ["class"],
5
+ content: ["./src/components/**/*.{js,ts,jsx,tsx}", "./.storybook/**/*.{js,ts,jsx,tsx}", "./storybook-static/**/*/{js,ts,jsx,tsx}"],
6
+ theme: {
7
+ extend: {
8
+ borderRadius: {
9
+ lg: 'var(--radius)',
10
+ md: 'calc(var(--radius) - 2px)',
11
+ sm: 'calc(var(--radius) - 4px)'
12
+ },
13
+ colors: {
14
+ background: 'hsl(var(--background))',
15
+ foreground: 'hsl(var(--foreground))',
16
+ card: {
17
+ DEFAULT: 'hsl(var(--card))',
18
+ foreground: 'hsl(var(--card-foreground))'
19
+ },
20
+ popover: {
21
+ DEFAULT: 'hsl(var(--popover))',
22
+ foreground: 'hsl(var(--popover-foreground))'
23
+ },
24
+ primary: {
25
+ DEFAULT: 'hsl(var(--primary))',
26
+ foreground: 'hsl(var(--primary-foreground))'
27
+ },
28
+ secondary: {
29
+ DEFAULT: 'hsl(var(--secondary))',
30
+ foreground: 'hsl(var(--secondary-foreground))'
31
+ },
32
+ muted: {
33
+ DEFAULT: 'hsl(var(--muted))',
34
+ foreground: 'hsl(var(--muted-foreground))'
35
+ },
36
+ accent: {
37
+ DEFAULT: 'hsl(var(--accent))',
38
+ foreground: 'hsl(var(--accent-foreground))'
39
+ },
40
+ destructive: {
41
+ DEFAULT: 'hsl(var(--destructive))',
42
+ foreground: 'hsl(var(--destructive-foreground))'
43
+ },
44
+ border: 'hsl(var(--border))',
45
+ input: 'hsl(var(--input))',
46
+ ring: 'hsl(var(--ring))',
47
+ chart: {
48
+ '1': 'hsl(var(--chart-1))',
49
+ '2': 'hsl(var(--chart-2))',
50
+ '3': 'hsl(var(--chart-3))',
51
+ '4': 'hsl(var(--chart-4))',
52
+ '5': 'hsl(var(--chart-5))'
53
+ },
54
+ sidebar: {
55
+ DEFAULT: 'hsl(var(--sidebar-background))',
56
+ foreground: 'hsl(var(--sidebar-foreground))',
57
+ primary: 'hsl(var(--sidebar-primary))',
58
+ 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
59
+ accent: 'hsl(var(--sidebar-accent))',
60
+ 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
61
+ border: 'hsl(var(--sidebar-border))',
62
+ ring: 'hsl(var(--sidebar-ring))'
63
+ }
64
+ },
65
+ keyframes: {
66
+ 'accordion-down': {
67
+ from: {
68
+ height: '0'
69
+ },
70
+ to: {
71
+ height: 'var(--radix-accordion-content-height)'
72
+ }
73
+ },
74
+ 'accordion-up': {
75
+ from: {
76
+ height: 'var(--radix-accordion-content-height)'
77
+ },
78
+ to: {
79
+ height: '0'
80
+ }
81
+ }
82
+ },
83
+ animation: {
84
+ 'accordion-down': 'accordion-down 0.2s ease-out',
85
+ 'accordion-up': 'accordion-up 0.2s ease-out'
86
+ }
87
+ }
88
+ },
89
+ plugins: [
90
+ require("tailwindcss-animate")
91
+ ],
92
+ }
93
+
94
+ export default config
95
+
96
+
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "ES2020",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "isolatedModules": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+ "jsx": "react-jsx",
17
+
18
+ /* Linting */
19
+ "strict": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": true,
22
+ "noFallthroughCasesInSwitch": true,
23
+ "noUncheckedSideEffectImports": true,
24
+
25
+ "paths": {
26
+ "@/*": ["./src/*"]
27
+ }
28
+ },
29
+ "include": ["src"]
30
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ],
7
+ "compilerOptions": {
8
+ "baseUrl": ".",
9
+ "paths": {
10
+ "@/*": ["./src/*"]
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "isolatedModules": true,
13
+ "moduleDetection": "force",
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "strict": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "noUncheckedSideEffectImports": true
22
+ },
23
+ "include": ["vite.config.ts"]
24
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,33 @@
1
+ import path from 'path'
2
+ import { defineConfig } from 'vite'
3
+ import dts from 'vite-plugin-dts'
4
+ import react from '@vitejs/plugin-react'
5
+ import tailwindcss from "@tailwindcss/vite"
6
+
7
+ import { peerDependencies } from './package.json'
8
+
9
+ // https://vite.dev/config/
10
+ export default defineConfig({
11
+ plugins: [
12
+ react(),
13
+ dts({ exclude: ["**/.stories.ts", "**/*.test.ts"]}),
14
+ tailwindcss()
15
+ ],
16
+ resolve: {
17
+ alias: {
18
+ "@": path.resolve(__dirname, "./src"),
19
+ },
20
+ },
21
+ build: {
22
+ lib: {
23
+ entry: './src/index.ts',
24
+ name: 'ui',
25
+ fileName: (format) => `ui.${format}.js`,
26
+ formats: ['es', 'cjs', 'umd'],
27
+ },
28
+ rollupOptions: {
29
+ external: Object.keys(peerDependencies),
30
+ output: { globals: { react: 'React', 'react-dom': 'ReactDOM' } }
31
+ }
32
+ }
33
+ })
@@ -0,0 +1,32 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ import { defineWorkspace } from 'vitest/config';
5
+
6
+ import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin';
7
+
8
+ const dirname =
9
+ typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
10
+
11
+ // More info at: https://storybook.js.org/docs/writing-tests/test-addon
12
+ export default defineWorkspace([
13
+ 'vite.config.ts',
14
+ {
15
+ extends: 'vite.config.ts',
16
+ plugins: [
17
+ // The plugin will run tests for the stories defined in your Storybook config
18
+ // See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest
19
+ storybookTest({ configDir: path.join(dirname, '.storybook') }),
20
+ ],
21
+ test: {
22
+ name: 'storybook',
23
+ browser: {
24
+ enabled: true,
25
+ headless: true,
26
+ name: 'chromium',
27
+ provider: 'playwright'
28
+ },
29
+ setupFiles: ['.storybook/vitest.setup.ts'],
30
+ },
31
+ },
32
+ ]);