@purr-react-styled-components/components.navbar 0.0.7 → 0.0.9

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,22 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("clsx"),t=require("styled-components"),i=()=>t.css(["display:flex;flex:1;justify-content:center;align-items:center;height:100%;"]),n={Container:t.nav.withConfig({displayName:"_style__Container",componentId:"sc-1iryjg8-0"})(["position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;height:56px;"]),Title:t.span.withConfig({displayName:"_style__Title",componentId:"sc-1iryjg8-1"})(["",";"],i),LeftButton:t.span.withConfig({displayName:"_style__LeftButton",componentId:"sc-1iryjg8-2"})(["",";"],i),RightButton:t.span.withConfig({displayName:"_style__RightButton",componentId:"sc-1iryjg8-3"})(["",";"],i)},u=({title:s,leftButton:a,rightButton:o,className:r,htmlAttributes:l})=>e.jsxs(n.Container,{...l,className:c("navbar",r),children:[e.jsx(n.LeftButton,{className:"navbar__button navbar__button--left",children:a}),e.jsx(n.Title,{className:"navbar__title",children:s}),e.jsx(n.RightButton,{className:"navbar__button navbar__button--right",children:o})]});exports.Navbar=u;
1
+ 'use strict';var f=require('clsx'),n=require('react'),e=require('styled-components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var f__default=/*#__PURE__*/_interopDefault(f);var n__default=/*#__PURE__*/_interopDefault(n);var e__default=/*#__PURE__*/_interopDefault(e);var o=()=>e.css`
2
+ display: flex;
3
+ flex: 1;
4
+ justify-content: center;
5
+ align-items: center;
6
+ height: 100%;
7
+ `,t={Container:e__default.default.nav`
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ right: 0;
12
+ display: flex;
13
+ justify-content: space-around;
14
+ align-items: center;
15
+ height: 56px;
16
+ `,Title:e__default.default.span`
17
+ ${o};
18
+ `,LeftButton:e__default.default.span`
19
+ ${o};
20
+ `,RightButton:e__default.default.span`
21
+ ${o};
22
+ `};var y=({title:r,leftButton:a,rightButton:i,className:s,htmlAttributes:l})=>n__default.default.createElement(t.Container,{...l,className:f__default.default("navbar",s)},n__default.default.createElement(t.LeftButton,{className:"navbar__button navbar__button--left"},a),n__default.default.createElement(t.Title,{className:"navbar__title"},r),n__default.default.createElement(t.RightButton,{className:"navbar__button navbar__button--right"},i));exports.Navbar=y;
@@ -0,0 +1,14 @@
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ interface INavbarProps {
5
+ className?: string;
6
+ leftButton?: ReactNode;
7
+ rightButton?: ReactNode;
8
+ title?: ReactNode;
9
+ htmlAttributes?: HTMLAttributes<HTMLDivElement> & IExtendable;
10
+ }
11
+
12
+ declare const Navbar: ({ title, leftButton, rightButton, className, htmlAttributes, }: INavbarProps) => React.JSX.Element;
13
+
14
+ export { type INavbarProps, Navbar };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,14 @@
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
+ className?: string;
6
+ leftButton?: ReactNode;
7
+ rightButton?: ReactNode;
8
+ title?: ReactNode;
9
+ htmlAttributes?: HTMLAttributes<HTMLDivElement> & IExtendable;
10
+ }
11
+
12
+ declare const Navbar: ({ title, leftButton, rightButton, className, htmlAttributes, }: INavbarProps) => React.JSX.Element;
13
+
14
+ export { type INavbarProps, Navbar };
package/dist/index.js CHANGED
@@ -1,34 +1,22 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import _ from "clsx";
3
- import t, { css as p } from "styled-components";
4
- const i = () => p(["display:flex;flex:1;justify-content:center;align-items:center;height:100%;"]), n = {
5
- Container: t.nav.withConfig({
6
- displayName: "_style__Container",
7
- componentId: "sc-1iryjg8-0"
8
- })(["position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-around;align-items:center;height:56px;"]),
9
- Title: t.span.withConfig({
10
- displayName: "_style__Title",
11
- componentId: "sc-1iryjg8-1"
12
- })(["", ";"], i),
13
- LeftButton: t.span.withConfig({
14
- displayName: "_style__LeftButton",
15
- componentId: "sc-1iryjg8-2"
16
- })(["", ";"], i),
17
- RightButton: t.span.withConfig({
18
- displayName: "_style__RightButton",
19
- componentId: "sc-1iryjg8-3"
20
- })(["", ";"], i)
21
- }, y = ({
22
- title: a,
23
- leftButton: o,
24
- rightButton: s,
25
- className: r,
26
- htmlAttributes: l
27
- }) => /* @__PURE__ */ c(n.Container, { ...l, className: _("navbar", r), children: [
28
- /* @__PURE__ */ e(n.LeftButton, { className: "navbar__button navbar__button--left", children: o }),
29
- /* @__PURE__ */ e(n.Title, { className: "navbar__title", children: a }),
30
- /* @__PURE__ */ e(n.RightButton, { className: "navbar__button navbar__button--right", children: s })
31
- ] });
32
- export {
33
- y as Navbar
34
- };
1
+ import f from'clsx';import n from'react';import e,{css}from'styled-components';var o=()=>css`
2
+ display: flex;
3
+ flex: 1;
4
+ justify-content: center;
5
+ align-items: center;
6
+ height: 100%;
7
+ `,t={Container:e.nav`
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ right: 0;
12
+ display: flex;
13
+ justify-content: space-around;
14
+ align-items: center;
15
+ height: 56px;
16
+ `,Title:e.span`
17
+ ${o};
18
+ `,LeftButton:e.span`
19
+ ${o};
20
+ `,RightButton:e.span`
21
+ ${o};
22
+ `};var y=({title:r,leftButton:a,rightButton:i,className:s,htmlAttributes:l})=>n.createElement(t.Container,{...l,className:f("navbar",s)},n.createElement(t.LeftButton,{className:"navbar__button navbar__button--left"},a),n.createElement(t.Title,{className:"navbar__title"},r),n.createElement(t.RightButton,{className:"navbar__button navbar__button--right"},i));export{y as Navbar};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-styled-components/components.navbar",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
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-styled-components/components.button": "0.0.7"
30
+ "@purr-react-styled-components/components.button": "0.0.9"
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, className, htmlAttributes, }: INavbarProps) => React.JSX.Element;
package/dist/_style.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export declare const Styled: {
2
- Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
3
- Title: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
- LeftButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
5
- RightButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
6
- };
package/dist/_types.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { IExtendable } from '@purr-core/utils.definitions';
3
-
4
- export interface INavbarProps {
5
- className?: string;
6
- leftButton?: ReactNode;
7
- rightButton?: ReactNode;
8
- title?: ReactNode;
9
- htmlAttributes?: HTMLAttributes<HTMLDivElement> & IExtendable;
10
- }