@mysetup/typography 2.0.1 → 2.0.3
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 +48 -0
- package/dist/Typography/Typography.d.ts +0 -1
- package/dist/Typography/index.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -0
- package/package.json +68 -49
- package/dist/Typography/Typography.d.ts.map +0 -1
- package/dist/Typography/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @mysetup/typography
|
|
2
|
+
|
|
3
|
+
Typography component and shared styles for React applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @mysetup/typography react react-dom
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Supported libraries and runtimes
|
|
12
|
+
|
|
13
|
+
| Supported | Notes |
|
|
14
|
+
| ------------------------- | ------------------------ |
|
|
15
|
+
| React | Required peer dependency |
|
|
16
|
+
| Vite React apps | Supported |
|
|
17
|
+
| Next.js client components | Supported |
|
|
18
|
+
| Next.js server components | Not supported |
|
|
19
|
+
| Node.js scripts | Not supported |
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
"use client";
|
|
25
|
+
|
|
26
|
+
import { Typography } from "@mysetup/typography";
|
|
27
|
+
import "@mysetup/typography/styles.css";
|
|
28
|
+
|
|
29
|
+
export function HeroTitle() {
|
|
30
|
+
return (
|
|
31
|
+
<Typography as="h1" variant="headline2" display>
|
|
32
|
+
Design System Title
|
|
33
|
+
</Typography>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Styles
|
|
39
|
+
|
|
40
|
+
- Import `@mysetup/typography/styles.css` once in your app entrypoint, layout, or component tree.
|
|
41
|
+
- The package also keeps `@mysetup/typography/style.css` as a compatibility alias.
|
|
42
|
+
|
|
43
|
+
## Props
|
|
44
|
+
|
|
45
|
+
- `as`: HTML tag or React component to render
|
|
46
|
+
- `variant`: typography variant name
|
|
47
|
+
- `display`: toggles the display font modifier
|
|
48
|
+
- `className`: additional classes merged with the generated variant class
|
|
@@ -35,4 +35,3 @@ export type TypographyProps<T extends HTMLElement = any> = HTMLAttributes<T> & {
|
|
|
35
35
|
variant?: TypographyVariant;
|
|
36
36
|
};
|
|
37
37
|
export declare const Typography: ({ as, children, className, display, variant, ...props }: TypographyProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
38
|
-
//# sourceMappingURL=Typography.d.ts.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,51 +1,70 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"name": "@mysetup/typography",
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "React typography components and CSS styles for UI applications.",
|
|
5
|
+
"author": "krishnaraj <krishnaraj.webdev@gmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"react",
|
|
9
|
+
"typography",
|
|
10
|
+
"components",
|
|
11
|
+
"css",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"./dist/styles.css"
|
|
21
|
+
],
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"require": "./dist/index.js"
|
|
17
30
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
31
|
+
"./style.css": "./dist/styles.css",
|
|
32
|
+
"./styles.css": "./dist/styles.css",
|
|
33
|
+
"./package.json": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@mysetup/classnames": "^2.0.4"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"react": "^18.3.1 || ^19.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@testing-library/react": "^16.2.0",
|
|
43
|
+
"@types/jest": "^29.5.14",
|
|
44
|
+
"@types/jest-axe": "^3.5.9",
|
|
45
|
+
"@types/react": "^18.3.1",
|
|
46
|
+
"jest": "^29.7.0",
|
|
47
|
+
"jest-axe": "^9.0.0",
|
|
48
|
+
"react": "^18.3.1",
|
|
49
|
+
"react-dom": "^18.3.1",
|
|
50
|
+
"typescript": "5.5.4",
|
|
51
|
+
"@mysetup/prettier-config": "^2.0.4",
|
|
52
|
+
"@mysetup/eslint-config": "^2.0.5",
|
|
53
|
+
"@mysetup/jest-config": "^2.0.4",
|
|
54
|
+
"@mysetup/tsconfig": "^2.0.4"
|
|
55
|
+
},
|
|
56
|
+
"prettier": "@mysetup/prettier-config",
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.15.1"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "node ../scripts/package-fs.cjs remove dist && tsc -p tsconfig.build.json && node ../scripts/package-fs.cjs ensure-leading-text dist/index.js \"\\\"use client\\\";\" && node ../scripts/package-fs.cjs copy-file styles.css dist/styles.css",
|
|
62
|
+
"lint": "node ../scripts/run-eslint.cjs .",
|
|
63
|
+
"typecheck": "tsc --noEmit",
|
|
64
|
+
"test": "jest",
|
|
65
|
+
"test:coverage": "jest --coverage",
|
|
66
|
+
"format": "prettier --write \"**/*.{ts,tsx,md,js,mjs,json}\"",
|
|
67
|
+
"checks": "pnpm typecheck && pnpm lint && pnpm test && pnpm build",
|
|
68
|
+
"clean": "node ../scripts/package-fs.cjs remove node_modules .swc dist pnpm-lock.yaml && echo \"Cleaned\""
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../Typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI9E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;CAc7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAG/D,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG;IAC3E;;OAEG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,UAAU,4DAOpB,eAAe,2FASjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|