sate-lib 1.1.25 → 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 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/?path=/docs/components-badge--docs)
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};
@@ -0,0 +1 @@
1
+ import o from"../../assets/fonts/golos-ui-bold.woff2";export{o as default};
@@ -0,0 +1 @@
1
+ import o from"../../assets/fonts/golos-ui-medium.woff2";export{o as default};
@@ -0,0 +1 @@
1
+ import o from"../../assets/fonts/golos-ui-regular.woff2";export{o as default};
@@ -1,70 +1 @@
1
- *, :before, :after {
2
- box-sizing: border-box;
3
- }
4
-
5
- * {
6
- outline: none;
7
- margin: 0;
8
- padding: 0;
9
- }
10
-
11
- ul, ol {
12
- list-style: none;
13
- }
14
-
15
- html:focus-within {
16
- scroll-behavior: smooth;
17
- }
18
-
19
- a:not([class]) {
20
- text-decoration-skip-ink: auto;
21
- color: inherit;
22
- }
23
-
24
- img, picture, svg, video, canvas {
25
- vertical-align: middle;
26
- background-repeat: no-repeat;
27
- background-size: cover;
28
- max-width: 100%;
29
- height: auto;
30
- }
31
-
32
- input, button, textarea, select {
33
- font: inherit;
34
- color: inherit;
35
- background: none;
36
- border: none;
37
- outline: none;
38
- }
39
-
40
- @media (prefers-reduced-motion: reduce) {
41
- html:focus-within {
42
- scroll-behavior: auto;
43
- }
44
-
45
- *, :before, :after {
46
- transition: none;
47
- scroll-behavior: auto !important;
48
- transition-duration: .01ms !important;
49
- animation-duration: .01ms !important;
50
- animation-iteration-count: 1 !important;
51
- }
52
- }
53
-
54
- body, html {
55
- scroll-behavior: smooth;
56
- height: 100%;
57
- }
58
-
59
- body {
60
- -webkit-font-smoothing: antialiased;
61
- }
62
-
63
- p, h1, h2, h3, h4, h5, h6 {
64
- overflow-wrap: break-word;
65
- }
66
-
67
- button {
68
- cursor: pointer;
69
- }
70
-
1
+ *,:before,:after{box-sizing:border-box}*{outline:none;margin:0;padding:0}ul,ol{list-style:none}html:focus-within{scroll-behavior:smooth}a:not([class]){text-decoration-skip-ink:auto;color:inherit}img,picture,svg,video,canvas{vertical-align:middle;background-repeat:no-repeat;background-size:cover;max-width:100%;height:auto}input,button,textarea,select{font:inherit;color:inherit;background:0 0;border:none;outline:none}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:before,:after{transition:none;scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}body,html{scroll-behavior:smooth;height:100%}body{-webkit-font-smoothing:antialiased}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}button{cursor:pointer}
@@ -1,34 +1 @@
1
- :root {
2
- --box-shadow-1: 0px 1px 0px 0px #11111a1a;
3
- --box-shadow-2: 0px 1px 0px #11111a0d, 0px 0px 8px #11111a1a;
4
- --opacity-disabled: .38;
5
- --color-theme-core-bright: #317c6c;
6
- --color-theme-core-dark: #b80f0f;
7
- --color-system-content-primary: #0e0e0e;
8
- --color-system-content-secondary: #474747;
9
- --color-system-content-tertiary: #767676;
10
- --radius-radii-10: .625rem;
11
- --radius-radii-16: 1rem;
12
- --radius-radii-24: 1.5rem;
13
- --radius-large-container: 1rem;
14
- --radius-chip: .5rem;
15
- --radius-medium-container: .75rem;
16
- --spacing-size-4: .25rem;
17
- --spacing-size-154: 9.625rem;
18
- --spacing-size-0: 0;
19
- --padding-x-small: .5rem;
20
- --padding-small: 1rem;
21
- --padding-medium: 1.5rem;
22
- --padding-large: 2rem;
23
- --size-x-small: 1.5rem;
24
- --size-medium: 2.5rem;
25
- --size-large: 3rem;
26
- --size-x-large: 3.5rem;
27
- --size-small: 2rem;
28
- --size-2x-large: 4.5rem;
29
- --size-2x-small: 1rem;
30
- --spacing-column-gap-cards: .75rem;
31
- --spacing-column-gap-chips: .5rem;
32
- --spacing-column-margin-screen-mobile: 1.5rem;
33
- }
34
-
1
+ :root{--box-shadow-1:0px 1px 0px 0px #11111a1a;--box-shadow-2:0px 1px 0px #11111a0d,0px 0px 8px #11111a1a;--opacity-disabled:.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:.625rem;--radius-radii-16:1rem;--radius-radii-24:1.5rem;--radius-large-container:1rem;--radius-chip:.5rem;--radius-medium-container:.75rem;--spacing-size-4:.25rem;--spacing-size-154:9.625rem;--spacing-size-0:0;--padding-x-small:.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:.75rem;--spacing-column-gap-chips:.5rem;--spacing-column-margin-screen-mobile:1.5rem}
@@ -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}
@@ -1,10 +1 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import badge_styles_module from "./badge.styles.module.js";
3
- function Badge({ className = "", children, ...props }) {
4
- return /*#__PURE__*/ jsx("span", {
5
- className: `${badge_styles_module.badge} ${className}`.trim(),
6
- ...props,
7
- children: children
8
- });
9
- }
10
- export { Badge };
1
+ import{jsx as e}from"react/jsx-runtime";import r from"./badge.styles.module.js";function t({className:t="",children:m,...a}){return e("span",{className:`${r.badge} ${t}`.trim(),...a,children:m})}export{t as Badge};
@@ -1,5 +1 @@
1
- import "./badge.styles_module.css";
2
- const badge_styles_module = {
3
- badge: "badge-AenA5o"
4
- };
5
- export { badge_styles_module as default };
1
+ import"./badge.styles_module.css";let e={badge:"badge-AenA5o"};export{e as default};
@@ -1,4 +1 @@
1
- .badge-AenA5o {
2
- border-radius: .25rem;
3
- }
4
-
1
+ .badge-AenA5o{border-radius:.25rem}
@@ -1,19 +1 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import button_styles_module from "./button.styles.module.js";
3
- function Button({ primary = false, size = "medium", backgroundColor, label, ...props }) {
4
- const mode = primary ? button_styles_module.primary : button_styles_module.secondary;
5
- return /*#__PURE__*/ jsx("button", {
6
- type: "button",
7
- className: [
8
- button_styles_module.button,
9
- button_styles_module[size],
10
- mode
11
- ].join(" "),
12
- style: {
13
- backgroundColor
14
- },
15
- ...props,
16
- children: label
17
- });
18
- }
19
- export { Button };
1
+ import{jsx as t}from"react/jsx-runtime";import o from"./button.styles.module.js";function e({primary:e=!1,size:r="medium",backgroundColor:n,label:m,...u}){let i=e?o.primary:o.secondary;return t("button",{type:"button",className:[o.button,o[r],i].join(" "),style:{backgroundColor:n},...u,children:m})}export{e as Button};
@@ -1,10 +1 @@
1
- import "./button.styles_module.css";
2
- const button_styles_module = {
3
- button: "button-dWV52U",
4
- primary: "primary-bbJ4Nd",
5
- secondary: "secondary-W91doR",
6
- small: "small-uxUptY",
7
- medium: "medium-iwhjuP",
8
- large: "large-N1qL9e"
9
- };
10
- export { button_styles_module as default };
1
+ import"./button.styles_module.css";let t={button:"button-dWV52U",primary:"primary-bbJ4Nd",secondary:"secondary-W91doR",small:"small-uxUptY",medium:"medium-iwhjuP",large:"large-N1qL9e"};export{t as default};
@@ -1,35 +1 @@
1
- .button-dWV52U {
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
- .primary-bbJ4Nd {
11
- color: #fff;
12
- background-color: #1ea7fd;
13
- }
14
-
15
- .secondary-W91doR {
16
- color: #333;
17
- background-color: #0000;
18
- box-shadow: inset 0 0 0 1px #00000026;
19
- }
20
-
21
- .small-uxUptY {
22
- padding: 10px 16px;
23
- font-size: 12px;
24
- }
25
-
26
- .medium-iwhjuP {
27
- padding: 11px 20px;
28
- font-size: 14px;
29
- }
30
-
31
- .large-N1qL9e {
32
- padding: 12px 24px;
33
- font-size: 16px;
34
- }
35
-
1
+ .button-dWV52U{cursor:pointer;border:0;border-radius:3em;font-weight:700;line-height:1;display:inline-block}.primary-bbJ4Nd{color:#fff;background-color:#1ea7fd}.secondary-W91doR{color:#333;background-color:#0000;box-shadow:inset 0 0 0 1px #00000026}.small-uxUptY{padding:10px 16px;font-size:12px}.medium-iwhjuP{padding:11px 20px;font-size:14px}.large-N1qL9e{padding:12px 24px;font-size:16px}
@@ -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
@@ -1,2 +1,3 @@
1
1
  export { Button } from "./components/button/button";
2
2
  export { Badge } from "./components/badge/badge";
3
+ export { Typography } from "./components/typography/typography";
package/lib/index.js CHANGED
@@ -1,3 +1 @@
1
- import { Button } from "./components/button/button.js";
2
- import { Badge } from "./components/badge/badge.js";
3
- export { Badge, 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.25",
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,12 +29,12 @@
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",
35
37
  "@rsbuild/core": "1.4.0-beta.4",
36
- "@rsbuild/plugin-css-minimizer": "^1.0.2",
37
38
  "@rsbuild/plugin-react": "^1.3.2",
38
39
  "@rslib/core": "^0.10.2",
39
40
  "@storybook/addon-docs": "^9.0.11",
@@ -44,6 +45,7 @@
44
45
  "@storybook/blocks": "^9.0.0-alpha.17",
45
46
  "@storybook/react": "^9.0.11",
46
47
  "@storybook/test": "^9.0.0-alpha.2",
48
+ "@types/node": "^24.0.4",
47
49
  "@types/react": "^19.1.8",
48
50
  "react": "^19.1.0",
49
51
  "storybook": "^9.0.11",
@@ -68,5 +70,8 @@
68
70
  "ui-library",
69
71
  "react-components",
70
72
  "frontend"
71
- ]
73
+ ],
74
+ "dependencies": {
75
+ "subset-font": "^2.4.0"
76
+ }
72
77
  }