@wazobiatech/wazui 0.0.1 → 0.0.3

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 (81) hide show
  1. package/.env.test +5 -0
  2. package/package.json +7 -5
  3. package/postcss.config.js +3 -0
  4. package/tailwind.config.js +70 -0
  5. package/tsconfig.json +1 -1
  6. package/vite.config.ts +13 -5
  7. package/.storybook/main.ts +0 -41
  8. package/.storybook/preview-head.html +0 -3
  9. package/.storybook/preview.ts +0 -53
  10. package/src/assets/dashboard/book.svg +0 -6
  11. package/src/assets/dashboard/edit.svg +0 -5
  12. package/src/assets/dashboard/emerald.svg +0 -9
  13. package/src/assets/dashboard/eye.svg +0 -4
  14. package/src/assets/dashboard/gold.svg +0 -9
  15. package/src/assets/dashboard/percentage-square.svg +0 -6
  16. package/src/assets/dashboard/sapphire.svg +0 -9
  17. package/src/assets/dashboard/send-2.svg +0 -4
  18. package/src/assets/desktop.svg +0 -7
  19. package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.otf +0 -0
  20. package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.woff +0 -0
  21. package/src/assets/fonts/UniversalFeature/FeatureJungle-Light.woff2 +0 -0
  22. package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.otf +0 -0
  23. package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.woff +0 -0
  24. package/src/assets/fonts/UniversalFeature/FeatureJungle-Regular.woff2 +0 -0
  25. package/src/assets/fonts/UniversalJungle/UniversalJungle-420.otf +0 -0
  26. package/src/assets/fonts/UniversalJungle/UniversalJungle-420.woff +0 -0
  27. package/src/assets/fonts/UniversalJungle/UniversalJungle-420.woff2 +0 -0
  28. package/src/assets/fonts/UniversalJungle/UniversalJungle-515.otf +0 -0
  29. package/src/assets/fonts/UniversalJungle/UniversalJungle-515.woff +0 -0
  30. package/src/assets/fonts/UniversalJungle/UniversalJungle-515.woff2 +0 -0
  31. package/src/assets/instagram.svg +0 -9
  32. package/src/assets/mobile.svg +0 -4
  33. package/src/assets/no-data-image.svg +0 -41
  34. package/src/assets/no-image-icon.svg +0 -84
  35. package/src/assets/pexels.svg +0 -9
  36. package/src/assets/react.svg +0 -1
  37. package/src/assets/sounds/draft.mp3 +0 -0
  38. package/src/assets/sounds/error.mp3 +0 -0
  39. package/src/assets/sounds/publish.mp3 +0 -0
  40. package/src/assets/tablet.svg +0 -4
  41. package/src/assets/unsplash.svg +0 -3
  42. package/src/assets/upload-image.svg +0 -43
  43. package/src/assets/user.svg +0 -4
  44. package/src/components/shadcn/index.ts +0 -31
  45. package/src/config/env.ts +0 -15
  46. package/src/contexts/ThemeContext.tsx +0 -11
  47. package/src/data/users.json +0 -6014
  48. package/src/decorators/ActionModalDecorator.tsx +0 -10
  49. package/src/decorators/ApolloDecorator.tsx +0 -19
  50. package/src/decorators/DolosApolloDecorator.tsx +0 -31
  51. package/src/decorators/JestDecorators.tsx +0 -34
  52. package/src/decorators/ReactQueryDecorator.tsx +0 -13
  53. package/src/decorators/RouterDecorator.tsx +0 -5
  54. package/src/decorators/UnsafePropsDecorator.tsx +0 -0
  55. package/src/env.ts +0 -99
  56. package/src/hooks/use-autogrow.ts +0 -28
  57. package/src/hooks/use-mobile.ts +0 -19
  58. package/src/hooks/useAuthors.ts +0 -78
  59. package/src/hooks/useDebounce.ts +0 -18
  60. package/src/hooks/useMercuryProjectToken.ts +0 -112
  61. package/src/hooks/useProjectToken.ts +0 -21
  62. package/src/hooks/useTheme.ts +0 -12
  63. package/src/index.css +0 -397
  64. package/src/index.ts +0 -59
  65. package/src/mocks/env.ts +0 -12
  66. package/src/providers/QueryProvider/index.tsx +0 -10
  67. package/src/providers/ThemeProvider/index.tsx +0 -52
  68. package/src/types/category.types.ts +0 -13
  69. package/src/types/image.types.ts +0 -44
  70. package/src/types/post.types.ts +0 -121
  71. package/src/types/theme.types.ts +0 -10
  72. package/src/types/users.types.ts +0 -5
  73. package/src/utils/apolloClient.ts +0 -160
  74. package/src/utils/articleMetadata.ts +0 -92
  75. package/src/utils/audio.ts +0 -10
  76. package/src/utils/imageProcessing.ts +0 -399
  77. package/src/utils/images.ts +0 -279
  78. package/src/utils/mercury.ts +0 -0
  79. package/src/utils/utils.ts +0 -638
  80. package/src/utils/videos.ts +0 -29
  81. package/src/vite-env.d.ts +0 -1
package/.env.test ADDED
@@ -0,0 +1,5 @@
1
+ VITE_DOLOS_URL=https://dolos.hogfort.com
2
+ VITE_RECIPES_ENDPOINT=https://devrecipes.junglecreations.com/graphql
3
+ VITE_MUSE_ENDPOINT=https://muse.hogfort.com/graphql
4
+ VITE_MUSE_TOKEN=token
5
+ VITE_PHOENIX_ENDPOINT=/api/phoenix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wazobiatech/wazui",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "description": "`@repo/wazui` is a React component library that provides a set of reusable UI components, hooks, and providers for building modern web applications. It is built with TypeScript, Tailwind CSS, and integrates Shadcn UI components.",
6
6
  "homepage": "https://bitbucket.org/wazobiatech/wazui#readme",
@@ -15,9 +15,9 @@
15
15
  "author": "",
16
16
  "type": "module",
17
17
  "exports": {
18
- "./shadcn": "./src/components/shadcn/index.ts",
19
- "./styles.css": "./src/index.css",
20
- ".": "./src/index.ts"
18
+ "./shadcn": "./dist/components/shadcn/index.ts",
19
+ "./styles.css": "./dist/styles.css",
20
+ ".": "./dist/index.js"
21
21
  },
22
22
  "main": "index.js",
23
23
  "scripts": {
@@ -114,6 +114,7 @@
114
114
  "@storybook/react": "8.6.12",
115
115
  "@storybook/react-vite": "8.6.12",
116
116
  "@storybook/test": "8.6.12",
117
+ "@tailwindcss/postcss": "^4.1.18",
117
118
  "@testing-library/dom": "^10.4.0",
118
119
  "@testing-library/jest-dom": "^6.6.3",
119
120
  "@testing-library/react": "^16.3.0",
@@ -131,6 +132,7 @@
131
132
  "ajv": "^8.17.1",
132
133
  "ajv-draft-04": "^1.0.0",
133
134
  "ajv-keywords": "^5.1.0",
135
+ "autoprefixer": "^10.4.23",
134
136
  "babel-jest": "^29.7.0",
135
137
  "eslint": "^9.21.0",
136
138
  "eslint-plugin-jest": "^28.11.0",
@@ -149,7 +151,7 @@
149
151
  "storybook": "8.6.12",
150
152
  "typescript": "~5.7.2",
151
153
  "typescript-eslint": "^8.24.1",
152
- "vite": "^6.2.0",
154
+ "vite": "^7.3.0",
153
155
  "vite-plugin-dts": "^4.5.3",
154
156
  "vitest": "^3.1.1"
155
157
  },
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ plugins: [require('@tailwindcss/postcss'), require('autoprefixer')],
3
+ };
@@ -0,0 +1,70 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./src/**/*.{js,ts,jsx,tsx}'],
4
+ darkMode: 'class',
5
+ theme: {
6
+ extend: {
7
+ fontFamily: {
8
+ 'universal-jungle': ['UniversalJungle', 'sans-serif'],
9
+ 'universal-feature': ['UniversalFeature', 'sans-serif'],
10
+ },
11
+ borderRadius: {
12
+ lg: 'var(--radius)',
13
+ md: 'calc(var(--radius) - 2px)',
14
+ sm: 'calc(var(--radius) - 4px)',
15
+ },
16
+ colors: {
17
+ background: 'var(--background)',
18
+ foreground: 'var(--foreground)',
19
+ card: {
20
+ DEFAULT: 'var(--card)',
21
+ foreground: 'var(--card-foreground)',
22
+ },
23
+ popover: {
24
+ DEFAULT: 'var(--popover)',
25
+ foreground: 'var(--popover-foreground)',
26
+ },
27
+ primary: {
28
+ DEFAULT: 'var(--primary)',
29
+ foreground: 'var(--primary-foreground)',
30
+ },
31
+ secondary: {
32
+ DEFAULT: 'var(--secondary)',
33
+ foreground: 'var(--secondary-foreground)',
34
+ },
35
+ muted: {
36
+ DEFAULT: 'var(--muted)',
37
+ foreground: 'var(--muted-foreground)',
38
+ },
39
+ accent: {
40
+ DEFAULT: 'var(--accent)',
41
+ foreground: 'var(--accent-foreground)',
42
+ },
43
+ destructive: {
44
+ DEFAULT: 'var(--destructive)',
45
+ foreground: 'var(--destructive-foreground)',
46
+ },
47
+ border: 'var(--border)',
48
+ input: 'var(--input)',
49
+ ring: 'var(--ring)',
50
+ chart: {
51
+ 1: 'var(--chart-1)',
52
+ 2: 'var(--chart-2)',
53
+ 3: 'var(--chart-3)',
54
+ 4: 'var(--chart-4)',
55
+ 5: 'var(--chart-5)',
56
+ },
57
+ },
58
+ keyframes: {
59
+ 'wazui-progress-bar': {
60
+ '0%': { transform: 'translateX(-98%)' },
61
+ '100%': { transform: 'translateX(0%)' },
62
+ },
63
+ },
64
+ animation: {
65
+ 'wazui-progress-bar': 'wazui-progress-bar 0.5s ease-out',
66
+ },
67
+ },
68
+ },
69
+ plugins: [],
70
+ };
package/tsconfig.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "paths": {
6
6
  "@/*": ["./src/*"],
7
7
  "@config/env": ["src/env.ts"],
8
- "@repo/wazui/styles.css": ["../packages/wazui/src/index.css"]
8
+ "@wazobiatech/wazui/styles.css": ["../packages/wazui/src/index.css"]
9
9
  },
10
10
  "strict": true,
11
11
  "declaration": true,
package/vite.config.ts CHANGED
@@ -2,7 +2,8 @@ import { defineConfig } from 'vite';
2
2
  import { resolve } from 'path';
3
3
  import react from '@vitejs/plugin-react';
4
4
  import dts from 'vite-plugin-dts';
5
- import tailwindcss from '@tailwindcss/vite';
5
+ import tailwindcss from '@tailwindcss/postcss';
6
+ import autoprefixer from 'autoprefixer';
6
7
 
7
8
  export default defineConfig({
8
9
  server: {
@@ -35,16 +36,23 @@ export default defineConfig({
35
36
  react: 'React',
36
37
  'react-dom': 'ReactDOM',
37
38
  },
39
+ assetFileNames: 'styles.[ext]',
38
40
  },
39
41
  },
42
+ cssCodeSplit: false,
43
+ sourcemap: true,
44
+ },
45
+ css: {
46
+ postcss: {
47
+ plugins: [tailwindcss, autoprefixer],
48
+ },
40
49
  },
41
50
  plugins: [
42
51
  react(),
43
- tailwindcss(),
44
52
  dts({
45
- include: ['src', '.storybook'], // Ensure the "src" directory is included
46
- outDir: 'dist', // Output the declarations to the "dist" directory
47
- insertTypesEntry: true, // Add a "types" entry to the package.json
53
+ include: ['src'],
54
+ outDir: 'dist',
55
+ insertTypesEntry: true,
48
56
  }),
49
57
  ],
50
58
  });
@@ -1,41 +0,0 @@
1
- import type { StorybookConfig } from '@storybook/react-vite';
2
-
3
- const config: StorybookConfig = {
4
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5
- addons: [
6
- '@storybook/addon-essentials',
7
- '@storybook/addon-onboarding',
8
- '@chromatic-com/storybook',
9
- '@storybook/experimental-addon-test',
10
- '@storybook/addon-themes',
11
- ],
12
- framework: {
13
- name: '@storybook/react-vite',
14
- options: {},
15
- },
16
- viteFinal(storybookConfig) {
17
- if (!storybookConfig.build) storybookConfig.build = {};
18
- if (!storybookConfig.build.rollupOptions) storybookConfig.build.rollupOptions = {};
19
- if (!storybookConfig.build.rollupOptions.external)
20
- storybookConfig.build.rollupOptions.external = [];
21
-
22
- // Add external dependencies
23
- const external = storybookConfig.build.rollupOptions.external as string[];
24
- external.push('@storybook/types', '@storybook/internal/manager-api');
25
-
26
- // ✅ Add proxy for /api/phoenix
27
- // storybookConfig.server = storybookConfig.server || {};
28
- // storybookConfig.server.proxy = {
29
- // ...(storybookConfig.server.proxy || {}),
30
- // '/api/phoenix': {
31
- // target: 'https://phoenix.hogfort.com',
32
- // changeOrigin: true,
33
- // rewrite: (path: string) => path.replace(/^\/api\/phoenix/, '/graphql'),
34
- // },
35
- // };
36
-
37
- return storybookConfig;
38
- },
39
- };
40
-
41
- export default config;
@@ -1,3 +0,0 @@
1
- <!-- Load your CSS file -->
2
- <link rel="stylesheet" href="../src/index.css" />
3
- <link rel="stylesheet" href="./styles.css" />
@@ -1,53 +0,0 @@
1
- import '../src/index.css';
2
- import type { Preview } from '@storybook/react';
3
-
4
- import { withThemeByClassName } from '@storybook/addon-themes';
5
-
6
- import TimeAgo from 'javascript-time-ago';
7
-
8
- import en from 'javascript-time-ago/locale/en';
9
- import ru from 'javascript-time-ago/locale/ru';
10
- import { withApollo } from '../src/decorators/ApolloDecorator';
11
- import { withReactQuery } from '../src/decorators/ReactQueryDecorator';
12
- import { withRouter } from '../src/decorators/RouterDecorator';
13
- import { withActionModalProvider } from '../src/decorators/ActionModalDecorator';
14
-
15
- TimeAgo.addDefaultLocale(en);
16
- TimeAgo.addLocale(ru);
17
-
18
- export const decorators = [
19
- withThemeByClassName({
20
- themes: {
21
- light: 'light',
22
- dark: 'dark',
23
- brand: 'brand',
24
- },
25
- defaultTheme: 'light',
26
- parentSelector: 'html',
27
- }),
28
- withRouter,
29
- withReactQuery,
30
- withApollo,
31
- withActionModalProvider,
32
- ];
33
-
34
- const preview: Preview = {
35
- parameters: {
36
- controls: {
37
- matchers: {
38
- color: /(background|color)$/i,
39
- date: /Date$/i,
40
- },
41
- },
42
- backgrounds: {
43
- default: 'light',
44
- values: [
45
- { name: 'light', value: '#ffffff' },
46
- { name: 'dark', value: '#000000' },
47
- { name: 'brand', value: '#f0f0f0' },
48
- ],
49
- },
50
- },
51
- };
52
-
53
- export default preview;
@@ -1,6 +0,0 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M18.3332 13.9501V3.89174C18.3332 2.89174 17.5165 2.15008 16.5248 2.23341H16.4748C14.7248 2.38341 12.0665 3.27508 10.5832 4.20841L10.4415 4.30008C10.1998 4.45008 9.79984 4.45008 9.55817 4.30008L9.34984 4.17508C7.8665 3.25008 5.2165 2.36674 3.4665 2.22508C2.47484 2.14174 1.6665 2.89174 1.6665 3.88341V13.9501C1.6665 14.7501 2.3165 15.5001 3.1165 15.6001L3.35817 15.6334C5.1665 15.8751 7.95817 16.7917 9.55817 17.6667L9.5915 17.6834C9.8165 17.8084 10.1748 17.8084 10.3915 17.6834C11.9915 16.8001 14.7915 15.8751 16.6082 15.6334L16.8832 15.6001C17.6832 15.5001 18.3332 14.7501 18.3332 13.9501Z" stroke="#6574FF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M10 4.57422V17.0742" stroke="#6574FF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M6.4585 7.07422H4.5835" stroke="#6574FF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5
- <path d="M7.0835 9.57422H4.5835" stroke="#6574FF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
6
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9.1665 1.66602H7.49984C3.33317 1.66602 1.6665 3.33268 1.6665 7.49935V12.4993C1.6665 16.666 3.33317 18.3327 7.49984 18.3327H12.4998C16.6665 18.3327 18.3332 16.666 18.3332 12.4993V10.8327" stroke="#208B02" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M13.3666 2.51639L6.7999 9.08306C6.5499 9.33306 6.2999 9.82472 6.2499 10.1831L5.89157 12.6914C5.75823 13.5997 6.3999 14.2331 7.30823 14.1081L9.81657 13.7497C10.1666 13.6997 10.6582 13.4497 10.9166 13.1997L17.4832 6.63306C18.6166 5.49972 19.1499 4.18306 17.4832 2.51639C15.8166 0.849722 14.4999 1.38306 13.3666 2.51639Z" stroke="#208B02" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
4
- <path d="M12.4248 3.45898C12.9831 5.45065 14.5415 7.00898 16.5415 7.57565" stroke="#208B02" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
5
- </svg>