@x-plat/design-system 0.7.0 → 0.7.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/Badge/index.cjs +10 -7
- package/dist/components/Badge/index.css +13 -13
- package/dist/components/Badge/index.d.cts +3 -19
- package/dist/components/Badge/index.d.ts +3 -19
- package/dist/components/Badge/index.js +8 -6
- package/dist/components/NotificationBadge/index.cjs +68 -0
- package/dist/components/NotificationBadge/index.css +75 -0
- package/dist/components/NotificationBadge/index.d.cts +47 -0
- package/dist/components/NotificationBadge/index.d.ts +47 -0
- package/dist/components/NotificationBadge/index.js +40 -0
- package/dist/components/Table/index.cjs +2 -0
- package/dist/components/Table/index.d.cts +2 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/index.cjs +268 -264
- package/dist/components/index.css +76 -76
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +267 -264
- package/dist/index.cjs +268 -264
- package/dist/index.css +76 -76
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +267 -264
- package/guidelines/AGENT_PROMPT.md +1 -1
- package/guidelines/Guidelines.md +1 -1
- package/guidelines/components/feedback.md +39 -11
- package/guidelines/components/table.md +68 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -61,7 +61,7 @@ __export(index_exports, {
|
|
|
61
61
|
Avatar: () => Avatar_default,
|
|
62
62
|
AwardIcon: () => AwardIcon_default,
|
|
63
63
|
BREAKPOINT_KEYS_ORDERED: () => BREAKPOINT_KEYS_ORDERED,
|
|
64
|
-
Badge: () =>
|
|
64
|
+
Badge: () => NotificationBadge_default,
|
|
65
65
|
BarChart2Icon: () => BarChart2Icon_default,
|
|
66
66
|
BarChartIcon: () => BarChartIcon_default,
|
|
67
67
|
BatteryChargingIcon: () => BatteryChargingIcon_default,
|
|
@@ -250,6 +250,7 @@ __export(index_exports, {
|
|
|
250
250
|
MusicIcon: () => MusicIcon_default,
|
|
251
251
|
Navigation2Icon: () => Navigation2Icon_default,
|
|
252
252
|
NavigationIcon: () => NavigationIcon_default,
|
|
253
|
+
NotificationBadge: () => NotificationBadge_default,
|
|
253
254
|
OctagonIcon: () => OctagonIcon_default,
|
|
254
255
|
OpenEyeIcon: () => OpenEyeIcon_default,
|
|
255
256
|
PackageIcon: () => PackageIcon_default,
|
|
@@ -6078,52 +6079,31 @@ var Avatar = (props) => {
|
|
|
6078
6079
|
Avatar.displayName = "Avatar";
|
|
6079
6080
|
var Avatar_default = Avatar;
|
|
6080
6081
|
|
|
6081
|
-
// src/components/Badge/Badge.tsx
|
|
6082
|
-
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
6083
|
-
var Badge = (props) => {
|
|
6084
|
-
const {
|
|
6085
|
-
children,
|
|
6086
|
-
type = "error",
|
|
6087
|
-
count,
|
|
6088
|
-
maxCount = 99,
|
|
6089
|
-
dot = false,
|
|
6090
|
-
size = "md"
|
|
6091
|
-
} = props;
|
|
6092
|
-
const showBadge = dot || count !== void 0 && count > 0;
|
|
6093
|
-
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
6094
|
-
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: clsx_default("lib-xplat-badge", size), children: [
|
|
6095
|
-
children,
|
|
6096
|
-
showBadge && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
6097
|
-
] });
|
|
6098
|
-
};
|
|
6099
|
-
Badge.displayName = "Badge";
|
|
6100
|
-
var Badge_default = Badge;
|
|
6101
|
-
|
|
6102
6082
|
// src/components/Box/Box.tsx
|
|
6103
|
-
var
|
|
6083
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
6104
6084
|
var Box = ({
|
|
6105
6085
|
children,
|
|
6106
6086
|
title,
|
|
6107
6087
|
variant = "outlined",
|
|
6108
6088
|
padding = "md"
|
|
6109
6089
|
}) => {
|
|
6110
|
-
return /* @__PURE__ */ (0,
|
|
6111
|
-
title && /* @__PURE__ */ (0,
|
|
6112
|
-
/* @__PURE__ */ (0,
|
|
6090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
|
|
6091
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "box-title", children: title }),
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "box-content", children })
|
|
6113
6093
|
] });
|
|
6114
6094
|
};
|
|
6115
6095
|
Box.displayName = "Box";
|
|
6116
6096
|
var Box_default = Box;
|
|
6117
6097
|
|
|
6118
6098
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
6119
|
-
var
|
|
6099
|
+
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
6120
6100
|
var Breadcrumb = (props) => {
|
|
6121
6101
|
const { items, separator = "/" } = props;
|
|
6122
|
-
return /* @__PURE__ */ (0,
|
|
6102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ol", { children: items.map((item, index) => {
|
|
6123
6103
|
const isLast = index === items.length - 1;
|
|
6124
|
-
return /* @__PURE__ */ (0,
|
|
6125
|
-
isLast ? /* @__PURE__ */ (0,
|
|
6126
|
-
!isLast && /* @__PURE__ */ (0,
|
|
6104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("li", { children: [
|
|
6105
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("button", { className: "link", onClick: item.onClick, children: item.label }),
|
|
6106
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: "separator", children: separator })
|
|
6127
6107
|
] }, index);
|
|
6128
6108
|
}) }) });
|
|
6129
6109
|
};
|
|
@@ -6131,7 +6111,7 @@ Breadcrumb.displayName = "Breadcrumb";
|
|
|
6131
6111
|
var Breadcrumb_default = Breadcrumb;
|
|
6132
6112
|
|
|
6133
6113
|
// src/components/Button/Button.tsx
|
|
6134
|
-
var
|
|
6114
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
6135
6115
|
var Button = (props) => {
|
|
6136
6116
|
const {
|
|
6137
6117
|
children,
|
|
@@ -6140,7 +6120,7 @@ var Button = (props) => {
|
|
|
6140
6120
|
disabled,
|
|
6141
6121
|
...rest
|
|
6142
6122
|
} = props;
|
|
6143
|
-
return /* @__PURE__ */ (0,
|
|
6123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
6144
6124
|
"button",
|
|
6145
6125
|
{
|
|
6146
6126
|
className: clsx_default("lib-xplat-button", type, size),
|
|
@@ -6257,7 +6237,7 @@ var MONTH_LABELS = {
|
|
|
6257
6237
|
};
|
|
6258
6238
|
|
|
6259
6239
|
// src/components/Calendar/Calendar.tsx
|
|
6260
|
-
var
|
|
6240
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
6261
6241
|
var DayCell = import_react4.default.memo(
|
|
6262
6242
|
({
|
|
6263
6243
|
day,
|
|
@@ -6269,7 +6249,7 @@ var DayCell = import_react4.default.memo(
|
|
|
6269
6249
|
onEventClick
|
|
6270
6250
|
}) => {
|
|
6271
6251
|
if (renderDay) {
|
|
6272
|
-
return /* @__PURE__ */ (0,
|
|
6252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6273
6253
|
"div",
|
|
6274
6254
|
{
|
|
6275
6255
|
className: clsx_default(
|
|
@@ -6286,7 +6266,7 @@ var DayCell = import_react4.default.memo(
|
|
|
6286
6266
|
}
|
|
6287
6267
|
);
|
|
6288
6268
|
}
|
|
6289
|
-
return /* @__PURE__ */ (0,
|
|
6269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
|
|
6290
6270
|
"div",
|
|
6291
6271
|
{
|
|
6292
6272
|
className: clsx_default(
|
|
@@ -6302,9 +6282,9 @@ var DayCell = import_react4.default.memo(
|
|
|
6302
6282
|
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
6303
6283
|
},
|
|
6304
6284
|
children: [
|
|
6305
|
-
/* @__PURE__ */ (0,
|
|
6306
|
-
dayEvents.length > 0 && /* @__PURE__ */ (0,
|
|
6307
|
-
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0,
|
|
6285
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("span", { className: "calendar-day-number", children: day.day }),
|
|
6286
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "calendar-day-events", children: [
|
|
6287
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6308
6288
|
"span",
|
|
6309
6289
|
{
|
|
6310
6290
|
className: "calendar-event-dot",
|
|
@@ -6317,7 +6297,7 @@ var DayCell = import_react4.default.memo(
|
|
|
6317
6297
|
},
|
|
6318
6298
|
ei
|
|
6319
6299
|
)),
|
|
6320
|
-
dayEvents.length > 3 && /* @__PURE__ */ (0,
|
|
6300
|
+
dayEvents.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("span", { className: "calendar-event-more", children: [
|
|
6321
6301
|
"+",
|
|
6322
6302
|
dayEvents.length - 3
|
|
6323
6303
|
] })
|
|
@@ -6438,21 +6418,21 @@ var Calendar = (props) => {
|
|
|
6438
6418
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
6439
6419
|
const monthLabels = MONTH_LABELS[locale];
|
|
6440
6420
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
6441
|
-
return /* @__PURE__ */ (0,
|
|
6421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
|
|
6442
6422
|
"div",
|
|
6443
6423
|
{
|
|
6444
6424
|
className: "lib-xplat-calendar",
|
|
6445
6425
|
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
6446
6426
|
children: [
|
|
6447
|
-
/* @__PURE__ */ (0,
|
|
6448
|
-
/* @__PURE__ */ (0,
|
|
6449
|
-
/* @__PURE__ */ (0,
|
|
6450
|
-
/* @__PURE__ */ (0,
|
|
6451
|
-
showToday && /* @__PURE__ */ (0,
|
|
6427
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsxs)("div", { className: "calendar-header", children: [
|
|
6428
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ChevronLeftIcon_default, {}) }),
|
|
6429
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
6430
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(ChevronRightIcon_default, {}) }),
|
|
6431
|
+
showToday && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
6452
6432
|
] }),
|
|
6453
|
-
pickerMode === "years" && /* @__PURE__ */ (0,
|
|
6433
|
+
pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
6454
6434
|
const y = yearRangeStart + i;
|
|
6455
|
-
return /* @__PURE__ */ (0,
|
|
6435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6456
6436
|
"button",
|
|
6457
6437
|
{
|
|
6458
6438
|
type: "button",
|
|
@@ -6463,7 +6443,7 @@ var Calendar = (props) => {
|
|
|
6463
6443
|
y
|
|
6464
6444
|
);
|
|
6465
6445
|
}) }),
|
|
6466
|
-
pickerMode === "months" && /* @__PURE__ */ (0,
|
|
6446
|
+
pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6467
6447
|
"button",
|
|
6468
6448
|
{
|
|
6469
6449
|
type: "button",
|
|
@@ -6473,8 +6453,8 @@ var Calendar = (props) => {
|
|
|
6473
6453
|
},
|
|
6474
6454
|
i
|
|
6475
6455
|
)) }),
|
|
6476
|
-
pickerMode === "days" && /* @__PURE__ */ (0,
|
|
6477
|
-
/* @__PURE__ */ (0,
|
|
6456
|
+
pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(import_jsx_runtime302.Fragment, { children: [
|
|
6457
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6478
6458
|
"div",
|
|
6479
6459
|
{
|
|
6480
6460
|
className: clsx_default(
|
|
@@ -6486,12 +6466,12 @@ var Calendar = (props) => {
|
|
|
6486
6466
|
},
|
|
6487
6467
|
label
|
|
6488
6468
|
)) }),
|
|
6489
|
-
/* @__PURE__ */ (0,
|
|
6469
|
+
/* @__PURE__ */ (0, import_jsx_runtime302.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
6490
6470
|
const dayEvents = getEventsForDay(day.date);
|
|
6491
6471
|
const t = day.date.getTime();
|
|
6492
6472
|
const disabled = t < minTime || t > maxTime;
|
|
6493
6473
|
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
6494
|
-
return /* @__PURE__ */ (0,
|
|
6474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6495
6475
|
DayCell,
|
|
6496
6476
|
{
|
|
6497
6477
|
day,
|
|
@@ -6517,10 +6497,10 @@ var Calendar_default = Calendar;
|
|
|
6517
6497
|
var import_react5 = __toESM(require("react"), 1);
|
|
6518
6498
|
|
|
6519
6499
|
// src/components/CardTab/CardTabPanel.tsx
|
|
6520
|
-
var
|
|
6500
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
6521
6501
|
var CardTabPanel = (props) => {
|
|
6522
6502
|
const { children, columns = 3 } = props;
|
|
6523
|
-
return /* @__PURE__ */ (0,
|
|
6503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6524
6504
|
"div",
|
|
6525
6505
|
{
|
|
6526
6506
|
className: "card-tab-panel",
|
|
@@ -6533,7 +6513,7 @@ CardTabPanel.displayName = "CardTab.Panel";
|
|
|
6533
6513
|
var CardTabPanel_default = CardTabPanel;
|
|
6534
6514
|
|
|
6535
6515
|
// src/components/CardTab/CardTab.tsx
|
|
6536
|
-
var
|
|
6516
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
6537
6517
|
var CardTabRoot = (props) => {
|
|
6538
6518
|
const {
|
|
6539
6519
|
tabs,
|
|
@@ -6557,10 +6537,10 @@ var CardTabRoot = (props) => {
|
|
|
6557
6537
|
const activePanel = panels.find(
|
|
6558
6538
|
(panel) => panel.props.value === activeValue
|
|
6559
6539
|
);
|
|
6560
|
-
return /* @__PURE__ */ (0,
|
|
6561
|
-
/* @__PURE__ */ (0,
|
|
6540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsxs)("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "card-tab-bar", children: tabs.map((tab) => {
|
|
6562
6542
|
const isActive2 = tab.value === activeValue;
|
|
6563
|
-
return /* @__PURE__ */ (0,
|
|
6543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
6564
6544
|
"button",
|
|
6565
6545
|
{
|
|
6566
6546
|
className: clsx_default("card-tab-trigger", isActive2 && "active"),
|
|
@@ -6572,7 +6552,7 @@ var CardTabRoot = (props) => {
|
|
|
6572
6552
|
tab.value
|
|
6573
6553
|
);
|
|
6574
6554
|
}) }),
|
|
6575
|
-
/* @__PURE__ */ (0,
|
|
6555
|
+
/* @__PURE__ */ (0, import_jsx_runtime304.jsx)("div", { className: "card-tab-body", children: activePanel })
|
|
6576
6556
|
] });
|
|
6577
6557
|
};
|
|
6578
6558
|
CardTabRoot.displayName = "CardTab";
|
|
@@ -6583,7 +6563,7 @@ var CardTab_default = CardTab;
|
|
|
6583
6563
|
|
|
6584
6564
|
// src/components/Chart/Chart.tsx
|
|
6585
6565
|
var import_react6 = __toESM(require("react"), 1);
|
|
6586
|
-
var
|
|
6566
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
6587
6567
|
var CATEGORICAL_COUNT2 = 8;
|
|
6588
6568
|
var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
|
|
6589
6569
|
const n = i + 1;
|
|
@@ -6719,12 +6699,12 @@ var useChartTooltip = (enabled) => {
|
|
|
6719
6699
|
}, []);
|
|
6720
6700
|
return { tooltip, show, hide, move, containerRef };
|
|
6721
6701
|
};
|
|
6722
|
-
var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0,
|
|
6702
|
+
var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
6723
6703
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
6724
6704
|
const val = Math.round(maxVal * ratio);
|
|
6725
|
-
return /* @__PURE__ */ (0,
|
|
6726
|
-
/* @__PURE__ */ (0,
|
|
6727
|
-
/* @__PURE__ */ (0,
|
|
6705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
|
|
6706
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
6707
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
6728
6708
|
] }, ratio);
|
|
6729
6709
|
}) }));
|
|
6730
6710
|
GridLines.displayName = "GridLines";
|
|
@@ -6736,10 +6716,10 @@ var getLabelStep = (count, chartW) => {
|
|
|
6736
6716
|
};
|
|
6737
6717
|
var AxisLabels = import_react6.default.memo(({ labels, count, chartW, height }) => {
|
|
6738
6718
|
const step = getLabelStep(count, chartW);
|
|
6739
|
-
return /* @__PURE__ */ (0,
|
|
6719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(import_jsx_runtime305.Fragment, { children: labels.map((label, i) => {
|
|
6740
6720
|
if (i % step !== 0) return null;
|
|
6741
6721
|
const x = PADDING.left + i / (count - 1 || 1) * chartW;
|
|
6742
|
-
return /* @__PURE__ */ (0,
|
|
6722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
6743
6723
|
}) });
|
|
6744
6724
|
});
|
|
6745
6725
|
AxisLabels.displayName = "AxisLabels";
|
|
@@ -6815,7 +6795,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6815
6795
|
}, [animate, width]);
|
|
6816
6796
|
const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
|
|
6817
6797
|
const lineClipId = "line-area-clip";
|
|
6818
|
-
return /* @__PURE__ */ (0,
|
|
6798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
|
|
6819
6799
|
"svg",
|
|
6820
6800
|
{
|
|
6821
6801
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -6833,9 +6813,9 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6833
6813
|
onLeave();
|
|
6834
6814
|
},
|
|
6835
6815
|
children: [
|
|
6836
|
-
animate && /* @__PURE__ */ (0,
|
|
6837
|
-
/* @__PURE__ */ (0,
|
|
6838
|
-
/* @__PURE__ */ (0,
|
|
6816
|
+
animate && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("clipPath", { id: lineClipId, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(GridLines, { width, height, chartH, maxVal }),
|
|
6818
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(AxisLabels, { labels, count, chartW, height }),
|
|
6839
6819
|
entries.map(([key], di) => {
|
|
6840
6820
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
6841
6821
|
const color = palette[2];
|
|
@@ -6844,16 +6824,16 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6844
6824
|
const gradientId = `line-gradient-${di}`;
|
|
6845
6825
|
const polyPoints = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
6846
6826
|
const areaD = `M ${points[0].x},${points[0].y} ${points.map((p) => `L ${p.x},${p.y}`).join(" ")} L ${points[points.length - 1].x},${PADDING.top + chartH} L ${points[0].x},${PADDING.top + chartH} Z`;
|
|
6847
|
-
return /* @__PURE__ */ (0,
|
|
6848
|
-
/* @__PURE__ */ (0,
|
|
6849
|
-
/* @__PURE__ */ (0,
|
|
6850
|
-
/* @__PURE__ */ (0,
|
|
6827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
|
|
6828
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6829
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
|
|
6830
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
|
|
6851
6831
|
] }) }),
|
|
6852
|
-
/* @__PURE__ */ (0,
|
|
6853
|
-
/* @__PURE__ */ (0,
|
|
6854
|
-
/* @__PURE__ */ (0,
|
|
6832
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
|
|
6833
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: areaD, fill: `url(#${gradientId})` }),
|
|
6834
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
|
|
6855
6835
|
] }),
|
|
6856
|
-
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0,
|
|
6836
|
+
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6857
6837
|
"circle",
|
|
6858
6838
|
{
|
|
6859
6839
|
cx: points[activeIndex].x,
|
|
@@ -6865,7 +6845,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6865
6845
|
)
|
|
6866
6846
|
] }, di);
|
|
6867
6847
|
}),
|
|
6868
|
-
activeX !== null && /* @__PURE__ */ (0,
|
|
6848
|
+
activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6869
6849
|
"line",
|
|
6870
6850
|
{
|
|
6871
6851
|
x1: activeX,
|
|
@@ -6875,7 +6855,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6875
6855
|
className: "chart-crosshair"
|
|
6876
6856
|
}
|
|
6877
6857
|
),
|
|
6878
|
-
/* @__PURE__ */ (0,
|
|
6858
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6879
6859
|
"rect",
|
|
6880
6860
|
{
|
|
6881
6861
|
x: PADDING.left,
|
|
@@ -6924,7 +6904,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6924
6904
|
}, [animate, width]);
|
|
6925
6905
|
const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
|
|
6926
6906
|
const curveClipId = "curve-area-clip";
|
|
6927
|
-
return /* @__PURE__ */ (0,
|
|
6907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
|
|
6928
6908
|
"svg",
|
|
6929
6909
|
{
|
|
6930
6910
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -6943,9 +6923,9 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6943
6923
|
onLeave();
|
|
6944
6924
|
},
|
|
6945
6925
|
children: [
|
|
6946
|
-
animate && /* @__PURE__ */ (0,
|
|
6947
|
-
/* @__PURE__ */ (0,
|
|
6948
|
-
/* @__PURE__ */ (0,
|
|
6926
|
+
animate && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("clipPath", { id: curveClipId, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
|
|
6927
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(GridLines, { width, height, chartH, maxVal }),
|
|
6928
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(AxisLabels, { labels, count, chartW, height }),
|
|
6949
6929
|
entries.map(([key], di) => {
|
|
6950
6930
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
6951
6931
|
const color = palette[2];
|
|
@@ -6954,16 +6934,16 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6954
6934
|
const gradientId = `curve-gradient-${di}`;
|
|
6955
6935
|
const linePath = toSmoothPath(points);
|
|
6956
6936
|
const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
|
|
6957
|
-
return /* @__PURE__ */ (0,
|
|
6958
|
-
/* @__PURE__ */ (0,
|
|
6959
|
-
/* @__PURE__ */ (0,
|
|
6960
|
-
/* @__PURE__ */ (0,
|
|
6937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { children: [
|
|
6938
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6939
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
|
|
6940
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
|
|
6961
6941
|
] }) }),
|
|
6962
|
-
/* @__PURE__ */ (0,
|
|
6963
|
-
/* @__PURE__ */ (0,
|
|
6964
|
-
/* @__PURE__ */ (0,
|
|
6942
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
|
|
6943
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` }),
|
|
6944
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
|
|
6965
6945
|
] }),
|
|
6966
|
-
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0,
|
|
6946
|
+
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6967
6947
|
"circle",
|
|
6968
6948
|
{
|
|
6969
6949
|
cx: points[activeIndex].x,
|
|
@@ -6975,7 +6955,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6975
6955
|
)
|
|
6976
6956
|
] }, di);
|
|
6977
6957
|
}),
|
|
6978
|
-
activeX !== null && /* @__PURE__ */ (0,
|
|
6958
|
+
activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6979
6959
|
"line",
|
|
6980
6960
|
{
|
|
6981
6961
|
x1: activeX,
|
|
@@ -6985,7 +6965,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6985
6965
|
className: "chart-crosshair"
|
|
6986
6966
|
}
|
|
6987
6967
|
),
|
|
6988
|
-
/* @__PURE__ */ (0,
|
|
6968
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6989
6969
|
"rect",
|
|
6990
6970
|
{
|
|
6991
6971
|
x: PADDING.left,
|
|
@@ -7028,11 +7008,11 @@ var BarChart = import_react6.default.memo(({ data, labels, width, height, animat
|
|
|
7028
7008
|
[entries, maxVal, chartH, groupW, barW, barGap, groupCount]
|
|
7029
7009
|
);
|
|
7030
7010
|
const barLabelStep = getLabelStep(count, chartW);
|
|
7031
|
-
return /* @__PURE__ */ (0,
|
|
7032
|
-
/* @__PURE__ */ (0,
|
|
7011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
7012
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)(GridLines, { width, height, chartH, maxVal }),
|
|
7033
7013
|
labels.map((label, i) => {
|
|
7034
7014
|
if (i % barLabelStep !== 0) return null;
|
|
7035
|
-
return /* @__PURE__ */ (0,
|
|
7015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
7036
7016
|
}),
|
|
7037
7017
|
entries.map(([key], di) => {
|
|
7038
7018
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
@@ -7041,7 +7021,7 @@ var BarChart = import_react6.default.memo(({ data, labels, width, height, animat
|
|
|
7041
7021
|
const r2 = Math.min(4, b.w / 2);
|
|
7042
7022
|
const d = b.h <= r2 ? `M ${b.x} ${b.y + b.h} V ${b.y} H ${b.x + b.w} V ${b.y + b.h} Z` : `M ${b.x} ${b.y + b.h} V ${b.y + r2} Q ${b.x} ${b.y} ${b.x + r2} ${b.y} H ${b.x + b.w - r2} Q ${b.x + b.w} ${b.y} ${b.x + b.w} ${b.y + r2} V ${b.y + b.h} Z`;
|
|
7043
7023
|
const delay = 100 + i * 80;
|
|
7044
|
-
return /* @__PURE__ */ (0,
|
|
7024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
7045
7025
|
"path",
|
|
7046
7026
|
{
|
|
7047
7027
|
d,
|
|
@@ -7121,8 +7101,8 @@ var PieDonutChart = import_react6.default.memo(
|
|
|
7121
7101
|
});
|
|
7122
7102
|
}, [values, total, cx, cy, r2, innerR, labels]);
|
|
7123
7103
|
const maskId = `pie-mask-${isDoughnut ? "d" : "p"}`;
|
|
7124
|
-
return /* @__PURE__ */ (0,
|
|
7125
|
-
animate && /* @__PURE__ */ (0,
|
|
7104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
|
|
7105
|
+
animate && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("mask", { id: maskId, children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
7126
7106
|
"circle",
|
|
7127
7107
|
{
|
|
7128
7108
|
ref: maskRef,
|
|
@@ -7135,7 +7115,7 @@ var PieDonutChart = import_react6.default.memo(
|
|
|
7135
7115
|
transform: `rotate(-90 ${cx} ${cy})`
|
|
7136
7116
|
}
|
|
7137
7117
|
) }) }),
|
|
7138
|
-
/* @__PURE__ */ (0,
|
|
7118
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
7139
7119
|
"path",
|
|
7140
7120
|
{
|
|
7141
7121
|
d: s.d,
|
|
@@ -7170,15 +7150,15 @@ var ChartTooltip = ({ x, y, containerWidth, containerHeight, tooltipType, childr
|
|
|
7170
7150
|
const sepIdx = content.indexOf(" \u2014 ");
|
|
7171
7151
|
const title = sepIdx >= 0 ? content.slice(0, sepIdx) : content;
|
|
7172
7152
|
const desc = sepIdx >= 0 ? content.slice(sepIdx + 3) : "";
|
|
7173
|
-
return /* @__PURE__ */ (0,
|
|
7153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)(
|
|
7174
7154
|
"div",
|
|
7175
7155
|
{
|
|
7176
7156
|
ref,
|
|
7177
7157
|
className: `lib-xplat-tooltip ${tooltipType} chart-tooltip-pos`,
|
|
7178
7158
|
style: { left: pos.left, top: pos.top },
|
|
7179
7159
|
children: [
|
|
7180
|
-
title && /* @__PURE__ */ (0,
|
|
7181
|
-
desc && /* @__PURE__ */ (0,
|
|
7160
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "tooltip-title", children: title }),
|
|
7161
|
+
desc && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "tooltip-desc", children: desc })
|
|
7182
7162
|
]
|
|
7183
7163
|
}
|
|
7184
7164
|
);
|
|
@@ -7190,14 +7170,14 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
7190
7170
|
const total = values.reduce((a, b) => a + b, 0) || 1;
|
|
7191
7171
|
const firstKey = entries[0]?.[0] ?? "";
|
|
7192
7172
|
const colorOffset = hashString(firstKey);
|
|
7193
|
-
return /* @__PURE__ */ (0,
|
|
7173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "chart-legend", children: values.map((v, i) => {
|
|
7194
7174
|
const pct = Math.round(v / total * 100);
|
|
7195
7175
|
const color = PIE_COLORS[(i + colorOffset) % PIE_COLORS.length];
|
|
7196
|
-
return /* @__PURE__ */ (0,
|
|
7197
|
-
/* @__PURE__ */ (0,
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7199
|
-
/* @__PURE__ */ (0,
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-item", children: [
|
|
7177
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
|
|
7178
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-text", children: [
|
|
7179
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
|
|
7180
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("span", { className: "chart-legend-value", children: [
|
|
7201
7181
|
v.toLocaleString(),
|
|
7202
7182
|
"(",
|
|
7203
7183
|
pct,
|
|
@@ -7207,16 +7187,16 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
7207
7187
|
] }, i);
|
|
7208
7188
|
}) });
|
|
7209
7189
|
}
|
|
7210
|
-
return /* @__PURE__ */ (0,
|
|
7190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "chart-legend", children: entries.map(([key], di) => {
|
|
7211
7191
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
7212
7192
|
const color = palette[2];
|
|
7213
7193
|
const values = entries[di][1];
|
|
7214
7194
|
const sum = values.reduce((a, b) => a + b, 0);
|
|
7215
|
-
return /* @__PURE__ */ (0,
|
|
7216
|
-
/* @__PURE__ */ (0,
|
|
7217
|
-
/* @__PURE__ */ (0,
|
|
7218
|
-
/* @__PURE__ */ (0,
|
|
7219
|
-
/* @__PURE__ */ (0,
|
|
7195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-item", children: [
|
|
7196
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
|
|
7197
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "chart-legend-text", children: [
|
|
7198
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-label", children: key }),
|
|
7199
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("span", { className: "chart-legend-value", children: sum.toLocaleString() })
|
|
7220
7200
|
] })
|
|
7221
7201
|
] }, di);
|
|
7222
7202
|
}) });
|
|
@@ -7230,14 +7210,14 @@ var Chart = import_react6.default.memo((props) => {
|
|
|
7230
7210
|
const dataKey = import_react6.default.useMemo(() => JSON.stringify(labels), [labels]);
|
|
7231
7211
|
const animate = useChartAnimation(containerRef, dataKey);
|
|
7232
7212
|
const ready = width > 0 && height > 0;
|
|
7233
|
-
return /* @__PURE__ */ (0,
|
|
7234
|
-
ready && type === "line" && /* @__PURE__ */ (0,
|
|
7235
|
-
ready && type === "curve" && /* @__PURE__ */ (0,
|
|
7236
|
-
ready && type === "bar" && /* @__PURE__ */ (0,
|
|
7237
|
-
ready && type === "pie" && /* @__PURE__ */ (0,
|
|
7238
|
-
ready && type === "doughnut" && /* @__PURE__ */ (0,
|
|
7239
|
-
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ (0,
|
|
7240
|
-
tooltip.visible && tooltip.content && /* @__PURE__ */ (0,
|
|
7213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
|
|
7214
|
+
ready && type === "line" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7215
|
+
ready && type === "curve" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7216
|
+
ready && type === "bar" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7217
|
+
ready && type === "pie" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7218
|
+
ready && type === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
|
|
7219
|
+
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(ChartLegend, { data: stableData, labels: stableLabels, type }),
|
|
7220
|
+
tooltip.visible && tooltip.content && /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
|
|
7241
7221
|
] });
|
|
7242
7222
|
});
|
|
7243
7223
|
Chart.displayName = "Chart";
|
|
@@ -7247,7 +7227,7 @@ var Chart_default = Chart;
|
|
|
7247
7227
|
var import_react7 = __toESM(require("react"), 1);
|
|
7248
7228
|
|
|
7249
7229
|
// src/components/IconButton/IconButton.tsx
|
|
7250
|
-
var
|
|
7230
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
7251
7231
|
var IconButton = (props) => {
|
|
7252
7232
|
const {
|
|
7253
7233
|
icon,
|
|
@@ -7256,7 +7236,7 @@ var IconButton = (props) => {
|
|
|
7256
7236
|
disabled,
|
|
7257
7237
|
...rest
|
|
7258
7238
|
} = props;
|
|
7259
|
-
return /* @__PURE__ */ (0,
|
|
7239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
7260
7240
|
"button",
|
|
7261
7241
|
{
|
|
7262
7242
|
className: clsx_default("lib-xplat-icon-button", type, size),
|
|
@@ -7270,7 +7250,7 @@ IconButton.displayName = "IconButton";
|
|
|
7270
7250
|
var IconButton_default = IconButton;
|
|
7271
7251
|
|
|
7272
7252
|
// src/components/ChatInput/ChatInput.tsx
|
|
7273
|
-
var
|
|
7253
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
7274
7254
|
var ChatInput = import_react7.default.forwardRef(
|
|
7275
7255
|
(props, ref) => {
|
|
7276
7256
|
const {
|
|
@@ -7301,8 +7281,8 @@ var ChatInput = import_react7.default.forwardRef(
|
|
|
7301
7281
|
handleSubmit();
|
|
7302
7282
|
}
|
|
7303
7283
|
};
|
|
7304
|
-
return /* @__PURE__ */ (0,
|
|
7305
|
-
/* @__PURE__ */ (0,
|
|
7284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
|
|
7285
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
7306
7286
|
AutoResizeTextArea_default,
|
|
7307
7287
|
{
|
|
7308
7288
|
ref,
|
|
@@ -7316,10 +7296,10 @@ var ChatInput = import_react7.default.forwardRef(
|
|
|
7316
7296
|
onKeyDown: handleKeyDown
|
|
7317
7297
|
}
|
|
7318
7298
|
),
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7299
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
7320
7300
|
IconButton_default,
|
|
7321
7301
|
{
|
|
7322
|
-
icon: /* @__PURE__ */ (0,
|
|
7302
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(MessageSquareIcon_default, {}),
|
|
7323
7303
|
type: buttonType,
|
|
7324
7304
|
size: "sm",
|
|
7325
7305
|
disabled: !hasText || disabled,
|
|
@@ -7353,7 +7333,7 @@ var import_tokens_core = require("@x-plat/tokens-core");
|
|
|
7353
7333
|
var import_tokens_core2 = require("@x-plat/tokens-core");
|
|
7354
7334
|
|
|
7355
7335
|
// src/components/CheckBox/CheckBox.tsx
|
|
7356
|
-
var
|
|
7336
|
+
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
7357
7337
|
var CheckBox = (props) => {
|
|
7358
7338
|
const {
|
|
7359
7339
|
checked,
|
|
@@ -7372,8 +7352,8 @@ var CheckBox = (props) => {
|
|
|
7372
7352
|
const checkedClasses = `checked`;
|
|
7373
7353
|
const disabledClasses = "disabled";
|
|
7374
7354
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
7375
|
-
return /* @__PURE__ */ (0,
|
|
7376
|
-
/* @__PURE__ */ (0,
|
|
7355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size, type, className), children: [
|
|
7356
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
7377
7357
|
"input",
|
|
7378
7358
|
{
|
|
7379
7359
|
type: "checkbox",
|
|
@@ -7383,22 +7363,22 @@ var CheckBox = (props) => {
|
|
|
7383
7363
|
...rest
|
|
7384
7364
|
}
|
|
7385
7365
|
),
|
|
7386
|
-
/* @__PURE__ */ (0,
|
|
7387
|
-
label && /* @__PURE__ */ (0,
|
|
7366
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(CheckIcon_default, {}) }) }),
|
|
7367
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)("span", { className: "label", children: label })
|
|
7388
7368
|
] });
|
|
7389
7369
|
};
|
|
7390
7370
|
CheckBox.displayName = "CheckBox";
|
|
7391
7371
|
var CheckBox_default = CheckBox;
|
|
7392
7372
|
|
|
7393
7373
|
// src/components/Chip/Chip.tsx
|
|
7394
|
-
var
|
|
7374
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
7395
7375
|
var Chip = (props) => {
|
|
7396
7376
|
const {
|
|
7397
7377
|
children,
|
|
7398
7378
|
type = "primary",
|
|
7399
7379
|
size = "md"
|
|
7400
7380
|
} = props;
|
|
7401
|
-
return /* @__PURE__ */ (0,
|
|
7381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size), children });
|
|
7402
7382
|
};
|
|
7403
7383
|
Chip.displayName = "Chip";
|
|
7404
7384
|
var Chip_default = Chip;
|
|
@@ -7410,17 +7390,17 @@ var import_react14 = __toESM(require("react"), 1);
|
|
|
7410
7390
|
var import_react8 = __toESM(require("react"), 1);
|
|
7411
7391
|
|
|
7412
7392
|
// src/components/Input/InputValidations.tsx
|
|
7413
|
-
var
|
|
7393
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
7414
7394
|
var InputValidations = (props) => {
|
|
7415
7395
|
const { message, status = "default" } = props;
|
|
7416
|
-
return /* @__PURE__ */ (0,
|
|
7417
|
-
/* @__PURE__ */ (0,
|
|
7418
|
-
status === "default" && /* @__PURE__ */ (0,
|
|
7419
|
-
status === "success" && /* @__PURE__ */ (0,
|
|
7420
|
-
status === "warning" && /* @__PURE__ */ (0,
|
|
7421
|
-
status === "error" && /* @__PURE__ */ (0,
|
|
7396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
7397
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsxs)("div", { className: "icon", children: [
|
|
7398
|
+
status === "default" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(InfoIcon_default, {}),
|
|
7399
|
+
status === "success" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(SuccessIcon_default, {}),
|
|
7400
|
+
status === "warning" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(InfoIcon_default, {}),
|
|
7401
|
+
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(ErrorIcon_default, {})
|
|
7422
7402
|
] }),
|
|
7423
|
-
/* @__PURE__ */ (0,
|
|
7403
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "message", children: message })
|
|
7424
7404
|
] });
|
|
7425
7405
|
};
|
|
7426
7406
|
InputValidations.displayName = "InputValidations";
|
|
@@ -7461,7 +7441,7 @@ var handleTelBackspace = (prevValue, currValue) => {
|
|
|
7461
7441
|
};
|
|
7462
7442
|
|
|
7463
7443
|
// src/components/Input/Input.tsx
|
|
7464
|
-
var
|
|
7444
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
7465
7445
|
var import_react9 = require("react");
|
|
7466
7446
|
var formatValue = (type, value) => {
|
|
7467
7447
|
if (value === null || value === void 0) return "";
|
|
@@ -7537,13 +7517,13 @@ var Input = import_react8.default.forwardRef((props, ref) => {
|
|
|
7537
7517
|
onChange(event);
|
|
7538
7518
|
}
|
|
7539
7519
|
};
|
|
7540
|
-
return /* @__PURE__ */ (0,
|
|
7541
|
-
/* @__PURE__ */ (0,
|
|
7520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { className: clsx_default("lib-xplat-input-wrap", className), children: [
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
7542
7522
|
"div",
|
|
7543
7523
|
{
|
|
7544
7524
|
className: clsx_default("lib-xplat-input", size, disabled ? "disabled" : void 0),
|
|
7545
7525
|
children: [
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7526
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
7547
7527
|
"input",
|
|
7548
7528
|
{
|
|
7549
7529
|
...inputProps,
|
|
@@ -7554,11 +7534,11 @@ var Input = import_react8.default.forwardRef((props, ref) => {
|
|
|
7554
7534
|
onChange: handleChange
|
|
7555
7535
|
}
|
|
7556
7536
|
),
|
|
7557
|
-
suffix && /* @__PURE__ */ (0,
|
|
7537
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "suffix", children: suffix })
|
|
7558
7538
|
]
|
|
7559
7539
|
}
|
|
7560
7540
|
),
|
|
7561
|
-
validations && /* @__PURE__ */ (0,
|
|
7541
|
+
validations && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ (0, import_react9.createElement)(
|
|
7562
7542
|
InputValidations_default,
|
|
7563
7543
|
{
|
|
7564
7544
|
...validation,
|
|
@@ -7572,7 +7552,7 @@ var Input_default = Input;
|
|
|
7572
7552
|
|
|
7573
7553
|
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
7574
7554
|
var import_react10 = __toESM(require("react"), 1);
|
|
7575
|
-
var
|
|
7555
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
7576
7556
|
var PasswordInput = import_react10.default.forwardRef(
|
|
7577
7557
|
(props, ref) => {
|
|
7578
7558
|
const { reg: _reg, ...inputProps } = props;
|
|
@@ -7580,11 +7560,11 @@ var PasswordInput = import_react10.default.forwardRef(
|
|
|
7580
7560
|
const handleChangeView = () => {
|
|
7581
7561
|
setIsView((prev) => !prev);
|
|
7582
7562
|
};
|
|
7583
|
-
return /* @__PURE__ */ (0,
|
|
7563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
7584
7564
|
Input_default,
|
|
7585
7565
|
{
|
|
7586
7566
|
...inputProps,
|
|
7587
|
-
suffix: /* @__PURE__ */ (0,
|
|
7567
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "wrapper pointer", onClick: handleChangeView, children: isView ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(OpenEyeIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(CloseEyeIcon_default, {}) }),
|
|
7588
7568
|
type: isView ? "text" : "password",
|
|
7589
7569
|
ref
|
|
7590
7570
|
}
|
|
@@ -7601,9 +7581,9 @@ var import_react_dom2 = require("react-dom");
|
|
|
7601
7581
|
// src/tokens/hooks/Portal.tsx
|
|
7602
7582
|
var import_react11 = __toESM(require("react"), 1);
|
|
7603
7583
|
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
7604
|
-
var
|
|
7584
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
7605
7585
|
var PortalContainerContext = import_react11.default.createContext(null);
|
|
7606
|
-
var PortalProvider = ({ container, children }) => /* @__PURE__ */ (0,
|
|
7586
|
+
var PortalProvider = ({ container, children }) => /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(PortalContainerContext.Provider, { value: container, children });
|
|
7607
7587
|
var Portal = ({ children }) => {
|
|
7608
7588
|
const contextContainer = import_react11.default.useContext(PortalContainerContext);
|
|
7609
7589
|
if (typeof document === "undefined") return null;
|
|
@@ -7614,7 +7594,7 @@ Portal.displayName = "Portal";
|
|
|
7614
7594
|
var Portal_default = Portal;
|
|
7615
7595
|
|
|
7616
7596
|
// src/components/Modal/Modal.tsx
|
|
7617
|
-
var
|
|
7597
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
7618
7598
|
var ANIMATION_DURATION_MS = 200;
|
|
7619
7599
|
var Modal = (props) => {
|
|
7620
7600
|
const { isOpen, onClose, children } = props;
|
|
@@ -7635,12 +7615,12 @@ var Modal = (props) => {
|
|
|
7635
7615
|
if (!mounted) return null;
|
|
7636
7616
|
const stateClass = visible ? "enter" : "exit";
|
|
7637
7617
|
return (0, import_react_dom2.createPortal)(
|
|
7638
|
-
/* @__PURE__ */ (0,
|
|
7618
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
7639
7619
|
"div",
|
|
7640
7620
|
{
|
|
7641
7621
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
7642
7622
|
onClick: onClose,
|
|
7643
|
-
children: /* @__PURE__ */ (0,
|
|
7623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
7644
7624
|
"div",
|
|
7645
7625
|
{
|
|
7646
7626
|
ref: boxRef,
|
|
@@ -7648,7 +7628,7 @@ var Modal = (props) => {
|
|
|
7648
7628
|
role: "dialog",
|
|
7649
7629
|
"aria-modal": "true",
|
|
7650
7630
|
onClick: (e) => e.stopPropagation(),
|
|
7651
|
-
children: /* @__PURE__ */ (0,
|
|
7631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(PortalProvider, { container: boxRef.current, children })
|
|
7652
7632
|
}
|
|
7653
7633
|
)
|
|
7654
7634
|
}
|
|
@@ -7661,7 +7641,7 @@ var Modal_default = Modal;
|
|
|
7661
7641
|
|
|
7662
7642
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
7663
7643
|
var import_react13 = __toESM(require("react"), 1);
|
|
7664
|
-
var
|
|
7644
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
7665
7645
|
var DayCell2 = import_react13.default.memo(
|
|
7666
7646
|
({
|
|
7667
7647
|
day,
|
|
@@ -7672,7 +7652,7 @@ var DayCell2 = import_react13.default.memo(
|
|
|
7672
7652
|
isEnd,
|
|
7673
7653
|
inRange,
|
|
7674
7654
|
onSelect
|
|
7675
|
-
}) => /* @__PURE__ */ (0,
|
|
7655
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
7676
7656
|
"button",
|
|
7677
7657
|
{
|
|
7678
7658
|
type: "button",
|
|
@@ -7770,20 +7750,20 @@ var SingleDatePicker = (props) => {
|
|
|
7770
7750
|
const monthLabels = MONTH_LABELS[locale];
|
|
7771
7751
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
7772
7752
|
const hasRange = rangeStart != null && rangeEnd != null;
|
|
7773
|
-
return /* @__PURE__ */ (0,
|
|
7753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
|
|
7774
7754
|
"div",
|
|
7775
7755
|
{
|
|
7776
7756
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
7777
7757
|
children: [
|
|
7778
|
-
/* @__PURE__ */ (0,
|
|
7779
|
-
/* @__PURE__ */ (0,
|
|
7780
|
-
/* @__PURE__ */ (0,
|
|
7781
|
-
/* @__PURE__ */ (0,
|
|
7758
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "datepicker-header", children: [
|
|
7759
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(ChevronLeftIcon_default, {}) }),
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
7761
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(ChevronRightIcon_default, {}) })
|
|
7782
7762
|
] }),
|
|
7783
|
-
/* @__PURE__ */ (0,
|
|
7784
|
-
pickerMode === "years" && /* @__PURE__ */ (0,
|
|
7763
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "datepicker-body", children: [
|
|
7764
|
+
pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
7785
7765
|
const y = yearRangeStart + i;
|
|
7786
|
-
return /* @__PURE__ */ (0,
|
|
7766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
7787
7767
|
"button",
|
|
7788
7768
|
{
|
|
7789
7769
|
type: "button",
|
|
@@ -7794,7 +7774,7 @@ var SingleDatePicker = (props) => {
|
|
|
7794
7774
|
y
|
|
7795
7775
|
);
|
|
7796
7776
|
}) }),
|
|
7797
|
-
pickerMode === "months" && /* @__PURE__ */ (0,
|
|
7777
|
+
pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
7798
7778
|
"button",
|
|
7799
7779
|
{
|
|
7800
7780
|
type: "button",
|
|
@@ -7804,8 +7784,8 @@ var SingleDatePicker = (props) => {
|
|
|
7804
7784
|
},
|
|
7805
7785
|
i
|
|
7806
7786
|
)) }),
|
|
7807
|
-
pickerMode === "days" && /* @__PURE__ */ (0,
|
|
7808
|
-
/* @__PURE__ */ (0,
|
|
7787
|
+
pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(import_jsx_runtime315.Fragment, { children: [
|
|
7788
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
7809
7789
|
"div",
|
|
7810
7790
|
{
|
|
7811
7791
|
className: clsx_default(
|
|
@@ -7817,7 +7797,7 @@ var SingleDatePicker = (props) => {
|
|
|
7817
7797
|
},
|
|
7818
7798
|
label
|
|
7819
7799
|
)) }),
|
|
7820
|
-
/* @__PURE__ */ (0,
|
|
7800
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
7821
7801
|
const t = day.date.getTime();
|
|
7822
7802
|
const disabled = t < minTime || t > maxTime;
|
|
7823
7803
|
const selected = value ? isSameDay(day.date, value) : false;
|
|
@@ -7827,7 +7807,7 @@ var SingleDatePicker = (props) => {
|
|
|
7827
7807
|
const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
|
|
7828
7808
|
const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
|
|
7829
7809
|
const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
|
|
7830
|
-
return /* @__PURE__ */ (0,
|
|
7810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
7831
7811
|
DayCell2,
|
|
7832
7812
|
{
|
|
7833
7813
|
day,
|
|
@@ -7852,7 +7832,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
7852
7832
|
var SingleDatePicker_default = SingleDatePicker;
|
|
7853
7833
|
|
|
7854
7834
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
7855
|
-
var
|
|
7835
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
7856
7836
|
var formatDate = (date) => {
|
|
7857
7837
|
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
7858
7838
|
const y = date.getFullYear();
|
|
@@ -7879,19 +7859,19 @@ var InputDatePicker = (props) => {
|
|
|
7879
7859
|
const handleClose = () => {
|
|
7880
7860
|
setIsOpen(false);
|
|
7881
7861
|
};
|
|
7882
|
-
return /* @__PURE__ */ (0,
|
|
7883
|
-
/* @__PURE__ */ (0,
|
|
7862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
|
|
7863
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
7884
7864
|
Input_default,
|
|
7885
7865
|
{
|
|
7886
7866
|
value: formatDate(value),
|
|
7887
7867
|
placeholder,
|
|
7888
|
-
suffix: /* @__PURE__ */ (0,
|
|
7868
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(CalenderIcon_default, {}),
|
|
7889
7869
|
disabled,
|
|
7890
7870
|
readOnly: true
|
|
7891
7871
|
}
|
|
7892
7872
|
) }),
|
|
7893
|
-
/* @__PURE__ */ (0,
|
|
7894
|
-
/* @__PURE__ */ (0,
|
|
7873
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
7874
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
7895
7875
|
SingleDatePicker_default,
|
|
7896
7876
|
{
|
|
7897
7877
|
value: tempDate,
|
|
@@ -7901,9 +7881,9 @@ var InputDatePicker = (props) => {
|
|
|
7901
7881
|
locale
|
|
7902
7882
|
}
|
|
7903
7883
|
) }),
|
|
7904
|
-
/* @__PURE__ */ (0,
|
|
7905
|
-
/* @__PURE__ */ (0,
|
|
7906
|
-
/* @__PURE__ */ (0,
|
|
7884
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "popup-datepicker-footer", children: [
|
|
7885
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
|
|
7886
|
+
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
7907
7887
|
] })
|
|
7908
7888
|
] }) })
|
|
7909
7889
|
] });
|
|
@@ -7922,10 +7902,10 @@ var import_react16 = __toESM(require("react"), 1);
|
|
|
7922
7902
|
|
|
7923
7903
|
// src/components/Tab/TabItem.tsx
|
|
7924
7904
|
var import_react15 = __toESM(require("react"), 1);
|
|
7925
|
-
var
|
|
7905
|
+
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
7926
7906
|
var TabItem = import_react15.default.forwardRef((props, ref) => {
|
|
7927
7907
|
const { isActive: isActive2, title, onClick } = props;
|
|
7928
|
-
return /* @__PURE__ */ (0,
|
|
7908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
7929
7909
|
"div",
|
|
7930
7910
|
{
|
|
7931
7911
|
ref,
|
|
@@ -7939,7 +7919,7 @@ TabItem.displayName = "TabItem";
|
|
|
7939
7919
|
var TabItem_default = TabItem;
|
|
7940
7920
|
|
|
7941
7921
|
// src/components/Tab/Tab.tsx
|
|
7942
|
-
var
|
|
7922
|
+
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
7943
7923
|
var Tab = (props) => {
|
|
7944
7924
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
7945
7925
|
const [underlineStyle, setUnderlineStyle] = import_react16.default.useState({
|
|
@@ -7956,8 +7936,8 @@ var Tab = (props) => {
|
|
|
7956
7936
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
7957
7937
|
}
|
|
7958
7938
|
}, [activeIndex, tabs.length]);
|
|
7959
|
-
return /* @__PURE__ */ (0,
|
|
7960
|
-
tabs.map((tab, idx) => /* @__PURE__ */ (0,
|
|
7939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime318.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
7940
|
+
tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
7961
7941
|
TabItem_default,
|
|
7962
7942
|
{
|
|
7963
7943
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -7969,7 +7949,7 @@ var Tab = (props) => {
|
|
|
7969
7949
|
},
|
|
7970
7950
|
`${tab.value}_${idx}`
|
|
7971
7951
|
)),
|
|
7972
|
-
type === "toggle" && /* @__PURE__ */ (0,
|
|
7952
|
+
type === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
7973
7953
|
"div",
|
|
7974
7954
|
{
|
|
7975
7955
|
className: "tab-toggle-underline",
|
|
@@ -7985,7 +7965,7 @@ Tab.displayName = "Tab";
|
|
|
7985
7965
|
var Tab_default = Tab;
|
|
7986
7966
|
|
|
7987
7967
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
7988
|
-
var
|
|
7968
|
+
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
7989
7969
|
var RangePicker = (props) => {
|
|
7990
7970
|
const {
|
|
7991
7971
|
startDate,
|
|
@@ -8008,8 +7988,8 @@ var RangePicker = (props) => {
|
|
|
8008
7988
|
};
|
|
8009
7989
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
8010
7990
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
8011
|
-
return /* @__PURE__ */ (0,
|
|
8012
|
-
/* @__PURE__ */ (0,
|
|
7991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
|
|
7992
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
8013
7993
|
Tab_default,
|
|
8014
7994
|
{
|
|
8015
7995
|
activeIndex: activeTab === "start" ? 0 : 1,
|
|
@@ -8022,8 +8002,8 @@ var RangePicker = (props) => {
|
|
|
8022
8002
|
size: "sm"
|
|
8023
8003
|
}
|
|
8024
8004
|
) }),
|
|
8025
|
-
/* @__PURE__ */ (0,
|
|
8026
|
-
/* @__PURE__ */ (0,
|
|
8005
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "datepicker-range-panels", children: [
|
|
8006
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
8027
8007
|
SingleDatePicker_default,
|
|
8028
8008
|
{
|
|
8029
8009
|
value: startDate,
|
|
@@ -8035,7 +8015,7 @@ var RangePicker = (props) => {
|
|
|
8035
8015
|
locale
|
|
8036
8016
|
}
|
|
8037
8017
|
),
|
|
8038
|
-
/* @__PURE__ */ (0,
|
|
8018
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
8039
8019
|
SingleDatePicker_default,
|
|
8040
8020
|
{
|
|
8041
8021
|
value: endDate,
|
|
@@ -8048,7 +8028,7 @@ var RangePicker = (props) => {
|
|
|
8048
8028
|
}
|
|
8049
8029
|
)
|
|
8050
8030
|
] }),
|
|
8051
|
-
/* @__PURE__ */ (0,
|
|
8031
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
8052
8032
|
SingleDatePicker_default,
|
|
8053
8033
|
{
|
|
8054
8034
|
value: startDate,
|
|
@@ -8059,7 +8039,7 @@ var RangePicker = (props) => {
|
|
|
8059
8039
|
rangeEnd: endDate,
|
|
8060
8040
|
locale
|
|
8061
8041
|
}
|
|
8062
|
-
) : /* @__PURE__ */ (0,
|
|
8042
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
8063
8043
|
SingleDatePicker_default,
|
|
8064
8044
|
{
|
|
8065
8045
|
value: endDate,
|
|
@@ -8077,7 +8057,7 @@ RangePicker.displayName = "RangePicker";
|
|
|
8077
8057
|
var RangePicker_default = RangePicker;
|
|
8078
8058
|
|
|
8079
8059
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
8080
|
-
var
|
|
8060
|
+
var import_jsx_runtime320 = require("react/jsx-runtime");
|
|
8081
8061
|
var PopupPicker = (props) => {
|
|
8082
8062
|
const { component, type, locale } = props;
|
|
8083
8063
|
const [isOpen, setIsOpen] = import_react18.default.useState(false);
|
|
@@ -8088,11 +8068,11 @@ var PopupPicker = (props) => {
|
|
|
8088
8068
|
props.onChange?.(date);
|
|
8089
8069
|
handleClose();
|
|
8090
8070
|
};
|
|
8091
|
-
return /* @__PURE__ */ (0,
|
|
8071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
8092
8072
|
import_react18.default.cloneElement(component, { onClick: handleClick }),
|
|
8093
|
-
/* @__PURE__ */ (0,
|
|
8094
|
-
/* @__PURE__ */ (0,
|
|
8095
|
-
type === "single" && /* @__PURE__ */ (0,
|
|
8073
|
+
/* @__PURE__ */ (0, import_jsx_runtime320.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
8074
|
+
/* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: "popup-datepicker-content", children: [
|
|
8075
|
+
type === "single" && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
8096
8076
|
SingleDatePicker_default,
|
|
8097
8077
|
{
|
|
8098
8078
|
value: props.value,
|
|
@@ -8102,7 +8082,7 @@ var PopupPicker = (props) => {
|
|
|
8102
8082
|
locale
|
|
8103
8083
|
}
|
|
8104
8084
|
),
|
|
8105
|
-
type === "range" && /* @__PURE__ */ (0,
|
|
8085
|
+
type === "range" && /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
8106
8086
|
RangePicker_default,
|
|
8107
8087
|
{
|
|
8108
8088
|
startDate: props.startDate,
|
|
@@ -8114,8 +8094,8 @@ var PopupPicker = (props) => {
|
|
|
8114
8094
|
}
|
|
8115
8095
|
)
|
|
8116
8096
|
] }),
|
|
8117
|
-
/* @__PURE__ */ (0,
|
|
8118
|
-
/* @__PURE__ */ (0,
|
|
8097
|
+
/* @__PURE__ */ (0, import_jsx_runtime320.jsxs)("div", { className: "popup-datepicker-footer", children: [
|
|
8098
|
+
/* @__PURE__ */ (0, import_jsx_runtime320.jsx)(
|
|
8119
8099
|
Button_default,
|
|
8120
8100
|
{
|
|
8121
8101
|
type: "secondary",
|
|
@@ -8123,7 +8103,7 @@ var PopupPicker = (props) => {
|
|
|
8123
8103
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
8124
8104
|
}
|
|
8125
8105
|
),
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8106
|
+
/* @__PURE__ */ (0, import_jsx_runtime320.jsx)(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
8127
8107
|
] })
|
|
8128
8108
|
] }) })
|
|
8129
8109
|
] });
|
|
@@ -8132,10 +8112,10 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
8132
8112
|
var PopupPicker_default = PopupPicker;
|
|
8133
8113
|
|
|
8134
8114
|
// src/components/Divider/Divider.tsx
|
|
8135
|
-
var
|
|
8115
|
+
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
8136
8116
|
var Divider = (props) => {
|
|
8137
8117
|
const { orientation = "horizontal" } = props;
|
|
8138
|
-
return /* @__PURE__ */ (0,
|
|
8118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime321.jsx)(
|
|
8139
8119
|
"div",
|
|
8140
8120
|
{
|
|
8141
8121
|
className: clsx_default("lib-xplat-divider", orientation),
|
|
@@ -8150,7 +8130,7 @@ var Divider_default = Divider;
|
|
|
8150
8130
|
// src/components/Drawer/Drawer.tsx
|
|
8151
8131
|
var import_react19 = __toESM(require("react"), 1);
|
|
8152
8132
|
var import_react_dom3 = require("react-dom");
|
|
8153
|
-
var
|
|
8133
|
+
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
8154
8134
|
var ANIMATION_DURATION_MS2 = 250;
|
|
8155
8135
|
var Drawer = (props) => {
|
|
8156
8136
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
@@ -8170,12 +8150,12 @@ var Drawer = (props) => {
|
|
|
8170
8150
|
if (!mounted) return null;
|
|
8171
8151
|
const stateClass = visible ? "enter" : "exit";
|
|
8172
8152
|
return (0, import_react_dom3.createPortal)(
|
|
8173
|
-
/* @__PURE__ */ (0,
|
|
8153
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
|
|
8174
8154
|
"div",
|
|
8175
8155
|
{
|
|
8176
8156
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
8177
8157
|
onClick: onClose,
|
|
8178
|
-
children: /* @__PURE__ */ (0,
|
|
8158
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)(
|
|
8179
8159
|
"div",
|
|
8180
8160
|
{
|
|
8181
8161
|
className: clsx_default("lib-xplat-drawer", placement, size, stateClass),
|
|
@@ -8183,11 +8163,11 @@ var Drawer = (props) => {
|
|
|
8183
8163
|
"aria-modal": "true",
|
|
8184
8164
|
onClick: (e) => e.stopPropagation(),
|
|
8185
8165
|
children: [
|
|
8186
|
-
title && /* @__PURE__ */ (0,
|
|
8187
|
-
/* @__PURE__ */ (0,
|
|
8188
|
-
/* @__PURE__ */ (0,
|
|
8166
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime322.jsxs)("div", { className: "drawer-header", children: [
|
|
8167
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)("span", { className: "drawer-title", children: title }),
|
|
8168
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
8189
8169
|
] }),
|
|
8190
|
-
/* @__PURE__ */ (0,
|
|
8170
|
+
/* @__PURE__ */ (0, import_jsx_runtime322.jsx)("div", { className: "drawer-body", children })
|
|
8191
8171
|
]
|
|
8192
8172
|
}
|
|
8193
8173
|
)
|
|
@@ -8289,7 +8269,7 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
8289
8269
|
var useClickOutside_default = useClickOutside;
|
|
8290
8270
|
|
|
8291
8271
|
// src/components/Dropdown/Dropdown.tsx
|
|
8292
|
-
var
|
|
8272
|
+
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
8293
8273
|
var Dropdown = (props) => {
|
|
8294
8274
|
const { items, children } = props;
|
|
8295
8275
|
const [isOpen, setIsOpen] = import_react22.default.useState(false);
|
|
@@ -8314,8 +8294,8 @@ var Dropdown = (props) => {
|
|
|
8314
8294
|
item.onClick?.();
|
|
8315
8295
|
setIsOpen(false);
|
|
8316
8296
|
};
|
|
8317
|
-
return /* @__PURE__ */ (0,
|
|
8318
|
-
/* @__PURE__ */ (0,
|
|
8297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)("div", { className: "lib-xplat-dropdown", children: [
|
|
8298
|
+
/* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
8319
8299
|
"div",
|
|
8320
8300
|
{
|
|
8321
8301
|
ref: triggerRef,
|
|
@@ -8324,14 +8304,14 @@ var Dropdown = (props) => {
|
|
|
8324
8304
|
children
|
|
8325
8305
|
}
|
|
8326
8306
|
),
|
|
8327
|
-
mounted && /* @__PURE__ */ (0,
|
|
8307
|
+
mounted && /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(Portal_default, { children: /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
8328
8308
|
"div",
|
|
8329
8309
|
{
|
|
8330
8310
|
ref: menuRef,
|
|
8331
8311
|
className: clsx_default("lib-xplat-dropdown-menu", direction, { visible }),
|
|
8332
8312
|
style: { top: position.top, left: position.left },
|
|
8333
8313
|
role: "menu",
|
|
8334
|
-
children: items.map((item) => /* @__PURE__ */ (0,
|
|
8314
|
+
children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime323.jsx)(
|
|
8335
8315
|
"button",
|
|
8336
8316
|
{
|
|
8337
8317
|
className: clsx_default("dropdown-item", {
|
|
@@ -8354,7 +8334,7 @@ var Dropdown_default = Dropdown;
|
|
|
8354
8334
|
|
|
8355
8335
|
// src/components/Editor/Editor.tsx
|
|
8356
8336
|
var import_react23 = __toESM(require("react"), 1);
|
|
8357
|
-
var
|
|
8337
|
+
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
8358
8338
|
var DEFAULT_TOOLBAR = [
|
|
8359
8339
|
"bold",
|
|
8360
8340
|
"italic",
|
|
@@ -8874,8 +8854,8 @@ var Editor = (props) => {
|
|
|
8874
8854
|
break;
|
|
8875
8855
|
}
|
|
8876
8856
|
};
|
|
8877
|
-
return /* @__PURE__ */ (0,
|
|
8878
|
-
!readOnly && /* @__PURE__ */ (0,
|
|
8857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: clsx_default("lib-xplat-editor", isFocused && "focused", readOnly && "readonly"), children: [
|
|
8858
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
8879
8859
|
EditorToolbar,
|
|
8880
8860
|
{
|
|
8881
8861
|
items: toolbar,
|
|
@@ -8883,9 +8863,9 @@ var Editor = (props) => {
|
|
|
8883
8863
|
onAction: onToolbarAction
|
|
8884
8864
|
}
|
|
8885
8865
|
),
|
|
8886
|
-
/* @__PURE__ */ (0,
|
|
8887
|
-
isEmpty && !isFocused && /* @__PURE__ */ (0,
|
|
8888
|
-
/* @__PURE__ */ (0,
|
|
8866
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsxs)("div", { className: "lib-xplat-editor__content", style: { minHeight }, children: [
|
|
8867
|
+
isEmpty && !isFocused && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "lib-xplat-editor__placeholder", children: placeholder }),
|
|
8868
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
8889
8869
|
"div",
|
|
8890
8870
|
{
|
|
8891
8871
|
ref: editorRef,
|
|
@@ -8904,7 +8884,7 @@ var Editor = (props) => {
|
|
|
8904
8884
|
spellCheck: true
|
|
8905
8885
|
}
|
|
8906
8886
|
),
|
|
8907
|
-
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ (0,
|
|
8887
|
+
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
8908
8888
|
SlashMenu,
|
|
8909
8889
|
{
|
|
8910
8890
|
position: slashPos,
|
|
@@ -8914,7 +8894,7 @@ var Editor = (props) => {
|
|
|
8914
8894
|
onClose: closeSlashMenu
|
|
8915
8895
|
}
|
|
8916
8896
|
),
|
|
8917
|
-
linkOpen && /* @__PURE__ */ (0,
|
|
8897
|
+
linkOpen && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
8918
8898
|
LinkPopover,
|
|
8919
8899
|
{
|
|
8920
8900
|
position: linkPos,
|
|
@@ -8966,7 +8946,7 @@ var isActive = (item, active) => {
|
|
|
8966
8946
|
return active.has(item);
|
|
8967
8947
|
};
|
|
8968
8948
|
var EditorToolbar = ({ items, active, onAction }) => {
|
|
8969
|
-
return /* @__PURE__ */ (0,
|
|
8949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("div", { className: "lib-xplat-editor__toolbar", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
8970
8950
|
"button",
|
|
8971
8951
|
{
|
|
8972
8952
|
type: "button",
|
|
@@ -8991,12 +8971,12 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
8991
8971
|
window.addEventListener("mousedown", handleClickOutside);
|
|
8992
8972
|
return () => window.removeEventListener("mousedown", handleClickOutside);
|
|
8993
8973
|
}, [onClose]);
|
|
8994
|
-
return /* @__PURE__ */ (0,
|
|
8974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
8995
8975
|
"div",
|
|
8996
8976
|
{
|
|
8997
8977
|
className: "lib-xplat-editor__slash-menu",
|
|
8998
8978
|
style: { top: position.top, left: position.left },
|
|
8999
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
8979
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
|
|
9000
8980
|
"button",
|
|
9001
8981
|
{
|
|
9002
8982
|
type: "button",
|
|
@@ -9006,8 +8986,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
9006
8986
|
onSelect(item);
|
|
9007
8987
|
},
|
|
9008
8988
|
children: [
|
|
9009
|
-
/* @__PURE__ */ (0,
|
|
9010
|
-
item.hint && /* @__PURE__ */ (0,
|
|
8989
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: "label", children: item.label }),
|
|
8990
|
+
item.hint && /* @__PURE__ */ (0, import_jsx_runtime324.jsx)("span", { className: "hint", children: item.hint })
|
|
9011
8991
|
]
|
|
9012
8992
|
},
|
|
9013
8993
|
item.key
|
|
@@ -9020,13 +9000,13 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
9020
9000
|
import_react23.default.useEffect(() => {
|
|
9021
9001
|
inputRef.current?.focus();
|
|
9022
9002
|
}, []);
|
|
9023
|
-
return /* @__PURE__ */ (0,
|
|
9003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime324.jsxs)(
|
|
9024
9004
|
"div",
|
|
9025
9005
|
{
|
|
9026
9006
|
className: "lib-xplat-editor__link-popover",
|
|
9027
9007
|
style: { top: position.top, left: position.left },
|
|
9028
9008
|
children: [
|
|
9029
|
-
/* @__PURE__ */ (0,
|
|
9009
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
9030
9010
|
"input",
|
|
9031
9011
|
{
|
|
9032
9012
|
ref: inputRef,
|
|
@@ -9046,11 +9026,11 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
9046
9026
|
}
|
|
9047
9027
|
}
|
|
9048
9028
|
),
|
|
9049
|
-
/* @__PURE__ */ (0,
|
|
9029
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)("button", { type: "button", onMouseDown: (e) => {
|
|
9050
9030
|
e.preventDefault();
|
|
9051
9031
|
onConfirm();
|
|
9052
9032
|
}, children: "\uC801\uC6A9" }),
|
|
9053
|
-
/* @__PURE__ */ (0,
|
|
9033
|
+
/* @__PURE__ */ (0, import_jsx_runtime324.jsx)("button", { type: "button", onMouseDown: (e) => {
|
|
9054
9034
|
e.preventDefault();
|
|
9055
9035
|
onClose();
|
|
9056
9036
|
}, children: "\uCDE8\uC18C" })
|
|
@@ -9060,15 +9040,15 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
9060
9040
|
};
|
|
9061
9041
|
|
|
9062
9042
|
// src/components/EmptyState/EmptyState.tsx
|
|
9063
|
-
var
|
|
9043
|
+
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
9064
9044
|
var EmptyState = (props) => {
|
|
9065
9045
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
|
|
9066
|
-
return /* @__PURE__ */ (0,
|
|
9067
|
-
icon && /* @__PURE__ */ (0,
|
|
9068
|
-
!icon && /* @__PURE__ */ (0,
|
|
9069
|
-
/* @__PURE__ */ (0,
|
|
9070
|
-
description && /* @__PURE__ */ (0,
|
|
9071
|
-
action && /* @__PURE__ */ (0,
|
|
9046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)("div", { className: "lib-xplat-empty-state", children: [
|
|
9047
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: "empty-icon", children: icon }),
|
|
9048
|
+
!icon && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("path", { d: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z" }) }) }),
|
|
9049
|
+
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)("p", { className: "empty-title", children: title }),
|
|
9050
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("p", { className: "empty-description", children: description }),
|
|
9051
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: "empty-action", children: action })
|
|
9072
9052
|
] });
|
|
9073
9053
|
};
|
|
9074
9054
|
EmptyState.displayName = "EmptyState";
|
|
@@ -9076,7 +9056,7 @@ var EmptyState_default = EmptyState;
|
|
|
9076
9056
|
|
|
9077
9057
|
// src/components/FileUpload/FileUpload.tsx
|
|
9078
9058
|
var import_react24 = __toESM(require("react"), 1);
|
|
9079
|
-
var
|
|
9059
|
+
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
9080
9060
|
var FileUpload = (props) => {
|
|
9081
9061
|
const {
|
|
9082
9062
|
accept,
|
|
@@ -9117,7 +9097,7 @@ var FileUpload = (props) => {
|
|
|
9117
9097
|
handleFiles(e.target.files);
|
|
9118
9098
|
}
|
|
9119
9099
|
};
|
|
9120
|
-
return /* @__PURE__ */ (0,
|
|
9100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime326.jsxs)(
|
|
9121
9101
|
"div",
|
|
9122
9102
|
{
|
|
9123
9103
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
|
|
@@ -9126,7 +9106,7 @@ var FileUpload = (props) => {
|
|
|
9126
9106
|
onDragLeave: handleDragLeave,
|
|
9127
9107
|
onClick: () => inputRef.current?.click(),
|
|
9128
9108
|
children: [
|
|
9129
|
-
/* @__PURE__ */ (0,
|
|
9109
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)(
|
|
9130
9110
|
"input",
|
|
9131
9111
|
{
|
|
9132
9112
|
ref: inputRef,
|
|
@@ -9136,9 +9116,9 @@ var FileUpload = (props) => {
|
|
|
9136
9116
|
onChange: handleChange
|
|
9137
9117
|
}
|
|
9138
9118
|
),
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9140
|
-
/* @__PURE__ */ (0,
|
|
9141
|
-
description && /* @__PURE__ */ (0,
|
|
9119
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime326.jsx)(UploadIcon_default, {}) }),
|
|
9120
|
+
/* @__PURE__ */ (0, import_jsx_runtime326.jsx)("p", { className: "upload-label", children: label }),
|
|
9121
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime326.jsx)("p", { className: "upload-description", children: description })
|
|
9142
9122
|
]
|
|
9143
9123
|
}
|
|
9144
9124
|
);
|
|
@@ -9232,7 +9212,7 @@ var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
|
9232
9212
|
};
|
|
9233
9213
|
|
|
9234
9214
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
9235
|
-
var
|
|
9215
|
+
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
9236
9216
|
var HtmlTypeWriter = ({
|
|
9237
9217
|
html,
|
|
9238
9218
|
duration = 20,
|
|
@@ -9275,14 +9255,14 @@ var HtmlTypeWriter = ({
|
|
|
9275
9255
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
9276
9256
|
[doc, typedLen, rangeMap]
|
|
9277
9257
|
);
|
|
9278
|
-
return /* @__PURE__ */ (0,
|
|
9258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
9279
9259
|
};
|
|
9280
9260
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
9281
9261
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
9282
9262
|
|
|
9283
9263
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
9284
9264
|
var import_react27 = __toESM(require("react"), 1);
|
|
9285
|
-
var
|
|
9265
|
+
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
9286
9266
|
var ImageSelector = (props) => {
|
|
9287
9267
|
const { value, label, onChange } = props;
|
|
9288
9268
|
const [previewUrl, setPreviewUrl] = import_react27.default.useState();
|
|
@@ -9308,8 +9288,8 @@ var ImageSelector = (props) => {
|
|
|
9308
9288
|
const handleOpenFileDialog = () => {
|
|
9309
9289
|
inputRef.current?.click();
|
|
9310
9290
|
};
|
|
9311
|
-
return /* @__PURE__ */ (0,
|
|
9312
|
-
/* @__PURE__ */ (0,
|
|
9291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
9292
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
9313
9293
|
"input",
|
|
9314
9294
|
{
|
|
9315
9295
|
type: "file",
|
|
@@ -9319,19 +9299,40 @@ var ImageSelector = (props) => {
|
|
|
9319
9299
|
ref: inputRef
|
|
9320
9300
|
}
|
|
9321
9301
|
),
|
|
9322
|
-
value && /* @__PURE__ */ (0,
|
|
9323
|
-
/* @__PURE__ */ (0,
|
|
9324
|
-
/* @__PURE__ */ (0,
|
|
9302
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)("div", { className: "action-bar", children: [
|
|
9303
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(UploadIcon_default, {}) }),
|
|
9304
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(DeleteIcon_default, {}) })
|
|
9325
9305
|
] }),
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9306
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "content", children: previewUrl ? /* @__PURE__ */ (0, import_jsx_runtime328.jsx)("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
9307
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(ImageIcon_default, {}) }),
|
|
9308
|
+
/* @__PURE__ */ (0, import_jsx_runtime328.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
9329
9309
|
] }) })
|
|
9330
9310
|
] });
|
|
9331
9311
|
};
|
|
9332
9312
|
ImageSelector.displayName = "ImageSelector";
|
|
9333
9313
|
var ImageSelector_default = ImageSelector;
|
|
9334
9314
|
|
|
9315
|
+
// src/components/NotificationBadge/NotificationBadge.tsx
|
|
9316
|
+
var import_jsx_runtime329 = require("react/jsx-runtime");
|
|
9317
|
+
var NotificationBadge = (props) => {
|
|
9318
|
+
const {
|
|
9319
|
+
children,
|
|
9320
|
+
type = "error",
|
|
9321
|
+
count,
|
|
9322
|
+
maxCount = 99,
|
|
9323
|
+
dot = false,
|
|
9324
|
+
size = "md"
|
|
9325
|
+
} = props;
|
|
9326
|
+
const showBadge = dot || count !== void 0 && count > 0;
|
|
9327
|
+
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
9328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime329.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
9329
|
+
children,
|
|
9330
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
9331
|
+
] });
|
|
9332
|
+
};
|
|
9333
|
+
NotificationBadge.displayName = "NotificationBadge";
|
|
9334
|
+
var NotificationBadge_default = NotificationBadge;
|
|
9335
|
+
|
|
9335
9336
|
// src/components/Pagination/Pagination.tsx
|
|
9336
9337
|
var import_jsx_runtime330 = require("react/jsx-runtime");
|
|
9337
9338
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
@@ -10302,6 +10303,7 @@ var TableCell = import_react38.default.memo((props) => {
|
|
|
10302
10303
|
width,
|
|
10303
10304
|
nowrap = false,
|
|
10304
10305
|
scope = "col",
|
|
10306
|
+
colSpan,
|
|
10305
10307
|
onClick
|
|
10306
10308
|
} = props;
|
|
10307
10309
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
@@ -10350,6 +10352,7 @@ var TableCell = import_react38.default.memo((props) => {
|
|
|
10350
10352
|
nowrap && "nowrap"
|
|
10351
10353
|
),
|
|
10352
10354
|
scope: isHeaderCell ? scope : void 0,
|
|
10355
|
+
colSpan,
|
|
10353
10356
|
style: {
|
|
10354
10357
|
...isSticky ? { left } : null,
|
|
10355
10358
|
...width != null ? { width: typeof width === "number" ? `${width}px` : width } : null
|
|
@@ -11378,6 +11381,7 @@ var SideBar_default = SideBar;
|
|
|
11378
11381
|
MusicIcon,
|
|
11379
11382
|
Navigation2Icon,
|
|
11380
11383
|
NavigationIcon,
|
|
11384
|
+
NotificationBadge,
|
|
11381
11385
|
OctagonIcon,
|
|
11382
11386
|
OpenEyeIcon,
|
|
11383
11387
|
PackageIcon,
|