@versini/ui-main 5.0.3 → 5.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/dist/index.d.ts +33 -34
- package/dist/index.js +43 -12
- package/package.json +9 -9
- package/dist/components/Main/Main.js +0 -25
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export { MAIN_CLASSNAME, Main };
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
export declare const Main: ({ children, className, raw, noMargin, noPadding, ...otherProps }: MainProps) => JSX.Element;
|
|
4
|
+
|
|
5
|
+
export declare const MAIN_CLASSNAME = "av-main";
|
|
6
|
+
|
|
7
|
+
declare type MainProps = {
|
|
8
|
+
/**
|
|
9
|
+
* The children to render.
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* CSS class(es) to add to the main component wrapper.
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether or not to render the Main component with no styles.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
raw?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether or not to render the Main component with no margin.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
noMargin?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether or not to render the Main component with no padding.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
noPadding?: boolean;
|
|
31
|
+
} & React.HTMLAttributes<HTMLElement> & React.ComponentPropsWithRef<"main">;
|
|
32
|
+
|
|
33
|
+
export { }
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,49 @@
|
|
|
1
|
-
import { MAIN_CLASSNAME as o, Main as I } from "./components/Main/Main.js";
|
|
2
1
|
/*!
|
|
3
|
-
@versini/ui-main v5.0
|
|
2
|
+
@versini/ui-main v5.1.0
|
|
4
3
|
© 2025 gizmette.com
|
|
5
4
|
*/
|
|
6
5
|
try {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
6
|
+
if (!window.__VERSINI_UI_MAIN__) {
|
|
7
|
+
window.__VERSINI_UI_MAIN__ = {
|
|
8
|
+
version: "5.1.0",
|
|
9
|
+
buildTime: "11/04/2025 03:44 PM EST",
|
|
10
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
11
|
+
license: "MIT",
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
} catch (error) {
|
|
15
|
+
// nothing to declare officer
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
import { jsx } from "react/jsx-runtime";
|
|
19
|
+
import clsx from "clsx";
|
|
20
|
+
|
|
21
|
+
;// CONCATENATED MODULE: ./src/common/constants.ts
|
|
22
|
+
const MAIN_CLASSNAME = "av-main";
|
|
23
|
+
|
|
24
|
+
;// CONCATENATED MODULE: external "react/jsx-runtime"
|
|
25
|
+
|
|
26
|
+
;// CONCATENATED MODULE: external "clsx"
|
|
27
|
+
|
|
28
|
+
;// CONCATENATED MODULE: ./src/components/Main/Main.tsx
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const Main = ({ children, className, raw = false, noMargin = false, noPadding = false, ...otherProps })=>{
|
|
33
|
+
const mainClass = clsx(MAIN_CLASSNAME, {
|
|
34
|
+
"mt-2 sm:mt-3": !raw && !noMargin,
|
|
35
|
+
"p-2": !raw && !noPadding,
|
|
36
|
+
"flex w-full flex-col md:mx-auto md:max-w-4xl": !raw
|
|
37
|
+
}, className);
|
|
38
|
+
return /*#__PURE__*/ jsx("main", {
|
|
39
|
+
className: mainClass,
|
|
40
|
+
...otherProps,
|
|
41
|
+
children: children
|
|
42
|
+
});
|
|
18
43
|
};
|
|
44
|
+
|
|
45
|
+
;// CONCATENATED MODULE: ./src/components/index.ts
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
export { MAIN_CLASSNAME, Main };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-main",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build:check": "tsc",
|
|
23
|
-
"build:js": "
|
|
24
|
-
"build:types": "
|
|
25
|
-
"build": "npm-run-all --serial clean build:check build:js
|
|
23
|
+
"build:js": "rslib build",
|
|
24
|
+
"build:types": "echo 'Types now built with rslib'",
|
|
25
|
+
"build": "npm-run-all --serial clean build:check build:js",
|
|
26
26
|
"clean": "rimraf dist tmp",
|
|
27
|
-
"dev:js": "
|
|
28
|
-
"dev:types": "
|
|
29
|
-
"dev": "
|
|
27
|
+
"dev:js": "rslib build --watch",
|
|
28
|
+
"dev:types": "echo 'Types now watched with rslib'",
|
|
29
|
+
"dev": "rslib build --watch",
|
|
30
30
|
"lint": "biome lint src",
|
|
31
31
|
"lint:fix": "biome check src --write --no-errors-on-unmatched",
|
|
32
32
|
"prettier": "biome check --write --no-errors-on-unmatched",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@tailwindcss/typography": "0.5.19",
|
|
44
|
-
"tailwindcss": "4.1.
|
|
44
|
+
"tailwindcss": "4.1.16"
|
|
45
45
|
},
|
|
46
46
|
"sideEffects": [
|
|
47
47
|
"**/*.css"
|
|
48
48
|
],
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "7484ad443b77ef31e52ae3a7d88b8129bc6cdf1d"
|
|
50
50
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import n from "clsx";
|
|
3
|
-
const x = "av-main", r = ({
|
|
4
|
-
children: s,
|
|
5
|
-
className: l,
|
|
6
|
-
raw: m = !1,
|
|
7
|
-
noMargin: a = !1,
|
|
8
|
-
noPadding: o = !1,
|
|
9
|
-
...t
|
|
10
|
-
}) => {
|
|
11
|
-
const e = n(
|
|
12
|
-
x,
|
|
13
|
-
{
|
|
14
|
-
"mt-2 sm:mt-3": !m && !a,
|
|
15
|
-
"p-2": !m && !o,
|
|
16
|
-
"flex w-full flex-col md:mx-auto md:max-w-4xl": !m
|
|
17
|
-
},
|
|
18
|
-
l
|
|
19
|
-
);
|
|
20
|
-
return /* @__PURE__ */ f("main", { className: e, ...t, children: s });
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
x as MAIN_CLASSNAME,
|
|
24
|
-
r as Main
|
|
25
|
-
};
|