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 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
- - [Vite](https://vite.dev/guide/)
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
- - [Sass](https://sass-lang.com/)
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 dev
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,4 @@
1
+ .badge {
2
+ border-radius: .25rem;
3
+ }
4
+
@@ -1,4 +1,5 @@
1
1
  import type { HTMLAttributes, ReactNode } from "react";
2
+ import "./badge.css";
2
3
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
3
4
  children: ReactNode;
4
5
  }
@@ -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 };
@@ -0,0 +1,2 @@
1
+ export { Button } from "./components/button/button";
2
+ export { Badge } from "./components/badge/badge";
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
- import{jsx as a}from"react/jsx-runtime";import*as t from"react";var r,e="badge-styles-module_badge__0T5Ik";function n({className:t="",children:r,...n}){return a("span",{className:`${e} ${t}`.trim(),...n,children:r})}function o(){return o=Object.assign?Object.assign.bind():function(a){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)({}).hasOwnProperty.call(r,e)&&(a[e]=r[e])}return a},o.apply(null,arguments)}var h;function p(){return p=Object.assign?Object.assign.bind():function(a){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)({}).hasOwnProperty.call(r,e)&&(a[e]=r[e])}return a},p.apply(null,arguments)}const s={Bed:function(a){return t.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},a),r||(r=t.createElement("path",{d:"M20.25 6.75H3V4.5a.75.75 0 0 0-1.5 0v15a.75.75 0 1 0 1.5 0v-3h19.5v3a.75.75 0 1 0 1.5 0v-9a3.75 3.75 0 0 0-3.75-3.75M3 8.25h6.75V15H3zM11.25 15V8.25h9a2.25 2.25 0 0 1 2.25 2.25V15z"})))},Building:function(a){return t.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},a),h||(h=t.createElement("path",{d:"M21.75 21H19.5V3h.75a.75.75 0 1 0 0-1.5H3.75a.75.75 0 0 0 0 1.5h.75v18H2.25a.75.75 0 1 0 0 1.5h19.5a.75.75 0 1 0 0-1.5M6 3h12v18h-3v-3.75a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0-.75.75V21H6zm7.5 18h-3v-3h3zM8.25 6A.75.75 0 0 1 9 5.25h1.5a.75.75 0 1 1 0 1.5H9A.75.75 0 0 1 8.25 6m4.5 0a.75.75 0 0 1 .75-.75H15a.75.75 0 1 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75m-4.5 3.75A.75.75 0 0 1 9 9h1.5a.75.75 0 1 1 0 1.5H9a.75.75 0 0 1-.75-.75m4.5 0A.75.75 0 0 1 13.5 9H15a.75.75 0 1 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75m-4.5 3.75a.75.75 0 0 1 .75-.75h1.5a.75.75 0 1 1 0 1.5H9a.75.75 0 0 1-.75-.75m4.5 0a.75.75 0 0 1 .75-.75H15a.75.75 0 1 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75"})))}};function l({name:t,size:r=24,...e}){const n=s[t];return n?a(n,{width:r,height:r,fill:"currentColor",...e}):("production"!==process.env.NODE_ENV&&console.warn(`Icon "${t}" not found.`),null)}var y={typography:"typography-styles-module_typography__h3ta9",typographyTitle:"typography-styles-module_typographyTitle__9V99m",typographyHeader:"typography-styles-module_typographyHeader__k4mIZ",typographyBody:"typography-styles-module_typographyBody__4rtGZ",typographyCaption:"typography-styles-module_typographyCaption__-ci4T"};const i=({as:t="p",variant:r="body",className:e="",children:n,...o})=>{const h=`${y.typography} ${y[`typography${r.charAt(0).toUpperCase()+r.slice(1)}`]} ${e}`.trim();return a(t,{className:h,...o,children:n})};export{n as Badge,l as Icon,i as Typography};
2
- //# sourceMappingURL=index.js.map
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.13",
4
- "author": "Tiago Sousa (tiagorsousa0@gmail.com)",
5
- "license": "MIT",
3
+ "version": "1.1.15",
6
4
  "type": "module",
7
- "main": "dist/index.js",
8
- "module": "dist/index.js",
9
- "types": "dist/types/index.d.ts",
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
- "dev": "storybook dev -p 6006",
15
- "lint": "eslint ./src",
16
- "prepare": "husky",
17
- "build": "pnpm build:package && pnpm build:storybook",
18
- "build:package": "rollup --config rollup.config.ts --configPlugin typescript",
19
- "build:storybook": "storybook build"
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
- "@commitlint/cli": "19.8.0",
41
- "@commitlint/config-conventional": "19.8.0",
42
- "@eslint/js": "^9.25.0",
43
- "@rollup/plugin-babel": "^6.0.4",
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/builder-vite": "^9.0.11",
51
- "@storybook/react-vite": "^9.0.11",
52
- "@svgr/rollup": "^8.1.0",
53
- "@types/node": "^24.0.3",
54
- "@types/react": "^19.1.2",
55
- "@types/react-dom": "^19.1.2",
56
- "@vitejs/plugin-react": "^4.4.1",
57
- "cssnano": "^7.0.7",
58
- "eslint": "^9.25.0",
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
- "typescript": "~5.8.3",
72
- "typescript-eslint": "^8.30.1",
73
- "vite": "^6.3.5",
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": "^19.1.0",
79
- "react-dom": "^19.1.0"
44
+ "react": ">=16.9.0",
45
+ "react-dom": ">=16.9.0"
80
46
  },
81
- "eslintConfig": {
82
- "extends": [
83
- "plugin:storybook/recommended"
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
  }
@@ -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
- }