@versini/ui-main 4.0.8 → 4.0.10
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 +20 -33
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @versini/ui-main
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@versini/ui-main)
|
|
4
|
+
>)
|
|
4
5
|
|
|
5
6
|
> A semantic and accessible React main component built with TypeScript and TailwindCSS.
|
|
6
7
|
|
|
7
8
|
The Main component provides a semantic main element for page content with customizable margins, padding, and styling options. Perfect for creating accessible page layouts and content areas.
|
|
8
9
|
|
|
9
|
-
|
|
10
10
|
## Table of Contents
|
|
11
11
|
|
|
12
12
|
- [Features](#features)
|
|
@@ -27,7 +27,7 @@ The Main component provides a semantic main element for page content with custom
|
|
|
27
27
|
npm install @versini/ui-main
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
> **Note**: This component requires TailwindCSS and the `@versini/ui-styles` plugin for proper styling. See the [
|
|
30
|
+
> **Note**: This component requires TailwindCSS and the `@versini/ui-styles` plugin for proper styling. See the [installation documentation](https://versini-org.github.io/ui-components/?path=/docs/getting-started-installation--docs) for complete setup instructions.
|
|
31
31
|
|
|
32
32
|
## Usage
|
|
33
33
|
|
|
@@ -83,15 +83,15 @@ function App() {
|
|
|
83
83
|
|
|
84
84
|
### Main Props
|
|
85
85
|
|
|
86
|
-
| Prop
|
|
87
|
-
|
|
88
|
-
| children
|
|
89
|
-
| noMargin
|
|
90
|
-
| noPadding | `boolean`
|
|
91
|
-
| raw
|
|
92
|
-
| className | `string`
|
|
86
|
+
| Prop | Type | Default | Description |
|
|
87
|
+
| --------- | ----------------- | ------- | -------------------------------------------------- |
|
|
88
|
+
| children | `React.ReactNode` | - | The children to render |
|
|
89
|
+
| noMargin | `boolean` | `false` | Whether to render without margin |
|
|
90
|
+
| noPadding | `boolean` | `false` | Whether to render without padding |
|
|
91
|
+
| raw | `boolean` | `false` | Whether to render with no styles |
|
|
92
|
+
| className | `string` | - | CSS class(es) to add to the main component wrapper |
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
_Also supports all standard HTML main element attributes_
|
|
95
95
|
|
|
96
96
|
## Examples
|
|
97
97
|
|
|
@@ -108,14 +108,14 @@ function PageLayout() {
|
|
|
108
108
|
<Header sticky>
|
|
109
109
|
<nav>Navigation content</nav>
|
|
110
110
|
</Header>
|
|
111
|
-
|
|
111
|
+
|
|
112
112
|
<Main className="flex-1">
|
|
113
113
|
<div className="max-w-7xl mx-auto px-4 py-8">
|
|
114
114
|
<h1>Page Title</h1>
|
|
115
115
|
<p>Main page content...</p>
|
|
116
116
|
</div>
|
|
117
117
|
</Main>
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
<Footer row1="© 2024 Company" />
|
|
120
120
|
</div>
|
|
121
121
|
);
|
|
@@ -135,11 +135,11 @@ function ArticleLayout() {
|
|
|
135
135
|
<h1>Understanding React Components</h1>
|
|
136
136
|
<time dateTime="2024-01-15">January 15, 2024</time>
|
|
137
137
|
</header>
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
<section>
|
|
140
140
|
<p>Introduction to the article...</p>
|
|
141
141
|
</section>
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
<section>
|
|
144
144
|
<h2>Core Concepts</h2>
|
|
145
145
|
<p>Main content...</p>
|
|
@@ -157,18 +157,12 @@ import { Main } from "@versini/ui-main";
|
|
|
157
157
|
|
|
158
158
|
function DashboardLayout() {
|
|
159
159
|
return (
|
|
160
|
-
<Main
|
|
161
|
-
noMargin
|
|
162
|
-
noPadding
|
|
163
|
-
className="min-h-screen bg-gray-50"
|
|
164
|
-
>
|
|
160
|
+
<Main noMargin noPadding className="min-h-screen bg-gray-50">
|
|
165
161
|
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6 p-6">
|
|
166
162
|
<aside className="lg:col-span-1">
|
|
167
|
-
<div className="bg-white rounded-lg shadow p-4">
|
|
168
|
-
Sidebar content
|
|
169
|
-
</div>
|
|
163
|
+
<div className="bg-white rounded-lg shadow p-4">Sidebar content</div>
|
|
170
164
|
</aside>
|
|
171
|
-
|
|
165
|
+
|
|
172
166
|
<section className="lg:col-span-3">
|
|
173
167
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
174
168
|
<div className="bg-white rounded-lg shadow p-6">
|
|
@@ -192,18 +186,14 @@ import { Main } from "@versini/ui-main";
|
|
|
192
186
|
|
|
193
187
|
function FullWidthContent() {
|
|
194
188
|
return (
|
|
195
|
-
<Main
|
|
196
|
-
noMargin
|
|
197
|
-
noPadding
|
|
198
|
-
className="w-full"
|
|
199
|
-
>
|
|
189
|
+
<Main noMargin noPadding className="w-full">
|
|
200
190
|
<section className="bg-blue-600 text-white py-20">
|
|
201
191
|
<div className="container mx-auto text-center">
|
|
202
192
|
<h1 className="text-4xl font-bold">Hero Section</h1>
|
|
203
193
|
<p className="text-xl mt-4">Full-width hero content</p>
|
|
204
194
|
</div>
|
|
205
195
|
</section>
|
|
206
|
-
|
|
196
|
+
|
|
207
197
|
<section className="py-16">
|
|
208
198
|
<div className="container mx-auto">
|
|
209
199
|
<h2 className="text-3xl font-bold text-center mb-8">Features</h2>
|
|
@@ -226,10 +216,7 @@ import { Main } from "@versini/ui-main";
|
|
|
226
216
|
|
|
227
217
|
function RawMain() {
|
|
228
218
|
return (
|
|
229
|
-
<Main
|
|
230
|
-
raw
|
|
231
|
-
className="my-custom-main-styles"
|
|
232
|
-
>
|
|
219
|
+
<Main raw className="my-custom-main-styles">
|
|
233
220
|
<div className="completely-custom-layout">
|
|
234
221
|
Custom main with no default styles
|
|
235
222
|
</div>
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MAIN_CLASSNAME as o, Main as I } from "./components/Main/Main.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-main v4.0.
|
|
3
|
+
@versini/ui-main v4.0.10
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
|
|
8
|
-
version: "4.0.
|
|
9
|
-
buildTime: "08/23/2025
|
|
8
|
+
version: "4.0.10",
|
|
9
|
+
buildTime: "08/23/2025 12:23 PM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-main",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d568e20474c6c87f836c4cb6548f2cc0143a353c"
|
|
54
54
|
}
|