sellmate-design-system-react 9.0.0-beta.62 → 9.0.0-beta.64
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 +486 -131
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +11 -3
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +7 -2
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +2 -1
- package/dist/components/SCalendarBoard/README.md +11 -2
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +4 -1
- package/dist/components/SCalendarBoard/calendar-board-layout.d.ts +49 -0
- package/dist/components/SCalendarBoard/types.d.ts +10 -1
- 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/docs/RecipeGallery.d.ts +13 -0
- package/dist/index.cjs +168 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +168 -57
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +516 -133
- package/dist/llms.txt +486 -131
- 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 +26 -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
|
@@ -716,6 +716,9 @@
|
|
|
716
716
|
.z-10 {
|
|
717
717
|
z-index: 10;
|
|
718
718
|
}
|
|
719
|
+
.z-20 {
|
|
720
|
+
z-index: 20;
|
|
721
|
+
}
|
|
719
722
|
.z-30 {
|
|
720
723
|
z-index: 30;
|
|
721
724
|
}
|
|
@@ -902,6 +905,9 @@
|
|
|
902
905
|
.mr-sd-4 {
|
|
903
906
|
margin-right: var(--spacing-sd-4);
|
|
904
907
|
}
|
|
908
|
+
.mr-sd-6 {
|
|
909
|
+
margin-right: var(--spacing-sd-6);
|
|
910
|
+
}
|
|
905
911
|
.mb-3 {
|
|
906
912
|
margin-bottom: calc(var(--spacing) * 3);
|
|
907
913
|
}
|
|
@@ -914,6 +920,9 @@
|
|
|
914
920
|
.mb-sd-8 {
|
|
915
921
|
margin-bottom: var(--spacing-sd-8);
|
|
916
922
|
}
|
|
923
|
+
.mb-sd-32 {
|
|
924
|
+
margin-bottom: var(--spacing-sd-32);
|
|
925
|
+
}
|
|
917
926
|
.-ml-px {
|
|
918
927
|
margin-left: -1px;
|
|
919
928
|
}
|
|
@@ -1740,6 +1749,9 @@
|
|
|
1740
1749
|
.grid-cols-\[repeat\(7\,var\(--cmp-datepicker-calendar-day-width\)\)\] {
|
|
1741
1750
|
grid-template-columns: repeat(7,var(--cmp-datepicker-calendar-day-width));
|
|
1742
1751
|
}
|
|
1752
|
+
.grid-cols-\[repeat\(auto-fill\,320px\)\] {
|
|
1753
|
+
grid-template-columns: repeat(auto-fill,320px);
|
|
1754
|
+
}
|
|
1743
1755
|
.grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\] {
|
|
1744
1756
|
grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
|
|
1745
1757
|
}
|
|
@@ -1803,9 +1815,6 @@
|
|
|
1803
1815
|
.\!gap-12 {
|
|
1804
1816
|
gap: calc(var(--spacing) * 12) !important;
|
|
1805
1817
|
}
|
|
1806
|
-
.gap-\(--cmp-calendarBoard-dayCard-grid-gap\) {
|
|
1807
|
-
gap: var(--cmp-calendarBoard-dayCard-grid-gap);
|
|
1808
|
-
}
|
|
1809
1818
|
.gap-\(--cmp-calendarBoard-dayEvent-body-gap\) {
|
|
1810
1819
|
gap: var(--cmp-calendarBoard-dayEvent-body-gap);
|
|
1811
1820
|
}
|
|
@@ -2165,6 +2174,9 @@
|
|
|
2165
2174
|
.gap-x-\[var\(--cmp-datepicker-calendar-legend-group-gap\)\] {
|
|
2166
2175
|
column-gap: var(--cmp-datepicker-calendar-legend-group-gap);
|
|
2167
2176
|
}
|
|
2177
|
+
.gap-x-sd-12 {
|
|
2178
|
+
column-gap: var(--spacing-sd-12);
|
|
2179
|
+
}
|
|
2168
2180
|
.gap-y-\[4px\] {
|
|
2169
2181
|
row-gap: 4px;
|
|
2170
2182
|
}
|
|
@@ -2272,6 +2284,9 @@
|
|
|
2272
2284
|
.rounded-\(--radius-8\) {
|
|
2273
2285
|
border-radius: var(--radius-8);
|
|
2274
2286
|
}
|
|
2287
|
+
.rounded-6 {
|
|
2288
|
+
border-radius: var(--radius-6);
|
|
2289
|
+
}
|
|
2275
2290
|
.rounded-8 {
|
|
2276
2291
|
border-radius: var(--radius-8);
|
|
2277
2292
|
}
|
|
@@ -2359,6 +2374,14 @@
|
|
|
2359
2374
|
.rounded-none {
|
|
2360
2375
|
border-radius: 0;
|
|
2361
2376
|
}
|
|
2377
|
+
.rounded-s-none {
|
|
2378
|
+
border-start-start-radius: 0;
|
|
2379
|
+
border-end-start-radius: 0;
|
|
2380
|
+
}
|
|
2381
|
+
.rounded-e-none {
|
|
2382
|
+
border-start-end-radius: 0;
|
|
2383
|
+
border-end-end-radius: 0;
|
|
2384
|
+
}
|
|
2362
2385
|
.rounded-t {
|
|
2363
2386
|
border-top-left-radius: 0.25rem;
|
|
2364
2387
|
border-top-right-radius: 0.25rem;
|
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.64",
|
|
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",
|