pelatform-ui 1.1.0
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 +259 -0
- package/css/components/apexcharts.css +101 -0
- package/css/components/book.css +19 -0
- package/css/components/extra.css +12 -0
- package/css/components/image-input.css +51 -0
- package/css/components/leaflet.css +25 -0
- package/css/components/patterns.css +34 -0
- package/css/components/rating.css +89 -0
- package/css/components/scrollable.css +118 -0
- package/css/components/theme-transition.css +51 -0
- package/css/theme.css +243 -0
- package/dist/animation.d.ts +5 -0
- package/dist/animation.js +2 -0
- package/dist/aria.d.ts +1 -0
- package/dist/aria.js +2 -0
- package/dist/base.d.ts +1 -0
- package/dist/base.js +2 -0
- package/dist/chunk-2MIG2DIO.js +51 -0
- package/dist/components.d.ts +2987 -0
- package/dist/components.js +2316 -0
- package/dist/default.d.ts +1 -0
- package/dist/default.js +2 -0
- package/dist/hooks.d.ts +93 -0
- package/dist/hooks.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +111 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@pelatform/ui.default';
|
package/dist/default.js
ADDED
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export * from '@pelatform/ui.hook';
|
|
2
|
+
import { META_THEME_COLORS } from '@pelatform/ui.general';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Meta theme color management hook for React components
|
|
6
|
+
* Automatically manages HTML meta theme-color tag based on current theme
|
|
7
|
+
* Integrates with next-themes for seamless theme switching
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Hook for managing HTML meta theme-color tag based on current theme
|
|
12
|
+
*
|
|
13
|
+
* This hook automatically calculates the appropriate meta theme color
|
|
14
|
+
* based on the current theme (light/dark) and provides utilities for
|
|
15
|
+
* manual meta color manipulation.
|
|
16
|
+
*
|
|
17
|
+
* Features:
|
|
18
|
+
* - Automatic theme color calculation based on resolved theme
|
|
19
|
+
* - Support for custom color configurations
|
|
20
|
+
* - Manual meta color setting capability
|
|
21
|
+
* - Integration with next-themes
|
|
22
|
+
*
|
|
23
|
+
* @param defaultColors - Optional custom color configuration (defaults to META_THEME_COLORS)
|
|
24
|
+
* @returns Object containing current meta color and setter function
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* // Basic usage with default colors (supports light, dark, and system)
|
|
29
|
+
* function App() {
|
|
30
|
+
* const { metaColor, setMetaColor } = useMetaColor();
|
|
31
|
+
*
|
|
32
|
+
* // metaColor automatically updates based on theme (light/dark/system)
|
|
33
|
+
* useEffect(() => {
|
|
34
|
+
* console.log('Current meta color:', metaColor);
|
|
35
|
+
* }, [metaColor]);
|
|
36
|
+
*
|
|
37
|
+
* return <div>App content</div>;
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* // Custom colors with system theme support
|
|
41
|
+
* function CustomThemeApp() {
|
|
42
|
+
* const customColors = {
|
|
43
|
+
* light: '#f0f0f0',
|
|
44
|
+
* dark: '#1a1a1a',
|
|
45
|
+
* system: 'auto' // Will resolve to light or dark based on OS preference
|
|
46
|
+
* };
|
|
47
|
+
* const { metaColor } = useMetaColor(customColors);
|
|
48
|
+
*
|
|
49
|
+
* return <div style={{ backgroundColor: metaColor }}>Custom themed app</div>;
|
|
50
|
+
* }
|
|
51
|
+
*
|
|
52
|
+
* // Manual meta color override for special pages
|
|
53
|
+
* function SpecialPage() {
|
|
54
|
+
* const { setMetaColor } = useMetaColor();
|
|
55
|
+
*
|
|
56
|
+
* useEffect(() => {
|
|
57
|
+
* // Override meta color for this page
|
|
58
|
+
* setMetaColor('#ff0000');
|
|
59
|
+
*
|
|
60
|
+
* // Cleanup: reset to theme color when leaving page
|
|
61
|
+
* return () => {
|
|
62
|
+
* setMetaColor(''); // This will revert to theme-based color
|
|
63
|
+
* };
|
|
64
|
+
* }, [setMetaColor]);
|
|
65
|
+
*
|
|
66
|
+
* return <div>Special page with red theme color</div>;
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
69
|
+
* // Integration with theme switcher
|
|
70
|
+
* function ThemeAwareComponent() {
|
|
71
|
+
* const { theme, setTheme } = useTheme();
|
|
72
|
+
* const { metaColor } = useMetaColor();
|
|
73
|
+
*
|
|
74
|
+
* return (
|
|
75
|
+
* <div>
|
|
76
|
+
* <p>Current theme: {theme}</p>
|
|
77
|
+
* <p>Meta color: {metaColor}</p>
|
|
78
|
+
* <button onClick={() => setTheme('light')}>Light</button>
|
|
79
|
+
* <button onClick={() => setTheme('dark')}>Dark</button>
|
|
80
|
+
* <button onClick={() => setTheme('system')}>System</button>
|
|
81
|
+
* </div>
|
|
82
|
+
* );
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare function useMetaColor(defaultColors?: typeof META_THEME_COLORS): {
|
|
87
|
+
/** Current meta theme color based on resolved theme */
|
|
88
|
+
metaColor: "#09090b" | "#ffffff";
|
|
89
|
+
/** Function to manually set meta theme color */
|
|
90
|
+
setMetaColor: (color: string) => void;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { useMetaColor };
|
package/dist/hooks.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@pelatform/ui.general';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pelatform-ui",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A Modern and Minimal React UI Library built with TailwindCSS.",
|
|
5
|
+
"author": "Pelatform",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
"./css": "./css/theme.css",
|
|
13
|
+
"./css/*": "./css/components/*.css",
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./animation": {
|
|
19
|
+
"types": "./dist/animation.d.ts",
|
|
20
|
+
"default": "./dist/animation.js"
|
|
21
|
+
},
|
|
22
|
+
"./aria": {
|
|
23
|
+
"types": "./dist/aria.d.ts",
|
|
24
|
+
"default": "./dist/aria.js"
|
|
25
|
+
},
|
|
26
|
+
"./base": {
|
|
27
|
+
"types": "./dist/base.d.ts",
|
|
28
|
+
"default": "./dist/base.js"
|
|
29
|
+
},
|
|
30
|
+
"./default": {
|
|
31
|
+
"types": "./dist/default.d.ts",
|
|
32
|
+
"default": "./dist/default.js"
|
|
33
|
+
},
|
|
34
|
+
"./hooks": {
|
|
35
|
+
"types": "./dist/hooks.d.ts",
|
|
36
|
+
"default": "./dist/hooks.js"
|
|
37
|
+
},
|
|
38
|
+
"./components": {
|
|
39
|
+
"types": "./dist/components.d.ts",
|
|
40
|
+
"default": "./dist/components.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"clean": "rimraf dist",
|
|
45
|
+
"clean:all": "rimraf .turbo dist node_modules",
|
|
46
|
+
"dev": "tsup --watch",
|
|
47
|
+
"build": "tsup",
|
|
48
|
+
"types:check": "tsc --noEmit"
|
|
49
|
+
},
|
|
50
|
+
"repository": "github:devpelatform/ui",
|
|
51
|
+
"homepage": "https://github.com/devpelatform/ui",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/devpelatform/ui/issues"
|
|
54
|
+
},
|
|
55
|
+
"files": [
|
|
56
|
+
"css",
|
|
57
|
+
"dist"
|
|
58
|
+
],
|
|
59
|
+
"keywords": [
|
|
60
|
+
"pelatform",
|
|
61
|
+
"ui",
|
|
62
|
+
"react",
|
|
63
|
+
"nextjs",
|
|
64
|
+
"vite",
|
|
65
|
+
"tailwindcss",
|
|
66
|
+
"components",
|
|
67
|
+
"animation"
|
|
68
|
+
],
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@pelatform/ui.animation": "0.1.0",
|
|
71
|
+
"@pelatform/ui.aria": "0.1.0",
|
|
72
|
+
"@pelatform/ui.base": "0.1.0",
|
|
73
|
+
"@pelatform/ui.default": "0.1.0",
|
|
74
|
+
"@pelatform/ui.general": "0.1.1",
|
|
75
|
+
"@pelatform/ui.hook": "0.1.1",
|
|
76
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
77
|
+
"radix-ui": "^1.4.3",
|
|
78
|
+
"tw-animate-css": "^1.4.0"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@pelatform/tsconfig": "^0.1.1",
|
|
82
|
+
"@tanstack/react-query": "^5.90.11",
|
|
83
|
+
"@types/node": "^24.10.1",
|
|
84
|
+
"@types/react": "^19.2.7",
|
|
85
|
+
"lucide-react": "^0.555.0",
|
|
86
|
+
"motion": "^12.23.25",
|
|
87
|
+
"next-themes": "^0.4.6",
|
|
88
|
+
"react": "^19.2.0",
|
|
89
|
+
"sonner": "^2.0.7",
|
|
90
|
+
"tsup": "^8.5.1",
|
|
91
|
+
"typescript": "^5.9.3"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@tanstack/react-query": ">=5.90.0",
|
|
95
|
+
"lucide-react": ">=0.55.0",
|
|
96
|
+
"motion": ">=12.2.0",
|
|
97
|
+
"next-themes": ">=0.4.0",
|
|
98
|
+
"sonner": ">=2.0.0",
|
|
99
|
+
"react": ">=18.0.0 || >=19.0.0-rc.0",
|
|
100
|
+
"react-dom": ">=18.0.0 || >=19.0.0-rc.0"
|
|
101
|
+
},
|
|
102
|
+
"publishConfig": {
|
|
103
|
+
"registry": "https://registry.npmjs.org/",
|
|
104
|
+
"access": "public"
|
|
105
|
+
},
|
|
106
|
+
"lint-staged": {
|
|
107
|
+
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts}": "biome check --write --no-errors-on-unmatched",
|
|
108
|
+
"*.{md,yml,yaml}": "prettier --write",
|
|
109
|
+
"*.{json,jsonc,html}": "biome format --write --no-errors-on-unmatched"
|
|
110
|
+
}
|
|
111
|
+
}
|