sellmate-design-system-react 9.0.0-beta.67 → 9.0.0-beta.68
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/AGENTS.md +36 -5
- package/dist/components/SCalendarBoard/CalendarDayCard.d.ts +7 -0
- package/dist/components/SCalendarBoard/CalendarEventButton.d.ts +3 -1
- package/dist/components/SCalendarBoard/CalendarMoreButton.d.ts +5 -0
- package/dist/components/SCalendarBoard/README.md +1 -0
- package/dist/components/SCalendarBoard/SCalendarBoard.d.ts +13 -1
- package/dist/components/SCalendarBoard/calendar-board-layout.d.ts +11 -1
- package/dist/components/SCalendarBoard/calendarBoard.config.d.ts +5 -0
- package/dist/components/SCard/README.md +1 -0
- package/dist/components/SCard/SCard.d.ts +10 -1
- package/dist/components/SFooter/README.md +16 -2
- package/dist/components/SFooter/SFooter.d.ts +13 -3
- package/dist/components/SFooter/index.d.ts +1 -1
- package/dist/components/SSectionHeaderCard/README.md +1 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +10 -1
- package/dist/index.cjs +61 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +61 -14
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +55 -7
- package/dist/llms.txt +36 -5
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4282,6 +4282,7 @@ var SButton = /* @__PURE__ */ forwardRef(function SButton2({
|
|
|
4282
4282
|
});
|
|
4283
4283
|
function SFooter({
|
|
4284
4284
|
bg = "white",
|
|
4285
|
+
size = "md",
|
|
4285
4286
|
left,
|
|
4286
4287
|
button,
|
|
4287
4288
|
children,
|
|
@@ -4318,7 +4319,7 @@ function SFooter({
|
|
|
4318
4319
|
SButton,
|
|
4319
4320
|
{
|
|
4320
4321
|
...button,
|
|
4321
|
-
size
|
|
4322
|
+
size,
|
|
4322
4323
|
color: button.color ?? "primary",
|
|
4323
4324
|
label: button.label ?? "\uD655\uC778"
|
|
4324
4325
|
}
|
|
@@ -4327,7 +4328,16 @@ function SFooter({
|
|
|
4327
4328
|
}
|
|
4328
4329
|
);
|
|
4329
4330
|
}
|
|
4330
|
-
var SCard = /* @__PURE__ */ forwardRef(function SCard2({
|
|
4331
|
+
var SCard = /* @__PURE__ */ forwardRef(function SCard2({
|
|
4332
|
+
bordered = false,
|
|
4333
|
+
footerLeft,
|
|
4334
|
+
button,
|
|
4335
|
+
footerSize = "md",
|
|
4336
|
+
footerClassName,
|
|
4337
|
+
className,
|
|
4338
|
+
children,
|
|
4339
|
+
...rest
|
|
4340
|
+
}, ref) {
|
|
4331
4341
|
const hasFooter = footerLeft != null || button != null;
|
|
4332
4342
|
return /* @__PURE__ */ jsxs(
|
|
4333
4343
|
"div",
|
|
@@ -4345,6 +4355,7 @@ var SCard = /* @__PURE__ */ forwardRef(function SCard2({ bordered = false, foote
|
|
|
4345
4355
|
SFooter,
|
|
4346
4356
|
{
|
|
4347
4357
|
bg: "grey",
|
|
4358
|
+
size: footerSize,
|
|
4348
4359
|
left: footerLeft,
|
|
4349
4360
|
button,
|
|
4350
4361
|
className: cn("px-(--sys-space-panel-padding-default)", footerClassName)
|
|
@@ -7632,6 +7643,7 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ forwardRef(
|
|
|
7632
7643
|
background,
|
|
7633
7644
|
footerLeft,
|
|
7634
7645
|
button,
|
|
7646
|
+
footerSize = "md",
|
|
7635
7647
|
footerClassName,
|
|
7636
7648
|
className,
|
|
7637
7649
|
children,
|
|
@@ -7668,6 +7680,7 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ forwardRef(
|
|
|
7668
7680
|
SFooter,
|
|
7669
7681
|
{
|
|
7670
7682
|
bg: "grey",
|
|
7683
|
+
size: footerSize,
|
|
7671
7684
|
left: footerLeft,
|
|
7672
7685
|
button,
|
|
7673
7686
|
className: cn("px-(--cmp-sectionHeaderCard-header-paddingX)", footerClassName)
|
|
@@ -13976,7 +13989,8 @@ function layoutCalendarBoard({
|
|
|
13976
13989
|
cells,
|
|
13977
13990
|
events,
|
|
13978
13991
|
rowCapacity,
|
|
13979
|
-
blockedDates
|
|
13992
|
+
blockedDates,
|
|
13993
|
+
focusedEventId
|
|
13980
13994
|
}) {
|
|
13981
13995
|
const count = cells.length;
|
|
13982
13996
|
const weekCount = Math.ceil(count / 7);
|
|
@@ -13984,6 +13998,7 @@ function layoutCalendarBoard({
|
|
|
13984
13998
|
const eventsByCell = Array.from({ length: count }, () => []);
|
|
13985
13999
|
const hiddenCountByCell = new Array(count).fill(0);
|
|
13986
14000
|
const moreLaneByWeek = new Array(weekCount).fill(-1);
|
|
14001
|
+
const moreReplacedByCell = new Array(count).fill(false);
|
|
13987
14002
|
const runs = [];
|
|
13988
14003
|
events.forEach((event, order) => {
|
|
13989
14004
|
const start = event.date;
|
|
@@ -14041,9 +14056,15 @@ function layoutCalendarBoard({
|
|
|
14041
14056
|
const week = Math.floor(run.startIndex / 7);
|
|
14042
14057
|
const moreLane = moreLaneByWeek[week];
|
|
14043
14058
|
const limit = moreLane < 0 ? rowCapacity : moreLane;
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14059
|
+
let lane = run.lane;
|
|
14060
|
+
if (lane >= limit) {
|
|
14061
|
+
const focused = focusedEventId != null && run.event.id === focusedEventId && moreLane >= 0;
|
|
14062
|
+
if (!focused) {
|
|
14063
|
+
for (let i = run.startIndex; i <= run.endIndex; i++) hiddenCountByCell[i] += 1;
|
|
14064
|
+
continue;
|
|
14065
|
+
}
|
|
14066
|
+
lane = moreLane;
|
|
14067
|
+
for (let i = run.startIndex; i <= run.endIndex; i++) moreReplacedByCell[i] = true;
|
|
14047
14068
|
}
|
|
14048
14069
|
const { event } = run;
|
|
14049
14070
|
segmentsByCell[run.startIndex].push({
|
|
@@ -14051,12 +14072,18 @@ function layoutCalendarBoard({
|
|
|
14051
14072
|
key: `${event.id ?? `${event.date}-${run.order}`}-${run.startIndex}`,
|
|
14052
14073
|
startIndex: run.startIndex,
|
|
14053
14074
|
span: run.endIndex - run.startIndex + 1,
|
|
14054
|
-
lane
|
|
14075
|
+
lane,
|
|
14055
14076
|
startsHere: cells[run.startIndex].date === event.date,
|
|
14056
14077
|
endsHere: cells[run.endIndex].date === eventEndDate(event)
|
|
14057
14078
|
});
|
|
14058
14079
|
}
|
|
14059
|
-
return {
|
|
14080
|
+
return {
|
|
14081
|
+
segmentsByCell,
|
|
14082
|
+
eventsByCell,
|
|
14083
|
+
hiddenCountByCell,
|
|
14084
|
+
moreLaneByWeek,
|
|
14085
|
+
moreReplacedByCell
|
|
14086
|
+
};
|
|
14060
14087
|
}
|
|
14061
14088
|
|
|
14062
14089
|
// src/components/SCalendarBoard/calendarBoard.config.ts
|
|
@@ -14086,6 +14113,7 @@ var CALENDAR_BOARD_EVENT_PRESETS = {
|
|
|
14086
14113
|
white: { bg: BG("white"), dot: "grey" }
|
|
14087
14114
|
};
|
|
14088
14115
|
var CALENDAR_BOARD_MAX_VISIBLE_EVENTS = 4;
|
|
14116
|
+
var CALENDAR_BOARD_DIM_OPACITY = 0.4;
|
|
14089
14117
|
var CALENDAR_BOARD_DAY_COLORS = [
|
|
14090
14118
|
"default",
|
|
14091
14119
|
"danger",
|
|
@@ -14105,6 +14133,7 @@ function CalendarEventButton({
|
|
|
14105
14133
|
onSelect,
|
|
14106
14134
|
flatStart = false,
|
|
14107
14135
|
flatEnd = false,
|
|
14136
|
+
dimmed = false,
|
|
14108
14137
|
className,
|
|
14109
14138
|
style
|
|
14110
14139
|
}) {
|
|
@@ -14132,7 +14161,11 @@ function CalendarEventButton({
|
|
|
14132
14161
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
14133
14162
|
className
|
|
14134
14163
|
),
|
|
14135
|
-
style: {
|
|
14164
|
+
style: {
|
|
14165
|
+
...style,
|
|
14166
|
+
"--ceb-bg": preset.bg,
|
|
14167
|
+
...dimmed && { opacity: CALENDAR_BOARD_DIM_OPACITY }
|
|
14168
|
+
},
|
|
14136
14169
|
onClick: (e) => {
|
|
14137
14170
|
if (disabled) return;
|
|
14138
14171
|
onSelect?.(event, e);
|
|
@@ -14176,7 +14209,7 @@ function CalendarEventButton({
|
|
|
14176
14209
|
}
|
|
14177
14210
|
);
|
|
14178
14211
|
}
|
|
14179
|
-
var CalendarMoreButton = /* @__PURE__ */ forwardRef(function CalendarMoreButton2({ count, label = "\uB354\uBCF4\uAE30", onClick, className, style }, ref) {
|
|
14212
|
+
var CalendarMoreButton = /* @__PURE__ */ forwardRef(function CalendarMoreButton2({ count, label = "\uB354\uBCF4\uAE30", dimmed = false, onClick, className, style }, ref) {
|
|
14180
14213
|
return /* @__PURE__ */ jsxs(
|
|
14181
14214
|
"button",
|
|
14182
14215
|
{
|
|
@@ -14189,7 +14222,7 @@ var CalendarMoreButton = /* @__PURE__ */ forwardRef(function CalendarMoreButton2
|
|
|
14189
14222
|
"bg-(--cmp-calendarBoard-moreButton-bg)",
|
|
14190
14223
|
className
|
|
14191
14224
|
),
|
|
14192
|
-
style,
|
|
14225
|
+
style: dimmed ? { ...style, opacity: CALENDAR_BOARD_DIM_OPACITY } : style,
|
|
14193
14226
|
onClick,
|
|
14194
14227
|
children: [
|
|
14195
14228
|
/* @__PURE__ */ jsx(
|
|
@@ -14224,6 +14257,8 @@ var CalendarDayCard = /* @__PURE__ */ forwardRef(function CalendarDayCard2({
|
|
|
14224
14257
|
body,
|
|
14225
14258
|
hiddenCount,
|
|
14226
14259
|
moreLane,
|
|
14260
|
+
moreReplaced,
|
|
14261
|
+
focusedEventId,
|
|
14227
14262
|
isOpen,
|
|
14228
14263
|
moreLabel,
|
|
14229
14264
|
onDaySelect,
|
|
@@ -14231,6 +14266,7 @@ var CalendarDayCard = /* @__PURE__ */ forwardRef(function CalendarDayCard2({
|
|
|
14231
14266
|
onOpenEvents,
|
|
14232
14267
|
...rest
|
|
14233
14268
|
}, ref) {
|
|
14269
|
+
const focusing = focusedEventId != null;
|
|
14234
14270
|
const hasEvents = dayEventCount > 0;
|
|
14235
14271
|
const interactive = selectable || hasEvents;
|
|
14236
14272
|
const activate = () => {
|
|
@@ -14292,6 +14328,7 @@ var CalendarDayCard = /* @__PURE__ */ forwardRef(function CalendarDayCard2({
|
|
|
14292
14328
|
event: segment.event,
|
|
14293
14329
|
flatStart: !segment.startsHere,
|
|
14294
14330
|
flatEnd: !segment.endsHere,
|
|
14331
|
+
dimmed: focusing && segment.event.id !== focusedEventId,
|
|
14295
14332
|
className: "absolute z-10",
|
|
14296
14333
|
style: {
|
|
14297
14334
|
top: laneTop(segment.lane),
|
|
@@ -14305,11 +14342,12 @@ var CalendarDayCard = /* @__PURE__ */ forwardRef(function CalendarDayCard2({
|
|
|
14305
14342
|
},
|
|
14306
14343
|
segment.key
|
|
14307
14344
|
)),
|
|
14308
|
-
body == null && hiddenCount > 0 && moreLane >= 0 && /* @__PURE__ */ jsx(
|
|
14345
|
+
body == null && hiddenCount > 0 && moreLane >= 0 && !moreReplaced && /* @__PURE__ */ jsx(
|
|
14309
14346
|
CalendarMoreButton,
|
|
14310
14347
|
{
|
|
14311
14348
|
count: hiddenCount,
|
|
14312
14349
|
label: moreLabel,
|
|
14350
|
+
dimmed: focusing,
|
|
14313
14351
|
className: "absolute z-10",
|
|
14314
14352
|
style: {
|
|
14315
14353
|
top: laneTop(moreLane),
|
|
@@ -14407,6 +14445,7 @@ function SCalendarBoard({
|
|
|
14407
14445
|
events,
|
|
14408
14446
|
dayColors,
|
|
14409
14447
|
dayContent,
|
|
14448
|
+
focusedEventId,
|
|
14410
14449
|
onEventClick,
|
|
14411
14450
|
onMoreClick,
|
|
14412
14451
|
todayLabel = "\uC624\uB298",
|
|
@@ -14457,8 +14496,14 @@ function SCalendarBoard({
|
|
|
14457
14496
|
const blockedDates = new Set(
|
|
14458
14497
|
cells.filter((cell) => dayContent?.[cell.date] != null).map((cell) => cell.date)
|
|
14459
14498
|
);
|
|
14460
|
-
return layoutCalendarBoard({
|
|
14461
|
-
|
|
14499
|
+
return layoutCalendarBoard({
|
|
14500
|
+
cells,
|
|
14501
|
+
events: events ?? [],
|
|
14502
|
+
rowCapacity,
|
|
14503
|
+
blockedDates,
|
|
14504
|
+
focusedEventId
|
|
14505
|
+
});
|
|
14506
|
+
}, [cells, events, rowCapacity, dayContent, focusedEventId]);
|
|
14462
14507
|
const openIndex = openDate == null ? -1 : cells.findIndex((cell) => cell.date === openDate);
|
|
14463
14508
|
const openEvents = openIndex < 0 ? [] : layout.eventsByCell[openIndex];
|
|
14464
14509
|
useLayoutEffect(() => {
|
|
@@ -14619,6 +14664,8 @@ function SCalendarBoard({
|
|
|
14619
14664
|
body: content,
|
|
14620
14665
|
hiddenCount: layout.hiddenCountByCell[index],
|
|
14621
14666
|
moreLane: layout.moreLaneByWeek[Math.floor(index / 7)],
|
|
14667
|
+
moreReplaced: layout.moreReplacedByCell[index],
|
|
14668
|
+
focusedEventId,
|
|
14622
14669
|
isOpen: openDate === cell.date,
|
|
14623
14670
|
moreLabel,
|
|
14624
14671
|
onDaySelect: (date) => onValueChange?.(date, list),
|