@purr-react-tailwindcss/components.navbar 0.0.1 → 0.0.2

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.
@@ -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, classes, htmlAttributes, leftButtonHtmlAttributes, titleHtmlAttributes, rightButtonHtmlAttributes, }: INavbarProps) => React.JSX.Element;
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"),r=require("clsx"),j=({title:n,leftButton:i,rightButton:f,classes:t,htmlAttributes:u,leftButtonHtmlAttributes:x,titleHtmlAttributes:o,rightButtonHtmlAttributes:h})=>e.jsxs("nav",{className:r("fixed","top-0","left-0","right-0","flex","justify-around","items-center","h-14","bg-gray-900",t==null?void 0:t.container),...u,children:[e.jsx("span",{className:r("flex","flex-1","justify-center","items-center","h-full",t==null?void 0:t.leftButton),...x,children:i}),e.jsx("span",{className:r("flex","flex-1","justify-center","items-center","h-full",t==null?void 0:t.title),...o,children:n}),e.jsx("span",{className:r("flex","flex-1","justify-center","items-center","h-full",t==null?void 0:t.rightButton),...h,children:f})]});exports.Navbar=j;
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 h, jsx as n } from "react/jsx-runtime";
2
- import r from "clsx";
3
- const j = ({
4
- title: e,
5
- leftButton: f,
6
- rightButton: i,
7
- classes: t,
8
- htmlAttributes: m,
9
- leftButtonHtmlAttributes: x,
10
- titleHtmlAttributes: o,
11
- rightButtonHtmlAttributes: u
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: r(
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
- ...m,
25
+ ...f,
28
26
  children: [
29
- /* @__PURE__ */ n(
27
+ /* @__PURE__ */ s(
30
28
  "span",
31
29
  {
32
- className: r(
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
- ...x,
41
- children: f
37
+ ...n,
38
+ children: t
42
39
  }
43
40
  ),
44
- /* @__PURE__ */ n(
41
+ /* @__PURE__ */ s(
45
42
  "span",
46
43
  {
47
- className: r(
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
- ...o,
56
- children: e
51
+ ...c,
52
+ children: l
57
53
  }
58
54
  ),
59
- /* @__PURE__ */ n(
55
+ /* @__PURE__ */ s(
60
56
  "span",
61
57
  {
62
- className: r(
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
- ...u,
71
- children: i
65
+ ...a,
66
+ children: r
72
67
  }
73
68
  )
74
69
  ]
75
70
  }
76
71
  );
77
72
  export {
78
- j as Navbar
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.1",
3
+ "version": "0.0.2",
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.5"
27
+ "@purr-core/utils.definitions": "0.0.6"
28
28
  },
29
29
  "devDependencies": {
30
- "@purr-react-tailwindcss/components.button": "0.0.1"
30
+ "@purr-react-tailwindcss/components.button": "0.0.2"
31
31
  },
32
32
  "author": "@DinhThienPhuc",
33
33
  "license": "ISC",