nocturna-ui 0.0.1
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/README.md +64 -0
- package/dist/components/Button.d.ts +6 -0
- package/dist/components/Card.d.ts +9 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +36 -0
- package/dist/index.umd.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# 🦇 Nocturna UI
|
|
2
|
+
|
|
3
|
+
> **Primitivos góticos e brutalistas para a web que não teme a escuridão.**
|
|
4
|
+
|
|
5
|
+
A **Nocturna UI** é uma biblioteca de componentes React focada em interfaces de alto contraste, tipografia serifada e estética minimalista/gótica. Desenvolvida para ser leve, acessível e agnóstica de configuração.
|
|
6
|
+
|
|
7
|
+
[Showcase (DEMO)](https://gothd.github.io/nocturna-ui/) | [NPM](https://www.npmjs.com/) | [UNPKG](https://unpkg.com/nocturna-ui/)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🌑 Destaques Técnicos
|
|
12
|
+
|
|
13
|
+
- **React + TypeScript**: Tipagem estrita para uma experiência de desenvolvimento segura.
|
|
14
|
+
- **Tailwind CSS**: Estilização performática via utilitários.
|
|
15
|
+
- **Multi-distribuição**: Suporte nativo para ESM, CJS e UMD (CDN).
|
|
16
|
+
- **Zero Runtime CSS**: O usuário não precisa ter Tailwind instalado para usar a lib.
|
|
17
|
+
- **CI/CD**: Deploy automatizado para GitHub Pages e versionamento via Tags.
|
|
18
|
+
|
|
19
|
+
## 🕸️ Instalação
|
|
20
|
+
|
|
21
|
+
### Via NPM
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install nocturna-ui
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
No seu arquivo principal:
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import "nocturna-ui/style.css";
|
|
31
|
+
import { VoidButton, NocturnaCard } from "nocturna-ui";
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Via CDN (UNPKG)
|
|
35
|
+
|
|
36
|
+
Ideal para prototipagem rápida ou uso sem build tools.
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<link
|
|
40
|
+
rel="stylesheet"
|
|
41
|
+
href="[https://unpkg.com/nocturna-ui/dist/style.css](https://unpkg.com/nocturna-ui/dist/style.css)"
|
|
42
|
+
/>
|
|
43
|
+
<script src="[https://unpkg.com/nocturna-ui/dist/index.umd.js](https://unpkg.com/nocturna-ui/dist/index.umd.js)"></script>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 🩸 Componentes Atuais
|
|
47
|
+
|
|
48
|
+
- [x] **VoidButton**: Botão brutalista com variantes Ghost e Blood.
|
|
49
|
+
- [x] **NocturnaCard**: Container com sombras rígidas e foco tipográfico.
|
|
50
|
+
- [ ] **NocturnaInput**: (Em breve)
|
|
51
|
+
- [ ] **ShadowOverlay**: (Em breve)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🛠️ Desenvolvimento local
|
|
56
|
+
|
|
57
|
+
1. Clone o repositório.
|
|
58
|
+
2. `npm install` na raiz para a biblioteca.
|
|
59
|
+
3. `cd playground && npm install` para o showcase.
|
|
60
|
+
4. `npm run dev` na raiz para buildar em tempo real.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
Desevolvido com 🖤 por **gothd**.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
variant?: "ghost" | "blood";
|
|
4
|
+
}
|
|
5
|
+
export declare const VoidButton: ({ variant, children, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CardProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
variant?: "void" | "blood";
|
|
7
|
+
}
|
|
8
|
+
export declare const NocturnaCard: ({ title, description, children, variant, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),d=({variant:o="ghost",children:t,...a})=>{const r=o==="ghost"?"border-2 border-white text-white hover:bg-white hover:text-black":"border-2 border-red-900 text-red-600 hover:bg-red-900 hover:text-white";return e.createElement("button",{className:`px-6 py-2 transition-all duration-300 font-serif uppercase tracking-widest ${r}`,...a},t)},i=({title:o,description:t,children:a,variant:r="void"})=>{const s=r==="void"?"border-white":"border-red-900",n=r==="void"?"hover:shadow-[8px_8px_0px_0px_rgba(255,255,255,0.1)]":"hover:shadow-[8px_8px_0px_0px_rgba(136,8,8,0.3)]";return e.createElement("div",{className:`bg-nocturna-void border-2 ${s} p-6 transition-all duration-300 ${n} max-w-sm`},e.createElement("h3",{className:"font-serif text-2xl uppercase tracking-tighter text-white mb-2"},o),t&&e.createElement("p",{className:"text-zinc-500 text-sm mb-4 font-sans leading-relaxed"},t),e.createElement("div",{className:"mt-4"},a))};exports.NocturnaCard=i;exports.VoidButton=d;
|
package/dist/index.d.ts
ADDED
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
const i = ({
|
|
3
|
+
variant: o = "ghost",
|
|
4
|
+
children: t,
|
|
5
|
+
...a
|
|
6
|
+
}) => {
|
|
7
|
+
const r = o === "ghost" ? "border-2 border-white text-white hover:bg-white hover:text-black" : "border-2 border-red-900 text-red-600 hover:bg-red-900 hover:text-white";
|
|
8
|
+
return /* @__PURE__ */ e.createElement(
|
|
9
|
+
"button",
|
|
10
|
+
{
|
|
11
|
+
className: `px-6 py-2 transition-all duration-300 font-serif uppercase tracking-widest ${r}`,
|
|
12
|
+
...a
|
|
13
|
+
},
|
|
14
|
+
t
|
|
15
|
+
);
|
|
16
|
+
}, c = ({
|
|
17
|
+
title: o,
|
|
18
|
+
description: t,
|
|
19
|
+
children: a,
|
|
20
|
+
variant: r = "void"
|
|
21
|
+
}) => {
|
|
22
|
+
const s = r === "void" ? "border-white" : "border-red-900", n = r === "void" ? "hover:shadow-[8px_8px_0px_0px_rgba(255,255,255,0.1)]" : "hover:shadow-[8px_8px_0px_0px_rgba(136,8,8,0.3)]";
|
|
23
|
+
return /* @__PURE__ */ e.createElement(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: `bg-nocturna-void border-2 ${s} p-6 transition-all duration-300 ${n} max-w-sm`
|
|
27
|
+
},
|
|
28
|
+
/* @__PURE__ */ e.createElement("h3", { className: "font-serif text-2xl uppercase tracking-tighter text-white mb-2" }, o),
|
|
29
|
+
t && /* @__PURE__ */ e.createElement("p", { className: "text-zinc-500 text-sm mb-4 font-sans leading-relaxed" }, t),
|
|
30
|
+
/* @__PURE__ */ e.createElement("div", { className: "mt-4" }, a)
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
c as NocturnaCard,
|
|
35
|
+
i as VoidButton
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.NocturnaUI={},t.React))})(this,(function(t,e){"use strict";const i=({variant:n="ghost",children:r,...d})=>{const o=n==="ghost"?"border-2 border-white text-white hover:bg-white hover:text-black":"border-2 border-red-900 text-red-600 hover:bg-red-900 hover:text-white";return e.createElement("button",{className:`px-6 py-2 transition-all duration-300 font-serif uppercase tracking-widest ${o}`,...d},r)},s=({title:n,description:r,children:d,variant:o="void"})=>{const a=o==="void"?"border-white":"border-red-900",c=o==="void"?"hover:shadow-[8px_8px_0px_0px_rgba(255,255,255,0.1)]":"hover:shadow-[8px_8px_0px_0px_rgba(136,8,8,0.3)]";return e.createElement("div",{className:`bg-nocturna-void border-2 ${a} p-6 transition-all duration-300 ${c} max-w-sm`},e.createElement("h3",{className:"font-serif text-2xl uppercase tracking-tighter text-white mb-2"},n),r&&e.createElement("p",{className:"text-zinc-500 text-sm mb-4 font-sans leading-relaxed"},r),e.createElement("div",{className:"mt-4"},d))};t.NocturnaCard=s,t.VoidButton=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mt-4{margin-top:1rem}.max-w-sm{max-width:24rem}.border-2{border-width:2px}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-nocturna-void{--tw-bg-opacity: 1;background-color:rgb(5 5 5 / var(--tw-bg-opacity, 1))}.p-6{padding:1.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.font-serif{font-family:Playfair Display,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.uppercase{text-transform:uppercase}.leading-relaxed{line-height:1.625}.tracking-tighter{letter-spacing:-.05em}.tracking-widest{letter-spacing:.1em}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}::-moz-selection{background-color:#600;color:#fff}::selection{background-color:#600;color:#fff}body{background-color:#050505;color:#e0e0e0}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:shadow-\[8px_8px_0px_0px_rgba\(136\,8\,8\,0\.3\)\]:hover{--tw-shadow: 8px 8px 0px 0px rgba(136,8,8,.3);--tw-shadow-colored: 8px 8px 0px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-\[8px_8px_0px_0px_rgba\(255\,255\,255\,0\.1\)\]:hover{--tw-shadow: 8px 8px 0px 0px rgba(255,255,255,.1);--tw-shadow-colored: 8px 8px 0px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-\[8px_8px_0px_0px_rgba\(136\,8\,8\,1\)\]:hover{--tw-shadow: 8px 8px 0px 0px rgba(136,8,8,1);--tw-shadow-colored: 8px 8px 0px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nocturna-ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Goth & Brutalist UI Library",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs.js",
|
|
7
|
+
"module": "./dist/index.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"unpkg": "./dist/index.umd.js",
|
|
10
|
+
"style": "./dist/style.css",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.es.js",
|
|
18
|
+
"require": "./dist/index.cjs.js"
|
|
19
|
+
},
|
|
20
|
+
"./style.css": "./dist/style.css"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite build --watch",
|
|
24
|
+
"build": "vite build",
|
|
25
|
+
"preview": "vite preview"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"react",
|
|
29
|
+
"react-component",
|
|
30
|
+
"ui",
|
|
31
|
+
"library",
|
|
32
|
+
"design-system",
|
|
33
|
+
"brutalist",
|
|
34
|
+
"neo-brutalism",
|
|
35
|
+
"goth",
|
|
36
|
+
"gothic",
|
|
37
|
+
"dark-mode",
|
|
38
|
+
"dark-theme",
|
|
39
|
+
"components",
|
|
40
|
+
"frontend",
|
|
41
|
+
"nocturna"
|
|
42
|
+
],
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/gothd/nocturna-ui.git"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"author": "Ruan Oliveira Sena <ruanalt@aol.com> (https://gothd.dev)",
|
|
51
|
+
"license": "ISC",
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/react": "^19.2.7",
|
|
54
|
+
"@types/react-dom": "^19.2.3",
|
|
55
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
56
|
+
"autoprefixer": "^10.4.23",
|
|
57
|
+
"lucide-react": "^0.562.0",
|
|
58
|
+
"postcss": "^8.5.6",
|
|
59
|
+
"react": "^19.2.3",
|
|
60
|
+
"react-dom": "^19.2.3",
|
|
61
|
+
"tailwindcss": "3.4",
|
|
62
|
+
"typescript": "^5.9.3",
|
|
63
|
+
"vite": "^7.3.0",
|
|
64
|
+
"vite-plugin-dts": "^4.5.4"
|
|
65
|
+
}
|
|
66
|
+
}
|