sellmate-design-system-react 9.0.0-beta.61 → 9.0.0-beta.63
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/AGENTS.md +510 -136
- package/dist/components/SBarChart/README.md +15 -0
- package/dist/components/SBarChart/SBarChart.d.ts +15 -1
- package/dist/components/SBarChart/index.d.ts +1 -1
- package/dist/components/SCallout/README.md +1 -0
- package/dist/components/SCallout/SCallout.d.ts +6 -1
- package/dist/components/SDonutChart/README.md +2 -4
- package/dist/components/SDonutChart/SDonutChart.d.ts +9 -10
- package/dist/components/SGhostButton/README.md +2 -0
- package/dist/components/SLineChart/README.md +15 -0
- package/dist/components/SLineChart/SLineChart.d.ts +15 -1
- package/dist/components/SLineChart/index.d.ts +1 -1
- package/dist/components/SLineChart/lineChart.config.d.ts +8 -5
- package/dist/components/SMeatballButton/README.md +67 -0
- package/dist/components/SMeatballButton/SMeatballButton.d.ts +36 -0
- package/dist/components/SMeatballButton/index.d.ts +1 -0
- package/dist/components/SPage/README.md +19 -0
- package/dist/components/SPage/SPage.d.ts +11 -2
- package/dist/components/SPage/index.d.ts +1 -1
- package/dist/components/SPage/page.config.d.ts +8 -0
- package/dist/components/SPieChart/README.md +1 -0
- package/dist/components/SPieChart/SPieChart.d.ts +6 -1
- package/dist/docs/RecipeGallery.d.ts +13 -0
- package/dist/index.cjs +338 -154
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +336 -154
- package/dist/index.js.map +1 -1
- package/dist/lib/chart/radial.d.ts +22 -11
- package/dist/lib/chart/tooltip.d.ts +18 -1
- package/dist/lib/dropdown-menu.d.ts +19 -0
- package/dist/llms-full.txt +628 -140
- package/dist/llms.txt +512 -138
- package/dist/recipes/AppShell.d.ts +21 -0
- package/dist/recipes/ExcelFilePopupPage.d.ts +5 -0
- package/dist/recipes/LoginPage.d.ts +6 -0
- package/dist/recipes/ProductCreatePage.d.ts +1 -0
- package/dist/recipes/ProductCreateSectionsPage.d.ts +5 -0
- package/dist/recipes/ProductDetailInlineEditPage.d.ts +9 -0
- package/dist/recipes/ProductDetailPage.d.ts +1 -0
- package/dist/recipes/ProductListChipFilterPage.d.ts +1 -0
- package/dist/recipes/ProductListPage.d.ts +1 -0
- package/dist/recipes/TransferOrderPopupPage.d.ts +2 -0
- package/dist/recipes/api.d.ts +91 -0
- package/dist/recipes/recipe-story.d.ts +33 -0
- package/dist/recipes/router.d.ts +9 -0
- package/dist/styles.css +21 -3
- package/package.json +3 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 레시피 페이지가 기대는 **앱 셸**의 자리표시.
|
|
3
|
+
*
|
|
4
|
+
* 레시피 페이지는 이 파일을 `./AppShell` 로 import 한다 — 소비 앱에서는 그 자리에 AGENTS.md §4-1
|
|
5
|
+
* 대로 만든 자기 셸(SLayout · SGnb · SPageHeader · SPage)이 온다.
|
|
6
|
+
*
|
|
7
|
+
* 페이지 레시피는 **페이지 안**의 골격이라 GNB·레이아웃은 보여 주지 않는다. 셸 조합은
|
|
8
|
+
* Layout Builder 의 몫이다. 그래서 여기서는 셸 중 페이지가 정하는 부분 — 페이지 헤더와
|
|
9
|
+
* `SPage`(높이·폭 모드) — 만 세운다. 둘 사이의 중개(헤더 그림자·폭 정렬)는 `SLayout` 이
|
|
10
|
+
* 쓰는 페이지 열(`SPageColumn`)을 그대로 써서 셸 안에서와 똑같이 동작하게 한다.
|
|
11
|
+
*/
|
|
12
|
+
import type { ReactNode } from 'react';
|
|
13
|
+
import { type SPageContentHeight, type SPageContentWidth, type SPageHeaderProps, type SPagePadding } from 'sellmate-design-system-react';
|
|
14
|
+
export default function AppShell({ children, header, scrollEndSpacing, contentHeight, contentWidth, padding, }: {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
header?: SPageHeaderProps;
|
|
17
|
+
scrollEndSpacing?: boolean;
|
|
18
|
+
contentHeight?: SPageContentHeight;
|
|
19
|
+
contentWidth?: SPageContentWidth;
|
|
20
|
+
padding?: SPagePadding;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ProductCreatePage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 섹션마다 독립 인라인 폼이 있는 상세 페이지 (§4-4 의 변형).
|
|
3
|
+
* 섹션 안에서 닫히는 저장·취소는 카드의 button·footerLeft 로 넘긴다 (§3-7-8).
|
|
4
|
+
*
|
|
5
|
+
* 이 화면은 섹션마다 스스로 저장하고 끝나 **페이지 전체를 확정하는 액션이 없다** — 그래서 카드 밖
|
|
6
|
+
* 하단 줄도 두지 않는다. 페이지 단위로 확정·삭제할 것이 있으면 그것만 카드 밖 하단 줄에 둔다
|
|
7
|
+
* (§4-4 기본형 참조) — 섹션 푸터와 섞지 않는다.
|
|
8
|
+
*/
|
|
9
|
+
export default function ProductDetailInlineEditPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ProductDetailPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ProductListChipFilterPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ProductListPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { SDateRangeValue, STableSort } from 'sellmate-design-system-react';
|
|
2
|
+
export type ProductStatus = 'selling' | 'stopped';
|
|
3
|
+
export interface Product {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
category: string;
|
|
7
|
+
stock: number;
|
|
8
|
+
price: number;
|
|
9
|
+
status: ProductStatus;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare const STATUS_OPTIONS: {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
export declare const CATEGORY_OPTIONS: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
export interface ProductQuery {
|
|
22
|
+
status?: string;
|
|
23
|
+
category?: string;
|
|
24
|
+
keywords?: string[];
|
|
25
|
+
/** 등록일 범위 [start, end] — 날짜 피커가 지워지면 null 이 온다 */
|
|
26
|
+
period?: SDateRangeValue;
|
|
27
|
+
sort?: STableSort | null;
|
|
28
|
+
page: number;
|
|
29
|
+
rowsPerPage: number;
|
|
30
|
+
}
|
|
31
|
+
export declare function useProductList(query: ProductQuery): {
|
|
32
|
+
rows: Product[];
|
|
33
|
+
total: number;
|
|
34
|
+
lastPage: number;
|
|
35
|
+
loading: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare function removeProducts(ids: number[]): Promise<void>;
|
|
38
|
+
export declare function saveProduct(values: Record<string, unknown>): Promise<void>;
|
|
39
|
+
/** 상세 화면이 받는 값 — 표시용 문자열로 이미 다듬어져 온다고 본다 */
|
|
40
|
+
export declare function useProduct(id: number): {
|
|
41
|
+
id: number;
|
|
42
|
+
name: string;
|
|
43
|
+
code: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
category: string;
|
|
46
|
+
status: ProductStatus;
|
|
47
|
+
price: string;
|
|
48
|
+
cost: string;
|
|
49
|
+
receiver: string;
|
|
50
|
+
phone: string;
|
|
51
|
+
address: string;
|
|
52
|
+
};
|
|
53
|
+
export declare const ORDER_TABS: {
|
|
54
|
+
label: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}[];
|
|
57
|
+
/** 이동 오더 한 건의 품목·이력 */
|
|
58
|
+
export declare function useTransferOrder(orderId: string): {
|
|
59
|
+
orderId: string;
|
|
60
|
+
from: string;
|
|
61
|
+
to: string;
|
|
62
|
+
requestedAt: string;
|
|
63
|
+
items: {
|
|
64
|
+
id: number;
|
|
65
|
+
sku: string;
|
|
66
|
+
name: string;
|
|
67
|
+
qty: number;
|
|
68
|
+
}[];
|
|
69
|
+
history: {
|
|
70
|
+
id: number;
|
|
71
|
+
at: string;
|
|
72
|
+
action: string;
|
|
73
|
+
by: string;
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
export declare function applyExcelFiles(ids: number[]): Promise<void>;
|
|
77
|
+
/** 업로드한 엑셀 파일 목록 */
|
|
78
|
+
export declare function useExcelFiles(query: {
|
|
79
|
+
keyword?: string;
|
|
80
|
+
page: number;
|
|
81
|
+
rowsPerPage: number;
|
|
82
|
+
}): {
|
|
83
|
+
rows: {
|
|
84
|
+
id: number;
|
|
85
|
+
fileName: string;
|
|
86
|
+
uploadedAt: string;
|
|
87
|
+
rows: number;
|
|
88
|
+
}[];
|
|
89
|
+
total: number;
|
|
90
|
+
lastPage: number;
|
|
91
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 레시피 스토리가 함께 쓰는 틀.
|
|
3
|
+
*
|
|
4
|
+
* 레시피 파일은 소비 앱의 한 라우트라서, 앱 진입점이 주는 두 가지를 여기서 대신 준다 —
|
|
5
|
+
* 뷰포트 높이(`h-screen`, §4-1)와 `SModal.*` 가 그려질 `SModalOutlet`.
|
|
6
|
+
*/
|
|
7
|
+
import type { Decorator } from '@storybook/react-vite';
|
|
8
|
+
export declare const recipeDecorator: Decorator;
|
|
9
|
+
/**
|
|
10
|
+
* `Recipes/…` 스토리 meta 의 `parameters.docs`. 설명은 레시피마다 다르므로 받는다.
|
|
11
|
+
*
|
|
12
|
+
* ⚠️ meta 의 `parameters` 자체는 **객체 리터럴**로 쓰고 이 함수는 그 안의 `docs` 에만 쓴다 —
|
|
13
|
+
* `parameters: recipeParameters(…)` 처럼 통째로 함수 결과를 넘기면 Storybook 의 CSF 변환이
|
|
14
|
+
* 그 자리를 덮어써 `layout: 'fullscreen'` 이 사라진다(캔버스에 16px 여백이 생겨 h-screen 화면이 잘린다).
|
|
15
|
+
*/
|
|
16
|
+
export declare function recipeDocs(description: string): {
|
|
17
|
+
description: {
|
|
18
|
+
component: string;
|
|
19
|
+
};
|
|
20
|
+
story: {
|
|
21
|
+
inline: boolean;
|
|
22
|
+
height: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/** 각 예시의 "Show code" 에 레시피 파일 원문을 싣는다 */
|
|
26
|
+
export declare const showCode: (code: string) => {
|
|
27
|
+
docs: {
|
|
28
|
+
source: {
|
|
29
|
+
code: string;
|
|
30
|
+
language: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 레시피가 기대는 **앱 쪽 라우터**의 자리표시.
|
|
3
|
+
*
|
|
4
|
+
* 레시피 페이지는 이 모듈을 `./router` 로 import 한다 — 소비 앱에서는 그 자리에
|
|
5
|
+
* 쓰는 라우터(react-router·Next 등)의 이동 함수와 경로 파라미터가 온다. 여기서는 아무 데도 가지 않는다.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useNavigate(): (path: string | -1) => void;
|
|
8
|
+
/** 현재 경로의 파라미터 — 레시피에서는 고정값을 돌려준다 */
|
|
9
|
+
export declare function useParams(): Record<string, string>;
|
package/dist/styles.css
CHANGED
|
@@ -635,6 +635,9 @@
|
|
|
635
635
|
.top-\[-1px\] {
|
|
636
636
|
top: -1px;
|
|
637
637
|
}
|
|
638
|
+
.top-\[10px\] {
|
|
639
|
+
top: 10px;
|
|
640
|
+
}
|
|
638
641
|
.top-\[12px\] {
|
|
639
642
|
top: 12px;
|
|
640
643
|
}
|
|
@@ -674,6 +677,9 @@
|
|
|
674
677
|
.right-\[2px\] {
|
|
675
678
|
right: 2px;
|
|
676
679
|
}
|
|
680
|
+
.right-\[8px\] {
|
|
681
|
+
right: 8px;
|
|
682
|
+
}
|
|
677
683
|
.right-\[10px\] {
|
|
678
684
|
right: 10px;
|
|
679
685
|
}
|
|
@@ -896,6 +902,9 @@
|
|
|
896
902
|
.mr-sd-4 {
|
|
897
903
|
margin-right: var(--spacing-sd-4);
|
|
898
904
|
}
|
|
905
|
+
.mr-sd-6 {
|
|
906
|
+
margin-right: var(--spacing-sd-6);
|
|
907
|
+
}
|
|
899
908
|
.mb-3 {
|
|
900
909
|
margin-bottom: calc(var(--spacing) * 3);
|
|
901
910
|
}
|
|
@@ -908,6 +917,9 @@
|
|
|
908
917
|
.mb-sd-8 {
|
|
909
918
|
margin-bottom: var(--spacing-sd-8);
|
|
910
919
|
}
|
|
920
|
+
.mb-sd-32 {
|
|
921
|
+
margin-bottom: var(--spacing-sd-32);
|
|
922
|
+
}
|
|
911
923
|
.-ml-px {
|
|
912
924
|
margin-left: -1px;
|
|
913
925
|
}
|
|
@@ -1734,6 +1746,9 @@
|
|
|
1734
1746
|
.grid-cols-\[repeat\(7\,var\(--cmp-datepicker-calendar-day-width\)\)\] {
|
|
1735
1747
|
grid-template-columns: repeat(7,var(--cmp-datepicker-calendar-day-width));
|
|
1736
1748
|
}
|
|
1749
|
+
.grid-cols-\[repeat\(auto-fill\,320px\)\] {
|
|
1750
|
+
grid-template-columns: repeat(auto-fill,320px);
|
|
1751
|
+
}
|
|
1737
1752
|
.grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\] {
|
|
1738
1753
|
grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
|
|
1739
1754
|
}
|
|
@@ -2159,6 +2174,9 @@
|
|
|
2159
2174
|
.gap-x-\[var\(--cmp-datepicker-calendar-legend-group-gap\)\] {
|
|
2160
2175
|
column-gap: var(--cmp-datepicker-calendar-legend-group-gap);
|
|
2161
2176
|
}
|
|
2177
|
+
.gap-x-sd-12 {
|
|
2178
|
+
column-gap: var(--spacing-sd-12);
|
|
2179
|
+
}
|
|
2162
2180
|
.gap-y-\[4px\] {
|
|
2163
2181
|
row-gap: 4px;
|
|
2164
2182
|
}
|
|
@@ -2266,6 +2284,9 @@
|
|
|
2266
2284
|
.rounded-\(--radius-8\) {
|
|
2267
2285
|
border-radius: var(--radius-8);
|
|
2268
2286
|
}
|
|
2287
|
+
.rounded-6 {
|
|
2288
|
+
border-radius: var(--radius-6);
|
|
2289
|
+
}
|
|
2269
2290
|
.rounded-8 {
|
|
2270
2291
|
border-radius: var(--radius-8);
|
|
2271
2292
|
}
|
|
@@ -3905,9 +3926,6 @@
|
|
|
3905
3926
|
.text-\(--cmp-chart-axis-color\) {
|
|
3906
3927
|
color: var(--cmp-chart-axis-color);
|
|
3907
3928
|
}
|
|
3908
|
-
.text-\(--cmp-chart-bar-dataLabel-color-default\) {
|
|
3909
|
-
color: var(--cmp-chart-bar-dataLabel-color-default);
|
|
3910
|
-
}
|
|
3911
3929
|
.text-\(--cmp-chart-chartTooltip-title-color\) {
|
|
3912
3930
|
color: var(--cmp-chart-chartTooltip-title-color);
|
|
3913
3931
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sellmate-design-system-react",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.63",
|
|
4
4
|
"description": "Sellmate Design System — React (TypeScript + Tailwind v4) port",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"keywords": [
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"build:dts": "tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
50
50
|
"gen:tokens": "node scripts/generate-tokens.mjs",
|
|
51
51
|
"docs:gen": "node scripts/gen-docs.mjs",
|
|
52
|
+
"docs:recipes": "node scripts/gen-recipes.mjs",
|
|
52
53
|
"build:css": "cp ./src/styles/theme.css ./dist/theme.css && cp ./src/styles/pretendard.css ./dist/pretendard.css && rm -rf ./dist/fonts && cp -R ./src/styles/fonts ./dist/fonts && tailwindcss -i ./src/styles/entry.css -o ./dist/styles.css",
|
|
53
54
|
"dev": "tsup --watch",
|
|
54
55
|
"playground": "vite --config vite.playground.config.ts",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"check:routing": "node scripts/check-routing.mjs",
|
|
73
74
|
"check:cn-scales": "node scripts/check-cn-scales.mjs",
|
|
74
75
|
"check:categories": "node scripts/check-story-categories.mjs",
|
|
76
|
+
"check:recipes": "node scripts/gen-recipes.mjs --check",
|
|
75
77
|
"version": "node scripts/version.mjs --prerelease beta --tag",
|
|
76
78
|
"version:dry": "node scripts/version.mjs --prerelease beta --dry-run",
|
|
77
79
|
"version:stable": "node scripts/version.mjs --tag",
|