@reitwagen/design-components 0.0.1 → 0.0.2
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/dist/index.css +27 -0
- package/dist/stories/Typography/Typography.d.ts +2 -0
- package/dist/stories/Typography/Typography.d.ts.map +1 -0
- package/dist/stories/Typography/Typography.js +44 -0
- package/dist/stories/Typography/Typography.stories.d.ts +19 -0
- package/dist/stories/Typography/Typography.stories.d.ts.map +1 -0
- package/dist/stories/Typography/Typography.stories.js +38 -0
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -267,12 +267,21 @@
|
|
|
267
267
|
.pointer-events-none {
|
|
268
268
|
pointer-events: none;
|
|
269
269
|
}
|
|
270
|
+
.my-3 {
|
|
271
|
+
margin-block: calc(var(--spacing) * 3);
|
|
272
|
+
}
|
|
270
273
|
.flex {
|
|
271
274
|
display: flex;
|
|
272
275
|
}
|
|
276
|
+
.grid {
|
|
277
|
+
display: grid;
|
|
278
|
+
}
|
|
273
279
|
.table {
|
|
274
280
|
display: table;
|
|
275
281
|
}
|
|
282
|
+
.h-px {
|
|
283
|
+
height: 1px;
|
|
284
|
+
}
|
|
276
285
|
.min-h-\[34px\] {
|
|
277
286
|
min-height: 34px;
|
|
278
287
|
}
|
|
@@ -282,6 +291,9 @@
|
|
|
282
291
|
.min-h-\[52px\] {
|
|
283
292
|
min-height: 52px;
|
|
284
293
|
}
|
|
294
|
+
.w-full {
|
|
295
|
+
width: 100%;
|
|
296
|
+
}
|
|
285
297
|
.min-w-\[200px\] {
|
|
286
298
|
min-width: 200px;
|
|
287
299
|
}
|
|
@@ -297,6 +309,9 @@
|
|
|
297
309
|
.cursor-pointer {
|
|
298
310
|
cursor: pointer;
|
|
299
311
|
}
|
|
312
|
+
.grid-cols-6 {
|
|
313
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
314
|
+
}
|
|
300
315
|
.flex-col {
|
|
301
316
|
flex-direction: column;
|
|
302
317
|
}
|
|
@@ -312,6 +327,9 @@
|
|
|
312
327
|
.gap-1\.5 {
|
|
313
328
|
gap: calc(var(--spacing) * 1.5);
|
|
314
329
|
}
|
|
330
|
+
.gap-4 {
|
|
331
|
+
gap: calc(var(--spacing) * 4);
|
|
332
|
+
}
|
|
315
333
|
.gap-5 {
|
|
316
334
|
gap: calc(var(--spacing) * 5);
|
|
317
335
|
}
|
|
@@ -367,6 +385,9 @@
|
|
|
367
385
|
.px-\[24px\] {
|
|
368
386
|
padding-inline: 24px;
|
|
369
387
|
}
|
|
388
|
+
.py-1 {
|
|
389
|
+
padding-block: calc(var(--spacing) * 1);
|
|
390
|
+
}
|
|
370
391
|
.py-\[8px\] {
|
|
371
392
|
padding-block: 8px;
|
|
372
393
|
}
|
|
@@ -502,6 +523,9 @@
|
|
|
502
523
|
letter-spacing: var(--tw-tracking, var(--text-subtitle2--letter-spacing));
|
|
503
524
|
font-weight: var(--tw-font-weight, var(--text-subtitle2--font-weight));
|
|
504
525
|
}
|
|
526
|
+
.text-\[15px\] {
|
|
527
|
+
font-size: 15px;
|
|
528
|
+
}
|
|
505
529
|
.text-blue-300 {
|
|
506
530
|
color: var(--color-blue-300);
|
|
507
531
|
}
|
|
@@ -511,6 +535,9 @@
|
|
|
511
535
|
.text-gray-300 {
|
|
512
536
|
color: var(--color-gray-300);
|
|
513
537
|
}
|
|
538
|
+
.text-gray-500 {
|
|
539
|
+
color: var(--color-gray-500);
|
|
540
|
+
}
|
|
514
541
|
.text-gray-600 {
|
|
515
542
|
color: var(--color-gray-600);
|
|
516
543
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/stories/Typography/Typography.tsx"],"names":[],"mappings":"AAqDA,wBAAgB,UAAU,4CAwBzB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Typography = Typography;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const style_1 = require("../../utils/style");
|
|
6
|
+
const headings = {
|
|
7
|
+
"text-heading1": ["Heading1", 24, 1.4, "-2%", 600, "text-heading1"],
|
|
8
|
+
"text-heading2": ["Heading2", 22, 1.4, "-2%", 700, "text-heading2"],
|
|
9
|
+
"text-heading3": ["Heading3", 20, 1.4, "-2%", 700, "text-heading3"],
|
|
10
|
+
"text-heading4": ["Heading4", 18, 1.4, "-2%", 700, "text-heading4"],
|
|
11
|
+
"text-heading5": ["Heading5", 16, 1.4, "-2%", 700, "text-heading5"],
|
|
12
|
+
};
|
|
13
|
+
const subTitles = {
|
|
14
|
+
"text-subtitle1": ["Subtitle1", 16, 1.48, "-2%", 600, "text-subtitle1"],
|
|
15
|
+
"text-subtitle2": ["Subtitle2", 14, 1.48, "-2%", 600, "text-subtitle2"],
|
|
16
|
+
};
|
|
17
|
+
const bodys = {
|
|
18
|
+
"text-body1": ["Body1", 18, 1.48, "-4%", 500, "text-body1"],
|
|
19
|
+
"text-body2": ["Body2", 18, 1.48, "-4%", 400, "text-body2"],
|
|
20
|
+
"text-body3": ["Body3", 16, 1.48, "-4%", 500, "text-body3"],
|
|
21
|
+
"text-body4": ["Body4", 16, 1.48, "-4%", 400, "text-body4"],
|
|
22
|
+
"text-body5": ["Body5", 14, 1.48, "-4%", 500, "text-body5"],
|
|
23
|
+
"text-body6": ["Body6", 14, 1.48, "-4%", 400, "text-body6"],
|
|
24
|
+
"text-body7": ["Body7", 12, 1.48, "-4%", 500, "text-body7"],
|
|
25
|
+
"text-body8": ["Body8", 12, 1.48, "-4%", 400, "text-body8"],
|
|
26
|
+
};
|
|
27
|
+
const buttons = {
|
|
28
|
+
"text-button1": ["Button1", 16, 1.4, "-2%", 600, "text-button1"],
|
|
29
|
+
"text-button2": ["Button2", 14, 1.48, "-2%", 600, "text-button2"],
|
|
30
|
+
};
|
|
31
|
+
const captions = {
|
|
32
|
+
"text-caption1": ["Caption1", 12, 1.45, "-2%", 400, "text-caption1"],
|
|
33
|
+
"text-caption2": ["Caption2", 10, 1.45, "-2%", 400, "text-caption2"],
|
|
34
|
+
"text-caption3": ["Caption3", 10, 1.45, "-2%", 500, "text-caption3"],
|
|
35
|
+
};
|
|
36
|
+
function Rows({ data }) {
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: Object.entries(data).map(([className, values]) => ((0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-6", children: values.map((value) => ((0, jsx_runtime_1.jsx)("span", { className: (0, style_1.cn)(className, "py-1"), children: value }, value))) }, className))) }));
|
|
38
|
+
}
|
|
39
|
+
function Divider() {
|
|
40
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "h-px w-full bg-gray-100 my-3" });
|
|
41
|
+
}
|
|
42
|
+
function Typography() {
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: "flex flex-col gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-6 text-gray-500 text-[15px]", children: [(0, jsx_runtime_1.jsx)("span", { children: "Token" }), (0, jsx_runtime_1.jsx)("span", { children: "Font Size" }), (0, jsx_runtime_1.jsx)("span", { children: "Line Height" }), (0, jsx_runtime_1.jsx)("span", { children: "Letter Spacing" }), (0, jsx_runtime_1.jsx)("span", { children: "Font Weight" }), (0, jsx_runtime_1.jsx)("span", { children: "ClassName" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)(Rows, { data: headings }), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsx)(Rows, { data: subTitles }), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsx)(Rows, { data: bodys }), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsx)(Rows, { data: buttons }), (0, jsx_runtime_1.jsx)(Divider, {}), (0, jsx_runtime_1.jsx)(Rows, { data: captions })] })] }));
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import { Typography } from "./Typography";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Typography;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
argTypes: {};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Pretendard: Story;
|
|
19
|
+
//# sourceMappingURL=Typography.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/Typography/Typography.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,QAAA,MAAM,IAAI;;;;;;;;;;;;CA4ByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pretendard = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Typography_1 = require("./Typography");
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Foundation/Typography",
|
|
8
|
+
component: Typography_1.Typography,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: `
|
|
14
|
+
라이트바겐은 가독성이 높은 폰트를 사용해 유저들의 접근성을 강화하여 콘텐츠를 쉽게 이해할 수 있도록 합니다.
|
|
15
|
+
|
|
16
|
+
Reitwagen uses highly readable fonts to enhance users' accessibility, making it easier to understand content.
|
|
17
|
+
|
|
18
|
+
## <b>Font</b>
|
|
19
|
+
|
|
20
|
+
라이트바겐은 기본 글꼴로 한국어, 영어를 모두 지원하는 Pretendard를 사용합니다.
|
|
21
|
+
|
|
22
|
+
Reitwagen uses Pretendard as the primary typeface, supporting both Korean and English.
|
|
23
|
+
|
|
24
|
+
## <b>Style<b>
|
|
25
|
+
|
|
26
|
+
라이트바겐 타이포그래피는 5단계 위계에서 총 21개 하위 위계를 가지고 있습니다.
|
|
27
|
+
|
|
28
|
+
Reitwagen typography has a total of 20 subhierarchies in five tiers.
|
|
29
|
+
`,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
argTypes: {},
|
|
34
|
+
};
|
|
35
|
+
exports.default = meta;
|
|
36
|
+
exports.Pretendard = {
|
|
37
|
+
render: (props) => (0, jsx_runtime_1.jsx)(Typography_1.Typography, {}),
|
|
38
|
+
};
|