sate-lib 1.3.0 → 1.4.1

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
@@ -22,6 +22,8 @@ A lightweight and modular React component library designed for modern web interf
22
22
  - [Husky](https://typicode.github.io/husky/)
23
23
  - [Commit Lint](https://commitlint.js.org/)
24
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/)
25
27
 
26
28
  ## Installation
27
29
 
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import"react";let a=a=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...a,children:t("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"})});export{a as default};
@@ -0,0 +1 @@
1
+ import{jsx as a}from"react/jsx-runtime";import"react";let h=h=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...h,children:a("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"})});export{h as default};
@@ -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 o}from"react/jsx-runtime";import{forwardRef as r}from"react";import t from"../../assets/icons/Bed.js";import i from"../../assets/icons/Building.js";let e={Bed:t,Building:i},n=r(function({name:r,size:t=24,color:i,...n},s){let c=e[r];return c?o(c,{width:t,height:t,fill:"currentColor",...n}):null});export{n as Icon};
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { Button } from "./components/button/button";
2
2
  export { Badge } from "./components/badge/badge";
3
3
  export { Typography } from "./components/typography/typography";
4
+ export { Icon } from "./components/icon/icon";
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";import{Typography as p}from"./components/typography/typography.js";export{t as Badge,o as Button,p as Typography};
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";import{Icon as n}from"./components/icon/icon.js";export{t as Badge,o as Button,n as Icon,p as Typography};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sate-lib",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
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,12 +33,14 @@
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
- "storybook": "storybook dev",
37
- "subset": "node ./subset-fonts.js",
38
44
  "release": "HUSKY=0 semantic-release",
39
45
  "prepare": "husky"
40
46
  },
@@ -44,6 +50,7 @@
44
50
  "@commitlint/config-conventional": "19.8.0",
45
51
  "@rsbuild/core": "1.4.0-beta.4",
46
52
  "@rsbuild/plugin-react": "^1.3.3",
53
+ "@rsbuild/plugin-svgr": "^1.2.1",
47
54
  "@rslib/core": "^0.10.4",
48
55
  "@semantic-release/changelog": "^6.0.3",
49
56
  "@semantic-release/git": "^10.0.1",
@@ -65,6 +72,7 @@
65
72
  "storybook-addon-rslib": "^2.0.2",
66
73
  "storybook-react-rsbuild": "^2.0.2",
67
74
  "subset-font": "^2.4.0",
75
+ "svgo": "^4.0.0",
68
76
  "typescript": "^5.8.3"
69
77
  },
70
78
  "peerDependencies": {