@yberagroup/kaizen-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 +21 -0
- package/components.json +20 -0
- package/eslint.config.js +4 -0
- package/package.json +45 -0
- package/postcss.config.mjs +6 -0
- package/src/components/.gitkeep +0 -0
- package/src/components/title.tsx +54 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/lib/icons.ts +48 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/globals.css +38 -0
- package/tsconfig.json +11 -0
- package/tsconfig.lint.json +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @yberagroup/kaizen-ui
|
|
2
|
+
|
|
3
|
+
Componentes React do Kaizen Design System (Radix/shadcn + Tailwind).
|
|
4
|
+
Depende de `@yberagroup/kaizen-tokens` para temas e variáveis CSS.
|
|
5
|
+
|
|
6
|
+
## Ícones (Font Awesome Pro)
|
|
7
|
+
|
|
8
|
+
O projeto usa **Font Awesome Pro** (conta paga). Para instalar dependências:
|
|
9
|
+
|
|
10
|
+
1. **Obtenha seu token Pro** em [fontawesome.com/account → Pro Package Tokens](https://fontawesome.com/account#pro-package-tokens).
|
|
11
|
+
|
|
12
|
+
2. **Defina a variável de ambiente** antes de rodar `npm install`:
|
|
13
|
+
- Windows (PowerShell): `$env:FONTAWESOME_PRO_TOKEN="seu-token"`
|
|
14
|
+
- Windows (CMD): `set FONTAWESOME_PRO_TOKEN=seu-token`
|
|
15
|
+
- Linux/macOS: `export FONTAWESOME_PRO_TOKEN=seu-token`
|
|
16
|
+
|
|
17
|
+
3. Na raiz do monorepo: `npm install`
|
|
18
|
+
|
|
19
|
+
O `.npmrc` na raiz já aponta o escopo `@fortawesome` para o registry Pro; o token é lido de `FONTAWESOME_PRO_TOKEN` para não precisar commitar o token no repositório.
|
|
20
|
+
|
|
21
|
+
Em CI (GitHub Actions, etc.), configure `FONTAWESOME_PRO_TOKEN` como secret e use no passo de install.
|
package/components.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "radix-nova",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/styles/globals.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true
|
|
11
|
+
},
|
|
12
|
+
"iconLibrary": "fontawesome",
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@yberagroup/kaizen-ui/components",
|
|
15
|
+
"utils": "@yberagroup/kaizen-ui/lib/utils",
|
|
16
|
+
"hooks": "@yberagroup/kaizen-ui/hooks",
|
|
17
|
+
"lib": "@yberagroup/kaizen-ui/lib",
|
|
18
|
+
"ui": "@yberagroup/kaizen-ui/components"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/eslint.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yberagroup/kaizen-ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"lint": "eslint . --max-warnings 0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@yberagroup/kaizen-tokens": "file:../tokens",
|
|
11
|
+
"class-variance-authority": "^0.7.1",
|
|
12
|
+
"clsx": "^2.1.1",
|
|
13
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
14
|
+
"@fortawesome/pro-regular-svg-icons": "^6.7.2",
|
|
15
|
+
"@fortawesome/pro-solid-svg-icons": "^6.7.2",
|
|
16
|
+
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
|
17
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
18
|
+
"next-themes": "^0.4.6",
|
|
19
|
+
"radix-ui": "^1.4.3",
|
|
20
|
+
"react": "^19.2.4",
|
|
21
|
+
"react-dom": "^19.2.4",
|
|
22
|
+
"tailwind-merge": "^3.4.0",
|
|
23
|
+
"tw-animate-css": "^1.4.0",
|
|
24
|
+
"zod": "^3.25.76"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
28
|
+
"@turbo/gen": "^2.8.1",
|
|
29
|
+
"@types/node": "^25.1.0",
|
|
30
|
+
"@types/react": "^19.2.10",
|
|
31
|
+
"@types/react-dom": "^19.2.3",
|
|
32
|
+
"@workspace/eslint-config": "file:../eslint-config",
|
|
33
|
+
"@workspace/typescript-config": "file:../typescript-config",
|
|
34
|
+
"eslint": "^9.39.2",
|
|
35
|
+
"tailwindcss": "^4.1.18",
|
|
36
|
+
"typescript": "^5.9.3"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
"./globals.css": "./src/styles/globals.css",
|
|
40
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
41
|
+
"./lib/*": "./src/lib/*.ts",
|
|
42
|
+
"./components/*": "./src/components/*.tsx",
|
|
43
|
+
"./hooks/*": "./src/hooks/*.ts"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { clsx } from "clsx";
|
|
4
|
+
|
|
5
|
+
export type TitleSize = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
6
|
+
export type TitleWeight = "medium" | "semibold";
|
|
7
|
+
|
|
8
|
+
const titleVariants = cva(
|
|
9
|
+
"typeface-kz-syne tracking-kz-0 text-text-primary-dark leading-kz-0 p-0 m-0",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
h1: "text-kz-40 leading-kz-48",
|
|
14
|
+
h2: "text-kz-32 leading-kz-40",
|
|
15
|
+
h3: "text-kz-24 leading-kz-32",
|
|
16
|
+
h4: "text-kz-18 leading-kz-24",
|
|
17
|
+
h5: "text-kz-16 leading-kz-22",
|
|
18
|
+
h6: "text-kz-14 leading-kz-20",
|
|
19
|
+
},
|
|
20
|
+
weight: {
|
|
21
|
+
medium: "font-kz-500",
|
|
22
|
+
semibold: "font-kz-600",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
size: "h2",
|
|
27
|
+
weight: "medium",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export type TitleProps = React.HTMLAttributes<HTMLHeadingElement> &
|
|
33
|
+
VariantProps<typeof titleVariants> & {
|
|
34
|
+
size?: TitleSize;
|
|
35
|
+
weight?: TitleWeight;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function Title({
|
|
39
|
+
size = "h2",
|
|
40
|
+
weight = "medium",
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: TitleProps) {
|
|
44
|
+
const Tag = size;
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<Tag
|
|
48
|
+
className={clsx(titleVariants({ size, weight }), className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { Title };
|
|
File without changes
|
package/src/lib/icons.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export de ícones Font Awesome Pro para uso no design system.
|
|
3
|
+
* Conta Pro: mais ícones e estilos (solid, regular, light, thin, duotone).
|
|
4
|
+
* Para outros ícones, importe de @fortawesome/pro-solid-svg-icons ou pro-regular-svg-icons.
|
|
5
|
+
*/
|
|
6
|
+
export {
|
|
7
|
+
faCheck,
|
|
8
|
+
faChevronDown,
|
|
9
|
+
faChevronLeft,
|
|
10
|
+
faChevronRight,
|
|
11
|
+
faChevronUp,
|
|
12
|
+
faCircleInfo,
|
|
13
|
+
faXmark,
|
|
14
|
+
faPlus,
|
|
15
|
+
faMinus,
|
|
16
|
+
faMagnifyingGlass,
|
|
17
|
+
faBars,
|
|
18
|
+
faEllipsis,
|
|
19
|
+
faEllipsisVertical,
|
|
20
|
+
faUser,
|
|
21
|
+
faGear,
|
|
22
|
+
faArrowRight,
|
|
23
|
+
faArrowLeft,
|
|
24
|
+
faExternalLink,
|
|
25
|
+
faTriangleExclamation,
|
|
26
|
+
faCircleCheck,
|
|
27
|
+
faCircleXmark,
|
|
28
|
+
} from "@fortawesome/pro-solid-svg-icons"
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
faCircleQuestion,
|
|
32
|
+
faUser as faUserRegular,
|
|
33
|
+
} from "@fortawesome/pro-regular-svg-icons"
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
faFacebook,
|
|
37
|
+
faInstagram,
|
|
38
|
+
faLinkedin,
|
|
39
|
+
faTwitter,
|
|
40
|
+
faXTwitter,
|
|
41
|
+
faYoutube,
|
|
42
|
+
faWhatsapp,
|
|
43
|
+
faGoogle,
|
|
44
|
+
faGithub,
|
|
45
|
+
faSpotify,
|
|
46
|
+
faApple,
|
|
47
|
+
faMicrosoft,
|
|
48
|
+
} from "@fortawesome/free-brands-svg-icons"
|
package/src/lib/utils.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@source "../../../../apps/**/*.{ts,tsx}";
|
|
3
|
+
@source "../**/*.{ts,tsx}";
|
|
4
|
+
|
|
5
|
+
@import "../../../tokens/dist/foundations.css";
|
|
6
|
+
@import "../../../tokens/dist/themes/esc.css";
|
|
7
|
+
@import "../../../tokens/dist/tailwind-semantic-theme.css";
|
|
8
|
+
|
|
9
|
+
@import "tw-animate-css";
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Typefaces: primitivos --kz-syne e --kz-nunitosans vêm de kaizen-foundations (foundations.css).
|
|
13
|
+
* next/font injeta --font-sans (Syne) e --font-nunito (Nunito Sans) no layout da app.
|
|
14
|
+
*
|
|
15
|
+
* Usamos classes typeface-kz-* (não font-kz-*) para não colidir com pesos tipográficos (font-kz-500/600):
|
|
16
|
+
* o tailwind-merge trata qualquer utilitário "font-*" como o mesmo grupo e acaba removendo a família.
|
|
17
|
+
*/
|
|
18
|
+
@layer utilities {
|
|
19
|
+
.typeface-kz-syne {
|
|
20
|
+
font-family: var(--font-sans, var(--kz-syne)), "Syne", sans-serif;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.typeface-kz-nunitosans {
|
|
24
|
+
font-family:
|
|
25
|
+
var(--font-nunito, var(--kz-nunitosans)), "Nunito Sans", sans-serif;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@custom-variant dark (&:is(.dark *));
|
|
30
|
+
|
|
31
|
+
@layer base {
|
|
32
|
+
* {
|
|
33
|
+
@apply border-border-primary outline-border-input-selected/50;
|
|
34
|
+
}
|
|
35
|
+
body {
|
|
36
|
+
@apply bg-background-primary text-text-primary-dark;
|
|
37
|
+
}
|
|
38
|
+
}
|
package/tsconfig.json
ADDED