@x-plat/design-system 0.3.9 → 0.4.1
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/components/Calendar/index.cjs +86 -78
- package/dist/components/Calendar/index.css +3 -2
- package/dist/components/Calendar/index.d.cts +2 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/index.js +86 -78
- package/dist/components/DatePicker/index.cjs +7 -6
- package/dist/components/DatePicker/index.css +9 -1
- package/dist/components/DatePicker/index.js +7 -6
- package/dist/components/Modal/index.css +4 -0
- package/dist/components/index.cjs +93 -84
- package/dist/components/index.css +12 -3
- package/dist/components/index.js +93 -84
- package/dist/index.cjs +93 -84
- package/dist/index.css +12 -3
- package/dist/index.js +93 -84
- package/package.json +1 -1
|
@@ -1658,6 +1658,7 @@ var Calendar = (props) => {
|
|
|
1658
1658
|
locale = "ko",
|
|
1659
1659
|
minDate,
|
|
1660
1660
|
maxDate,
|
|
1661
|
+
selectedColor,
|
|
1661
1662
|
showToday = true,
|
|
1662
1663
|
className
|
|
1663
1664
|
} = props;
|
|
@@ -1701,90 +1702,97 @@ var Calendar = (props) => {
|
|
|
1701
1702
|
};
|
|
1702
1703
|
const getEventsForDay = (date) => events.filter((e) => isSameDay(e.date, date));
|
|
1703
1704
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
1704
|
-
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
i === 6 && "saturday"
|
|
1718
|
-
),
|
|
1719
|
-
children: label
|
|
1720
|
-
},
|
|
1721
|
-
label
|
|
1722
|
-
)) }),
|
|
1723
|
-
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1724
|
-
const dayEvents = getEventsForDay(day.date);
|
|
1725
|
-
const disabled = isDisabled(day.date);
|
|
1726
|
-
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1727
|
-
if (renderDay) {
|
|
1728
|
-
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
1706
|
+
"div",
|
|
1707
|
+
{
|
|
1708
|
+
className: clsx_default("lib-xplat-calendar", className),
|
|
1709
|
+
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
1710
|
+
children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { className: "calendar-header", children: [
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804 \uB2EC", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ChevronLeftIcon_default, {}) }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "calendar-title", children: locale === "ko" ? `${year}\uB144 ${MONTH_LABELS.ko[month]}` : `${MONTH_LABELS.en[month]} ${year}` }),
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C \uB2EC", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(ChevronRightIcon_default, {}) }),
|
|
1715
|
+
showToday && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
1716
|
+
] }),
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
1729
1718
|
"div",
|
|
1730
1719
|
{
|
|
1731
1720
|
className: clsx_default(
|
|
1732
|
-
"calendar-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
isSelected && "selected",
|
|
1736
|
-
day.isToday && "today"
|
|
1721
|
+
"calendar-weekday",
|
|
1722
|
+
i === 0 && "sunday",
|
|
1723
|
+
i === 6 && "saturday"
|
|
1737
1724
|
),
|
|
1738
|
-
|
|
1739
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1740
|
-
},
|
|
1741
|
-
children: renderDay(day, dayEvents)
|
|
1742
|
-
},
|
|
1743
|
-
idx
|
|
1744
|
-
);
|
|
1745
|
-
}
|
|
1746
|
-
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
1747
|
-
"div",
|
|
1748
|
-
{
|
|
1749
|
-
className: clsx_default(
|
|
1750
|
-
"calendar-day",
|
|
1751
|
-
!day.isCurrentMonth && "outside",
|
|
1752
|
-
disabled && "disabled",
|
|
1753
|
-
isSelected && "selected",
|
|
1754
|
-
day.isToday && "today",
|
|
1755
|
-
day.isSunday && "sunday",
|
|
1756
|
-
day.isSaturday && "saturday"
|
|
1757
|
-
),
|
|
1758
|
-
onClick: () => {
|
|
1759
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1725
|
+
children: label
|
|
1760
1726
|
},
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1727
|
+
label
|
|
1728
|
+
)) }),
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1730
|
+
const dayEvents = getEventsForDay(day.date);
|
|
1731
|
+
const disabled = isDisabled(day.date);
|
|
1732
|
+
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1733
|
+
if (renderDay) {
|
|
1734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
1735
|
+
"div",
|
|
1736
|
+
{
|
|
1737
|
+
className: clsx_default(
|
|
1738
|
+
"calendar-day",
|
|
1739
|
+
!day.isCurrentMonth && "outside",
|
|
1740
|
+
disabled && "disabled",
|
|
1741
|
+
isSelected && "selected",
|
|
1742
|
+
day.isToday && "today"
|
|
1743
|
+
),
|
|
1744
|
+
onClick: () => {
|
|
1745
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1774
1746
|
},
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1747
|
+
children: renderDay(day, dayEvents)
|
|
1748
|
+
},
|
|
1749
|
+
idx
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
|
|
1753
|
+
"div",
|
|
1754
|
+
{
|
|
1755
|
+
className: clsx_default(
|
|
1756
|
+
"calendar-day",
|
|
1757
|
+
!day.isCurrentMonth && "outside",
|
|
1758
|
+
disabled && "disabled",
|
|
1759
|
+
isSelected && "selected",
|
|
1760
|
+
day.isToday && "today",
|
|
1761
|
+
day.isSunday && "sunday",
|
|
1762
|
+
day.isSaturday && "saturday"
|
|
1763
|
+
),
|
|
1764
|
+
onClick: () => {
|
|
1765
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1766
|
+
},
|
|
1767
|
+
children: [
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "calendar-day-number", children: day.day }),
|
|
1769
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { className: "calendar-day-events", children: [
|
|
1770
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
1771
|
+
"span",
|
|
1772
|
+
{
|
|
1773
|
+
className: "calendar-event-dot",
|
|
1774
|
+
style: { backgroundColor: event.color ?? "var(--xplat-blue-500)" },
|
|
1775
|
+
title: event.label,
|
|
1776
|
+
onClick: (e) => {
|
|
1777
|
+
e.stopPropagation();
|
|
1778
|
+
onEventClick?.(event);
|
|
1779
|
+
}
|
|
1780
|
+
},
|
|
1781
|
+
ei
|
|
1782
|
+
)),
|
|
1783
|
+
dayEvents.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("span", { className: "calendar-event-more", children: [
|
|
1784
|
+
"+",
|
|
1785
|
+
dayEvents.length - 3
|
|
1786
|
+
] })
|
|
1787
|
+
] })
|
|
1788
|
+
]
|
|
1789
|
+
},
|
|
1790
|
+
idx
|
|
1791
|
+
);
|
|
1792
|
+
}) })
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
);
|
|
1788
1796
|
};
|
|
1789
1797
|
Calendar.displayName = "Calendar";
|
|
1790
1798
|
var Calendar_default = Calendar;
|
|
@@ -16669,7 +16677,7 @@ var DayCell = import_react11.default.memo(
|
|
|
16669
16677
|
disabled,
|
|
16670
16678
|
selected,
|
|
16671
16679
|
highlighted,
|
|
16672
|
-
|
|
16680
|
+
onSelect
|
|
16673
16681
|
}) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
16674
16682
|
"button",
|
|
16675
16683
|
{
|
|
@@ -16685,10 +16693,13 @@ var DayCell = import_react11.default.memo(
|
|
|
16685
16693
|
day.isSaturday && "saturday"
|
|
16686
16694
|
),
|
|
16687
16695
|
disabled: disabled || !day.isCurrentMonth,
|
|
16688
|
-
onClick
|
|
16696
|
+
onClick: () => {
|
|
16697
|
+
if (!disabled && day.isCurrentMonth) onSelect(day.date);
|
|
16698
|
+
},
|
|
16689
16699
|
children: day.day
|
|
16690
16700
|
}
|
|
16691
|
-
)
|
|
16701
|
+
),
|
|
16702
|
+
(prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
|
|
16692
16703
|
);
|
|
16693
16704
|
DayCell.displayName = "DayCell";
|
|
16694
16705
|
var SingleDatePicker = (props) => {
|
|
@@ -16766,9 +16777,7 @@ var SingleDatePicker = (props) => {
|
|
|
16766
16777
|
disabled,
|
|
16767
16778
|
selected,
|
|
16768
16779
|
highlighted,
|
|
16769
|
-
|
|
16770
|
-
if (!disabled && day.isCurrentMonth) handleSelect(day.date);
|
|
16771
|
-
}
|
|
16780
|
+
onSelect: handleSelect
|
|
16772
16781
|
},
|
|
16773
16782
|
idx
|
|
16774
16783
|
);
|
|
@@ -676,6 +676,7 @@
|
|
|
676
676
|
/* src/components/Calendar/calendar.scss */
|
|
677
677
|
.lib-xplat-calendar {
|
|
678
678
|
width: 100%;
|
|
679
|
+
min-width: 280px;
|
|
679
680
|
user-select: none;
|
|
680
681
|
container-type: inline-size;
|
|
681
682
|
}
|
|
@@ -796,14 +797,14 @@
|
|
|
796
797
|
background-color: var(--xplat-blue-600);
|
|
797
798
|
}
|
|
798
799
|
.lib-xplat-calendar .calendar-day.selected {
|
|
799
|
-
background-color: var(--xplat-neutral-900);
|
|
800
|
+
background-color: var(--calendar-selected-color, var(--xplat-neutral-900));
|
|
800
801
|
}
|
|
801
802
|
.lib-xplat-calendar .calendar-day.selected .calendar-day-number {
|
|
802
803
|
color: var(--xplat-white);
|
|
803
804
|
font-weight: 600;
|
|
804
805
|
}
|
|
805
806
|
.lib-xplat-calendar .calendar-day.selected:hover {
|
|
806
|
-
background-color: var(--xplat-neutral-
|
|
807
|
+
background-color: color-mix(in srgb, var(--calendar-selected-color, var(--xplat-neutral-900)), black 12%);
|
|
807
808
|
}
|
|
808
809
|
.lib-xplat-calendar .calendar-day.selected.today .calendar-day-number::before {
|
|
809
810
|
background-color: var(--xplat-white);
|
|
@@ -1157,6 +1158,7 @@
|
|
|
1157
1158
|
.lib-xplat-datepicker {
|
|
1158
1159
|
user-select: none;
|
|
1159
1160
|
container-type: inline-size;
|
|
1161
|
+
width: 280px;
|
|
1160
1162
|
}
|
|
1161
1163
|
.lib-xplat-datepicker .datepicker-header {
|
|
1162
1164
|
display: flex;
|
|
@@ -1274,9 +1276,11 @@
|
|
|
1274
1276
|
.lib-xplat-datepicker.range {
|
|
1275
1277
|
display: flex;
|
|
1276
1278
|
gap: 1.5rem;
|
|
1279
|
+
width: auto;
|
|
1277
1280
|
}
|
|
1278
1281
|
.lib-xplat-datepicker .datepicker-range-panel {
|
|
1279
|
-
|
|
1282
|
+
width: 280px;
|
|
1283
|
+
flex-shrink: 0;
|
|
1280
1284
|
}
|
|
1281
1285
|
.lib-xplat-datepicker .datepicker-range-label {
|
|
1282
1286
|
display: block;
|
|
@@ -1288,6 +1292,7 @@
|
|
|
1288
1292
|
}
|
|
1289
1293
|
.lib-xplat-datepicker.input-datepicker {
|
|
1290
1294
|
position: relative;
|
|
1295
|
+
width: auto;
|
|
1291
1296
|
}
|
|
1292
1297
|
.lib-xplat-datepicker.input-datepicker .input-datepicker-dropdown {
|
|
1293
1298
|
position: absolute;
|
|
@@ -1326,6 +1331,10 @@
|
|
|
1326
1331
|
border-radius: 12px;
|
|
1327
1332
|
background-color: #fff;
|
|
1328
1333
|
padding: 24px;
|
|
1334
|
+
width: fit-content;
|
|
1335
|
+
max-width: calc(100vw - 2rem);
|
|
1336
|
+
max-height: calc(100vh - 2rem);
|
|
1337
|
+
overflow: auto;
|
|
1329
1338
|
transform: translate(-50%, -50%) scale(0.9);
|
|
1330
1339
|
opacity: 0;
|
|
1331
1340
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
package/dist/components/index.js
CHANGED
|
@@ -1572,6 +1572,7 @@ var Calendar = (props) => {
|
|
|
1572
1572
|
locale = "ko",
|
|
1573
1573
|
minDate,
|
|
1574
1574
|
maxDate,
|
|
1575
|
+
selectedColor,
|
|
1575
1576
|
showToday = true,
|
|
1576
1577
|
className
|
|
1577
1578
|
} = props;
|
|
@@ -1615,90 +1616,97 @@ var Calendar = (props) => {
|
|
|
1615
1616
|
};
|
|
1616
1617
|
const getEventsForDay = (date) => events.filter((e) => isSameDay(e.date, date));
|
|
1617
1618
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
1618
|
-
return /* @__PURE__ */ jsxs193(
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
i === 6 && "saturday"
|
|
1632
|
-
),
|
|
1633
|
-
children: label
|
|
1634
|
-
},
|
|
1635
|
-
label
|
|
1636
|
-
)) }),
|
|
1637
|
-
/* @__PURE__ */ jsx301("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1638
|
-
const dayEvents = getEventsForDay(day.date);
|
|
1639
|
-
const disabled = isDisabled(day.date);
|
|
1640
|
-
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1641
|
-
if (renderDay) {
|
|
1642
|
-
return /* @__PURE__ */ jsx301(
|
|
1619
|
+
return /* @__PURE__ */ jsxs193(
|
|
1620
|
+
"div",
|
|
1621
|
+
{
|
|
1622
|
+
className: clsx_default("lib-xplat-calendar", className),
|
|
1623
|
+
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
1624
|
+
children: [
|
|
1625
|
+
/* @__PURE__ */ jsxs193("div", { className: "calendar-header", children: [
|
|
1626
|
+
/* @__PURE__ */ jsx301("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804 \uB2EC", children: /* @__PURE__ */ jsx301(ChevronLeftIcon_default, {}) }),
|
|
1627
|
+
/* @__PURE__ */ jsx301("span", { className: "calendar-title", children: locale === "ko" ? `${year}\uB144 ${MONTH_LABELS.ko[month]}` : `${MONTH_LABELS.en[month]} ${year}` }),
|
|
1628
|
+
/* @__PURE__ */ jsx301("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C \uB2EC", children: /* @__PURE__ */ jsx301(ChevronRightIcon_default, {}) }),
|
|
1629
|
+
showToday && /* @__PURE__ */ jsx301("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
1630
|
+
] }),
|
|
1631
|
+
/* @__PURE__ */ jsx301("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx301(
|
|
1643
1632
|
"div",
|
|
1644
1633
|
{
|
|
1645
1634
|
className: clsx_default(
|
|
1646
|
-
"calendar-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
isSelected && "selected",
|
|
1650
|
-
day.isToday && "today"
|
|
1635
|
+
"calendar-weekday",
|
|
1636
|
+
i === 0 && "sunday",
|
|
1637
|
+
i === 6 && "saturday"
|
|
1651
1638
|
),
|
|
1652
|
-
|
|
1653
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1654
|
-
},
|
|
1655
|
-
children: renderDay(day, dayEvents)
|
|
1656
|
-
},
|
|
1657
|
-
idx
|
|
1658
|
-
);
|
|
1659
|
-
}
|
|
1660
|
-
return /* @__PURE__ */ jsxs193(
|
|
1661
|
-
"div",
|
|
1662
|
-
{
|
|
1663
|
-
className: clsx_default(
|
|
1664
|
-
"calendar-day",
|
|
1665
|
-
!day.isCurrentMonth && "outside",
|
|
1666
|
-
disabled && "disabled",
|
|
1667
|
-
isSelected && "selected",
|
|
1668
|
-
day.isToday && "today",
|
|
1669
|
-
day.isSunday && "sunday",
|
|
1670
|
-
day.isSaturday && "saturday"
|
|
1671
|
-
),
|
|
1672
|
-
onClick: () => {
|
|
1673
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1639
|
+
children: label
|
|
1674
1640
|
},
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1641
|
+
label
|
|
1642
|
+
)) }),
|
|
1643
|
+
/* @__PURE__ */ jsx301("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1644
|
+
const dayEvents = getEventsForDay(day.date);
|
|
1645
|
+
const disabled = isDisabled(day.date);
|
|
1646
|
+
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1647
|
+
if (renderDay) {
|
|
1648
|
+
return /* @__PURE__ */ jsx301(
|
|
1649
|
+
"div",
|
|
1650
|
+
{
|
|
1651
|
+
className: clsx_default(
|
|
1652
|
+
"calendar-day",
|
|
1653
|
+
!day.isCurrentMonth && "outside",
|
|
1654
|
+
disabled && "disabled",
|
|
1655
|
+
isSelected && "selected",
|
|
1656
|
+
day.isToday && "today"
|
|
1657
|
+
),
|
|
1658
|
+
onClick: () => {
|
|
1659
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1688
1660
|
},
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1661
|
+
children: renderDay(day, dayEvents)
|
|
1662
|
+
},
|
|
1663
|
+
idx
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
return /* @__PURE__ */ jsxs193(
|
|
1667
|
+
"div",
|
|
1668
|
+
{
|
|
1669
|
+
className: clsx_default(
|
|
1670
|
+
"calendar-day",
|
|
1671
|
+
!day.isCurrentMonth && "outside",
|
|
1672
|
+
disabled && "disabled",
|
|
1673
|
+
isSelected && "selected",
|
|
1674
|
+
day.isToday && "today",
|
|
1675
|
+
day.isSunday && "sunday",
|
|
1676
|
+
day.isSaturday && "saturday"
|
|
1677
|
+
),
|
|
1678
|
+
onClick: () => {
|
|
1679
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1680
|
+
},
|
|
1681
|
+
children: [
|
|
1682
|
+
/* @__PURE__ */ jsx301("span", { className: "calendar-day-number", children: day.day }),
|
|
1683
|
+
dayEvents.length > 0 && /* @__PURE__ */ jsxs193("div", { className: "calendar-day-events", children: [
|
|
1684
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ jsx301(
|
|
1685
|
+
"span",
|
|
1686
|
+
{
|
|
1687
|
+
className: "calendar-event-dot",
|
|
1688
|
+
style: { backgroundColor: event.color ?? "var(--xplat-blue-500)" },
|
|
1689
|
+
title: event.label,
|
|
1690
|
+
onClick: (e) => {
|
|
1691
|
+
e.stopPropagation();
|
|
1692
|
+
onEventClick?.(event);
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
ei
|
|
1696
|
+
)),
|
|
1697
|
+
dayEvents.length > 3 && /* @__PURE__ */ jsxs193("span", { className: "calendar-event-more", children: [
|
|
1698
|
+
"+",
|
|
1699
|
+
dayEvents.length - 3
|
|
1700
|
+
] })
|
|
1701
|
+
] })
|
|
1702
|
+
]
|
|
1703
|
+
},
|
|
1704
|
+
idx
|
|
1705
|
+
);
|
|
1706
|
+
}) })
|
|
1707
|
+
]
|
|
1708
|
+
}
|
|
1709
|
+
);
|
|
1702
1710
|
};
|
|
1703
1711
|
Calendar.displayName = "Calendar";
|
|
1704
1712
|
var Calendar_default = Calendar;
|
|
@@ -16583,7 +16591,7 @@ var DayCell = React9.memo(
|
|
|
16583
16591
|
disabled,
|
|
16584
16592
|
selected,
|
|
16585
16593
|
highlighted,
|
|
16586
|
-
|
|
16594
|
+
onSelect
|
|
16587
16595
|
}) => /* @__PURE__ */ jsx312(
|
|
16588
16596
|
"button",
|
|
16589
16597
|
{
|
|
@@ -16599,10 +16607,13 @@ var DayCell = React9.memo(
|
|
|
16599
16607
|
day.isSaturday && "saturday"
|
|
16600
16608
|
),
|
|
16601
16609
|
disabled: disabled || !day.isCurrentMonth,
|
|
16602
|
-
onClick
|
|
16610
|
+
onClick: () => {
|
|
16611
|
+
if (!disabled && day.isCurrentMonth) onSelect(day.date);
|
|
16612
|
+
},
|
|
16603
16613
|
children: day.day
|
|
16604
16614
|
}
|
|
16605
|
-
)
|
|
16615
|
+
),
|
|
16616
|
+
(prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
|
|
16606
16617
|
);
|
|
16607
16618
|
DayCell.displayName = "DayCell";
|
|
16608
16619
|
var SingleDatePicker = (props) => {
|
|
@@ -16680,9 +16691,7 @@ var SingleDatePicker = (props) => {
|
|
|
16680
16691
|
disabled,
|
|
16681
16692
|
selected,
|
|
16682
16693
|
highlighted,
|
|
16683
|
-
|
|
16684
|
-
if (!disabled && day.isCurrentMonth) handleSelect(day.date);
|
|
16685
|
-
}
|
|
16694
|
+
onSelect: handleSelect
|
|
16686
16695
|
},
|
|
16687
16696
|
idx
|
|
16688
16697
|
);
|