kwon-ui 0.0.0-stage → 0.1.0
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/CATALOG.md +301 -0
- package/CHANGELOG.md +31 -0
- package/LICENSE +4 -0
- package/README.md +71 -2
- package/bin/kwon-ui.mjs +60 -0
- package/check/index.mjs +233 -0
- package/claude/ADOPTING.md +99 -0
- package/claude/APP-CLAUDE.md +15 -0
- package/claude/hook.mjs +46 -0
- package/dist/classes.json +69 -0
- package/dist/kwon-ui.css +438 -0
- package/dist/react/controls.d.ts +20 -0
- package/dist/react/controls.js +19 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +5 -0
- package/dist/react/layout.d.ts +56 -0
- package/dist/react/layout.js +48 -0
- package/dist/react/tone.d.ts +13 -0
- package/dist/react/tone.js +21 -0
- package/dist/react/type.d.ts +27 -0
- package/dist/react/type.js +28 -0
- package/dist/react/util.d.ts +10 -0
- package/dist/react/util.js +4 -0
- package/package.json +62 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { titleText } from "./tone.js";
|
|
3
|
+
import { cx } from "./util.js";
|
|
4
|
+
/** 첫 화면 제목. 한 페이지에 한 번만 쓴다. */
|
|
5
|
+
export function Display({ as, line, label, className, children, ...rest }) {
|
|
6
|
+
const Tag = as ?? "h1";
|
|
7
|
+
return (_jsx(Tag, { className: cx("n-display", className), ...rest, children: children ?? (line ? titleText(line, label) : null) }));
|
|
8
|
+
}
|
|
9
|
+
/** 구간 제목. 한 문장 한 줄로 쓰고 진한 글자는 핵심 낱말 한두 개에만 준다. */
|
|
10
|
+
export function Title({ as, line, label, className, children, ...rest }) {
|
|
11
|
+
const Tag = as ?? "h2";
|
|
12
|
+
return (_jsx(Tag, { className: cx("n-title", className), ...rest, children: children ?? (line ? titleText(line, label) : null) }));
|
|
13
|
+
}
|
|
14
|
+
/** 본문. */
|
|
15
|
+
export function Body({ as, className, ...rest }) {
|
|
16
|
+
const Tag = as ?? "p";
|
|
17
|
+
return _jsx(Tag, { className: cx("n-body", className), ...rest });
|
|
18
|
+
}
|
|
19
|
+
/** 목록이나 카드 안의 작은 제목. 본문과 같은 크기이고 진한 글자다. */
|
|
20
|
+
export function CardTitle({ as, className, ...rest }) {
|
|
21
|
+
const Tag = as ?? "h3";
|
|
22
|
+
return _jsx(Tag, { className: cx("n-card-title", className), ...rest });
|
|
23
|
+
}
|
|
24
|
+
/** 작은 글: 캡션, 기준, 라벨. num 을 주면 숫자 폭을 맞춘다. */
|
|
25
|
+
export function Small({ as, num, className, ...rest }) {
|
|
26
|
+
const Tag = as ?? "p";
|
|
27
|
+
return _jsx(Tag, { className: cx("n-small", num && "n-num", className), ...rest });
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ElementType } from "react";
|
|
2
|
+
/** 클래스 이름을 이어 붙인다. 거짓 값은 뺀다. */
|
|
3
|
+
export declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
4
|
+
/**
|
|
5
|
+
* as 로 태그나 컴포넌트를 바꿀 수 있는 조각의 속성.
|
|
6
|
+
* 예: <Pill as={Link} href="/contact"> 처럼 프레임워크의 링크 컴포넌트를 넘긴다.
|
|
7
|
+
*/
|
|
8
|
+
export type PolyProps<T extends ElementType, Own = object> = Own & {
|
|
9
|
+
as?: T;
|
|
10
|
+
} & Omit<ComponentPropsWithoutRef<T>, keyof Own | "as">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kwon-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "권앤컴퍼니의 세 제품(홈페이지, 스킬캠퍼스, Projects)이 같이 쓰는 디자인 시스템: 토큰, 글자, 뼈대, 컴포넌트, 검사기",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/kihyeonkwon/kwon-ui.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/kihyeonkwon/kwon-ui#readme",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"**/*.css"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/react/index.d.ts",
|
|
18
|
+
"default": "./dist/react/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./kwon-ui.css": "./dist/kwon-ui.css",
|
|
21
|
+
"./classes.json": "./dist/classes.json",
|
|
22
|
+
"./check": "./check/index.mjs",
|
|
23
|
+
"./CATALOG.md": "./CATALOG.md",
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"kwon-ui": "./bin/kwon-ui.mjs"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"!dist/catalog",
|
|
32
|
+
"check",
|
|
33
|
+
"bin",
|
|
34
|
+
"claude",
|
|
35
|
+
"CATALOG.md",
|
|
36
|
+
"CHANGELOG.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "node scripts/build.mjs",
|
|
40
|
+
"test": "node --test test/*.test.mjs",
|
|
41
|
+
"verify": "npm run build && npm test",
|
|
42
|
+
"prepublishOnly": "npm run verify"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": ">=18"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"postcss": "^8.4.47"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/react": "^19",
|
|
55
|
+
"@types/react-dom": "^19",
|
|
56
|
+
"pretendard": "^1.3.9",
|
|
57
|
+
"react": "^19",
|
|
58
|
+
"react-dom": "^19",
|
|
59
|
+
"typescript": "^5"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=20"
|
|
63
|
+
}
|
|
64
|
+
}
|