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.
Files changed (48) hide show
  1. package/AGENTS.md +510 -136
  2. package/dist/components/SBarChart/README.md +15 -0
  3. package/dist/components/SBarChart/SBarChart.d.ts +15 -1
  4. package/dist/components/SBarChart/index.d.ts +1 -1
  5. package/dist/components/SCallout/README.md +1 -0
  6. package/dist/components/SCallout/SCallout.d.ts +6 -1
  7. package/dist/components/SDonutChart/README.md +2 -4
  8. package/dist/components/SDonutChart/SDonutChart.d.ts +9 -10
  9. package/dist/components/SGhostButton/README.md +2 -0
  10. package/dist/components/SLineChart/README.md +15 -0
  11. package/dist/components/SLineChart/SLineChart.d.ts +15 -1
  12. package/dist/components/SLineChart/index.d.ts +1 -1
  13. package/dist/components/SLineChart/lineChart.config.d.ts +8 -5
  14. package/dist/components/SMeatballButton/README.md +67 -0
  15. package/dist/components/SMeatballButton/SMeatballButton.d.ts +36 -0
  16. package/dist/components/SMeatballButton/index.d.ts +1 -0
  17. package/dist/components/SPage/README.md +19 -0
  18. package/dist/components/SPage/SPage.d.ts +11 -2
  19. package/dist/components/SPage/index.d.ts +1 -1
  20. package/dist/components/SPage/page.config.d.ts +8 -0
  21. package/dist/components/SPieChart/README.md +1 -0
  22. package/dist/components/SPieChart/SPieChart.d.ts +6 -1
  23. package/dist/docs/RecipeGallery.d.ts +13 -0
  24. package/dist/index.cjs +338 -154
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +336 -154
  28. package/dist/index.js.map +1 -1
  29. package/dist/lib/chart/radial.d.ts +22 -11
  30. package/dist/lib/chart/tooltip.d.ts +18 -1
  31. package/dist/lib/dropdown-menu.d.ts +19 -0
  32. package/dist/llms-full.txt +628 -140
  33. package/dist/llms.txt +512 -138
  34. package/dist/recipes/AppShell.d.ts +21 -0
  35. package/dist/recipes/ExcelFilePopupPage.d.ts +5 -0
  36. package/dist/recipes/LoginPage.d.ts +6 -0
  37. package/dist/recipes/ProductCreatePage.d.ts +1 -0
  38. package/dist/recipes/ProductCreateSectionsPage.d.ts +5 -0
  39. package/dist/recipes/ProductDetailInlineEditPage.d.ts +9 -0
  40. package/dist/recipes/ProductDetailPage.d.ts +1 -0
  41. package/dist/recipes/ProductListChipFilterPage.d.ts +1 -0
  42. package/dist/recipes/ProductListPage.d.ts +1 -0
  43. package/dist/recipes/TransferOrderPopupPage.d.ts +2 -0
  44. package/dist/recipes/api.d.ts +91 -0
  45. package/dist/recipes/recipe-story.d.ts +33 -0
  46. package/dist/recipes/router.d.ts +9 -0
  47. package/dist/styles.css +21 -3
  48. package/package.json +3 -1
@@ -2,7 +2,7 @@
2
2
  * 원형 차트(파이·도넛)의 공용 구현 — 조각 계산과 그림.
3
3
  *
4
4
  * `SPieChart`·`SDonutChart` 는 이 위의 얇은 껍데기다. 두 차트는 가운데를 비우는지
5
- * (`innerRatio`)와 그 빈자리에 무엇을 적는지(`center`)만 다르다.
5
+ * (`innerRatio`)만 다르다. 도넛의 빈 가운데에는 글자를 두지 않는다.
6
6
  *
7
7
  * **시안이 없다.** 공용 차트 토큰(팔레트·범례·툴팁·바탕)은 그대로 쓰고, 원형 고유의
8
8
  * 치수만 아래 상수로 정했다. 디자인 토큰이 생기면 이 상수부터 토큰 참조로 바꾼다.
@@ -13,8 +13,11 @@
13
13
  */
14
14
  import { type CSSProperties, type ReactNode } from 'react';
15
15
  import type { SChartColor, SChartLegendPosition, SChartPalette } from './types';
16
- /** 도넛 안쪽 반지름 / 바깥 반지름. 너비에 따라 고리 두께가 함께 늘고 준다. */
17
- export declare const DONUT_INNER_RATIO = 0.6;
16
+ /**
17
+ * 도넛 안쪽 반지름 / 바깥 반지름. 너비에 따라 구멍과 고리 두께가 함께 늘고 준다.
18
+ * 폭이 반응형이라 구멍을 px 로 고정하지 않고 시안의 비율(바깥 지름 248 · 구멍 지름 99)로 둔다.
19
+ */
20
+ export declare const DONUT_INNER_RATIO = 0.4;
18
21
  /**
19
22
  * 비율 라벨을 적는 최소 몫. 이보다 좁은 조각은 글자가 조각 밖으로 넘쳐 이웃 조각의
20
23
  * 라벨과 겹치므로 적지 않는다 — 값은 툴팁으로 읽는다.
@@ -22,6 +25,16 @@ export declare const DONUT_INNER_RATIO = 0.6;
22
25
  export declare const LABEL_MIN_RATIO = 0.05;
23
26
  /** 파이의 비율 라벨이 놓이는 반지름(바깥 반지름에 대한 비). 가운데는 조각이 좁아 바깥쪽에 둔다. */
24
27
  export declare const PIE_LABEL_RADIUS_RATIO = 0.65;
28
+ /**
29
+ * 짚은 조각이 자라는 길이(px). 각도는 그대로 두고 **안팎 양쪽으로** 자라, 이웃 조각을 덮지
30
+ * 않고 고리만 두꺼워진다. 배율이 아니라 px 이라 차트가 커져도 자라는 양은 늘 같게 보인다.
31
+ *
32
+ * 시안(바깥 반지름 124)에서 짚은 조각은 128 · 46.08 이다 — 바깥으로 4px, 안쪽으로 3.52px.
33
+ * 안쪽도 같은 4px 로 두어 규칙을 하나로 했다(시안과 0.48px 차이).
34
+ */
35
+ export declare const HOVER_GROW = 4;
36
+ /** 짚은 조각의 모서리 둥글기(px). 자란 조각만 네 모서리를 둥글린다. */
37
+ export declare const HOVER_CORNER = 2;
25
38
  /** 조각 하나. */
26
39
  export interface RadialSlice {
27
40
  name: string;
@@ -46,12 +59,11 @@ export interface RadialChartProps {
46
59
  showTooltip?: boolean;
47
60
  formatValue?: (value: number) => string;
48
61
  onSliceClick?: (slice: RadialSlicePoint) => void;
62
+ tooltipFooter?: (slice: RadialSlicePoint) => ReactNode;
49
63
  className?: string;
50
64
  style?: CSSProperties;
51
65
  /** 가운데를 비우는 비율. 0 이면 파이다 */
52
66
  innerRatio: number;
53
- /** 가운데 빈자리에 놓을 내용. 합계를 받아 그린다 */
54
- renderCenter?: (total: number) => ReactNode;
55
67
  /** 스크린 리더가 읽는 그래프 종류 */
56
68
  kind: string;
57
69
  }
@@ -62,8 +74,12 @@ export declare function formatRatio(ratio: number): string;
62
74
  *
63
75
  * 한 바퀴 전체(조각이 하나)는 호 하나로 그릴 수 없다 — 시작점과 끝점이 같으면 SVG 가
64
76
  * 호를 그리지 않는다. 그래서 반원 둘로 나눠 그리고, 도넛은 `evenodd` 로 가운데를 뚫는다.
77
+ *
78
+ * `corner` 를 주면 네 모서리를 그 반지름으로 둥글린다. 모서리는 반지름 방향 변과 호에
79
+ * 동시에 닿는 원이라, 변은 접점까지 짧아지고 호는 접점까지 각도가 줄어든다. 한 바퀴
80
+ * 전체는 반지름 방향 변이 없어 둥글릴 모서리도 없다.
65
81
  */
66
- export declare function slicePath(center: number, outer: number, inner: number, start: number, end: number): string;
82
+ export declare function slicePath(center: number, outer: number, inner: number, start: number, end: number, corner?: number): string;
67
83
  /**
68
84
  * 파이·도넛 공용 그림.
69
85
  *
@@ -71,8 +87,3 @@ export declare function slicePath(center: number, outer: number, inner: number,
71
87
  * 원의 지름은 잰 폭이라 부모가 줄면 원도 함께 준다. 범례는 정사각형 바깥에 붙는다.
72
88
  */
73
89
  export declare const RadialChart: import("react").ForwardRefExoticComponent<RadialChartProps & import("react").RefAttributes<HTMLDivElement>>;
74
- /** 도넛 가운데 — 윗줄 라벨과 큰 값. */
75
- export declare function RadialCenter({ label, value }: {
76
- label?: ReactNode;
77
- value: ReactNode;
78
- }): import("react").JSX.Element;
@@ -1,3 +1,15 @@
1
+ /**
2
+ * 차트 툴팁 — 기준 막대 옆에 서는 값 상자.
3
+ *
4
+ * 커서를 따라다니지 않는다. 커서를 따라가면 상자가 막대를 가리는 자리로 계속 밀려들고,
5
+ * 같은 값을 읽는 동안에도 상자가 흔들려 눈이 따라가야 한다. 대신 호출 쪽이 정한
6
+ * **기준 막대**(`anchor`)에 붙여 한자리에 세운다.
7
+ *
8
+ * 차트 컨테이너 **안에** absolute 로 뜬다. Portal 을 쓰지 않는 이유: 차트는 카드·모달
9
+ * 안에 들어가는 일이 많은데, 상자가 차트 밖으로 나갈 만큼 크지 않아 굳이 부모를
10
+ * 벗어날 이유가 없다. 대신 부모가 `relative` 여야 한다.
11
+ */
12
+ import type { ReactNode } from 'react';
1
13
  export interface ChartTooltipItem {
2
14
  /** 계열 점 색 */
3
15
  color: string;
@@ -38,6 +50,11 @@ export interface ChartTooltipProps {
38
50
  };
39
51
  /** 기준 자리에서 띄우는 가로 거리. 기본값은 양쪽 다 4px */
40
52
  gapX?: ChartTooltipGapX;
53
+ /**
54
+ * 값 목록 아래에 붙이는 내용 — 차트의 `tooltipFooter` 가 짚은 항목을 받아 그린 것이다.
55
+ * 상자가 마우스를 통과시키므로 누를 수 있는 것은 넣지 못한다.
56
+ */
57
+ footer?: ReactNode;
41
58
  className?: string;
42
59
  }
43
- export declare function ChartTooltip({ title, items, anchor, bounds, gapX, className, }: ChartTooltipProps): import("react").JSX.Element;
60
+ export declare function ChartTooltip({ title, items, anchor, bounds, gapX, footer, className, }: ChartTooltipProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ import * as RDropdown from '@radix-ui/react-dropdown-menu';
3
+ import { type SIconName } from '../components/SIcon';
4
+ /**
5
+ * 버튼에 매달린 액션 메뉴(SDropdownButton · SMeatballButton)의 공용 층.
6
+ * 두 컴포넌트가 **같은 메뉴로 그려져야** 해서 한 곳에 둔다 — Root/Trigger 는 트리거 모양이
7
+ * 달라 각 컴포넌트가 갖고, 여기는 Portal + Content + Item 만 맡는다.
8
+ */
9
+ export interface DropdownMenuItem {
10
+ value: string | number;
11
+ label: string;
12
+ icon?: SIconName;
13
+ disabled?: boolean;
14
+ }
15
+ export interface DropdownMenuContentProps extends Omit<ComponentPropsWithoutRef<typeof RDropdown.Content>, 'children'> {
16
+ items: readonly DropdownMenuItem[];
17
+ onItemClick?: (value: string | number) => void;
18
+ }
19
+ export declare function DropdownMenuContent({ items, onItemClick, align, className, ...contentProps }: DropdownMenuContentProps): import("react").JSX.Element;