sellmate-design-system-react 5.0.1 → 6.0.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/index.js CHANGED
@@ -4720,6 +4720,11 @@ var STooltipImpl = /* @__PURE__ */ forwardRef(function STooltip({
4720
4720
  ] });
4721
4721
  });
4722
4722
  var STooltip2 = /* @__PURE__ */ withDisplayName(STooltipImpl, "STooltip");
4723
+ var BODY_PADDING_CLASS = {
4724
+ default: "p-(--sys-space-panel-padding-default)",
4725
+ wide: "p-(--sys-space-panel-padding-wide)",
4726
+ none: ""
4727
+ };
4723
4728
  var topBorderColorClass = {
4724
4729
  default: "bg-(--cmp-sectionHeaderCard-topBorder-color-default)",
4725
4730
  accent: "bg-(--cmp-sectionHeaderCard-topBorder-color-accent)"
@@ -4729,8 +4734,8 @@ var titleSizeClass = {
4729
4734
  sm: "typo-heading-sm"
4730
4735
  };
4731
4736
  var SSectionHeaderCardBodyImpl = /* @__PURE__ */ forwardRef(
4732
- function SSectionHeaderCardBody({ className, children, ...rest }, ref) {
4733
- return /* @__PURE__ */ jsx("div", { ref, className, ...rest, children });
4737
+ function SSectionHeaderCardBody({ padding = "default", className, children, ...rest }, ref) {
4738
+ return /* @__PURE__ */ jsx("div", { ref, className: cn(BODY_PADDING_CLASS[padding], className), ...rest, children });
4734
4739
  }
4735
4740
  );
4736
4741
  var SSectionHeaderCardHeaderImpl = /* @__PURE__ */ forwardRef(
@@ -6387,7 +6392,7 @@ var DEFAULT_MAIN_BUTTON = {
6387
6392
  function SConfirmModal({
6388
6393
  open,
6389
6394
  onOpenChange,
6390
- persistent,
6395
+ persistent = false,
6391
6396
  type = "positive",
6392
6397
  modalTitle = "",
6393
6398
  titleClass,
@@ -7128,6 +7133,8 @@ var SModal = {
7128
7133
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
7129
7134
  var isSameNav = (a, b) => a === b || !!a && !!b && a.columnWidth === b.columnWidth && a.topHeight === b.topHeight && a.foldMs === b.foldMs && a.requireFullHeader === b.requireFullHeader;
7130
7135
  var SLayoutContext = /* @__PURE__ */ createContext(null);
7136
+ var SLAYOUT_MIN_WIDTH = 1366;
7137
+ var SLAYOUT_MIN_WIDTH_VAR = "--s-layout-min-width";
7131
7138
  function useSLayout() {
7132
7139
  const ctx = useContext(SLayoutContext);
7133
7140
  if (!ctx) throw new Error("useSLayout \uC740 <SLayout> \uC548\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");
@@ -7173,6 +7180,10 @@ var SLayout = /* @__PURE__ */ forwardRef(function SLayout2({
7173
7180
  [type, effectiveHeader, useRail, currentFolded, setFolded, registerNav]
7174
7181
  );
7175
7182
  const isFullHeader = effectiveHeader === "full";
7183
+ const minWidthStyle = {
7184
+ containerType: "inline-size",
7185
+ [SLAYOUT_MIN_WIDTH_VAR]: `${SLAYOUT_MIN_WIDTH}px`
7186
+ };
7176
7187
  const frameStyle = isFullHeader ? {
7177
7188
  // 자식이 좌표가 아니라 이름으로 자리를 잡게 한다 — 열·행이 늘어도 자식을 고칠 일이 없다.
7178
7189
  gridTemplateAreas: '"header header" "nav page"',
@@ -7193,7 +7204,7 @@ var SLayout = /* @__PURE__ */ forwardRef(function SLayout2({
7193
7204
  isFullHeader ? "grid" : "flex flex-row",
7194
7205
  className
7195
7206
  ),
7196
- style: { ...frameStyle, ...style },
7207
+ style: { ...minWidthStyle, ...frameStyle, ...style },
7197
7208
  ...rest,
7198
7209
  children
7199
7210
  }
@@ -7817,12 +7828,13 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
7817
7828
  }
7818
7829
  );
7819
7830
  });
7831
+ var MIN_CONTENT_WIDTH = `calc(var(${SLAYOUT_MIN_WIDTH_VAR}, 0px) - 100cqw + 100%)`;
7820
7832
  var BACKGROUND_CLASS = {
7821
7833
  frame: `bg-[var(--sys-color-bg-frame)] ${SCROLLBAR_TRACK_BORDER_CLASS} ${SCROLLBAR_TRACK_BG_CLASS}`,
7822
7834
  neutral: `bg-[var(--sys-color-bg-neutralLight)] ${SCROLLBAR_TRACK_BORDER_CLASS} ${SCROLLBAR_TRACK_BG_WHITE_CLASS}`,
7823
7835
  screen: `bg-[var(--sys-color-bg-screen)] ${SCROLLBAR_TRACK_BORDER_CLASS} ${SCROLLBAR_TRACK_BG_CLASS}`
7824
7836
  };
7825
- var SPage = /* @__PURE__ */ forwardRef(function SPage2({ background = "frame", className, style, children, ...rest }, ref) {
7837
+ var SPage = /* @__PURE__ */ forwardRef(function SPage2({ background = "frame", scrollEndSpacing = true, className, style, children, ...rest }, ref) {
7826
7838
  const layout = useContext(SLayoutContext);
7827
7839
  const gridStyle = layout?.header === "full" ? { gridArea: "page" } : void 0;
7828
7840
  return /* @__PURE__ */ jsx(
@@ -7830,14 +7842,17 @@ var SPage = /* @__PURE__ */ forwardRef(function SPage2({ background = "frame", c
7830
7842
  {
7831
7843
  ref,
7832
7844
  className: cn(
7833
- "box-border min-h-0 min-w-0 flex-1 overflow-auto p-[var(--cmp-pageBody-padding)]",
7845
+ "box-border min-h-0 min-w-0 flex-1 overflow-auto p-[var(--cmp-pageBody-padding-default)]",
7846
+ // 스크롤 끝 여백은 아직 전용 토큰이 없어 스케일 값을 직접 쓴다.
7847
+ // component.pageBody.padding.scrollEnd 가 들어오면 var() 참조로 바꾼다.
7848
+ scrollEndSpacing && "pb-sd-80",
7834
7849
  SCROLLBAR_CLASS,
7835
7850
  BACKGROUND_CLASS[background],
7836
7851
  className
7837
7852
  ),
7838
7853
  style: { ...gridStyle, ...style },
7839
7854
  ...rest,
7840
- children
7855
+ children: /* @__PURE__ */ jsx("div", { style: { minWidth: MIN_CONTENT_WIDTH }, children })
7841
7856
  }
7842
7857
  );
7843
7858
  });
@@ -8095,15 +8110,15 @@ var STEPPER_SIZE_CONFIG = {
8095
8110
  }
8096
8111
  };
8097
8112
  var STEPPER_LAYOUT = {
8098
- containerGap: V2("container-gap"),
8113
+ containerGap: V2("horizontal-gap"),
8099
8114
  itemGap: V2("item-gap"),
8100
- dashWidth: V2("dash-width"),
8115
+ dashWidth: V2("horizontal-dash-width"),
8101
8116
  sequenceRadius: V2("sequence-radius"),
8102
8117
  sequenceBorderWidth: V2("sequence-border-width"),
8103
8118
  sequenceIcon: V2("sequence-icon")
8104
8119
  };
8105
8120
  var STEPPER_COLORS = {
8106
- dash: V2("dash-color"),
8121
+ dash: V2("horizontal-dash-color"),
8107
8122
  sequenceBorder: {
8108
8123
  active: V2("sequence-border-active"),
8109
8124
  default: V2("sequence-border-default"),
@@ -8120,7 +8135,8 @@ var STEPPER_COLORS = {
8120
8135
  },
8121
8136
  text: {
8122
8137
  active: V2("text-active"),
8123
- default: V2("text-default")
8138
+ default: V2("text-default"),
8139
+ completed: V2("text-completed")
8124
8140
  }
8125
8141
  };
8126
8142
  function getItemValue(item, index) {
@@ -8160,7 +8176,7 @@ function SStepper({
8160
8176
  const state2 = getState(index);
8161
8177
  const itemStyle = {
8162
8178
  gap: STEPPER_LAYOUT.itemGap,
8163
- color: state2 === "active" ? STEPPER_COLORS.text.active : STEPPER_COLORS.text.default,
8179
+ color: STEPPER_COLORS.text[state2],
8164
8180
  fontWeight: state2 === "active" ? config.fontWeightActive : config.fontWeightDefault
8165
8181
  };
8166
8182
  const sequenceStyle = {
@@ -8171,7 +8187,7 @@ function SStepper({
8171
8187
  borderWidth: STEPPER_LAYOUT.sequenceBorderWidth,
8172
8188
  borderColor: STEPPER_COLORS.sequenceBorder[state2],
8173
8189
  background: STEPPER_COLORS.sequenceBg[state2],
8174
- color: state2 === "completed" ? STEPPER_COLORS.text.default : STEPPER_COLORS.sequenceText[state2]
8190
+ color: state2 === "completed" ? STEPPER_COLORS.text.completed : STEPPER_COLORS.sequenceText[state2]
8175
8191
  };
8176
8192
  const content = /* @__PURE__ */ jsxs(
8177
8193
  "span",
@@ -10577,10 +10593,10 @@ function SCalendar({
10577
10593
  )
10578
10594
  ] }),
10579
10595
  /* @__PURE__ */ jsx(
10580
- "span",
10596
+ SDivider,
10581
10597
  {
10582
- className: "h-[16px] w-px bg-[var(--cmp-datepicker-calendar-header-divider)]",
10583
- "aria-hidden": true
10598
+ vertical: true,
10599
+ className: "h-[var(--cmp-datepicker-calendar-header-divider-height)] self-center"
10584
10600
  }
10585
10601
  ),
10586
10602
  /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-[var(--cmp-datepicker-calendar-gap)]", children: [
@@ -10671,13 +10687,7 @@ function SCalendar({
10671
10687
  );
10672
10688
  }) }),
10673
10689
  legend.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
10674
- /* @__PURE__ */ jsx(
10675
- "span",
10676
- {
10677
- className: "h-px w-full bg-[var(--cmp-datepicker-calendar-header-divider)]",
10678
- "aria-hidden": true
10679
- }
10680
- ),
10690
+ /* @__PURE__ */ jsx(SDivider, {}),
10681
10691
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-center gap-x-[var(--cmp-datepicker-calendar-legend-group-gap)] gap-y-[4px] text-[11px] leading-[18px]", children: legend.map((item) => /* @__PURE__ */ jsxs(
10682
10692
  "span",
10683
10693
  {
@@ -11122,23 +11132,11 @@ function RangeCalendar({
11122
11132
  ] }),
11123
11133
  /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--cmp-datepicker-calendar-range-panelGap)]", children: [
11124
11134
  renderPanel(y, m, true),
11125
- /* @__PURE__ */ jsx(
11126
- "span",
11127
- {
11128
- className: "w-px shrink-0 self-stretch bg-[var(--cmp-datepicker-calendar-range-divider)]",
11129
- "aria-hidden": true
11130
- }
11131
- ),
11135
+ /* @__PURE__ */ jsx(SDivider, { vertical: true }),
11132
11136
  renderPanel(nextMonthYM.year, nextMonthYM.month, false)
11133
11137
  ] }),
11134
11138
  useTimePicker && /* @__PURE__ */ jsxs(Fragment, { children: [
11135
- /* @__PURE__ */ jsx(
11136
- "span",
11137
- {
11138
- className: "h-px w-full bg-[var(--cmp-datepicker-calendar-range-divider)]",
11139
- "aria-hidden": true
11140
- }
11141
- ),
11139
+ /* @__PURE__ */ jsx(SDivider, {}),
11142
11140
  /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--cmp-datepicker-calendar-time-gap)]", children: [
11143
11141
  renderTimeSection("start", start, "\uBD80\uD130"),
11144
11142
  renderTimeSection("end", end, "\uAE4C\uC9C0")
@@ -13773,6 +13771,6 @@ function STimeRangePicker({
13773
13771
  );
13774
13772
  }
13775
13773
 
13776
- export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, PAGE_BACKGROUNDS, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip2 as SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLayout, SLayoutContext, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SScrollArea, SSectionHeaderCard2 as SSectionHeaderCard, SSelect2 as SSelect, SStepper, SSwitch, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, findGnbAncestors, findGnbRailValue, isColorKey, loading, resolveColor, useSLayout };
13774
+ export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, PAGE_BACKGROUNDS, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip2 as SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLayout, SLayoutContext, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SScrollArea, SSectionHeaderCard2 as SSectionHeaderCard, SSelect2 as SSelect, SStepper, SSwitch, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, findGnbAncestors, findGnbRailValue, isColorKey, loading, resolveColor, useSLayout };
13777
13775
  //# sourceMappingURL=index.js.map
13778
13776
  //# sourceMappingURL=index.js.map