sate-lib 1.1.13 → 1.1.15
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 +3 -13
- package/dist/components/badge/badge.css +4 -0
- package/dist/{types/components → components}/badge/badge.d.ts +1 -0
- package/dist/components/badge/badge.js +10 -0
- package/dist/components/button/button.css +35 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.js +19 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -2
- package/package.json +47 -72
- package/dist/assets/styles/fonts/author-bold.woff2 +0 -0
- package/dist/assets/styles/fonts/golos-ui-bold.woff2 +0 -0
- package/dist/assets/styles/fonts/golos-ui-medium.woff2 +0 -0
- package/dist/assets/styles/fonts/golos-ui-regular.woff2 +0 -0
- package/dist/assets/styles/index.css +0 -1
- package/dist/assets/styles/typography.scss +0 -46
- package/dist/bundle-stats.html +0 -2
- package/dist/index.js.map +0 -1
- package/dist/types/components/icon/icon.d.ts +0 -13
- package/dist/types/components/typography/typography.d.ts +0 -7
- package/dist/types/index.d.ts +0 -4
package/README.md
CHANGED
|
@@ -7,27 +7,17 @@ A lightweight and modular React component library designed for modern web interf
|
|
|
7
7
|
|
|
8
8
|
## Tech Stack
|
|
9
9
|
|
|
10
|
-
- [
|
|
10
|
+
- [RSLib](https://rslib.rs/)
|
|
11
11
|
- [React](https://react.dev/)
|
|
12
12
|
- [Typescript](https://www.typescriptlang.org/)
|
|
13
13
|
- [Storybook](https://storybook.js.org/)
|
|
14
|
-
- [
|
|
15
|
-
- [Rollup](https://www.npmjs.com/package/rollup)
|
|
14
|
+
- [Biome](https://biomejs.dev/)
|
|
16
15
|
|
|
17
16
|
## Installation
|
|
18
17
|
|
|
19
18
|
```bash
|
|
20
19
|
pnpm install
|
|
21
|
-
pnpm
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Fonts
|
|
25
|
-
|
|
26
|
-
SATE Lib uses custom fonts to define the typographic styles used in components like Typography.
|
|
27
|
-
To keep the bundle lightweight and flexible, fonts are not bundled with the main library output but are still included in the dist/assets/fonts directory.
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
import "sate-lib/dist/assets/styles/fonts.scss";
|
|
20
|
+
pnpm storybook
|
|
31
21
|
```
|
|
32
22
|
|
|
33
23
|
## Component usage
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./badge.css";
|
|
3
|
+
function Badge({ className = "", children, ...props }) {
|
|
4
|
+
return /*#__PURE__*/ jsx("span", {
|
|
5
|
+
className: `badge ${className}`.trim(),
|
|
6
|
+
...props,
|
|
7
|
+
children: children
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export { Badge };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.demo-button {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
border: 0;
|
|
4
|
+
border-radius: 3em;
|
|
5
|
+
font-weight: 700;
|
|
6
|
+
line-height: 1;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.demo-button--primary {
|
|
11
|
+
color: #fff;
|
|
12
|
+
background-color: #1ea7fd;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.demo-button--secondary {
|
|
16
|
+
color: #333;
|
|
17
|
+
background-color: #0000;
|
|
18
|
+
box-shadow: inset 0 0 0 1px #00000026;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.demo-button--small {
|
|
22
|
+
padding: 10px 16px;
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.demo-button--medium {
|
|
27
|
+
padding: 11px 20px;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.demo-button--large {
|
|
32
|
+
padding: 12px 24px;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
}
|
|
35
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './button.css';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
primary?: boolean;
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
label: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./button.css";
|
|
3
|
+
const Button = ({ primary = false, size = 'medium', backgroundColor, label, ...props })=>{
|
|
4
|
+
const mode = primary ? 'demo-button--primary' : 'demo-button--secondary';
|
|
5
|
+
return /*#__PURE__*/ jsx("button", {
|
|
6
|
+
type: "button",
|
|
7
|
+
className: [
|
|
8
|
+
'demo-button',
|
|
9
|
+
`demo-button--${size}`,
|
|
10
|
+
mode
|
|
11
|
+
].join(' '),
|
|
12
|
+
style: {
|
|
13
|
+
backgroundColor
|
|
14
|
+
},
|
|
15
|
+
...props,
|
|
16
|
+
children: label
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export { Button };
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
1
|
+
import { Button } from "./components/button/button.js";
|
|
2
|
+
import { Badge } from "./components/badge/badge.js";
|
|
3
|
+
export { Badge, Button };
|
package/package.json
CHANGED
|
@@ -1,86 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sate-lib",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"author": "Tiago Sousa (tiagorsousa0@gmail.com)",
|
|
5
|
-
"license": "MIT",
|
|
3
|
+
"version": "1.1.15",
|
|
6
4
|
"type": "module",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
10
12
|
"files": [
|
|
11
|
-
"dist
|
|
13
|
+
"dist"
|
|
12
14
|
],
|
|
13
15
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"design-system",
|
|
23
|
-
"react",
|
|
24
|
-
"vite",
|
|
25
|
-
"storybook",
|
|
26
|
-
"components",
|
|
27
|
-
"tokens",
|
|
28
|
-
"sass",
|
|
29
|
-
"ui-kit",
|
|
30
|
-
"SATE"
|
|
31
|
-
],
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/TiagoSousa123/sate-lib.git"
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"sass": "^1.89.0"
|
|
16
|
+
"build": "rslib build",
|
|
17
|
+
"build:storybook": "storybook build",
|
|
18
|
+
"check": "biome check --write",
|
|
19
|
+
"dev": "rslib build --watch",
|
|
20
|
+
"format": "biome format --write",
|
|
21
|
+
"storybook": "storybook dev"
|
|
38
22
|
},
|
|
39
23
|
"devDependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@rollup/plugin-commonjs": "28.0.6",
|
|
45
|
-
"@rollup/plugin-node-resolve": "16.0.1",
|
|
46
|
-
"@rollup/plugin-terser": "0.4.4",
|
|
47
|
-
"@rollup/plugin-typescript": "12.1.3",
|
|
48
|
-
"@storybook/addon-a11y": "^9.0.11",
|
|
24
|
+
"@biomejs/biome": "^1.9.4",
|
|
25
|
+
"@rsbuild/core": "1.4.0-beta.4",
|
|
26
|
+
"@rsbuild/plugin-react": "^1.3.2",
|
|
27
|
+
"@rslib/core": "^0.10.2",
|
|
49
28
|
"@storybook/addon-docs": "^9.0.11",
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
60
|
-
"eslint-plugin-react-refresh": "^0.4.19",
|
|
61
|
-
"eslint-plugin-storybook": "^9.0.11",
|
|
62
|
-
"globals": "^16.0.0",
|
|
63
|
-
"husky": "^9.1.7",
|
|
64
|
-
"postcss": "^8.5.6",
|
|
65
|
-
"rollup": "4.44.0",
|
|
66
|
-
"rollup-plugin-bundle-stats": "^4.20.2",
|
|
67
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
68
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
69
|
-
"semantic-release": "^24.2.5",
|
|
29
|
+
"@storybook/addon-essentials": "^9.0.0-alpha.12",
|
|
30
|
+
"@storybook/addon-interactions": "^9.0.0-alpha.10",
|
|
31
|
+
"@storybook/addon-links": "^9.0.11",
|
|
32
|
+
"@storybook/addon-onboarding": "^9.0.11",
|
|
33
|
+
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
34
|
+
"@storybook/react": "^9.0.11",
|
|
35
|
+
"@storybook/test": "^9.0.0-alpha.2",
|
|
36
|
+
"@types/react": "^19.1.8",
|
|
37
|
+
"react": "^19.1.0",
|
|
70
38
|
"storybook": "^9.0.11",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"vite-plugin-dynamic-import": "^1.6.0",
|
|
75
|
-
"vite-plugin-svgr": "^4.3.0"
|
|
39
|
+
"storybook-addon-rslib": "^2.0.1",
|
|
40
|
+
"storybook-react-rsbuild": "^2.0.1",
|
|
41
|
+
"typescript": "^5.8.3"
|
|
76
42
|
},
|
|
77
43
|
"peerDependencies": {
|
|
78
|
-
"react": "
|
|
79
|
-
"react-dom": "
|
|
44
|
+
"react": ">=16.9.0",
|
|
45
|
+
"react-dom": ">=16.9.0"
|
|
80
46
|
},
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
47
|
+
"private": false,
|
|
48
|
+
"keywords": [
|
|
49
|
+
"react",
|
|
50
|
+
"component-library",
|
|
51
|
+
"design-system",
|
|
52
|
+
"storybook",
|
|
53
|
+
"rsbuild",
|
|
54
|
+
"rslib",
|
|
55
|
+
"biome",
|
|
56
|
+
"typescript",
|
|
57
|
+
"ui-library",
|
|
58
|
+
"react-components",
|
|
59
|
+
"frontend"
|
|
60
|
+
]
|
|
86
61
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:after,:before{box-sizing:border-box}*{margin:0;outline:none;padding:0}ol,ul{list-style:none}html:focus-within{scroll-behavior:smooth}a:not([class]){color:inherit;text-decoration-skip-ink:auto}canvas,img,picture,svg,video{background-repeat:no-repeat;background-size:cover;height:auto;max-width:100%;vertical-align:middle}button,input,select,textarea{background:none;border:none;color:inherit;font:inherit;outline:none}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important;transition:none}}body,html{height:100%;scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}button{cursor:pointer}:root{--box-shadow-1:0px 1px 0px 0px rgba(17,17,26,.1);--box-shadow-2:0px 1px 0px rgba(17,17,26,.05),0px 0px 8px rgba(17,17,26,.1);--opacity-disabled:0.38;--color-theme-core-bright:#317c6c;--color-theme-core-dark:#b80f0f;--color-system-content-primary:#0e0e0e;--color-system-content-secondary:#474747;--color-system-content-tertiary:#767676;--radius-radii-10:0.625rem;--radius-radii-16:1rem;--radius-radii-24:1.5rem;--radius-large-container:1rem;--radius-chip:0.5rem;--radius-medium-container:0.75rem;--spacing-size-4:0.25rem;--spacing-size-154:9.625rem;--spacing-size-0:0;--padding-x-small:0.5rem;--padding-small:1rem;--padding-medium:1.5rem;--padding-large:2rem;--size-x-small:1.5rem;--size-medium:2.5rem;--size-large:3rem;--size-x-large:3.5rem;--size-small:2rem;--size-2x-large:4.5rem;--size-2x-small:1rem;--spacing-column-gap-cards:0.75rem;--spacing-column-gap-chips:0.5rem;--spacing-column-margin-screen-mobile:1.5rem}.badge-styles-module_badge__0T5Ik{border-radius:.25rem;color:var(--color-system-content-secondary,#474747);padding:var(--spacing-size-4,.25rem)}.typography-styles-module_typography__h3ta9{color:#111;margin:0}.typography-styles-module_typographyTitle__9V99m{font-family:Author,Arial Black,Impact,sans-serif;font-size:4rem;font-weight:700;line-height:1.1}.typography-styles-module_typographyBody__4rtGZ,.typography-styles-module_typographyCaption__-ci4T,.typography-styles-module_typographyHeader__k4mIZ{font-family:Golos UI,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.typography-styles-module_typographyHeader__k4mIZ{font-size:2rem;font-weight:500;line-height:1.3}.typography-styles-module_typographyBody__4rtGZ{font-size:1rem;font-weight:400;line-height:1.6}.typography-styles-module_typographyCaption__-ci4T{font-size:.875rem;font-weight:400;line-height:1.4;opacity:.7}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: "Author";
|
|
3
|
-
src: url("../fonts/author-bold.woff2") format("woff2");
|
|
4
|
-
font-weight: bold;
|
|
5
|
-
font-style: normal;
|
|
6
|
-
font-display: swap;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@font-face {
|
|
10
|
-
font-family: "Golos UI";
|
|
11
|
-
src: url("../fonts/golos-ui-regular.woff2") format("woff2");
|
|
12
|
-
font-weight: 400;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
font-display: swap;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@font-face {
|
|
18
|
-
font-family: "Golos UI";
|
|
19
|
-
src: url("../fonts/golos-ui-medium.woff2") format("woff2");
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
font-style: normal;
|
|
22
|
-
font-display: swap;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@font-face {
|
|
26
|
-
font-family: "Golos UI";
|
|
27
|
-
src: url("../fonts/golos-ui-bold.woff2") format("woff2");
|
|
28
|
-
font-weight: 700;
|
|
29
|
-
font-style: normal;
|
|
30
|
-
font-display: swap;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@mixin typescale-display-large {
|
|
34
|
-
font-family: var(--font-display, "Author");
|
|
35
|
-
font-size: 4rem;
|
|
36
|
-
font-weight: 700;
|
|
37
|
-
line-height: 1.1;
|
|
38
|
-
letter-spacing: -0.01em;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@mixin typescale-body {
|
|
42
|
-
font-family: var(--font-primary, "Golos UI");
|
|
43
|
-
font-size: 1rem;
|
|
44
|
-
font-weight: 400;
|
|
45
|
-
line-height: 1.5;
|
|
46
|
-
}
|