@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.mjs CHANGED
@@ -1700,19 +1700,24 @@ var Timetable = forwardRef4(function Timetable2({
1700
1700
  var DailyTimetable = ({ date, slots, fluid, onSelectTime, className }) => {
1701
1701
  return /* @__PURE__ */ jsxs21("div", { className: cn("flex flex-col", fluid ? "flex-1 min-w-0" : "w-18", className), children: [
1702
1702
  /* @__PURE__ */ jsx37("div", { className: "h-12 flex items-center justify-center border-b border-gray02 text-body1-regular text-secondary", children: formatDayLabel(date) }),
1703
- slots.map((slot) => /* @__PURE__ */ jsx37(
1704
- TimeItem,
1705
- {
1706
- state: slot.state,
1707
- label: slot.time,
1708
- printColor: slot.printColor,
1709
- color: slot.color,
1710
- fluid,
1711
- className: slot.className,
1712
- onClick: onSelectTime ? () => onSelectTime(slot.time) : void 0
1713
- },
1714
- slot.time
1715
- ))
1703
+ slots.map((slot, index) => {
1704
+ const prevState = index > 0 ? slots[index - 1].state : void 0;
1705
+ const withTopBorder = slot.state !== "none" && prevState === "none";
1706
+ return /* @__PURE__ */ jsx37(
1707
+ TimeItem,
1708
+ {
1709
+ state: slot.state,
1710
+ label: slot.time,
1711
+ printColor: slot.printColor,
1712
+ color: slot.color,
1713
+ fluid,
1714
+ withTopBorder,
1715
+ className: slot.className,
1716
+ onClick: onSelectTime ? () => onSelectTime(slot.time) : void 0
1717
+ },
1718
+ slot.time
1719
+ );
1720
+ })
1716
1721
  ] });
1717
1722
  };
1718
1723
  var TimeItem = ({
@@ -1721,6 +1726,7 @@ var TimeItem = ({
1721
1726
  printColor,
1722
1727
  color,
1723
1728
  fluid,
1729
+ withTopBorder = false,
1724
1730
  onClick,
1725
1731
  className
1726
1732
  }) => {
@@ -1737,6 +1743,7 @@ var TimeItem = ({
1737
1743
  "text-body1-medium text-center bg-white text-primary",
1738
1744
  // "none"(일정 없음)은 구분선을 그리지 않아 연속된 빈 칸이 하나의 덩어리로 보이게 한다.
1739
1745
  state === "none" ? "bg-gray00 text-transparent" : "border-b border-gray02",
1746
+ withTopBorder && "border-t border-gray02",
1740
1747
  state === "selected" && "bg-black text-white hover:cursor-pointer",
1741
1748
  state === "disabled" && "bg-gray00 text-gray03",
1742
1749
  state === "default" && [