sellmate-design-system-react 5.0.2 → 6.1.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(
@@ -6041,6 +6046,7 @@ var SPopup = /* @__PURE__ */ forwardRef(function SPopup2({
6041
6046
  submitButton,
6042
6047
  onSubmit,
6043
6048
  footerLeft,
6049
+ noPadding = false,
6044
6050
  children,
6045
6051
  className,
6046
6052
  style
@@ -6071,10 +6077,11 @@ var SPopup = /* @__PURE__ */ forwardRef(function SPopup2({
6071
6077
  }
6072
6078
  ),
6073
6079
  /* @__PURE__ */ jsx(
6074
- "div",
6080
+ "main",
6075
6081
  {
6076
6082
  className: cn(
6077
- "min-h-0 flex-1 overflow-auto",
6083
+ "box-border min-h-0 flex-1 overflow-auto",
6084
+ !noPadding && "p-(--sys-space-panel-padding-default)",
6078
6085
  SCROLLBAR_CLASS,
6079
6086
  SCROLLBAR_TRACK_BG_CLASS,
6080
6087
  SCROLLBAR_TRACK_BORDER_CLASS
@@ -6387,7 +6394,7 @@ var DEFAULT_MAIN_BUTTON = {
6387
6394
  function SConfirmModal({
6388
6395
  open,
6389
6396
  onOpenChange,
6390
- persistent,
6397
+ persistent = false,
6391
6398
  type = "positive",
6392
6399
  modalTitle = "",
6393
6400
  titleClass,
@@ -7128,6 +7135,8 @@ var SModal = {
7128
7135
  var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
7129
7136
  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
7137
  var SLayoutContext = /* @__PURE__ */ createContext(null);
7138
+ var SLAYOUT_MIN_WIDTH = 1366;
7139
+ var SLAYOUT_MIN_WIDTH_VAR = "--s-layout-min-width";
7131
7140
  function useSLayout() {
7132
7141
  const ctx = useContext(SLayoutContext);
7133
7142
  if (!ctx) throw new Error("useSLayout \uC740 <SLayout> \uC548\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.");
@@ -7173,6 +7182,10 @@ var SLayout = /* @__PURE__ */ forwardRef(function SLayout2({
7173
7182
  [type, effectiveHeader, useRail, currentFolded, setFolded, registerNav]
7174
7183
  );
7175
7184
  const isFullHeader = effectiveHeader === "full";
7185
+ const minWidthStyle = {
7186
+ containerType: "inline-size",
7187
+ [SLAYOUT_MIN_WIDTH_VAR]: `${SLAYOUT_MIN_WIDTH}px`
7188
+ };
7176
7189
  const frameStyle = isFullHeader ? {
7177
7190
  // 자식이 좌표가 아니라 이름으로 자리를 잡게 한다 — 열·행이 늘어도 자식을 고칠 일이 없다.
7178
7191
  gridTemplateAreas: '"header header" "nav page"',
@@ -7193,7 +7206,7 @@ var SLayout = /* @__PURE__ */ forwardRef(function SLayout2({
7193
7206
  isFullHeader ? "grid" : "flex flex-row",
7194
7207
  className
7195
7208
  ),
7196
- style: { ...frameStyle, ...style },
7209
+ style: { ...minWidthStyle, ...frameStyle, ...style },
7197
7210
  ...rest,
7198
7211
  children
7199
7212
  }
@@ -7817,12 +7830,13 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
7817
7830
  }
7818
7831
  );
7819
7832
  });
7833
+ var MIN_CONTENT_WIDTH = `calc(var(${SLAYOUT_MIN_WIDTH_VAR}, 0px) - 100cqw + 100%)`;
7820
7834
  var BACKGROUND_CLASS = {
7821
7835
  frame: `bg-[var(--sys-color-bg-frame)] ${SCROLLBAR_TRACK_BORDER_CLASS} ${SCROLLBAR_TRACK_BG_CLASS}`,
7822
7836
  neutral: `bg-[var(--sys-color-bg-neutralLight)] ${SCROLLBAR_TRACK_BORDER_CLASS} ${SCROLLBAR_TRACK_BG_WHITE_CLASS}`,
7823
7837
  screen: `bg-[var(--sys-color-bg-screen)] ${SCROLLBAR_TRACK_BORDER_CLASS} ${SCROLLBAR_TRACK_BG_CLASS}`
7824
7838
  };
7825
- var SPage = /* @__PURE__ */ forwardRef(function SPage2({ background = "frame", className, style, children, ...rest }, ref) {
7839
+ var SPage = /* @__PURE__ */ forwardRef(function SPage2({ background = "frame", scrollEndSpacing = true, className, style, children, ...rest }, ref) {
7826
7840
  const layout = useContext(SLayoutContext);
7827
7841
  const gridStyle = layout?.header === "full" ? { gridArea: "page" } : void 0;
7828
7842
  return /* @__PURE__ */ jsx(
@@ -7830,14 +7844,17 @@ var SPage = /* @__PURE__ */ forwardRef(function SPage2({ background = "frame", c
7830
7844
  {
7831
7845
  ref,
7832
7846
  className: cn(
7833
- "box-border min-h-0 min-w-0 flex-1 overflow-auto p-[var(--cmp-pageBody-padding)]",
7847
+ "box-border min-h-0 min-w-0 flex-1 overflow-auto p-[var(--cmp-pageBody-padding-default)]",
7848
+ // 스크롤 끝 여백은 아직 전용 토큰이 없어 스케일 값을 직접 쓴다.
7849
+ // component.pageBody.padding.scrollEnd 가 들어오면 var() 참조로 바꾼다.
7850
+ scrollEndSpacing && "pb-sd-80",
7834
7851
  SCROLLBAR_CLASS,
7835
7852
  BACKGROUND_CLASS[background],
7836
7853
  className
7837
7854
  ),
7838
7855
  style: { ...gridStyle, ...style },
7839
7856
  ...rest,
7840
- children
7857
+ children: /* @__PURE__ */ jsx("div", { style: { minWidth: MIN_CONTENT_WIDTH }, children })
7841
7858
  }
7842
7859
  );
7843
7860
  });
@@ -8095,15 +8112,15 @@ var STEPPER_SIZE_CONFIG = {
8095
8112
  }
8096
8113
  };
8097
8114
  var STEPPER_LAYOUT = {
8098
- containerGap: V2("container-gap"),
8115
+ containerGap: V2("horizontal-gap"),
8099
8116
  itemGap: V2("item-gap"),
8100
- dashWidth: V2("dash-width"),
8117
+ dashWidth: V2("horizontal-dash-width"),
8101
8118
  sequenceRadius: V2("sequence-radius"),
8102
8119
  sequenceBorderWidth: V2("sequence-border-width"),
8103
8120
  sequenceIcon: V2("sequence-icon")
8104
8121
  };
8105
8122
  var STEPPER_COLORS = {
8106
- dash: V2("dash-color"),
8123
+ dash: V2("horizontal-dash-color"),
8107
8124
  sequenceBorder: {
8108
8125
  active: V2("sequence-border-active"),
8109
8126
  default: V2("sequence-border-default"),
@@ -8120,7 +8137,8 @@ var STEPPER_COLORS = {
8120
8137
  },
8121
8138
  text: {
8122
8139
  active: V2("text-active"),
8123
- default: V2("text-default")
8140
+ default: V2("text-default"),
8141
+ completed: V2("text-completed")
8124
8142
  }
8125
8143
  };
8126
8144
  function getItemValue(item, index) {
@@ -8160,7 +8178,7 @@ function SStepper({
8160
8178
  const state2 = getState(index);
8161
8179
  const itemStyle = {
8162
8180
  gap: STEPPER_LAYOUT.itemGap,
8163
- color: state2 === "active" ? STEPPER_COLORS.text.active : STEPPER_COLORS.text.default,
8181
+ color: STEPPER_COLORS.text[state2],
8164
8182
  fontWeight: state2 === "active" ? config.fontWeightActive : config.fontWeightDefault
8165
8183
  };
8166
8184
  const sequenceStyle = {
@@ -8171,7 +8189,7 @@ function SStepper({
8171
8189
  borderWidth: STEPPER_LAYOUT.sequenceBorderWidth,
8172
8190
  borderColor: STEPPER_COLORS.sequenceBorder[state2],
8173
8191
  background: STEPPER_COLORS.sequenceBg[state2],
8174
- color: state2 === "completed" ? STEPPER_COLORS.text.default : STEPPER_COLORS.sequenceText[state2]
8192
+ color: state2 === "completed" ? STEPPER_COLORS.text.completed : STEPPER_COLORS.sequenceText[state2]
8175
8193
  };
8176
8194
  const content = /* @__PURE__ */ jsxs(
8177
8195
  "span",
@@ -10577,10 +10595,10 @@ function SCalendar({
10577
10595
  )
10578
10596
  ] }),
10579
10597
  /* @__PURE__ */ jsx(
10580
- "span",
10598
+ SDivider,
10581
10599
  {
10582
- className: "h-[16px] w-px bg-[var(--cmp-datepicker-calendar-header-divider)]",
10583
- "aria-hidden": true
10600
+ vertical: true,
10601
+ className: "h-[var(--cmp-datepicker-calendar-header-divider-height)] self-center"
10584
10602
  }
10585
10603
  ),
10586
10604
  /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-[var(--cmp-datepicker-calendar-gap)]", children: [
@@ -10671,13 +10689,7 @@ function SCalendar({
10671
10689
  );
10672
10690
  }) }),
10673
10691
  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
- ),
10692
+ /* @__PURE__ */ jsx(SDivider, {}),
10681
10693
  /* @__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
10694
  "span",
10683
10695
  {
@@ -11122,23 +11134,11 @@ function RangeCalendar({
11122
11134
  ] }),
11123
11135
  /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--cmp-datepicker-calendar-range-panelGap)]", children: [
11124
11136
  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
- ),
11137
+ /* @__PURE__ */ jsx(SDivider, { vertical: true }),
11132
11138
  renderPanel(nextMonthYM.year, nextMonthYM.month, false)
11133
11139
  ] }),
11134
11140
  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
- ),
11141
+ /* @__PURE__ */ jsx(SDivider, {}),
11142
11142
  /* @__PURE__ */ jsxs("div", { className: "flex gap-[var(--cmp-datepicker-calendar-time-gap)]", children: [
11143
11143
  renderTimeSection("start", start, "\uBD80\uD130"),
11144
11144
  renderTimeSection("end", end, "\uAE4C\uC9C0")
@@ -13773,6 +13773,6 @@ function STimeRangePicker({
13773
13773
  );
13774
13774
  }
13775
13775
 
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 };
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_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
13777
  //# sourceMappingURL=index.js.map
13778
13778
  //# sourceMappingURL=index.js.map