@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
|
@@ -1077,6 +1077,7 @@ var Calendar = (props) => {
|
|
|
1077
1077
|
locale = "ko",
|
|
1078
1078
|
minDate,
|
|
1079
1079
|
maxDate,
|
|
1080
|
+
selectedColor,
|
|
1080
1081
|
showToday = true,
|
|
1081
1082
|
className
|
|
1082
1083
|
} = props;
|
|
@@ -1120,90 +1121,97 @@ var Calendar = (props) => {
|
|
|
1120
1121
|
};
|
|
1121
1122
|
const getEventsForDay = (date) => events.filter((e) => isSameDay(e.date, date));
|
|
1122
1123
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
1123
|
-
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
i === 6 && "saturday"
|
|
1137
|
-
),
|
|
1138
|
-
children: label
|
|
1139
|
-
},
|
|
1140
|
-
label
|
|
1141
|
-
)) }),
|
|
1142
|
-
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1143
|
-
const dayEvents = getEventsForDay(day.date);
|
|
1144
|
-
const disabled = isDisabled(day.date);
|
|
1145
|
-
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1146
|
-
if (renderDay) {
|
|
1147
|
-
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
1124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
1125
|
+
"div",
|
|
1126
|
+
{
|
|
1127
|
+
className: clsx_default("lib-xplat-calendar", className),
|
|
1128
|
+
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
1129
|
+
children: [
|
|
1130
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className: "calendar-header", children: [
|
|
1131
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804 \uB2EC", children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ChevronLeftIcon_default, {}) }),
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("span", { className: "calendar-title", children: locale === "ko" ? `${year}\uB144 ${MONTH_LABELS.ko[month]}` : `${MONTH_LABELS.en[month]} ${year}` }),
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C \uB2EC", children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ChevronRightIcon_default, {}) }),
|
|
1134
|
+
showToday && /* @__PURE__ */ (0, import_jsx_runtime295.jsx)("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
1135
|
+
] }),
|
|
1136
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
1148
1137
|
"div",
|
|
1149
1138
|
{
|
|
1150
1139
|
className: clsx_default(
|
|
1151
|
-
"calendar-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
isSelected && "selected",
|
|
1155
|
-
day.isToday && "today"
|
|
1140
|
+
"calendar-weekday",
|
|
1141
|
+
i === 0 && "sunday",
|
|
1142
|
+
i === 6 && "saturday"
|
|
1156
1143
|
),
|
|
1157
|
-
|
|
1158
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1159
|
-
},
|
|
1160
|
-
children: renderDay(day, dayEvents)
|
|
1161
|
-
},
|
|
1162
|
-
idx
|
|
1163
|
-
);
|
|
1164
|
-
}
|
|
1165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
1166
|
-
"div",
|
|
1167
|
-
{
|
|
1168
|
-
className: clsx_default(
|
|
1169
|
-
"calendar-day",
|
|
1170
|
-
!day.isCurrentMonth && "outside",
|
|
1171
|
-
disabled && "disabled",
|
|
1172
|
-
isSelected && "selected",
|
|
1173
|
-
day.isToday && "today",
|
|
1174
|
-
day.isSunday && "sunday",
|
|
1175
|
-
day.isSaturday && "saturday"
|
|
1176
|
-
),
|
|
1177
|
-
onClick: () => {
|
|
1178
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1144
|
+
children: label
|
|
1179
1145
|
},
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1146
|
+
label
|
|
1147
|
+
)) }),
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1149
|
+
const dayEvents = getEventsForDay(day.date);
|
|
1150
|
+
const disabled = isDisabled(day.date);
|
|
1151
|
+
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1152
|
+
if (renderDay) {
|
|
1153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
1154
|
+
"div",
|
|
1155
|
+
{
|
|
1156
|
+
className: clsx_default(
|
|
1157
|
+
"calendar-day",
|
|
1158
|
+
!day.isCurrentMonth && "outside",
|
|
1159
|
+
disabled && "disabled",
|
|
1160
|
+
isSelected && "selected",
|
|
1161
|
+
day.isToday && "today"
|
|
1162
|
+
),
|
|
1163
|
+
onClick: () => {
|
|
1164
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1193
1165
|
},
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1166
|
+
children: renderDay(day, dayEvents)
|
|
1167
|
+
},
|
|
1168
|
+
idx
|
|
1169
|
+
);
|
|
1170
|
+
}
|
|
1171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)(
|
|
1172
|
+
"div",
|
|
1173
|
+
{
|
|
1174
|
+
className: clsx_default(
|
|
1175
|
+
"calendar-day",
|
|
1176
|
+
!day.isCurrentMonth && "outside",
|
|
1177
|
+
disabled && "disabled",
|
|
1178
|
+
isSelected && "selected",
|
|
1179
|
+
day.isToday && "today",
|
|
1180
|
+
day.isSunday && "sunday",
|
|
1181
|
+
day.isSaturday && "saturday"
|
|
1182
|
+
),
|
|
1183
|
+
onClick: () => {
|
|
1184
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1185
|
+
},
|
|
1186
|
+
children: [
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime295.jsx)("span", { className: "calendar-day-number", children: day.day }),
|
|
1188
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("div", { className: "calendar-day-events", children: [
|
|
1189
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
|
|
1190
|
+
"span",
|
|
1191
|
+
{
|
|
1192
|
+
className: "calendar-event-dot",
|
|
1193
|
+
style: { backgroundColor: event.color ?? "var(--xplat-blue-500)" },
|
|
1194
|
+
title: event.label,
|
|
1195
|
+
onClick: (e) => {
|
|
1196
|
+
e.stopPropagation();
|
|
1197
|
+
onEventClick?.(event);
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
ei
|
|
1201
|
+
)),
|
|
1202
|
+
dayEvents.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime295.jsxs)("span", { className: "calendar-event-more", children: [
|
|
1203
|
+
"+",
|
|
1204
|
+
dayEvents.length - 3
|
|
1205
|
+
] })
|
|
1206
|
+
] })
|
|
1207
|
+
]
|
|
1208
|
+
},
|
|
1209
|
+
idx
|
|
1210
|
+
);
|
|
1211
|
+
}) })
|
|
1212
|
+
]
|
|
1213
|
+
}
|
|
1214
|
+
);
|
|
1207
1215
|
};
|
|
1208
1216
|
Calendar.displayName = "Calendar";
|
|
1209
1217
|
var Calendar_default = Calendar;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* src/components/Calendar/calendar.scss */
|
|
2
2
|
.lib-xplat-calendar {
|
|
3
3
|
width: 100%;
|
|
4
|
+
min-width: 280px;
|
|
4
5
|
user-select: none;
|
|
5
6
|
container-type: inline-size;
|
|
6
7
|
}
|
|
@@ -121,14 +122,14 @@
|
|
|
121
122
|
background-color: var(--xplat-blue-600);
|
|
122
123
|
}
|
|
123
124
|
.lib-xplat-calendar .calendar-day.selected {
|
|
124
|
-
background-color: var(--xplat-neutral-900);
|
|
125
|
+
background-color: var(--calendar-selected-color, var(--xplat-neutral-900));
|
|
125
126
|
}
|
|
126
127
|
.lib-xplat-calendar .calendar-day.selected .calendar-day-number {
|
|
127
128
|
color: var(--xplat-white);
|
|
128
129
|
font-weight: 600;
|
|
129
130
|
}
|
|
130
131
|
.lib-xplat-calendar .calendar-day.selected:hover {
|
|
131
|
-
background-color: var(--xplat-neutral-
|
|
132
|
+
background-color: color-mix(in srgb, var(--calendar-selected-color, var(--xplat-neutral-900)), black 12%);
|
|
132
133
|
}
|
|
133
134
|
.lib-xplat-calendar .calendar-day.selected.today .calendar-day-number::before {
|
|
134
135
|
background-color: var(--xplat-white);
|
|
@@ -1038,6 +1038,7 @@ var Calendar = (props) => {
|
|
|
1038
1038
|
locale = "ko",
|
|
1039
1039
|
minDate,
|
|
1040
1040
|
maxDate,
|
|
1041
|
+
selectedColor,
|
|
1041
1042
|
showToday = true,
|
|
1042
1043
|
className
|
|
1043
1044
|
} = props;
|
|
@@ -1081,90 +1082,97 @@ var Calendar = (props) => {
|
|
|
1081
1082
|
};
|
|
1082
1083
|
const getEventsForDay = (date) => events.filter((e) => isSameDay(e.date, date));
|
|
1083
1084
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
1084
|
-
return /* @__PURE__ */ jsxs189(
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
i === 6 && "saturday"
|
|
1098
|
-
),
|
|
1099
|
-
children: label
|
|
1100
|
-
},
|
|
1101
|
-
label
|
|
1102
|
-
)) }),
|
|
1103
|
-
/* @__PURE__ */ jsx295("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1104
|
-
const dayEvents = getEventsForDay(day.date);
|
|
1105
|
-
const disabled = isDisabled(day.date);
|
|
1106
|
-
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1107
|
-
if (renderDay) {
|
|
1108
|
-
return /* @__PURE__ */ jsx295(
|
|
1085
|
+
return /* @__PURE__ */ jsxs189(
|
|
1086
|
+
"div",
|
|
1087
|
+
{
|
|
1088
|
+
className: clsx_default("lib-xplat-calendar", className),
|
|
1089
|
+
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
1090
|
+
children: [
|
|
1091
|
+
/* @__PURE__ */ jsxs189("div", { className: "calendar-header", children: [
|
|
1092
|
+
/* @__PURE__ */ jsx295("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804 \uB2EC", children: /* @__PURE__ */ jsx295(ChevronLeftIcon_default, {}) }),
|
|
1093
|
+
/* @__PURE__ */ jsx295("span", { className: "calendar-title", children: locale === "ko" ? `${year}\uB144 ${MONTH_LABELS.ko[month]}` : `${MONTH_LABELS.en[month]} ${year}` }),
|
|
1094
|
+
/* @__PURE__ */ jsx295("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C \uB2EC", children: /* @__PURE__ */ jsx295(ChevronRightIcon_default, {}) }),
|
|
1095
|
+
showToday && /* @__PURE__ */ jsx295("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
1096
|
+
] }),
|
|
1097
|
+
/* @__PURE__ */ jsx295("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx295(
|
|
1109
1098
|
"div",
|
|
1110
1099
|
{
|
|
1111
1100
|
className: clsx_default(
|
|
1112
|
-
"calendar-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
isSelected && "selected",
|
|
1116
|
-
day.isToday && "today"
|
|
1101
|
+
"calendar-weekday",
|
|
1102
|
+
i === 0 && "sunday",
|
|
1103
|
+
i === 6 && "saturday"
|
|
1117
1104
|
),
|
|
1118
|
-
|
|
1119
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1120
|
-
},
|
|
1121
|
-
children: renderDay(day, dayEvents)
|
|
1122
|
-
},
|
|
1123
|
-
idx
|
|
1124
|
-
);
|
|
1125
|
-
}
|
|
1126
|
-
return /* @__PURE__ */ jsxs189(
|
|
1127
|
-
"div",
|
|
1128
|
-
{
|
|
1129
|
-
className: clsx_default(
|
|
1130
|
-
"calendar-day",
|
|
1131
|
-
!day.isCurrentMonth && "outside",
|
|
1132
|
-
disabled && "disabled",
|
|
1133
|
-
isSelected && "selected",
|
|
1134
|
-
day.isToday && "today",
|
|
1135
|
-
day.isSunday && "sunday",
|
|
1136
|
-
day.isSaturday && "saturday"
|
|
1137
|
-
),
|
|
1138
|
-
onClick: () => {
|
|
1139
|
-
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1105
|
+
children: label
|
|
1140
1106
|
},
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1107
|
+
label
|
|
1108
|
+
)) }),
|
|
1109
|
+
/* @__PURE__ */ jsx295("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1110
|
+
const dayEvents = getEventsForDay(day.date);
|
|
1111
|
+
const disabled = isDisabled(day.date);
|
|
1112
|
+
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
1113
|
+
if (renderDay) {
|
|
1114
|
+
return /* @__PURE__ */ jsx295(
|
|
1115
|
+
"div",
|
|
1116
|
+
{
|
|
1117
|
+
className: clsx_default(
|
|
1118
|
+
"calendar-day",
|
|
1119
|
+
!day.isCurrentMonth && "outside",
|
|
1120
|
+
disabled && "disabled",
|
|
1121
|
+
isSelected && "selected",
|
|
1122
|
+
day.isToday && "today"
|
|
1123
|
+
),
|
|
1124
|
+
onClick: () => {
|
|
1125
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1154
1126
|
},
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1127
|
+
children: renderDay(day, dayEvents)
|
|
1128
|
+
},
|
|
1129
|
+
idx
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
return /* @__PURE__ */ jsxs189(
|
|
1133
|
+
"div",
|
|
1134
|
+
{
|
|
1135
|
+
className: clsx_default(
|
|
1136
|
+
"calendar-day",
|
|
1137
|
+
!day.isCurrentMonth && "outside",
|
|
1138
|
+
disabled && "disabled",
|
|
1139
|
+
isSelected && "selected",
|
|
1140
|
+
day.isToday && "today",
|
|
1141
|
+
day.isSunday && "sunday",
|
|
1142
|
+
day.isSaturday && "saturday"
|
|
1143
|
+
),
|
|
1144
|
+
onClick: () => {
|
|
1145
|
+
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1146
|
+
},
|
|
1147
|
+
children: [
|
|
1148
|
+
/* @__PURE__ */ jsx295("span", { className: "calendar-day-number", children: day.day }),
|
|
1149
|
+
dayEvents.length > 0 && /* @__PURE__ */ jsxs189("div", { className: "calendar-day-events", children: [
|
|
1150
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ jsx295(
|
|
1151
|
+
"span",
|
|
1152
|
+
{
|
|
1153
|
+
className: "calendar-event-dot",
|
|
1154
|
+
style: { backgroundColor: event.color ?? "var(--xplat-blue-500)" },
|
|
1155
|
+
title: event.label,
|
|
1156
|
+
onClick: (e) => {
|
|
1157
|
+
e.stopPropagation();
|
|
1158
|
+
onEventClick?.(event);
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
ei
|
|
1162
|
+
)),
|
|
1163
|
+
dayEvents.length > 3 && /* @__PURE__ */ jsxs189("span", { className: "calendar-event-more", children: [
|
|
1164
|
+
"+",
|
|
1165
|
+
dayEvents.length - 3
|
|
1166
|
+
] })
|
|
1167
|
+
] })
|
|
1168
|
+
]
|
|
1169
|
+
},
|
|
1170
|
+
idx
|
|
1171
|
+
);
|
|
1172
|
+
}) })
|
|
1173
|
+
]
|
|
1174
|
+
}
|
|
1175
|
+
);
|
|
1168
1176
|
};
|
|
1169
1177
|
Calendar.displayName = "Calendar";
|
|
1170
1178
|
var Calendar_default = Calendar;
|
|
@@ -1456,7 +1456,7 @@ var DayCell = import_react6.default.memo(
|
|
|
1456
1456
|
disabled,
|
|
1457
1457
|
selected,
|
|
1458
1458
|
highlighted,
|
|
1459
|
-
|
|
1459
|
+
onSelect
|
|
1460
1460
|
}) => /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
1461
1461
|
"button",
|
|
1462
1462
|
{
|
|
@@ -1472,10 +1472,13 @@ var DayCell = import_react6.default.memo(
|
|
|
1472
1472
|
day.isSaturday && "saturday"
|
|
1473
1473
|
),
|
|
1474
1474
|
disabled: disabled || !day.isCurrentMonth,
|
|
1475
|
-
onClick
|
|
1475
|
+
onClick: () => {
|
|
1476
|
+
if (!disabled && day.isCurrentMonth) onSelect(day.date);
|
|
1477
|
+
},
|
|
1476
1478
|
children: day.day
|
|
1477
1479
|
}
|
|
1478
|
-
)
|
|
1480
|
+
),
|
|
1481
|
+
(prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
|
|
1479
1482
|
);
|
|
1480
1483
|
DayCell.displayName = "DayCell";
|
|
1481
1484
|
var SingleDatePicker = (props) => {
|
|
@@ -1553,9 +1556,7 @@ var SingleDatePicker = (props) => {
|
|
|
1553
1556
|
disabled,
|
|
1554
1557
|
selected,
|
|
1555
1558
|
highlighted,
|
|
1556
|
-
|
|
1557
|
-
if (!disabled && day.isCurrentMonth) handleSelect(day.date);
|
|
1558
|
-
}
|
|
1559
|
+
onSelect: handleSelect
|
|
1559
1560
|
},
|
|
1560
1561
|
idx
|
|
1561
1562
|
);
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
.lib-xplat-datepicker {
|
|
89
89
|
user-select: none;
|
|
90
90
|
container-type: inline-size;
|
|
91
|
+
width: 280px;
|
|
91
92
|
}
|
|
92
93
|
.lib-xplat-datepicker .datepicker-header {
|
|
93
94
|
display: flex;
|
|
@@ -205,9 +206,11 @@
|
|
|
205
206
|
.lib-xplat-datepicker.range {
|
|
206
207
|
display: flex;
|
|
207
208
|
gap: 1.5rem;
|
|
209
|
+
width: auto;
|
|
208
210
|
}
|
|
209
211
|
.lib-xplat-datepicker .datepicker-range-panel {
|
|
210
|
-
|
|
212
|
+
width: 280px;
|
|
213
|
+
flex-shrink: 0;
|
|
211
214
|
}
|
|
212
215
|
.lib-xplat-datepicker .datepicker-range-label {
|
|
213
216
|
display: block;
|
|
@@ -219,6 +222,7 @@
|
|
|
219
222
|
}
|
|
220
223
|
.lib-xplat-datepicker.input-datepicker {
|
|
221
224
|
position: relative;
|
|
225
|
+
width: auto;
|
|
222
226
|
}
|
|
223
227
|
.lib-xplat-datepicker.input-datepicker .input-datepicker-dropdown {
|
|
224
228
|
position: absolute;
|
|
@@ -301,6 +305,10 @@
|
|
|
301
305
|
border-radius: 12px;
|
|
302
306
|
background-color: #fff;
|
|
303
307
|
padding: 24px;
|
|
308
|
+
width: fit-content;
|
|
309
|
+
max-width: calc(100vw - 2rem);
|
|
310
|
+
max-height: calc(100vh - 2rem);
|
|
311
|
+
overflow: auto;
|
|
304
312
|
transform: translate(-50%, -50%) scale(0.9);
|
|
305
313
|
opacity: 0;
|
|
306
314
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
@@ -1417,7 +1417,7 @@ var DayCell = React5.memo(
|
|
|
1417
1417
|
disabled,
|
|
1418
1418
|
selected,
|
|
1419
1419
|
highlighted,
|
|
1420
|
-
|
|
1420
|
+
onSelect
|
|
1421
1421
|
}) => /* @__PURE__ */ jsx298(
|
|
1422
1422
|
"button",
|
|
1423
1423
|
{
|
|
@@ -1433,10 +1433,13 @@ var DayCell = React5.memo(
|
|
|
1433
1433
|
day.isSaturday && "saturday"
|
|
1434
1434
|
),
|
|
1435
1435
|
disabled: disabled || !day.isCurrentMonth,
|
|
1436
|
-
onClick
|
|
1436
|
+
onClick: () => {
|
|
1437
|
+
if (!disabled && day.isCurrentMonth) onSelect(day.date);
|
|
1438
|
+
},
|
|
1437
1439
|
children: day.day
|
|
1438
1440
|
}
|
|
1439
|
-
)
|
|
1441
|
+
),
|
|
1442
|
+
(prev, next) => prev.selected === next.selected && prev.disabled === next.disabled && prev.highlighted === next.highlighted && prev.day === next.day
|
|
1440
1443
|
);
|
|
1441
1444
|
DayCell.displayName = "DayCell";
|
|
1442
1445
|
var SingleDatePicker = (props) => {
|
|
@@ -1514,9 +1517,7 @@ var SingleDatePicker = (props) => {
|
|
|
1514
1517
|
disabled,
|
|
1515
1518
|
selected,
|
|
1516
1519
|
highlighted,
|
|
1517
|
-
|
|
1518
|
-
if (!disabled && day.isCurrentMonth) handleSelect(day.date);
|
|
1519
|
-
}
|
|
1520
|
+
onSelect: handleSelect
|
|
1520
1521
|
},
|
|
1521
1522
|
idx
|
|
1522
1523
|
);
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
border-radius: 12px;
|
|
10
10
|
background-color: #fff;
|
|
11
11
|
padding: 24px;
|
|
12
|
+
width: fit-content;
|
|
13
|
+
max-width: calc(100vw - 2rem);
|
|
14
|
+
max-height: calc(100vh - 2rem);
|
|
15
|
+
overflow: auto;
|
|
12
16
|
transform: translate(-50%, -50%) scale(0.9);
|
|
13
17
|
opacity: 0;
|
|
14
18
|
transition: transform 0.2s ease, opacity 0.2s ease;
|