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