sellmate-design-system-react 0.2.0 → 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.
Files changed (122) hide show
  1. package/dist/components/SActionModal/SActionModal.cjs +2 -0
  2. package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
  3. package/dist/components/SActionModal/SActionModal.js +2 -0
  4. package/dist/components/SActionModal/SActionModal.js.map +1 -1
  5. package/dist/components/SBarcodeInput/SBarcodeInput.cjs +2 -0
  6. package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
  7. package/dist/components/SBarcodeInput/SBarcodeInput.js +2 -0
  8. package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
  9. package/dist/components/SCalendar/SCalendar.cjs +2 -0
  10. package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
  11. package/dist/components/SCalendar/SCalendar.js +2 -0
  12. package/dist/components/SCalendar/SCalendar.js.map +1 -1
  13. package/dist/components/SChip/SChip.cjs +2 -0
  14. package/dist/components/SChip/SChip.cjs.map +1 -1
  15. package/dist/components/SChip/SChip.js +2 -0
  16. package/dist/components/SChip/SChip.js.map +1 -1
  17. package/dist/components/SChipInput/SChipInput.cjs +2 -0
  18. package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
  19. package/dist/components/SChipInput/SChipInput.js +2 -0
  20. package/dist/components/SChipInput/SChipInput.js.map +1 -1
  21. package/dist/components/SConfirmModal/SConfirmModal.cjs +2 -0
  22. package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
  23. package/dist/components/SConfirmModal/SConfirmModal.js +2 -0
  24. package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
  25. package/dist/components/SDatePicker/SDatePicker.cjs +2 -0
  26. package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
  27. package/dist/components/SDatePicker/SDatePicker.js +2 -0
  28. package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
  29. package/dist/components/SDateRangePicker/SDateRangePicker.cjs +2 -0
  30. package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
  31. package/dist/components/SDateRangePicker/SDateRangePicker.js +2 -0
  32. package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
  33. package/dist/components/SField/SField.cjs +2 -0
  34. package/dist/components/SField/SField.cjs.map +1 -1
  35. package/dist/components/SField/SField.js +2 -0
  36. package/dist/components/SField/SField.js.map +1 -1
  37. package/dist/components/SFilePicker/SFilePicker.cjs +2 -0
  38. package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
  39. package/dist/components/SFilePicker/SFilePicker.js +2 -0
  40. package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
  41. package/dist/components/SGhostButton/SGhostButton.cjs +2 -0
  42. package/dist/components/SGhostButton/SGhostButton.cjs.map +1 -1
  43. package/dist/components/SGhostButton/SGhostButton.d.ts +3 -1
  44. package/dist/components/SGhostButton/SGhostButton.js +2 -0
  45. package/dist/components/SGhostButton/SGhostButton.js.map +1 -1
  46. package/dist/components/SGnb/SGnb.cjs +394 -213
  47. package/dist/components/SGnb/SGnb.cjs.map +1 -1
  48. package/dist/components/SGnb/SGnb.d.ts +16 -12
  49. package/dist/components/SGnb/SGnb.js +375 -214
  50. package/dist/components/SGnb/SGnb.js.map +1 -1
  51. package/dist/components/SGnb/gnb.config.d.ts +35 -11
  52. package/dist/components/SGnb/index.d.ts +1 -1
  53. package/dist/components/SGuide/SGuide.cjs +2 -0
  54. package/dist/components/SGuide/SGuide.cjs.map +1 -1
  55. package/dist/components/SGuide/SGuide.js +2 -0
  56. package/dist/components/SGuide/SGuide.js.map +1 -1
  57. package/dist/components/SInput/SInput.cjs +2 -0
  58. package/dist/components/SInput/SInput.cjs.map +1 -1
  59. package/dist/components/SInput/SInput.js +2 -0
  60. package/dist/components/SInput/SInput.js.map +1 -1
  61. package/dist/components/SKeyValueTable/SKeyValueTable.cjs +2 -0
  62. package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
  63. package/dist/components/SKeyValueTable/SKeyValueTable.js +2 -0
  64. package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
  65. package/dist/components/SLayout/SLayout.cjs +26 -8
  66. package/dist/components/SLayout/SLayout.cjs.map +1 -1
  67. package/dist/components/SLayout/SLayout.d.ts +15 -9
  68. package/dist/components/SLayout/SLayout.js +26 -8
  69. package/dist/components/SLayout/SLayout.js.map +1 -1
  70. package/dist/components/SLayout/index.d.ts +1 -1
  71. package/dist/components/SLoadingModal/SLoadingModal.cjs +2 -0
  72. package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
  73. package/dist/components/SLoadingModal/SLoadingModal.js +2 -0
  74. package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
  75. package/dist/components/SModalContainer/SModalContainer.cjs +2 -0
  76. package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
  77. package/dist/components/SModalContainer/SModalContainer.js +2 -0
  78. package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
  79. package/dist/components/SNumberInput/SNumberInput.cjs +2 -0
  80. package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
  81. package/dist/components/SNumberInput/SNumberInput.js +2 -0
  82. package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
  83. package/dist/components/SPage/SPage.cjs +27 -9
  84. package/dist/components/SPage/SPage.cjs.map +1 -1
  85. package/dist/components/SPage/SPage.d.ts +2 -2
  86. package/dist/components/SPage/SPage.js +27 -9
  87. package/dist/components/SPage/SPage.js.map +1 -1
  88. package/dist/components/SPopover/SPopover.cjs +2 -0
  89. package/dist/components/SPopover/SPopover.cjs.map +1 -1
  90. package/dist/components/SPopover/SPopover.js +2 -0
  91. package/dist/components/SPopover/SPopover.js.map +1 -1
  92. package/dist/components/SSelect/SSelect.cjs +2 -0
  93. package/dist/components/SSelect/SSelect.cjs.map +1 -1
  94. package/dist/components/SSelect/SSelect.js +2 -0
  95. package/dist/components/SSelect/SSelect.js.map +1 -1
  96. package/dist/components/STable/STable.cjs +2 -0
  97. package/dist/components/STable/STable.cjs.map +1 -1
  98. package/dist/components/STable/STable.js +2 -0
  99. package/dist/components/STable/STable.js.map +1 -1
  100. package/dist/components/STextarea/STextarea.cjs +2 -0
  101. package/dist/components/STextarea/STextarea.cjs.map +1 -1
  102. package/dist/components/STextarea/STextarea.js +2 -0
  103. package/dist/components/STextarea/STextarea.js.map +1 -1
  104. package/dist/components/SToast/SToast.cjs +2 -0
  105. package/dist/components/SToast/SToast.cjs.map +1 -1
  106. package/dist/components/SToast/SToast.js +2 -0
  107. package/dist/components/SToast/SToast.js.map +1 -1
  108. package/dist/components/SToast/SToastContainer.cjs +2 -0
  109. package/dist/components/SToast/SToastContainer.cjs.map +1 -1
  110. package/dist/components/SToast/SToastContainer.js +2 -0
  111. package/dist/components/SToast/SToastContainer.js.map +1 -1
  112. package/dist/components/STooltip/STooltip.cjs +2 -0
  113. package/dist/components/STooltip/STooltip.cjs.map +1 -1
  114. package/dist/components/STooltip/STooltip.js +2 -0
  115. package/dist/components/STooltip/STooltip.js.map +1 -1
  116. package/dist/index.cjs +157 -134
  117. package/dist/index.cjs.map +1 -1
  118. package/dist/index.js +156 -134
  119. package/dist/index.js.map +1 -1
  120. package/dist/styles.css +344 -6
  121. package/dist/theme.css +4 -1
  122. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3915,6 +3915,7 @@ function SGhostButton({
3915
3915
  size = "sm",
3916
3916
  intent = "default",
3917
3917
  ariaLabel = "",
3918
+ ariaPressed,
3918
3919
  tooltipText,
3919
3920
  disabled = false,
3920
3921
  onClick,
@@ -3951,6 +3952,7 @@ function SGhostButton({
3951
3952
  disabled,
3952
3953
  "aria-disabled": disabled ? "true" : void 0,
3953
3954
  "aria-label": ariaLabel.trim() || void 0,
3955
+ "aria-pressed": ariaPressed,
3954
3956
  tabIndex: disabled ? -1 : void 0,
3955
3957
  onClick: (e) => {
3956
3958
  if (disabled) {
@@ -4878,13 +4880,27 @@ var belt = (p) => `var(--cmp-gnbBelt-${p})`;
4878
4880
  var box = (p) => `var(--cmp-gnbBox-${p})`;
4879
4881
  var light = (p) => `var(--cmp-light-${p})`;
4880
4882
  var dark = (p) => `var(--cmp-dark-${p})`;
4881
- var GNB_LAYOUT = {
4882
- // 사용자 명명: type="box" → gnbBox 토큰(둥금), type="belt" → gnbBelt 토큰(각짐)
4883
- box: {
4883
+ var GNB_HEADER = {
4884
+ fix: {
4885
+ topHeight: belt("top-height"),
4886
+ topPaddingX: belt("top-paddingX"),
4887
+ topGap: belt("top-gap"),
4888
+ logoHeight: belt("logo-height")
4889
+ },
4890
+ full: {
4891
+ topHeight: box("top-height"),
4884
4892
  topPaddingX: box("paddingX"),
4885
4893
  topGap: box("gap"),
4886
4894
  // 상단바 gap (버튼 간 세부 gap 은 --cmp-gnbBox-button-gap)
4887
- bodyPadding: box("menu-body-padding"),
4895
+ logoHeight: box("logo-height")
4896
+ }
4897
+ };
4898
+ var GNB_MENU = {
4899
+ box: {
4900
+ // menu.body.padding 은 전방향 토큰 → 세로 패딩과 아이템 좌우 여백 양쪽에 쓴다
4901
+ bodyPaddingY: box("menu-body-padding"),
4902
+ itemMarginX: box("menu-body-padding"),
4903
+ itemPaddingY: box("item-paddingY"),
4888
4904
  itemPaddingRight: box("item-paddingRight"),
4889
4905
  itemGap: box("item-gap"),
4890
4906
  itemRadius: box("item-radius"),
@@ -4904,9 +4920,10 @@ var GNB_LAYOUT = {
4904
4920
  // token: gnbBox.item.typography.default.lineHeight
4905
4921
  },
4906
4922
  belt: {
4907
- topPaddingX: belt("top-paddingX"),
4908
- topGap: belt("top-gap"),
4909
- bodyPadding: belt("body-paddingY"),
4923
+ bodyPaddingY: belt("body-paddingY"),
4924
+ itemMarginX: "0px",
4925
+ // belt 토큰에 가로 여백 없음 → 풀폭 행 (들여쓰기는 depth*-paddingLeft 전담)
4926
+ itemPaddingY: belt("item-paddingY"),
4910
4927
  itemPaddingRight: belt("item-paddingRight"),
4911
4928
  itemGap: belt("item-gap"),
4912
4929
  itemRadius: "0px",
@@ -4936,7 +4953,9 @@ var GNB_COLORS = {
4936
4953
  itemBgHover: light("item-bg-hover"),
4937
4954
  itemBgSelected: light("item-bg-selected"),
4938
4955
  itemColorDefault: light("item-fg-default"),
4939
- itemColorActive: light("item-fg-selected")
4956
+ itemColorHover: light("item-fg-hover"),
4957
+ itemColorActive: light("item-fg-selected"),
4958
+ itemChevron: light("item-chevron")
4940
4959
  },
4941
4960
  dark: {
4942
4961
  panelBg: dark("bg"),
@@ -4945,18 +4964,19 @@ var GNB_COLORS = {
4945
4964
  itemBgHover: dark("item-bg-hover"),
4946
4965
  itemBgSelected: dark("item-bg-selected"),
4947
4966
  itemColorDefault: dark("item-fg-default"),
4948
- itemColorActive: dark("item-fg-selected")
4967
+ itemColorHover: dark("item-fg-hover"),
4968
+ itemColorActive: dark("item-fg-selected"),
4969
+ itemChevron: dark("item-chevron")
4949
4970
  }
4950
4971
  };
4951
4972
  var GNB_COMMON = {
4952
- topHeight: box("top-height"),
4953
- // 56 (box=belt 동일)
4954
- logoHeight: box("logo-height"),
4955
- // 32
4956
- itemPaddingY: box("item-paddingY"),
4957
- // 6
4958
- foldWidth: belt("fold-width")
4959
- // 48 (belt 토큰 공유)
4973
+ /** 접힘 레일 폭. header="full" 은 접으면 메뉴만 사라져 레일이 없으므로 fix 전용. */
4974
+ foldWidth: belt("fold-width"),
4975
+ /**
4976
+ * 상단바 아이콘 버튼 사이 간격. fix 레일(세로 스택)의 gap·상하 여백에 쓴다.
4977
+ * 레일 전용 여백 토큰이 따로 없어 같은 값(8px)인 이 토큰으로 재해석했다.
4978
+ */
4979
+ buttonGap: box("button-gap")
4960
4980
  };
4961
4981
  var GNB_MENU_WIDTH = 240;
4962
4982
  function findGnbAncestors(items, value) {
@@ -4980,6 +5000,7 @@ function useSLayout() {
4980
5000
  }
4981
5001
  var SLayout = forwardRef(function SLayout2({
4982
5002
  type = "box",
5003
+ header = "fix",
4983
5004
  folded,
4984
5005
  defaultFolded = false,
4985
5006
  onFoldedChange,
@@ -4999,22 +5020,23 @@ var SLayout = forwardRef(function SLayout2({
4999
5020
  [isControlled, onFoldedChange]
5000
5021
  );
5001
5022
  const ctx = useMemo(
5002
- () => ({ type, folded: currentFolded, setFolded }),
5003
- [type, currentFolded, setFolded]
5023
+ () => ({ type, header, folded: currentFolded, setFolded }),
5024
+ [type, header, currentFolded, setFolded]
5004
5025
  );
5005
- const isBox = type === "box";
5006
- const frameStyle = isBox ? {
5026
+ const isFullHeader = header === "full";
5027
+ const frameStyle = isFullHeader ? {
5007
5028
  gridTemplateColumns: `${currentFolded ? 0 : GNB_MENU_WIDTH}px 1fr`,
5008
- gridTemplateRows: `${GNB_COMMON.topHeight} 1fr`
5029
+ gridTemplateRows: `${GNB_HEADER[header].topHeight} 1fr`
5009
5030
  } : void 0;
5010
5031
  return /* @__PURE__ */ jsx(SLayoutContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
5011
5032
  "div",
5012
5033
  {
5013
5034
  ref,
5014
5035
  "data-type": type,
5036
+ "data-header": header,
5015
5037
  className: cn(
5016
5038
  "box-border h-full overflow-hidden",
5017
- isBox ? "grid" : "flex flex-row",
5039
+ isFullHeader ? "grid" : "flex flex-row",
5018
5040
  className
5019
5041
  ),
5020
5042
  style: { ...frameStyle, ...style },
@@ -5023,9 +5045,10 @@ var SLayout = forwardRef(function SLayout2({
5023
5045
  }
5024
5046
  ) });
5025
5047
  });
5026
- var DEPTH_PADDING_LEFT = (L, depth) => depth === 1 ? L.depth1PaddingLeft : depth === 2 ? L.depth2PaddingLeft : L.depth3PaddingLeft;
5048
+ var DEPTH_PADDING_LEFT = (M, depth) => depth === 1 ? M.depth1PaddingLeft : depth === 2 ? M.depth2PaddingLeft : M.depth3PaddingLeft;
5027
5049
  var SGnb = forwardRef(function SGnb2({
5028
5050
  type: typeProp,
5051
+ header: headerProp,
5029
5052
  color = "light",
5030
5053
  items,
5031
5054
  value = "",
@@ -5034,14 +5057,17 @@ var SGnb = forwardRef(function SGnb2({
5034
5057
  onFoldChange,
5035
5058
  onLauncherClick,
5036
5059
  logo,
5037
- search,
5060
+ ariaLabel = "global navigation",
5038
5061
  className,
5039
- style
5062
+ style,
5063
+ ...rest
5040
5064
  }, ref) {
5041
5065
  const layout = useContext(SLayoutContext);
5042
5066
  const type = typeProp ?? layout?.type ?? "box";
5067
+ const header = headerProp ?? layout?.header ?? "fix";
5043
5068
  const folded = foldedProp ?? layout?.folded ?? false;
5044
- const L = GNB_LAYOUT[type];
5069
+ const H = GNB_HEADER[header];
5070
+ const M = GNB_MENU[type];
5045
5071
  const C = GNB_COLORS[color];
5046
5072
  const [expandedKeys, setExpandedKeys] = useState(
5047
5073
  () => new Set(findGnbAncestors(items, value))
@@ -5051,6 +5077,7 @@ var SGnb = forwardRef(function SGnb2({
5051
5077
  const ancestors = findGnbAncestors(items, value);
5052
5078
  if (ancestors.length === 0) return;
5053
5079
  setExpandedKeys((prev) => {
5080
+ if (ancestors.every((a) => prev.has(a))) return prev;
5054
5081
  const next = new Set(prev);
5055
5082
  ancestors.forEach((a) => next.add(a));
5056
5083
  return next;
@@ -5075,148 +5102,142 @@ var SGnb = forwardRef(function SGnb2({
5075
5102
  const handleFoldToggle = () => {
5076
5103
  const next = !folded;
5077
5104
  onFoldChange?.(next);
5078
- layout?.setFolded(next);
5105
+ if (foldedProp === void 0) layout?.setFolded(next);
5079
5106
  };
5080
- const iconBtnClass = "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent p-1.5";
5081
5107
  const renderItem = (item, depth) => {
5082
5108
  const hasChildren = !!(item.children && item.children.length > 0);
5083
5109
  const isSelected = !hasChildren && item.value === value;
5084
5110
  const isExpanded = expandedKeys.has(item.value);
5085
- const isHovered = hoveredKey === item.value;
5086
- const bg = isSelected ? C.itemBgSelected : isHovered && !item.disabled ? C.itemBgHover : C.itemBgDefault;
5111
+ const isHovered = hoveredKey === item.value && !item.disabled;
5087
5112
  const itemStyle = {
5088
- gap: L.itemGap,
5089
- paddingTop: GNB_COMMON.itemPaddingY,
5090
- paddingBottom: GNB_COMMON.itemPaddingY,
5091
- paddingRight: L.itemPaddingRight,
5092
- paddingLeft: DEPTH_PADDING_LEFT(L, depth),
5093
- marginLeft: L.bodyPadding,
5094
- marginRight: L.bodyPadding,
5095
- borderRadius: L.itemRadius,
5096
- backgroundColor: bg,
5097
- color: isSelected ? C.itemColorActive : C.itemColorDefault,
5098
- fontSize: depth === 1 ? L.depth1FontSize : L.itemFontSize,
5099
- lineHeight: `${depth === 1 ? L.depth1LineHeight : L.itemLineHeight}px`,
5100
- fontWeight: depth === 1 || isSelected ? L.depth1FontWeight : 400,
5113
+ gap: M.itemGap,
5114
+ paddingTop: M.itemPaddingY,
5115
+ paddingBottom: M.itemPaddingY,
5116
+ paddingRight: M.itemPaddingRight,
5117
+ paddingLeft: DEPTH_PADDING_LEFT(M, depth),
5118
+ marginLeft: M.itemMarginX,
5119
+ marginRight: M.itemMarginX,
5120
+ borderRadius: M.itemRadius,
5121
+ backgroundColor: isSelected ? C.itemBgSelected : isHovered ? C.itemBgHover : C.itemBgDefault,
5122
+ color: isSelected ? C.itemColorActive : isHovered ? C.itemColorHover : C.itemColorDefault,
5123
+ // <button> UA 폰트(Arial 13.3px)를 끊고 앱 폰트를 잇는다
5124
+ fontFamily: "inherit",
5125
+ fontSize: depth === 1 ? M.depth1FontSize : M.itemFontSize,
5126
+ lineHeight: `${depth === 1 ? M.depth1LineHeight : M.itemLineHeight}px`,
5127
+ fontWeight: depth === 1 || isSelected ? M.depth1FontWeight : 400,
5101
5128
  opacity: item.disabled ? 0.4 : 1,
5102
5129
  cursor: item.disabled ? "not-allowed" : "pointer"
5103
5130
  };
5104
- return /* @__PURE__ */ jsxs("div", { children: [
5105
- /* @__PURE__ */ jsxs(
5106
- "div",
5107
- {
5108
- role: hasChildren ? "button" : "menuitem",
5109
- tabIndex: item.disabled ? -1 : 0,
5110
- "aria-disabled": item.disabled || void 0,
5111
- "aria-expanded": hasChildren ? isExpanded : void 0,
5112
- "aria-current": isSelected ? "page" : void 0,
5113
- className: "box-border flex select-none items-center transition-colors duration-150",
5114
- style: itemStyle,
5115
- onClick: () => handleItemClick(item),
5116
- onMouseEnter: () => setHoveredKey(item.value),
5117
- onMouseLeave: () => setHoveredKey((prev) => prev === item.value ? null : prev),
5118
- onKeyDown: (e) => {
5119
- if (e.key === "Enter" || e.key === " ") {
5120
- e.preventDefault();
5121
- handleItemClick(item);
5122
- }
5123
- },
5124
- children: [
5125
- depth === 1 && item.icon && /* @__PURE__ */ jsx(SIcon, { name: item.icon, size: L.depth1Icon, className: "shrink-0" }),
5126
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: item.label }),
5127
- item.tag !== void 0 && item.tag !== "" && /* @__PURE__ */ jsx(
5128
- STag,
5129
- {
5130
- shape: "square",
5131
- size: "xs",
5132
- color: isSelected ? "blue" : "grey",
5133
- label: item.tag,
5134
- className: "shrink-0"
5135
- }
5136
- ),
5137
- hasChildren && /* @__PURE__ */ jsx(
5138
- SIcon,
5139
- {
5140
- name: "chevronDown",
5141
- size: L.itemArrow,
5142
- rotate: isExpanded ? 180 : 0,
5143
- className: "shrink-0 transition-transform duration-150"
5144
- }
5145
- )
5146
- ]
5147
- }
5148
- ),
5149
- hasChildren && isExpanded && item.children.map((child) => renderItem(child, depth + 1))
5150
- ] }, item.value);
5131
+ return (
5132
+ // li flex-col 로 둬야 버튼이 좌우 마진만큼 안쪽으로 들어가고,
5133
+ // 하위 ul 은 마진 없이 전폭을 써서 depth*-paddingLeft 가 들여쓰기를 단독으로 책임진다.
5134
+ /* @__PURE__ */ jsxs("li", { className: "flex flex-col", children: [
5135
+ /* @__PURE__ */ jsxs(
5136
+ "button",
5137
+ {
5138
+ type: "button",
5139
+ disabled: item.disabled,
5140
+ "aria-expanded": hasChildren ? isExpanded : void 0,
5141
+ "aria-current": isSelected ? "page" : void 0,
5142
+ className: "box-border flex select-none items-center border-none bg-transparent text-left transition-colors duration-150",
5143
+ style: itemStyle,
5144
+ onClick: () => handleItemClick(item),
5145
+ onMouseEnter: () => setHoveredKey(item.value),
5146
+ onMouseLeave: () => setHoveredKey((prev) => prev === item.value ? null : prev),
5147
+ children: [
5148
+ depth === 1 && item.icon && /* @__PURE__ */ jsx(SIcon, { name: item.icon, size: M.depth1Icon, className: "shrink-0" }),
5149
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: item.label }),
5150
+ item.tag !== void 0 && item.tag !== "" && /* @__PURE__ */ jsx(
5151
+ STag,
5152
+ {
5153
+ shape: "square",
5154
+ size: "xs",
5155
+ color: item.tagColor ?? "blue",
5156
+ label: item.tag,
5157
+ className: "shrink-0"
5158
+ }
5159
+ ),
5160
+ hasChildren && /* @__PURE__ */ jsx(
5161
+ SIcon,
5162
+ {
5163
+ name: "chevronDown",
5164
+ size: M.itemArrow,
5165
+ color: C.itemChevron,
5166
+ rotate: isExpanded ? 180 : 0,
5167
+ className: "shrink-0 transition-transform duration-150"
5168
+ }
5169
+ )
5170
+ ]
5171
+ }
5172
+ ),
5173
+ hasChildren && isExpanded && /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: item.children.map((child) => renderItem(child, depth + 1)) })
5174
+ ] }, item.value)
5175
+ );
5176
+ };
5177
+ const railFolded = folded && header === "fix";
5178
+ const rootWidth = header === "full" ? "100%" : folded ? GNB_COMMON.foldWidth : GNB_MENU_WIDTH;
5179
+ const rootStyle = {
5180
+ width: rootWidth,
5181
+ ...header === "full" ? { gridArea: "1 / 1 / -1 / -1", pointerEvents: "none" } : { backgroundColor: C.panelBg },
5182
+ ...style
5151
5183
  };
5152
- const railFolded = folded && type === "belt";
5153
- const rootWidth = type === "box" ? "100%" : folded ? GNB_COMMON.foldWidth : GNB_MENU_WIDTH;
5154
- const inBoxGrid = !!layout && type === "box";
5155
- const rootStyle = useMemo(
5156
- () => ({
5157
- width: rootWidth,
5158
- ...inBoxGrid ? { gridArea: "1 / 1 / -1 / -1" } : null,
5159
- ...style
5160
- }),
5161
- [rootWidth, inBoxGrid, style]
5162
- );
5163
- const iconColor = C.itemColorDefault;
5164
5184
  return /* @__PURE__ */ jsxs(
5165
5185
  "div",
5166
5186
  {
5167
5187
  ref,
5168
- className: cn(
5169
- "box-border flex flex-col",
5170
- type === "box" && !inBoxGrid ? "h-auto" : "h-full",
5171
- className
5172
- ),
5188
+ className: cn("box-border flex h-full shrink-0 flex-col", className),
5173
5189
  style: rootStyle,
5174
5190
  "data-type": type,
5191
+ "data-header": header,
5175
5192
  "data-color": color,
5193
+ ...rest,
5176
5194
  children: [
5177
5195
  /* @__PURE__ */ jsxs(
5178
5196
  "div",
5179
5197
  {
5180
5198
  className: cn("box-border flex items-center", railFolded && "flex-col"),
5181
5199
  style: {
5182
- gap: railFolded ? 8 : L.topGap,
5183
- height: railFolded ? "auto" : GNB_COMMON.topHeight,
5184
- padding: railFolded ? "8px 0" : `0 ${L.topPaddingX}`,
5200
+ gap: railFolded ? GNB_COMMON.buttonGap : H.topGap,
5201
+ height: railFolded ? "auto" : H.topHeight,
5202
+ padding: railFolded ? `${GNB_COMMON.buttonGap} 0` : `0 ${H.topPaddingX}`,
5185
5203
  borderBottom: `1px solid ${C.topBorder}`,
5186
5204
  backgroundColor: C.panelBg,
5187
- color: iconColor
5205
+ pointerEvents: "auto",
5206
+ // 아이콘 버튼은 자체 ghostButton 토큰을 쓰므로, 이 색은 logo 슬롯 상속용
5207
+ color: C.itemColorDefault
5188
5208
  },
5189
5209
  children: [
5190
- /* @__PURE__ */ jsx(
5191
- "button",
5210
+ onLauncherClick && /* @__PURE__ */ jsx(
5211
+ SGhostButton,
5192
5212
  {
5193
- type: "button",
5194
- "aria-label": "app launcher",
5195
- className: iconBtnClass,
5213
+ icon: "launcher",
5214
+ size: "xs",
5215
+ intent: color === "dark" ? "inverse" : "default",
5216
+ ariaLabel: "app launcher",
5196
5217
  onClick: onLauncherClick,
5197
- children: /* @__PURE__ */ jsx(SIcon, { name: "launcher", size: 20 })
5218
+ className: "shrink-0"
5198
5219
  }
5199
5220
  ),
5200
- !railFolded && logo && /* @__PURE__ */ jsx("div", { className: "flex items-center", style: { height: GNB_COMMON.logoHeight }, children: logo }),
5201
- !railFolded && /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: search }),
5221
+ !railFolded && logo && /* @__PURE__ */ jsx("div", { className: "flex items-center", style: { height: H.logoHeight }, children: logo }),
5202
5222
  /* @__PURE__ */ jsx(
5203
- "button",
5223
+ SGhostButton,
5204
5224
  {
5205
- type: "button",
5206
- "aria-label": "toggle navigation",
5207
- "aria-pressed": folded,
5208
- className: cn(iconBtnClass, !railFolded && "ml-auto"),
5225
+ icon: "sidebar",
5226
+ size: "xs",
5227
+ intent: color === "dark" ? "inverse" : "default",
5228
+ ariaLabel: "toggle navigation",
5229
+ ariaPressed: folded,
5209
5230
  onClick: handleFoldToggle,
5210
- children: /* @__PURE__ */ jsx(SIcon, { name: "sidebar", size: 20 })
5231
+ className: cn("shrink-0", !railFolded && "ml-auto")
5211
5232
  }
5212
5233
  )
5213
5234
  ]
5214
5235
  }
5215
5236
  ),
5216
5237
  !folded && /* @__PURE__ */ jsx(
5217
- "div",
5238
+ "nav",
5218
5239
  {
5219
- role: "menu",
5240
+ "aria-label": ariaLabel,
5220
5241
  className: "flex flex-col overflow-y-auto",
5221
5242
  style: {
5222
5243
  width: GNB_MENU_WIDTH,
@@ -5225,11 +5246,12 @@ var SGnb = forwardRef(function SGnb2({
5225
5246
  flexShrink: 1,
5226
5247
  flexBasis: "auto",
5227
5248
  minHeight: 0,
5228
- paddingTop: L.bodyPadding,
5229
- paddingBottom: L.bodyPadding,
5230
- backgroundColor: C.panelBg
5249
+ paddingTop: M.bodyPaddingY,
5250
+ paddingBottom: M.bodyPaddingY,
5251
+ backgroundColor: C.panelBg,
5252
+ pointerEvents: "auto"
5231
5253
  },
5232
- children: items.map((item) => renderItem(item, 1))
5254
+ children: /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: items.map((item) => renderItem(item, 1)) })
5233
5255
  }
5234
5256
  )
5235
5257
  ]
@@ -5238,7 +5260,7 @@ var SGnb = forwardRef(function SGnb2({
5238
5260
  });
5239
5261
  var SPage = forwardRef(function SPage2({ className, style, children, ...rest }, ref) {
5240
5262
  const layout = useContext(SLayoutContext);
5241
- const gridStyle = layout?.type === "box" ? { gridColumn: 2, gridRow: 2 } : void 0;
5263
+ const gridStyle = layout?.header === "full" ? { gridColumn: 2, gridRow: 2 } : void 0;
5242
5264
  return /* @__PURE__ */ jsx(
5243
5265
  "main",
5244
5266
  {
@@ -9784,6 +9806,6 @@ var SBarcodeInput = forwardRef(
9784
9806
  }
9785
9807
  );
9786
9808
 
9787
- export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_LAYOUT, GNB_MENU_WIDTH, ICONS, SActionModal, SBadge, SBarcodeInput, SButton, SCalendar, SCallout, SCard, SCheckbox, SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDropdownButton, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLayout, SLayoutContext, SLinearProgress, SLoadingContainer, SLoadingModal, SLoadingViewport, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SSelect, SSwitch, STable, STabs, STag, STextLink, STextarea, SToast, SToastContainer, SToggle, STooltip, TAG_COLORS, TAG_SHAPES, TAG_SIZES, buttonPreset, cn, findGnbAncestors, isColorKey, loading, resolveColor, useSLayout };
9809
+ export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, ICONS, SActionModal, SBadge, SBarcodeInput, SButton, SCalendar, SCallout, SCard, SCheckbox, SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDropdownButton, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLayout, SLayoutContext, SLinearProgress, SLoadingContainer, SLoadingModal, SLoadingViewport, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SSelect, SSwitch, STable, STabs, STag, STextLink, STextarea, SToast, SToastContainer, SToggle, STooltip, TAG_COLORS, TAG_SHAPES, TAG_SIZES, buttonPreset, cn, findGnbAncestors, isColorKey, loading, resolveColor, useSLayout };
9788
9810
  //# sourceMappingURL=index.js.map
9789
9811
  //# sourceMappingURL=index.js.map