@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 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
@@ -1,2 +1 @@
1
1
  export * from "./Typography";
2
- //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export * from "./Typography";
2
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
+ "use client";
1
2
  "use strict";
3
+ "use client";
2
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
5
  if (k2 === undefined) k2 = k;
4
6
  var desc = Object.getOwnPropertyDescriptor(m, k);
package/package.json CHANGED
@@ -1,51 +1,70 @@
1
1
  {
2
- "name": "@mysetup/typography",
3
- "version": "2.0.1",
4
- "license": "MIT",
5
- "main": "dist/index.js",
6
- "files": [
7
- "dist"
8
- ],
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.js"
14
- },
15
- "./style.css": "./style.css",
16
- "./package.json": "./package.json"
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
- "scripts": {
19
- "build": "rm -rf ./dist && tsc -p tsconfig.build.json && cp 'styles.css' 'dist/'",
20
- "lint": "eslint .",
21
- "typecheck": "tsc --noEmit",
22
- "test": "jest",
23
- "test:coverage": "jest --coverage",
24
- "format": "prettier --write \"**/*.{ts,tsx,md,js,mjs,json}\"",
25
- "checks": "pnpm typecheck && pnpm lint && pnpm test",
26
- "clean": "rm -rf node_modules .swc dist pnpm-lock.yaml && echo \"✅ Successfully removed \""
27
- },
28
- "dependencies": {
29
- "@mysetup/classnames": "latest",
30
- "react": "^18.3.1"
31
- },
32
- "devDependencies": {
33
- "@mysetup/eslint-config": "latest",
34
- "@mysetup/jest-config": "latest",
35
- "@mysetup/prettier-config": "latest",
36
- "@mysetup/tsconfig": "latest",
37
- "@testing-library/react": "^16.2.0",
38
- "@types/jest": "^29.5.14",
39
- "@types/jest-axe": "^3.5.9",
40
- "@types/react": "^18.3.1",
41
- "jest": "^29.7.0",
42
- "jest-axe": "^9.0.0",
43
- "react-dom": "^18.3.1",
44
- "typescript": "5.5.4"
45
- },
46
- "prettier": "@mysetup/prettier-config",
47
- "engines": {
48
- "node": ">=20.15.1"
49
- },
50
- "packageManager": "pnpm@9.9.0"
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}