sate-lib 1.1.26 → 1.1.27
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 -1
- package/lib/assets/fonts/author-bold.js +1 -0
- package/lib/assets/fonts/author-bold.woff2 +0 -0
- package/lib/assets/fonts/golos-ui-bold.js +1 -0
- package/lib/assets/fonts/golos-ui-bold.woff2 +0 -0
- package/lib/assets/fonts/golos-ui-medium.js +1 -0
- package/lib/assets/fonts/golos-ui-medium.woff2 +0 -0
- package/lib/assets/fonts/golos-ui-regular.js +1 -0
- package/lib/assets/fonts/golos-ui-regular.woff2 +0 -0
- package/lib/assets/styles/typography.css +1 -0
- package/lib/components/typography/typography.d.ts +7 -0
- package/lib/components/typography/typography.js +1 -0
- package/lib/components/typography/typography.styles.module.js +1 -0
- package/lib/components/typography/typography.styles_module.css +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
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
|
|
6
|
+
[Demo](https://sate-lib.vercel.app/)
|
|
7
|
+
[NPM](https://www.npmjs.com/package/sate-lib)
|
|
7
8
|
|
|
8
9
|
## Tech Stack
|
|
9
10
|
|
|
@@ -11,6 +12,7 @@ A lightweight and modular React component library designed for modern web interf
|
|
|
11
12
|
- [React](https://react.dev/)
|
|
12
13
|
- [Typescript](https://www.typescriptlang.org/)
|
|
13
14
|
- [Storybook](https://storybook.js.org/)
|
|
15
|
+
- [CSS Modules](https://github.com/css-modules/css-modules)
|
|
14
16
|
- [Biome](https://biomejs.dev/)
|
|
15
17
|
|
|
16
18
|
## Installation
|
|
@@ -30,6 +32,24 @@ function App() {
|
|
|
30
32
|
}
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
## Tree shakable
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
import { Badge } from "sate-lib/Badge";
|
|
39
|
+
|
|
40
|
+
function App() {
|
|
41
|
+
return <Badge>New</Badge>;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Optional CSS imports
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
import from "sate-lib/reset.css";
|
|
49
|
+
import from "sate-lib/tokens.css";
|
|
50
|
+
import from "sate-lib/typography.css";
|
|
51
|
+
```
|
|
52
|
+
|
|
33
53
|
## Commit etiquette
|
|
34
54
|
|
|
35
55
|
- [Commit Etiquette](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../../assets/fonts/author-bold.woff2";export{o as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../../assets/fonts/golos-ui-bold.woff2";export{o as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../../assets/fonts/golos-ui-medium.woff2";export{o as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../../assets/fonts/golos-ui-regular.woff2";export{o as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:Author;src:url(../../assets/fonts/author-bold.woff2)format("woff2");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Golos UI;src:url(../../assets/fonts/golos-ui-regular.woff2)format("woff2");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Golos UI;src:url(../../assets/fonts/golos-ui-medium.woff2)format("woff2");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Golos UI;src:url(../../assets/fonts/golos-ui-bold.woff2)format("woff2");font-weight:700;font-style:normal;font-display:swap}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
export type Variant = "title" | "header" | "body" | "caption";
|
|
3
|
+
export interface TypographyProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
4
|
+
as?: "p" | "span" | "h1" | "h2" | "h3" | "h4";
|
|
5
|
+
variant?: Variant;
|
|
6
|
+
}
|
|
7
|
+
export declare const Typography: ({ as: Tag, variant, className, children, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import p from"./typography.styles.module.js";let t=({as:t="p",variant:o="body",className:e="",children:a,...y})=>r(t,{className:`${p.typography} ${p[`typography${o.charAt(0).toUpperCase()+o.slice(1)}`]} ${e}`.trim(),...y,children:a});export{t as Typography};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./typography.styles_module.css";let p={typography:"typography-B71hFi",typographyTitle:"typographyTitle-m8elLJ",typographyHeader:"typographyHeader-Mzvci0",typographyBody:"typographyBody-pzAoJJ",typographyCaption:"typographyCaption-DUKd5u"};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.typography-B71hFi{color:#111;margin:0}.typographyTitle-m8elLJ{font-family:Author,Arial Black,Impact,sans-serif;font-size:4rem;font-weight:700;line-height:1.1}.typographyHeader-Mzvci0,.typographyBody-pzAoJJ,.typographyCaption-DUKd5u{font-family:Golos UI,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.typographyHeader-Mzvci0{font-size:2rem;font-weight:500;line-height:1.3}.typographyBody-pzAoJJ{font-size:1rem;font-weight:400;line-height:1.6}.typographyCaption-DUKd5u{opacity:.7;font-size:.875rem;font-weight:400;line-height:1.4}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as o}from"./components/button/button.js";import{Badge as t}from"./components/badge/badge.js";export{t as Badge,o as Button};
|
|
1
|
+
import{Button as o}from"./components/button/button.js";import{Badge as t}from"./components/badge/badge.js";import{Typography as p}from"./components/typography/typography.js";export{t as Badge,o as Button,p as Typography};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sate-lib",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"types": "./lib/components/badge/badge.d.ts"
|
|
17
17
|
},
|
|
18
18
|
"./tokens.css": "./lib/assets/styles/tokens.css",
|
|
19
|
-
"./reset.css": "./lib/assets/styles/reset.css"
|
|
19
|
+
"./reset.css": "./lib/assets/styles/reset.css",
|
|
20
|
+
"./typography.css": "./lib/assets/styles/typography.css"
|
|
20
21
|
},
|
|
21
22
|
"types": "./lib/index.d.ts",
|
|
22
23
|
"files": [
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
"check": "biome check --write",
|
|
29
30
|
"dev": "rslib build --watch",
|
|
30
31
|
"format": "biome format --write",
|
|
31
|
-
"storybook": "storybook dev"
|
|
32
|
+
"storybook": "storybook dev",
|
|
33
|
+
"subset": "node ./subset-fonts.js"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
44
46
|
"@storybook/react": "^9.0.11",
|
|
45
47
|
"@storybook/test": "^9.0.0-alpha.2",
|
|
48
|
+
"@types/node": "^24.0.4",
|
|
46
49
|
"@types/react": "^19.1.8",
|
|
47
50
|
"react": "^19.1.0",
|
|
48
51
|
"storybook": "^9.0.11",
|
|
@@ -67,5 +70,8 @@
|
|
|
67
70
|
"ui-library",
|
|
68
71
|
"react-components",
|
|
69
72
|
"frontend"
|
|
70
|
-
]
|
|
73
|
+
],
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"subset-font": "^2.4.0"
|
|
76
|
+
}
|
|
71
77
|
}
|