moru-krds-react 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/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/accordion/index.d.ts +63 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +145 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/alert/index.d.ts +44 -0
- package/dist/alert/index.d.ts.map +1 -0
- package/dist/alert/index.js +66 -0
- package/dist/alert/index.js.map +1 -0
- package/dist/avatar/index.d.ts +102 -0
- package/dist/avatar/index.d.ts.map +1 -0
- package/dist/avatar/index.js +146 -0
- package/dist/avatar/index.js.map +1 -0
- package/dist/badge/index.d.ts +49 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/index.js +41 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/breadcrumb/index.d.ts +43 -0
- package/dist/breadcrumb/index.d.ts.map +1 -0
- package/dist/breadcrumb/index.js +43 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/button/index.d.ts +78 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/index.js +83 -0
- package/dist/button/index.js.map +1 -0
- package/dist/checkbox/index.d.ts +97 -0
- package/dist/checkbox/index.d.ts.map +1 -0
- package/dist/checkbox/index.js +110 -0
- package/dist/checkbox/index.js.map +1 -0
- package/dist/combobox/index.d.ts +135 -0
- package/dist/combobox/index.d.ts.map +1 -0
- package/dist/combobox/index.js +416 -0
- package/dist/combobox/index.js.map +1 -0
- package/dist/context-menu/index.d.ts +94 -0
- package/dist/context-menu/index.d.ts.map +1 -0
- package/dist/context-menu/index.js +399 -0
- package/dist/context-menu/index.js.map +1 -0
- package/dist/critical-alert/index.d.ts +39 -0
- package/dist/critical-alert/index.d.ts.map +1 -0
- package/dist/critical-alert/index.js +50 -0
- package/dist/critical-alert/index.js.map +1 -0
- package/dist/data-table/index.d.ts +94 -0
- package/dist/data-table/index.d.ts.map +1 -0
- package/dist/data-table/index.js +128 -0
- package/dist/data-table/index.js.map +1 -0
- package/dist/disclosure/index.d.ts +35 -0
- package/dist/disclosure/index.d.ts.map +1 -0
- package/dist/disclosure/index.js +54 -0
- package/dist/disclosure/index.js.map +1 -0
- package/dist/drawer/index.d.ts +106 -0
- package/dist/drawer/index.d.ts.map +1 -0
- package/dist/drawer/index.js +352 -0
- package/dist/drawer/index.js.map +1 -0
- package/dist/empty-state/index.d.ts +86 -0
- package/dist/empty-state/index.d.ts.map +1 -0
- package/dist/empty-state/index.js +138 -0
- package/dist/empty-state/index.js.map +1 -0
- package/dist/env.d.js +1 -0
- package/dist/env.d.js.map +1 -0
- package/dist/field/index.d.ts +149 -0
- package/dist/field/index.d.ts.map +1 -0
- package/dist/field/index.js +121 -0
- package/dist/field/index.js.map +1 -0
- package/dist/file-upload/index.d.ts +140 -0
- package/dist/file-upload/index.d.ts.map +1 -0
- package/dist/file-upload/index.js +249 -0
- package/dist/file-upload/index.js.map +1 -0
- package/dist/footer/index.d.ts +155 -0
- package/dist/footer/index.d.ts.map +1 -0
- package/dist/footer/index.js +186 -0
- package/dist/footer/index.js.map +1 -0
- package/dist/header/index.d.ts +170 -0
- package/dist/header/index.d.ts.map +1 -0
- package/dist/header/index.js +258 -0
- package/dist/header/index.js.map +1 -0
- package/dist/identifier/index.d.ts +38 -0
- package/dist/identifier/index.d.ts.map +1 -0
- package/dist/identifier/index.js +55 -0
- package/dist/identifier/index.js.map +1 -0
- package/dist/in-page-navigation/index.d.ts +71 -0
- package/dist/in-page-navigation/index.d.ts.map +1 -0
- package/dist/in-page-navigation/index.js +137 -0
- package/dist/in-page-navigation/index.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/input-group/index.d.ts +66 -0
- package/dist/input-group/index.d.ts.map +1 -0
- package/dist/input-group/index.js +85 -0
- package/dist/input-group/index.js.map +1 -0
- package/dist/lib/krds.d.ts +45 -0
- package/dist/lib/krds.d.ts.map +1 -0
- package/dist/lib/krds.js +11 -0
- package/dist/lib/krds.js.map +1 -0
- package/dist/lib/link.d.ts +34 -0
- package/dist/lib/link.d.ts.map +1 -0
- package/dist/lib/link.js +8 -0
- package/dist/lib/link.js.map +1 -0
- package/dist/main-menu/index.d.ts +123 -0
- package/dist/main-menu/index.d.ts.map +1 -0
- package/dist/main-menu/index.js +613 -0
- package/dist/main-menu/index.js.map +1 -0
- package/dist/masthead/index.d.ts +25 -0
- package/dist/masthead/index.d.ts.map +1 -0
- package/dist/masthead/index.js +21 -0
- package/dist/masthead/index.js.map +1 -0
- package/dist/modal/index.d.ts +105 -0
- package/dist/modal/index.d.ts.map +1 -0
- package/dist/modal/index.js +285 -0
- package/dist/modal/index.js.map +1 -0
- package/dist/pagination/index.d.ts +58 -0
- package/dist/pagination/index.d.ts.map +1 -0
- package/dist/pagination/index.js +82 -0
- package/dist/pagination/index.js.map +1 -0
- package/dist/progress/index.d.ts +58 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/progress/index.js +125 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/radio/index.d.ts +111 -0
- package/dist/radio/index.d.ts.map +1 -0
- package/dist/radio/index.js +136 -0
- package/dist/radio/index.js.map +1 -0
- package/dist/resize/index.d.ts +118 -0
- package/dist/resize/index.d.ts.map +1 -0
- package/dist/resize/index.js +342 -0
- package/dist/resize/index.js.map +1 -0
- package/dist/scroll-area/index.d.ts +40 -0
- package/dist/scroll-area/index.d.ts.map +1 -0
- package/dist/scroll-area/index.js +52 -0
- package/dist/scroll-area/index.js.map +1 -0
- package/dist/select/index.d.ts +67 -0
- package/dist/select/index.d.ts.map +1 -0
- package/dist/select/index.js +61 -0
- package/dist/select/index.js.map +1 -0
- package/dist/separator/index.d.ts +47 -0
- package/dist/separator/index.d.ts.map +1 -0
- package/dist/separator/index.js +61 -0
- package/dist/separator/index.js.map +1 -0
- package/dist/side-navigation/index.d.ts +78 -0
- package/dist/side-navigation/index.d.ts.map +1 -0
- package/dist/side-navigation/index.js +188 -0
- package/dist/side-navigation/index.js.map +1 -0
- package/dist/skeleton/index.d.ts +76 -0
- package/dist/skeleton/index.d.ts.map +1 -0
- package/dist/skeleton/index.js +78 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skip-link/index.d.ts +46 -0
- package/dist/skip-link/index.d.ts.map +1 -0
- package/dist/skip-link/index.js +37 -0
- package/dist/skip-link/index.js.map +1 -0
- package/dist/spinner/index.d.ts +58 -0
- package/dist/spinner/index.d.ts.map +1 -0
- package/dist/spinner/index.js +36 -0
- package/dist/spinner/index.js.map +1 -0
- package/dist/step-indicator/index.d.ts +41 -0
- package/dist/step-indicator/index.d.ts.map +1 -0
- package/dist/step-indicator/index.js +63 -0
- package/dist/step-indicator/index.js.map +1 -0
- package/dist/structured-list/index.d.ts +150 -0
- package/dist/structured-list/index.d.ts.map +1 -0
- package/dist/structured-list/index.js +194 -0
- package/dist/structured-list/index.js.map +1 -0
- package/dist/tab/index.d.ts +108 -0
- package/dist/tab/index.d.ts.map +1 -0
- package/dist/tab/index.js +198 -0
- package/dist/tab/index.js.map +1 -0
- package/dist/table/index.d.ts +75 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/index.js +91 -0
- package/dist/table/index.js.map +1 -0
- package/dist/tag/index.d.ts +71 -0
- package/dist/tag/index.d.ts.map +1 -0
- package/dist/tag/index.js +45 -0
- package/dist/tag/index.js.map +1 -0
- package/dist/text-input/index.d.ts +69 -0
- package/dist/text-input/index.d.ts.map +1 -0
- package/dist/text-input/index.js +70 -0
- package/dist/text-input/index.js.map +1 -0
- package/dist/text-list/index.d.ts +71 -0
- package/dist/text-list/index.d.ts.map +1 -0
- package/dist/text-list/index.js +79 -0
- package/dist/text-list/index.js.map +1 -0
- package/dist/textarea/index.d.ts +29 -0
- package/dist/textarea/index.d.ts.map +1 -0
- package/dist/textarea/index.js +69 -0
- package/dist/textarea/index.js.map +1 -0
- package/dist/toast/index.d.ts +76 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.js +183 -0
- package/dist/toast/index.js.map +1 -0
- package/dist/tooltip/index.d.ts +84 -0
- package/dist/tooltip/index.d.ts.map +1 -0
- package/dist/tooltip/index.js +329 -0
- package/dist/tooltip/index.js.map +1 -0
- package/package.json +57 -0
- package/src/accordion/index.tsx +251 -0
- package/src/alert/index.tsx +111 -0
- package/src/avatar/index.tsx +272 -0
- package/src/badge/index.tsx +91 -0
- package/src/breadcrumb/index.tsx +125 -0
- package/src/button/index.tsx +190 -0
- package/src/checkbox/index.tsx +247 -0
- package/src/combobox/index.tsx +700 -0
- package/src/context-menu/index.tsx +623 -0
- package/src/critical-alert/index.tsx +102 -0
- package/src/data-table/index.tsx +289 -0
- package/src/disclosure/index.tsx +87 -0
- package/src/drawer/index.tsx +516 -0
- package/src/empty-state/index.tsx +256 -0
- package/src/env.d.ts +10 -0
- package/src/field/index.tsx +307 -0
- package/src/file-upload/index.tsx +492 -0
- package/src/footer/index.tsx +393 -0
- package/src/header/index.tsx +498 -0
- package/src/identifier/index.tsx +96 -0
- package/src/in-page-navigation/index.tsx +258 -0
- package/src/index.ts +72 -0
- package/src/input-group/index.tsx +197 -0
- package/src/lib/krds.ts +75 -0
- package/src/lib/link.tsx +35 -0
- package/src/main-menu/index.tsx +912 -0
- package/src/masthead/index.tsx +50 -0
- package/src/modal/index.tsx +457 -0
- package/src/pagination/index.tsx +198 -0
- package/src/progress/index.tsx +198 -0
- package/src/radio/index.tsx +283 -0
- package/src/resize/index.tsx +541 -0
- package/src/scroll-area/index.tsx +96 -0
- package/src/select/index.tsx +136 -0
- package/src/separator/index.tsx +107 -0
- package/src/side-navigation/index.tsx +336 -0
- package/src/skeleton/index.tsx +172 -0
- package/src/skip-link/index.tsx +89 -0
- package/src/spinner/index.tsx +98 -0
- package/src/step-indicator/index.tsx +122 -0
- package/src/structured-list/index.tsx +395 -0
- package/src/tab/index.tsx +348 -0
- package/src/table/index.tsx +186 -0
- package/src/tag/index.tsx +127 -0
- package/src/text-input/index.tsx +156 -0
- package/src/text-list/index.tsx +177 -0
- package/src/textarea/index.tsx +113 -0
- package/src/toast/index.tsx +311 -0
- package/src/tooltip/index.tsx +496 -0
- package/styles/krds-tailwind.css +335 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type KrdsSize } from '../lib/krds';
|
|
3
|
+
/**
|
|
4
|
+
* ๊ตฌ์กฐํ ๋ชฉ๋ก โ KRDS `krds-structured-list`.
|
|
5
|
+
*
|
|
6
|
+
* ใ์ ์ฌํ๊ฑฐ๋ ๊ด๋ จ๋ ์ฝํ
์ธ ์งํฉใ์ ์นด๋๋ก ๋์ด๋๋๋ค. ๋๋ถ๋ถ์ {@link StructuredCard} ํ ์ค๋ก ๋๋๊ณ ,
|
|
7
|
+
* ์์๋ฅผ ๋ฐ๊พธ๊ฑฐ๋ ํท์ ์๋ ๊ฒ์ ๋ผ์ธ ๋๋ง ์กฐ๊ฐ(`StructuredItem*`)์ ์ง์ ์กฐ๋ฆฝํ๋ค.
|
|
8
|
+
* ํยท์ด์ด ์๋ ์๋ฃ๋ ์นด๋๊ฐ ์๋๋ผ `ui/table` ยท `ui/data-table` ์ด๋ค.
|
|
9
|
+
* `meta`(๋ถ๊ฐ ์ ๋ณด ์ค)๋ **์ ํญ ๋ฐฐ์น ์ ์ฉ**์ด๋ค โ `layout="grid"` ์์๋ ๊ตฌ๋ถ์ ์ด ๊ฑธ๋ฆฌ์ง ์๋๋ค.
|
|
10
|
+
* ์นด๋ ์ ๋ฒํผ์๋ `title` ๋ก ์ด๋ ํญ๋ชฉ์ ๊ฒ์ธ์ง ์๋ฆฐ๋ค(ใ์ ์ฒญํ๊ธฐใ๊ฐ 20๊ฐ์ธ ๋ชฉ๋ก์ ์๊ฐํ๋ผ).
|
|
11
|
+
* ๋ชฉ๋ก์ด ๋น๋ฉด `StructuredList` ๋์ {@link StructuredListEmpty} ๋ฅผ ๊ทธ๋ฆฐ๋ค.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <StructuredListToolbar info={`์ ์ฒด ${total}๊ฑด`}>
|
|
15
|
+
* <SortSelect aria-label="์ ๋ ฌ๊ธฐ์ค" options={sorts} />
|
|
16
|
+
* </StructuredListToolbar>
|
|
17
|
+
* <StructuredList layout="full">
|
|
18
|
+
* {rows.map((r) => (
|
|
19
|
+
* <StructuredCard
|
|
20
|
+
* key={r.id}
|
|
21
|
+
* href={`/board/notice/${r.id}`}
|
|
22
|
+
* title={r.title}
|
|
23
|
+
* summary={r.summary}
|
|
24
|
+
* dateLabel="๋ฑ๋ก์ผ"
|
|
25
|
+
* dateValue={r.createdAt}
|
|
26
|
+
* badge={<Badge tone="primary">๊ณต์ง</Badge>}
|
|
27
|
+
* tags={r.tags}
|
|
28
|
+
* />
|
|
29
|
+
* ))}
|
|
30
|
+
* </StructuredList>
|
|
31
|
+
*
|
|
32
|
+
* ์์ธํ: docs/krds/09-๋ถํ-๋
ธํธ.md#๊ตฌ์กฐํ๋ชฉ๋ก
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* ๋ฐฐ์น. `grid` 3์ด ๊ฒฉ์(๊ธฐ๋ณธ) ยท `full` ํ ์ค์ ํ ํญ๋ชฉ(์ ๋ชฉ์ด ์ปค์ง๋ค) ยท `compact` ์ ํญ์ด๋ ์ ๋ชฉ์ ๊ทธ๋๋ก.
|
|
36
|
+
*/
|
|
37
|
+
export type StructuredListLayout = 'grid' | 'full' | 'compact';
|
|
38
|
+
/**
|
|
39
|
+
* ํฌ๊ธฐ. ๋ฐ๊พธ๋ ๊ฒ์ **ํญ๋ชฉ ์์ชฝ ์ฌ๋ฐฑ**๊ณผ ์ฐ์๋จ ์ก์
๋ฒํผ ์์น๋ค.
|
|
40
|
+
* `layout="full"` ๊ณผ ํจ๊ป ์ฃผ๋ฉด ์ ๋ชฉ ํฌ๊ธฐ๋ ๋ฐฐ์น ์ชฝ์ด ์ด๊ฒจ ์ฌ๋ฐฑ๋ง ์ค์ด๋ ๋ค.
|
|
41
|
+
*/
|
|
42
|
+
export type StructuredListSize = Extract<KrdsSize, 'small' | 'medium' | 'large'>;
|
|
43
|
+
export type StructuredListProps = ComponentPropsWithRef<'ul'> & {
|
|
44
|
+
/** ๋ฐฐ์น. ๊ธฐ๋ณธ `grid`. */
|
|
45
|
+
layout?: StructuredListLayout;
|
|
46
|
+
/** ํฌ๊ธฐ. ๊ธฐ๋ณธ `medium`. */
|
|
47
|
+
size?: StructuredListSize;
|
|
48
|
+
/** ํญ๋ชฉ๋ง๋ค ์ ํ ์ฒดํฌ๋ฐ์ค๊ฐ ์์ ๋ ์ผ ๋ค โ ์ผ์ง ์์ผ๋ฉด ์ฒดํฌ๋ฐ์ค์ ์ฐ์๋จ ๋ฒํผ์ด ๊ฒน์น๋ค. */
|
|
49
|
+
selectable?: boolean;
|
|
50
|
+
};
|
|
51
|
+
/** ๋ชฉ๋ก ๊ป๋ฐ๊ธฐ โ ํท `krds-structured-list`. ๋ชฉ๋ก ์ด๋ฆ์ด ํ์ํ๋ฉด `aria-label` ์ ๋๊ธด๋ค. */
|
|
52
|
+
export declare function StructuredList({ layout, size, selectable, className, children, ...rest }: StructuredListProps): import("react").JSX.Element;
|
|
53
|
+
export type StructuredItemProps = ComponentPropsWithRef<'li'> & {
|
|
54
|
+
/** ์ ํ๋จ. ์ฒดํฌ๋ฐ์ค์ `checked` ์ **๋ฐ๋ก** ์ค๋ค โ ํท CSS ๊ฐ `<li>` ํด๋์ค๋ง ๋ณธ๋ค. */
|
|
55
|
+
selected?: boolean;
|
|
56
|
+
/** ํญ๋ชฉ ์ ํ ์ฒดํฌ๋ฐ์ค. `<Checkbox>` ํ๋๋ฅผ ๊ทธ๋๋ก ๋๊ธด๋ค โ `<CheckArea>` ๋ก ๊ฐ์ธ์ง ๋ง๋ผ. */
|
|
57
|
+
check?: ReactNode;
|
|
58
|
+
};
|
|
59
|
+
/** ํญ๋ชฉ ํ๋ โ ํท `structured-item`. ์์ชฝ `<div class="in">` ์ ๋ถํ์ด ์ค์ค๋ก ๊ทธ๋ฆฐ๋ค. */
|
|
60
|
+
export declare function StructuredItem({ selected, check, className, children, ...rest }: StructuredItemProps): import("react").JSX.Element;
|
|
61
|
+
/** ํญ๋ชฉ ๋จธ๋ฆฌ โ ํท `card-top`. ์ํ ๋ฐฐ์ง ์๋ฆฌ๋ค. */
|
|
62
|
+
export declare function StructuredItemTop({ className, children, ...rest }: ComponentPropsWithRef<'div'>): import("react").JSX.Element;
|
|
63
|
+
/** ํญ๋ชฉ ๋ณธ๋ฌธ โ ํท `card-body`. ํ์ ๋งํฌ์ CTA ๊ฐ ๋ค์ด๊ฐ๋ค(์ ํญ ๋ฐฐ์น์์๋ ์ข์ฐ๋ก ๋ฒ์ด์ง๋ค). */
|
|
64
|
+
export declare function StructuredItemBody({ className, children, ...rest }: ComponentPropsWithRef<'div'>): import("react").JSX.Element;
|
|
65
|
+
/** ์์ธ๋ก ๊ฐ๋ ํ์ ๋งํฌ โ ํท `c-text`. ์ ๋ชฉยท์์ฝยท๊ธฐ๊ฐ์ ํต์งธ๋ก ๊ฐ์ผ๋ค. */
|
|
66
|
+
export type StructuredItemLinkProps = ComponentPropsWithRef<'a'>;
|
|
67
|
+
export declare function StructuredItemLink({ className, children, target, title, ...rest }: StructuredItemLinkProps): import("react").JSX.Element;
|
|
68
|
+
/**
|
|
69
|
+
* ์ ๋ชฉ โ ํท `c-tit`. **ํ ์ค๋ก ์๋ฆฐ๋ค.** ์์ชฝ `<span>` ๊ฐ์ธ๊ฐ๋ ๋ถํ์ด ๊ทธ๋ฆฐ๋ค.
|
|
70
|
+
* ์ค๋ฅธ์ชฝ ํ์ดํ๋ ํท์ด ๊ทธ๋ฆฌ๋ฏ๋ก ์์ด์ฝ์ ์ง์ ๋ฃ์ง ๋ง๋ผ.
|
|
71
|
+
*/
|
|
72
|
+
export declare function StructuredItemTitle({ className, children, ...rest }: ComponentPropsWithRef<'p'>): import("react").JSX.Element;
|
|
73
|
+
/** ์์ฝ โ ํท `c-txt`. ๊ฒฉ์์์ 3์ค, ์ ํญ์์ 1์ค๋ก ์๋ฆฐ๋ค. */
|
|
74
|
+
export declare function StructuredItemSummary({ className, children, ...rest }: ComponentPropsWithRef<'p'>): import("react").JSX.Element;
|
|
75
|
+
export type StructuredItemDateProps = ComponentPropsWithRef<'p'> & {
|
|
76
|
+
/** ํญ๋ชฉ ์ด๋ฆ. ๊ตต๊ฒ ๊ทธ๋ ค์ง๋ค. ์: ใ์ ์ฒญ ๊ธฐ๊ฐใ */
|
|
77
|
+
label: ReactNode;
|
|
78
|
+
};
|
|
79
|
+
/** ๊ธฐ๊ฐยท๋ ์ง ํ ์ค โ ํท `c-date`. ๊ฐ์ด ๋น๋ฉด ๊ท๊ฒฉ๋๋ก ๋์(`-`)๋ฅผ ๋ฃ๋๋ค. */
|
|
80
|
+
export declare function StructuredItemDate({ label, className, children, ...rest }: StructuredItemDateProps): import("react").JSX.Element;
|
|
81
|
+
export type StructuredItemMetaProps = Omit<ComponentPropsWithRef<'ul'>, 'children'> & {
|
|
82
|
+
/** ํญ๋ชฉ๋ค. ์ฌ์ด์ฌ์ด์ ์ธ๋ก ๊ตฌ๋ถ์ ์ด ๊ทธ๋ ค์ง๋ค. ๋น ๊ฐ์๋ `-` ๋ฅผ ๋ฃ์ด ์๋ฆฌ๋ฅผ ์งํจ๋ค. */
|
|
83
|
+
items: ReactNode[];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* ๋ถ๊ฐ ์ ๋ณด ์ค โ ํท `c-txt-ul`. ใ๋ถ์ ยท ๋ฑ๋ก์ผ ยท ์กฐํ์ใ์ฒ๋ผ ์งง์ ๊ฐ์ ์ธ๋ก์ ์ผ๋ก ์๋๋ค.
|
|
87
|
+
* **์ ํญยทcompact ๋ฐฐ์น์ `card-body` ์์์๋ง** ํท ๊ท์น์ด ๊ฑธ๋ฆฐ๋ค.
|
|
88
|
+
*/
|
|
89
|
+
export declare function StructuredItemMeta({ items, className, ...rest }: StructuredItemMetaProps): import("react").JSX.Element;
|
|
90
|
+
/**
|
|
91
|
+
* CTA ์๋ฆฌ โ ํท `c-btn`. ํญ๋ชฉ๊ณผ ๊ด๋ จ๋ **๊ฐ์ฅ ์ค์ํ ํ๋ ํ๋**๋ง ๋ฃ๋๋ค(๊ฐ์ด๋ ๊ท์ ).
|
|
92
|
+
* ์ด๋ ํญ๋ชฉ์ ๋ฒํผ์ธ์ง ์๋๋ก `title` ์ ํญ๋ชฉ ์ ๋ชฉ์ ์ค๋ค.
|
|
93
|
+
*/
|
|
94
|
+
export declare function StructuredItemCta({ className, children, ...rest }: ComponentPropsWithRef<'div'>): import("react").JSX.Element;
|
|
95
|
+
/** ํ๊ทธ ์ค โ ํท `card-btm`. ์์ชฝ ๊ตฌ๋ถ์ ์ ํท์ด ๊ทธ๋ฆฐ๋ค. */
|
|
96
|
+
export declare function StructuredItemTags({ className, children, ...rest }: ComponentPropsWithRef<'div'>): import("react").JSX.Element;
|
|
97
|
+
/** ํ๊ทธ ํ๋ โ ํท `tag`. **๊ธ์ ์์ `#` ๋ ํท์ด ๋ถ์ธ๋ค** โ ์ง์ ์ฐ๋ฉด `##` ์ด ๋๋ค. */
|
|
98
|
+
export declare function StructuredItemTag({ className, children, ...rest }: ComponentPropsWithRef<'span'>): import("react").JSX.Element;
|
|
99
|
+
/**
|
|
100
|
+
* ์ก์
๋ฒํผ ๋ฌถ์ โ ํท `card-btn`. ํญ๋ชฉ ์ฐ์๋จ์ ๋์ด๋ ๋ณด์กฐ ๊ธฐ๋ฅ(๊ณต์ ยท์ฐํ๊ธฐ) ์๋ฆฌ๋ค.
|
|
101
|
+
* ์์๋ `krds-btn medium text` ๋ฅผ ์ด๋ค(ํท์ด ๋์ด๋ฅผ ๊ณ ์ ํ๋ค).
|
|
102
|
+
*/
|
|
103
|
+
export declare function StructuredItemActions({ className, children, ...rest }: ComponentPropsWithRef<'div'>): import("react").JSX.Element;
|
|
104
|
+
export type StructuredCardProps = Omit<StructuredItemProps, 'title'> & {
|
|
105
|
+
/** ์ ๋ชฉ. ํ ์ค๋ก ์๋ฆฐ๋ค. */
|
|
106
|
+
title: ReactNode;
|
|
107
|
+
/** ์์ธ ์ฃผ์. ์ ๋ชฉยท์์ฝยท๊ธฐ๊ฐ ์ ์ฒด๊ฐ ์ด ๋งํฌ๊ฐ ๋๋ค. */
|
|
108
|
+
href: string;
|
|
109
|
+
/** `_blank` ๋ฉด ใ์ ์ฐฝ ์ด๋ฆผใ์ `title` ๋ก ์๋ฆฐ๋ค. */
|
|
110
|
+
target?: string;
|
|
111
|
+
/** ์์ฝ. ๊ฒฉ์ 3์ค ยท ์ ํญ 1์ค๋ก ์๋ฆฐ๋ค. */
|
|
112
|
+
summary?: ReactNode;
|
|
113
|
+
/** ๊ธฐ๊ฐ ์ค์ ์ด๋ฆ. ์: ใ์ ์ฒญ ๊ธฐ๊ฐใ */
|
|
114
|
+
dateLabel?: ReactNode;
|
|
115
|
+
/** ๊ธฐ๊ฐ ์ค์ ๊ฐ. ๋น๋ฉด `-` ๊ฐ ๋ค์ด๊ฐ๋ค. */
|
|
116
|
+
dateValue?: ReactNode;
|
|
117
|
+
/** ๋ถ๊ฐ ์ ๋ณด(์ธ๋ก์ ๊ตฌ๋ถ). **์ ํญยทcompact ๋ชฉ๋ก์์๋ง** ํท ๊ท์น์ด ๊ฑธ๋ฆฐ๋ค. */
|
|
118
|
+
meta?: ReactNode[];
|
|
119
|
+
/** ์ํ ๋ฐฐ์ง. `<Badge>` ๋ฅผ ๋ฃ๋๋ค. */
|
|
120
|
+
badge?: ReactNode;
|
|
121
|
+
/** ํ๊ทธ. `#` ์ ํท์ด ๋ถ์ด๋ฏ๋ก ๊ธ์๋ง ๋ฃ๋๋ค. */
|
|
122
|
+
tags?: ReactNode[];
|
|
123
|
+
/** ๊ฐ์ฅ ์ค์ํ ํ๋ ํ๋. `title` ์ ํญ๋ชฉ ์ ๋ชฉ์ ์ฃผ๋ ๊ฒ์ ์์ง ๋ง๋ผ. */
|
|
124
|
+
cta?: ReactNode;
|
|
125
|
+
/** ์ฐ์๋จ ๋ณด์กฐ ๊ธฐ๋ฅ(๊ณต์ ยท์ฐํ๊ธฐ ๋ฑ). */
|
|
126
|
+
actions?: ReactNode;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* ์นด๋ ํ ์ฅ์ ํต์งธ๋ก โ ์กฐ๊ฐ๋ค์ ํท ์ํ ์์๋๋ก ์กฐ๋ฆฝํ๋ค.
|
|
130
|
+
* ์์๋ฅผ ๋ฐ๊พธ๊ฑฐ๋ ํท์ ์๋ ๊ฒ์ ๋ผ์์ผ ํ ๋๋ง ์กฐ๊ฐ์ ์ง์ ์ด๋ค.
|
|
131
|
+
*/
|
|
132
|
+
export declare function StructuredCard({ title, href, target, summary, dateLabel, dateValue, meta, badge, tags, cta, actions, children, ...rest }: StructuredCardProps): import("react").JSX.Element;
|
|
133
|
+
/**
|
|
134
|
+
* ์๋ฃ ์์ โ ํท์ ๋น ๋ชฉ๋ก ๊ท์น์ด ์์ด ๋ณด์ถฉํ๋ค(ํ์ `TableEmpty` ์ ๊ฐ์ ๋ชจ์).
|
|
135
|
+
* ๋ชฉ๋ก์ด ๋น๋ฉด `StructuredList` ๋ฅผ ๊ทธ๋ฆฌ์ง ๋ง๊ณ ์ด๊ฒ์ ๊ทธ๋ฆฐ๋ค.
|
|
136
|
+
* ๋์ ํ๋๊น์ง ๊ณ๋ค์ด๋ ค๋ฉด `ui/empty-state` ์ `EmptyState` ๋ฅผ ์ด๋ค.
|
|
137
|
+
*/
|
|
138
|
+
export declare function StructuredListEmpty({ className, children, ...rest }: ComponentPropsWithRef<'p'>): import("react").JSX.Element;
|
|
139
|
+
export type StructuredListToolbarProps = ComponentPropsWithRef<'div'> & {
|
|
140
|
+
/** ์ผ์ชฝ โ ๊ฒฐ๊ณผ ๊ฑด์ยท์ ์ฒด ์ ํ ๋ฑ. `aria-live="polite"` ๋ก ๊ฐ์ธ ๋ฐ๋ ๊ฑด์๋ฅผ ์ฝ์ด ์ค๋ค. */
|
|
141
|
+
info?: ReactNode;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* ๋ชฉ๋ก ์ ๋๊ตฌ ๋ง๋ โ ํท์ ํด๋์ค๊ฐ ์์ด ์ ํธ๋ฆฌํฐ๋ก ๊ทธ๋ฆฐ ๋ณด์ถฉ ๋ถํ์ด๋ค.
|
|
145
|
+
*
|
|
146
|
+
* ์ผ์ชฝ์ ๊ฒฐ๊ณผ ๊ฑด์, ์ค๋ฅธ์ชฝ์ ์ ๋ ฌยท๊ฐ์ ๋๊ตฌ๋ฅผ ๋๋ค. ๊ท๊ฒฉ: **๋ชจ๋ ํ๋ฉด์์ ๊ฐ์ ์๋ฆฌ์ ๊ฐ์ ์์๋ก.**
|
|
147
|
+
* ์ ๋ ฌ์ ๋ฐ๊ฟ ๋๋ ๋ชฉ๋ก๋ง ๊ฐ์ ๋ผ์ด๋ค โ ์ด์ ์ ์ฎ๊ธฐ์ง ๋ง๋ผ.
|
|
148
|
+
*/
|
|
149
|
+
export declare function StructuredListToolbar({ info, className, children, ...rest }: StructuredListToolbarProps): import("react").JSX.Element;
|
|
150
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/structured-list/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAM,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/D;;;G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EF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,0BAA0B,+BAU5B"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, isValidElement } from "react";
|
|
3
|
+
import { cx } from "../lib/krds.js";
|
|
4
|
+
const LAYOUT_CLASS = {
|
|
5
|
+
grid: void 0,
|
|
6
|
+
full: "type-full",
|
|
7
|
+
compact: "type2"
|
|
8
|
+
};
|
|
9
|
+
const SIZE_CLASS = {
|
|
10
|
+
small: "sm",
|
|
11
|
+
medium: "md",
|
|
12
|
+
large: "lg"
|
|
13
|
+
};
|
|
14
|
+
function StructuredList({
|
|
15
|
+
layout = "grid",
|
|
16
|
+
size = "medium",
|
|
17
|
+
selectable,
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
...rest
|
|
21
|
+
}) {
|
|
22
|
+
if (process.env.NODE_ENV !== "production" && layout === "grid") {
|
|
23
|
+
const withMeta = Children.toArray(children).some(
|
|
24
|
+
(child) => isValidElement(child) && child.props.meta != null
|
|
25
|
+
);
|
|
26
|
+
if (withMeta) {
|
|
27
|
+
console.warn(
|
|
28
|
+
'[krds-react StructuredList] layout="grid" \uC5D0 meta \uB97C \uC900 \uCE74\uB4DC\uAC00 \uC788\uB2E4 \u2014 \uD0B7\uC758 `.c-txt-ul` \uADDC\uCE59\uC740 `.type-full`\xB7`.type2` \uC548\uC5D0\uB9CC \uC788\uC5B4 \uAD6C\uBD84\uC120\uB3C4 \uC0C9\uB3C4 \uAC78\uB9AC\uC9C0 \uC54A\uC740 \uB9E8 \uBAA9\uB85D\uC774 \uB098\uC628\uB2E4. layout="full" \uC774\uB098 "compact" \uB85C \uB450\uAC70\uB098 meta \uB97C \uBE7C\uB77C.'
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
"ul",
|
|
34
|
+
{
|
|
35
|
+
className: cx(
|
|
36
|
+
"krds-structured-list",
|
|
37
|
+
LAYOUT_CLASS[layout],
|
|
38
|
+
SIZE_CLASS[size],
|
|
39
|
+
selectable && "type-check",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
...rest,
|
|
43
|
+
children
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function StructuredItem({
|
|
48
|
+
selected,
|
|
49
|
+
check,
|
|
50
|
+
className,
|
|
51
|
+
children,
|
|
52
|
+
...rest
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ jsx("li", { className: cx("structured-item", selected && "is-check", className), ...rest, children: /* @__PURE__ */ jsxs("div", { className: "in", children: [
|
|
55
|
+
check != null && /* @__PURE__ */ jsx("div", { className: "krds-check-area", children: check }),
|
|
56
|
+
children
|
|
57
|
+
] }) });
|
|
58
|
+
}
|
|
59
|
+
function StructuredItemTop({ className, children, ...rest }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("div", { className: cx("card-top", className), ...rest, children });
|
|
61
|
+
}
|
|
62
|
+
function StructuredItemBody({ className, children, ...rest }) {
|
|
63
|
+
return /* @__PURE__ */ jsx("div", { className: cx("card-body", className), ...rest, children });
|
|
64
|
+
}
|
|
65
|
+
function StructuredItemLink({
|
|
66
|
+
className,
|
|
67
|
+
children,
|
|
68
|
+
target,
|
|
69
|
+
title,
|
|
70
|
+
...rest
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
"a",
|
|
74
|
+
{
|
|
75
|
+
className: cx("c-text", className),
|
|
76
|
+
target,
|
|
77
|
+
title: title ?? (target === "_blank" ? "\uC0C8 \uCC3D \uC5F4\uB9BC" : void 0),
|
|
78
|
+
...rest,
|
|
79
|
+
children
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function StructuredItemTitle({ className, children, ...rest }) {
|
|
84
|
+
return /* @__PURE__ */ jsx("p", { className: cx("c-tit", className), ...rest, children: /* @__PURE__ */ jsx("span", { className: "span", children }) });
|
|
85
|
+
}
|
|
86
|
+
function StructuredItemSummary({ className, children, ...rest }) {
|
|
87
|
+
return /* @__PURE__ */ jsx("p", { className: cx("c-txt", className), ...rest, children });
|
|
88
|
+
}
|
|
89
|
+
function StructuredItemDate({
|
|
90
|
+
label,
|
|
91
|
+
className,
|
|
92
|
+
children,
|
|
93
|
+
...rest
|
|
94
|
+
}) {
|
|
95
|
+
const value = children == null || children === "" ? "-" : children;
|
|
96
|
+
return /* @__PURE__ */ jsxs("p", { className: cx("c-date", className), ...rest, children: [
|
|
97
|
+
/* @__PURE__ */ jsx("strong", { className: "key", children: label }),
|
|
98
|
+
/* @__PURE__ */ jsx("span", { className: "value", children: value })
|
|
99
|
+
] });
|
|
100
|
+
}
|
|
101
|
+
function StructuredItemMeta({ items, className, ...rest }) {
|
|
102
|
+
return /* @__PURE__ */ jsx("ul", { className: cx("c-txt-ul", className), ...rest, children: items.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) });
|
|
103
|
+
}
|
|
104
|
+
function StructuredItemCta({ className, children, ...rest }) {
|
|
105
|
+
return /* @__PURE__ */ jsx("div", { className: cx("c-btn", className), ...rest, children });
|
|
106
|
+
}
|
|
107
|
+
function StructuredItemTags({ className, children, ...rest }) {
|
|
108
|
+
return /* @__PURE__ */ jsx("div", { className: cx("card-btm", className), ...rest, children });
|
|
109
|
+
}
|
|
110
|
+
function StructuredItemTag({ className, children, ...rest }) {
|
|
111
|
+
return /* @__PURE__ */ jsx("span", { className: cx("tag", className), ...rest, children });
|
|
112
|
+
}
|
|
113
|
+
function StructuredItemActions({
|
|
114
|
+
className,
|
|
115
|
+
children,
|
|
116
|
+
...rest
|
|
117
|
+
}) {
|
|
118
|
+
return /* @__PURE__ */ jsx("div", { className: cx("card-btn", className), ...rest, children });
|
|
119
|
+
}
|
|
120
|
+
function StructuredCard({
|
|
121
|
+
title,
|
|
122
|
+
href,
|
|
123
|
+
target,
|
|
124
|
+
summary,
|
|
125
|
+
dateLabel,
|
|
126
|
+
dateValue,
|
|
127
|
+
meta,
|
|
128
|
+
badge,
|
|
129
|
+
tags,
|
|
130
|
+
cta,
|
|
131
|
+
actions,
|
|
132
|
+
children,
|
|
133
|
+
...rest
|
|
134
|
+
}) {
|
|
135
|
+
return /* @__PURE__ */ jsxs(StructuredItem, { ...rest, children: [
|
|
136
|
+
badge != null && /* @__PURE__ */ jsx(StructuredItemTop, { children: badge }),
|
|
137
|
+
/* @__PURE__ */ jsxs(StructuredItemBody, { children: [
|
|
138
|
+
/* @__PURE__ */ jsxs(StructuredItemLink, { href, target, children: [
|
|
139
|
+
/* @__PURE__ */ jsx(StructuredItemTitle, { children: title }),
|
|
140
|
+
summary != null && /* @__PURE__ */ jsx(StructuredItemSummary, { children: summary }),
|
|
141
|
+
meta != null && meta.length > 0 && /* @__PURE__ */ jsx(StructuredItemMeta, { items: meta }),
|
|
142
|
+
dateLabel != null && /* @__PURE__ */ jsx(StructuredItemDate, { label: dateLabel, children: dateValue })
|
|
143
|
+
] }),
|
|
144
|
+
cta != null && /* @__PURE__ */ jsx(StructuredItemCta, { children: cta })
|
|
145
|
+
] }),
|
|
146
|
+
tags != null && tags.length > 0 && /* @__PURE__ */ jsx(StructuredItemTags, { children: tags.map((tag, i) => /* @__PURE__ */ jsx(StructuredItemTag, { children: tag }, i)) }),
|
|
147
|
+
actions != null && /* @__PURE__ */ jsx(StructuredItemActions, { children: actions }),
|
|
148
|
+
children
|
|
149
|
+
] });
|
|
150
|
+
}
|
|
151
|
+
function StructuredListEmpty({
|
|
152
|
+
className,
|
|
153
|
+
children = "\uB4F1\uB85D\uB41C \uC790\uB8CC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
154
|
+
...rest
|
|
155
|
+
}) {
|
|
156
|
+
return /* @__PURE__ */ jsx("p", { className: cx("py-14 text-center text-fg-subtle", className), ...rest, children });
|
|
157
|
+
}
|
|
158
|
+
function StructuredListToolbar({
|
|
159
|
+
info,
|
|
160
|
+
className,
|
|
161
|
+
children,
|
|
162
|
+
...rest
|
|
163
|
+
}) {
|
|
164
|
+
return /* @__PURE__ */ jsxs(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
className: cx("flex flex-wrap items-center justify-between gap-3 pb-5", className),
|
|
168
|
+
...rest,
|
|
169
|
+
children: [
|
|
170
|
+
info != null ? /* @__PURE__ */ jsx("div", { "aria-live": "polite", children: info }) : /* @__PURE__ */ jsx("div", {}),
|
|
171
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-3", children })
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
export {
|
|
177
|
+
StructuredCard,
|
|
178
|
+
StructuredItem,
|
|
179
|
+
StructuredItemActions,
|
|
180
|
+
StructuredItemBody,
|
|
181
|
+
StructuredItemCta,
|
|
182
|
+
StructuredItemDate,
|
|
183
|
+
StructuredItemLink,
|
|
184
|
+
StructuredItemMeta,
|
|
185
|
+
StructuredItemSummary,
|
|
186
|
+
StructuredItemTag,
|
|
187
|
+
StructuredItemTags,
|
|
188
|
+
StructuredItemTitle,
|
|
189
|
+
StructuredItemTop,
|
|
190
|
+
StructuredList,
|
|
191
|
+
StructuredListEmpty,
|
|
192
|
+
StructuredListToolbar
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/structured-list/index.tsx"],"sourcesContent":["import { Children, isValidElement, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { cx, type KrdsSize } from '../lib/krds';\n\n/**\n * ๊ตฌ์กฐํ ๋ชฉ๋ก โ KRDS `krds-structured-list`.\n *\n * ใ์ ์ฌํ๊ฑฐ๋ ๊ด๋ จ๋ ์ฝํ
์ธ ์งํฉใ์ ์นด๋๋ก ๋์ด๋๋๋ค. ๋๋ถ๋ถ์ {@link StructuredCard} ํ ์ค๋ก ๋๋๊ณ ,\n * ์์๋ฅผ ๋ฐ๊พธ๊ฑฐ๋ ํท์ ์๋ ๊ฒ์ ๋ผ์ธ ๋๋ง ์กฐ๊ฐ(`StructuredItem*`)์ ์ง์ ์กฐ๋ฆฝํ๋ค.\n * ํยท์ด์ด ์๋ ์๋ฃ๋ ์นด๋๊ฐ ์๋๋ผ `ui/table` ยท `ui/data-table` ์ด๋ค.\n * `meta`(๋ถ๊ฐ ์ ๋ณด ์ค)๋ **์ ํญ ๋ฐฐ์น ์ ์ฉ**์ด๋ค โ `layout=\"grid\"` ์์๋ ๊ตฌ๋ถ์ ์ด ๊ฑธ๋ฆฌ์ง ์๋๋ค.\n * ์นด๋ ์ ๋ฒํผ์๋ `title` ๋ก ์ด๋ ํญ๋ชฉ์ ๊ฒ์ธ์ง ์๋ฆฐ๋ค(ใ์ ์ฒญํ๊ธฐใ๊ฐ 20๊ฐ์ธ ๋ชฉ๋ก์ ์๊ฐํ๋ผ).\n * ๋ชฉ๋ก์ด ๋น๋ฉด `StructuredList` ๋์ {@link StructuredListEmpty} ๋ฅผ ๊ทธ๋ฆฐ๋ค.\n *\n * @example\n * <StructuredListToolbar info={`์ ์ฒด ${total}๊ฑด`}>\n * <SortSelect aria-label=\"์ ๋ ฌ๊ธฐ์ค\" options={sorts} />\n * </StructuredListToolbar>\n * <StructuredList layout=\"full\">\n * {rows.map((r) => (\n * <StructuredCard\n * key={r.id}\n * href={`/board/notice/${r.id}`}\n * title={r.title}\n * summary={r.summary}\n * dateLabel=\"๋ฑ๋ก์ผ\"\n * dateValue={r.createdAt}\n * badge={<Badge tone=\"primary\">๊ณต์ง</Badge>}\n * tags={r.tags}\n * />\n * ))}\n * </StructuredList>\n *\n * ์์ธํ: docs/krds/09-๋ถํ-๋
ธํธ.md#๊ตฌ์กฐํ๋ชฉ๋ก\n */\n\n/**\n * ๋ฐฐ์น. `grid` 3์ด ๊ฒฉ์(๊ธฐ๋ณธ) ยท `full` ํ ์ค์ ํ ํญ๋ชฉ(์ ๋ชฉ์ด ์ปค์ง๋ค) ยท `compact` ์ ํญ์ด๋ ์ ๋ชฉ์ ๊ทธ๋๋ก.\n */\nexport type StructuredListLayout = 'grid' | 'full' | 'compact';\n\n/**\n * ํฌ๊ธฐ. ๋ฐ๊พธ๋ ๊ฒ์ **ํญ๋ชฉ ์์ชฝ ์ฌ๋ฐฑ**๊ณผ ์ฐ์๋จ ์ก์
๋ฒํผ ์์น๋ค.\n * `layout=\"full\"` ๊ณผ ํจ๊ป ์ฃผ๋ฉด ์ ๋ชฉ ํฌ๊ธฐ๋ ๋ฐฐ์น ์ชฝ์ด ์ด๊ฒจ ์ฌ๋ฐฑ๋ง ์ค์ด๋ ๋ค.\n */\nexport type StructuredListSize = Extract<KrdsSize, 'small' | 'medium' | 'large'>;\n\nconst LAYOUT_CLASS: Record<StructuredListLayout, string | undefined> = {\n grid: undefined,\n full: 'type-full',\n compact: 'type2',\n};\n\nconst SIZE_CLASS: Record<StructuredListSize, string> = {\n small: 'sm',\n medium: 'md',\n large: 'lg',\n};\n\nexport type StructuredListProps = ComponentPropsWithRef<'ul'> & {\n /** ๋ฐฐ์น. ๊ธฐ๋ณธ `grid`. */\n layout?: StructuredListLayout;\n /** ํฌ๊ธฐ. ๊ธฐ๋ณธ `medium`. */\n size?: StructuredListSize;\n /** ํญ๋ชฉ๋ง๋ค ์ ํ ์ฒดํฌ๋ฐ์ค๊ฐ ์์ ๋ ์ผ ๋ค โ ์ผ์ง ์์ผ๋ฉด ์ฒดํฌ๋ฐ์ค์ ์ฐ์๋จ ๋ฒํผ์ด ๊ฒน์น๋ค. */\n selectable?: boolean;\n};\n\n/** ๋ชฉ๋ก ๊ป๋ฐ๊ธฐ โ ํท `krds-structured-list`. ๋ชฉ๋ก ์ด๋ฆ์ด ํ์ํ๋ฉด `aria-label` ์ ๋๊ธด๋ค. */\nexport function StructuredList({\n layout = 'grid',\n size = 'medium',\n selectable,\n className,\n children,\n ...rest\n}: StructuredListProps) {\n if (process.env.NODE_ENV !== 'production' && layout === 'grid') {\n // `meta` ์ ํท ๊ท์น์ ์ ํญ ๋ฐฐ์น ์์๋ง ์์ด ๊ฒฉ์์์๋ ์กฐ์ฉํ ๋งจ ๋ชฉ๋ก์ด ๋๋ค.\n // ๋ฐฐ์น๋ฅผ ์๋ ๊ฒ์ ๋ชฉ๋ก๋ฟ์ด๋ผ ์ฌ๊ธฐ์ ์์์ `meta` ๋ฅผ ๋ณธ๋ค(์ง์ ์กฐ๋ฆฝํ ๊ฒ์ ๋ชป ์ก๋๋ค).\n const withMeta = Children.toArray(children).some(\n (child) => isValidElement<{ meta?: unknown }>(child) && child.props.meta != null,\n );\n if (withMeta) {\n console.warn(\n '[krds-react StructuredList] layout=\"grid\" ์ meta ๋ฅผ ์ค ์นด๋๊ฐ ์๋ค โ ํท์ `.c-txt-ul` ๊ท์น์ ' +\n '`.type-full`ยท`.type2` ์์๋ง ์์ด ๊ตฌ๋ถ์ ๋ ์๋ ๊ฑธ๋ฆฌ์ง ์์ ๋งจ ๋ชฉ๋ก์ด ๋์จ๋ค. ' +\n 'layout=\"full\" ์ด๋ \"compact\" ๋ก ๋๊ฑฐ๋ meta ๋ฅผ ๋นผ๋ผ.',\n );\n }\n }\n\n return (\n <ul\n className={cx(\n 'krds-structured-list',\n LAYOUT_CLASS[layout],\n SIZE_CLASS[size],\n selectable && 'type-check',\n className,\n )}\n {...rest}\n >\n {children}\n </ul>\n );\n}\n\nexport type StructuredItemProps = ComponentPropsWithRef<'li'> & {\n /** ์ ํ๋จ. ์ฒดํฌ๋ฐ์ค์ `checked` ์ **๋ฐ๋ก** ์ค๋ค โ ํท CSS ๊ฐ `<li>` ํด๋์ค๋ง ๋ณธ๋ค. */\n selected?: boolean;\n /** ํญ๋ชฉ ์ ํ ์ฒดํฌ๋ฐ์ค. `<Checkbox>` ํ๋๋ฅผ ๊ทธ๋๋ก ๋๊ธด๋ค โ `<CheckArea>` ๋ก ๊ฐ์ธ์ง ๋ง๋ผ. */\n check?: ReactNode;\n};\n\n/** ํญ๋ชฉ ํ๋ โ ํท `structured-item`. ์์ชฝ `<div class=\"in\">` ์ ๋ถํ์ด ์ค์ค๋ก ๊ทธ๋ฆฐ๋ค. */\nexport function StructuredItem({\n selected,\n check,\n className,\n children,\n ...rest\n}: StructuredItemProps) {\n return (\n <li className={cx('structured-item', selected && 'is-check', className)} {...rest}>\n <div className=\"in\">\n {check != null && <div className=\"krds-check-area\">{check}</div>}\n {children}\n </div>\n </li>\n );\n}\n\n/** ํญ๋ชฉ ๋จธ๋ฆฌ โ ํท `card-top`. ์ํ ๋ฐฐ์ง ์๋ฆฌ๋ค. */\nexport function StructuredItemTop({ className, children, ...rest }: ComponentPropsWithRef<'div'>) {\n return (\n <div className={cx('card-top', className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/** ํญ๋ชฉ ๋ณธ๋ฌธ โ ํท `card-body`. ํ์ ๋งํฌ์ CTA ๊ฐ ๋ค์ด๊ฐ๋ค(์ ํญ ๋ฐฐ์น์์๋ ์ข์ฐ๋ก ๋ฒ์ด์ง๋ค). */\nexport function StructuredItemBody({ className, children, ...rest }: ComponentPropsWithRef<'div'>) {\n return (\n <div className={cx('card-body', className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/** ์์ธ๋ก ๊ฐ๋ ํ์ ๋งํฌ โ ํท `c-text`. ์ ๋ชฉยท์์ฝยท๊ธฐ๊ฐ์ ํต์งธ๋ก ๊ฐ์ผ๋ค. */\nexport type StructuredItemLinkProps = ComponentPropsWithRef<'a'>;\n\nexport function StructuredItemLink({\n className,\n children,\n target,\n title,\n ...rest\n}: StructuredItemLinkProps) {\n return (\n <a\n className={cx('c-text', className)}\n target={target}\n // ์ ์ฐฝ์ผ๋ก ์ด๋ฆฌ๋ฉด ๋ฏธ๋ฆฌ ์๋ฆฐ๋ค โ KRDS ์ ๊ทผ์ฑ ์๊ตฌ(ใ์คํ ๊ฒฐ๊ณผ๋ฅผ ์์ธกํ ์ ์์ด์ผ ํ๋คใ).\n title={title ?? (target === '_blank' ? '์ ์ฐฝ ์ด๋ฆผ' : undefined)}\n {...rest}\n >\n {children}\n </a>\n );\n}\n\n/**\n * ์ ๋ชฉ โ ํท `c-tit`. **ํ ์ค๋ก ์๋ฆฐ๋ค.** ์์ชฝ `<span>` ๊ฐ์ธ๊ฐ๋ ๋ถํ์ด ๊ทธ๋ฆฐ๋ค.\n * ์ค๋ฅธ์ชฝ ํ์ดํ๋ ํท์ด ๊ทธ๋ฆฌ๋ฏ๋ก ์์ด์ฝ์ ์ง์ ๋ฃ์ง ๋ง๋ผ.\n */\nexport function StructuredItemTitle({ className, children, ...rest }: ComponentPropsWithRef<'p'>) {\n return (\n <p className={cx('c-tit', className)} {...rest}>\n <span className=\"span\">{children}</span>\n </p>\n );\n}\n\n/** ์์ฝ โ ํท `c-txt`. ๊ฒฉ์์์ 3์ค, ์ ํญ์์ 1์ค๋ก ์๋ฆฐ๋ค. */\nexport function StructuredItemSummary({ className, children, ...rest }: ComponentPropsWithRef<'p'>) {\n return (\n <p className={cx('c-txt', className)} {...rest}>\n {children}\n </p>\n );\n}\n\nexport type StructuredItemDateProps = ComponentPropsWithRef<'p'> & {\n /** ํญ๋ชฉ ์ด๋ฆ. ๊ตต๊ฒ ๊ทธ๋ ค์ง๋ค. ์: ใ์ ์ฒญ ๊ธฐ๊ฐใ */\n label: ReactNode;\n};\n\n/** ๊ธฐ๊ฐยท๋ ์ง ํ ์ค โ ํท `c-date`. ๊ฐ์ด ๋น๋ฉด ๊ท๊ฒฉ๋๋ก ๋์(`-`)๋ฅผ ๋ฃ๋๋ค. */\nexport function StructuredItemDate({\n label,\n className,\n children,\n ...rest\n}: StructuredItemDateProps) {\n const value = children == null || children === '' ? '-' : children;\n return (\n <p className={cx('c-date', className)} {...rest}>\n <strong className=\"key\">{label}</strong>\n <span className=\"value\">{value}</span>\n </p>\n );\n}\n\nexport type StructuredItemMetaProps = Omit<ComponentPropsWithRef<'ul'>, 'children'> & {\n /** ํญ๋ชฉ๋ค. ์ฌ์ด์ฌ์ด์ ์ธ๋ก ๊ตฌ๋ถ์ ์ด ๊ทธ๋ ค์ง๋ค. ๋น ๊ฐ์๋ `-` ๋ฅผ ๋ฃ์ด ์๋ฆฌ๋ฅผ ์งํจ๋ค. */\n items: ReactNode[];\n};\n\n/**\n * ๋ถ๊ฐ ์ ๋ณด ์ค โ ํท `c-txt-ul`. ใ๋ถ์ ยท ๋ฑ๋ก์ผ ยท ์กฐํ์ใ์ฒ๋ผ ์งง์ ๊ฐ์ ์ธ๋ก์ ์ผ๋ก ์๋๋ค.\n * **์ ํญยทcompact ๋ฐฐ์น์ `card-body` ์์์๋ง** ํท ๊ท์น์ด ๊ฑธ๋ฆฐ๋ค.\n */\nexport function StructuredItemMeta({ items, className, ...rest }: StructuredItemMetaProps) {\n return (\n <ul className={cx('c-txt-ul', className)} {...rest}>\n {items.map((item, i) => (\n <li key={i}>{item}</li>\n ))}\n </ul>\n );\n}\n\n/**\n * CTA ์๋ฆฌ โ ํท `c-btn`. ํญ๋ชฉ๊ณผ ๊ด๋ จ๋ **๊ฐ์ฅ ์ค์ํ ํ๋ ํ๋**๋ง ๋ฃ๋๋ค(๊ฐ์ด๋ ๊ท์ ).\n * ์ด๋ ํญ๋ชฉ์ ๋ฒํผ์ธ์ง ์๋๋ก `title` ์ ํญ๋ชฉ ์ ๋ชฉ์ ์ค๋ค.\n */\nexport function StructuredItemCta({ className, children, ...rest }: ComponentPropsWithRef<'div'>) {\n return (\n <div className={cx('c-btn', className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/** ํ๊ทธ ์ค โ ํท `card-btm`. ์์ชฝ ๊ตฌ๋ถ์ ์ ํท์ด ๊ทธ๋ฆฐ๋ค. */\nexport function StructuredItemTags({ className, children, ...rest }: ComponentPropsWithRef<'div'>) {\n return (\n <div className={cx('card-btm', className)} {...rest}>\n {children}\n </div>\n );\n}\n\n/** ํ๊ทธ ํ๋ โ ํท `tag`. **๊ธ์ ์์ `#` ๋ ํท์ด ๋ถ์ธ๋ค** โ ์ง์ ์ฐ๋ฉด `##` ์ด ๋๋ค. */\nexport function StructuredItemTag({ className, children, ...rest }: ComponentPropsWithRef<'span'>) {\n return (\n <span className={cx('tag', className)} {...rest}>\n {children}\n </span>\n );\n}\n\n/**\n * ์ก์
๋ฒํผ ๋ฌถ์ โ ํท `card-btn`. ํญ๋ชฉ ์ฐ์๋จ์ ๋์ด๋ ๋ณด์กฐ ๊ธฐ๋ฅ(๊ณต์ ยท์ฐํ๊ธฐ) ์๋ฆฌ๋ค.\n * ์์๋ `krds-btn medium text` ๋ฅผ ์ด๋ค(ํท์ด ๋์ด๋ฅผ ๊ณ ์ ํ๋ค).\n */\nexport function StructuredItemActions({\n className,\n children,\n ...rest\n}: ComponentPropsWithRef<'div'>) {\n return (\n <div className={cx('card-btn', className)} {...rest}>\n {children}\n </div>\n );\n}\n\nexport type StructuredCardProps = Omit<StructuredItemProps, 'title'> & {\n /** ์ ๋ชฉ. ํ ์ค๋ก ์๋ฆฐ๋ค. */\n title: ReactNode;\n /** ์์ธ ์ฃผ์. ์ ๋ชฉยท์์ฝยท๊ธฐ๊ฐ ์ ์ฒด๊ฐ ์ด ๋งํฌ๊ฐ ๋๋ค. */\n href: string;\n /** `_blank` ๋ฉด ใ์ ์ฐฝ ์ด๋ฆผใ์ `title` ๋ก ์๋ฆฐ๋ค. */\n target?: string;\n /** ์์ฝ. ๊ฒฉ์ 3์ค ยท ์ ํญ 1์ค๋ก ์๋ฆฐ๋ค. */\n summary?: ReactNode;\n /** ๊ธฐ๊ฐ ์ค์ ์ด๋ฆ. ์: ใ์ ์ฒญ ๊ธฐ๊ฐใ */\n dateLabel?: ReactNode;\n /** ๊ธฐ๊ฐ ์ค์ ๊ฐ. ๋น๋ฉด `-` ๊ฐ ๋ค์ด๊ฐ๋ค. */\n dateValue?: ReactNode;\n /** ๋ถ๊ฐ ์ ๋ณด(์ธ๋ก์ ๊ตฌ๋ถ). **์ ํญยทcompact ๋ชฉ๋ก์์๋ง** ํท ๊ท์น์ด ๊ฑธ๋ฆฐ๋ค. */\n meta?: ReactNode[];\n /** ์ํ ๋ฐฐ์ง. `<Badge>` ๋ฅผ ๋ฃ๋๋ค. */\n badge?: ReactNode;\n /** ํ๊ทธ. `#` ์ ํท์ด ๋ถ์ด๋ฏ๋ก ๊ธ์๋ง ๋ฃ๋๋ค. */\n tags?: ReactNode[];\n /** ๊ฐ์ฅ ์ค์ํ ํ๋ ํ๋. `title` ์ ํญ๋ชฉ ์ ๋ชฉ์ ์ฃผ๋ ๊ฒ์ ์์ง ๋ง๋ผ. */\n cta?: ReactNode;\n /** ์ฐ์๋จ ๋ณด์กฐ ๊ธฐ๋ฅ(๊ณต์ ยท์ฐํ๊ธฐ ๋ฑ). */\n actions?: ReactNode;\n};\n\n/**\n * ์นด๋ ํ ์ฅ์ ํต์งธ๋ก โ ์กฐ๊ฐ๋ค์ ํท ์ํ ์์๋๋ก ์กฐ๋ฆฝํ๋ค.\n * ์์๋ฅผ ๋ฐ๊พธ๊ฑฐ๋ ํท์ ์๋ ๊ฒ์ ๋ผ์์ผ ํ ๋๋ง ์กฐ๊ฐ์ ์ง์ ์ด๋ค.\n */\nexport function StructuredCard({\n title,\n href,\n target,\n summary,\n dateLabel,\n dateValue,\n meta,\n badge,\n tags,\n cta,\n actions,\n children,\n ...rest\n}: StructuredCardProps) {\n return (\n <StructuredItem {...rest}>\n {badge != null && <StructuredItemTop>{badge}</StructuredItemTop>}\n <StructuredItemBody>\n <StructuredItemLink href={href} target={target}>\n <StructuredItemTitle>{title}</StructuredItemTitle>\n {summary != null && <StructuredItemSummary>{summary}</StructuredItemSummary>}\n {meta != null && meta.length > 0 && <StructuredItemMeta items={meta} />}\n {dateLabel != null && (\n <StructuredItemDate label={dateLabel}>{dateValue}</StructuredItemDate>\n )}\n </StructuredItemLink>\n {cta != null && <StructuredItemCta>{cta}</StructuredItemCta>}\n </StructuredItemBody>\n {tags != null && tags.length > 0 && (\n <StructuredItemTags>\n {tags.map((tag, i) => (\n <StructuredItemTag key={i}>{tag}</StructuredItemTag>\n ))}\n </StructuredItemTags>\n )}\n {actions != null && <StructuredItemActions>{actions}</StructuredItemActions>}\n {children}\n </StructuredItem>\n );\n}\n\n/**\n * ์๋ฃ ์์ โ ํท์ ๋น ๋ชฉ๋ก ๊ท์น์ด ์์ด ๋ณด์ถฉํ๋ค(ํ์ `TableEmpty` ์ ๊ฐ์ ๋ชจ์).\n * ๋ชฉ๋ก์ด ๋น๋ฉด `StructuredList` ๋ฅผ ๊ทธ๋ฆฌ์ง ๋ง๊ณ ์ด๊ฒ์ ๊ทธ๋ฆฐ๋ค.\n * ๋์ ํ๋๊น์ง ๊ณ๋ค์ด๋ ค๋ฉด `ui/empty-state` ์ `EmptyState` ๋ฅผ ์ด๋ค.\n */\nexport function StructuredListEmpty({\n className,\n children = '๋ฑ๋ก๋ ์๋ฃ๊ฐ ์์ต๋๋ค.',\n ...rest\n}: ComponentPropsWithRef<'p'>) {\n return (\n <p className={cx('py-14 text-center text-fg-subtle', className)} {...rest}>\n {children}\n </p>\n );\n}\n\nexport type StructuredListToolbarProps = ComponentPropsWithRef<'div'> & {\n /** ์ผ์ชฝ โ ๊ฒฐ๊ณผ ๊ฑด์ยท์ ์ฒด ์ ํ ๋ฑ. `aria-live=\"polite\"` ๋ก ๊ฐ์ธ ๋ฐ๋ ๊ฑด์๋ฅผ ์ฝ์ด ์ค๋ค. */\n info?: ReactNode;\n};\n\n/**\n * ๋ชฉ๋ก ์ ๋๊ตฌ ๋ง๋ โ ํท์ ํด๋์ค๊ฐ ์์ด ์ ํธ๋ฆฌํฐ๋ก ๊ทธ๋ฆฐ ๋ณด์ถฉ ๋ถํ์ด๋ค.\n *\n * ์ผ์ชฝ์ ๊ฒฐ๊ณผ ๊ฑด์, ์ค๋ฅธ์ชฝ์ ์ ๋ ฌยท๊ฐ์ ๋๊ตฌ๋ฅผ ๋๋ค. ๊ท๊ฒฉ: **๋ชจ๋ ํ๋ฉด์์ ๊ฐ์ ์๋ฆฌ์ ๊ฐ์ ์์๋ก.**\n * ์ ๋ ฌ์ ๋ฐ๊ฟ ๋๋ ๋ชฉ๋ก๋ง ๊ฐ์ ๋ผ์ด๋ค โ ์ด์ ์ ์ฎ๊ธฐ์ง ๋ง๋ผ.\n */\nexport function StructuredListToolbar({\n info,\n className,\n children,\n ...rest\n}: StructuredListToolbarProps) {\n return (\n <div\n className={cx('flex flex-wrap items-center justify-between gap-3 pb-5', className)}\n {...rest}\n >\n {info != null ? <div aria-live=\"polite\">{info}</div> : <div />}\n <div className=\"flex flex-wrap items-center gap-3\">{children}</div>\n </div>\n );\n}\n"],"mappings":"AA4FI,cAgCE,YAhCF;AA5FJ,SAAS,UAAU,sBAAkE;AACrF,SAAS,UAAyB;AA6ClC,MAAM,eAAiE;AAAA,EACrE,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,aAAiD;AAAA,EACrD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAYO,SAAS,eAAe;AAAA,EAC7B,SAAS;AAAA,EACT,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,MAAI,QAAQ,IAAI,aAAa,gBAAgB,WAAW,QAAQ;AAG9D,UAAM,WAAW,SAAS,QAAQ,QAAQ,EAAE;AAAA,MAC1C,CAAC,UAAU,eAAmC,KAAK,KAAK,MAAM,MAAM,QAAQ;AAAA,IAC9E;AACA,QAAI,UAAU;AACZ,cAAQ;AAAA,QACN;AAAA,MAGF;AAAA,IACF;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,aAAa,MAAM;AAAA,QACnB,WAAW,IAAI;AAAA,QACf,cAAc;AAAA,QACd;AAAA,MACF;AAAA,MACC,GAAG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
+
* ๊ฐ์ ์๋ฆฌ์์ ๋ด์ฉ์ ๊ฐ์ ๋ผ์ด๋ค. ์ ์๋ค ํด๋ ๋ชฉ๋ก์ `ui/accordion` ์ด๋ค.
|
|
6
|
+
* `Tab.Trigger` ์ `Tab.Panel` ์ ๊ฐ์ `value` ๋ก ์ง์ง์ด๋ค.
|
|
7
|
+
* **ํญ์ ์ฌ์ฉ ๋ถ๊ฐ ์ํ๋ฅผ ์ฐ์ง ์๋๋ค**(๊ท๊ฒฉ) โ ๋ด์ฉ์ด ์์ผ๋ฉด ํญ์ ์ง์ฐ๊ฑฐ๋ ํจ๋์์ ์ค๋ช
ํ๋ค.
|
|
8
|
+
* ํญ์ด 6๊ฐ๋ฅผ ๋์ผ๋ฉด ํท์ด ๊ฐ๋ก ์คํฌ๋กค๋ง ์ํค๋ฏ๋ก ๋๊ธฐ์ง ์๋ ํธ์ด ๋ง๋ค. ์ธ๋ก ํญ์ ํท์ ์๋ค.
|
|
9
|
+
* ๋น์ ์ด๋ก ์ธ ๋ `defaultValue` ๋ฅผ ์๋ตํ๋ฉด ์๋ฒ ๋ ๋ ๊ฒฐ๊ณผ์ ์ด๋ฆฐ ํจ๋์ด ์๋ค โ ๋๋๋ก ๋ช
์ํ๋ค.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <Tab.Root defaultValue="online">
|
|
13
|
+
* <Tab.List label="์ฒญ๊ตฌ ๋ฐฉ๋ฒ" variant="line">
|
|
14
|
+
* <Tab.Trigger value="online">์จ๋ผ์ธ</Tab.Trigger>
|
|
15
|
+
* <Tab.Trigger value="post">์ฐํธยทํฉ์ค</Tab.Trigger>
|
|
16
|
+
* </Tab.List>
|
|
17
|
+
* <Tab.Panels>
|
|
18
|
+
* <Tab.Panel value="online">โฆ</Tab.Panel>
|
|
19
|
+
* <Tab.Panel value="post">โฆ</Tab.Panel>
|
|
20
|
+
* </Tab.Panels>
|
|
21
|
+
* </Tab.Root>
|
|
22
|
+
*
|
|
23
|
+
* ์์ธํ: docs/krds/09-๋ถํ-๋
ธํธ.md#ํญ
|
|
24
|
+
*/
|
|
25
|
+
/** ํญ ๋ง๋ ๋ชจ์. `line` ๋ฐ์คํ(๊ธฐ๋ณธ) ยท `fill` ๋ฒํผํ. */
|
|
26
|
+
export type TabVariant = 'line' | 'fill';
|
|
27
|
+
/**
|
|
28
|
+
* ํ์ดํ๋ก ์ด์ ์ ์ฎ๊ธธ ๋ ๊ณง๋ฐ๋ก ์ ํํ ๊ฒ์ธ๊ฐ.
|
|
29
|
+
* `manual`(๊ธฐ๋ณธ)์ด KRDS ๊ฐ์ด๋์ ๋์์ด๊ณ , `auto` ๋ ํจ๋์ด ๊ฐ๋ฒผ์ธ ๋๋ง ์ด๋ค.
|
|
30
|
+
*/
|
|
31
|
+
export type TabActivation = 'manual' | 'auto';
|
|
32
|
+
export type TabRootProps = Omit<ComponentPropsWithRef<'div'>, 'onChange'> & {
|
|
33
|
+
/** ์ ์ด ๋ชจ๋. ์ฃผ๋ฉด ์ํ๋ฅผ ๋ฐ๊นฅ์ด ๊ฐ๋๋ค. */
|
|
34
|
+
value?: string;
|
|
35
|
+
/** ๋น์ ์ด ๋ชจ๋์ ์ฒซ ์ ํ๊ฐ. **์๋ตํ๋ฉด ์๋ฒ ๋ ๋ ๊ฒฐ๊ณผ์ ์ด๋ฆฐ ํจ๋์ด ์๋ค** โ ๋๋๋ก ๋ช
์ํ๋ค. */
|
|
36
|
+
defaultValue?: string;
|
|
37
|
+
/** ์ ํ์ด ๋ฐ๋ ๋. */
|
|
38
|
+
onValueChange?: (value: string) => void;
|
|
39
|
+
/** ํ์ดํ ์ด๋์ด ๊ณง๋ฐ๋ก ์ ํํ ์ง. ๊ธฐ๋ณธ `manual`. */
|
|
40
|
+
activation?: TabActivation;
|
|
41
|
+
};
|
|
42
|
+
/** ํญ ๋ฐ๊นฅํ โ ํท `krds-tab-area`. ์์ `Tab.List` ์ `Tab.Panels` ๋ฅผ ๋๋ค. */
|
|
43
|
+
export declare function TabRoot({ value, defaultValue, onValueChange, activation, className, children, ...rest }: TabRootProps): import("react").JSX.Element;
|
|
44
|
+
export type TabListProps = ComponentPropsWithRef<'div'> & {
|
|
45
|
+
/** ํญ ๋ง๋ ๋ชจ์. ๊ธฐ๋ณธ `line` โ ์๋ตํ ์ ์๋ค(๋ ๋ค ์์ผ๋ฉด ํ์ฑ ํ์๊ฐ ์ฌ๋ผ์ง๋ค). */
|
|
46
|
+
variant?: TabVariant;
|
|
47
|
+
/** ํญ์ด ๊ฐ๋ก๋ฅผ ๊ฝ ์ฑ์ด๋ค. ๊ธฐ๋ณธ true โ false ๋ฉด `line` ์ด ๋ฐ์ค ๋์ ํ
๋๋ฆฌ ์์๋ก ๊ทธ๋ ค์ง๋ค. */
|
|
48
|
+
full?: boolean;
|
|
49
|
+
/** ํญ ๋ง๋์ ์ด๋ฆ(`aria-label`). */
|
|
50
|
+
label?: string;
|
|
51
|
+
/** `<ul role="tablist">` ์ ์น์ ํด๋์ค. */
|
|
52
|
+
listClassName?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* ํญ ๋ง๋ โ ํท `.tab.line.full > ul[role=tablist]`.
|
|
56
|
+
*
|
|
57
|
+
* โโ ๋ก ์ด์ ์ ์ฎ๊ธฐ๊ณ Home/End ๋ก ์ ๋์ผ๋ก ๊ฐ๋ค(์ํํ์ง ์๋๋ค).
|
|
58
|
+
* **๋ชจ๋ ํญ์ด Tab ์์์ ๋จ๋๋ค** โ KRDS ๊ฐ ใTab/Shift+Tab ์ผ๋ก ์ ๊ทผใ์ ๋ชป๋ฐ์ ๋ก๋น tabindex ๋ฅผ
|
|
59
|
+
* ์ฐ์ง ์๋๋ค.
|
|
60
|
+
*/
|
|
61
|
+
export declare function TabList({ variant, full, label, listClassName, className, children, onKeyDown, ...rest }: TabListProps): import("react").JSX.Element;
|
|
62
|
+
export type TabTriggerProps = Omit<ComponentPropsWithRef<'button'>, 'value'> & {
|
|
63
|
+
/** ์ด ํญ์ด ์ฌ๋ ํจ๋์ ๊ฐ. ๊ฐ์ ๊ฐ์ `Tab.Panel` ์ ์ค๋ค. */
|
|
64
|
+
value: string;
|
|
65
|
+
/** `<li>` ์ ์น์ ํด๋์ค. `.active` ๊ฐ ๋ถ๋ ์์๋ ๋ฒํผ์ด ์๋๋ผ ์ด `<li>` ๋ค. */
|
|
66
|
+
itemClassName?: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* ํญ ํ๋ โ ํท ๋งํฌ์
์ `<li>` + `button.btn-tab` ์ด๊ณ , **`role="tab"` ์ ๋ฒํผ์ ๋ถ์ธ๋ค.**
|
|
70
|
+
*
|
|
71
|
+
* ํท ์๋ฌธ์ `role="tab"` ๊ณผ ARIA ์์ฑ์ `<li>` ์ ์น๊ณ ๊ทธ ์์ ๋ฒํผ์ ๋ฃ๋๋ฐ, ๊ทธ๋ฌ๋ฉด
|
|
72
|
+
* ใ๋๋ฅผ ์ ์๋ ๊ฒ ์์ ๋๋ฅผ ์ ์๋ ๊ฒใ์ด ๋์ด axe `nested-interactive`(serious)๋ก ๊ฑธ๋ฆฐ๋ค
|
|
73
|
+
* โ ์ค์ ๋ก ํ์ค์ฌ์ ํ๋ฉด์์ 3๊ฑด ์กํ๋ค. ARIA ๊ท๊ฒฉ(APG Tabs)๋ ์ด์ ์ ๋ฐ๋ ์์๊ฐ ๊ณง `role="tab"` ์ด๋ค.
|
|
74
|
+
* ๊ทธ๋์ ์ญํ ยท์ํ๋ ๋ฒํผ์ผ๋ก ์ฎ๊ธฐ๊ณ , `<li>` ๋ `role="none"` ์ผ๋ก ๋๋ค.
|
|
75
|
+
* ๋ชจ์์ ๊ทธ๋๋ก๋ค โ ํท CSS ๊ฐ ๋ณด๋ `.active` ๋ ์ฌ์ ํ `<li>` ์ ๋ถ๋๋ค.
|
|
76
|
+
*
|
|
77
|
+
* ์ด์ ์ ๊ตด๋ฌ๋ค๋๋ค(roving tabindex) โ ์ ํ๋ ํญ๋ง Tab ํค๋ก ๋ค์ด์ค๊ณ , ์ข์ฐ ํ์ดํ๋ก ์ฎ๊ธด๋ค(APG).
|
|
78
|
+
* ์ ํ๋ ํญ์๋ ใ์ ํ๋จใ ๋ฌธ๊ตฌ๊ฐ ์๋ฆฌ๋ก ํจ๊ป ๋๊ฐ๋ค(์ง์ ์งค ๋ ๊ฐ์ฅ ์์ฃผ ๋น ๋จ๋ฆฌ๋ ๊ณณ์ด๋ค).
|
|
79
|
+
*/
|
|
80
|
+
export declare function TabTrigger({ value, itemClassName, className, children, onClick, type, ...rest }: TabTriggerProps): import("react").JSX.Element;
|
|
81
|
+
/** ํจ๋ ๋ฌถ์ โ ํท `tab-conts-wrap`. **๋นผ๋ฉด ํจ๋ ํญ์ด ์ค์ด๋ ๋ค.** */
|
|
82
|
+
export declare function TabPanels({ className, children, ...rest }: ComponentPropsWithRef<'div'>): import("react").JSX.Element;
|
|
83
|
+
export type TabPanelProps = ComponentPropsWithRef<'section'> & {
|
|
84
|
+
/** ์ง์ด ๋๋ `Tab.Trigger` ์ ๊ฐ. */
|
|
85
|
+
value: string;
|
|
86
|
+
/** ์ ๋ชฉ ์ด๋(H ํค)์๋ง ์กํ๋ ์จ์ ํจ๋ ์ ๋ชฉ. ํญ ๊ธ์์ ๋ค๋ฅธ ์ค๋ช
์ด ํ์ํ ๋๋ง ์ค๋ค. */
|
|
87
|
+
srHeading?: string;
|
|
88
|
+
/** `srHeading` ์ ์ ๋ชฉ ๋จ๊ณ. ๊ธฐ๋ณธ 3. */
|
|
89
|
+
srHeadingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
90
|
+
/**
|
|
91
|
+
* ์ ๋ณด์ด๋ ํจ๋๋ DOM ์ ๋จ๊ธธ ๊ฒ์ธ๊ฐ. ๊ธฐ๋ณธ true ๊ฐ ํท ๋์์ด๋ค(ํผ ์
๋ ฅ๊ฐ์ด ์ด์ ์๋ค).
|
|
92
|
+
* false ๋ ๋ฌด๊ฑฐ์ด ๋ชฉ๋ก์ด๋ ์ด ๋๋ง๋ค ์ด๊ธฐํํด์ผ ํ๋ ํผ์ ์ด๋ค.
|
|
93
|
+
*/
|
|
94
|
+
keepMounted?: boolean;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* ํญ ํจ๋ โ ํท `section.tab-conts`. ์์์ ์ฌ๋ฟ ๋ฃ์ผ๋ฉด 24px ๊ฐ๊ฒฉ์ด ์๋์ผ๋ก ๋ถ๋๋ค.
|
|
98
|
+
*/
|
|
99
|
+
export declare function TabPanel({ value, srHeading, srHeadingLevel, keepMounted, className, children, ...rest }: TabPanelProps): import("react").JSX.Element | null;
|
|
100
|
+
/** ํฉ์ฑ์ฉ ๋ฌถ์. `Root` ยท `List` ยท `Trigger` ยท `Panels` ยท `Panel`. */
|
|
101
|
+
export declare const Tab: {
|
|
102
|
+
Root: typeof TabRoot;
|
|
103
|
+
List: typeof TabList;
|
|
104
|
+
Trigger: typeof TabTrigger;
|
|
105
|
+
Panels: typeof TabPanels;
|
|
106
|
+
Panel: typeof TabPanel;
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAQL,KAAK,qBAAqB,EAE3B,MAAM,OAAO,CAAC;AAGf;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAyB9C,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MA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