sellmate-design-system-react 0.1.11 → 0.3.0
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/dist/components/SActionModal/SActionModal.cjs +9 -3
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +9 -3
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +9 -3
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +9 -3
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SCalendar/SCalendar.cjs +9 -3
- package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
- package/dist/components/SCalendar/SCalendar.js +9 -3
- package/dist/components/SCalendar/SCalendar.js.map +1 -1
- package/dist/components/SChip/SChip.cjs +9 -3
- package/dist/components/SChip/SChip.cjs.map +1 -1
- package/dist/components/SChip/SChip.js +9 -3
- package/dist/components/SChip/SChip.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +25 -10
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +25 -10
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.cjs +6 -2
- package/dist/components/SCircleProgress/SCircleProgress.cjs.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.js +6 -2
- package/dist/components/SCircleProgress/SCircleProgress.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +9 -3
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.js +9 -3
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +9 -3
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.js +9 -3
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +9 -3
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +9 -3
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js.map +1 -1
- package/dist/components/SField/SField.cjs +9 -3
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.js +9 -3
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +9 -3
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.js +9 -3
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.cjs +9 -3
- package/dist/components/SGhostButton/SGhostButton.cjs.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.d.ts +7 -1
- package/dist/components/SGhostButton/SGhostButton.js +9 -3
- package/dist/components/SGhostButton/SGhostButton.js.map +1 -1
- package/dist/components/SGnb/SGnb.cjs +3478 -0
- package/dist/components/SGnb/SGnb.cjs.map +1 -0
- package/dist/components/SGnb/SGnb.d.ts +39 -0
- package/dist/components/SGnb/SGnb.js +3456 -0
- package/dist/components/SGnb/SGnb.js.map +1 -0
- package/dist/components/SGnb/gnb.config.d.ts +87 -0
- package/dist/components/SGnb/index.d.ts +2 -0
- package/dist/components/SGuide/SGuide.cjs +9 -3
- package/dist/components/SGuide/SGuide.cjs.map +1 -1
- package/dist/components/SGuide/SGuide.js +9 -3
- package/dist/components/SGuide/SGuide.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +9 -3
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.js +9 -3
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +20 -6
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +20 -6
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLayout/SLayout.cjs +97 -0
- package/dist/components/SLayout/SLayout.cjs.map +1 -0
- package/dist/components/SLayout/SLayout.d.ts +47 -0
- package/dist/components/SLayout/SLayout.js +93 -0
- package/dist/components/SLayout/SLayout.js.map +1 -0
- package/dist/components/SLayout/index.d.ts +1 -0
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs +6 -2
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.js +6 -2
- package/dist/components/SLoadingContainer/SLoadingContainer.js.map +1 -1
- package/dist/components/SLoadingContainer/loading.cjs +6 -2
- package/dist/components/SLoadingContainer/loading.cjs.map +1 -1
- package/dist/components/SLoadingContainer/loading.js +6 -2
- package/dist/components/SLoadingContainer/loading.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +15 -5
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +15 -5
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +9 -3
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.d.ts +10 -0
- package/dist/components/SModalContainer/SModalContainer.js +9 -3
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +9 -3
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.js +9 -3
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPage/SPage.cjs +104 -0
- package/dist/components/SPage/SPage.cjs.map +1 -0
- package/dist/components/SPage/SPage.d.ts +13 -0
- package/dist/components/SPage/SPage.js +102 -0
- package/dist/components/SPage/SPage.js.map +1 -0
- package/dist/components/SPage/index.d.ts +1 -0
- package/dist/components/SPopover/SPopover.cjs +9 -3
- package/dist/components/SPopover/SPopover.cjs.map +1 -1
- package/dist/components/SPopover/SPopover.js +9 -3
- package/dist/components/SPopover/SPopover.js.map +1 -1
- package/dist/components/SPortal/SPortal.cjs +1 -1
- package/dist/components/SPortal/SPortal.cjs.map +1 -1
- package/dist/components/SPortal/SPortal.js +1 -1
- package/dist/components/SPortal/SPortal.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +20 -6
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +20 -6
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +28 -10
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +28 -10
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +9 -3
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.js +9 -3
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/SToast/SToast.cjs +9 -3
- package/dist/components/SToast/SToast.cjs.map +1 -1
- package/dist/components/SToast/SToast.js +9 -3
- package/dist/components/SToast/SToast.js.map +1 -1
- package/dist/components/SToast/SToastContainer.cjs +9 -3
- package/dist/components/SToast/SToastContainer.cjs.map +1 -1
- package/dist/components/SToast/SToastContainer.js +9 -3
- package/dist/components/SToast/SToastContainer.js.map +1 -1
- package/dist/components/STooltip/STooltip.cjs +9 -3
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +9 -3
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +453 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +444 -19
- package/dist/index.js.map +1 -1
- package/dist/styles.css +530 -26
- package/dist/theme.css +70 -14
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { SIconName } from '../SIcon';
|
|
2
|
+
import type { STagColor } from '../STag';
|
|
3
|
+
/** 메뉴 스타일: box = 라운드/좁은 들여쓰기, belt = 풀폭 행/넓은 들여쓰기 */
|
|
4
|
+
export type SGnbType = 'box' | 'belt';
|
|
5
|
+
/** 상단바 구조: fix = GNB 폭에 고정, full = 레이아웃 전폭 */
|
|
6
|
+
export type SGnbHeader = 'fix' | 'full';
|
|
7
|
+
/** 색상(테마): light / dark */
|
|
8
|
+
export type SGnbColor = 'light' | 'dark';
|
|
9
|
+
/** GNB 메뉴 아이템 (재귀 트리). depth1 → depth2 → depth3. */
|
|
10
|
+
export interface SGnbMenuItem {
|
|
11
|
+
/** 표시 텍스트 */
|
|
12
|
+
label: string;
|
|
13
|
+
/** 고유 식별값 (선택 상태 비교 기준) */
|
|
14
|
+
value: string;
|
|
15
|
+
/** depth1 전용 아이콘명 */
|
|
16
|
+
icon?: SIconName;
|
|
17
|
+
/** 우측 Tag 뱃지 텍스트 */
|
|
18
|
+
tag?: string;
|
|
19
|
+
/** 뱃지 색. 미지정 시 blue. */
|
|
20
|
+
tagColor?: STagColor;
|
|
21
|
+
/** 비활성 여부 */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** 하위 아이템 (있으면 펼침/접힘 대상) */
|
|
24
|
+
children?: SGnbMenuItem[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 상단바(header 축). fix → gnbBelt-top-* 토큰, full → gnbBox-* 토큰.
|
|
28
|
+
* 배치까지 이 축이 정한다 — fix 는 GNB 컬럼 안, full 은 레이아웃 전폭.
|
|
29
|
+
*/
|
|
30
|
+
export declare const GNB_HEADER: Record<SGnbHeader, {
|
|
31
|
+
topHeight: string;
|
|
32
|
+
topPaddingX: string;
|
|
33
|
+
topGap: string;
|
|
34
|
+
logoHeight: string;
|
|
35
|
+
}>;
|
|
36
|
+
/** 메뉴(type 축). box → --cmp-gnbBox-*, belt → --cmp-gnbBelt-* */
|
|
37
|
+
export declare const GNB_MENU: Record<SGnbType, {
|
|
38
|
+
bodyPaddingY: string;
|
|
39
|
+
itemMarginX: string;
|
|
40
|
+
itemPaddingY: string;
|
|
41
|
+
itemPaddingRight: string;
|
|
42
|
+
itemGap: string;
|
|
43
|
+
itemRadius: string;
|
|
44
|
+
itemArrow: string;
|
|
45
|
+
depth1PaddingLeft: string;
|
|
46
|
+
depth2PaddingLeft: string;
|
|
47
|
+
depth3PaddingLeft: string;
|
|
48
|
+
depth1Icon: string;
|
|
49
|
+
depth1FontSize: number;
|
|
50
|
+
depth1LineHeight: number;
|
|
51
|
+
depth1FontWeight: number;
|
|
52
|
+
itemFontSize: number;
|
|
53
|
+
itemLineHeight: number;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* 색상(color 축). light → --cmp-light-* 색, dark → --cmp-dark-* 색 (gnb colortype 토큰)
|
|
57
|
+
* 상단바 아이콘 색(--cmp-*-top-icon)은 SGhostButton 이 자체 intent 토큰으로 칠한다:
|
|
58
|
+
* light → --cmp-ghostButton-default-content, dark → --cmp-ghostButton-inverse-content (값 동일).
|
|
59
|
+
*/
|
|
60
|
+
export declare const GNB_COLORS: Record<SGnbColor, {
|
|
61
|
+
panelBg: string;
|
|
62
|
+
topBorder: string;
|
|
63
|
+
itemBgDefault: string;
|
|
64
|
+
itemBgHover: string;
|
|
65
|
+
itemBgSelected: string;
|
|
66
|
+
itemColorDefault: string;
|
|
67
|
+
itemColorHover: string;
|
|
68
|
+
itemColorActive: string;
|
|
69
|
+
itemChevron: string;
|
|
70
|
+
}>;
|
|
71
|
+
/** 축과 무관한 공통 레이아웃. */
|
|
72
|
+
export declare const GNB_COMMON: {
|
|
73
|
+
/** 접힘 레일 폭. header="full" 은 접으면 메뉴만 사라져 레일이 없으므로 fix 전용. */
|
|
74
|
+
foldWidth: string;
|
|
75
|
+
/**
|
|
76
|
+
* 상단바 아이콘 버튼 사이 간격. fix 레일(세로 스택)의 gap·상하 여백에 쓴다.
|
|
77
|
+
* 레일 전용 여백 토큰이 따로 없어 같은 값(8px)인 이 토큰으로 재해석했다.
|
|
78
|
+
*/
|
|
79
|
+
buttonGap: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* 메뉴 고정 폭. 두 header 모두 메뉴는 이 폭으로 좌측에 붙는다(토큰 없음 → 상수).
|
|
83
|
+
* header="full" 에서 SLayout 이 "메뉴 오른쪽 = 페이지" 영역을 잡을 때도 이 값을 쓴다.
|
|
84
|
+
*/
|
|
85
|
+
export declare const GNB_MENU_WIDTH = 240;
|
|
86
|
+
/** value 로 선택된 아이템의 조상 value 목록(자기 자신 제외)을 반환 → 자동 펼침용 */
|
|
87
|
+
export declare function findGnbAncestors(items: SGnbMenuItem[], value: string): string[];
|
|
@@ -2993,9 +2993,12 @@ function SGhostButton({
|
|
|
2993
2993
|
size = "sm",
|
|
2994
2994
|
intent = "default",
|
|
2995
2995
|
ariaLabel = "",
|
|
2996
|
+
ariaPressed,
|
|
2996
2997
|
tooltipText,
|
|
2997
2998
|
disabled = false,
|
|
2998
2999
|
onClick,
|
|
3000
|
+
anchorClassName,
|
|
3001
|
+
anchorStyle,
|
|
2999
3002
|
className,
|
|
3000
3003
|
style
|
|
3001
3004
|
}) {
|
|
@@ -3018,6 +3021,8 @@ function SGhostButton({
|
|
|
3018
3021
|
};
|
|
3019
3022
|
const s = SIZE[size];
|
|
3020
3023
|
const contentColor = disabled ? intent === "inverse" ? "var(--cmp-ghostButton-inverse-disabled)" : "var(--cmp-ghostButton-icon-disabled)" : `var(--cmp-ghostButton-${intent}-content)`;
|
|
3024
|
+
const text = (tooltipText ?? "").trim();
|
|
3025
|
+
const hasTooltip = text !== "";
|
|
3021
3026
|
const btn = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3022
3027
|
"button",
|
|
3023
3028
|
{
|
|
@@ -3025,6 +3030,7 @@ function SGhostButton({
|
|
|
3025
3030
|
disabled,
|
|
3026
3031
|
"aria-disabled": disabled ? "true" : void 0,
|
|
3027
3032
|
"aria-label": ariaLabel.trim() || void 0,
|
|
3033
|
+
"aria-pressed": ariaPressed,
|
|
3028
3034
|
tabIndex: disabled ? -1 : void 0,
|
|
3029
3035
|
onClick: (e) => {
|
|
3030
3036
|
if (disabled) {
|
|
@@ -3058,13 +3064,13 @@ function SGhostButton({
|
|
|
3058
3064
|
]
|
|
3059
3065
|
}
|
|
3060
3066
|
);
|
|
3061
|
-
|
|
3062
|
-
if (text === "") return btn;
|
|
3067
|
+
if (!hasTooltip) return btn;
|
|
3063
3068
|
return /* @__PURE__ */ jsxRuntime.jsxs(RPopover__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
3064
3069
|
/* @__PURE__ */ jsxRuntime.jsx(RPopover__namespace.Anchor, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3065
3070
|
"span",
|
|
3066
3071
|
{
|
|
3067
|
-
className: "inline-flex",
|
|
3072
|
+
className: cn("inline-flex", anchorClassName),
|
|
3073
|
+
style: anchorStyle,
|
|
3068
3074
|
onMouseEnter: openNow,
|
|
3069
3075
|
onMouseLeave: startHide,
|
|
3070
3076
|
onFocus: openNow,
|