sellmate-design-system-react 9.0.0-beta.62 → 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.
@@ -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,5 @@
1
+ /**
2
+ * 표를 담은 팝업 — 본문이 아니라 표가 스크롤한다. 툴바·푸터는 늘 보인다.
3
+ * SPopup 의 본문은 이미 남은 높이를 잡고 있으므로, 본문 루트부터 표까지 세로 축을 잇는다 (§4-2 와 같은 사슬).
4
+ */
5
+ export default function ExcelFilePopupPage(): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 로그인 전이라 앱 셸이 없다 — AppShell 을 쓰지 않고 회색 바탕 위에 카드 하나만 선다.
3
+ * 카드는 화면을 잡지 않으므로 바깥 한 겹은 앱이 만든다. 그 한 겹이 하는 일은 셋뿐이다:
4
+ * 바탕·여백 / items-stretch 로 카드가 높이를 채우게 / justify-center 로 가로 가운데
5
+ */
6
+ export default function LoginPage(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function ProductCreatePage(): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 입력 항목이 많으면 유형별로 SSectionHeaderCard 로 나눈다 (§4-5).
3
+ * 한 페이지에 섹션 카드가 둘 이상이므로 marker 를 전부 켠다 — 켜거나 끄거나 전부 같게 간다.
4
+ */
5
+ export default function ProductCreateSectionsPage(): 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,2 @@
1
+ export declare function openTransferOrderPopup(orderId: string): void;
2
+ export default function TransferOrderPopupPage(): 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
@@ -902,6 +902,9 @@
902
902
  .mr-sd-4 {
903
903
  margin-right: var(--spacing-sd-4);
904
904
  }
905
+ .mr-sd-6 {
906
+ margin-right: var(--spacing-sd-6);
907
+ }
905
908
  .mb-3 {
906
909
  margin-bottom: calc(var(--spacing) * 3);
907
910
  }
@@ -914,6 +917,9 @@
914
917
  .mb-sd-8 {
915
918
  margin-bottom: var(--spacing-sd-8);
916
919
  }
920
+ .mb-sd-32 {
921
+ margin-bottom: var(--spacing-sd-32);
922
+ }
917
923
  .-ml-px {
918
924
  margin-left: -1px;
919
925
  }
@@ -1740,6 +1746,9 @@
1740
1746
  .grid-cols-\[repeat\(7\,var\(--cmp-datepicker-calendar-day-width\)\)\] {
1741
1747
  grid-template-columns: repeat(7,var(--cmp-datepicker-calendar-day-width));
1742
1748
  }
1749
+ .grid-cols-\[repeat\(auto-fill\,320px\)\] {
1750
+ grid-template-columns: repeat(auto-fill,320px);
1751
+ }
1743
1752
  .grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\] {
1744
1753
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
1745
1754
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sellmate-design-system-react",
3
- "version": "9.0.0-beta.62",
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",