@hivcd-printshop/design-system 1.3.1 → 1.3.2

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
@@ -1774,19 +1774,24 @@ var Timetable = (0, import_react9.forwardRef)(function Timetable2({
1774
1774
  var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
1775
1775
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
1776
1776
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "h-12 flex items-center justify-center border-b border-gray02 text-body1-regular text-secondary", children: formatDayLabel(date) }),
1777
- slots.map((slot) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1778
- TimeItem,
1779
- {
1780
- state: slot.state,
1781
- label: slot.time,
1782
- printColor: slot.printColor,
1783
- color: slot.color,
1784
- fluid,
1785
- className: slot.className,
1786
- onClick: onSelectTime ? () => onSelectTime(slot.time) : void 0
1787
- },
1788
- slot.time
1789
- ))
1777
+ slots.map((slot, index) => {
1778
+ const prevState = index > 0 ? slots[index - 1].state : void 0;
1779
+ const withTopBorder = slot.state !== "none" && prevState === "none";
1780
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1781
+ TimeItem,
1782
+ {
1783
+ state: slot.state,
1784
+ label: slot.time,
1785
+ printColor: slot.printColor,
1786
+ color: slot.color,
1787
+ fluid,
1788
+ withTopBorder,
1789
+ className: slot.className,
1790
+ onClick: onSelectTime ? () => onSelectTime(slot.time) : void 0
1791
+ },
1792
+ slot.time
1793
+ );
1794
+ })
1790
1795
  ] });
1791
1796
  };
1792
1797
  var TimeItem = ({
@@ -1795,6 +1800,7 @@ var TimeItem = ({
1795
1800
  printColor,
1796
1801
  color,
1797
1802
  fluid,
1803
+ withTopBorder = false,
1798
1804
  onClick,
1799
1805
  className
1800
1806
  }) => {
@@ -1811,6 +1817,7 @@ var TimeItem = ({
1811
1817
  "text-body1-medium text-center bg-white text-primary",
1812
1818
  // "none"(일정 없음)은 구분선을 그리지 않아 연속된 빈 칸이 하나의 덩어리로 보이게 한다.
1813
1819
  state === "none" ? "bg-gray00 text-transparent" : "border-b border-gray02",
1820
+ withTopBorder && "border-t border-gray02",
1814
1821
  state === "selected" && "bg-black text-white hover:cursor-pointer",
1815
1822
  state === "disabled" && "bg-gray00 text-gray03",
1816
1823
  state === "default" && [