sellmate-design-system-react 9.0.0-beta.63 → 9.0.0-beta.65
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 +31 -5
- package/dist/components/SBarChart/README.md +2 -0
- package/dist/components/SBarChart/SBarChart.d.ts +4 -0
- package/dist/components/SBarChart/barChart.config.d.ts +12 -5
- package/dist/components/SBarcodeInput/README.md +1 -0
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +8 -1
- 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/SChipInput/README.md +1 -0
- package/dist/components/SChipInput/SChipInput.d.ts +8 -1
- package/dist/components/SContextAlert/README.md +51 -0
- package/dist/components/SContextAlert/SContextAlert.d.ts +38 -0
- package/dist/components/SContextAlert/contextAlert.config.d.ts +29 -0
- package/dist/components/SContextAlert/index.d.ts +2 -0
- package/dist/components/SDatePicker/README.md +1 -0
- package/dist/components/SDatePicker/SDatePicker.d.ts +9 -2
- package/dist/components/SDateRangePicker/README.md +1 -0
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +9 -2
- package/dist/components/SDonutChart/README.md +2 -0
- package/dist/components/SDonutChart/SDonutChart.d.ts +4 -0
- package/dist/components/SEditor/README.md +1 -0
- package/dist/components/SEditor/SEditor.d.ts +8 -1
- package/dist/components/SField/README.md +7 -0
- package/dist/components/SField/SField.d.ts +13 -0
- package/dist/components/SField/index.d.ts +1 -1
- package/dist/components/SFilePicker/README.md +1 -0
- package/dist/components/SFilePicker/SFilePicker.d.ts +9 -2
- package/dist/components/SIcon/README.md +2 -0
- package/dist/components/SInput/README.md +1 -0
- package/dist/components/SInput/SInput.d.ts +3 -1
- package/dist/components/SLineChart/README.md +2 -0
- package/dist/components/SLineChart/SLineChart.d.ts +4 -0
- package/dist/components/SLineChart/lineChart.config.d.ts +42 -33
- package/dist/components/SNumberInput/README.md +1 -0
- package/dist/components/SNumberInput/SNumberInput.d.ts +8 -1
- package/dist/components/SPieChart/README.md +2 -0
- package/dist/components/SPieChart/SPieChart.d.ts +4 -0
- package/dist/components/SSelect/README.md +1 -0
- package/dist/components/SSelect/SSelect.d.ts +8 -1
- package/dist/components/STextarea/README.md +1 -0
- package/dist/components/STextarea/STextarea.d.ts +8 -1
- package/dist/components/STimePicker/README.md +1 -0
- package/dist/components/STimePicker/STimePicker.d.ts +9 -2
- package/dist/components/STimeRangePicker/README.md +1 -0
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +9 -2
- package/dist/index.cjs +525 -223
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +521 -224
- package/dist/index.js.map +1 -1
- package/dist/lib/chart/frame.d.ts +5 -1
- package/dist/lib/chart/palette.d.ts +12 -15
- package/dist/lib/chart/radial.d.ts +18 -10
- package/dist/llms-full.txt +120 -8
- package/dist/llms.txt +35 -8
- package/dist/styles.css +170 -18
- package/dist/theme.css +104 -6
- package/eslint/scale.gen.mjs +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `data` | `SDonutChartSlice[]` | — | 조각 목록. 주는 순서대로 12시에서 시계 방향으로 그린다 — 보통 큰 순으로 준다 |
|
|
12
|
+
| `title?` | `string` | — | 차트 제목 — 왼쪽 위에 놓인다 |
|
|
13
|
+
| `unit?` | `string` | — | 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 |
|
|
12
14
|
| `palette?` | `SDonutChartPalette` | `'multi'` | 색 팔레트. `custom` 일 때만 `colors` 를 본다 |
|
|
13
15
|
| `colors?` | `SDonutChartColor[]` | — | `palette='custom'` 에서 쓸 색 이름을 조각 순서대로. 조각보다 짧으면 앞에서부터 순환하고, 비어 있으면 `multi` 로 그린다 |
|
|
14
16
|
| `showValueLabel?` | `boolean` | `false` | 고리 위에 몫(%)을 적는다. 좁은 조각은 글자가 넘치므로 적지 않는다 |
|
|
@@ -32,6 +32,10 @@ export interface SDonutChartSlicePoint {
|
|
|
32
32
|
export interface SDonutChartProps {
|
|
33
33
|
/** 조각 목록. 주는 순서대로 12시에서 시계 방향으로 그린다 — 보통 큰 순으로 준다 */
|
|
34
34
|
data: SDonutChartSlice[];
|
|
35
|
+
/** 차트 제목 — 왼쪽 위에 놓인다 */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 */
|
|
38
|
+
unit?: string;
|
|
35
39
|
/** 색 팔레트. `custom` 일 때만 `colors` 를 본다 */
|
|
36
40
|
palette?: SDonutChartPalette;
|
|
37
41
|
/** `palette='custom'` 에서 쓸 색 이름을 조각 순서대로. 조각보다 짧으면 앞에서부터 순환하고, 비어 있으면 `multi` 로 그린다 */
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
| `editorClassName?` | `string` | — | 편집 영역 className |
|
|
70
70
|
| `editorStyle?` | `CSSProperties` | — | 편집 영역 style |
|
|
71
71
|
| `label?` | `string` | — | |
|
|
72
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
72
73
|
| `labelWidth?` | `number \| string` | — | |
|
|
73
74
|
| `icon?` | `SIconName` | — | 레이블 영역 아이콘 |
|
|
74
75
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -3,7 +3,7 @@ import type { Editor } from '@tiptap/core';
|
|
|
3
3
|
import { type SColor } from '../../lib/color';
|
|
4
4
|
import { type SFieldWidth } from '../../lib/field-width';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
|
-
import { type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
6
|
+
import { type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
7
7
|
import { type SIconName } from '../SIcon';
|
|
8
8
|
import { type STooltipProps } from '../STooltip';
|
|
9
9
|
/** ref 로 노출되는 조작 메서드 */
|
|
@@ -69,6 +69,13 @@ export interface SEditorProps {
|
|
|
69
69
|
/** 포커스 이탈 */
|
|
70
70
|
onBlur?: () => void;
|
|
71
71
|
label?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
74
|
+
*
|
|
75
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
76
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
77
|
+
*/
|
|
78
|
+
labelPosition?: SFieldLabelPosition;
|
|
72
79
|
labelWidth?: number | string;
|
|
73
80
|
/** 레이블 영역 아이콘 */
|
|
74
81
|
icon?: SIconName;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| `iconColor?` | `SColor` | — | 레이블 영역 아이콘 색상. 미지정 시 currentColor 상속 |
|
|
15
15
|
| `labelTooltip?` | `string` | `''` | 레이블 툴팁 텍스트 |
|
|
16
16
|
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | 레이블 툴팁 상세 옵션 (SdTooltipProps 대응) |
|
|
17
|
+
| `labelPosition?` | `SFieldLabelPosition` | `'left'` | 레이블을 컨트롤 **왼쪽**에 둘지 **위**에 둘지. 기본은 `left` — 이 서비스의 폼은 라벨 열을 세로로 맞춰 읽는다. 라벨이 길거나 컨트롤이 좁아 한 줄에 같이 세우기 어려울 때(모달 안의 폼, 한 줄짜리 칸) `top` 을 쓴다. **한 폼 안에서는 섞지 않는다** — 라벨 시작점이 행마다 어긋나 세로 정렬이 깨진다. `top` 이면 라벨과 컨트롤 사이 간격은 `--sys-space-field-vertical-gap` 이 정한다 (sm·md 구분 없이 고정). 라벨을 줄 세우는 장치인 `labelWidth`·`labelHeight` 는 위에 선 라벨에는 뜻이 없어 무시된다 — `addonLabel` 의 폭에는 그대로 적용된다. |
|
|
17
18
|
| `labelWidth?` | `number \| string` | — | 레이블/어드온 레이블 너비 (숫자=px). label·addonLabel 폭에 공통 적용 |
|
|
18
19
|
| `labelHeight?` | `number \| string` | — | 레이블 박스 높이 (숫자=px). 미지정 시 size별 기본값 사용. 컨트롤 박스가 기본 필드 높이보다 큰 경우(multiline 등) 첫 행에 세로 중앙 정렬을 맞추기 위해 컨트롤 박스 높이를 넘겨받는다. |
|
|
19
20
|
| `size?` | `SFieldSize` | `'sm'` | 필드 크기 |
|
|
@@ -52,6 +53,12 @@
|
|
|
52
53
|
|
|
53
54
|
## Types
|
|
54
55
|
|
|
56
|
+
### SFieldLabelPosition
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export type SFieldLabelPosition = 'left' | 'top';
|
|
60
|
+
```
|
|
61
|
+
|
|
55
62
|
### SFieldSize
|
|
56
63
|
|
|
57
64
|
```ts
|
|
@@ -7,6 +7,7 @@ import { type SFieldWidth } from '../../lib/field-width';
|
|
|
7
7
|
export type SFieldSize = 'sm' | 'md';
|
|
8
8
|
export type SFieldAddonAlign = 'start' | 'center' | 'end';
|
|
9
9
|
export type SFieldStatus = 'default' | 'pass' | 'error';
|
|
10
|
+
export type SFieldLabelPosition = 'left' | 'top';
|
|
10
11
|
/** ref로 노출되는 UX 메서드 (sd-field @Method sdFocus 대응) */
|
|
11
12
|
export interface SFieldHandle {
|
|
12
13
|
/** 내부 컨트롤에 포커스하고 필드를 화면에 스크롤합니다. */
|
|
@@ -25,6 +26,18 @@ export interface SFieldProps {
|
|
|
25
26
|
labelTooltip?: string;
|
|
26
27
|
/** 레이블 툴팁 상세 옵션 (SdTooltipProps 대응) */
|
|
27
28
|
labelTooltipProps?: Partial<STooltipProps>;
|
|
29
|
+
/**
|
|
30
|
+
* 레이블을 컨트롤 **왼쪽**에 둘지 **위**에 둘지.
|
|
31
|
+
*
|
|
32
|
+
* 기본은 `left` — 이 서비스의 폼은 라벨 열을 세로로 맞춰 읽는다. 라벨이 길거나 컨트롤이
|
|
33
|
+
* 좁아 한 줄에 같이 세우기 어려울 때(모달 안의 폼, 한 줄짜리 칸) `top` 을 쓴다.
|
|
34
|
+
* **한 폼 안에서는 섞지 않는다** — 라벨 시작점이 행마다 어긋나 세로 정렬이 깨진다.
|
|
35
|
+
*
|
|
36
|
+
* `top` 이면 라벨과 컨트롤 사이 간격은 `--sys-space-field-vertical-gap` 이 정한다
|
|
37
|
+
* (sm·md 구분 없이 고정). 라벨을 줄 세우는 장치인 `labelWidth`·`labelHeight` 는
|
|
38
|
+
* 위에 선 라벨에는 뜻이 없어 무시된다 — `addonLabel` 의 폭에는 그대로 적용된다.
|
|
39
|
+
*/
|
|
40
|
+
labelPosition?: SFieldLabelPosition;
|
|
28
41
|
/** 레이블/어드온 레이블 너비 (숫자=px). label·addonLabel 폭에 공통 적용 */
|
|
29
42
|
labelWidth?: number | string;
|
|
30
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SField, type SFieldHandle, type SFieldProps, type SFieldSize, type SFieldAddonAlign, type SFieldStatus, } from './SField';
|
|
1
|
+
export { SField, type SFieldHandle, type SFieldProps, type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition, } from './SField';
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| `status?` | `SFieldStatus` | — | |
|
|
26
26
|
| `size?` | `SFieldSize` | `'sm'` | |
|
|
27
27
|
| `label?` | `string` | — | |
|
|
28
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
28
29
|
| `labelWidth?` | `number \| string` | — | |
|
|
29
30
|
| `icon?` | `SIconName` | — | |
|
|
30
31
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -36,6 +36,13 @@ export interface SFilePickerProps {
|
|
|
36
36
|
status?: SFieldStatus;
|
|
37
37
|
size?: SFieldSize;
|
|
38
38
|
label?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
41
|
+
*
|
|
42
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
43
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
44
|
+
*/
|
|
45
|
+
labelPosition?: SFieldLabelPosition;
|
|
39
46
|
labelWidth?: number | string;
|
|
40
47
|
icon?: SIconName;
|
|
41
48
|
iconColor?: SColor;
|
|
@@ -56,4 +63,4 @@ export interface SFilePickerProps {
|
|
|
56
63
|
style?: CSSProperties;
|
|
57
64
|
}
|
|
58
65
|
/** SFilePicker — sd-file-picker 포팅. 단일/다중 파일 + 크기·개수 검증 + 칩 목록. */
|
|
59
|
-
export declare function SFilePicker({ value, onValueChange, onReject, placeholder, disabled, focused, hovered, inline, multiple, showMultipleListBox, accept, maxFileSize, maxTotalSize, maxFiles, name, rules, status, size, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, width, className, style, }: SFilePickerProps): import("react").JSX.Element;
|
|
66
|
+
export declare function SFilePicker({ value, onValueChange, onReject, placeholder, disabled, focused, hovered, inline, multiple, showMultipleListBox, accept, maxFileSize, maxTotalSize, maxFiles, name, rules, status, size, label, labelPosition, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, width, className, style, }: SFilePickerProps): import("react").JSX.Element;
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- [SChipFilter](../SChipFilter)
|
|
31
31
|
- [SChipInput](../SChipInput)
|
|
32
32
|
- [SConfirmModal](../SConfirmModal)
|
|
33
|
+
- [SContextAlert](../SContextAlert)
|
|
33
34
|
- [SDatePicker](../SDatePicker)
|
|
34
35
|
- [SDateRangePicker](../SDateRangePicker)
|
|
35
36
|
- [SDraggableItem](../SDraggableItem)
|
|
@@ -77,6 +78,7 @@ graph TD;
|
|
|
77
78
|
SChipFilter --> SIcon
|
|
78
79
|
SChipInput --> SIcon
|
|
79
80
|
SConfirmModal --> SIcon
|
|
81
|
+
SContextAlert --> SIcon
|
|
80
82
|
SDatePicker --> SIcon
|
|
81
83
|
SDateRangePicker --> SIcon
|
|
82
84
|
SDraggableItem --> SIcon
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
| `inputClassName?` | `string` | — | 내부 input 요소 className |
|
|
24
24
|
| `inputStyle?` | `CSSProperties` | — | 내부 input 요소 style |
|
|
25
25
|
| `label?` | `string` | — | |
|
|
26
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다) |
|
|
26
27
|
| `labelWidth?` | `number \| string` | — | |
|
|
27
28
|
| `labelTooltip?` | `string` | — | 레이블 툴팁 텍스트 |
|
|
28
29
|
| `labelTooltipProps?` | `Partial<STooltipProps>` | — | 레이블 툴팁 상세 옵션 |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputHTMLAttributes, type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -39,6 +39,8 @@ export interface SInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
39
39
|
/** 내부 input 요소 style */
|
|
40
40
|
inputStyle?: CSSProperties;
|
|
41
41
|
label?: string;
|
|
42
|
+
/** 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다) */
|
|
43
|
+
labelPosition?: SFieldLabelPosition;
|
|
42
44
|
labelWidth?: number | string;
|
|
43
45
|
/** 레이블 툴팁 텍스트 */
|
|
44
46
|
labelTooltip?: string;
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `categories` | `string[]` | — | 가로축에 놓일 항목 이름 |
|
|
12
12
|
| `series` | `SLineChartSeries[]` | — | 계열 목록. 각 `data` 는 `categories` 와 같은 순서다 |
|
|
13
|
+
| `title?` | `string` | — | 차트 제목 — 왼쪽 위에 놓인다 |
|
|
14
|
+
| `unit?` | `string` | — | 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 |
|
|
13
15
|
| `curve?` | `SLineChartCurve` | `'linear'` | 점을 잇는 방식. `smooth` 는 값을 넘어가 부풀지 않는 곡선이다 |
|
|
14
16
|
| `area?` | `boolean` | `false` | 선 아래를 계열 색으로 채운다. 크기의 변화를 함께 보여줄 때 쓴다 |
|
|
15
17
|
| `stacked?` | `boolean` | `false` | 계열을 겹쳐 그리는 대신 **아래 계열 위에 쌓는다**. 전체의 크기와 그 안의 구성을 함께 볼 때 쓴다 — 맨 위 선이 곧 합계다. 툴팁은 쌓기 전 각 계열의 값을 보여준다 |
|
|
@@ -46,6 +46,10 @@ export interface SLineChartProps {
|
|
|
46
46
|
categories: string[];
|
|
47
47
|
/** 계열 목록. 각 `data` 는 `categories` 와 같은 순서다 */
|
|
48
48
|
series: SLineChartSeries[];
|
|
49
|
+
/** 차트 제목 — 왼쪽 위에 놓인다 */
|
|
50
|
+
title?: string;
|
|
51
|
+
/** 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 */
|
|
52
|
+
unit?: string;
|
|
49
53
|
/** 점을 잇는 방식. `smooth` 는 값을 넘어가 부풀지 않는 곡선이다 */
|
|
50
54
|
curve?: SLineChartCurve;
|
|
51
55
|
/** 선 아래를 계열 색으로 채운다. 크기의 변화를 함께 보여줄 때 쓴다 */
|
|
@@ -1,41 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SLineChart 의 치수·색 상수와 선·영역 경로 계산.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 선·점 고유의 값은 `chart.line.*` 토큰이 정한다. 두 차트가 공유하는 것
|
|
5
|
+
* (눈금·격자·툴팁·범례·팔레트·값 라벨)은 새로 정하지 않고 바 차트와 `lib/chart` 에서
|
|
6
|
+
* 그대로 가져온다 — 같은 데이터를 막대에서 선으로 바꿨을 때 눈금이 어긋나면 두 차트를
|
|
7
|
+
* 견줄 수 없다. 단 항목 축 양끝 여백(`AXIS_EDGE_PADDING`)은 쓰지 않는다 — 선은
|
|
8
|
+
* 첫·마지막 점이 그림 양끝에 선다.
|
|
5
9
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* 2. 선 고유의 것(선 두께·점 지름 따위)만 여기서 정한다. 디자인 토큰이 생기면
|
|
11
|
-
* 이 파일의 상수부터 토큰 참조로 바꾼다.
|
|
10
|
+
* **점의 치수는 토큰을 `var()` 로 넘기지 못하고 숫자로 베껴 둔다.** 점 자리가 툴팁이
|
|
11
|
+
* 비켜설 거리·값 라벨의 높이·스크롤 컨테이너의 여유 폭을 정하는 데 쓰여, 그리기 전에
|
|
12
|
+
* JS 가 그 수를 알아야 하기 때문이다. 막대의 `BAR_RADIUS` 와 같은 규칙으로, 각 상수에
|
|
13
|
+
* 어느 토큰을 베꼈는지 적어 둔다. 색·불투명도처럼 그리기만 하는 것은 토큰을 직접 참조한다.
|
|
12
14
|
*
|
|
13
|
-
* **토큰 이름이 `bar` 로 시작하는 것을 그대로 쓰는 자리가 있다** —
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* **토큰 이름이 `bar` 로 시작하는 것을 그대로 쓰는 자리가 남아 있다** — 짚은 항목의
|
|
16
|
+
* 바탕(`--cmp-chart-barContainer-*`)이 그렇다. 이름만 막대 것이고 뜻은 "짚은 항목의
|
|
17
|
+
* 바탕" 이라, 선 차트에서 값을 따로 정하면 같은 자리가 차트마다 달라진다.
|
|
18
|
+
*
|
|
19
|
+
* 값 라벨의 색·타이포는 `chart.dataLabel.*` 로 막대 밖으로 나와 이제 공용 토큰이다.
|
|
20
|
+
*/
|
|
21
|
+
/** 선 두께 — 토큰 `chart.line.width`. SVG 표현 속성은 `var()` 를 못 풀어 `style` 로 넘긴다. */
|
|
22
|
+
export declare const LINE_WIDTH = "var(--cmp-chart-line-width)";
|
|
23
|
+
/**
|
|
24
|
+
* 선의 불투명도 — 토큰 `chart.line.opacity`.
|
|
25
|
+
*
|
|
26
|
+
* 선은 한 겹 물러나 있고 점이 앞에 선다. 차트 공용 기본값(`chart.opacity.default`)이
|
|
27
|
+
* "라인 제외" 라고 못박은 것도 이 때문이다 — 선만 다른 값을 쓴다. 짚었을 때도 그대로다:
|
|
28
|
+
* 선이 진해지면 굵기 탓에 짚지 않은 이웃 계열까지 덮는다.
|
|
17
29
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
export declare const LINE_OPACITY = "var(--cmp-chart-line-opacity)";
|
|
31
|
+
/** 점의 반지름(px) — 토큰 `chart.line.point.size.default`(지름 10)의 절반. */
|
|
32
|
+
export declare const POINT_RADIUS = 5;
|
|
33
|
+
/** 짚은 항목의 점 — 토큰 `chart.line.point.size.hover`(지름 12)의 절반. 색은 그대로고 커지기만 한다. */
|
|
34
|
+
export declare const POINT_HOVER_RADIUS = 6;
|
|
22
35
|
/**
|
|
23
|
-
* 짚은
|
|
36
|
+
* 짚은 점을 감싸는 바탕 원의 반지름(px) — 토큰 `chart.line.point.size.bg`(지름 24)의 절반.
|
|
24
37
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* 바탕색을 흰색이 아니라 `--cmp-chart-bg` 로 두는 이유는 "흰 원을 그린다" 가 아니라
|
|
28
|
-
* "차트 바탕만큼 비워 둔다" 이기 때문이다.
|
|
38
|
+
* 계열 색을 옅게 깐 원이다(`chart.line.point.opacity.bg`). 점 둘레를 비우는 것이 아니라
|
|
39
|
+
* **점보다 넓은 같은 색 자리**를 만들어, 계열이 여럿이어도 어느 선의 점을 짚었는지가 색으로 읽힌다.
|
|
29
40
|
*/
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const POINT_HOVER_INNER_RADIUS = 5;
|
|
33
|
-
export declare const POINT_HOVER_BG = "var(--cmp-chart-bg)";
|
|
41
|
+
export declare const POINT_HALO_RADIUS = 12;
|
|
42
|
+
export declare const POINT_HALO_OPACITY = "var(--cmp-chart-line-point-opacity-bg)";
|
|
34
43
|
/**
|
|
35
|
-
* 짚은 점이 실제로 차지하는 반지름 —
|
|
36
|
-
*
|
|
44
|
+
* 짚은 점이 실제로 차지하는 반지름 — 바탕 원까지다. 툴팁이 이만큼 비켜서고,
|
|
45
|
+
* 양끝 점이 잘리지 않게 스크롤 컨테이너도 이만큼 넓어진다.
|
|
37
46
|
*/
|
|
38
|
-
export declare const POINT_HOVER_EXTENT
|
|
47
|
+
export declare const POINT_HOVER_EXTENT = 12;
|
|
39
48
|
/**
|
|
40
49
|
* 항목 하나가 가져야 할 최소 폭(px).
|
|
41
50
|
*
|
|
@@ -44,8 +53,8 @@ export declare const POINT_HOVER_EXTENT: number;
|
|
|
44
53
|
* 겹치므로, 좁히는 대신 가로로 스크롤한다.
|
|
45
54
|
*/
|
|
46
55
|
export declare const BAND_MIN = 40;
|
|
47
|
-
/** 점과 값 라벨 사이 간격(px) — 막대
|
|
48
|
-
export declare const VALUE_LABEL_GAP =
|
|
56
|
+
/** 점과 값 라벨 사이 간격(px) — 토큰 `chart.line.point.gap`. 막대(6)와 달리 선은 4 다. */
|
|
57
|
+
export declare const VALUE_LABEL_GAP = 4;
|
|
49
58
|
/**
|
|
50
59
|
* 영역 채움의 불투명도 — 선 바로 아래가 가장 진하고 바닥으로 갈수록 옅어진다.
|
|
51
60
|
*
|
|
@@ -53,11 +62,11 @@ export declare const VALUE_LABEL_GAP = 6;
|
|
|
53
62
|
* 사라져, 계열이 여럿일 때 채움끼리 겹쳐 색이 탁해지는 것도 덜하다. 그래도 겹쳐 그리는
|
|
54
63
|
* 것 자체의 한계는 남으므로, 계열이 많으면 `area` 를 끄거나 `stacked` 로 쌓는다.
|
|
55
64
|
*
|
|
56
|
-
*
|
|
65
|
+
* 위·아래 값은 `chart.line.area.gradation.start|end` 가 정한다.
|
|
57
66
|
*/
|
|
58
|
-
export declare const AREA_OPACITY_TOP = "
|
|
59
|
-
export declare const AREA_OPACITY_BOTTOM = "var(--
|
|
60
|
-
export declare const LINE_DATA_LABEL_COLOR = "var(--cmp-chart-
|
|
67
|
+
export declare const AREA_OPACITY_TOP = "var(--cmp-chart-line-area-gradation-start)";
|
|
68
|
+
export declare const AREA_OPACITY_BOTTOM = "var(--cmp-chart-line-area-gradation-end)";
|
|
69
|
+
export declare const LINE_DATA_LABEL_COLOR = "var(--cmp-chart-dataLabel-color-default)";
|
|
61
70
|
/** 값 라벨의 타이포 — 짚은 항목만 굵고 크게 뜬다(막대 차트와 같은 규칙). */
|
|
62
71
|
export declare const LINE_DATA_LABEL_TYPO = "typo-body-sm-medium";
|
|
63
72
|
export declare const LINE_DATA_LABEL_TYPO_HOVER = "typo-body-md-bold";
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
| `focused?` | `boolean` | — | 포커스 상태를 밖에서 지정한다 — 강조 테두리·링이 즉시 걸린다 (SField 로 그대로 넘어간다) |
|
|
32
32
|
| `hovered?` | `boolean` | — | 호버 상태를 밖에서 지정한다 — 강조는 `focused` 와 같다 (SField 로 그대로 넘어간다) |
|
|
33
33
|
| `label?` | `string` | — | |
|
|
34
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
34
35
|
| `labelWidth?` | `number \| string` | — | |
|
|
35
36
|
| `icon?` | `SIconName` | — | |
|
|
36
37
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldSize, type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -72,6 +72,13 @@ export interface SNumberInputProps {
|
|
|
72
72
|
/** 호버 상태를 밖에서 지정한다 — 강조는 `focused` 와 같다 (SField 로 그대로 넘어간다) */
|
|
73
73
|
hovered?: boolean;
|
|
74
74
|
label?: string;
|
|
75
|
+
/**
|
|
76
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
77
|
+
*
|
|
78
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
79
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
80
|
+
*/
|
|
81
|
+
labelPosition?: SFieldLabelPosition;
|
|
75
82
|
labelWidth?: number | string;
|
|
76
83
|
icon?: SIconName;
|
|
77
84
|
iconColor?: SColor;
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
| Prop | Type | Default | Description |
|
|
10
10
|
|------|------|---------|-------------|
|
|
11
11
|
| `data` | `SPieChartSlice[]` | — | 조각 목록. 주는 순서대로 12시에서 시계 방향으로 그린다 — 보통 큰 순으로 준다 |
|
|
12
|
+
| `title?` | `string` | — | 차트 제목 — 왼쪽 위에 놓인다 |
|
|
13
|
+
| `unit?` | `string` | — | 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 |
|
|
12
14
|
| `palette?` | `SPieChartPalette` | `'multi'` | 색 팔레트. `custom` 일 때만 `colors` 를 본다 |
|
|
13
15
|
| `colors?` | `SPieChartColor[]` | — | `palette='custom'` 에서 쓸 색 이름을 조각 순서대로. 조각보다 짧으면 앞에서부터 순환하고, 비어 있으면 `multi` 로 그린다 |
|
|
14
16
|
| `showValueLabel?` | `boolean` | `false` | 조각 안에 몫(%)을 적는다. 좁은 조각은 글자가 넘치므로 적지 않는다 |
|
|
@@ -32,6 +32,10 @@ export interface SPieChartSlicePoint {
|
|
|
32
32
|
export interface SPieChartProps {
|
|
33
33
|
/** 조각 목록. 주는 순서대로 12시에서 시계 방향으로 그린다 — 보통 큰 순으로 준다 */
|
|
34
34
|
data: SPieChartSlice[];
|
|
35
|
+
/** 차트 제목 — 왼쪽 위에 놓인다 */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** 단위 — 오른쪽 위에 "단위 : " 를 붙여 놓는다 */
|
|
38
|
+
unit?: string;
|
|
35
39
|
/** 색 팔레트. `custom` 일 때만 `colors` 를 본다 */
|
|
36
40
|
palette?: SPieChartPalette;
|
|
37
41
|
/** `palette='custom'` 에서 쓸 색 이름을 조각 순서대로. 조각보다 짧으면 앞에서부터 순환하고, 비어 있으면 `multi` 로 그린다 */
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
| `serverSearch?` | `boolean` | `false` | 검색을 서버로 넘긴다 — 내부 필터링을 하지 않고 `options` 를 받은 그대로 보여준다. `onSearchChange` 로 온 검색어에 맞는 목록을 소비 앱이 다시 내려줘야 한다. 켜면 검색바가 옵션 수와 무관하게 항상 나온다 — 검색 결과가 줄었다고 검색바가 사라지면 검색어를 지울 수단이 없어지기 때문이다. |
|
|
33
33
|
| `searchDebounce?` | `number` | `DEFAULT_SEARCH_DEBOUNCE` | `serverSearch` 에서 검색어를 서버로 넘기기 전 기다리는 시간(ms) |
|
|
34
34
|
| `label?` | `string` | — | |
|
|
35
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
35
36
|
| `labelWidth?` | `number \| string` | — | |
|
|
36
37
|
| `icon?` | `SIconName` | — | 레이블 영역 아이콘 |
|
|
37
38
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
2
|
import { type Rule } from '../../lib/form';
|
|
3
|
-
import { type SFieldAddonAlign } from '../SField';
|
|
3
|
+
import { type SFieldAddonAlign, type SFieldLabelPosition } from '../SField';
|
|
4
4
|
import { type SIconName } from '../SIcon';
|
|
5
5
|
import { type SColor } from '../../lib/color';
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
@@ -108,6 +108,13 @@ export interface SSelectProps {
|
|
|
108
108
|
/** `serverSearch` 에서 검색어를 서버로 넘기기 전 기다리는 시간(ms) */
|
|
109
109
|
searchDebounce?: number;
|
|
110
110
|
label?: string;
|
|
111
|
+
/**
|
|
112
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
113
|
+
*
|
|
114
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
115
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
116
|
+
*/
|
|
117
|
+
labelPosition?: SFieldLabelPosition;
|
|
111
118
|
labelWidth?: number | string;
|
|
112
119
|
/** 레이블 영역 아이콘 */
|
|
113
120
|
icon?: SIconName;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
| `textareaClassName?` | `string` | — | 내부 textarea 요소 className |
|
|
21
21
|
| `textareaStyle?` | `CSSProperties` | — | 내부 textarea 요소 style |
|
|
22
22
|
| `label?` | `string` | — | |
|
|
23
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
23
24
|
| `labelWidth?` | `number \| string` | — | |
|
|
24
25
|
| `icon?` | `SIconName` | — | 레이블 영역 아이콘 |
|
|
25
26
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type TextareaHTMLAttributes, type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldAddonAlign, type SFieldSize, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldAddonAlign, type SFieldSize, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -50,6 +50,13 @@ export interface STextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextArea
|
|
|
50
50
|
/** 내부 textarea 요소 style */
|
|
51
51
|
textareaStyle?: CSSProperties;
|
|
52
52
|
label?: string;
|
|
53
|
+
/**
|
|
54
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
55
|
+
*
|
|
56
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
57
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
58
|
+
*/
|
|
59
|
+
labelPosition?: SFieldLabelPosition;
|
|
53
60
|
labelWidth?: number | string;
|
|
54
61
|
/** 레이블 영역 아이콘 */
|
|
55
62
|
icon?: SIconName;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
| `rules?` | `Rule[]` | — | |
|
|
23
23
|
| `status?` | `SFieldStatus` | — | |
|
|
24
24
|
| `label?` | `string` | — | |
|
|
25
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
25
26
|
| `labelWidth?` | `number \| string` | — | |
|
|
26
27
|
| `icon?` | `SIconName` | — | |
|
|
27
28
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -43,6 +43,13 @@ export interface STimePickerProps {
|
|
|
43
43
|
rules?: Rule[];
|
|
44
44
|
status?: SFieldStatus;
|
|
45
45
|
label?: string;
|
|
46
|
+
/**
|
|
47
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
48
|
+
*
|
|
49
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
50
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
51
|
+
*/
|
|
52
|
+
labelPosition?: SFieldLabelPosition;
|
|
46
53
|
labelWidth?: number | string;
|
|
47
54
|
icon?: SIconName;
|
|
48
55
|
iconColor?: SColor;
|
|
@@ -63,4 +70,4 @@ export declare function TimeSelector({ value, showMeridiem, minuteStep, onChange
|
|
|
63
70
|
onChange: (time: string) => void;
|
|
64
71
|
}): import("react").JSX.Element;
|
|
65
72
|
/** STimePicker — sd-time-picker 포팅. SField + Popover(TimeSelector). */
|
|
66
|
-
export declare function STimePicker({ value, onValueChange, onOpenChange, type, size, placeholder, disabled, clearable, showMeridiem, minuteStep, width, maxWidth, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: STimePickerProps): import("react").JSX.Element;
|
|
73
|
+
export declare function STimePicker({ value, onValueChange, onOpenChange, type, size, placeholder, disabled, clearable, showMeridiem, minuteStep, width, maxWidth, name, rules, status, label, labelPosition, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: STimePickerProps): import("react").JSX.Element;
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
| `rules?` | `Rule[]` | — | |
|
|
24
24
|
| `status?` | `SFieldStatus` | — | |
|
|
25
25
|
| `label?` | `string` | — | |
|
|
26
|
+
| `labelPosition?` | `SFieldLabelPosition` | — | 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다). |
|
|
26
27
|
| `labelWidth?` | `number \| string` | — | |
|
|
27
28
|
| `icon?` | `SIconName` | — | |
|
|
28
29
|
| `iconColor?` | `SColor` | — | |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties } from 'react';
|
|
2
|
-
import { type SFieldAddonAlign, type SFieldStatus } from '../SField';
|
|
2
|
+
import { type SFieldAddonAlign, type SFieldStatus, type SFieldLabelPosition } from '../SField';
|
|
3
3
|
import { type SIconName } from '../SIcon';
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
@@ -44,6 +44,13 @@ export interface STimeRangePickerProps {
|
|
|
44
44
|
rules?: Rule[];
|
|
45
45
|
status?: SFieldStatus;
|
|
46
46
|
label?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 레이블 위치 — `top` 이면 라벨이 컨트롤 위에 선다 (SField 로 그대로 넘어간다).
|
|
49
|
+
*
|
|
50
|
+
* @nodemo SField 에서 내려오는 공통 필드 옵션이다 — 같은 데모를 컨트롤마다 복제하지 않고
|
|
51
|
+
* 대표 컨트롤 `SInput` 과 `SField` 에 한 번 둔다 (scripts/check-docs-coverage.mjs 머리말).
|
|
52
|
+
*/
|
|
53
|
+
labelPosition?: SFieldLabelPosition;
|
|
47
54
|
labelWidth?: number | string;
|
|
48
55
|
icon?: SIconName;
|
|
49
56
|
iconColor?: SColor;
|
|
@@ -65,4 +72,4 @@ export declare function RangeTimeSelector({ value, showMeridiem, minuteStep, ran
|
|
|
65
72
|
onChange: (range: [string, string]) => void;
|
|
66
73
|
}): import("react").JSX.Element;
|
|
67
74
|
/** STimeRangePicker — sd-time-range-picker 포팅. SField + Popover(RangeTimeSelector). */
|
|
68
|
-
export declare function STimeRangePicker({ value, onValueChange, onOpenChange, type, size, placeholder, disabled, clearable, showMeridiem, minuteStep, rangeOrder, width, maxWidth, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: STimeRangePickerProps): import("react").JSX.Element;
|
|
75
|
+
export declare function STimeRangePicker({ value, onValueChange, onOpenChange, type, size, placeholder, disabled, clearable, showMeridiem, minuteStep, rangeOrder, width, maxWidth, name, rules, status, label, labelPosition, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: STimeRangePickerProps): import("react").JSX.Element;
|