@purr-react-tailwindcss/components.navbar 0.0.6 → 0.0.8

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.cjs CHANGED
@@ -1 +1 @@
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;
1
+ 'use strict';var e=require('clsx'),r=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var e__default=/*#__PURE__*/_interopDefault(e);var r__default=/*#__PURE__*/_interopDefault(r);var i=({title:s,leftButton:t,rightButton:a,htmlAttributes:f,leftButtonHtmlAttributes:l,titleHtmlAttributes:n,rightButtonHtmlAttributes:m})=>r__default.default.createElement("nav",{className:e__default.default("fixed","top-0","left-0","right-0","flex","justify-around","items-center","h-14","bg-gray-900"),...f},r__default.default.createElement("span",{className:e__default.default("flex","flex-1","justify-center","items-center","h-full"),...l},t),r__default.default.createElement("span",{className:e__default.default("flex","flex-1","justify-center","items-center","h-full"),...n},s),r__default.default.createElement("span",{className:e__default.default("flex","flex-1","justify-center","items-center","h-full"),...m},a));exports.Navbar=i;
@@ -1,7 +1,7 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
2
  import { IExtendable } from '@purr-core/utils.definitions';
3
3
 
4
- export interface INavbarProps {
4
+ interface INavbarProps {
5
5
  leftButton?: ReactNode;
6
6
  rightButton?: ReactNode;
7
7
  title?: ReactNode;
@@ -10,3 +10,7 @@ export interface INavbarProps {
10
10
  titleHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
11
11
  rightButtonHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
12
12
  }
13
+
14
+ declare const Navbar: ({ title, leftButton, rightButton, htmlAttributes, leftButtonHtmlAttributes, titleHtmlAttributes, rightButtonHtmlAttributes, }: INavbarProps) => React.JSX.Element;
15
+
16
+ export { type INavbarProps, Navbar };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,16 @@
1
- export * from './_components';
2
- export * from './_types';
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ interface INavbarProps {
5
+ leftButton?: ReactNode;
6
+ rightButton?: ReactNode;
7
+ title?: ReactNode;
8
+ htmlAttributes?: HTMLAttributes<HTMLDivElement> & IExtendable;
9
+ leftButtonHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
10
+ titleHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
11
+ rightButtonHtmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
12
+ }
13
+
14
+ declare const Navbar: ({ title, leftButton, rightButton, htmlAttributes, leftButtonHtmlAttributes, titleHtmlAttributes, rightButtonHtmlAttributes, }: INavbarProps) => React.JSX.Element;
15
+
16
+ export { type INavbarProps, Navbar };
package/dist/index.js CHANGED
@@ -1,74 +1 @@
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(
12
- "nav",
13
- {
14
- className: e(
15
- "fixed",
16
- "top-0",
17
- "left-0",
18
- "right-0",
19
- "flex",
20
- "justify-around",
21
- "items-center",
22
- "h-14",
23
- "bg-gray-900"
24
- ),
25
- ...f,
26
- children: [
27
- /* @__PURE__ */ s(
28
- "span",
29
- {
30
- className: e(
31
- "flex",
32
- "flex-1",
33
- "justify-center",
34
- "items-center",
35
- "h-full"
36
- ),
37
- ...n,
38
- children: t
39
- }
40
- ),
41
- /* @__PURE__ */ s(
42
- "span",
43
- {
44
- className: e(
45
- "flex",
46
- "flex-1",
47
- "justify-center",
48
- "items-center",
49
- "h-full"
50
- ),
51
- ...c,
52
- children: l
53
- }
54
- ),
55
- /* @__PURE__ */ s(
56
- "span",
57
- {
58
- className: e(
59
- "flex",
60
- "flex-1",
61
- "justify-center",
62
- "items-center",
63
- "h-full"
64
- ),
65
- ...a,
66
- children: r
67
- }
68
- )
69
- ]
70
- }
71
- );
72
- export {
73
- h as Navbar
74
- };
1
+ import e from'clsx';import r from'react';var i=({title:s,leftButton:t,rightButton:a,htmlAttributes:f,leftButtonHtmlAttributes:l,titleHtmlAttributes:n,rightButtonHtmlAttributes:m})=>r.createElement("nav",{className:e("fixed","top-0","left-0","right-0","flex","justify-around","items-center","h-14","bg-gray-900"),...f},r.createElement("span",{className:e("flex","flex-1","justify-center","items-center","h-full"),...l},t),r.createElement("span",{className:e("flex","flex-1","justify-center","items-center","h-full"),...n},s),r.createElement("span",{className:e("flex","flex-1","justify-center","items-center","h-full"),...m},a));export{i as Navbar};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-tailwindcss/components.navbar",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
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.10"
27
+ "@purr-core/utils.definitions": "0.0.12"
28
28
  },
29
29
  "devDependencies": {
30
- "@purr-react-tailwindcss/components.button": "0.0.6"
30
+ "@purr-react-tailwindcss/components.button": "0.0.8"
31
31
  },
32
32
  "author": "@DinhThienPhuc",
33
33
  "license": "ISC",
@@ -36,6 +36,8 @@
36
36
  "scripts": {
37
37
  "dev": "vite build --watch",
38
38
  "build": "tsc && vite build",
39
+ "build:vite": "tsc && vite build",
40
+ "build:tsup": "tsup",
39
41
  "lint": "eslint . --ext ts,tsx --max-warnings 0"
40
42
  }
41
43
  }
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { INavbarProps } from './_types';
3
-
4
- export declare const Navbar: ({ title, leftButton, rightButton, htmlAttributes, leftButtonHtmlAttributes, titleHtmlAttributes, rightButtonHtmlAttributes, }: INavbarProps) => React.JSX.Element;