sellmate-design-system-react 9.0.0-beta.4 โ 9.0.0-beta.41
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 +670 -95
- package/README.md +111 -9
- package/dist/components/SAccountListBox/AccountListBoxPortal.d.ts +31 -0
- package/dist/components/SAccountListBox/README.md +86 -0
- package/dist/components/SAccountListBox/SAccountListBox.d.ts +79 -0
- package/dist/components/SAccountListBox/SystemMenuPortal.d.ts +58 -0
- package/dist/components/SAccountListBox/accountListBox.config.d.ts +64 -0
- package/dist/components/SAccountListBox/index.d.ts +2 -0
- package/dist/components/SBadge/README.md +26 -0
- package/dist/components/SBadge/SBadge.d.ts +1 -1
- package/dist/components/SBarcodeInput/README.md +12 -4
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +10 -2
- package/dist/components/SButton/README.md +38 -0
- package/dist/components/SCalendar/README.md +13 -0
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +38 -0
- package/dist/components/SCalendarBoard/CalendarDayEventListBox.d.ts +26 -0
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +13 -0
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +12 -0
- package/dist/components/SCalendarBoard/README.md +137 -0
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +68 -0
- package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +33 -0
- package/dist/components/SCalendarBoard/index.d.ts +3 -0
- package/dist/components/SCalendarBoard/types.d.ts +31 -0
- package/dist/components/SCallout/README.md +16 -1
- package/dist/components/SCallout/SCallout.d.ts +9 -4
- package/dist/components/SCard/README.md +16 -0
- package/dist/components/SCard/SCard.d.ts +17 -2
- package/dist/components/SCheckbox/README.md +8 -0
- package/dist/components/SChipFilter/README.md +339 -14
- package/dist/components/SChipFilter/SChipFilter.d.ts +150 -60
- package/dist/components/SChipFilter/index.d.ts +1 -1
- package/dist/components/SChipInput/README.md +16 -2
- package/dist/components/SChipInput/SChipInput.d.ts +8 -2
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/README.md +8 -0
- package/dist/components/SConfirmModal/README.md +11 -3
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +16 -8
- package/dist/components/SDatePicker/README.md +20 -2
- package/dist/components/SDatePicker/SDatePicker.d.ts +27 -4
- package/dist/components/SDateRangePicker/README.md +19 -4
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +19 -6
- package/dist/components/SDivider/README.md +7 -0
- package/dist/components/SDivider/SDivider.d.ts +11 -0
- package/dist/components/SDraggableItem/README.md +37 -0
- package/dist/components/SDraggableItem/SDraggableItem.d.ts +2 -0
- package/dist/components/SDraggableItem/index.d.ts +1 -1
- package/dist/components/SDraggableList/README.md +30 -0
- package/dist/components/SDraggableList/SDraggableList.d.ts +11 -0
- package/dist/components/SDraggableList/index.d.ts +1 -1
- package/dist/components/SDrawer/README.md +8 -0
- package/dist/components/SDropdownButton/README.md +19 -0
- package/dist/components/SEditor/EditorBody.d.ts +36 -0
- package/dist/components/SEditor/EditorToolbar.d.ts +93 -0
- package/dist/components/SEditor/README.md +203 -0
- package/dist/components/SEditor/SEditor.d.ts +114 -0
- package/dist/components/SEditor/editor-icons.d.ts +63 -0
- package/dist/components/SEditor/editor.config.d.ts +119 -0
- package/dist/components/SEditor/index.d.ts +8 -0
- package/dist/components/SEditor/tiptap-api.d.ts +29 -0
- package/dist/components/SEditor/use-is-mobile.d.ts +14 -0
- package/dist/components/SExpansionItem/README.md +36 -0
- package/dist/components/SExpansionItem/index.d.ts +1 -1
- package/dist/components/SField/README.md +29 -5
- package/dist/components/SField/SField.d.ts +20 -8
- package/dist/components/SFilePicker/README.md +18 -4
- package/dist/components/SFilePicker/SFilePicker.d.ts +11 -5
- package/dist/components/SFooter/README.md +25 -0
- package/dist/components/SFooter/SFooter.d.ts +4 -3
- package/dist/components/SForm/README.md +12 -1
- package/dist/components/SForm/SForm.d.ts +2 -2
- package/dist/components/SGhostButton/README.md +22 -4
- package/dist/components/SGnb/README.md +57 -6
- package/dist/components/SGnb/SGnb.d.ts +58 -8
- package/dist/components/SGnb/gnb.config.d.ts +12 -5
- package/dist/components/SGnb/index.d.ts +1 -1
- package/dist/components/SGnbSystem/README.md +186 -0
- package/dist/components/SGnbSystem/SGnbSystem.d.ts +179 -0
- package/dist/components/SGnbSystem/gnbSystem.config.d.ts +122 -0
- package/dist/components/SGnbSystem/index.d.ts +2 -0
- package/dist/components/SGuide/README.md +15 -0
- package/dist/components/SIcon/README.md +10 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +4 -0
- package/dist/components/SImage/README.md +15 -1
- package/dist/components/SImage/SImage.d.ts +2 -2
- package/dist/components/SInput/README.md +6 -4
- package/dist/components/SInput/SInput.d.ts +10 -4
- package/dist/components/SKeyValueTable/README.md +86 -0
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +6 -2
- package/dist/components/SKeyValueTable/index.d.ts +1 -1
- package/dist/components/SLayout/README.md +22 -1
- package/dist/components/SLayout/SLayout.d.ts +6 -2
- package/dist/components/SLayout/index.d.ts +1 -1
- package/dist/components/SLinearProgress/README.md +15 -0
- package/dist/components/SLinearProgress/SLinearProgress.d.ts +3 -0
- package/dist/components/SLinearProgress/index.d.ts +1 -1
- package/dist/components/SList/README.md +15 -3
- package/dist/components/SList/SList.d.ts +7 -5
- package/dist/components/SList/index.d.ts +1 -1
- package/dist/components/SListItem/README.md +41 -0
- package/dist/components/SListItem/index.d.ts +1 -1
- package/dist/components/SLoadingContainer/loading.d.ts +18 -2
- package/dist/components/SLoadingModal/README.md +10 -2
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +4 -4
- package/dist/components/SLoadingModal/index.d.ts +1 -1
- package/dist/components/SModal/README.md +1 -1
- package/dist/components/SNumberInput/README.md +14 -6
- package/dist/components/SNumberInput/SNumberInput.d.ts +12 -4
- package/dist/components/SPage/README.md +87 -5
- package/dist/components/SPage/SPage.d.ts +29 -9
- package/dist/components/SPage/SPageHeader.d.ts +31 -13
- package/dist/components/SPage/index.d.ts +2 -2
- package/dist/components/SPage/page-column.d.ts +34 -0
- package/dist/components/SPage/page-width.d.ts +23 -0
- package/dist/components/SPage/page.config.d.ts +18 -0
- package/dist/components/SPopover/README.md +15 -0
- package/dist/components/SPopup/README.md +27 -2
- package/dist/components/SPopup/SPopup.d.ts +7 -3
- package/dist/components/SPopup/index.d.ts +1 -1
- package/dist/components/SPortal/README.md +18 -0
- package/dist/components/SRadio/README.md +20 -0
- package/dist/components/SRadioButton/README.md +18 -0
- package/dist/components/SRadioButton/SRadioButton.d.ts +1 -1
- package/dist/components/SRadioCard/README.md +78 -0
- package/dist/components/SRadioCard/SRadioCard.d.ts +29 -0
- package/dist/components/SRadioCard/SRadioCardGroup.d.ts +36 -0
- package/dist/components/SRadioCard/index.d.ts +2 -0
- package/dist/components/SScrollArea/README.md +27 -0
- package/dist/components/SSearchInput/README.md +63 -0
- package/dist/components/SSearchInput/SSearchInput.d.ts +52 -0
- package/dist/components/SSearchInput/index.d.ts +1 -0
- package/dist/components/SSectionHeaderCard/README.md +37 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +10 -0
- package/dist/components/SSelect/README.md +29 -11
- package/dist/components/SSelect/SSelect.d.ts +28 -8
- package/dist/components/SSplitter/README.md +17 -2
- package/dist/components/SSplitter/SSplitter.d.ts +7 -3
- package/dist/components/SStepper/README.md +26 -0
- package/dist/components/SSwitch/README.md +13 -1
- package/dist/components/SSwitch/SSwitch.d.ts +1 -3
- package/dist/components/SSystemActionButton/README.md +221 -0
- package/dist/components/SSystemActionButton/SSystemActionButton.d.ts +161 -0
- package/dist/components/SSystemActionButton/index.d.ts +2 -0
- package/dist/components/SSystemActionButton/systemActionButton.config.d.ts +93 -0
- package/dist/components/STable/README.md +94 -10
- package/dist/components/STable/STable.d.ts +130 -22
- package/dist/components/STable/index.d.ts +1 -1
- package/dist/components/STabs/README.md +13 -2
- package/dist/components/STabs/STabs.d.ts +3 -5
- package/dist/components/STabs/index.d.ts +1 -1
- package/dist/components/STabs/tabs.config.d.ts +3 -4
- package/dist/components/STag/README.md +52 -0
- package/dist/components/STag/STag.d.ts +3 -1
- package/dist/components/STextLink/README.md +19 -1
- package/dist/components/STextLink/STextLink.d.ts +5 -1
- package/dist/components/STextarea/README.md +4 -4
- package/dist/components/STextarea/STextarea.d.ts +10 -4
- package/dist/components/STimePicker/README.md +16 -2
- package/dist/components/STimePicker/STimePicker.d.ts +11 -5
- package/dist/components/STimePicker/timepicker.config.d.ts +4 -2
- package/dist/components/STimeRangePicker/README.md +28 -2
- package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +11 -5
- package/dist/components/SToast/README.md +25 -1
- package/dist/components/SToast/SToast.d.ts +2 -2
- package/dist/components/SToggle/README.md +8 -0
- package/dist/components/SToggle/index.d.ts +1 -1
- package/dist/components/STooltip/README.md +25 -1
- package/dist/components/STooltip/STooltip.d.ts +1 -1
- package/dist/components/STree/README.md +44 -3
- package/dist/components/STree/STree.d.ts +24 -4
- package/dist/components/STree/index.d.ts +1 -1
- package/dist/docs/Gallery.d.ts +9 -0
- package/dist/docs/gallery-previews.d.ts +24 -0
- package/dist/index.cjs +10890 -5322
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +10852 -5322
- package/dist/index.js.map +1 -1
- package/dist/lib/doc-sections.d.ts +35 -0
- package/dist/lib/field-width.d.ts +31 -0
- package/dist/lib/floating-height.d.ts +15 -0
- package/dist/lib/story-docs.d.ts +19 -3
- package/dist/lib/truncated-value-tooltip.d.ts +18 -0
- package/dist/llms-full.txt +3396 -297
- package/dist/llms.txt +675 -97
- package/dist/playground/categories.d.ts +19 -0
- package/dist/styles.css +1731 -166
- package/dist/theme.css +216 -24
- package/eslint/index.mjs +14 -0
- package/eslint/lib/table-column.mjs +26 -0
- package/eslint/rules/divider-vertical-height.mjs +137 -0
- package/eslint/rules/field-width-grade.d.mts +41 -0
- package/eslint/rules/field-width-grade.mjs +311 -0
- package/eslint/rules/table-column-width.mjs +110 -0
- package/eslint/scale.gen.mjs +5 -2
- package/package.json +13 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import { type SDateRangeValue } from '../SDateRangePicker';
|
|
3
|
-
|
|
3
|
+
/** ํํฐ๊ฐ ๊ฐ์ ๋ฐ๋ ๋ฐฉ์. ๊ฐ ๊ฐ์ ๋์ํ๋ ํ๋ ์ธํฐํ์ด์ค๊ฐ ๋ฐ๋ก ์๋ค โ
|
|
4
|
+
* SChipFilterSelectFieldยทSChipFilterSelectMultiFieldยทSChipFilterKeywordFieldยท
|
|
5
|
+
* SChipFilterDatePickerDayFieldยทSChipFilterDatePickerRangeFieldยท
|
|
6
|
+
* SChipFilterDatePickerStatisticsFieldยทSChipFilterCustomField */
|
|
7
|
+
export type SChipFilterType = SChipFilterField['type'];
|
|
4
8
|
export type SChipFilterOptionValue = string | number;
|
|
5
9
|
export type SChipFilterMatchMode = 'contains' | 'exact' | 'excludes';
|
|
6
10
|
export type SChipFilterPeriodUnit = 'day' | 'month' | 'quarter' | 'half' | 'year' | 'custom';
|
|
@@ -9,7 +13,7 @@ export interface SChipFilterOption {
|
|
|
9
13
|
label: string;
|
|
10
14
|
disabled?: boolean;
|
|
11
15
|
}
|
|
12
|
-
/**
|
|
16
|
+
/** datepicker-rangeยทdatepicker-statistics ํ๋์ ํ๋ฆฌ์
๋ผ๋์ค ํญ๋ชฉ (์ค๋/์ง๋ 7์ผ/์ผ๋ณ/์๋ณ/์ฌ์ฉ์ ์ง์ ๋ฑ) */
|
|
13
17
|
export interface SChipFilterDatePreset {
|
|
14
18
|
/** ํ๋ฆฌ์
์๋ณ์ */
|
|
15
19
|
value: string;
|
|
@@ -17,7 +21,8 @@ export interface SChipFilterDatePreset {
|
|
|
17
21
|
label: string;
|
|
18
22
|
/** true๋ฉด "์ฌ์ฉ์ ์ง์ " โ ์ ํ ์ ๋ ์ง/๊ธฐ๊ฐ ํผ์ปค๊ฐ ์ถ๊ฐ๋ก ๋
ธ์ถ๋๋ค. resolve๋ ๋ฌด์๋๋ค. */
|
|
19
23
|
custom?: boolean;
|
|
20
|
-
/** custom์ด ์๋ ๋ ์ค์ ๊ฐ์ ๊ณ์ฐํ๋ค. ๋จ์ผ ๋ ์ง(string) ๋๋ ๊ธฐ๊ฐ([start,end]) ๋ชจ๋ ๊ฐ๋ฅ
|
|
24
|
+
/** custom์ด ์๋ ๋ ์ค์ ๊ฐ์ ๊ณ์ฐํ๋ค. ๋จ์ผ ๋ ์ง(string) ๋๋ ๊ธฐ๊ฐ([start,end]) ๋ชจ๋ ๊ฐ๋ฅ โ
|
|
25
|
+
* datepicker-range ์์๋ 'd' ๋ฅผ ๊ทธ ํ๋ฃจ์ง๋ฆฌ ๊ธฐ๊ฐ ['d', 'd'] ์ ๊ฐ์ ๊ฐ์ผ๋ก ๋ณธ๋ค */
|
|
21
26
|
resolve?: () => string | SDateRangeValue;
|
|
22
27
|
}
|
|
23
28
|
/** keyword ํ๋์์ matchModes ํ์ฑ ์ ์ฌ์ฉํ๋ ๊ฐ ํํ โ ์
๋ ฅํด ์ถ๊ฐํ ํค์๋ ๋ชฉ๋ก */
|
|
@@ -25,7 +30,7 @@ export interface SChipFilterKeywordValue {
|
|
|
25
30
|
keywords: string[];
|
|
26
31
|
mode: SChipFilterMatchMode;
|
|
27
32
|
}
|
|
28
|
-
/**
|
|
33
|
+
/** datepicker-statistics ํ๋ ๊ฐ โ ์ ํ ๋จ์(unit)์ ๊ทธ ๋จ์์ ์
๋ ฅ๊ฐ(value)์ ํจ๊ป ๋ณด๊ดํ๋ค */
|
|
29
34
|
export interface SChipFilterPeriodValue {
|
|
30
35
|
unit: SChipFilterPeriodUnit;
|
|
31
36
|
value?: string | number | SDateRangeValue | null;
|
|
@@ -34,58 +39,136 @@ export interface SChipFilterPeriodValue {
|
|
|
34
39
|
export type SChipFilterCustomValue = Record<string, unknown>;
|
|
35
40
|
export type SChipFilterValue = SChipFilterOptionValue | SChipFilterOptionValue[] | SDateRangeValue | SChipFilterKeywordValue | SChipFilterPeriodValue | SChipFilterCustomValue | null | undefined;
|
|
36
41
|
export type SChipFilterValueMap = Record<string, SChipFilterValue>;
|
|
37
|
-
|
|
42
|
+
/** ํ์
๊ณผ ๋ฌด๊ดํ๊ฒ ๋ชจ๋ ํํฐ๊ฐ ๊ฐ๋ ์์ฑ */
|
|
43
|
+
export interface SChipFilterFieldBase {
|
|
38
44
|
/** ํํฐ ์๋ณ์ */
|
|
39
45
|
key: string;
|
|
40
46
|
/** ์นฉ์ ํ์ํ ๋ ์ด๋ธ */
|
|
41
47
|
label: string;
|
|
42
|
-
/** ํํฐ ํ์
*/
|
|
43
|
-
type: SChipFilterType;
|
|
44
|
-
/** single/multi/keyword ํ๋ณด ๋ชฉ๋ก */
|
|
45
|
-
options?: SChipFilterOption[];
|
|
46
48
|
/** ํ์ ํํฐ ํ์. true๋ฉด ๊ฐ์ด ๋น์ด ์์ ๋ ๊ธฐ๋ณธ๊ฐ(defaultValue ๋๋ ํ์
๋ณ ๋ด์ฅ ๊ธฐ๋ณธ๊ฐ)์ด
|
|
47
|
-
* ์๋์ผ๋ก ์ฑ์์ง๊ณ , clearable์ ํ์ฌ ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ๊ณผ ๊ฐ์ ๋ ์จ๊ฒจ์ง๋ฉฐ ํด๋ฆญ ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก
|
|
49
|
+
* ์๋์ผ๋ก ์ฑ์์ง๊ณ , clearable์ ํ์ฌ ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ๊ณผ ๊ฐ์ ๋ ์จ๊ฒจ์ง๋ฉฐ ํด๋ฆญ ์ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ๋๋์๊ฐ๋ค.
|
|
50
|
+
* ๊ฐ์ด ์ฑ์์ก๋ค๊ฐ ๋ค์ ๋น๋ฉด(์: value๋ฅผ ์ ์ดํ๋ ๋ถ๋ชจ๊ฐ onReset์์ ์๊ธฐ ์ํ๋ฅผ ๋น์ฐ๋ ๊ฒฝ์ฐ)
|
|
51
|
+
* ๊ธฐ๋ณธ๊ฐ์ด ํ ๋ฒ ๋ ์ฑ์์ง๋ค โ required ํ๋๊ฐ ๋น ์ฑ๋ก ๋จ์ผ๋ฉด onSearch๊ฐ ๋งํ๊ธฐ ๋๋ฌธ์ด๋ค.
|
|
52
|
+
* ๋จ ๊ทธ ๊ฐ์ ๋ถ๋ชจ๊ฐ value๋ก ๋ฐ์ ์ฃผ์ง ์์ผ๋ฉด ๋ฐ๋ณตํด์ ์ฑ์ฐ์ง๋ ์๋๋ค */
|
|
48
53
|
required?: boolean;
|
|
49
|
-
/** ๊ณ ์ ํํฐ. true๋ฉด
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
+
/** ๊ณ ์ ํํฐ. true๋ฉด ํญ์ ๋
ธ์ถ๋๊ณ "ํํฐ ์ถ๊ฐ" ๋ชฉ๋ก์๋ ๋ํ๋์ง ์์ผ๋ฉฐ ์นฉ์ ์ ๊ฑฐํ ์ ์๋ค.
|
|
55
|
+
* required๋ ๊ฐ์ ํจ๊ณผ๋ฅผ ๋ธ๋ค. ๋๋จธ์ง ํ๋๋ "ํํฐ ์ถ๊ฐ"์์ ๊ณจ๋๊ฑฐ๋ value์ ๊ฐ์ด ๋ค์ด
|
|
56
|
+
* ์๋ ๋์ ๋
ธ์ถ๋๋ค โ ๊ฐ์ผ๋ก ๋ ์๋ ์นฉ์ ๊ฐ์ด ๋น๋ฉด ํจ๊ป ๋น ์ง๊ณ , "ํํฐ ์ถ๊ฐ"๋ก ๊บผ๋ธ ์นฉ์
|
|
57
|
+
* ๊ฐ์ด ์์ด๋ ์ธ์
๋์ ์๋ฆฌ๋ฅผ ์งํจ๋ค */
|
|
58
|
+
fixed?: boolean;
|
|
59
|
+
/** ์ด๊ธฐ๊ฐ ๋ฐ clearable ํด๋ฆญ ์ ๋๋์๊ฐ ๊ฐ.
|
|
60
|
+
*
|
|
61
|
+
* **`fixed` ๋๋ `required` ํ๋์์๋ง ์ด๋ค.** ๊ทธ ์ธ ํ๋์ ์ง์ ํ๋ฉด ๋ฌด์ํ๊ณ ์ฝ์์ ์๋ฆฐ๋ค โ
|
|
62
|
+
* ๋บ ์ ์๋ ํํฐ๋ ์ฒ์์ ๋ฐ์ ์๋๋ฐ, ๊ฐ ๋งต์๋ ๊ธฐ๋ณธ๊ฐ์ด ์ฑ์์ ธ **๋ณด์ด์ง๋ ์ง์ธ ์๋ ์๋
|
|
63
|
+
* ์กฐ๊ฑด์ด ๊ฒ์์ ๊ฑธ๋ฆฐ๋ค.** ์นฉ์ ์ง์ ๊ฐ์ ๋น์๋ "๊ฒ์ ์ด๊ธฐํ"๊ฐ ๊ทธ ๊ฐ์ ๋๋๋ ค ๋์ ํํฐ๊ฐ
|
|
64
|
+
* ์กฐ์ฉํ ๋์ด์๋๋ค. ์ฒ์๋ถํฐ ๊ฐ์ด ์ ํด์ ธ ์์ด์ผ ํ๋ ํํฐ๋ผ๋ฉด ๊ทธ๊ฒ์ด `fixed`ยท`required` ๋ค.
|
|
65
|
+
*
|
|
66
|
+
* required์ธ๋ฐ ์ง์ ํ์ง ์์ผ๋ฉด ํ์
๋ณ ๋ด์ฅ ๊ธฐ๋ณธ๊ฐ(select: ์ฒซ ๋ฒ์งธ ์ต์
,
|
|
67
|
+
* datepicker-dayยทdatepicker-range: ์ค๋ ๋ ์ง)์ ๋์ ์ด๋ค. `fixed`ยท`required` ์ธ
|
|
68
|
+
* selectยทselect-multi ๋ ํ๋ณด๊ฐ ํ๋๋ฟ์ผ ๋ ๊ทธ ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ์ด ๋๋ค(options ์ฐธ๊ณ ) โ
|
|
69
|
+
* defaultValue ๋ฅผ ํจ๊ป ์ฃผ๋ฉด ๊ทธ์ชฝ์ด ์ด๊ธด๋ค. ์ธ๋ผ์ธ(radioButton) datepicker-range
|
|
70
|
+
* ํ๋๋ ํ์ค๋ฒ ์์ด ๋ฐ์ ๋ฐ๋ก ๋
ธ์ถ๋์ด ๋น ์ํ๋ก ๋ ์ ์์ผ๋ฏ๋ก, ์ด ๊ท์น๊ณผ ๋ฌด๊ดํ๊ฒ ์ธ์ ๋
|
|
71
|
+
* ์ค๋์ด ์ฑ์์ง๋ค */
|
|
54
72
|
defaultValue?: SChipFilterValue;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
/** ๋นํ์ฑ ์ํ */
|
|
73
|
+
/** ์ด ํํฐ๋ง ๋นํ์ฑ. ๋ฐ์ ๋จ์ ์๋ ํ์ค๋ฒ๊ฐ ์ด๋ฆฌ์ง ์๊ณ clearable๋ ๋๋ฆฌ์ง ์๋๋ค.
|
|
74
|
+
* ๋ฐ ์ ์ฒด๋ฅผ ์ ๊ทธ๋ ค๋ฉด SChipFilterProps.disabled๋ฅผ ์ด๋ค โ ๋์ OR๋ก ํฉ์ณ์ง๋ค */
|
|
58
75
|
disabled?: boolean;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
76
|
+
}
|
|
77
|
+
/** ํ๋ณด ๋ชฉ๋ก์์ ๊ณ ๋ฅด๋ ํํฐ โ selectยทselect-multiยทkeyword */
|
|
78
|
+
export interface SChipFilterOptionsField extends SChipFilterFieldBase {
|
|
79
|
+
/** ๊ณ ๋ฅผ ์ ์๋ ํ๋ณด ๋ชฉ๋ก.
|
|
80
|
+
*
|
|
81
|
+
* **`fixed`ยท`required` ์ธ selectยทselect-multi ์์ ๊ณ ๋ฅผ ์ ์๋ ํ๋ณด๊ฐ ํ๋๋ฟ์ด๋ฉด ๊ทธ ๊ฐ์ด
|
|
82
|
+
* ์๋์ผ๋ก ์ ํ๋๋ค** โ ์ฌ์ฉ์๊ฐ ๊ณ ๋ฅด์ง ์์๋ `onValueChange` ๋ก ๊ฐ์ด ์ฌ๋ผ์จ๋ค
|
|
83
|
+
* (select ๋ ๊ทธ ๊ฐ, select-multi ๋ ๊ทธ ๊ฐ ํ๋์ง๋ฆฌ ๋ฐฐ์ด). ์ต์
์ด API ์๋ต์ด๋ผ ๋ฆ๊ฒ ๋์ฐฉํด๋
|
|
84
|
+
* ๋์ฐฉํ ์์ ์ ์ฑ์์ง๋ค. ์ฌ์ฉ์๊ฐ ๊ทธ ๊ฐ์ ์ง์ฐ๋ฉด ๋ค์ ์ฑ์ฐ์ง ์๋๋ค โ
|
|
85
|
+
* ๋ค๋ง "๊ฒ์ ์ด๊ธฐํ"๋ ๋๋๋ ค ๋๋๋ค(๋ค๋ฅธ ๊ธฐ๋ณธ๊ฐ๊ณผ ๊ฐ์ ๊ท์น).
|
|
86
|
+
* ํ๋ณด๊ฐ ํ๋์ธ๋ฐ ๋นํ์ฑ(`disabled`)์ด๋ฉด ๊ณ ๋ฅผ ์ ์๋ ๊ฐ์ด๋ฏ๋ก ์ฑ์ฐ์ง ์๋๋ค.
|
|
87
|
+
*
|
|
88
|
+
* ๋บ ์ ์๋ ํํฐ(= `fixed`ยท`required` ๊ฐ ์๋ ํ๋)๋ ํ๋ณด๊ฐ ํ๋์ฌ๋ ์ฑ์ฐ์ง ์๋๋ค โ
|
|
89
|
+
* ์ฒ์์ ๋ฐ์ ์๋ ํํฐ๋ผ ๋ณด์ด์ง๋ ์ง์ธ ์๋ ์๋ ์กฐ๊ฑด์ด ๊ฒ์์ ๊ฑธ๋ฆฌ๊ธฐ ๋๋ฌธ์ด๋ค.
|
|
90
|
+
* ํ๋ณด๊ฐ ํ๋๋ฟ์ธ ํํฐ๋ฅผ ๋ฐ๋์ ๊ฑธ์ด์ผ ํ๋ค๋ฉด `fixed` ๋ `required` ๋ก ์ค๋ค */
|
|
91
|
+
options?: SChipFilterOption[];
|
|
92
|
+
}
|
|
93
|
+
/** ํ๋ฆฌ์
์ผ๋ก ๊ธฐ๊ฐ์ ๊ณ ๋ฅด๋ ํํฐ โ datepicker-rangeยทdatepicker-statistics */
|
|
94
|
+
export interface SChipFilterPresetsField extends SChipFilterFieldBase {
|
|
95
|
+
/** ํ๋ฆฌ์
๋ผ๋์ค ๋ชฉ๋ก. ์ง์ ํ์ง ์์ผ๋ฉด ํ์
๋ณ ๊ธฐ๋ณธ ๋ชฉ๋ก์ ์ด๋ค โ
|
|
96
|
+
* datepicker-range: ์ค๋ยท์ง๋ 7์ผยท์ง๋ 30์ผยท์ฌ์ฉ์ ์ง์ ,
|
|
97
|
+
* datepicker-statistics: ์ผ๋ณยท์๋ณยท๋ถ๊ธฐ๋ณยท๋ฐ๊ธฐ๋ณยท์ฐ๋๋ณยท์ฌ์ฉ์ ์ง์ .
|
|
98
|
+
* ํ๋ฆฌ์
๋ผ๋์ค ์์ด ์บ๋ฆฐ๋(datepicker-range) ํ๋๋ง ๋๋ ค๋ฉด presets: [] ๋ฅผ ๋ช
์ํ๋ค */
|
|
99
|
+
presets?: SChipFilterDatePreset[];
|
|
100
|
+
/** ์ ํ ๊ฐ๋ฅ ๋ฒ์ */
|
|
101
|
+
selectable?: [string, string];
|
|
102
|
+
/** "์ฌ์ฉ์ ์ง์ " ํ๋ฆฌ์
์ผ๋ก ๊ธฐ๊ฐ์ ๊ณ ๋ฅผ ๋์ ์ต๋ ์ ํ ์ผ์.
|
|
103
|
+
* ์ง์ ํ์ง ์์๋ presets์ custom ํ๋ฆฌ์
์ด ์์ผ๋ฉด ๊ธฐ๋ณธ 90์ผ์ด ์ ์ฉ๋๋ค โ ๋ฌด์ ํ ๊ธฐ๊ฐ
|
|
104
|
+
* ์ง๊ณยท์กฐํ๋ก ๋ฐฑ์๋์ ๊ณผ๋ํ ์์ฒญ์ด ๊ฐ๋ ๊ฒ์ ๋ง๊ธฐ ์ํ ์์ ์ฅ์น. ๋ค๋ฅธ ์ํ์ด ํ์ํ๋ฉด
|
|
105
|
+
* ์ด ๊ฐ์ ์ง์ ์ง์ ํ๋ค */
|
|
106
|
+
maxRange?: number;
|
|
107
|
+
}
|
|
108
|
+
/** ํ๋ณด ํ๋๋ฅผ ๊ณ ๋ฅธ๋ค */
|
|
109
|
+
export interface SChipFilterSelectField extends SChipFilterOptionsField {
|
|
110
|
+
type: 'select';
|
|
111
|
+
}
|
|
112
|
+
/** ํ๋ณด ์ฌ๋ฟ์ ๊ณ ๋ฅธ๋ค */
|
|
113
|
+
export interface SChipFilterSelectMultiField extends SChipFilterOptionsField {
|
|
114
|
+
type: 'select-multi';
|
|
115
|
+
}
|
|
116
|
+
/** keyword ํ๋์ ์
๋ ฅ ๋ฐฉ์ โ ๋ฌด์์ ํค์๋ ํ๋์ ๋์ผ๋ก ๋ณผ์ง */
|
|
117
|
+
export type SChipFilterKeywordInput = 'tag' | 'csv';
|
|
118
|
+
/** ํค์๋๋ฅผ ์
๋ ฅํด ๋์ ํ๋ค. options๋ ์
๋ ฅ ์ค ํ๋ณด๋ก๋ง ๋ฌ๋ค */
|
|
119
|
+
export interface SChipFilterKeywordField extends SChipFilterOptionsField {
|
|
120
|
+
type: 'keyword';
|
|
121
|
+
/** ์
๋ ฅ placeholder */
|
|
64
122
|
placeholder?: string;
|
|
65
|
-
/**
|
|
123
|
+
/** ์
๋ ฅ ๋ฐฉ์. ๊ธฐ๋ณธ 'tag' โ Enter ๋ก ํ๋์ฉ ์ถ๊ฐํ๋ค.
|
|
124
|
+
* 'csv' ๋ ์ผํ๋ ๊ตฌ๋ถ์๋ก ์ธ์ ํด, ์ผํ๋ฅผ ์น๊ฑฐ๋ ์ผํ๊ฐ ์์ธ ํ
์คํธ๋ฅผ ๋ถ์ฌ๋ฃ์ผ๋ฉด ๊ทธ ์๋ฆฌ์์
|
|
125
|
+
* ์ฌ๋ฌ ๊ฐ๋ก ์ชผ๊ฐ์ ธ ๋ชฉ๋ก์ ์์ธ๋ค(์์
์์ ๋ณต์ฌํ ์ฝ๋ ๋ชฉ๋ก์ ํ ๋ฒ์ ๋ฃ๋ ์ฉ๋).
|
|
126
|
+
* ์์ด๋ ๋ชฉ๋ก๋ ๊ฐ ํํ๋ 'tag' ์ ๊ฐ๋ค โ ๊ตฌ๋ถ์๋ง ๋์ด๋๋ค. */
|
|
127
|
+
input?: SChipFilterKeywordInput;
|
|
128
|
+
/** ๊ฒ์์กฐ๊ฑด(ํฌํจ/์ผ์น) ํ ๊ธ ํ์ ์ฌ๋ถ */
|
|
66
129
|
matchModes?: boolean;
|
|
67
|
-
/** matchModes ํ์ฑ ์ "๋ฏธํฌํจ"๊น์ง ํฌํจํด 3๊ฐ(ํฌํจ/์ผ์น/๋ฏธํฌํจ)๋ก ๋
ธ์ถํ ์ง.
|
|
130
|
+
/** matchModes ํ์ฑ ์ "๋ฏธํฌํจ"๊น์ง ํฌํจํด 3๊ฐ(ํฌํจ/์ผ์น/๋ฏธํฌํจ)๋ก ๋
ธ์ถํ ์ง.
|
|
131
|
+
* ๊ธฐ๋ณธ false โ 2๊ฐ(ํฌํจ/์ผ์น)๋ง */
|
|
68
132
|
excludeMode?: boolean;
|
|
69
|
-
|
|
133
|
+
}
|
|
134
|
+
/** ๋ ์ง ํ๋๋ฅผ ๊ณ ๋ฅธ๋ค โ ์บ๋ฆฐ๋ ํธ๋ฆฌ๊ฑฐ ํ๋๋ง ๋์ธ๋ค. ํ๋ฆฌ์
์ผ๋ก ๊ณ ๋ฅด๊ฒ ํ๊ฑฐ๋ ์์~์ข
๋ฃ๋ฅผ
|
|
135
|
+
* ๋ฐ์์ผ ํ๋ฉด datepicker-range ๋ค */
|
|
136
|
+
export interface SChipFilterDatePickerDayField extends SChipFilterFieldBase {
|
|
137
|
+
type: 'datepicker-day';
|
|
138
|
+
/** ์บ๋ฆฐ๋ ํธ๋ฆฌ๊ฑฐ์ placeholder */
|
|
139
|
+
placeholder?: string;
|
|
140
|
+
/** ์ ํ ๊ฐ๋ฅ ๋ฒ์ */
|
|
70
141
|
selectable?: [string, string];
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/** presets
|
|
77
|
-
*
|
|
142
|
+
}
|
|
143
|
+
/** ๊ธฐ๊ฐ(์์~์ข
๋ฃ)์ ๊ณ ๋ฅธ๋ค. presets๋ฅผ ์ฃผ๋ฉด ํ๋ฆฌ์
๋ผ๋์ค ๋ชฉ๋ก์ผ๋ก ๊ณ ๋ฅด๊ณ ,
|
|
144
|
+
* ์ฃผ์ง ์์ผ๋ฉด ๊ธฐ๊ฐ ํผ์ปค ํ๋๋ง ๋์ธ๋ค */
|
|
145
|
+
export interface SChipFilterDatePickerRangeField extends SChipFilterPresetsField {
|
|
146
|
+
type: 'datepicker-range';
|
|
147
|
+
/** presets๋ฅผ ํํฐ ๋ฐ์ ์ธ๊ทธ๋จผํธ ๋ผ๋์ค๋ก ํผ์ณ ๋๋๋ค(ํ์ค๋ฒ ์์).
|
|
148
|
+
* ๊ธฐ๋ณธ false โ ์นฉ ํด๋ฆญ ์ ํ์ค๋ฒ ์์ ์ธ๋ก ๋ผ๋์ค ๋ชฉ๋ก(+์ฌ์ฉ์ ์ง์ ์ ํ ์ ๊ธฐ๊ฐ ํผ์ปค) */
|
|
78
149
|
radioButton?: boolean;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
150
|
+
}
|
|
151
|
+
/** ์ง๊ณ ๋จ์(์ผยท์ยท๋ถ๊ธฐยท๋ฐ๊ธฐยท์ฐ)์ ๊ทธ ๋จ์์ ๊ฐ์ ํจ๊ป ๊ณ ๋ฅธ๋ค */
|
|
152
|
+
export interface SChipFilterDatePickerStatisticsField extends SChipFilterPresetsField {
|
|
153
|
+
type: 'datepicker-statistics';
|
|
154
|
+
}
|
|
155
|
+
/** ์นฉ+ํ์ค๋ฒ๋ฅผ ๊ฑฐ์น์ง ์๊ณ ๋ฐ์ ๋์ ๋
ธ๋๋ฅผ ์ฑ์ด ์ง์ ๊ทธ๋ฆฐ๋ค */
|
|
156
|
+
export interface SChipFilterCustomField extends SChipFilterFieldBase {
|
|
157
|
+
type: 'custom';
|
|
158
|
+
/** ํํฐ ๋ฐ์ ์ด ํ๋ ์๋ฆฌ์ ๋์ผ ๋
ธ๋๋ฅผ ์ง์ ๊ทธ๋ฆฐ๋ค. ๋ฐํํ ๋
ธ๋๊ฐ ๊ทธ๋๋ก ๋ฐ์ ๋
ธ์ถ๋๋ค โ
|
|
159
|
+
* SSelect๋ฅผ ๊ทธ๋๋ก ๋๊ฑฐ๋ SInput์ ๋ฐ๋ก ๋
ธ์ถํ๋ ์์ผ๋ก ๋ ๋ ๋ฐฉ์์ ์์ ๋กญ๊ฒ ๊ตฌ์ฑํ๋ค. */
|
|
82
160
|
render?: (ctx: {
|
|
83
161
|
value: SChipFilterValue;
|
|
84
162
|
disabled?: boolean;
|
|
163
|
+
/** ์ํ ๊ทธ๋ฃน์ด rule์ ์๋ฐํ๋ ๋์ true โ ์ง์ ๊ทธ๋ฆฐ ๋
ธ๋์๋ ๊ฒฝ๊ณ ํ์๋ฅผ ๋ง์ถ๋ผ๋ ์ ํธ๋ค */
|
|
85
164
|
warning?: boolean;
|
|
86
165
|
onValueChange: (value: SChipFilterValue) => void;
|
|
87
166
|
}) => ReactNode;
|
|
88
167
|
}
|
|
168
|
+
/** ํํฐ ํ๋์ ์ ์. type์ ๋ฐ๋ผ ์ธ ์ ์๋ ์์ฑ์ด ๋ฌ๋ผ์ง๋ค โ
|
|
169
|
+
* options๋ selectยทselect-multiยทkeyword, presetsยทmaxRangeยทradioButton์
|
|
170
|
+
* datepicker-rangeยทdatepicker-statistics, render๋ custom ์๋ง ์๋ค */
|
|
171
|
+
export type SChipFilterField = SChipFilterSelectField | SChipFilterSelectMultiField | SChipFilterDatePickerDayField | SChipFilterDatePickerRangeField | SChipFilterDatePickerStatisticsField | SChipFilterKeywordField | SChipFilterCustomField;
|
|
89
172
|
export interface SChipFilterChangeDetail {
|
|
90
173
|
key: string;
|
|
91
174
|
value: SChipFilterValue;
|
|
@@ -101,7 +184,7 @@ export type SChipFilterGroupRule = {
|
|
|
101
184
|
type: 'requireAny';
|
|
102
185
|
dataGroupName?: string;
|
|
103
186
|
};
|
|
104
|
-
/**
|
|
187
|
+
/** fields๋ฅผ ์ด๋ฃจ๋ ๋จ์. ๋ฌถ์ ๊ฒ์ด ์์ด๋ ํ ๊ทธ๋ฃน์ผ๋ก ๊ฐ์ธ ๋๊ธด๋ค โ `[{ fields: [...] }]` */
|
|
105
188
|
export interface SChipFilterGroup {
|
|
106
189
|
fields: SChipFilterField[];
|
|
107
190
|
/** ์ง์ ํ๋ฉด ์ด ๊ท์น์ผ๋ก ๊ทธ๋ฃน์ ๊ฒ์ฆํ๋ค. values๊ฐ ๋ฐ๋ ๋๋ง๋ค ์ฆ์ ์ฌํ๊ฐ๋๋ ์ค์๊ฐ ๊ฒ์ฆ์ด๋ผ โ
|
|
@@ -110,21 +193,27 @@ export interface SChipFilterGroup {
|
|
|
110
193
|
rule?: SChipFilterGroupRule;
|
|
111
194
|
/** rule์ ๋ง์กฑํ์ง ์์ ๋ ๊ทธ๋ฃน ์ค์์ ๋์ธ ํดํ ๋ฉ์์ง. ์ง์ ์ ํ๋ฉด rule ์ข
๋ฅ์ ๋ฐ๋ฅธ ๊ธฐ๋ณธ ๋ฌธ๊ตฌ๋ฅผ ์ด๋ค */
|
|
112
195
|
tooltipMessage?: string;
|
|
196
|
+
/** ์ด ๊ทธ๋ฃน ์์ ๊ตฌ๋ถ์ ์ ๋ฃ์์ง. ๊ฒ์ฆ(rule)๊ณผ ๊ตฌ๋ถ์ ์ ๋ณ๊ฐ๋ผ โ ๋ฌถ์ด์ ๊ฒ์ฆ๋ง ํ๊ณ ์ถ์ผ๋ฉด
|
|
197
|
+
* ์ฃผ์ง ์๋๋ค. ์ฒซ ๊ทธ๋ฃน์๋ ์์ ๊ฐ๋ฅผ ๊ฒ์ด ์์ผ๋ฏ๋ก ๋ฌด์๋๋ค(label์ ์ง์ ํ๋ค๋ฉด ๊ทธ ๊ตฌ๋ถ์ ์ด
|
|
198
|
+
* ์ด๋ฏธ ์๋ค) */
|
|
199
|
+
divider?: boolean;
|
|
113
200
|
}
|
|
114
201
|
export interface SChipFilterHandle {
|
|
115
202
|
/** ํน์ ํํฐ ํธ์ง ํ์ค๋ฒ๋ฅผ ์ฝ๋๋ค. */
|
|
116
203
|
open: (key: string) => void;
|
|
117
|
-
/** ๋ชจ๋ ํํฐ
|
|
204
|
+
/** ๋ฐ๋ฅผ ์ฒ์ ์ํ๋ก ๋๋๋ฆฝ๋๋ค โ ๋ชจ๋ ํํฐ ๊ฐ์ด ๊ธฐ๋ณธ๊ฐ(๋๋ null)์ผ๋ก ๋์๊ฐ๊ณ , "ํํฐ ์ถ๊ฐ"๋ก
|
|
205
|
+
* ๊บผ๋ด ๋์ ์นฉ๋ ํจ๊ป ๋น ์ ธ fixedยทrequired ํ๋๋ง ๋จ์ต๋๋ค. ์ด๋ ค ์๋ ํธ์ง ํ์ค๋ฒ๋ ๋ซํ๋๋ค */
|
|
118
206
|
reset: () => void;
|
|
119
|
-
/**
|
|
120
|
-
* ๋ฐํํฉ๋๋ค.
|
|
207
|
+
/** ํ์ฌ ๊ฐ ๊ธฐ์ค์ผ๋ก ๊ฐ ๊ทธ๋ฃน์ rule์ ๋ง์กฑํ๋์ง, ๊ทธ๋ฆฌ๊ณ required ํ๋๊ฐ ๋ชจ๋ ๋น์ด ์์ง ์์์ง
|
|
208
|
+
* ๋ฐํํฉ๋๋ค. rule์ ์ค ๊ทธ๋ฃน์ด ์๊ณ required ํ๋๋ ๋ชจ๋ ๊ฐ์ด ์์ผ๋ฉด ํญ์ true.
|
|
209
|
+
* ๊ฒฝ๊ณ ํดํ์ ์ด ํธ์ถ๊ณผ ๋ฌด๊ดํ๊ฒ rule ์๋ฐ ์ํ์ธ ๋์ ํญ์ ์ค์๊ฐ์ผ๋ก ๋ ์์ผ๋ฏ๋ก,
|
|
121
210
|
* ์ด ๋ฉ์๋๋ ๊ทธ ์ํ๋ฅผ ๊ทธ๋๋ก ์ฝ์ด์ค๋ ์ฉ๋๋ค(์: ๊ฒ์ ๋ฒํผ์ ๋๋ฌ๋ ๋๋์ง ์ฌ์ ํ์ธ) */
|
|
122
211
|
validate: () => boolean;
|
|
123
212
|
}
|
|
124
213
|
export interface SChipFilterProps {
|
|
125
|
-
/** ํํฐ ์ ์ ๋ชฉ๋ก. ๊ทธ๋ฃน์ผ๋ก
|
|
126
|
-
*
|
|
127
|
-
fields?:
|
|
214
|
+
/** ํํฐ ์ ์ ๋ชฉ๋ก. ๋ฌถ์ ๊ฒ์ด ์์ด๋ ํ ๊ทธ๋ฃน์ผ๋ก ๊ฐ์ธ ๋๊ธด๋ค โ `[{ fields: [...] }]`.
|
|
215
|
+
* ๊ทธ๋ฃน์ rule๋ก ํจ๊ป ๊ฒ์ฆํ๊ฑฐ๋ divider๋ก ๊ฐ๋ผ ๋์ ๋ ๋๋๋ค. */
|
|
216
|
+
fields?: SChipFilterGroup[];
|
|
128
217
|
/** ํํฐ ๊ฐ ๋งต */
|
|
129
218
|
value?: SChipFilterValueMap;
|
|
130
219
|
/** ์ ์ฒด ๊ฐ ๋ณ๊ฒฝ โ ํธ์ง ์ค์ธ ๊ฐ์ด ๋ฐ๋ ๋๋ง๋ค(์ ํํ ๋๋ง๋ค) ํธ์ถ๋๋ค. ์ค์ ๊ฒ์ ์คํ์ onSearch๋ฅผ ์ด๋ค */
|
|
@@ -133,29 +222,30 @@ export interface SChipFilterProps {
|
|
|
133
222
|
onFilterChange?: (detail: SChipFilterChangeDetail) => void;
|
|
134
223
|
/** ์ค์ ๊ฒ์์ ์คํํ ์์ โ ํธ์ง ํ์ค๋ฒ์ "๊ฒ์" ๋ฒํผ์ ๋๋ฅด๊ฑฐ๋ ํ์ค๋ฒ๊ฐ ๋ซํ ๋(๋ฐ๊นฅ ํด๋ฆญยทEscยท๋ค๋ฅธ
|
|
135
224
|
* ์นฉ์ผ๋ก ์ ํ ํฌํจ) ๊ทธ ์์ ์ ์ ์ฒด ๊ฐ ๋งต๊ณผ ํจ๊ป ํธ์ถ๋๋ค. ํ์ค๋ฒ๊ฐ ์๋ ํ๋(์ธ๋ผ์ธ date ํ๋ฆฌ์
ยทcustom,
|
|
136
|
-
* clearable ร, ๊ฒ์ ์ด๊ธฐํ)๋ ๊ฐ์ด ๋ฐ๋๋ ์ฆ์ ํธ์ถ๋๋ค.
|
|
225
|
+
* clearable ร, ๊ฒ์ ์ด๊ธฐํ)๋ ๊ฐ์ด ๋ฐ๋๋ ์ฆ์ ํธ์ถ๋๋ค. keyword ํํฐ์์ Enter ๋ก ํค์๋๋ฅผ ์ถ๊ฐํ ๋๋
|
|
226
|
+
* ๊ทธ ์ฆ์ ํธ์ถ๋๋ค โ ํ์ค๋ฒ๋ ์ด๋ฆฐ ์ฑ๋ผ ํค์๋๋ฅผ ์ด์ด์ ๋ ๋ฃ์ ์ ์๊ณ , ๋ฃ์ ๋๋ง๋ค ์กฐํ๊ฐ ๊ฐฑ์ ๋๋ค.
|
|
227
|
+
* keyword ์
๋ ฅ์ฐฝ์ Enter ์์ด ํ
์คํธ๋ฅผ ๋จ๊ธด ์ฑ ํ์ค๋ฒ๋ฅผ ๋ซ์ผ๋ฉด ๊ทธ ํ
์คํธ๋ ํค์๋๋ก ํ์ ํ ๋ค
|
|
228
|
+
* ํธ์ถ๋๋ค(input: 'csv'๋ฉด ์ฝค๋ง๋ก ์ชผ๊ฐ๋ ๊ท์น๋ ๊ทธ๋๋ก ์ ์ฉ) โ ์ฌ์ฉ์๊ฐ ๊ฒ์์ด๋ฅผ ๋ฃ๊ณ "๊ฒ์"์ ๋๋ฅธ
|
|
229
|
+
* ์กฐ์์ด ์
๋ ฅ ํ์ ์ฌ๋ถ ๋๋ฌธ์ ์ฌ๋ผ์ง์ง ์๊ฒ ํ๋ค. dirty ์ฒดํฌ๊ฐ ๊ธฐ๋ณธ ์ ์ฉ๋์ด ์์ด โ ๋ง์ง๋ง์ผ๋ก
|
|
137
230
|
* ์ค์ ๊ฒ์์ด ์คํ๋ ๊ฐ ๋งต๊ณผ ๋น๊ตํด ํ๋๋ผ๋ ๋ฌ๋ผ์ง ๊ฒ ์์ผ๋ฉด(์: ํ์ค๋ฒ๋ฅผ ์ด์๋ค ์๋ฌด๊ฒ๋ ์ ๋ฐ๊พธ๊ณ
|
|
138
|
-
* ๋ซ๋ ๊ฒฝ์ฐ) ํธ์ถ๋์ง ์๋๋ค.
|
|
231
|
+
* ๋ซ๋ ๊ฒฝ์ฐ) ํธ์ถ๋์ง ์๋๋ค. ๋จ ๋ง์ดํธ ํ ์ฒซ ํธ์ถ์ ๋น๊ตํ ๊ธฐ์ค์ด ์์ด ๊ฐ์ด ์ฒ์ ๊ทธ๋๋ก์ฌ๋ ๋๊ฐ๋ค โ
|
|
232
|
+
* ๋ง์ดํธ ์ ์๋ ์กฐํํ์ง ์๋ ํ๋ฉด(๋ค์ด์ผ๋ก๊ทธ ๋ฑ)์์ ์ฌ์ฉ์์ ์ฒซ "๊ฒ์"์ด ๋งํ์ง ์๊ฒ ํ๊ธฐ ์ํจ์ด๋ค.
|
|
233
|
+
* fields๋ฅผ ๊ทธ๋ฃน์ผ๋ก ๋๊ฒผ๋ค๋ฉด rule์ ๋ง์กฑํ์ง ๋ชปํ ๊ทธ๋ฃน์ด ์๋ ๋์์
|
|
139
234
|
* onSearch๊ฐ ํธ์ถ๋์ง ์๋๋ค โ ํด๋น ๊ทธ๋ฃน์ ๊ฒฝ๊ณ ํดํ์ ์ด ์์ ๊ณผ ๋ฌด๊ดํ๊ฒ ๊ฐ์ด ๋น์ด ์๋ ๋์ ํญ์
|
|
140
|
-
* ์ค์๊ฐ์ผ๋ก ๋ ์๋ค(๋ณ๋๋ก validate()๋ฅผ ํธ์ถํ ํ์ ์์)
|
|
235
|
+
* ์ค์๊ฐ์ผ๋ก ๋ ์๋ค(๋ณ๋๋ก validate()๋ฅผ ํธ์ถํ ํ์ ์์). required ํ๋๊ฐ ๋น์ด ์๋ ๋์์๋
|
|
236
|
+
* ๋ง์ฐฌ๊ฐ์ง๋ก ํธ์ถ๋์ง ์๋๋ค โ ์ ์ ์ค์ (๋ด์ฅ ๊ธฐ๋ณธ๊ฐ ๋๋ defaultValue)์ด๋ผ๋ฉด ์๋ ๋น์์ง์ง
|
|
237
|
+
* ์์ง๋ง, defaultValue ์๋ select-multiยทkeywordยทcustom์ required๋ง ์ค ์ค์ค์ ์์๋ "๊ฒ์
|
|
238
|
+
* ์ด๊ธฐํ"ยทclearable์ด ๊ฐ์ null๋ก ๋น์ธ ์ ์์ด ์ด๋์ ์์ ์ฅ์น๋ค */
|
|
141
239
|
onSearch?: (value: SChipFilterValueMap) => void;
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* defaultActive ๊ฐ์ ๊ธฐ์ค์ผ๋ก ์ปดํฌ๋ํธ๊ฐ ๋ด๋ถ ์ํ๋ก ๊ด๋ฆฌํ๋ ๋น์ ์ด ๋ฐฉ์์ผ๋ก ๋์ํ๋ค */
|
|
145
|
-
activeKeys?: string[];
|
|
146
|
-
/** ๋
ธ์ถ ํํฐ key ๋ณ๊ฒฝ(์นฉ ์ถ๊ฐยท์ ๊ฑฐ) โ ๋น์ ์ด ๋ฐฉ์์์๋ ์ฐธ๊ณ ์ฉ์ผ๋ก ํธ์ถ๋๋ค.
|
|
147
|
-
* activeKeys๋ฅผ ์ง์ ์ ์ดํ ๋๋ ์ด ๊ฐ์ ๊ทธ๋๋ก activeKeys์ ๋ฐ์ํด์ผ ํ๋ค */
|
|
148
|
-
onActiveKeysChange?: (keys: string[]) => void;
|
|
149
|
-
/** "๊ฒ์ ์ด๊ธฐํ" ํด๋ฆญ โ ๋ชจ๋ ํ๋๊ฐ ๊ธฐ๋ณธ๊ฐ(๋๋ null)์ผ๋ก ๋ฆฌ์
๋ ๋ค ํธ์ถ๋๋ค */
|
|
240
|
+
/** "๊ฒ์ ์ด๊ธฐํ" ํด๋ฆญ โ ๋ชจ๋ ํ๋๊ฐ ๊ธฐ๋ณธ๊ฐ(๋๋ null)์ผ๋ก ๋ฆฌ์
๋๊ณ "ํํฐ ์ถ๊ฐ"๋ก ๊บผ๋ธ ์นฉ์ด
|
|
241
|
+
* ๋ฐ์์ ๋น ์ง ๋ค ํธ์ถ๋๋ค */
|
|
150
242
|
onReset?: () => void;
|
|
151
|
-
/** "ํํฐ ์ถ๊ฐ" ๋ชฉ๋ก์์ ํญ๋ชฉ์ ๊ณจ๋์ ๋
|
|
152
|
-
*
|
|
153
|
-
* activeKeys๋ฅผ ๋๊ธฐ์ง ์์๋ค๋ฉด(๋น์ ์ด) ๋ณ๋ ์ฒ๋ฆฌ ์์ด๋ ์ปดํฌ๋ํธ๊ฐ ์์์ ์นฉ์ ๋
ธ์ถํ๋ค */
|
|
243
|
+
/** "ํํฐ ์ถ๊ฐ" ๋ชฉ๋ก์์ ํญ๋ชฉ์ ๊ณจ๋์ ๋ ํธ์ถ๋๋ค(์๋ฆผ). ์นฉ ๋
ธ์ถ์ ์ปดํฌ๋ํธ๊ฐ ์์์ ํ๋ฏ๋ก
|
|
244
|
+
* ์ด ์ฝ๋ฐฑ์์ ๋ฐ๋ก ํด์ค ์ผ์ ์๋ค */
|
|
154
245
|
onAddFilter?: (key: string) => void;
|
|
155
|
-
/** ์ข์ธก ํ๊ทธ
|
|
246
|
+
/** ์ข์ธก ํ๊ทธ ํ
์คํธ. ์ง์ ํ๋ฉด ํ๊ทธ์ ๊ทธ ๋ค ๊ตฌ๋ถ์ ์ด ํจ๊ป ๋
ธ์ถ๋๊ณ , ์ง์ ํ์ง ์์ผ๋ฉด(undefined)
|
|
247
|
+
* ๋ ๋ค ์๋ต๋๋ค */
|
|
156
248
|
label?: string;
|
|
157
|
-
/** ์ข์ธก ํ๊ทธ(label)ยท๊ตฌ๋ถ์ ํ์ ์ฌ๋ถ */
|
|
158
|
-
showLabel?: boolean;
|
|
159
249
|
/** ๊ฒ์ ์ด๊ธฐํ ๋งํฌ ํ์ ์ฌ๋ถ */
|
|
160
250
|
showReset?: boolean;
|
|
161
251
|
/** ๋ฐ ๋นํ์ฑ ์ํ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SChipFilter, type SChipFilterChangeDetail, type SChipFilterDatePreset, type SChipFilterField, type SChipFilterGroup, type SChipFilterGroupRule, type SChipFilterHandle, type SChipFilterKeywordValue, type SChipFilterMatchMode, type SChipFilterOption, type SChipFilterOptionValue, type SChipFilterProps, type SChipFilterType, type SChipFilterValue, type SChipFilterValueMap, } from './SChipFilter';
|
|
1
|
+
export { SChipFilter, type SChipFilterChangeDetail, type SChipFilterCustomField, type SChipFilterCustomValue, type SChipFilterDatePickerDayField, type SChipFilterDatePickerRangeField, type SChipFilterDatePickerStatisticsField, type SChipFilterDatePreset, type SChipFilterField, type SChipFilterFieldBase, type SChipFilterGroup, type SChipFilterGroupRule, type SChipFilterHandle, type SChipFilterKeywordField, type SChipFilterKeywordInput, type SChipFilterKeywordValue, type SChipFilterMatchMode, type SChipFilterOption, type SChipFilterOptionValue, type SChipFilterOptionsField, type SChipFilterPeriodUnit, type SChipFilterPeriodValue, type SChipFilterPresetsField, type SChipFilterProps, type SChipFilterSelectField, type SChipFilterSelectMultiField, type SChipFilterType, type SChipFilterValue, type SChipFilterValueMap, } from './SChipFilter';
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| `name?` | `string` | โ | |
|
|
18
18
|
| `rules?` | `Rule[]` | โ | |
|
|
19
19
|
| `error?` | `boolean` | โ | |
|
|
20
|
-
| `
|
|
20
|
+
| `showReset?` | `boolean` | `false` | ์
๋ ฅ ์ด๊ธฐํ ๋ฒํผ ํ์ |
|
|
21
21
|
| `maxCount?` | `number` | โ | ์ต๋ ์นฉ ๊ฐ์ |
|
|
22
22
|
| `metaPlacement?` | `SChipInputMetaPlacement` | `'end'` | ์ต๋ ๊ฐ์ยท์ด๊ธฐํ meta ์์น |
|
|
23
23
|
| `duplicateLabel?` | `string` | โ | ์ค๋ณต ์๋ฌ ๋ฉ์์ง ํญ๋ชฉ๋ช
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
| `labelWidth?` | `number \| string` | โ | |
|
|
31
31
|
| `hint?` | `string` | โ | |
|
|
32
32
|
| `errorMessage?` | `string` | โ | |
|
|
33
|
-
| `width?` | `
|
|
33
|
+
| `width?` | `SFieldWidth` | โ | ์ปจํธ๋กค ๋๋น โ ํญ ๋ฑ๊ธ(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) ยท ์ซ์=px ยท CSS ๊ธธ์ด. ๋ฑ๊ธ์ `--cmp-field-width-*` ํ ํฐ์ผ๋ก ํ๋ฆฌ๋ฏ๋ก ํ ํฐ์ด ๋ฐ๋๋ฉด ํ๋ฉด์ด ๋ฐ๋ผ๊ฐ๋ค. ๊ฐ ๊ธธ์ด์ ์ํ์ด ์์ผ๋ฉด `"100%"` ๋ก ๋์ด ํ ์ ์ฒด๋ฅผ ์ด๋ค. |
|
|
34
34
|
| `status?` | `SFieldStatus` | โ | |
|
|
35
35
|
| `icon?` | `SIconName` | โ | |
|
|
36
36
|
| `iconColor?` | `SColor` | โ | |
|
|
@@ -54,6 +54,20 @@
|
|
|
54
54
|
|--------|------|-------------|
|
|
55
55
|
| `focus` | `() => void` | ์
๋ ฅ ํ๋์ ํฌ์ปค์ค๋ฅผ ์ด๋ํฉ๋๋ค. |
|
|
56
56
|
|
|
57
|
+
## Types
|
|
58
|
+
|
|
59
|
+
### SChipInputSize
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
export type SChipInputSize = SFieldSize;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### SChipInputMetaPlacement
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
export type SChipInputMetaPlacement = 'end' | 'inline';
|
|
69
|
+
```
|
|
70
|
+
|
|
57
71
|
## Dependencies
|
|
58
72
|
|
|
59
73
|
### Depends on
|
|
@@ -4,6 +4,7 @@ import { type SIconName } from '../SIcon';
|
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
7
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
7
8
|
export type SChipInputSize = SFieldSize;
|
|
8
9
|
export type SChipInputMetaPlacement = 'end' | 'inline';
|
|
9
10
|
/** ref๋ก ๋
ธ์ถ๋๋ UX ๋ฉ์๋ (sd-chip-input @Method sdFocus ๋์) */
|
|
@@ -31,7 +32,7 @@ export interface SChipInputProps {
|
|
|
31
32
|
rules?: Rule[];
|
|
32
33
|
error?: boolean;
|
|
33
34
|
/** ์
๋ ฅ ์ด๊ธฐํ ๋ฒํผ ํ์ */
|
|
34
|
-
|
|
35
|
+
showReset?: boolean;
|
|
35
36
|
/** ์ต๋ ์นฉ ๊ฐ์ */
|
|
36
37
|
maxCount?: number;
|
|
37
38
|
/** ์ต๋ ๊ฐ์ยท์ด๊ธฐํ meta ์์น */
|
|
@@ -50,7 +51,12 @@ export interface SChipInputProps {
|
|
|
50
51
|
labelWidth?: number | string;
|
|
51
52
|
hint?: string;
|
|
52
53
|
errorMessage?: string;
|
|
53
|
-
|
|
54
|
+
/**
|
|
55
|
+
* ์ปจํธ๋กค ๋๋น โ ํญ ๋ฑ๊ธ(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) ยท ์ซ์=px ยท CSS ๊ธธ์ด.
|
|
56
|
+
* ๋ฑ๊ธ์ `--cmp-field-width-*` ํ ํฐ์ผ๋ก ํ๋ฆฌ๋ฏ๋ก ํ ํฐ์ด ๋ฐ๋๋ฉด ํ๋ฉด์ด ๋ฐ๋ผ๊ฐ๋ค.
|
|
57
|
+
* ๊ฐ ๊ธธ์ด์ ์ํ์ด ์์ผ๋ฉด `"100%"` ๋ก ๋์ด ํ ์ ์ฒด๋ฅผ ์ด๋ค.
|
|
58
|
+
*/
|
|
59
|
+
width?: SFieldWidth;
|
|
54
60
|
status?: SFieldStatus;
|
|
55
61
|
icon?: SIconName;
|
|
56
62
|
iconColor?: SColor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SChipInput, type SChipInputMetaPlacement, type SChipInputProps, type SChipInputSize, } from './SChipInput';
|
|
1
|
+
export { SChipInput, type SChipInputHandle, type SChipInputMetaPlacement, type SChipInputProps, type SChipInputSize, } from './SChipInput';
|
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
| `className?` | `string` | โ | |
|
|
18
18
|
| `style?` | `CSSProperties` | โ | |
|
|
19
19
|
|
|
20
|
+
## Types
|
|
21
|
+
|
|
22
|
+
### SCircleProgressType
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
export type SCircleProgressType = 'primary' | 'inverse' | 'error' | 'complete' | 'neutral';
|
|
26
|
+
```
|
|
27
|
+
|
|
20
28
|
## Dependencies
|
|
21
29
|
|
|
22
30
|
### Used by
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| `persistent?` | `boolean` | `false` | ๋ฐฑ๋๋กญยทESC๋ก ์ ๋ซํ๊ณ ํ๋ค๋ฆผ (sd-modal-container persistent). **๊ธฐ๋ณธ๊ฐ false** โ ํ์ธ ๋ชจ๋ฌ์ ์์ ์
๋ ฅ์ด ์์ด ๋ฐฑ๋๋กญยทESC๋ก ๋ซํ๋ค |
|
|
13
13
|
| `type?` | `SConfirmModalType` | `'positive'` | ํ์
(์์ด์ฝยท๋ฉ์ธ๋ฒํผ ์ ๊ฒฐ์ ) |
|
|
14
14
|
| `modalTitle?` | `string` | `''` | |
|
|
15
|
-
| `
|
|
15
|
+
| `titleClassName?` | `string` | โ | ์ ๋ชฉ ์๋ฆฌ๋จผํธ์ ์ถ๊ฐํ ํด๋์ค (sd-confirm-modal titleClassName) |
|
|
16
16
|
| `topMessage?` | `string[]` | `[]` | ์ฝํ
์ธ ๋ฐ์ค ์๋จ ๋ฉ์์ง ๋ชฉ๋ก (๊ฐ ํญ๋ชฉ์ด ํ ์ค, HTML ๋ฌธ์์ด ํ์ฉ โ innerHTML ๋ ๋๋ง) |
|
|
17
17
|
| `bottomMessage?` | `string[]` | `[]` | ์ฝํ
์ธ ๋ฐ์ค ํ๋จ ๋ฉ์์ง ๋ชฉ๋ก (๊ฐ ํญ๋ชฉ์ด ํ ์ค, HTML ๋ฌธ์์ด ํ์ฉ โ innerHTML ๋ ๋๋ง) |
|
|
18
18
|
| `tagLabel?` | `string` | โ | tag ์ฌ๋กฏ ๊ธฐ๋ณธ ํ๊ทธ ๋ ์ด๋ธ (tagSlot ๋ฏธ์ง์ ์) |
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
| `tagSlot?` | `ReactNode` | โ | ์ฝํ
์ธ ๋ฐ์ค tag ์์น ์ปค์คํ
์ฝํ
์ธ (๋ฏธ์ง์ ์ tagLabel ๊ธฐ๋ฐ STag) |
|
|
24
24
|
| `optionSlot?` | `ReactNode` | โ | ์ฝํ
์ธ ๋ฐ์ค์์ ํ๊ทธ ์ค๋ฅธ์ชฝ ์ปค์คํ
์ฝํ
์ธ (๋ฏธ์ง์ ์ slotLabel ํ
์คํธ) |
|
|
25
25
|
| `contentSlot?` | `ReactNode` | โ | ์ฝํ
์ธ ๋ฐ์ค ๋ฐ๋ก ์๋์ ํต์ผ๋ก ๋ค์ด๊ฐ๋ ์ปค์คํ
์ฝํ
์ธ (์ ์ฒด ํญ) |
|
|
26
|
-
| `mainButtonLabel?` | `string` | `'ํ์ธ'` | ๋ฉ์ธ
|
|
27
|
-
| `
|
|
26
|
+
| `mainButtonLabel?` | `string` | `'ํ์ธ'` | ๋ฉ์ธ(ํ์ธ) ๋ฒํผ์ ์ฐํ๋ ๊ธ์ |
|
|
27
|
+
| `mainButtonOutline?` | `boolean` | โ | ๋ฉ์ธ ๋ฒํผ์ ์์๋ผ์ธ(ํ
๋๋ฆฌ)์ผ๋ก ์ธ์ธ์ง. ์ง์ ํ์ง ์์ผ๋ฉด `type` ์ด ์ ํ๋ค โ positiveยทnegative ๋ ์ฑ์ด ๋ฒํผ, default ๋ ์์๋ผ์ธ. **์์ ์ฌ๊ธฐ์ ๊ณ ๋ฅด์ง ์๋๋ค.** `type` ์ด ์ ํ๋ค(positive=primary / negative=danger / default=neutral) โ ์์ด์ฝยท์ ๋ชฉ์ด ๋งํ๋ ๊ฒ๊ณผ ๋ฒํผ ์์ด ์ด๊ธ๋๋ฉด ์ฝ๋ ์ฌ๋์ด ํท๊ฐ๋ฆฌ๋ฏ๋ก ๊ทธ ์กฐํฉ์ ํ์
์์ ๋ง๋๋ค. ๊ธ์๋ `mainButtonLabel` ์ด๋ค. `type="default"` ์ `false` ๋ฅผ ์ฃผ๋ฉด ํ
๋๋ฆฌ ์๋ ํฐ ๋ฒํผ์ด ๋๋ค(neutral ์ solidยทoutline ์ด ๊ฐ์ ํฐ ๋ฉด์ด๊ณ ํ
๋๋ฆฌ ์ ๋ฌด๋ง ๋ค๋ฅด๋ค). ํ์ธ ๋ฒํผ์ด ๋๋ฌ์ผ ํ ๊ฒ์ผ๋ก ์ ์ฝํ๋ฏ๋ก ๊ถํ์ง ์๋๋ค. |
|
|
28
28
|
| `subButtonLabel?` | `string` | โ | ์๋ธ(์ทจ์) ๋ฒํผ |
|
|
29
29
|
|
|
30
30
|
#### Events
|
|
@@ -36,6 +36,14 @@
|
|
|
36
36
|
| `onCancel` | `() => void` | |
|
|
37
37
|
| `onClose` | `() => void` | ๋ซ๊ธฐ(X) ๋ฒํผ ํด๋ฆญ (sdClose) |
|
|
38
38
|
|
|
39
|
+
## Types
|
|
40
|
+
|
|
41
|
+
### SConfirmModalType
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
export type SConfirmModalType = 'positive' | 'negative' | 'default';
|
|
45
|
+
```
|
|
46
|
+
|
|
39
47
|
## Dependencies
|
|
40
48
|
|
|
41
49
|
### Used by
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type STagColor, type STagShape, type STagSize } from '../STag';
|
|
3
3
|
export type SConfirmModalType = 'positive' | 'negative' | 'default';
|
|
4
|
-
/** ํ์ธ ๋ฒํผ ํ๋ฆฌ์
(sd-confirm-modal ConfirmModalMainButton) */
|
|
5
|
-
export type ConfirmModalMainButton = 'primary_md' | 'primary_outline_md' | 'danger_md' | 'danger_outline_md' | 'neutral_outline_md';
|
|
6
4
|
export interface SConfirmModalProps {
|
|
7
5
|
open?: boolean;
|
|
8
6
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -11,8 +9,8 @@ export interface SConfirmModalProps {
|
|
|
11
9
|
/** ํ์
(์์ด์ฝยท๋ฉ์ธ๋ฒํผ ์ ๊ฒฐ์ ) */
|
|
12
10
|
type?: SConfirmModalType;
|
|
13
11
|
modalTitle?: string;
|
|
14
|
-
/** ์ ๋ชฉ ์๋ฆฌ๋จผํธ์ ์ถ๊ฐํ ํด๋์ค (sd-confirm-modal
|
|
15
|
-
|
|
12
|
+
/** ์ ๋ชฉ ์๋ฆฌ๋จผํธ์ ์ถ๊ฐํ ํด๋์ค (sd-confirm-modal titleClassName) */
|
|
13
|
+
titleClassName?: string;
|
|
16
14
|
/** ์ฝํ
์ธ ๋ฐ์ค ์๋จ ๋ฉ์์ง ๋ชฉ๋ก (๊ฐ ํญ๋ชฉ์ด ํ ์ค, HTML ๋ฌธ์์ด ํ์ฉ โ innerHTML ๋ ๋๋ง) */
|
|
17
15
|
topMessage?: string[];
|
|
18
16
|
/** ์ฝํ
์ธ ๋ฐ์ค ํ๋จ ๋ฉ์์ง ๋ชฉ๋ก (๊ฐ ํญ๋ชฉ์ด ํ ์ค, HTML ๋ฌธ์์ด ํ์ฉ โ innerHTML ๋ ๋๋ง) */
|
|
@@ -31,10 +29,20 @@ export interface SConfirmModalProps {
|
|
|
31
29
|
optionSlot?: ReactNode;
|
|
32
30
|
/** ์ฝํ
์ธ ๋ฐ์ค ๋ฐ๋ก ์๋์ ํต์ผ๋ก ๋ค์ด๊ฐ๋ ์ปค์คํ
์ฝํ
์ธ (์ ์ฒด ํญ) */
|
|
33
31
|
contentSlot?: ReactNode;
|
|
34
|
-
/** ๋ฉ์ธ
|
|
32
|
+
/** ๋ฉ์ธ(ํ์ธ) ๋ฒํผ์ ์ฐํ๋ ๊ธ์ */
|
|
35
33
|
mainButtonLabel?: string;
|
|
36
|
-
/**
|
|
37
|
-
|
|
34
|
+
/**
|
|
35
|
+
* ๋ฉ์ธ ๋ฒํผ์ ์์๋ผ์ธ(ํ
๋๋ฆฌ)์ผ๋ก ์ธ์ธ์ง. ์ง์ ํ์ง ์์ผ๋ฉด `type` ์ด ์ ํ๋ค โ
|
|
36
|
+
* positiveยทnegative ๋ ์ฑ์ด ๋ฒํผ, default ๋ ์์๋ผ์ธ.
|
|
37
|
+
*
|
|
38
|
+
* **์์ ์ฌ๊ธฐ์ ๊ณ ๋ฅด์ง ์๋๋ค.** `type` ์ด ์ ํ๋ค(positive=primary / negative=danger /
|
|
39
|
+
* default=neutral) โ ์์ด์ฝยท์ ๋ชฉ์ด ๋งํ๋ ๊ฒ๊ณผ ๋ฒํผ ์์ด ์ด๊ธ๋๋ฉด ์ฝ๋ ์ฌ๋์ด ํท๊ฐ๋ฆฌ๋ฏ๋ก
|
|
40
|
+
* ๊ทธ ์กฐํฉ์ ํ์
์์ ๋ง๋๋ค. ๊ธ์๋ `mainButtonLabel` ์ด๋ค.
|
|
41
|
+
*
|
|
42
|
+
* `type="default"` ์ `false` ๋ฅผ ์ฃผ๋ฉด ํ
๋๋ฆฌ ์๋ ํฐ ๋ฒํผ์ด ๋๋ค(neutral ์ solidยทoutline ์ด
|
|
43
|
+
* ๊ฐ์ ํฐ ๋ฉด์ด๊ณ ํ
๋๋ฆฌ ์ ๋ฌด๋ง ๋ค๋ฅด๋ค). ํ์ธ ๋ฒํผ์ด ๋๋ฌ์ผ ํ ๊ฒ์ผ๋ก ์ ์ฝํ๋ฏ๋ก ๊ถํ์ง ์๋๋ค.
|
|
44
|
+
*/
|
|
45
|
+
mainButtonOutline?: boolean;
|
|
38
46
|
/** ์๋ธ(์ทจ์) ๋ฒํผ */
|
|
39
47
|
subButtonLabel?: string;
|
|
40
48
|
/** ํ์ธ ๋ฒํผ ํด๋ฆญ (sdOk) */
|
|
@@ -44,4 +52,4 @@ export interface SConfirmModalProps {
|
|
|
44
52
|
onClose?: () => void;
|
|
45
53
|
}
|
|
46
54
|
/** SConfirmModal โ sd-confirm-modal ํฌํ
. ์์ด์ฝ+์ ๋ชฉ+๋ฉ์์ง+ํ๊ทธ+ํ์ธ/์ทจ์ ๋ฒํผ. */
|
|
47
|
-
export declare function SConfirmModal({ open, onOpenChange, persistent, type, modalTitle,
|
|
55
|
+
export declare function SConfirmModal({ open, onOpenChange, persistent, type, modalTitle, titleClassName, topMessage, bottomMessage, tagLabel, tagShape, tagSize, tagColor, slotLabel, tagSlot, optionSlot, contentSlot, mainButtonLabel, mainButtonOutline, subButtonLabel, onOk, onCancel, onClose, }: SConfirmModalProps): import("react").JSX.Element;
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
| `placeholder?` | `string` | โ | |
|
|
34
34
|
| `selectable?` | `[string, string]` | โ | ์ ํ ๊ฐ๋ฅ ๋ฒ์ [์์, ์ข
๋ฃ] |
|
|
35
35
|
| `disabled?` | `boolean` | `false` | |
|
|
36
|
-
| `
|
|
36
|
+
| `clearable?` | `boolean` | `false` | ์ ํ๊ฐ ์ง์ฐ๊ธฐ ๋ฒํผ. ๊ฐ์ด ์์ ๋๋ง ๋ํ๋๊ณ , ๋๋ฅด๋ฉด `onValueChange` ๋ก `null` ์ด ์จ๋ค. **ํ์ ์
๋ ฅ ํ๋์๋ ์ผ์ง ์๋๋ค** โ ์ง์ฐ๋ฉด ๋ค์ ๊ณ ๋ฅด๊ธฐ ์ ๊น์ง ํผ์ด ํต๊ณผํ์ง ๋ชปํ๋ค. `STimePicker` ยท `STimeRangePicker` ยท `SSelect` ์ `clearable` ๊ณผ ๊ฐ์ ๊ท์น์ด๋ค. |
|
|
37
|
+
| `width?` | `SFieldWidth` | โ | ์ปจํธ๋กค ๋๋น โ ํญ ๋ฑ๊ธ(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) ยท ์ซ์=px ยท CSS ๊ธธ์ด. ๋ฑ๊ธ์ `--cmp-field-width-*` ํ ํฐ์ผ๋ก ํ๋ฆฌ๋ฏ๋ก ํ ํฐ์ด ๋ฐ๋๋ฉด ํ๋ฉด์ด ๋ฐ๋ผ๊ฐ๋ค. ๊ฐ ๊ธธ์ด์ ์ํ์ด ์์ผ๋ฉด `"100%"` ๋ก ๋์ด ํ ์ ์ฒด๋ฅผ ์ด๋ค. |
|
|
38
|
+
| `maxWidth?` | `SFieldWidth` | โ | ์ปจํธ๋กค ์ต๋ ๋๋น โ ํญ ๋ฑ๊ธ ยท ์ซ์=px ยท CSS ๊ธธ์ด. ์ง์ ํ์ง ์์ผ๋ฉด ๊ฐ ๊ธธ์ด(`YYYY-MM-DD`)์ ๋ง์ถ ๋ด์ฅ ์ํ(`size='md'` โ `lg`, `'sm'` โ `md`)์ด ๊ฑธ๋ ค, `width="100%"` ๋ฅผ ๋ฐ์๋ ํ ์ ์ฒด๋ก ๋์ด๋์ง ์๋๋ค. ํ์ค๋ฒ์ฒ๋ผ ํญ์ด ์ด๋ฏธ ์ข๊ฒ ์ ํด์ง ์๋ฆฌ์์ ๊ทธ ํญ์ ๊ทธ๋๋ก ์ฑ์์ผ ํ๋ฉด `width="100%"` ์ ํจ๊ป `maxWidth="100%"` ๋ฅผ ์ค๋ค. `0` ์ ์ํ์ ์์ ๊ฑธ์ง ์๋๋ค โ ๋ถ๋ชจ๋ณด๋ค ๋์ด์ง๋ ๊ฒ๊น์ง ํ์ฉํด์ผ ํ ๋๋ง ์ด๋ค. |
|
|
37
39
|
| `name?` | `string` | โ | |
|
|
38
40
|
| `rules?` | `Rule[]` | โ | |
|
|
39
41
|
| `status?` | `SFieldStatus` | โ | |
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
|
|
56
58
|
| Event | Type | Description |
|
|
57
59
|
|-------|------|-------------|
|
|
58
|
-
| `onValueChange` | `(value: string) => void` | ์ ํ ๋ณ๊ฒฝ (sdUpdate) |
|
|
60
|
+
| `onValueChange` | `(value: string \| null) => void` | ์ ํ ๋ณ๊ฒฝ (sdUpdate). `clearable` ๋ก ์ง์ฐ๋ฉด `null` ์ด ์จ๋ค |
|
|
59
61
|
| `onViewChange` | `(view: { year: number; month: number }) => void` | ๋ณด์ด๋ ์ฐยท์ ๋ณ๊ฒฝ (sdViewChange) |
|
|
60
62
|
|
|
61
63
|
### SDatePickerYearListbox
|
|
@@ -76,6 +78,20 @@
|
|
|
76
78
|
|-------|------|-------------|
|
|
77
79
|
| `onValueChange` | `(year: string) => void` | |
|
|
78
80
|
|
|
81
|
+
## Types
|
|
82
|
+
|
|
83
|
+
### SDatePickerMode
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
export type SDatePickerMode = 'date' | 'month' | 'year';
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### SDatePickerSize
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
export type SDatePickerSize = SFieldSize;
|
|
93
|
+
```
|
|
94
|
+
|
|
79
95
|
## Dependencies
|
|
80
96
|
|
|
81
97
|
### Used by
|
|
@@ -87,6 +103,7 @@
|
|
|
87
103
|
|
|
88
104
|
- [SCalendar](../SCalendar)
|
|
89
105
|
- [SField](../SField)
|
|
106
|
+
- [SGhostButton](../SGhostButton)
|
|
90
107
|
- [SIcon](../SIcon)
|
|
91
108
|
|
|
92
109
|
### Graph
|
|
@@ -95,6 +112,7 @@
|
|
|
95
112
|
graph TD;
|
|
96
113
|
SDatePicker --> SCalendar
|
|
97
114
|
SDatePicker --> SField
|
|
115
|
+
SDatePicker --> SGhostButton
|
|
98
116
|
SDatePicker --> SIcon
|
|
99
117
|
SChipFilter --> SDatePicker
|
|
100
118
|
SKeyValueTable --> SDatePicker
|
|
@@ -4,13 +4,14 @@ import { type SIconName } from '../SIcon';
|
|
|
4
4
|
import { type SColor } from '../../lib/color';
|
|
5
5
|
import { type Rule } from '../../lib/form';
|
|
6
6
|
import { type STooltipProps } from '../STooltip';
|
|
7
|
+
import { type SFieldWidth } from '../../lib/field-width';
|
|
7
8
|
export type SDatePickerSize = SFieldSize;
|
|
8
9
|
export type SDatePickerMode = 'date' | 'month' | 'year';
|
|
9
10
|
export interface SDatePickerProps {
|
|
10
11
|
/** ์ ํ ๊ฐ (date: YYYY-MM-DD, month: YYYY-MM, year: YYYY) */
|
|
11
12
|
value?: string | null;
|
|
12
|
-
/** ์ ํ ๋ณ๊ฒฝ (sdUpdate) */
|
|
13
|
-
onValueChange?: (value: string) => void;
|
|
13
|
+
/** ์ ํ ๋ณ๊ฒฝ (sdUpdate). `clearable` ๋ก ์ง์ฐ๋ฉด `null` ์ด ์จ๋ค */
|
|
14
|
+
onValueChange?: (value: string | null) => void;
|
|
14
15
|
/** ๋ณด์ด๋ ์ฐยท์ ๋ณ๊ฒฝ (sdViewChange) */
|
|
15
16
|
onViewChange?: (view: {
|
|
16
17
|
year: number;
|
|
@@ -23,7 +24,29 @@ export interface SDatePickerProps {
|
|
|
23
24
|
/** ์ ํ ๊ฐ๋ฅ ๋ฒ์ [์์, ์ข
๋ฃ] */
|
|
24
25
|
selectable?: [string, string];
|
|
25
26
|
disabled?: boolean;
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* ์ ํ๊ฐ ์ง์ฐ๊ธฐ ๋ฒํผ. ๊ฐ์ด ์์ ๋๋ง ๋ํ๋๊ณ , ๋๋ฅด๋ฉด `onValueChange` ๋ก `null` ์ด ์จ๋ค.
|
|
29
|
+
*
|
|
30
|
+
* **ํ์ ์
๋ ฅ ํ๋์๋ ์ผ์ง ์๋๋ค** โ ์ง์ฐ๋ฉด ๋ค์ ๊ณ ๋ฅด๊ธฐ ์ ๊น์ง ํผ์ด ํต๊ณผํ์ง ๋ชปํ๋ค.
|
|
31
|
+
* `STimePicker` ยท `STimeRangePicker` ยท `SSelect` ์ `clearable` ๊ณผ ๊ฐ์ ๊ท์น์ด๋ค.
|
|
32
|
+
*/
|
|
33
|
+
clearable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* ์ปจํธ๋กค ๋๋น โ ํญ ๋ฑ๊ธ(`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) ยท ์ซ์=px ยท CSS ๊ธธ์ด.
|
|
36
|
+
* ๋ฑ๊ธ์ `--cmp-field-width-*` ํ ํฐ์ผ๋ก ํ๋ฆฌ๋ฏ๋ก ํ ํฐ์ด ๋ฐ๋๋ฉด ํ๋ฉด์ด ๋ฐ๋ผ๊ฐ๋ค.
|
|
37
|
+
* ๊ฐ ๊ธธ์ด์ ์ํ์ด ์์ผ๋ฉด `"100%"` ๋ก ๋์ด ํ ์ ์ฒด๋ฅผ ์ด๋ค.
|
|
38
|
+
*/
|
|
39
|
+
width?: SFieldWidth;
|
|
40
|
+
/**
|
|
41
|
+
* ์ปจํธ๋กค ์ต๋ ๋๋น โ ํญ ๋ฑ๊ธ ยท ์ซ์=px ยท CSS ๊ธธ์ด. ์ง์ ํ์ง ์์ผ๋ฉด ๊ฐ ๊ธธ์ด(`YYYY-MM-DD`)์ ๋ง์ถ
|
|
42
|
+
* ๋ด์ฅ ์ํ(`size='md'` โ `lg`, `'sm'` โ `md`)์ด ๊ฑธ๋ ค, `width="100%"` ๋ฅผ ๋ฐ์๋ ํ ์ ์ฒด๋ก
|
|
43
|
+
* ๋์ด๋์ง ์๋๋ค.
|
|
44
|
+
*
|
|
45
|
+
* ํ์ค๋ฒ์ฒ๋ผ ํญ์ด ์ด๋ฏธ ์ข๊ฒ ์ ํด์ง ์๋ฆฌ์์ ๊ทธ ํญ์ ๊ทธ๋๋ก ์ฑ์์ผ ํ๋ฉด `width="100%"` ์ ํจ๊ป
|
|
46
|
+
* `maxWidth="100%"` ๋ฅผ ์ค๋ค. `0` ์ ์ํ์ ์์ ๊ฑธ์ง ์๋๋ค โ ๋ถ๋ชจ๋ณด๋ค ๋์ด์ง๋ ๊ฒ๊น์ง ํ์ฉํด์ผ
|
|
47
|
+
* ํ ๋๋ง ์ด๋ค.
|
|
48
|
+
*/
|
|
49
|
+
maxWidth?: SFieldWidth;
|
|
27
50
|
name?: string;
|
|
28
51
|
rules?: Rule[];
|
|
29
52
|
status?: SFieldStatus;
|
|
@@ -72,4 +95,4 @@ export interface SDatePickerMonthListboxProps {
|
|
|
72
95
|
* ์์ฒด ํธ๋ฆฌ๊ฑฐ/ํ์ค๋ฒ ์์ด ์ฐ๋+์ ๋ฆฌ์คํธ๋ง ํ์ํ ์ปค์คํ
์กฐํฉ์ ์ฌ์ฌ์ฉํ๋ค. */
|
|
73
96
|
export declare function SDatePickerMonthListbox({ value, anchorYear, selectable, onValueChange, onMonthSelect, className, style, }: SDatePickerMonthListboxProps): import("react").JSX.Element;
|
|
74
97
|
/** SDatePicker โ sd-date-picker ํฌํ
. SField + SPopover(SCalendar). */
|
|
75
|
-
export declare function SDatePicker({ value, onValueChange, onViewChange, mode, size, placeholder, selectable, disabled, width, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDatePickerProps): import("react").JSX.Element;
|
|
98
|
+
export declare function SDatePicker({ value, onValueChange, onViewChange, mode, size, placeholder, selectable, disabled, clearable, width, maxWidth, name, rules, status, label, labelWidth, icon, iconColor, labelTooltip, labelTooltipProps, addonLabel, addonAlign, hint, error, errorMessage, className, style, }: SDatePickerProps): import("react").JSX.Element;
|