sate-lib 1.2.0 → 1.4.0
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 +29 -6
- package/lib/assets/icons/Bed.js +1 -0
- package/lib/assets/icons/Bed.svg +1 -0
- package/lib/assets/icons/Building.js +1 -0
- package/lib/assets/icons/Building.svg +1 -0
- package/lib/assets/styles/reset.css +1 -1
- package/lib/components/icon/icon.d.ts +13 -0
- package/lib/components/icon/icon.js +1 -0
- package/package.json +31 -19
package/README.md
CHANGED
|
@@ -3,17 +3,27 @@
|
|
|
3
3
|
A lightweight and modular React component library designed for modern web interfaces.
|
|
4
4
|
**SATE Lib** powers the [sate.menu](https://sate.menu) platform with reusable, scalable, and themeable UI components.
|
|
5
5
|
|
|
6
|
-
[Demo](https://sate-lib.vercel.app/)
|
|
7
|
-
[NPM](https://www.npmjs.com/package/sate-lib)
|
|
6
|
+
- [Demo](https://sate-lib.vercel.app/)
|
|
7
|
+
- [NPM](https://www.npmjs.com/package/sate-lib)
|
|
8
8
|
|
|
9
9
|
## Tech Stack
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
#### Core Technologies
|
|
12
|
+
|
|
12
13
|
- [React](https://react.dev/)
|
|
13
14
|
- [Typescript](https://www.typescriptlang.org/)
|
|
14
15
|
- [Storybook](https://storybook.js.org/)
|
|
15
16
|
- [CSS Modules](https://github.com/css-modules/css-modules)
|
|
17
|
+
|
|
18
|
+
#### Development & Configuration
|
|
19
|
+
|
|
20
|
+
- [RSLib](https://rslib.rs/)
|
|
16
21
|
- [Biome](https://biomejs.dev/)
|
|
22
|
+
- [Husky](https://typicode.github.io/husky/)
|
|
23
|
+
- [Commit Lint](https://commitlint.js.org/)
|
|
24
|
+
- [Semantic Release](https://github.com/semantic-release/semantic-release)
|
|
25
|
+
- [Subset Font](https://www.npmjs.com/package/subset-font)
|
|
26
|
+
- [SVGO](https://svgo.dev/docs/introduction/)
|
|
17
27
|
|
|
18
28
|
## Installation
|
|
19
29
|
|
|
@@ -52,15 +62,28 @@ import from "sate-lib/typography.css";
|
|
|
52
62
|
|
|
53
63
|
## Commit etiquette
|
|
54
64
|
|
|
55
|
-
- [Commit Etiquette](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
56
|
-
|
|
57
65
|
```bash
|
|
58
66
|
[build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] : message
|
|
59
67
|
```
|
|
60
68
|
|
|
69
|
+
#### Version Triggering
|
|
70
|
+
|
|
71
|
+
| Commit Type | Release Type | Version Bump Example |
|
|
72
|
+
| ----------------- | -------------------- | -------------------- |
|
|
73
|
+
| `feat` | Minor release | 1.1.0 → 1.2.0 |
|
|
74
|
+
| `fix` | Patch release | 1.1.0 → 1.1.1 |
|
|
75
|
+
| `BREAKING CHANGE` | Major release | 1.1.0 → 2.0.0 |
|
|
76
|
+
| `chore` | No release triggered | |
|
|
77
|
+
| `docs` | No release triggered | |
|
|
78
|
+
| `style` | No release triggered | |
|
|
79
|
+
| `refactor` | No release triggered | |
|
|
80
|
+
| `test` | No release triggered | |
|
|
81
|
+
|
|
61
82
|
## Fonts compression
|
|
62
83
|
|
|
63
|
-
|
|
84
|
+
Optimize and subset fonts using the `subset-fonts.js` script to reduce file size and improve loading performance.
|
|
85
|
+
|
|
86
|
+
#### Run the Font Subset Script
|
|
64
87
|
|
|
65
88
|
```bash
|
|
66
89
|
pnpm subset
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../../assets/icons/Bed.svg";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><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"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s from"../../assets/icons/Building.svg";export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><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"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{box-sizing:border-box}*{
|
|
1
|
+
*,:before,:after{box-sizing:border-box}*{margin:0;padding:0}html{scroll-behavior:smooth}img{max-width:100%;display:block}h1,h2,h3,h4,h5,h6{text-wrap:balance}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SVGProps } from "react";
|
|
2
|
+
export type IconName = "Bed" | "Building";
|
|
3
|
+
export interface IconProps extends SVGProps<SVGSVGElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the icon to display
|
|
6
|
+
*/
|
|
7
|
+
name: IconName;
|
|
8
|
+
/**
|
|
9
|
+
* The size of the icon in pixels
|
|
10
|
+
*/
|
|
11
|
+
size?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const Icon: import("react").ForwardRefExoticComponent<Omit<IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as o}from"react";import t from"../../assets/icons/Bed.js";import i from"../../assets/icons/Building.js";let e={Bed:t,Building:i},n=o(function({name:o,size:t=24,color:i,...n},s){let c=e[o];return c?r(c,{ref:s,width:t,height:t,fill:"currentColor",...n}):null});export{n as Icon};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sate-lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"import": "./lib/components/typography/typography.js",
|
|
20
20
|
"types": "./lib/components/typography/typography.d.ts"
|
|
21
21
|
},
|
|
22
|
+
"./icon": {
|
|
23
|
+
"import": "./lib/components/icon/icon.js",
|
|
24
|
+
"types": "./lib/components/icon/icon.d.ts"
|
|
25
|
+
},
|
|
22
26
|
"./tokens.css": "./lib/assets/styles/tokens.css",
|
|
23
27
|
"./reset.css": "./lib/assets/styles/reset.css",
|
|
24
28
|
"./typography.css": "./lib/assets/styles/typography.css"
|
|
@@ -29,38 +33,46 @@
|
|
|
29
33
|
],
|
|
30
34
|
"scripts": {
|
|
31
35
|
"build": "rslib build",
|
|
36
|
+
"build:full": "pnpm optimize:fonts && pnpm optimize:svg && pnpm build",
|
|
32
37
|
"build:storybook": "storybook build",
|
|
38
|
+
"optimize:fonts": "node ./subset-fonts.js",
|
|
39
|
+
"optimize:svg": "node ./optimize-svgs.js",
|
|
40
|
+
"storybook": "storybook dev",
|
|
33
41
|
"check": "biome check --write",
|
|
34
42
|
"dev": "rslib build --watch",
|
|
35
43
|
"format": "biome format --write",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"release": "semantic-release"
|
|
44
|
+
"release": "HUSKY=0 semantic-release",
|
|
45
|
+
"prepare": "husky"
|
|
39
46
|
},
|
|
40
47
|
"devDependencies": {
|
|
41
48
|
"@biomejs/biome": "^1.9.4",
|
|
49
|
+
"@commitlint/cli": "19.8.0",
|
|
50
|
+
"@commitlint/config-conventional": "19.8.0",
|
|
42
51
|
"@rsbuild/core": "1.4.0-beta.4",
|
|
43
|
-
"@rsbuild/plugin-react": "^1.3.
|
|
44
|
-
"@
|
|
52
|
+
"@rsbuild/plugin-react": "^1.3.3",
|
|
53
|
+
"@rsbuild/plugin-svgr": "^1.2.1",
|
|
54
|
+
"@rslib/core": "^0.10.4",
|
|
45
55
|
"@semantic-release/changelog": "^6.0.3",
|
|
46
56
|
"@semantic-release/git": "^10.0.1",
|
|
47
57
|
"@semantic-release/npm": "^12.0.2",
|
|
48
|
-
"@storybook/addon-docs": "^9.0.
|
|
49
|
-
"@storybook/addon-essentials": "
|
|
50
|
-
"@storybook/addon-interactions": "
|
|
51
|
-
"@storybook/addon-links": "^9.0.
|
|
52
|
-
"@storybook/addon-onboarding": "^9.0.
|
|
53
|
-
"@storybook/blocks": "
|
|
54
|
-
"@storybook/react": "^9.0.
|
|
55
|
-
"@storybook/test": "
|
|
56
|
-
"@types/node": "^24.0.
|
|
58
|
+
"@storybook/addon-docs": "^9.0.15",
|
|
59
|
+
"@storybook/addon-essentials": "9.0.0-alpha.12",
|
|
60
|
+
"@storybook/addon-interactions": "9.0.0-alpha.10",
|
|
61
|
+
"@storybook/addon-links": "^9.0.15",
|
|
62
|
+
"@storybook/addon-onboarding": "^9.0.15",
|
|
63
|
+
"@storybook/blocks": "9.0.0-alpha.17",
|
|
64
|
+
"@storybook/react": "^9.0.15",
|
|
65
|
+
"@storybook/test": "9.0.0-alpha.2",
|
|
66
|
+
"@types/node": "^24.0.10",
|
|
57
67
|
"@types/react": "^19.1.8",
|
|
68
|
+
"husky": "^9.1.7",
|
|
58
69
|
"react": "^19.1.0",
|
|
59
|
-
"semantic-release": "^24.2.
|
|
60
|
-
"storybook": "^9.0.
|
|
61
|
-
"storybook-addon-rslib": "^2.0.
|
|
62
|
-
"storybook-react-rsbuild": "^2.0.
|
|
70
|
+
"semantic-release": "^24.2.6",
|
|
71
|
+
"storybook": "^9.0.15",
|
|
72
|
+
"storybook-addon-rslib": "^2.0.2",
|
|
73
|
+
"storybook-react-rsbuild": "^2.0.2",
|
|
63
74
|
"subset-font": "^2.4.0",
|
|
75
|
+
"svgo": "^4.0.0",
|
|
64
76
|
"typescript": "^5.8.3"
|
|
65
77
|
},
|
|
66
78
|
"peerDependencies": {
|