@neoptocom/neopto-ui 0.7.3 → 0.7.4
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 +8 -4
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/components/AppBackground.tsx +5 -4
package/README.md
CHANGED
|
@@ -100,11 +100,13 @@ This library uses **Tailwind CSS v4** utility classes directly in components (e.
|
|
|
100
100
|
|
|
101
101
|
### AppBackground
|
|
102
102
|
|
|
103
|
+
A full-page background component with built-in light/dark mode support and smooth transitions.
|
|
104
|
+
|
|
103
105
|
```tsx
|
|
104
|
-
import { AppBackground
|
|
106
|
+
import { AppBackground } from "@neoptocom/neopto-ui";
|
|
105
107
|
|
|
106
|
-
// Use
|
|
107
|
-
<AppBackground
|
|
108
|
+
// Use default NeoPTO branded backgrounds (recommended)
|
|
109
|
+
<AppBackground>
|
|
108
110
|
<YourApp />
|
|
109
111
|
</AppBackground>
|
|
110
112
|
|
|
@@ -114,9 +116,11 @@ import { AppBackground, assets } from "@neoptocom/neopto-ui";
|
|
|
114
116
|
darkImage="/path/to/dark-bg.jpg"
|
|
115
117
|
>
|
|
116
118
|
<YourApp />
|
|
117
|
-
</AppBackground
|
|
119
|
+
</AppBackground>
|
|
118
120
|
```
|
|
119
121
|
|
|
122
|
+
**Best Practice:** Add `AppBackground` to your root layout (`app/layout.tsx`) so it wraps your entire app and persists across pages.
|
|
123
|
+
|
|
120
124
|
### Button
|
|
121
125
|
|
|
122
126
|
```tsx
|
package/dist/index.cjs
CHANGED
|
@@ -58,8 +58,8 @@ var agentNeopto = agent_neopto_default;
|
|
|
58
58
|
var agentNeoptoDark = agent_neopto_dark_default;
|
|
59
59
|
function AppBackground({
|
|
60
60
|
children,
|
|
61
|
-
lightImage,
|
|
62
|
-
darkImage,
|
|
61
|
+
lightImage = bgLight,
|
|
62
|
+
darkImage = bgDark,
|
|
63
63
|
className = ""
|
|
64
64
|
}) {
|
|
65
65
|
const hasImages = lightImage || darkImage;
|
package/dist/index.d.cts
CHANGED
|
@@ -17,9 +17,9 @@ declare namespace index {
|
|
|
17
17
|
type AppBackgroundProps = {
|
|
18
18
|
/** Content to render inside the background */
|
|
19
19
|
children: React.ReactNode;
|
|
20
|
-
/** Background image URL for light mode */
|
|
20
|
+
/** Background image URL for light mode (defaults to library's light background) */
|
|
21
21
|
lightImage?: string;
|
|
22
|
-
/** Background image URL for dark mode */
|
|
22
|
+
/** Background image URL for dark mode (defaults to library's dark background) */
|
|
23
23
|
darkImage?: string;
|
|
24
24
|
/** Additional CSS classes */
|
|
25
25
|
className?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ declare namespace index {
|
|
|
17
17
|
type AppBackgroundProps = {
|
|
18
18
|
/** Content to render inside the background */
|
|
19
19
|
children: React.ReactNode;
|
|
20
|
-
/** Background image URL for light mode */
|
|
20
|
+
/** Background image URL for light mode (defaults to library's light background) */
|
|
21
21
|
lightImage?: string;
|
|
22
|
-
/** Background image URL for dark mode */
|
|
22
|
+
/** Background image URL for dark mode (defaults to library's dark background) */
|
|
23
23
|
darkImage?: string;
|
|
24
24
|
/** Additional CSS classes */
|
|
25
25
|
className?: string;
|
package/dist/index.js
CHANGED
|
@@ -37,8 +37,8 @@ var agentNeopto = agent_neopto_default;
|
|
|
37
37
|
var agentNeoptoDark = agent_neopto_dark_default;
|
|
38
38
|
function AppBackground({
|
|
39
39
|
children,
|
|
40
|
-
lightImage,
|
|
41
|
-
darkImage,
|
|
40
|
+
lightImage = bgLight,
|
|
41
|
+
darkImage = bgDark,
|
|
42
42
|
className = ""
|
|
43
43
|
}) {
|
|
44
44
|
const hasImages = lightImage || darkImage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neoptocom/neopto-ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive Storybook documentation. Requires Tailwind v4+.",
|
|
6
6
|
"keywords": [
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import * as assets from "../assets";
|
|
2
3
|
|
|
3
4
|
export type AppBackgroundProps = {
|
|
4
5
|
/** Content to render inside the background */
|
|
5
6
|
children: React.ReactNode;
|
|
6
|
-
/** Background image URL for light mode */
|
|
7
|
+
/** Background image URL for light mode (defaults to library's light background) */
|
|
7
8
|
lightImage?: string;
|
|
8
|
-
/** Background image URL for dark mode */
|
|
9
|
+
/** Background image URL for dark mode (defaults to library's dark background) */
|
|
9
10
|
darkImage?: string;
|
|
10
11
|
/** Additional CSS classes */
|
|
11
12
|
className?: string;
|
|
@@ -13,8 +14,8 @@ export type AppBackgroundProps = {
|
|
|
13
14
|
|
|
14
15
|
export function AppBackground({
|
|
15
16
|
children,
|
|
16
|
-
lightImage,
|
|
17
|
-
darkImage,
|
|
17
|
+
lightImage = assets.bgLight,
|
|
18
|
+
darkImage = assets.bgDark,
|
|
18
19
|
className = "",
|
|
19
20
|
}: AppBackgroundProps) {
|
|
20
21
|
const hasImages = lightImage || darkImage;
|