@purr-react-tailwindcss/components.navbar 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.
- package/dist/_components.d.ts +1 -1
- package/dist/_types.d.ts +0 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +30 -35
- package/package.json +3 -3
package/dist/_components.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { INavbarProps } from './_types';
|
|
3
3
|
|
|
4
|
-
export declare const Navbar: ({ title, leftButton, rightButton,
|
|
4
|
+
export declare const Navbar: ({ title, leftButton, rightButton, htmlAttributes, leftButtonHtmlAttributes, titleHtmlAttributes, rightButtonHtmlAttributes, }: INavbarProps) => React.JSX.Element;
|
package/dist/_types.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
2
|
import { IExtendable } from '@purr-core/utils.definitions';
|
|
4
3
|
|
|
5
|
-
export interface INavbarClasses {
|
|
6
|
-
container?: ClassValue;
|
|
7
|
-
title?: ClassValue;
|
|
8
|
-
leftButton?: ClassValue;
|
|
9
|
-
rightButton?: ClassValue;
|
|
10
|
-
}
|
|
11
4
|
export interface INavbarProps {
|
|
12
5
|
leftButton?: ReactNode;
|
|
13
6
|
rightButton?: ReactNode;
|
|
14
7
|
title?: ReactNode;
|
|
15
|
-
classes?: INavbarClasses;
|
|
16
8
|
htmlAttributes?: HTMLAttributes<HTMLDivElement> & IExtendable;
|
|
17
9
|
leftButtonHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
|
|
18
10
|
titleHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("clsx"),f=({title:t,leftButton:l,rightButton:r,htmlAttributes:n,leftButtonHtmlAttributes:c,titleHtmlAttributes:a,rightButtonHtmlAttributes:i})=>e.jsxs("nav",{className:s("fixed","top-0","left-0","right-0","flex","justify-around","items-center","h-14","bg-gray-900"),...n,children:[e.jsx("span",{className:s("flex","flex-1","justify-center","items-center","h-full"),...c,children:l}),e.jsx("span",{className:s("flex","flex-1","justify-center","items-center","h-full"),...a,children:t}),e.jsx("span",{className:s("flex","flex-1","justify-center","items-center","h-full"),...i,children:r})]});exports.Navbar=f;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
title:
|
|
5
|
-
leftButton:
|
|
6
|
-
rightButton:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}) => /* @__PURE__ */ h(
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import e from "clsx";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: l,
|
|
5
|
+
leftButton: t,
|
|
6
|
+
rightButton: r,
|
|
7
|
+
htmlAttributes: f,
|
|
8
|
+
leftButtonHtmlAttributes: n,
|
|
9
|
+
titleHtmlAttributes: c,
|
|
10
|
+
rightButtonHtmlAttributes: a
|
|
11
|
+
}) => /* @__PURE__ */ i(
|
|
13
12
|
"nav",
|
|
14
13
|
{
|
|
15
|
-
className:
|
|
14
|
+
className: e(
|
|
16
15
|
"fixed",
|
|
17
16
|
"top-0",
|
|
18
17
|
"left-0",
|
|
@@ -21,59 +20,55 @@ const j = ({
|
|
|
21
20
|
"justify-around",
|
|
22
21
|
"items-center",
|
|
23
22
|
"h-14",
|
|
24
|
-
"bg-gray-900"
|
|
25
|
-
t == null ? void 0 : t.container
|
|
23
|
+
"bg-gray-900"
|
|
26
24
|
),
|
|
27
|
-
...
|
|
25
|
+
...f,
|
|
28
26
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ s(
|
|
30
28
|
"span",
|
|
31
29
|
{
|
|
32
|
-
className:
|
|
30
|
+
className: e(
|
|
33
31
|
"flex",
|
|
34
32
|
"flex-1",
|
|
35
33
|
"justify-center",
|
|
36
34
|
"items-center",
|
|
37
|
-
"h-full"
|
|
38
|
-
t == null ? void 0 : t.leftButton
|
|
35
|
+
"h-full"
|
|
39
36
|
),
|
|
40
|
-
...
|
|
41
|
-
children:
|
|
37
|
+
...n,
|
|
38
|
+
children: t
|
|
42
39
|
}
|
|
43
40
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ s(
|
|
45
42
|
"span",
|
|
46
43
|
{
|
|
47
|
-
className:
|
|
44
|
+
className: e(
|
|
48
45
|
"flex",
|
|
49
46
|
"flex-1",
|
|
50
47
|
"justify-center",
|
|
51
48
|
"items-center",
|
|
52
|
-
"h-full"
|
|
53
|
-
t == null ? void 0 : t.title
|
|
49
|
+
"h-full"
|
|
54
50
|
),
|
|
55
|
-
...
|
|
56
|
-
children:
|
|
51
|
+
...c,
|
|
52
|
+
children: l
|
|
57
53
|
}
|
|
58
54
|
),
|
|
59
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ s(
|
|
60
56
|
"span",
|
|
61
57
|
{
|
|
62
|
-
className:
|
|
58
|
+
className: e(
|
|
63
59
|
"flex",
|
|
64
60
|
"flex-1",
|
|
65
61
|
"justify-center",
|
|
66
62
|
"items-center",
|
|
67
|
-
"h-full"
|
|
68
|
-
t == null ? void 0 : t.rightButton
|
|
63
|
+
"h-full"
|
|
69
64
|
),
|
|
70
|
-
...
|
|
71
|
-
children:
|
|
65
|
+
...a,
|
|
66
|
+
children: r
|
|
72
67
|
}
|
|
73
68
|
)
|
|
74
69
|
]
|
|
75
70
|
}
|
|
76
71
|
);
|
|
77
72
|
export {
|
|
78
|
-
|
|
73
|
+
h as Navbar
|
|
79
74
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purr-react-tailwindcss/components.navbar",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"typescript": "*",
|
|
25
25
|
"react": "*",
|
|
26
26
|
"clsx": "*",
|
|
27
|
-
"@purr-core/utils.definitions": "0.0.
|
|
27
|
+
"@purr-core/utils.definitions": "0.0.7"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@purr-react-tailwindcss/components.button": "0.0.
|
|
30
|
+
"@purr-react-tailwindcss/components.button": "0.0.3"
|
|
31
31
|
},
|
|
32
32
|
"author": "@DinhThienPhuc",
|
|
33
33
|
"license": "ISC",
|