@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/components/index.js
CHANGED
|
@@ -1587,52 +1587,31 @@ var Avatar = (props) => {
|
|
|
1587
1587
|
Avatar.displayName = "Avatar";
|
|
1588
1588
|
var Avatar_default = Avatar;
|
|
1589
1589
|
|
|
1590
|
-
// src/components/Badge/Badge.tsx
|
|
1591
|
-
import { jsx as jsx299, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
1592
|
-
var Badge = (props) => {
|
|
1593
|
-
const {
|
|
1594
|
-
children,
|
|
1595
|
-
type = "error",
|
|
1596
|
-
count,
|
|
1597
|
-
maxCount = 99,
|
|
1598
|
-
dot = false,
|
|
1599
|
-
size = "md"
|
|
1600
|
-
} = props;
|
|
1601
|
-
const showBadge = dot || count !== void 0 && count > 0;
|
|
1602
|
-
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
1603
|
-
return /* @__PURE__ */ jsxs191("div", { className: clsx_default("lib-xplat-badge", size), children: [
|
|
1604
|
-
children,
|
|
1605
|
-
showBadge && /* @__PURE__ */ jsx299("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
1606
|
-
] });
|
|
1607
|
-
};
|
|
1608
|
-
Badge.displayName = "Badge";
|
|
1609
|
-
var Badge_default = Badge;
|
|
1610
|
-
|
|
1611
1590
|
// src/components/Box/Box.tsx
|
|
1612
|
-
import { jsx as
|
|
1591
|
+
import { jsx as jsx299, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
1613
1592
|
var Box = ({
|
|
1614
1593
|
children,
|
|
1615
1594
|
title,
|
|
1616
1595
|
variant = "outlined",
|
|
1617
1596
|
padding = "md"
|
|
1618
1597
|
}) => {
|
|
1619
|
-
return /* @__PURE__ */
|
|
1620
|
-
title && /* @__PURE__ */
|
|
1621
|
-
/* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ jsxs191("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
|
|
1599
|
+
title && /* @__PURE__ */ jsx299("div", { className: "box-title", children: title }),
|
|
1600
|
+
/* @__PURE__ */ jsx299("div", { className: "box-content", children })
|
|
1622
1601
|
] });
|
|
1623
1602
|
};
|
|
1624
1603
|
Box.displayName = "Box";
|
|
1625
1604
|
var Box_default = Box;
|
|
1626
1605
|
|
|
1627
1606
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1628
|
-
import { jsx as
|
|
1607
|
+
import { jsx as jsx300, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
1629
1608
|
var Breadcrumb = (props) => {
|
|
1630
1609
|
const { items, separator = "/" } = props;
|
|
1631
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ jsx300("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ jsx300("ol", { children: items.map((item, index) => {
|
|
1632
1611
|
const isLast = index === items.length - 1;
|
|
1633
|
-
return /* @__PURE__ */
|
|
1634
|
-
isLast ? /* @__PURE__ */
|
|
1635
|
-
!isLast && /* @__PURE__ */
|
|
1612
|
+
return /* @__PURE__ */ jsxs192("li", { children: [
|
|
1613
|
+
isLast ? /* @__PURE__ */ jsx300("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ jsx300("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ jsx300("button", { className: "link", onClick: item.onClick, children: item.label }),
|
|
1614
|
+
!isLast && /* @__PURE__ */ jsx300("span", { className: "separator", children: separator })
|
|
1636
1615
|
] }, index);
|
|
1637
1616
|
}) }) });
|
|
1638
1617
|
};
|
|
@@ -1640,7 +1619,7 @@ Breadcrumb.displayName = "Breadcrumb";
|
|
|
1640
1619
|
var Breadcrumb_default = Breadcrumb;
|
|
1641
1620
|
|
|
1642
1621
|
// src/components/Button/Button.tsx
|
|
1643
|
-
import { jsx as
|
|
1622
|
+
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
1644
1623
|
var Button = (props) => {
|
|
1645
1624
|
const {
|
|
1646
1625
|
children,
|
|
@@ -1649,7 +1628,7 @@ var Button = (props) => {
|
|
|
1649
1628
|
disabled,
|
|
1650
1629
|
...rest
|
|
1651
1630
|
} = props;
|
|
1652
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ jsx301(
|
|
1653
1632
|
"button",
|
|
1654
1633
|
{
|
|
1655
1634
|
className: clsx_default("lib-xplat-button", type, size),
|
|
@@ -1766,7 +1745,7 @@ var MONTH_LABELS = {
|
|
|
1766
1745
|
};
|
|
1767
1746
|
|
|
1768
1747
|
// src/components/Calendar/Calendar.tsx
|
|
1769
|
-
import { Fragment, jsx as
|
|
1748
|
+
import { Fragment, jsx as jsx302, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
1770
1749
|
var DayCell = React4.memo(
|
|
1771
1750
|
({
|
|
1772
1751
|
day,
|
|
@@ -1778,7 +1757,7 @@ var DayCell = React4.memo(
|
|
|
1778
1757
|
onEventClick
|
|
1779
1758
|
}) => {
|
|
1780
1759
|
if (renderDay) {
|
|
1781
|
-
return /* @__PURE__ */
|
|
1760
|
+
return /* @__PURE__ */ jsx302(
|
|
1782
1761
|
"div",
|
|
1783
1762
|
{
|
|
1784
1763
|
className: clsx_default(
|
|
@@ -1795,7 +1774,7 @@ var DayCell = React4.memo(
|
|
|
1795
1774
|
}
|
|
1796
1775
|
);
|
|
1797
1776
|
}
|
|
1798
|
-
return /* @__PURE__ */
|
|
1777
|
+
return /* @__PURE__ */ jsxs193(
|
|
1799
1778
|
"div",
|
|
1800
1779
|
{
|
|
1801
1780
|
className: clsx_default(
|
|
@@ -1811,9 +1790,9 @@ var DayCell = React4.memo(
|
|
|
1811
1790
|
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
1812
1791
|
},
|
|
1813
1792
|
children: [
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
dayEvents.length > 0 && /* @__PURE__ */
|
|
1816
|
-
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ jsx302("span", { className: "calendar-day-number", children: day.day }),
|
|
1794
|
+
dayEvents.length > 0 && /* @__PURE__ */ jsxs193("div", { className: "calendar-day-events", children: [
|
|
1795
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ jsx302(
|
|
1817
1796
|
"span",
|
|
1818
1797
|
{
|
|
1819
1798
|
className: "calendar-event-dot",
|
|
@@ -1826,7 +1805,7 @@ var DayCell = React4.memo(
|
|
|
1826
1805
|
},
|
|
1827
1806
|
ei
|
|
1828
1807
|
)),
|
|
1829
|
-
dayEvents.length > 3 && /* @__PURE__ */
|
|
1808
|
+
dayEvents.length > 3 && /* @__PURE__ */ jsxs193("span", { className: "calendar-event-more", children: [
|
|
1830
1809
|
"+",
|
|
1831
1810
|
dayEvents.length - 3
|
|
1832
1811
|
] })
|
|
@@ -1947,21 +1926,21 @@ var Calendar = (props) => {
|
|
|
1947
1926
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
1948
1927
|
const monthLabels = MONTH_LABELS[locale];
|
|
1949
1928
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
1950
|
-
return /* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ jsxs193(
|
|
1951
1930
|
"div",
|
|
1952
1931
|
{
|
|
1953
1932
|
className: "lib-xplat-calendar",
|
|
1954
1933
|
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
1955
1934
|
children: [
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
showToday && /* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ jsxs193("div", { className: "calendar-header", children: [
|
|
1936
|
+
/* @__PURE__ */ jsx302("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ jsx302(ChevronLeftIcon_default, {}) }),
|
|
1937
|
+
/* @__PURE__ */ jsx302("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
1938
|
+
/* @__PURE__ */ jsx302("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ jsx302(ChevronRightIcon_default, {}) }),
|
|
1939
|
+
showToday && /* @__PURE__ */ jsx302("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
1961
1940
|
] }),
|
|
1962
|
-
pickerMode === "years" && /* @__PURE__ */
|
|
1941
|
+
pickerMode === "years" && /* @__PURE__ */ jsx302("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
1963
1942
|
const y = yearRangeStart + i;
|
|
1964
|
-
return /* @__PURE__ */
|
|
1943
|
+
return /* @__PURE__ */ jsx302(
|
|
1965
1944
|
"button",
|
|
1966
1945
|
{
|
|
1967
1946
|
type: "button",
|
|
@@ -1972,7 +1951,7 @@ var Calendar = (props) => {
|
|
|
1972
1951
|
y
|
|
1973
1952
|
);
|
|
1974
1953
|
}) }),
|
|
1975
|
-
pickerMode === "months" && /* @__PURE__ */
|
|
1954
|
+
pickerMode === "months" && /* @__PURE__ */ jsx302("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx302(
|
|
1976
1955
|
"button",
|
|
1977
1956
|
{
|
|
1978
1957
|
type: "button",
|
|
@@ -1982,8 +1961,8 @@ var Calendar = (props) => {
|
|
|
1982
1961
|
},
|
|
1983
1962
|
i
|
|
1984
1963
|
)) }),
|
|
1985
|
-
pickerMode === "days" && /* @__PURE__ */
|
|
1986
|
-
/* @__PURE__ */
|
|
1964
|
+
pickerMode === "days" && /* @__PURE__ */ jsxs193(Fragment, { children: [
|
|
1965
|
+
/* @__PURE__ */ jsx302("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx302(
|
|
1987
1966
|
"div",
|
|
1988
1967
|
{
|
|
1989
1968
|
className: clsx_default(
|
|
@@ -1995,12 +1974,12 @@ var Calendar = (props) => {
|
|
|
1995
1974
|
},
|
|
1996
1975
|
label
|
|
1997
1976
|
)) }),
|
|
1998
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx302("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
1999
1978
|
const dayEvents = getEventsForDay(day.date);
|
|
2000
1979
|
const t = day.date.getTime();
|
|
2001
1980
|
const disabled = t < minTime || t > maxTime;
|
|
2002
1981
|
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
2003
|
-
return /* @__PURE__ */
|
|
1982
|
+
return /* @__PURE__ */ jsx302(
|
|
2004
1983
|
DayCell,
|
|
2005
1984
|
{
|
|
2006
1985
|
day,
|
|
@@ -2026,10 +2005,10 @@ var Calendar_default = Calendar;
|
|
|
2026
2005
|
import React5 from "react";
|
|
2027
2006
|
|
|
2028
2007
|
// src/components/CardTab/CardTabPanel.tsx
|
|
2029
|
-
import { jsx as
|
|
2008
|
+
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
2030
2009
|
var CardTabPanel = (props) => {
|
|
2031
2010
|
const { children, columns = 3 } = props;
|
|
2032
|
-
return /* @__PURE__ */
|
|
2011
|
+
return /* @__PURE__ */ jsx303(
|
|
2033
2012
|
"div",
|
|
2034
2013
|
{
|
|
2035
2014
|
className: "card-tab-panel",
|
|
@@ -2042,7 +2021,7 @@ CardTabPanel.displayName = "CardTab.Panel";
|
|
|
2042
2021
|
var CardTabPanel_default = CardTabPanel;
|
|
2043
2022
|
|
|
2044
2023
|
// src/components/CardTab/CardTab.tsx
|
|
2045
|
-
import { jsx as
|
|
2024
|
+
import { jsx as jsx304, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
2046
2025
|
var CardTabRoot = (props) => {
|
|
2047
2026
|
const {
|
|
2048
2027
|
tabs,
|
|
@@ -2066,10 +2045,10 @@ var CardTabRoot = (props) => {
|
|
|
2066
2045
|
const activePanel = panels.find(
|
|
2067
2046
|
(panel) => panel.props.value === activeValue
|
|
2068
2047
|
);
|
|
2069
|
-
return /* @__PURE__ */
|
|
2070
|
-
/* @__PURE__ */
|
|
2048
|
+
return /* @__PURE__ */ jsxs194("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
|
|
2049
|
+
/* @__PURE__ */ jsx304("div", { className: "card-tab-bar", children: tabs.map((tab) => {
|
|
2071
2050
|
const isActive2 = tab.value === activeValue;
|
|
2072
|
-
return /* @__PURE__ */
|
|
2051
|
+
return /* @__PURE__ */ jsx304(
|
|
2073
2052
|
"button",
|
|
2074
2053
|
{
|
|
2075
2054
|
className: clsx_default("card-tab-trigger", isActive2 && "active"),
|
|
@@ -2081,7 +2060,7 @@ var CardTabRoot = (props) => {
|
|
|
2081
2060
|
tab.value
|
|
2082
2061
|
);
|
|
2083
2062
|
}) }),
|
|
2084
|
-
/* @__PURE__ */
|
|
2063
|
+
/* @__PURE__ */ jsx304("div", { className: "card-tab-body", children: activePanel })
|
|
2085
2064
|
] });
|
|
2086
2065
|
};
|
|
2087
2066
|
CardTabRoot.displayName = "CardTab";
|
|
@@ -2092,7 +2071,7 @@ var CardTab_default = CardTab;
|
|
|
2092
2071
|
|
|
2093
2072
|
// src/components/Chart/Chart.tsx
|
|
2094
2073
|
import React6 from "react";
|
|
2095
|
-
import { Fragment as Fragment2, jsx as
|
|
2074
|
+
import { Fragment as Fragment2, jsx as jsx305, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
2096
2075
|
var CATEGORICAL_COUNT2 = 8;
|
|
2097
2076
|
var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
|
|
2098
2077
|
const n = i + 1;
|
|
@@ -2228,12 +2207,12 @@ var useChartTooltip = (enabled) => {
|
|
|
2228
2207
|
}, []);
|
|
2229
2208
|
return { tooltip, show, hide, move, containerRef };
|
|
2230
2209
|
};
|
|
2231
|
-
var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */
|
|
2210
|
+
var GridLines = React6.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx305(Fragment2, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
2232
2211
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
2233
2212
|
const val = Math.round(maxVal * ratio);
|
|
2234
|
-
return /* @__PURE__ */
|
|
2235
|
-
/* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ jsxs195("g", { children: [
|
|
2214
|
+
/* @__PURE__ */ jsx305("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
2215
|
+
/* @__PURE__ */ jsx305("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
2237
2216
|
] }, ratio);
|
|
2238
2217
|
}) }));
|
|
2239
2218
|
GridLines.displayName = "GridLines";
|
|
@@ -2245,10 +2224,10 @@ var getLabelStep = (count, chartW) => {
|
|
|
2245
2224
|
};
|
|
2246
2225
|
var AxisLabels = React6.memo(({ labels, count, chartW, height }) => {
|
|
2247
2226
|
const step = getLabelStep(count, chartW);
|
|
2248
|
-
return /* @__PURE__ */
|
|
2227
|
+
return /* @__PURE__ */ jsx305(Fragment2, { children: labels.map((label, i) => {
|
|
2249
2228
|
if (i % step !== 0) return null;
|
|
2250
2229
|
const x = PADDING.left + i / (count - 1 || 1) * chartW;
|
|
2251
|
-
return /* @__PURE__ */
|
|
2230
|
+
return /* @__PURE__ */ jsx305("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
2252
2231
|
}) });
|
|
2253
2232
|
});
|
|
2254
2233
|
AxisLabels.displayName = "AxisLabels";
|
|
@@ -2324,7 +2303,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2324
2303
|
}, [animate, width]);
|
|
2325
2304
|
const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
|
|
2326
2305
|
const lineClipId = "line-area-clip";
|
|
2327
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ jsxs195(
|
|
2328
2307
|
"svg",
|
|
2329
2308
|
{
|
|
2330
2309
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -2342,9 +2321,9 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2342
2321
|
onLeave();
|
|
2343
2322
|
},
|
|
2344
2323
|
children: [
|
|
2345
|
-
animate && /* @__PURE__ */
|
|
2346
|
-
/* @__PURE__ */
|
|
2347
|
-
/* @__PURE__ */
|
|
2324
|
+
animate && /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsx305("clipPath", { id: lineClipId, children: /* @__PURE__ */ jsx305("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
|
|
2325
|
+
/* @__PURE__ */ jsx305(GridLines, { width, height, chartH, maxVal }),
|
|
2326
|
+
/* @__PURE__ */ jsx305(AxisLabels, { labels, count, chartW, height }),
|
|
2348
2327
|
entries.map(([key], di) => {
|
|
2349
2328
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
2350
2329
|
const color = palette[2];
|
|
@@ -2353,16 +2332,16 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2353
2332
|
const gradientId = `line-gradient-${di}`;
|
|
2354
2333
|
const polyPoints = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
2355
2334
|
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`;
|
|
2356
|
-
return /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2359
|
-
/* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ jsxs195("g", { children: [
|
|
2336
|
+
/* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsxs195("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2337
|
+
/* @__PURE__ */ jsx305("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
|
|
2338
|
+
/* @__PURE__ */ jsx305("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
|
|
2360
2339
|
] }) }),
|
|
2361
|
-
/* @__PURE__ */
|
|
2362
|
-
/* @__PURE__ */
|
|
2363
|
-
/* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ jsxs195("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
|
|
2341
|
+
/* @__PURE__ */ jsx305("path", { d: areaD, fill: `url(#${gradientId})` }),
|
|
2342
|
+
/* @__PURE__ */ jsx305("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
|
|
2364
2343
|
] }),
|
|
2365
|
-
activeIndex !== null && points[activeIndex] && /* @__PURE__ */
|
|
2344
|
+
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ jsx305(
|
|
2366
2345
|
"circle",
|
|
2367
2346
|
{
|
|
2368
2347
|
cx: points[activeIndex].x,
|
|
@@ -2374,7 +2353,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2374
2353
|
)
|
|
2375
2354
|
] }, di);
|
|
2376
2355
|
}),
|
|
2377
|
-
activeX !== null && /* @__PURE__ */
|
|
2356
|
+
activeX !== null && /* @__PURE__ */ jsx305(
|
|
2378
2357
|
"line",
|
|
2379
2358
|
{
|
|
2380
2359
|
x1: activeX,
|
|
@@ -2384,7 +2363,7 @@ var LineChart = React6.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2384
2363
|
className: "chart-crosshair"
|
|
2385
2364
|
}
|
|
2386
2365
|
),
|
|
2387
|
-
/* @__PURE__ */
|
|
2366
|
+
/* @__PURE__ */ jsx305(
|
|
2388
2367
|
"rect",
|
|
2389
2368
|
{
|
|
2390
2369
|
x: PADDING.left,
|
|
@@ -2433,7 +2412,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2433
2412
|
}, [animate, width]);
|
|
2434
2413
|
const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
|
|
2435
2414
|
const curveClipId = "curve-area-clip";
|
|
2436
|
-
return /* @__PURE__ */
|
|
2415
|
+
return /* @__PURE__ */ jsxs195(
|
|
2437
2416
|
"svg",
|
|
2438
2417
|
{
|
|
2439
2418
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -2452,9 +2431,9 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2452
2431
|
onLeave();
|
|
2453
2432
|
},
|
|
2454
2433
|
children: [
|
|
2455
|
-
animate && /* @__PURE__ */
|
|
2456
|
-
/* @__PURE__ */
|
|
2457
|
-
/* @__PURE__ */
|
|
2434
|
+
animate && /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsx305("clipPath", { id: curveClipId, children: /* @__PURE__ */ jsx305("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
|
|
2435
|
+
/* @__PURE__ */ jsx305(GridLines, { width, height, chartH, maxVal }),
|
|
2436
|
+
/* @__PURE__ */ jsx305(AxisLabels, { labels, count, chartW, height }),
|
|
2458
2437
|
entries.map(([key], di) => {
|
|
2459
2438
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
2460
2439
|
const color = palette[2];
|
|
@@ -2463,16 +2442,16 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2463
2442
|
const gradientId = `curve-gradient-${di}`;
|
|
2464
2443
|
const linePath = toSmoothPath(points);
|
|
2465
2444
|
const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
|
|
2466
|
-
return /* @__PURE__ */
|
|
2467
|
-
/* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2469
|
-
/* @__PURE__ */
|
|
2445
|
+
return /* @__PURE__ */ jsxs195("g", { children: [
|
|
2446
|
+
/* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsxs195("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2447
|
+
/* @__PURE__ */ jsx305("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
|
|
2448
|
+
/* @__PURE__ */ jsx305("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
|
|
2470
2449
|
] }) }),
|
|
2471
|
-
/* @__PURE__ */
|
|
2472
|
-
/* @__PURE__ */
|
|
2473
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsxs195("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
|
|
2451
|
+
/* @__PURE__ */ jsx305("path", { d: areaPath, fill: `url(#${gradientId})` }),
|
|
2452
|
+
/* @__PURE__ */ jsx305("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
|
|
2474
2453
|
] }),
|
|
2475
|
-
activeIndex !== null && points[activeIndex] && /* @__PURE__ */
|
|
2454
|
+
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ jsx305(
|
|
2476
2455
|
"circle",
|
|
2477
2456
|
{
|
|
2478
2457
|
cx: points[activeIndex].x,
|
|
@@ -2484,7 +2463,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2484
2463
|
)
|
|
2485
2464
|
] }, di);
|
|
2486
2465
|
}),
|
|
2487
|
-
activeX !== null && /* @__PURE__ */
|
|
2466
|
+
activeX !== null && /* @__PURE__ */ jsx305(
|
|
2488
2467
|
"line",
|
|
2489
2468
|
{
|
|
2490
2469
|
x1: activeX,
|
|
@@ -2494,7 +2473,7 @@ var CurveChart = React6.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2494
2473
|
className: "chart-crosshair"
|
|
2495
2474
|
}
|
|
2496
2475
|
),
|
|
2497
|
-
/* @__PURE__ */
|
|
2476
|
+
/* @__PURE__ */ jsx305(
|
|
2498
2477
|
"rect",
|
|
2499
2478
|
{
|
|
2500
2479
|
x: PADDING.left,
|
|
@@ -2537,11 +2516,11 @@ var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onM
|
|
|
2537
2516
|
[entries, maxVal, chartH, groupW, barW, barGap, groupCount]
|
|
2538
2517
|
);
|
|
2539
2518
|
const barLabelStep = getLabelStep(count, chartW);
|
|
2540
|
-
return /* @__PURE__ */
|
|
2541
|
-
/* @__PURE__ */
|
|
2519
|
+
return /* @__PURE__ */ jsxs195("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
2520
|
+
/* @__PURE__ */ jsx305(GridLines, { width, height, chartH, maxVal }),
|
|
2542
2521
|
labels.map((label, i) => {
|
|
2543
2522
|
if (i % barLabelStep !== 0) return null;
|
|
2544
|
-
return /* @__PURE__ */
|
|
2523
|
+
return /* @__PURE__ */ jsx305("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
2545
2524
|
}),
|
|
2546
2525
|
entries.map(([key], di) => {
|
|
2547
2526
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
@@ -2550,7 +2529,7 @@ var BarChart = React6.memo(({ data, labels, width, height, animate, onHover, onM
|
|
|
2550
2529
|
const r2 = Math.min(4, b.w / 2);
|
|
2551
2530
|
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`;
|
|
2552
2531
|
const delay = 100 + i * 80;
|
|
2553
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ jsx305(
|
|
2554
2533
|
"path",
|
|
2555
2534
|
{
|
|
2556
2535
|
d,
|
|
@@ -2630,8 +2609,8 @@ var PieDonutChart = React6.memo(
|
|
|
2630
2609
|
});
|
|
2631
2610
|
}, [values, total, cx, cy, r2, innerR, labels]);
|
|
2632
2611
|
const maskId = `pie-mask-${isDoughnut ? "d" : "p"}`;
|
|
2633
|
-
return /* @__PURE__ */
|
|
2634
|
-
animate && /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ jsxs195("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
|
|
2613
|
+
animate && /* @__PURE__ */ jsx305("defs", { children: /* @__PURE__ */ jsx305("mask", { id: maskId, children: /* @__PURE__ */ jsx305(
|
|
2635
2614
|
"circle",
|
|
2636
2615
|
{
|
|
2637
2616
|
ref: maskRef,
|
|
@@ -2644,7 +2623,7 @@ var PieDonutChart = React6.memo(
|
|
|
2644
2623
|
transform: `rotate(-90 ${cx} ${cy})`
|
|
2645
2624
|
}
|
|
2646
2625
|
) }) }),
|
|
2647
|
-
/* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ jsx305("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ jsx305("g", { children: /* @__PURE__ */ jsx305(
|
|
2648
2627
|
"path",
|
|
2649
2628
|
{
|
|
2650
2629
|
d: s.d,
|
|
@@ -2679,15 +2658,15 @@ var ChartTooltip = ({ x, y, containerWidth, containerHeight, tooltipType, childr
|
|
|
2679
2658
|
const sepIdx = content.indexOf(" \u2014 ");
|
|
2680
2659
|
const title = sepIdx >= 0 ? content.slice(0, sepIdx) : content;
|
|
2681
2660
|
const desc = sepIdx >= 0 ? content.slice(sepIdx + 3) : "";
|
|
2682
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ jsxs195(
|
|
2683
2662
|
"div",
|
|
2684
2663
|
{
|
|
2685
2664
|
ref,
|
|
2686
2665
|
className: `lib-xplat-tooltip ${tooltipType} chart-tooltip-pos`,
|
|
2687
2666
|
style: { left: pos.left, top: pos.top },
|
|
2688
2667
|
children: [
|
|
2689
|
-
title && /* @__PURE__ */
|
|
2690
|
-
desc && /* @__PURE__ */
|
|
2668
|
+
title && /* @__PURE__ */ jsx305("div", { className: "tooltip-title", children: title }),
|
|
2669
|
+
desc && /* @__PURE__ */ jsx305("div", { className: "tooltip-desc", children: desc })
|
|
2691
2670
|
]
|
|
2692
2671
|
}
|
|
2693
2672
|
);
|
|
@@ -2699,14 +2678,14 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
2699
2678
|
const total = values.reduce((a, b) => a + b, 0) || 1;
|
|
2700
2679
|
const firstKey = entries[0]?.[0] ?? "";
|
|
2701
2680
|
const colorOffset = hashString(firstKey);
|
|
2702
|
-
return /* @__PURE__ */
|
|
2681
|
+
return /* @__PURE__ */ jsx305("div", { className: "chart-legend", children: values.map((v, i) => {
|
|
2703
2682
|
const pct = Math.round(v / total * 100);
|
|
2704
2683
|
const color = PIE_COLORS[(i + colorOffset) % PIE_COLORS.length];
|
|
2705
|
-
return /* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
2708
|
-
/* @__PURE__ */
|
|
2709
|
-
/* @__PURE__ */
|
|
2684
|
+
return /* @__PURE__ */ jsxs195("div", { className: "chart-legend-item", children: [
|
|
2685
|
+
/* @__PURE__ */ jsx305("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
|
|
2686
|
+
/* @__PURE__ */ jsxs195("div", { className: "chart-legend-text", children: [
|
|
2687
|
+
/* @__PURE__ */ jsx305("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
|
|
2688
|
+
/* @__PURE__ */ jsxs195("span", { className: "chart-legend-value", children: [
|
|
2710
2689
|
v.toLocaleString(),
|
|
2711
2690
|
"(",
|
|
2712
2691
|
pct,
|
|
@@ -2716,16 +2695,16 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
2716
2695
|
] }, i);
|
|
2717
2696
|
}) });
|
|
2718
2697
|
}
|
|
2719
|
-
return /* @__PURE__ */
|
|
2698
|
+
return /* @__PURE__ */ jsx305("div", { className: "chart-legend", children: entries.map(([key], di) => {
|
|
2720
2699
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
2721
2700
|
const color = palette[2];
|
|
2722
2701
|
const values = entries[di][1];
|
|
2723
2702
|
const sum = values.reduce((a, b) => a + b, 0);
|
|
2724
|
-
return /* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
/* @__PURE__ */
|
|
2728
|
-
/* @__PURE__ */
|
|
2703
|
+
return /* @__PURE__ */ jsxs195("div", { className: "chart-legend-item", children: [
|
|
2704
|
+
/* @__PURE__ */ jsx305("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
|
|
2705
|
+
/* @__PURE__ */ jsxs195("div", { className: "chart-legend-text", children: [
|
|
2706
|
+
/* @__PURE__ */ jsx305("span", { className: "chart-legend-label", children: key }),
|
|
2707
|
+
/* @__PURE__ */ jsx305("span", { className: "chart-legend-value", children: sum.toLocaleString() })
|
|
2729
2708
|
] })
|
|
2730
2709
|
] }, di);
|
|
2731
2710
|
}) });
|
|
@@ -2739,14 +2718,14 @@ var Chart = React6.memo((props) => {
|
|
|
2739
2718
|
const dataKey = React6.useMemo(() => JSON.stringify(labels), [labels]);
|
|
2740
2719
|
const animate = useChartAnimation(containerRef, dataKey);
|
|
2741
2720
|
const ready = width > 0 && height > 0;
|
|
2742
|
-
return /* @__PURE__ */
|
|
2743
|
-
ready && type === "line" && /* @__PURE__ */
|
|
2744
|
-
ready && type === "curve" && /* @__PURE__ */
|
|
2745
|
-
ready && type === "bar" && /* @__PURE__ */
|
|
2746
|
-
ready && type === "pie" && /* @__PURE__ */
|
|
2747
|
-
ready && type === "doughnut" && /* @__PURE__ */
|
|
2748
|
-
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */
|
|
2749
|
-
tooltip.visible && tooltip.content && /* @__PURE__ */
|
|
2721
|
+
return /* @__PURE__ */ jsxs195("div", { className: "lib-xplat-chart", ref: containerRef, children: [
|
|
2722
|
+
ready && type === "line" && /* @__PURE__ */ jsx305(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2723
|
+
ready && type === "curve" && /* @__PURE__ */ jsx305(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2724
|
+
ready && type === "bar" && /* @__PURE__ */ jsx305(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2725
|
+
ready && type === "pie" && /* @__PURE__ */ jsx305(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2726
|
+
ready && type === "doughnut" && /* @__PURE__ */ jsx305(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
|
|
2727
|
+
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ jsx305(ChartLegend, { data: stableData, labels: stableLabels, type }),
|
|
2728
|
+
tooltip.visible && tooltip.content && /* @__PURE__ */ jsx305(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
|
|
2750
2729
|
] });
|
|
2751
2730
|
});
|
|
2752
2731
|
Chart.displayName = "Chart";
|
|
@@ -2756,7 +2735,7 @@ var Chart_default = Chart;
|
|
|
2756
2735
|
import React7 from "react";
|
|
2757
2736
|
|
|
2758
2737
|
// src/components/IconButton/IconButton.tsx
|
|
2759
|
-
import { jsx as
|
|
2738
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
2760
2739
|
var IconButton = (props) => {
|
|
2761
2740
|
const {
|
|
2762
2741
|
icon,
|
|
@@ -2765,7 +2744,7 @@ var IconButton = (props) => {
|
|
|
2765
2744
|
disabled,
|
|
2766
2745
|
...rest
|
|
2767
2746
|
} = props;
|
|
2768
|
-
return /* @__PURE__ */
|
|
2747
|
+
return /* @__PURE__ */ jsx306(
|
|
2769
2748
|
"button",
|
|
2770
2749
|
{
|
|
2771
2750
|
className: clsx_default("lib-xplat-icon-button", type, size),
|
|
@@ -2779,7 +2758,7 @@ IconButton.displayName = "IconButton";
|
|
|
2779
2758
|
var IconButton_default = IconButton;
|
|
2780
2759
|
|
|
2781
2760
|
// src/components/ChatInput/ChatInput.tsx
|
|
2782
|
-
import { jsx as
|
|
2761
|
+
import { jsx as jsx307, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
2783
2762
|
var ChatInput = React7.forwardRef(
|
|
2784
2763
|
(props, ref) => {
|
|
2785
2764
|
const {
|
|
@@ -2810,8 +2789,8 @@ var ChatInput = React7.forwardRef(
|
|
|
2810
2789
|
handleSubmit();
|
|
2811
2790
|
}
|
|
2812
2791
|
};
|
|
2813
|
-
return /* @__PURE__ */
|
|
2814
|
-
/* @__PURE__ */
|
|
2792
|
+
return /* @__PURE__ */ jsxs196("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
|
|
2793
|
+
/* @__PURE__ */ jsx307(
|
|
2815
2794
|
AutoResizeTextArea_default,
|
|
2816
2795
|
{
|
|
2817
2796
|
ref,
|
|
@@ -2825,10 +2804,10 @@ var ChatInput = React7.forwardRef(
|
|
|
2825
2804
|
onKeyDown: handleKeyDown
|
|
2826
2805
|
}
|
|
2827
2806
|
),
|
|
2828
|
-
/* @__PURE__ */
|
|
2807
|
+
/* @__PURE__ */ jsx307(
|
|
2829
2808
|
IconButton_default,
|
|
2830
2809
|
{
|
|
2831
|
-
icon: /* @__PURE__ */
|
|
2810
|
+
icon: /* @__PURE__ */ jsx307(MessageSquareIcon_default, {}),
|
|
2832
2811
|
type: buttonType,
|
|
2833
2812
|
size: "sm",
|
|
2834
2813
|
disabled: !hasText || disabled,
|
|
@@ -2849,7 +2828,7 @@ import { semantic } from "@x-plat/tokens-core";
|
|
|
2849
2828
|
import { cssVar } from "@x-plat/tokens-core";
|
|
2850
2829
|
|
|
2851
2830
|
// src/components/CheckBox/CheckBox.tsx
|
|
2852
|
-
import { jsx as
|
|
2831
|
+
import { jsx as jsx308, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
2853
2832
|
var CheckBox = (props) => {
|
|
2854
2833
|
const {
|
|
2855
2834
|
checked,
|
|
@@ -2868,8 +2847,8 @@ var CheckBox = (props) => {
|
|
|
2868
2847
|
const checkedClasses = `checked`;
|
|
2869
2848
|
const disabledClasses = "disabled";
|
|
2870
2849
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
2871
|
-
return /* @__PURE__ */
|
|
2872
|
-
/* @__PURE__ */
|
|
2850
|
+
return /* @__PURE__ */ jsxs197("label", { className: clsx_default("lib-xplat-checkbox", size, type, className), children: [
|
|
2851
|
+
/* @__PURE__ */ jsx308(
|
|
2873
2852
|
"input",
|
|
2874
2853
|
{
|
|
2875
2854
|
type: "checkbox",
|
|
@@ -2879,22 +2858,22 @@ var CheckBox = (props) => {
|
|
|
2879
2858
|
...rest
|
|
2880
2859
|
}
|
|
2881
2860
|
),
|
|
2882
|
-
/* @__PURE__ */
|
|
2883
|
-
label && /* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ jsx308("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ jsx308("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ jsx308(CheckIcon_default, {}) }) }),
|
|
2862
|
+
label && /* @__PURE__ */ jsx308("span", { className: "label", children: label })
|
|
2884
2863
|
] });
|
|
2885
2864
|
};
|
|
2886
2865
|
CheckBox.displayName = "CheckBox";
|
|
2887
2866
|
var CheckBox_default = CheckBox;
|
|
2888
2867
|
|
|
2889
2868
|
// src/components/Chip/Chip.tsx
|
|
2890
|
-
import { jsx as
|
|
2869
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
2891
2870
|
var Chip = (props) => {
|
|
2892
2871
|
const {
|
|
2893
2872
|
children,
|
|
2894
2873
|
type = "primary",
|
|
2895
2874
|
size = "md"
|
|
2896
2875
|
} = props;
|
|
2897
|
-
return /* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ jsx309("div", { className: clsx_default("lib-xplat-chip", type, size), children });
|
|
2898
2877
|
};
|
|
2899
2878
|
Chip.displayName = "Chip";
|
|
2900
2879
|
var Chip_default = Chip;
|
|
@@ -2906,17 +2885,17 @@ import React13 from "react";
|
|
|
2906
2885
|
import React8 from "react";
|
|
2907
2886
|
|
|
2908
2887
|
// src/components/Input/InputValidations.tsx
|
|
2909
|
-
import { jsx as
|
|
2888
|
+
import { jsx as jsx310, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
2910
2889
|
var InputValidations = (props) => {
|
|
2911
2890
|
const { message, status = "default" } = props;
|
|
2912
|
-
return /* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
-
status === "default" && /* @__PURE__ */
|
|
2915
|
-
status === "success" && /* @__PURE__ */
|
|
2916
|
-
status === "warning" && /* @__PURE__ */
|
|
2917
|
-
status === "error" && /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ jsxs198("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
2892
|
+
/* @__PURE__ */ jsxs198("div", { className: "icon", children: [
|
|
2893
|
+
status === "default" && /* @__PURE__ */ jsx310(InfoIcon_default, {}),
|
|
2894
|
+
status === "success" && /* @__PURE__ */ jsx310(SuccessIcon_default, {}),
|
|
2895
|
+
status === "warning" && /* @__PURE__ */ jsx310(InfoIcon_default, {}),
|
|
2896
|
+
status === "error" && /* @__PURE__ */ jsx310(ErrorIcon_default, {})
|
|
2918
2897
|
] }),
|
|
2919
|
-
/* @__PURE__ */
|
|
2898
|
+
/* @__PURE__ */ jsx310("div", { className: "message", children: message })
|
|
2920
2899
|
] });
|
|
2921
2900
|
};
|
|
2922
2901
|
InputValidations.displayName = "InputValidations";
|
|
@@ -2957,7 +2936,7 @@ var handleTelBackspace = (prevValue, currValue) => {
|
|
|
2957
2936
|
};
|
|
2958
2937
|
|
|
2959
2938
|
// src/components/Input/Input.tsx
|
|
2960
|
-
import { jsx as
|
|
2939
|
+
import { jsx as jsx311, jsxs as jsxs199 } from "react/jsx-runtime";
|
|
2961
2940
|
import { createElement } from "react";
|
|
2962
2941
|
var formatValue = (type, value) => {
|
|
2963
2942
|
if (value === null || value === void 0) return "";
|
|
@@ -3033,13 +3012,13 @@ var Input = React8.forwardRef((props, ref) => {
|
|
|
3033
3012
|
onChange(event);
|
|
3034
3013
|
}
|
|
3035
3014
|
};
|
|
3036
|
-
return /* @__PURE__ */
|
|
3037
|
-
/* @__PURE__ */
|
|
3015
|
+
return /* @__PURE__ */ jsxs199("div", { className: clsx_default("lib-xplat-input-wrap", className), children: [
|
|
3016
|
+
/* @__PURE__ */ jsxs199(
|
|
3038
3017
|
"div",
|
|
3039
3018
|
{
|
|
3040
3019
|
className: clsx_default("lib-xplat-input", size, disabled ? "disabled" : void 0),
|
|
3041
3020
|
children: [
|
|
3042
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ jsx311(
|
|
3043
3022
|
"input",
|
|
3044
3023
|
{
|
|
3045
3024
|
...inputProps,
|
|
@@ -3050,11 +3029,11 @@ var Input = React8.forwardRef((props, ref) => {
|
|
|
3050
3029
|
onChange: handleChange
|
|
3051
3030
|
}
|
|
3052
3031
|
),
|
|
3053
|
-
suffix && /* @__PURE__ */
|
|
3032
|
+
suffix && /* @__PURE__ */ jsx311("div", { className: "suffix", children: suffix })
|
|
3054
3033
|
]
|
|
3055
3034
|
}
|
|
3056
3035
|
),
|
|
3057
|
-
validations && /* @__PURE__ */
|
|
3036
|
+
validations && /* @__PURE__ */ jsx311("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ createElement(
|
|
3058
3037
|
InputValidations_default,
|
|
3059
3038
|
{
|
|
3060
3039
|
...validation,
|
|
@@ -3068,7 +3047,7 @@ var Input_default = Input;
|
|
|
3068
3047
|
|
|
3069
3048
|
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
3070
3049
|
import React9 from "react";
|
|
3071
|
-
import { jsx as
|
|
3050
|
+
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
3072
3051
|
var PasswordInput = React9.forwardRef(
|
|
3073
3052
|
(props, ref) => {
|
|
3074
3053
|
const { reg: _reg, ...inputProps } = props;
|
|
@@ -3076,11 +3055,11 @@ var PasswordInput = React9.forwardRef(
|
|
|
3076
3055
|
const handleChangeView = () => {
|
|
3077
3056
|
setIsView((prev) => !prev);
|
|
3078
3057
|
};
|
|
3079
|
-
return /* @__PURE__ */
|
|
3058
|
+
return /* @__PURE__ */ jsx312(
|
|
3080
3059
|
Input_default,
|
|
3081
3060
|
{
|
|
3082
3061
|
...inputProps,
|
|
3083
|
-
suffix: /* @__PURE__ */
|
|
3062
|
+
suffix: /* @__PURE__ */ jsx312("div", { className: "wrapper pointer", onClick: handleChangeView, children: isView ? /* @__PURE__ */ jsx312(OpenEyeIcon_default, {}) : /* @__PURE__ */ jsx312(CloseEyeIcon_default, {}) }),
|
|
3084
3063
|
type: isView ? "text" : "password",
|
|
3085
3064
|
ref
|
|
3086
3065
|
}
|
|
@@ -3097,9 +3076,9 @@ import { createPortal } from "react-dom";
|
|
|
3097
3076
|
// src/tokens/hooks/Portal.tsx
|
|
3098
3077
|
import React10 from "react";
|
|
3099
3078
|
import ReactDOM from "react-dom";
|
|
3100
|
-
import { jsx as
|
|
3079
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
3101
3080
|
var PortalContainerContext = React10.createContext(null);
|
|
3102
|
-
var PortalProvider = ({ container, children }) => /* @__PURE__ */
|
|
3081
|
+
var PortalProvider = ({ container, children }) => /* @__PURE__ */ jsx313(PortalContainerContext.Provider, { value: container, children });
|
|
3103
3082
|
var Portal = ({ children }) => {
|
|
3104
3083
|
const contextContainer = React10.useContext(PortalContainerContext);
|
|
3105
3084
|
if (typeof document === "undefined") return null;
|
|
@@ -3110,7 +3089,7 @@ Portal.displayName = "Portal";
|
|
|
3110
3089
|
var Portal_default = Portal;
|
|
3111
3090
|
|
|
3112
3091
|
// src/components/Modal/Modal.tsx
|
|
3113
|
-
import { jsx as
|
|
3092
|
+
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
3114
3093
|
var ANIMATION_DURATION_MS = 200;
|
|
3115
3094
|
var Modal = (props) => {
|
|
3116
3095
|
const { isOpen, onClose, children } = props;
|
|
@@ -3131,12 +3110,12 @@ var Modal = (props) => {
|
|
|
3131
3110
|
if (!mounted) return null;
|
|
3132
3111
|
const stateClass = visible ? "enter" : "exit";
|
|
3133
3112
|
return createPortal(
|
|
3134
|
-
/* @__PURE__ */
|
|
3113
|
+
/* @__PURE__ */ jsx314(
|
|
3135
3114
|
"div",
|
|
3136
3115
|
{
|
|
3137
3116
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
3138
3117
|
onClick: onClose,
|
|
3139
|
-
children: /* @__PURE__ */
|
|
3118
|
+
children: /* @__PURE__ */ jsx314(
|
|
3140
3119
|
"div",
|
|
3141
3120
|
{
|
|
3142
3121
|
ref: boxRef,
|
|
@@ -3144,7 +3123,7 @@ var Modal = (props) => {
|
|
|
3144
3123
|
role: "dialog",
|
|
3145
3124
|
"aria-modal": "true",
|
|
3146
3125
|
onClick: (e) => e.stopPropagation(),
|
|
3147
|
-
children: /* @__PURE__ */
|
|
3126
|
+
children: /* @__PURE__ */ jsx314(PortalProvider, { container: boxRef.current, children })
|
|
3148
3127
|
}
|
|
3149
3128
|
)
|
|
3150
3129
|
}
|
|
@@ -3157,7 +3136,7 @@ var Modal_default = Modal;
|
|
|
3157
3136
|
|
|
3158
3137
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
3159
3138
|
import React12 from "react";
|
|
3160
|
-
import { Fragment as Fragment3, jsx as
|
|
3139
|
+
import { Fragment as Fragment3, jsx as jsx315, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
3161
3140
|
var DayCell2 = React12.memo(
|
|
3162
3141
|
({
|
|
3163
3142
|
day,
|
|
@@ -3168,7 +3147,7 @@ var DayCell2 = React12.memo(
|
|
|
3168
3147
|
isEnd,
|
|
3169
3148
|
inRange,
|
|
3170
3149
|
onSelect
|
|
3171
|
-
}) => /* @__PURE__ */
|
|
3150
|
+
}) => /* @__PURE__ */ jsx315(
|
|
3172
3151
|
"button",
|
|
3173
3152
|
{
|
|
3174
3153
|
type: "button",
|
|
@@ -3266,20 +3245,20 @@ var SingleDatePicker = (props) => {
|
|
|
3266
3245
|
const monthLabels = MONTH_LABELS[locale];
|
|
3267
3246
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
3268
3247
|
const hasRange = rangeStart != null && rangeEnd != null;
|
|
3269
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsxs200(
|
|
3270
3249
|
"div",
|
|
3271
3250
|
{
|
|
3272
3251
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
3273
3252
|
children: [
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3277
|
-
/* @__PURE__ */
|
|
3253
|
+
/* @__PURE__ */ jsxs200("div", { className: "datepicker-header", children: [
|
|
3254
|
+
/* @__PURE__ */ jsx315("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx315(ChevronLeftIcon_default, {}) }),
|
|
3255
|
+
/* @__PURE__ */ jsx315("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
3256
|
+
/* @__PURE__ */ jsx315("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ jsx315(ChevronRightIcon_default, {}) })
|
|
3278
3257
|
] }),
|
|
3279
|
-
/* @__PURE__ */
|
|
3280
|
-
pickerMode === "years" && /* @__PURE__ */
|
|
3258
|
+
/* @__PURE__ */ jsxs200("div", { className: "datepicker-body", children: [
|
|
3259
|
+
pickerMode === "years" && /* @__PURE__ */ jsx315("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
3281
3260
|
const y = yearRangeStart + i;
|
|
3282
|
-
return /* @__PURE__ */
|
|
3261
|
+
return /* @__PURE__ */ jsx315(
|
|
3283
3262
|
"button",
|
|
3284
3263
|
{
|
|
3285
3264
|
type: "button",
|
|
@@ -3290,7 +3269,7 @@ var SingleDatePicker = (props) => {
|
|
|
3290
3269
|
y
|
|
3291
3270
|
);
|
|
3292
3271
|
}) }),
|
|
3293
|
-
pickerMode === "months" && /* @__PURE__ */
|
|
3272
|
+
pickerMode === "months" && /* @__PURE__ */ jsx315("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx315(
|
|
3294
3273
|
"button",
|
|
3295
3274
|
{
|
|
3296
3275
|
type: "button",
|
|
@@ -3300,8 +3279,8 @@ var SingleDatePicker = (props) => {
|
|
|
3300
3279
|
},
|
|
3301
3280
|
i
|
|
3302
3281
|
)) }),
|
|
3303
|
-
pickerMode === "days" && /* @__PURE__ */
|
|
3304
|
-
/* @__PURE__ */
|
|
3282
|
+
pickerMode === "days" && /* @__PURE__ */ jsxs200(Fragment3, { children: [
|
|
3283
|
+
/* @__PURE__ */ jsx315("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx315(
|
|
3305
3284
|
"div",
|
|
3306
3285
|
{
|
|
3307
3286
|
className: clsx_default(
|
|
@@ -3313,7 +3292,7 @@ var SingleDatePicker = (props) => {
|
|
|
3313
3292
|
},
|
|
3314
3293
|
label
|
|
3315
3294
|
)) }),
|
|
3316
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx315("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
3317
3296
|
const t = day.date.getTime();
|
|
3318
3297
|
const disabled = t < minTime || t > maxTime;
|
|
3319
3298
|
const selected = value ? isSameDay(day.date, value) : false;
|
|
@@ -3323,7 +3302,7 @@ var SingleDatePicker = (props) => {
|
|
|
3323
3302
|
const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
|
|
3324
3303
|
const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
|
|
3325
3304
|
const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
|
|
3326
|
-
return /* @__PURE__ */
|
|
3305
|
+
return /* @__PURE__ */ jsx315(
|
|
3327
3306
|
DayCell2,
|
|
3328
3307
|
{
|
|
3329
3308
|
day,
|
|
@@ -3348,7 +3327,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
3348
3327
|
var SingleDatePicker_default = SingleDatePicker;
|
|
3349
3328
|
|
|
3350
3329
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
3351
|
-
import { jsx as
|
|
3330
|
+
import { jsx as jsx316, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
3352
3331
|
var formatDate = (date) => {
|
|
3353
3332
|
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
3354
3333
|
const y = date.getFullYear();
|
|
@@ -3375,19 +3354,19 @@ var InputDatePicker = (props) => {
|
|
|
3375
3354
|
const handleClose = () => {
|
|
3376
3355
|
setIsOpen(false);
|
|
3377
3356
|
};
|
|
3378
|
-
return /* @__PURE__ */
|
|
3379
|
-
/* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsxs201("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
|
|
3358
|
+
/* @__PURE__ */ jsx316("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ jsx316(
|
|
3380
3359
|
Input_default,
|
|
3381
3360
|
{
|
|
3382
3361
|
value: formatDate(value),
|
|
3383
3362
|
placeholder,
|
|
3384
|
-
suffix: /* @__PURE__ */
|
|
3363
|
+
suffix: /* @__PURE__ */ jsx316(CalenderIcon_default, {}),
|
|
3385
3364
|
disabled,
|
|
3386
3365
|
readOnly: true
|
|
3387
3366
|
}
|
|
3388
3367
|
) }),
|
|
3389
|
-
/* @__PURE__ */
|
|
3390
|
-
/* @__PURE__ */
|
|
3368
|
+
/* @__PURE__ */ jsx316(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs201("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
3369
|
+
/* @__PURE__ */ jsx316("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ jsx316(
|
|
3391
3370
|
SingleDatePicker_default,
|
|
3392
3371
|
{
|
|
3393
3372
|
value: tempDate,
|
|
@@ -3397,9 +3376,9 @@ var InputDatePicker = (props) => {
|
|
|
3397
3376
|
locale
|
|
3398
3377
|
}
|
|
3399
3378
|
) }),
|
|
3400
|
-
/* @__PURE__ */
|
|
3401
|
-
/* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsxs201("div", { className: "popup-datepicker-footer", children: [
|
|
3380
|
+
/* @__PURE__ */ jsx316(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
|
|
3381
|
+
/* @__PURE__ */ jsx316(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3403
3382
|
] })
|
|
3404
3383
|
] }) })
|
|
3405
3384
|
] });
|
|
@@ -3418,10 +3397,10 @@ import React15 from "react";
|
|
|
3418
3397
|
|
|
3419
3398
|
// src/components/Tab/TabItem.tsx
|
|
3420
3399
|
import React14 from "react";
|
|
3421
|
-
import { jsx as
|
|
3400
|
+
import { jsx as jsx317 } from "react/jsx-runtime";
|
|
3422
3401
|
var TabItem = React14.forwardRef((props, ref) => {
|
|
3423
3402
|
const { isActive: isActive2, title, onClick } = props;
|
|
3424
|
-
return /* @__PURE__ */
|
|
3403
|
+
return /* @__PURE__ */ jsx317(
|
|
3425
3404
|
"div",
|
|
3426
3405
|
{
|
|
3427
3406
|
ref,
|
|
@@ -3435,7 +3414,7 @@ TabItem.displayName = "TabItem";
|
|
|
3435
3414
|
var TabItem_default = TabItem;
|
|
3436
3415
|
|
|
3437
3416
|
// src/components/Tab/Tab.tsx
|
|
3438
|
-
import { jsx as
|
|
3417
|
+
import { jsx as jsx318, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
3439
3418
|
var Tab = (props) => {
|
|
3440
3419
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
3441
3420
|
const [underlineStyle, setUnderlineStyle] = React15.useState({
|
|
@@ -3452,8 +3431,8 @@ var Tab = (props) => {
|
|
|
3452
3431
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
3453
3432
|
}
|
|
3454
3433
|
}, [activeIndex, tabs.length]);
|
|
3455
|
-
return /* @__PURE__ */
|
|
3456
|
-
tabs.map((tab, idx) => /* @__PURE__ */
|
|
3434
|
+
return /* @__PURE__ */ jsxs202("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
3435
|
+
tabs.map((tab, idx) => /* @__PURE__ */ jsx318(
|
|
3457
3436
|
TabItem_default,
|
|
3458
3437
|
{
|
|
3459
3438
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -3465,7 +3444,7 @@ var Tab = (props) => {
|
|
|
3465
3444
|
},
|
|
3466
3445
|
`${tab.value}_${idx}`
|
|
3467
3446
|
)),
|
|
3468
|
-
type === "toggle" && /* @__PURE__ */
|
|
3447
|
+
type === "toggle" && /* @__PURE__ */ jsx318(
|
|
3469
3448
|
"div",
|
|
3470
3449
|
{
|
|
3471
3450
|
className: "tab-toggle-underline",
|
|
@@ -3481,7 +3460,7 @@ Tab.displayName = "Tab";
|
|
|
3481
3460
|
var Tab_default = Tab;
|
|
3482
3461
|
|
|
3483
3462
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3484
|
-
import { jsx as
|
|
3463
|
+
import { jsx as jsx319, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
3485
3464
|
var RangePicker = (props) => {
|
|
3486
3465
|
const {
|
|
3487
3466
|
startDate,
|
|
@@ -3504,8 +3483,8 @@ var RangePicker = (props) => {
|
|
|
3504
3483
|
};
|
|
3505
3484
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
3506
3485
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
3507
|
-
return /* @__PURE__ */
|
|
3508
|
-
/* @__PURE__ */
|
|
3486
|
+
return /* @__PURE__ */ jsxs203("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
|
|
3487
|
+
/* @__PURE__ */ jsx319("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ jsx319(
|
|
3509
3488
|
Tab_default,
|
|
3510
3489
|
{
|
|
3511
3490
|
activeIndex: activeTab === "start" ? 0 : 1,
|
|
@@ -3518,8 +3497,8 @@ var RangePicker = (props) => {
|
|
|
3518
3497
|
size: "sm"
|
|
3519
3498
|
}
|
|
3520
3499
|
) }),
|
|
3521
|
-
/* @__PURE__ */
|
|
3522
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ jsxs203("div", { className: "datepicker-range-panels", children: [
|
|
3501
|
+
/* @__PURE__ */ jsx319(
|
|
3523
3502
|
SingleDatePicker_default,
|
|
3524
3503
|
{
|
|
3525
3504
|
value: startDate,
|
|
@@ -3531,7 +3510,7 @@ var RangePicker = (props) => {
|
|
|
3531
3510
|
locale
|
|
3532
3511
|
}
|
|
3533
3512
|
),
|
|
3534
|
-
/* @__PURE__ */
|
|
3513
|
+
/* @__PURE__ */ jsx319(
|
|
3535
3514
|
SingleDatePicker_default,
|
|
3536
3515
|
{
|
|
3537
3516
|
value: endDate,
|
|
@@ -3544,7 +3523,7 @@ var RangePicker = (props) => {
|
|
|
3544
3523
|
}
|
|
3545
3524
|
)
|
|
3546
3525
|
] }),
|
|
3547
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ jsx319("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ jsx319(
|
|
3548
3527
|
SingleDatePicker_default,
|
|
3549
3528
|
{
|
|
3550
3529
|
value: startDate,
|
|
@@ -3555,7 +3534,7 @@ var RangePicker = (props) => {
|
|
|
3555
3534
|
rangeEnd: endDate,
|
|
3556
3535
|
locale
|
|
3557
3536
|
}
|
|
3558
|
-
) : /* @__PURE__ */
|
|
3537
|
+
) : /* @__PURE__ */ jsx319(
|
|
3559
3538
|
SingleDatePicker_default,
|
|
3560
3539
|
{
|
|
3561
3540
|
value: endDate,
|
|
@@ -3573,7 +3552,7 @@ RangePicker.displayName = "RangePicker";
|
|
|
3573
3552
|
var RangePicker_default = RangePicker;
|
|
3574
3553
|
|
|
3575
3554
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3576
|
-
import { jsx as
|
|
3555
|
+
import { jsx as jsx320, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
3577
3556
|
var PopupPicker = (props) => {
|
|
3578
3557
|
const { component, type, locale } = props;
|
|
3579
3558
|
const [isOpen, setIsOpen] = React17.useState(false);
|
|
@@ -3584,11 +3563,11 @@ var PopupPicker = (props) => {
|
|
|
3584
3563
|
props.onChange?.(date);
|
|
3585
3564
|
handleClose();
|
|
3586
3565
|
};
|
|
3587
|
-
return /* @__PURE__ */
|
|
3566
|
+
return /* @__PURE__ */ jsxs204("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
3588
3567
|
React17.cloneElement(component, { onClick: handleClick }),
|
|
3589
|
-
/* @__PURE__ */
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
type === "single" && /* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ jsx320(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs204("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
3569
|
+
/* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-content", children: [
|
|
3570
|
+
type === "single" && /* @__PURE__ */ jsx320(
|
|
3592
3571
|
SingleDatePicker_default,
|
|
3593
3572
|
{
|
|
3594
3573
|
value: props.value,
|
|
@@ -3598,7 +3577,7 @@ var PopupPicker = (props) => {
|
|
|
3598
3577
|
locale
|
|
3599
3578
|
}
|
|
3600
3579
|
),
|
|
3601
|
-
type === "range" && /* @__PURE__ */
|
|
3580
|
+
type === "range" && /* @__PURE__ */ jsx320(
|
|
3602
3581
|
RangePicker_default,
|
|
3603
3582
|
{
|
|
3604
3583
|
startDate: props.startDate,
|
|
@@ -3610,8 +3589,8 @@ var PopupPicker = (props) => {
|
|
|
3610
3589
|
}
|
|
3611
3590
|
)
|
|
3612
3591
|
] }),
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsxs204("div", { className: "popup-datepicker-footer", children: [
|
|
3593
|
+
/* @__PURE__ */ jsx320(
|
|
3615
3594
|
Button_default,
|
|
3616
3595
|
{
|
|
3617
3596
|
type: "secondary",
|
|
@@ -3619,7 +3598,7 @@ var PopupPicker = (props) => {
|
|
|
3619
3598
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
3620
3599
|
}
|
|
3621
3600
|
),
|
|
3622
|
-
/* @__PURE__ */
|
|
3601
|
+
/* @__PURE__ */ jsx320(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3623
3602
|
] })
|
|
3624
3603
|
] }) })
|
|
3625
3604
|
] });
|
|
@@ -3628,10 +3607,10 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
3628
3607
|
var PopupPicker_default = PopupPicker;
|
|
3629
3608
|
|
|
3630
3609
|
// src/components/Divider/Divider.tsx
|
|
3631
|
-
import { jsx as
|
|
3610
|
+
import { jsx as jsx321 } from "react/jsx-runtime";
|
|
3632
3611
|
var Divider = (props) => {
|
|
3633
3612
|
const { orientation = "horizontal" } = props;
|
|
3634
|
-
return /* @__PURE__ */
|
|
3613
|
+
return /* @__PURE__ */ jsx321(
|
|
3635
3614
|
"div",
|
|
3636
3615
|
{
|
|
3637
3616
|
className: clsx_default("lib-xplat-divider", orientation),
|
|
@@ -3646,7 +3625,7 @@ var Divider_default = Divider;
|
|
|
3646
3625
|
// src/components/Drawer/Drawer.tsx
|
|
3647
3626
|
import React18 from "react";
|
|
3648
3627
|
import { createPortal as createPortal2 } from "react-dom";
|
|
3649
|
-
import { jsx as
|
|
3628
|
+
import { jsx as jsx322, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
3650
3629
|
var ANIMATION_DURATION_MS2 = 250;
|
|
3651
3630
|
var Drawer = (props) => {
|
|
3652
3631
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
@@ -3666,12 +3645,12 @@ var Drawer = (props) => {
|
|
|
3666
3645
|
if (!mounted) return null;
|
|
3667
3646
|
const stateClass = visible ? "enter" : "exit";
|
|
3668
3647
|
return createPortal2(
|
|
3669
|
-
/* @__PURE__ */
|
|
3648
|
+
/* @__PURE__ */ jsx322(
|
|
3670
3649
|
"div",
|
|
3671
3650
|
{
|
|
3672
3651
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
3673
3652
|
onClick: onClose,
|
|
3674
|
-
children: /* @__PURE__ */
|
|
3653
|
+
children: /* @__PURE__ */ jsxs205(
|
|
3675
3654
|
"div",
|
|
3676
3655
|
{
|
|
3677
3656
|
className: clsx_default("lib-xplat-drawer", placement, size, stateClass),
|
|
@@ -3679,11 +3658,11 @@ var Drawer = (props) => {
|
|
|
3679
3658
|
"aria-modal": "true",
|
|
3680
3659
|
onClick: (e) => e.stopPropagation(),
|
|
3681
3660
|
children: [
|
|
3682
|
-
title && /* @__PURE__ */
|
|
3683
|
-
/* @__PURE__ */
|
|
3684
|
-
/* @__PURE__ */
|
|
3661
|
+
title && /* @__PURE__ */ jsxs205("div", { className: "drawer-header", children: [
|
|
3662
|
+
/* @__PURE__ */ jsx322("span", { className: "drawer-title", children: title }),
|
|
3663
|
+
/* @__PURE__ */ jsx322("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
3685
3664
|
] }),
|
|
3686
|
-
/* @__PURE__ */
|
|
3665
|
+
/* @__PURE__ */ jsx322("div", { className: "drawer-body", children })
|
|
3687
3666
|
]
|
|
3688
3667
|
}
|
|
3689
3668
|
)
|
|
@@ -3785,7 +3764,7 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
3785
3764
|
var useClickOutside_default = useClickOutside;
|
|
3786
3765
|
|
|
3787
3766
|
// src/components/Dropdown/Dropdown.tsx
|
|
3788
|
-
import { jsx as
|
|
3767
|
+
import { jsx as jsx323, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
3789
3768
|
var Dropdown = (props) => {
|
|
3790
3769
|
const { items, children } = props;
|
|
3791
3770
|
const [isOpen, setIsOpen] = React21.useState(false);
|
|
@@ -3810,8 +3789,8 @@ var Dropdown = (props) => {
|
|
|
3810
3789
|
item.onClick?.();
|
|
3811
3790
|
setIsOpen(false);
|
|
3812
3791
|
};
|
|
3813
|
-
return /* @__PURE__ */
|
|
3814
|
-
/* @__PURE__ */
|
|
3792
|
+
return /* @__PURE__ */ jsxs206("div", { className: "lib-xplat-dropdown", children: [
|
|
3793
|
+
/* @__PURE__ */ jsx323(
|
|
3815
3794
|
"div",
|
|
3816
3795
|
{
|
|
3817
3796
|
ref: triggerRef,
|
|
@@ -3820,14 +3799,14 @@ var Dropdown = (props) => {
|
|
|
3820
3799
|
children
|
|
3821
3800
|
}
|
|
3822
3801
|
),
|
|
3823
|
-
mounted && /* @__PURE__ */
|
|
3802
|
+
mounted && /* @__PURE__ */ jsx323(Portal_default, { children: /* @__PURE__ */ jsx323(
|
|
3824
3803
|
"div",
|
|
3825
3804
|
{
|
|
3826
3805
|
ref: menuRef,
|
|
3827
3806
|
className: clsx_default("lib-xplat-dropdown-menu", direction, { visible }),
|
|
3828
3807
|
style: { top: position.top, left: position.left },
|
|
3829
3808
|
role: "menu",
|
|
3830
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3809
|
+
children: items.map((item) => /* @__PURE__ */ jsx323(
|
|
3831
3810
|
"button",
|
|
3832
3811
|
{
|
|
3833
3812
|
className: clsx_default("dropdown-item", {
|
|
@@ -3850,7 +3829,7 @@ var Dropdown_default = Dropdown;
|
|
|
3850
3829
|
|
|
3851
3830
|
// src/components/Editor/Editor.tsx
|
|
3852
3831
|
import React22 from "react";
|
|
3853
|
-
import { jsx as
|
|
3832
|
+
import { jsx as jsx324, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
3854
3833
|
var DEFAULT_TOOLBAR = [
|
|
3855
3834
|
"bold",
|
|
3856
3835
|
"italic",
|
|
@@ -4370,8 +4349,8 @@ var Editor = (props) => {
|
|
|
4370
4349
|
break;
|
|
4371
4350
|
}
|
|
4372
4351
|
};
|
|
4373
|
-
return /* @__PURE__ */
|
|
4374
|
-
!readOnly && /* @__PURE__ */
|
|
4352
|
+
return /* @__PURE__ */ jsxs207("div", { className: clsx_default("lib-xplat-editor", isFocused && "focused", readOnly && "readonly"), children: [
|
|
4353
|
+
!readOnly && /* @__PURE__ */ jsx324(
|
|
4375
4354
|
EditorToolbar,
|
|
4376
4355
|
{
|
|
4377
4356
|
items: toolbar,
|
|
@@ -4379,9 +4358,9 @@ var Editor = (props) => {
|
|
|
4379
4358
|
onAction: onToolbarAction
|
|
4380
4359
|
}
|
|
4381
4360
|
),
|
|
4382
|
-
/* @__PURE__ */
|
|
4383
|
-
isEmpty && !isFocused && /* @__PURE__ */
|
|
4384
|
-
/* @__PURE__ */
|
|
4361
|
+
/* @__PURE__ */ jsxs207("div", { className: "lib-xplat-editor__content", style: { minHeight }, children: [
|
|
4362
|
+
isEmpty && !isFocused && /* @__PURE__ */ jsx324("div", { className: "lib-xplat-editor__placeholder", children: placeholder }),
|
|
4363
|
+
/* @__PURE__ */ jsx324(
|
|
4385
4364
|
"div",
|
|
4386
4365
|
{
|
|
4387
4366
|
ref: editorRef,
|
|
@@ -4400,7 +4379,7 @@ var Editor = (props) => {
|
|
|
4400
4379
|
spellCheck: true
|
|
4401
4380
|
}
|
|
4402
4381
|
),
|
|
4403
|
-
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */
|
|
4382
|
+
slashOpen && filteredSlashItems.length > 0 && /* @__PURE__ */ jsx324(
|
|
4404
4383
|
SlashMenu,
|
|
4405
4384
|
{
|
|
4406
4385
|
position: slashPos,
|
|
@@ -4410,7 +4389,7 @@ var Editor = (props) => {
|
|
|
4410
4389
|
onClose: closeSlashMenu
|
|
4411
4390
|
}
|
|
4412
4391
|
),
|
|
4413
|
-
linkOpen && /* @__PURE__ */
|
|
4392
|
+
linkOpen && /* @__PURE__ */ jsx324(
|
|
4414
4393
|
LinkPopover,
|
|
4415
4394
|
{
|
|
4416
4395
|
position: linkPos,
|
|
@@ -4462,7 +4441,7 @@ var isActive = (item, active) => {
|
|
|
4462
4441
|
return active.has(item);
|
|
4463
4442
|
};
|
|
4464
4443
|
var EditorToolbar = ({ items, active, onAction }) => {
|
|
4465
|
-
return /* @__PURE__ */
|
|
4444
|
+
return /* @__PURE__ */ jsx324("div", { className: "lib-xplat-editor__toolbar", children: items.map((item) => /* @__PURE__ */ jsx324(
|
|
4466
4445
|
"button",
|
|
4467
4446
|
{
|
|
4468
4447
|
type: "button",
|
|
@@ -4487,12 +4466,12 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4487
4466
|
window.addEventListener("mousedown", handleClickOutside);
|
|
4488
4467
|
return () => window.removeEventListener("mousedown", handleClickOutside);
|
|
4489
4468
|
}, [onClose]);
|
|
4490
|
-
return /* @__PURE__ */
|
|
4469
|
+
return /* @__PURE__ */ jsx324(
|
|
4491
4470
|
"div",
|
|
4492
4471
|
{
|
|
4493
4472
|
className: "lib-xplat-editor__slash-menu",
|
|
4494
4473
|
style: { top: position.top, left: position.left },
|
|
4495
|
-
children: items.map((item, i) => /* @__PURE__ */
|
|
4474
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs207(
|
|
4496
4475
|
"button",
|
|
4497
4476
|
{
|
|
4498
4477
|
type: "button",
|
|
@@ -4502,8 +4481,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
4502
4481
|
onSelect(item);
|
|
4503
4482
|
},
|
|
4504
4483
|
children: [
|
|
4505
|
-
/* @__PURE__ */
|
|
4506
|
-
item.hint && /* @__PURE__ */
|
|
4484
|
+
/* @__PURE__ */ jsx324("span", { className: "label", children: item.label }),
|
|
4485
|
+
item.hint && /* @__PURE__ */ jsx324("span", { className: "hint", children: item.hint })
|
|
4507
4486
|
]
|
|
4508
4487
|
},
|
|
4509
4488
|
item.key
|
|
@@ -4516,13 +4495,13 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4516
4495
|
React22.useEffect(() => {
|
|
4517
4496
|
inputRef.current?.focus();
|
|
4518
4497
|
}, []);
|
|
4519
|
-
return /* @__PURE__ */
|
|
4498
|
+
return /* @__PURE__ */ jsxs207(
|
|
4520
4499
|
"div",
|
|
4521
4500
|
{
|
|
4522
4501
|
className: "lib-xplat-editor__link-popover",
|
|
4523
4502
|
style: { top: position.top, left: position.left },
|
|
4524
4503
|
children: [
|
|
4525
|
-
/* @__PURE__ */
|
|
4504
|
+
/* @__PURE__ */ jsx324(
|
|
4526
4505
|
"input",
|
|
4527
4506
|
{
|
|
4528
4507
|
ref: inputRef,
|
|
@@ -4542,11 +4521,11 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4542
4521
|
}
|
|
4543
4522
|
}
|
|
4544
4523
|
),
|
|
4545
|
-
/* @__PURE__ */
|
|
4524
|
+
/* @__PURE__ */ jsx324("button", { type: "button", onMouseDown: (e) => {
|
|
4546
4525
|
e.preventDefault();
|
|
4547
4526
|
onConfirm();
|
|
4548
4527
|
}, children: "\uC801\uC6A9" }),
|
|
4549
|
-
/* @__PURE__ */
|
|
4528
|
+
/* @__PURE__ */ jsx324("button", { type: "button", onMouseDown: (e) => {
|
|
4550
4529
|
e.preventDefault();
|
|
4551
4530
|
onClose();
|
|
4552
4531
|
}, children: "\uCDE8\uC18C" })
|
|
@@ -4556,15 +4535,15 @@ var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
|
4556
4535
|
};
|
|
4557
4536
|
|
|
4558
4537
|
// src/components/EmptyState/EmptyState.tsx
|
|
4559
|
-
import { jsx as
|
|
4538
|
+
import { jsx as jsx325, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
4560
4539
|
var EmptyState = (props) => {
|
|
4561
4540
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
|
|
4562
|
-
return /* @__PURE__ */
|
|
4563
|
-
icon && /* @__PURE__ */
|
|
4564
|
-
!icon && /* @__PURE__ */
|
|
4565
|
-
/* @__PURE__ */
|
|
4566
|
-
description && /* @__PURE__ */
|
|
4567
|
-
action && /* @__PURE__ */
|
|
4541
|
+
return /* @__PURE__ */ jsxs208("div", { className: "lib-xplat-empty-state", children: [
|
|
4542
|
+
icon && /* @__PURE__ */ jsx325("div", { className: "empty-icon", children: icon }),
|
|
4543
|
+
!icon && /* @__PURE__ */ jsx325("div", { className: "empty-icon", children: /* @__PURE__ */ jsx325("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx325("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" }) }) }),
|
|
4544
|
+
/* @__PURE__ */ jsx325("p", { className: "empty-title", children: title }),
|
|
4545
|
+
description && /* @__PURE__ */ jsx325("p", { className: "empty-description", children: description }),
|
|
4546
|
+
action && /* @__PURE__ */ jsx325("div", { className: "empty-action", children: action })
|
|
4568
4547
|
] });
|
|
4569
4548
|
};
|
|
4570
4549
|
EmptyState.displayName = "EmptyState";
|
|
@@ -4572,7 +4551,7 @@ var EmptyState_default = EmptyState;
|
|
|
4572
4551
|
|
|
4573
4552
|
// src/components/FileUpload/FileUpload.tsx
|
|
4574
4553
|
import React23 from "react";
|
|
4575
|
-
import { jsx as
|
|
4554
|
+
import { jsx as jsx326, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
4576
4555
|
var FileUpload = (props) => {
|
|
4577
4556
|
const {
|
|
4578
4557
|
accept,
|
|
@@ -4613,7 +4592,7 @@ var FileUpload = (props) => {
|
|
|
4613
4592
|
handleFiles(e.target.files);
|
|
4614
4593
|
}
|
|
4615
4594
|
};
|
|
4616
|
-
return /* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ jsxs209(
|
|
4617
4596
|
"div",
|
|
4618
4597
|
{
|
|
4619
4598
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
|
|
@@ -4622,7 +4601,7 @@ var FileUpload = (props) => {
|
|
|
4622
4601
|
onDragLeave: handleDragLeave,
|
|
4623
4602
|
onClick: () => inputRef.current?.click(),
|
|
4624
4603
|
children: [
|
|
4625
|
-
/* @__PURE__ */
|
|
4604
|
+
/* @__PURE__ */ jsx326(
|
|
4626
4605
|
"input",
|
|
4627
4606
|
{
|
|
4628
4607
|
ref: inputRef,
|
|
@@ -4632,9 +4611,9 @@ var FileUpload = (props) => {
|
|
|
4632
4611
|
onChange: handleChange
|
|
4633
4612
|
}
|
|
4634
4613
|
),
|
|
4635
|
-
/* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4637
|
-
description && /* @__PURE__ */
|
|
4614
|
+
/* @__PURE__ */ jsx326("div", { className: "upload-icon", children: /* @__PURE__ */ jsx326(UploadIcon_default, {}) }),
|
|
4615
|
+
/* @__PURE__ */ jsx326("p", { className: "upload-label", children: label }),
|
|
4616
|
+
description && /* @__PURE__ */ jsx326("p", { className: "upload-description", children: description })
|
|
4638
4617
|
]
|
|
4639
4618
|
}
|
|
4640
4619
|
);
|
|
@@ -4728,7 +4707,7 @@ var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
|
4728
4707
|
};
|
|
4729
4708
|
|
|
4730
4709
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
4731
|
-
import { jsx as
|
|
4710
|
+
import { jsx as jsx327 } from "react/jsx-runtime";
|
|
4732
4711
|
var HtmlTypeWriter = ({
|
|
4733
4712
|
html,
|
|
4734
4713
|
duration = 20,
|
|
@@ -4771,14 +4750,14 @@ var HtmlTypeWriter = ({
|
|
|
4771
4750
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
4772
4751
|
[doc, typedLen, rangeMap]
|
|
4773
4752
|
);
|
|
4774
|
-
return /* @__PURE__ */
|
|
4753
|
+
return /* @__PURE__ */ jsx327("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
4775
4754
|
};
|
|
4776
4755
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
4777
4756
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
4778
4757
|
|
|
4779
4758
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
4780
4759
|
import React26 from "react";
|
|
4781
|
-
import { jsx as
|
|
4760
|
+
import { jsx as jsx328, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
4782
4761
|
var ImageSelector = (props) => {
|
|
4783
4762
|
const { value, label, onChange } = props;
|
|
4784
4763
|
const [previewUrl, setPreviewUrl] = React26.useState();
|
|
@@ -4804,8 +4783,8 @@ var ImageSelector = (props) => {
|
|
|
4804
4783
|
const handleOpenFileDialog = () => {
|
|
4805
4784
|
inputRef.current?.click();
|
|
4806
4785
|
};
|
|
4807
|
-
return /* @__PURE__ */
|
|
4808
|
-
/* @__PURE__ */
|
|
4786
|
+
return /* @__PURE__ */ jsxs210("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
4787
|
+
/* @__PURE__ */ jsx328(
|
|
4809
4788
|
"input",
|
|
4810
4789
|
{
|
|
4811
4790
|
type: "file",
|
|
@@ -4815,19 +4794,40 @@ var ImageSelector = (props) => {
|
|
|
4815
4794
|
ref: inputRef
|
|
4816
4795
|
}
|
|
4817
4796
|
),
|
|
4818
|
-
value && /* @__PURE__ */
|
|
4819
|
-
/* @__PURE__ */
|
|
4820
|
-
/* @__PURE__ */
|
|
4797
|
+
value && /* @__PURE__ */ jsxs210("div", { className: "action-bar", children: [
|
|
4798
|
+
/* @__PURE__ */ jsx328("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx328(UploadIcon_default, {}) }),
|
|
4799
|
+
/* @__PURE__ */ jsx328("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx328(DeleteIcon_default, {}) })
|
|
4821
4800
|
] }),
|
|
4822
|
-
/* @__PURE__ */
|
|
4823
|
-
/* @__PURE__ */
|
|
4824
|
-
/* @__PURE__ */
|
|
4801
|
+
/* @__PURE__ */ jsx328("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx328("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs210("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
4802
|
+
/* @__PURE__ */ jsx328("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx328(ImageIcon_default, {}) }),
|
|
4803
|
+
/* @__PURE__ */ jsx328("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
4825
4804
|
] }) })
|
|
4826
4805
|
] });
|
|
4827
4806
|
};
|
|
4828
4807
|
ImageSelector.displayName = "ImageSelector";
|
|
4829
4808
|
var ImageSelector_default = ImageSelector;
|
|
4830
4809
|
|
|
4810
|
+
// src/components/NotificationBadge/NotificationBadge.tsx
|
|
4811
|
+
import { jsx as jsx329, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
4812
|
+
var NotificationBadge = (props) => {
|
|
4813
|
+
const {
|
|
4814
|
+
children,
|
|
4815
|
+
type = "error",
|
|
4816
|
+
count,
|
|
4817
|
+
maxCount = 99,
|
|
4818
|
+
dot = false,
|
|
4819
|
+
size = "md"
|
|
4820
|
+
} = props;
|
|
4821
|
+
const showBadge = dot || count !== void 0 && count > 0;
|
|
4822
|
+
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
4823
|
+
return /* @__PURE__ */ jsxs211("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
4824
|
+
children,
|
|
4825
|
+
showBadge && /* @__PURE__ */ jsx329("span", { className: clsx_default("badge-indicator", type, { dot }), children: !dot && displayCount })
|
|
4826
|
+
] });
|
|
4827
|
+
};
|
|
4828
|
+
NotificationBadge.displayName = "NotificationBadge";
|
|
4829
|
+
var NotificationBadge_default = NotificationBadge;
|
|
4830
|
+
|
|
4831
4831
|
// src/components/Pagination/Pagination.tsx
|
|
4832
4832
|
import { jsx as jsx330, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
4833
4833
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
@@ -5797,6 +5797,8 @@ var TableCell = React37.memo((props) => {
|
|
|
5797
5797
|
isSticky = false,
|
|
5798
5798
|
width,
|
|
5799
5799
|
nowrap = false,
|
|
5800
|
+
scope = "col",
|
|
5801
|
+
colSpan,
|
|
5800
5802
|
onClick
|
|
5801
5803
|
} = props;
|
|
5802
5804
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
@@ -5828,7 +5830,8 @@ var TableCell = React37.memo((props) => {
|
|
|
5828
5830
|
}
|
|
5829
5831
|
return () => observer.disconnect();
|
|
5830
5832
|
}, [isSticky, registerStickyCell, calculateLeft]);
|
|
5831
|
-
const
|
|
5833
|
+
const isHeaderCell = headContext !== null;
|
|
5834
|
+
const CellTag = isHeaderCell ? "th" : "td";
|
|
5832
5835
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
5833
5836
|
const enableHover = headContext && headContext.cellHover;
|
|
5834
5837
|
return /* @__PURE__ */ jsx344(
|
|
@@ -5843,6 +5846,8 @@ var TableCell = React37.memo((props) => {
|
|
|
5843
5846
|
enableHover && "cell-hover",
|
|
5844
5847
|
nowrap && "nowrap"
|
|
5845
5848
|
),
|
|
5849
|
+
scope: isHeaderCell ? scope : void 0,
|
|
5850
|
+
colSpan,
|
|
5846
5851
|
style: {
|
|
5847
5852
|
...isSticky ? { left } : null,
|
|
5848
5853
|
...width != null ? { width: typeof width === "number" ? `${width}px` : width } : null
|
|
@@ -6520,7 +6525,7 @@ export {
|
|
|
6520
6525
|
Alert_default as Alert,
|
|
6521
6526
|
AutoResizeTextArea_default as AutoResizeTextArea,
|
|
6522
6527
|
Avatar_default as Avatar,
|
|
6523
|
-
|
|
6528
|
+
NotificationBadge_default as Badge,
|
|
6524
6529
|
Box_default as Box,
|
|
6525
6530
|
Breadcrumb_default as Breadcrumb,
|
|
6526
6531
|
Button_default as Button,
|
|
@@ -6536,12 +6541,14 @@ export {
|
|
|
6536
6541
|
Editor_default as Editor,
|
|
6537
6542
|
EmptyState_default as EmptyState,
|
|
6538
6543
|
FileUpload_default as FileUpload,
|
|
6544
|
+
HtmlTypeWriter_default as HtmlTypeWriter,
|
|
6539
6545
|
HtmlTypeWriter_default as HtmlTypewriter,
|
|
6540
6546
|
IconButton_default as IconButton,
|
|
6541
6547
|
ImageSelector_default as ImageSelector,
|
|
6542
6548
|
Input_default as Input,
|
|
6543
6549
|
InputDatePicker_default as InputDatePicker,
|
|
6544
6550
|
Modal_default as Modal,
|
|
6551
|
+
NotificationBadge_default as NotificationBadge,
|
|
6545
6552
|
Pagination_default as Pagination,
|
|
6546
6553
|
PasswordInput_default as PasswordInput,
|
|
6547
6554
|
PopOver_default as PopOver,
|