@x-plat/design-system 0.5.20 → 0.5.22
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/Chart/index.cjs +58 -29
- package/dist/components/Chart/index.css +2 -15
- package/dist/components/Chart/index.js +58 -29
- package/dist/components/ChatInput/index.cjs +214 -0
- package/dist/components/ChatInput/index.css +133 -0
- package/dist/components/ChatInput/index.d.cts +14 -0
- package/dist/components/ChatInput/index.d.ts +14 -0
- package/dist/components/ChatInput/index.js +177 -0
- package/dist/components/Dropdown/index.cjs +9 -0
- package/dist/components/Dropdown/index.js +9 -0
- package/dist/components/PopOver/index.cjs +9 -0
- package/dist/components/PopOver/index.js +9 -0
- package/dist/components/Select/index.cjs +9 -0
- package/dist/components/Select/index.js +9 -0
- package/dist/components/Table/index.cjs +2 -1
- package/dist/components/Table/index.css +117 -0
- package/dist/components/Table/index.d.cts +3 -1
- package/dist/components/Table/index.d.ts +3 -1
- package/dist/components/Table/index.js +2 -1
- package/dist/components/index.cjs +715 -595
- package/dist/components/index.css +253 -61
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +713 -594
- package/dist/index.cjs +724 -619
- package/dist/index.css +253 -61
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +722 -618
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -387,6 +387,21 @@ import { jsx as jsx88 } from "react/jsx-runtime";
|
|
|
387
387
|
|
|
388
388
|
// src/tokens/svg/communication/SendIcon.tsx
|
|
389
389
|
import { jsx as jsx89, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
390
|
+
var SendIcon = () => /* @__PURE__ */ jsxs47(
|
|
391
|
+
"svg",
|
|
392
|
+
{
|
|
393
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
394
|
+
width: "1em",
|
|
395
|
+
height: "1em",
|
|
396
|
+
viewBox: "0 0 20 20",
|
|
397
|
+
fill: "none",
|
|
398
|
+
children: [
|
|
399
|
+
/* @__PURE__ */ jsx89("g", { clipPath: "url(#send-clip)", children: /* @__PURE__ */ jsx89("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.3558 0.918873C18.3887 0.919879 18.4212 0.9224 18.4535 0.927663C18.4642 0.929393 18.4751 0.930348 18.4857 0.932545C18.527 0.941123 18.5675 0.953269 18.6068 0.968678C18.6178 0.972968 18.6282 0.978499 18.639 0.983327C18.6672 0.995914 18.6945 1.01021 18.7211 1.0263C18.7403 1.03794 18.7594 1.04988 18.7777 1.0634C18.7803 1.06534 18.7829 1.0673 18.7855 1.06926C18.8126 1.08979 18.839 1.11195 18.8637 1.13665C18.8872 1.16018 18.9084 1.18517 18.9281 1.21087C18.9322 1.21625 18.9359 1.22198 18.9398 1.22747C18.9501 1.24168 18.959 1.25667 18.9681 1.27141C18.9866 1.30108 19.0029 1.33154 19.017 1.36321C19.0214 1.37309 19.0267 1.38248 19.0306 1.39251C19.0461 1.43186 19.0581 1.47231 19.0668 1.5136C19.069 1.52426 19.0699 1.5351 19.0717 1.54583C19.077 1.57815 19.0794 1.61062 19.0805 1.64348C19.0808 1.65621 19.0817 1.66884 19.0814 1.68157C19.0799 1.75981 19.0681 1.83872 19.0414 1.91497L13.2074 18.581C13.1058 18.871 12.8377 19.0703 12.5306 19.0829C12.2237 19.0954 11.9398 18.9192 11.8148 18.6386L8.59706 11.4003L1.3617 8.18547C1.08085 8.06057 0.90492 7.77678 0.917368 7.46965C0.929915 7.16252 1.12827 6.89358 1.41834 6.79192L18.0853 0.958913C18.1613 0.932334 18.2398 0.919479 18.3178 0.917897C18.3305 0.91763 18.3431 0.918498 18.3558 0.918873ZM10.0609 10.999L12.4164 16.2997L16.5375 4.52239L10.0609 10.999ZM3.69862 7.58294L9.00038 9.93841L15.4808 3.45794L3.69862 7.58294Z", fill: "currentColor" }) }),
|
|
400
|
+
/* @__PURE__ */ jsx89("defs", { children: /* @__PURE__ */ jsx89("clipPath", { id: "send-clip", children: /* @__PURE__ */ jsx89("rect", { width: "20", height: "20", fill: "currentColor" }) }) })
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
var SendIcon_default = SendIcon;
|
|
390
405
|
|
|
391
406
|
// src/tokens/svg/date/CalendarIcon.tsx
|
|
392
407
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
@@ -1933,30 +1948,151 @@ var Calendar = (props) => {
|
|
|
1933
1948
|
Calendar.displayName = "Calendar";
|
|
1934
1949
|
var Calendar_default = Calendar;
|
|
1935
1950
|
|
|
1951
|
+
// src/components/ChatInput/ChatInput.tsx
|
|
1952
|
+
import React5 from "react";
|
|
1953
|
+
|
|
1954
|
+
// src/components/TextArea/TextArea.tsx
|
|
1955
|
+
import React4 from "react";
|
|
1956
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
1957
|
+
var TextArea = React4.forwardRef(
|
|
1958
|
+
(props, ref) => {
|
|
1959
|
+
const { value, onChange, disabled, ...textareaProps } = props;
|
|
1960
|
+
const localRef = React4.useRef(null);
|
|
1961
|
+
const setRefs = (el) => {
|
|
1962
|
+
localRef.current = el;
|
|
1963
|
+
if (!ref) return;
|
|
1964
|
+
if (typeof ref === "function") {
|
|
1965
|
+
ref(el);
|
|
1966
|
+
} else if (ref && typeof ref === "object" && "current" in ref) {
|
|
1967
|
+
ref.current = el;
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
const handleOnChange = (e) => {
|
|
1971
|
+
const val = e.target.value;
|
|
1972
|
+
if (onChange) {
|
|
1973
|
+
const event = {
|
|
1974
|
+
...e,
|
|
1975
|
+
target: { value: val }
|
|
1976
|
+
};
|
|
1977
|
+
onChange(event);
|
|
1978
|
+
}
|
|
1979
|
+
};
|
|
1980
|
+
React4.useEffect(() => {
|
|
1981
|
+
const el = localRef.current;
|
|
1982
|
+
if (!el) return;
|
|
1983
|
+
el.style.height = "0px";
|
|
1984
|
+
const nextHeight = Math.min(el.scrollHeight, 400);
|
|
1985
|
+
el.style.height = `${nextHeight}px`;
|
|
1986
|
+
}, [value]);
|
|
1987
|
+
return /* @__PURE__ */ jsx302("div", { className: "lib-xplat-textarea-wrapper", children: /* @__PURE__ */ jsx302(
|
|
1988
|
+
"div",
|
|
1989
|
+
{
|
|
1990
|
+
className: clsx_default(
|
|
1991
|
+
"lib-xplat-textarea",
|
|
1992
|
+
disabled ? "disabled" : void 0
|
|
1993
|
+
),
|
|
1994
|
+
children: /* @__PURE__ */ jsx302(
|
|
1995
|
+
"textarea",
|
|
1996
|
+
{
|
|
1997
|
+
...textareaProps,
|
|
1998
|
+
ref: setRefs,
|
|
1999
|
+
disabled,
|
|
2000
|
+
value,
|
|
2001
|
+
onChange: handleOnChange
|
|
2002
|
+
}
|
|
2003
|
+
)
|
|
2004
|
+
}
|
|
2005
|
+
) });
|
|
2006
|
+
}
|
|
2007
|
+
);
|
|
2008
|
+
TextArea.displayName = "TextArea";
|
|
2009
|
+
var TextArea_default = TextArea;
|
|
2010
|
+
|
|
2011
|
+
// src/components/ChatInput/ChatInput.tsx
|
|
2012
|
+
import { jsx as jsx303, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
2013
|
+
var ChatInput = React5.forwardRef(
|
|
2014
|
+
(props, ref) => {
|
|
2015
|
+
const {
|
|
2016
|
+
placeholder,
|
|
2017
|
+
value: valueProp,
|
|
2018
|
+
disabled = false,
|
|
2019
|
+
buttonType = "primary",
|
|
2020
|
+
onSubmit,
|
|
2021
|
+
onChange
|
|
2022
|
+
} = props;
|
|
2023
|
+
const isControlled = valueProp !== void 0;
|
|
2024
|
+
const [internalValue, setInternalValue] = React5.useState("");
|
|
2025
|
+
const value = isControlled ? valueProp : internalValue;
|
|
2026
|
+
const hasText = value.trim().length > 0;
|
|
2027
|
+
const handleChange = (e) => {
|
|
2028
|
+
const val = e.target.value;
|
|
2029
|
+
if (!isControlled) setInternalValue(val);
|
|
2030
|
+
onChange?.(val);
|
|
2031
|
+
};
|
|
2032
|
+
const handleSubmit = () => {
|
|
2033
|
+
if (!hasText || disabled) return;
|
|
2034
|
+
onSubmit?.(value);
|
|
2035
|
+
if (!isControlled) setInternalValue("");
|
|
2036
|
+
};
|
|
2037
|
+
const handleKeyDown = (e) => {
|
|
2038
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
2039
|
+
e.preventDefault();
|
|
2040
|
+
handleSubmit();
|
|
2041
|
+
}
|
|
2042
|
+
};
|
|
2043
|
+
return /* @__PURE__ */ jsxs194("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
|
|
2044
|
+
/* @__PURE__ */ jsx303(
|
|
2045
|
+
TextArea_default,
|
|
2046
|
+
{
|
|
2047
|
+
ref,
|
|
2048
|
+
placeholder,
|
|
2049
|
+
value,
|
|
2050
|
+
disabled,
|
|
2051
|
+
onChange: handleChange,
|
|
2052
|
+
onKeyDown: handleKeyDown
|
|
2053
|
+
}
|
|
2054
|
+
),
|
|
2055
|
+
/* @__PURE__ */ jsx303(
|
|
2056
|
+
"button",
|
|
2057
|
+
{
|
|
2058
|
+
type: "button",
|
|
2059
|
+
className: clsx_default("chat-input-send", `btn-${buttonType}`),
|
|
2060
|
+
disabled: !hasText || disabled,
|
|
2061
|
+
onClick: handleSubmit,
|
|
2062
|
+
"aria-label": "\uC804\uC1A1",
|
|
2063
|
+
children: /* @__PURE__ */ jsx303(SendIcon_default, {})
|
|
2064
|
+
}
|
|
2065
|
+
)
|
|
2066
|
+
] });
|
|
2067
|
+
}
|
|
2068
|
+
);
|
|
2069
|
+
ChatInput.displayName = "ChatInput";
|
|
2070
|
+
var ChatInput_default = ChatInput;
|
|
2071
|
+
|
|
1936
2072
|
// src/components/Box/Box.tsx
|
|
1937
|
-
import { jsx as
|
|
2073
|
+
import { jsx as jsx304, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
1938
2074
|
var Box = ({
|
|
1939
2075
|
children,
|
|
1940
2076
|
title,
|
|
1941
2077
|
variant = "outlined",
|
|
1942
2078
|
padding = "md"
|
|
1943
2079
|
}) => {
|
|
1944
|
-
return /* @__PURE__ */
|
|
1945
|
-
title && /* @__PURE__ */
|
|
1946
|
-
/* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ jsxs195("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
|
|
2081
|
+
title && /* @__PURE__ */ jsx304("div", { className: "box-title", children: title }),
|
|
2082
|
+
/* @__PURE__ */ jsx304("div", { className: "box-content", children })
|
|
1947
2083
|
] });
|
|
1948
2084
|
};
|
|
1949
2085
|
Box.displayName = "Box";
|
|
1950
2086
|
var Box_default = Box;
|
|
1951
2087
|
|
|
1952
2088
|
// src/components/CardTab/CardTab.tsx
|
|
1953
|
-
import
|
|
2089
|
+
import React6 from "react";
|
|
1954
2090
|
|
|
1955
2091
|
// src/components/CardTab/CardTabPanel.tsx
|
|
1956
|
-
import { jsx as
|
|
2092
|
+
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
1957
2093
|
var CardTabPanel = (props) => {
|
|
1958
2094
|
const { children, columns = 3 } = props;
|
|
1959
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ jsx305(
|
|
1960
2096
|
"div",
|
|
1961
2097
|
{
|
|
1962
2098
|
className: "card-tab-panel",
|
|
@@ -1969,7 +2105,7 @@ CardTabPanel.displayName = "CardTab.Panel";
|
|
|
1969
2105
|
var CardTabPanel_default = CardTabPanel;
|
|
1970
2106
|
|
|
1971
2107
|
// src/components/CardTab/CardTab.tsx
|
|
1972
|
-
import { jsx as
|
|
2108
|
+
import { jsx as jsx306, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
1973
2109
|
var CardTabRoot = (props) => {
|
|
1974
2110
|
const {
|
|
1975
2111
|
tabs,
|
|
@@ -1979,7 +2115,7 @@ var CardTabRoot = (props) => {
|
|
|
1979
2115
|
children
|
|
1980
2116
|
} = props;
|
|
1981
2117
|
const isControlled = activeValueProp !== void 0;
|
|
1982
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
2118
|
+
const [uncontrolledValue, setUncontrolledValue] = React6.useState(tabs[0]?.value ?? "");
|
|
1983
2119
|
const activeValue = isControlled ? activeValueProp : uncontrolledValue;
|
|
1984
2120
|
const handleTabClick = (tab) => {
|
|
1985
2121
|
if (!isControlled) {
|
|
@@ -1987,16 +2123,16 @@ var CardTabRoot = (props) => {
|
|
|
1987
2123
|
}
|
|
1988
2124
|
onChange?.(tab);
|
|
1989
2125
|
};
|
|
1990
|
-
const panels =
|
|
1991
|
-
(child) =>
|
|
2126
|
+
const panels = React6.Children.toArray(children).filter(
|
|
2127
|
+
(child) => React6.isValidElement(child) && child.type === CardTabPanel_default
|
|
1992
2128
|
);
|
|
1993
2129
|
const activePanel = panels.find(
|
|
1994
2130
|
(panel) => panel.props.value === activeValue
|
|
1995
2131
|
);
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ jsxs196("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
|
|
2133
|
+
/* @__PURE__ */ jsx306("div", { className: "card-tab-bar", children: tabs.map((tab) => {
|
|
1998
2134
|
const isActive = tab.value === activeValue;
|
|
1999
|
-
return /* @__PURE__ */
|
|
2135
|
+
return /* @__PURE__ */ jsx306(
|
|
2000
2136
|
"button",
|
|
2001
2137
|
{
|
|
2002
2138
|
className: clsx_default("card-tab-trigger", isActive && "active"),
|
|
@@ -2008,7 +2144,7 @@ var CardTabRoot = (props) => {
|
|
|
2008
2144
|
tab.value
|
|
2009
2145
|
);
|
|
2010
2146
|
}) }),
|
|
2011
|
-
/* @__PURE__ */
|
|
2147
|
+
/* @__PURE__ */ jsx306("div", { className: "card-tab-body", children: activePanel })
|
|
2012
2148
|
] });
|
|
2013
2149
|
};
|
|
2014
2150
|
CardTabRoot.displayName = "CardTab";
|
|
@@ -2018,8 +2154,8 @@ var CardTab = Object.assign(CardTabRoot, {
|
|
|
2018
2154
|
var CardTab_default = CardTab;
|
|
2019
2155
|
|
|
2020
2156
|
// src/components/Chart/Chart.tsx
|
|
2021
|
-
import
|
|
2022
|
-
import { Fragment as Fragment2, jsx as
|
|
2157
|
+
import React7 from "react";
|
|
2158
|
+
import { Fragment as Fragment2, jsx as jsx307, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
2023
2159
|
var CATEGORICAL_COUNT2 = 8;
|
|
2024
2160
|
var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
|
|
2025
2161
|
const n = i + 1;
|
|
@@ -2065,11 +2201,11 @@ var toSmoothPath = (points) => {
|
|
|
2065
2201
|
};
|
|
2066
2202
|
var RESIZE_SETTLE_MS = 150;
|
|
2067
2203
|
var useChartSize = (ref) => {
|
|
2068
|
-
const [size, setSize] =
|
|
2069
|
-
const settleTimer =
|
|
2070
|
-
const committedSize =
|
|
2071
|
-
const initialRef =
|
|
2072
|
-
|
|
2204
|
+
const [size, setSize] = React7.useState({ width: 0, height: 0 });
|
|
2205
|
+
const settleTimer = React7.useRef(0);
|
|
2206
|
+
const committedSize = React7.useRef({ width: 0, height: 0 });
|
|
2207
|
+
const initialRef = React7.useRef(true);
|
|
2208
|
+
React7.useEffect(() => {
|
|
2073
2209
|
const el = ref.current;
|
|
2074
2210
|
if (!el) return;
|
|
2075
2211
|
const observer = new ResizeObserver((entries) => {
|
|
@@ -2111,10 +2247,10 @@ var useChartSize = (ref) => {
|
|
|
2111
2247
|
};
|
|
2112
2248
|
var prefersReducedMotion = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2113
2249
|
var useChartAnimation = (containerRef, dataKey) => {
|
|
2114
|
-
const [animate, setAnimate] =
|
|
2115
|
-
const prevDataKey =
|
|
2116
|
-
const hasAnimated =
|
|
2117
|
-
|
|
2250
|
+
const [animate, setAnimate] = React7.useState(false);
|
|
2251
|
+
const prevDataKey = React7.useRef(dataKey);
|
|
2252
|
+
const hasAnimated = React7.useRef(false);
|
|
2253
|
+
React7.useEffect(() => {
|
|
2118
2254
|
if (prefersReducedMotion()) return;
|
|
2119
2255
|
const el = containerRef.current;
|
|
2120
2256
|
if (!el) return;
|
|
@@ -2130,7 +2266,7 @@ var useChartAnimation = (containerRef, dataKey) => {
|
|
|
2130
2266
|
observer.observe(el);
|
|
2131
2267
|
return () => observer.disconnect();
|
|
2132
2268
|
}, [containerRef]);
|
|
2133
|
-
|
|
2269
|
+
React7.useEffect(() => {
|
|
2134
2270
|
if (dataKey !== prevDataKey.current) {
|
|
2135
2271
|
prevDataKey.current = dataKey;
|
|
2136
2272
|
if (prefersReducedMotion()) return;
|
|
@@ -2141,15 +2277,15 @@ var useChartAnimation = (containerRef, dataKey) => {
|
|
|
2141
2277
|
return animate || prefersReducedMotion();
|
|
2142
2278
|
};
|
|
2143
2279
|
var useChartTooltip = (enabled) => {
|
|
2144
|
-
const [tooltip, setTooltip] =
|
|
2280
|
+
const [tooltip, setTooltip] = React7.useState({
|
|
2145
2281
|
visible: false,
|
|
2146
2282
|
x: 0,
|
|
2147
2283
|
y: 0,
|
|
2148
2284
|
content: ""
|
|
2149
2285
|
});
|
|
2150
|
-
const containerRef =
|
|
2151
|
-
const rafRef =
|
|
2152
|
-
const move =
|
|
2286
|
+
const containerRef = React7.useRef(null);
|
|
2287
|
+
const rafRef = React7.useRef(0);
|
|
2288
|
+
const move = React7.useCallback((e) => {
|
|
2153
2289
|
if (!enabled) return;
|
|
2154
2290
|
const clientX = e.clientX;
|
|
2155
2291
|
const clientY = e.clientY;
|
|
@@ -2164,7 +2300,7 @@ var useChartTooltip = (enabled) => {
|
|
|
2164
2300
|
}));
|
|
2165
2301
|
});
|
|
2166
2302
|
}, [enabled]);
|
|
2167
|
-
const show =
|
|
2303
|
+
const show = React7.useCallback((e, content) => {
|
|
2168
2304
|
if (!enabled) return;
|
|
2169
2305
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
2170
2306
|
if (!rect) return;
|
|
@@ -2175,18 +2311,18 @@ var useChartTooltip = (enabled) => {
|
|
|
2175
2311
|
content
|
|
2176
2312
|
});
|
|
2177
2313
|
}, [enabled]);
|
|
2178
|
-
const hide =
|
|
2314
|
+
const hide = React7.useCallback(() => {
|
|
2179
2315
|
cancelAnimationFrame(rafRef.current);
|
|
2180
2316
|
setTooltip((prev) => ({ ...prev, visible: false }));
|
|
2181
2317
|
}, []);
|
|
2182
2318
|
return { tooltip, show, hide, move, containerRef };
|
|
2183
2319
|
};
|
|
2184
|
-
var GridLines =
|
|
2320
|
+
var GridLines = React7.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ jsx307(Fragment2, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
2185
2321
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
2186
2322
|
const val = Math.round(maxVal * ratio);
|
|
2187
|
-
return /* @__PURE__ */
|
|
2188
|
-
/* @__PURE__ */
|
|
2189
|
-
/* @__PURE__ */
|
|
2323
|
+
return /* @__PURE__ */ jsxs197("g", { children: [
|
|
2324
|
+
/* @__PURE__ */ jsx307("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
2325
|
+
/* @__PURE__ */ jsx307("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
2190
2326
|
] }, ratio);
|
|
2191
2327
|
}) }));
|
|
2192
2328
|
GridLines.displayName = "GridLines";
|
|
@@ -2196,25 +2332,25 @@ var getLabelStep = (count, chartW) => {
|
|
|
2196
2332
|
if (count <= maxLabels) return 1;
|
|
2197
2333
|
return Math.ceil(count / maxLabels);
|
|
2198
2334
|
};
|
|
2199
|
-
var AxisLabels =
|
|
2335
|
+
var AxisLabels = React7.memo(({ labels, count, chartW, height }) => {
|
|
2200
2336
|
const step = getLabelStep(count, chartW);
|
|
2201
|
-
return /* @__PURE__ */
|
|
2337
|
+
return /* @__PURE__ */ jsx307(Fragment2, { children: labels.map((label, i) => {
|
|
2202
2338
|
if (i % step !== 0) return null;
|
|
2203
2339
|
const x = PADDING.left + i / (count - 1 || 1) * chartW;
|
|
2204
|
-
return /* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ jsx307("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
2205
2341
|
}) });
|
|
2206
2342
|
});
|
|
2207
2343
|
AxisLabels.displayName = "AxisLabels";
|
|
2208
|
-
var LineChart =
|
|
2209
|
-
const entries =
|
|
2210
|
-
const maxVal =
|
|
2344
|
+
var LineChart = React7.memo(({ data, labels, width, height, animate, onHover, onMove, onLeave }) => {
|
|
2345
|
+
const entries = React7.useMemo(() => Object.entries(data), [data]);
|
|
2346
|
+
const maxVal = React7.useMemo(() => {
|
|
2211
2347
|
const allValues = entries.flatMap(([, v]) => v);
|
|
2212
2348
|
return Math.max(...allValues) * 1.2 || 1;
|
|
2213
2349
|
}, [entries]);
|
|
2214
2350
|
const count = labels.length;
|
|
2215
2351
|
const chartW = width - PADDING.left - PADDING.right;
|
|
2216
2352
|
const chartH = height - PADDING.top - PADDING.bottom;
|
|
2217
|
-
const seriesPoints =
|
|
2353
|
+
const seriesPoints = React7.useMemo(
|
|
2218
2354
|
() => entries.map(
|
|
2219
2355
|
([, values]) => values.map((v, i) => ({
|
|
2220
2356
|
x: PADDING.left + i / (count - 1 || 1) * chartW,
|
|
@@ -2225,8 +2361,8 @@ var LineChart = React5.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2225
2361
|
[entries, count, chartW, chartH, maxVal]
|
|
2226
2362
|
);
|
|
2227
2363
|
const showPoints = count <= 100;
|
|
2228
|
-
const lineRefs =
|
|
2229
|
-
|
|
2364
|
+
const lineRefs = React7.useRef([]);
|
|
2365
|
+
React7.useEffect(() => {
|
|
2230
2366
|
if (!animate) return;
|
|
2231
2367
|
lineRefs.current.forEach((el) => {
|
|
2232
2368
|
if (!el) return;
|
|
@@ -2239,9 +2375,9 @@ var LineChart = React5.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2239
2375
|
});
|
|
2240
2376
|
});
|
|
2241
2377
|
}, [animate, seriesPoints]);
|
|
2242
|
-
return /* @__PURE__ */
|
|
2243
|
-
/* @__PURE__ */
|
|
2244
|
-
/* @__PURE__ */
|
|
2378
|
+
return /* @__PURE__ */ jsxs197("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
2379
|
+
/* @__PURE__ */ jsx307(GridLines, { width, height, chartH, maxVal }),
|
|
2380
|
+
/* @__PURE__ */ jsx307(AxisLabels, { labels, count, chartW, height }),
|
|
2245
2381
|
entries.map(([key], di) => {
|
|
2246
2382
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
2247
2383
|
const color = palette[2];
|
|
@@ -2250,12 +2386,12 @@ var LineChart = React5.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2250
2386
|
const gradientId = `line-gradient-${di}`;
|
|
2251
2387
|
const polyPoints = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
2252
2388
|
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`;
|
|
2253
|
-
return /* @__PURE__ */
|
|
2254
|
-
/* @__PURE__ */
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
/* @__PURE__ */
|
|
2389
|
+
return /* @__PURE__ */ jsxs197("g", { children: [
|
|
2390
|
+
/* @__PURE__ */ jsx307("defs", { children: /* @__PURE__ */ jsxs197("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2391
|
+
/* @__PURE__ */ jsx307("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
|
|
2392
|
+
/* @__PURE__ */ jsx307("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
|
|
2257
2393
|
] }) }),
|
|
2258
|
-
/* @__PURE__ */
|
|
2394
|
+
/* @__PURE__ */ jsx307(
|
|
2259
2395
|
"path",
|
|
2260
2396
|
{
|
|
2261
2397
|
d: areaD,
|
|
@@ -2264,7 +2400,7 @@ var LineChart = React5.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2264
2400
|
style: animate ? { animationDelay: "600ms" } : { opacity: 1 }
|
|
2265
2401
|
}
|
|
2266
2402
|
),
|
|
2267
|
-
/* @__PURE__ */
|
|
2403
|
+
/* @__PURE__ */ jsx307(
|
|
2268
2404
|
"polyline",
|
|
2269
2405
|
{
|
|
2270
2406
|
ref: (el) => {
|
|
@@ -2276,7 +2412,7 @@ var LineChart = React5.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2276
2412
|
strokeWidth: "2"
|
|
2277
2413
|
}
|
|
2278
2414
|
),
|
|
2279
|
-
showPoints && points.map((p, i) => /* @__PURE__ */
|
|
2415
|
+
showPoints && points.map((p, i) => /* @__PURE__ */ jsx307(
|
|
2280
2416
|
"circle",
|
|
2281
2417
|
{
|
|
2282
2418
|
cx: p.x,
|
|
@@ -2295,16 +2431,16 @@ var LineChart = React5.memo(({ data, labels, width, height, animate, onHover, on
|
|
|
2295
2431
|
] });
|
|
2296
2432
|
});
|
|
2297
2433
|
LineChart.displayName = "LineChart";
|
|
2298
|
-
var CurveChart =
|
|
2299
|
-
const entries =
|
|
2300
|
-
const maxVal =
|
|
2434
|
+
var CurveChart = React7.memo(({ data, labels, width, height, animate, onHover, onMove, onLeave }) => {
|
|
2435
|
+
const entries = React7.useMemo(() => Object.entries(data), [data]);
|
|
2436
|
+
const maxVal = React7.useMemo(() => {
|
|
2301
2437
|
const allValues = entries.flatMap(([, v]) => v);
|
|
2302
2438
|
return Math.max(...allValues) * 1.2 || 1;
|
|
2303
2439
|
}, [entries]);
|
|
2304
2440
|
const count = labels.length;
|
|
2305
2441
|
const chartW = width - PADDING.left - PADDING.right;
|
|
2306
2442
|
const chartH = height - PADDING.top - PADDING.bottom;
|
|
2307
|
-
const seriesPoints =
|
|
2443
|
+
const seriesPoints = React7.useMemo(
|
|
2308
2444
|
() => entries.map(
|
|
2309
2445
|
([, values]) => values.map((v, i) => ({
|
|
2310
2446
|
x: PADDING.left + i / (count - 1 || 1) * chartW,
|
|
@@ -2315,8 +2451,8 @@ var CurveChart = React5.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2315
2451
|
[entries, count, chartW, chartH, maxVal]
|
|
2316
2452
|
);
|
|
2317
2453
|
const showPoints = count <= 100;
|
|
2318
|
-
const lineRefs =
|
|
2319
|
-
|
|
2454
|
+
const lineRefs = React7.useRef([]);
|
|
2455
|
+
React7.useEffect(() => {
|
|
2320
2456
|
if (!animate) return;
|
|
2321
2457
|
lineRefs.current.forEach((el) => {
|
|
2322
2458
|
if (!el) return;
|
|
@@ -2329,9 +2465,9 @@ var CurveChart = React5.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2329
2465
|
});
|
|
2330
2466
|
});
|
|
2331
2467
|
}, [animate, seriesPoints]);
|
|
2332
|
-
return /* @__PURE__ */
|
|
2333
|
-
/* @__PURE__ */
|
|
2334
|
-
/* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ jsxs197("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
2469
|
+
/* @__PURE__ */ jsx307(GridLines, { width, height, chartH, maxVal }),
|
|
2470
|
+
/* @__PURE__ */ jsx307(AxisLabels, { labels, count, chartW, height }),
|
|
2335
2471
|
entries.map(([key], di) => {
|
|
2336
2472
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
2337
2473
|
const color = palette[2];
|
|
@@ -2340,12 +2476,12 @@ var CurveChart = React5.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2340
2476
|
const gradientId = `curve-gradient-${di}`;
|
|
2341
2477
|
const linePath = toSmoothPath(points);
|
|
2342
2478
|
const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
|
|
2343
|
-
return /* @__PURE__ */
|
|
2344
|
-
/* @__PURE__ */
|
|
2345
|
-
/* @__PURE__ */
|
|
2346
|
-
/* @__PURE__ */
|
|
2479
|
+
return /* @__PURE__ */ jsxs197("g", { children: [
|
|
2480
|
+
/* @__PURE__ */ jsx307("defs", { children: /* @__PURE__ */ jsxs197("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
2481
|
+
/* @__PURE__ */ jsx307("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
|
|
2482
|
+
/* @__PURE__ */ jsx307("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
|
|
2347
2483
|
] }) }),
|
|
2348
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ jsx307(
|
|
2349
2485
|
"path",
|
|
2350
2486
|
{
|
|
2351
2487
|
d: areaPath,
|
|
@@ -2354,7 +2490,7 @@ var CurveChart = React5.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2354
2490
|
style: animate ? { animationDelay: "600ms" } : { opacity: 1 }
|
|
2355
2491
|
}
|
|
2356
2492
|
),
|
|
2357
|
-
/* @__PURE__ */
|
|
2493
|
+
/* @__PURE__ */ jsx307(
|
|
2358
2494
|
"path",
|
|
2359
2495
|
{
|
|
2360
2496
|
ref: (el) => {
|
|
@@ -2366,7 +2502,7 @@ var CurveChart = React5.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2366
2502
|
strokeWidth: "2"
|
|
2367
2503
|
}
|
|
2368
2504
|
),
|
|
2369
|
-
showPoints && points.map((p, i) => /* @__PURE__ */
|
|
2505
|
+
showPoints && points.map((p, i) => /* @__PURE__ */ jsx307(
|
|
2370
2506
|
"circle",
|
|
2371
2507
|
{
|
|
2372
2508
|
cx: p.x,
|
|
@@ -2385,9 +2521,9 @@ var CurveChart = React5.memo(({ data, labels, width, height, animate, onHover, o
|
|
|
2385
2521
|
] });
|
|
2386
2522
|
});
|
|
2387
2523
|
CurveChart.displayName = "CurveChart";
|
|
2388
|
-
var BarChart =
|
|
2389
|
-
const entries =
|
|
2390
|
-
const maxVal =
|
|
2524
|
+
var BarChart = React7.memo(({ data, labels, width, height, animate, onHover, onMove, onLeave }) => {
|
|
2525
|
+
const entries = React7.useMemo(() => Object.entries(data), [data]);
|
|
2526
|
+
const maxVal = React7.useMemo(() => {
|
|
2391
2527
|
const allValues = entries.flatMap(([, v]) => v);
|
|
2392
2528
|
return Math.max(...allValues) * 1.2 || 1;
|
|
2393
2529
|
}, [entries]);
|
|
@@ -2399,7 +2535,7 @@ var BarChart = React5.memo(({ data, labels, width, height, animate, onHover, onM
|
|
|
2399
2535
|
const barGap = groupCount > 1 ? 2 : 0;
|
|
2400
2536
|
const barW = Math.max(1, Math.min(32, (groupW * 0.7 - barGap * (groupCount - 1)) / groupCount));
|
|
2401
2537
|
const baseline = PADDING.top + chartH;
|
|
2402
|
-
const bars =
|
|
2538
|
+
const bars = React7.useMemo(
|
|
2403
2539
|
() => entries.map(
|
|
2404
2540
|
([, values], di) => values.map((v, i) => {
|
|
2405
2541
|
const totalBarsW = barW * groupCount + barGap * (groupCount - 1);
|
|
@@ -2412,11 +2548,11 @@ var BarChart = React5.memo(({ data, labels, width, height, animate, onHover, onM
|
|
|
2412
2548
|
[entries, maxVal, chartH, groupW, barW, barGap, groupCount]
|
|
2413
2549
|
);
|
|
2414
2550
|
const barLabelStep = getLabelStep(count, chartW);
|
|
2415
|
-
return /* @__PURE__ */
|
|
2416
|
-
/* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ jsxs197("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
2552
|
+
/* @__PURE__ */ jsx307(GridLines, { width, height, chartH, maxVal }),
|
|
2417
2553
|
labels.map((label, i) => {
|
|
2418
2554
|
if (i % barLabelStep !== 0) return null;
|
|
2419
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ jsx307("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
2420
2556
|
}),
|
|
2421
2557
|
entries.map(([key], di) => {
|
|
2422
2558
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
@@ -2425,7 +2561,7 @@ var BarChart = React5.memo(({ data, labels, width, height, animate, onHover, onM
|
|
|
2425
2561
|
const r2 = Math.min(4, b.w / 2);
|
|
2426
2562
|
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`;
|
|
2427
2563
|
const delay = 100 + i * 80;
|
|
2428
|
-
return /* @__PURE__ */
|
|
2564
|
+
return /* @__PURE__ */ jsx307(
|
|
2429
2565
|
"path",
|
|
2430
2566
|
{
|
|
2431
2567
|
d,
|
|
@@ -2446,11 +2582,11 @@ var BarChart = React5.memo(({ data, labels, width, height, animate, onHover, onM
|
|
|
2446
2582
|
] });
|
|
2447
2583
|
});
|
|
2448
2584
|
BarChart.displayName = "BarChart";
|
|
2449
|
-
var PieDonutChart =
|
|
2585
|
+
var PieDonutChart = React7.memo(
|
|
2450
2586
|
({ data, labels, width, height, animate, isDoughnut, onHover, onMove, onLeave }) => {
|
|
2451
|
-
const entries =
|
|
2452
|
-
const values =
|
|
2453
|
-
const total =
|
|
2587
|
+
const entries = React7.useMemo(() => Object.entries(data), [data]);
|
|
2588
|
+
const values = React7.useMemo(() => entries.flatMap(([, v]) => v), [entries]);
|
|
2589
|
+
const total = React7.useMemo(() => values.reduce((a, b) => a + b, 0) || 1, [values]);
|
|
2454
2590
|
const size = Math.min(width, height);
|
|
2455
2591
|
const cx = size / 2;
|
|
2456
2592
|
const cy = size / 2;
|
|
@@ -2458,8 +2594,22 @@ var PieDonutChart = React5.memo(
|
|
|
2458
2594
|
const innerR = isDoughnut ? r2 * 0.5 : 0;
|
|
2459
2595
|
const firstKey = entries[0]?.[0] ?? "";
|
|
2460
2596
|
const colorOffset = hashString(firstKey);
|
|
2461
|
-
const
|
|
2597
|
+
const maskRef = React7.useRef(null);
|
|
2598
|
+
const maskR = r2 + 10;
|
|
2599
|
+
const maskCircumference = 2 * Math.PI * maskR;
|
|
2600
|
+
React7.useEffect(() => {
|
|
2601
|
+
if (!animate || !maskRef.current) return;
|
|
2602
|
+
const el = maskRef.current;
|
|
2603
|
+
el.style.strokeDasharray = `${maskCircumference}`;
|
|
2604
|
+
el.style.strokeDashoffset = `${maskCircumference}`;
|
|
2605
|
+
requestAnimationFrame(() => {
|
|
2606
|
+
el.style.transition = "stroke-dashoffset 1000ms ease-out";
|
|
2607
|
+
el.style.strokeDashoffset = "0";
|
|
2608
|
+
});
|
|
2609
|
+
}, [animate, maskCircumference]);
|
|
2610
|
+
const sliceData = React7.useMemo(() => {
|
|
2462
2611
|
let angle0 = -Math.PI / 2;
|
|
2612
|
+
let cumulativeAngle = 0;
|
|
2463
2613
|
return values.map((v, i) => {
|
|
2464
2614
|
const angle = v / total * Math.PI * 2;
|
|
2465
2615
|
const endAngle = angle0 + angle;
|
|
@@ -2483,45 +2633,60 @@ var PieDonutChart = React5.memo(
|
|
|
2483
2633
|
const lx = cx + labelR * Math.cos(midAngle);
|
|
2484
2634
|
const ly = cy + labelR * Math.sin(midAngle);
|
|
2485
2635
|
const pct = Math.round(v / total * 100);
|
|
2636
|
+
cumulativeAngle += angle;
|
|
2637
|
+
const sliceEndRatio = cumulativeAngle / (Math.PI * 2);
|
|
2638
|
+
const labelDelay = 1e3 * sliceEndRatio + 150;
|
|
2486
2639
|
angle0 = endAngle;
|
|
2487
|
-
return { d, lx, ly, v, pct, angle, label: labels[i] || `${i + 1}
|
|
2640
|
+
return { d, lx, ly, v, pct, angle, label: labels[i] || `${i + 1}`, labelDelay };
|
|
2488
2641
|
});
|
|
2489
2642
|
}, [values, total, cx, cy, r2, innerR, labels]);
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2643
|
+
const maskId = `pie-mask-${isDoughnut ? "d" : "p"}`;
|
|
2644
|
+
return /* @__PURE__ */ jsxs197("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
|
|
2645
|
+
animate && /* @__PURE__ */ jsx307("defs", { children: /* @__PURE__ */ jsx307("mask", { id: maskId, children: /* @__PURE__ */ jsx307(
|
|
2646
|
+
"circle",
|
|
2647
|
+
{
|
|
2648
|
+
ref: maskRef,
|
|
2649
|
+
cx,
|
|
2650
|
+
cy,
|
|
2651
|
+
r: maskR,
|
|
2652
|
+
fill: "none",
|
|
2653
|
+
stroke: "white",
|
|
2654
|
+
strokeWidth: maskR * 2,
|
|
2655
|
+
transform: `rotate(-90 ${cx} ${cy})`
|
|
2656
|
+
}
|
|
2657
|
+
) }) }),
|
|
2658
|
+
/* @__PURE__ */ jsx307("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ jsx307("g", { children: /* @__PURE__ */ jsx307(
|
|
2659
|
+
"path",
|
|
2660
|
+
{
|
|
2661
|
+
d: s.d,
|
|
2662
|
+
fill: PIE_COLORS[(i + colorOffset) % PIE_COLORS.length],
|
|
2663
|
+
className: "chart-slice",
|
|
2664
|
+
onMouseEnter: (e) => onHover(e, `${s.label}: ${s.v} (${s.pct}%)`),
|
|
2665
|
+
onMouseMove: onMove,
|
|
2666
|
+
onMouseLeave: onLeave
|
|
2667
|
+
}
|
|
2668
|
+
) }, i)) }),
|
|
2669
|
+
sliceData.map((s, i) => s.angle > 0.2 && /* @__PURE__ */ jsx307(
|
|
2670
|
+
"text",
|
|
2671
|
+
{
|
|
2672
|
+
x: s.lx,
|
|
2673
|
+
y: s.ly,
|
|
2674
|
+
className: `chart-pie-label ${animate ? "chart-pie-label-animate" : ""}`,
|
|
2675
|
+
style: animate ? { animationDelay: `${s.labelDelay}ms` } : void 0,
|
|
2676
|
+
textAnchor: "middle",
|
|
2677
|
+
dominantBaseline: "central",
|
|
2678
|
+
children: s.v
|
|
2679
|
+
},
|
|
2680
|
+
`label-${i}`
|
|
2681
|
+
))
|
|
2682
|
+
] });
|
|
2518
2683
|
}
|
|
2519
2684
|
);
|
|
2520
2685
|
PieDonutChart.displayName = "PieDonutChart";
|
|
2521
2686
|
var TooltipBubble = ({ x, y, containerWidth, children }) => {
|
|
2522
|
-
const ref =
|
|
2523
|
-
const [adjustedX, setAdjustedX] =
|
|
2524
|
-
|
|
2687
|
+
const ref = React7.useRef(null);
|
|
2688
|
+
const [adjustedX, setAdjustedX] = React7.useState(x);
|
|
2689
|
+
React7.useEffect(() => {
|
|
2525
2690
|
const el = ref.current;
|
|
2526
2691
|
if (!el) return;
|
|
2527
2692
|
const w = el.offsetWidth;
|
|
@@ -2532,7 +2697,7 @@ var TooltipBubble = ({ x, y, containerWidth, children }) => {
|
|
|
2532
2697
|
else if (x + half > containerWidth - margin) nx = containerWidth - half - margin;
|
|
2533
2698
|
setAdjustedX(nx);
|
|
2534
2699
|
}, [x, containerWidth]);
|
|
2535
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ jsx307(
|
|
2536
2701
|
"div",
|
|
2537
2702
|
{
|
|
2538
2703
|
ref,
|
|
@@ -2542,22 +2707,22 @@ var TooltipBubble = ({ x, y, containerWidth, children }) => {
|
|
|
2542
2707
|
}
|
|
2543
2708
|
);
|
|
2544
2709
|
};
|
|
2545
|
-
var Chart =
|
|
2710
|
+
var Chart = React7.memo((props) => {
|
|
2546
2711
|
const { type, data, labels, tooltip: showTooltip = true } = props;
|
|
2547
2712
|
const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
|
|
2548
2713
|
const { width, height } = useChartSize(containerRef);
|
|
2549
|
-
const stableData =
|
|
2550
|
-
const stableLabels =
|
|
2551
|
-
const dataKey =
|
|
2714
|
+
const stableData = React7.useMemo(() => data, [JSON.stringify(data)]);
|
|
2715
|
+
const stableLabels = React7.useMemo(() => labels, [JSON.stringify(labels)]);
|
|
2716
|
+
const dataKey = React7.useMemo(() => JSON.stringify(labels), [labels]);
|
|
2552
2717
|
const animate = useChartAnimation(containerRef, dataKey);
|
|
2553
2718
|
const ready = width > 0 && height > 0;
|
|
2554
|
-
return /* @__PURE__ */
|
|
2555
|
-
ready && type === "line" && /* @__PURE__ */
|
|
2556
|
-
ready && type === "curve" && /* @__PURE__ */
|
|
2557
|
-
ready && type === "bar" && /* @__PURE__ */
|
|
2558
|
-
ready && type === "pie" && /* @__PURE__ */
|
|
2559
|
-
ready && type === "doughnut" && /* @__PURE__ */
|
|
2560
|
-
tooltip.visible && /* @__PURE__ */
|
|
2719
|
+
return /* @__PURE__ */ jsxs197("div", { className: "lib-xplat-chart", ref: containerRef, children: [
|
|
2720
|
+
ready && type === "line" && /* @__PURE__ */ jsx307(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2721
|
+
ready && type === "curve" && /* @__PURE__ */ jsx307(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2722
|
+
ready && type === "bar" && /* @__PURE__ */ jsx307(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2723
|
+
ready && type === "pie" && /* @__PURE__ */ jsx307(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
2724
|
+
ready && type === "doughnut" && /* @__PURE__ */ jsx307(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
|
|
2725
|
+
tooltip.visible && /* @__PURE__ */ jsx307(TooltipBubble, { x: tooltip.x, y: tooltip.y, containerWidth: width, children: tooltip.content })
|
|
2561
2726
|
] });
|
|
2562
2727
|
});
|
|
2563
2728
|
Chart.displayName = "Chart";
|
|
@@ -2570,7 +2735,7 @@ import { primitive, semantic } from "@x-plat/tokens-core";
|
|
|
2570
2735
|
import { cssVar } from "@x-plat/tokens-core";
|
|
2571
2736
|
|
|
2572
2737
|
// src/components/CheckBox/CheckBox.tsx
|
|
2573
|
-
import { jsx as
|
|
2738
|
+
import { jsx as jsx308, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
2574
2739
|
var CheckBox = (props) => {
|
|
2575
2740
|
const {
|
|
2576
2741
|
checked,
|
|
@@ -2588,8 +2753,8 @@ var CheckBox = (props) => {
|
|
|
2588
2753
|
const checkedClasses = `checked`;
|
|
2589
2754
|
const disabledClasses = "disabled";
|
|
2590
2755
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
2591
|
-
return /* @__PURE__ */
|
|
2592
|
-
/* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsxs198("label", { className: clsx_default("lib-xplat-checkbox", size, type), children: [
|
|
2757
|
+
/* @__PURE__ */ jsx308(
|
|
2593
2758
|
"input",
|
|
2594
2759
|
{
|
|
2595
2760
|
type: "checkbox",
|
|
@@ -2599,44 +2764,44 @@ var CheckBox = (props) => {
|
|
|
2599
2764
|
...rest
|
|
2600
2765
|
}
|
|
2601
2766
|
),
|
|
2602
|
-
/* @__PURE__ */
|
|
2603
|
-
label && /* @__PURE__ */
|
|
2767
|
+
/* @__PURE__ */ jsx308("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ jsx308("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ jsx308(CheckIcon_default, {}) }) }),
|
|
2768
|
+
label && /* @__PURE__ */ jsx308("span", { className: "label", children: label })
|
|
2604
2769
|
] });
|
|
2605
2770
|
};
|
|
2606
2771
|
CheckBox.displayName = "CheckBox";
|
|
2607
2772
|
var CheckBox_default = CheckBox;
|
|
2608
2773
|
|
|
2609
2774
|
// src/components/Chip/Chip.tsx
|
|
2610
|
-
import { jsx as
|
|
2775
|
+
import { jsx as jsx309 } from "react/jsx-runtime";
|
|
2611
2776
|
var Chip = (props) => {
|
|
2612
2777
|
const {
|
|
2613
2778
|
children,
|
|
2614
2779
|
type = "primary",
|
|
2615
2780
|
size = "md"
|
|
2616
2781
|
} = props;
|
|
2617
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ jsx309("div", { className: clsx_default("lib-xplat-chip", type, size), children });
|
|
2618
2783
|
};
|
|
2619
2784
|
Chip.displayName = "Chip";
|
|
2620
2785
|
var Chip_default = Chip;
|
|
2621
2786
|
|
|
2622
2787
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
2623
|
-
import
|
|
2788
|
+
import React13 from "react";
|
|
2624
2789
|
|
|
2625
2790
|
// src/components/Input/Input.tsx
|
|
2626
|
-
import
|
|
2791
|
+
import React8 from "react";
|
|
2627
2792
|
|
|
2628
2793
|
// src/components/Input/InputValidations.tsx
|
|
2629
|
-
import { jsx as
|
|
2794
|
+
import { jsx as jsx310, jsxs as jsxs199 } from "react/jsx-runtime";
|
|
2630
2795
|
var InputValidations = (props) => {
|
|
2631
2796
|
const { message, status = "default" } = props;
|
|
2632
|
-
return /* @__PURE__ */
|
|
2633
|
-
/* @__PURE__ */
|
|
2634
|
-
status === "default" && /* @__PURE__ */
|
|
2635
|
-
status === "success" && /* @__PURE__ */
|
|
2636
|
-
status === "warning" && /* @__PURE__ */
|
|
2637
|
-
status === "error" && /* @__PURE__ */
|
|
2797
|
+
return /* @__PURE__ */ jsxs199("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
2798
|
+
/* @__PURE__ */ jsxs199("div", { className: "icon", children: [
|
|
2799
|
+
status === "default" && /* @__PURE__ */ jsx310(InfoIcon_default, {}),
|
|
2800
|
+
status === "success" && /* @__PURE__ */ jsx310(SuccessIcon_default, {}),
|
|
2801
|
+
status === "warning" && /* @__PURE__ */ jsx310(InfoIcon_default, {}),
|
|
2802
|
+
status === "error" && /* @__PURE__ */ jsx310(ErrorIcon_default, {})
|
|
2638
2803
|
] }),
|
|
2639
|
-
/* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ jsx310("div", { className: "message", children: message })
|
|
2640
2805
|
] });
|
|
2641
2806
|
};
|
|
2642
2807
|
InputValidations.displayName = "InputValidations";
|
|
@@ -2677,7 +2842,7 @@ var handleTelBackspace = (prevValue, currValue) => {
|
|
|
2677
2842
|
};
|
|
2678
2843
|
|
|
2679
2844
|
// src/components/Input/Input.tsx
|
|
2680
|
-
import { jsx as
|
|
2845
|
+
import { jsx as jsx311, jsxs as jsxs200 } from "react/jsx-runtime";
|
|
2681
2846
|
import { createElement } from "react";
|
|
2682
2847
|
var formatValue = (type, value) => {
|
|
2683
2848
|
if (value === null || value === void 0) return "";
|
|
@@ -2726,7 +2891,7 @@ var parseValue = (type, value) => {
|
|
|
2726
2891
|
return value;
|
|
2727
2892
|
}
|
|
2728
2893
|
};
|
|
2729
|
-
var Input =
|
|
2894
|
+
var Input = React8.forwardRef((props, ref) => {
|
|
2730
2895
|
const {
|
|
2731
2896
|
value,
|
|
2732
2897
|
onChange,
|
|
@@ -2752,13 +2917,13 @@ var Input = React6.forwardRef((props, ref) => {
|
|
|
2752
2917
|
onChange(event);
|
|
2753
2918
|
}
|
|
2754
2919
|
};
|
|
2755
|
-
return /* @__PURE__ */
|
|
2756
|
-
/* @__PURE__ */
|
|
2920
|
+
return /* @__PURE__ */ jsxs200("div", { className: "lib-xplat-input-wrap", children: [
|
|
2921
|
+
/* @__PURE__ */ jsxs200(
|
|
2757
2922
|
"div",
|
|
2758
2923
|
{
|
|
2759
2924
|
className: clsx_default("lib-xplat-input", size, disabled ? "disabled" : void 0),
|
|
2760
2925
|
children: [
|
|
2761
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ jsx311(
|
|
2762
2927
|
"input",
|
|
2763
2928
|
{
|
|
2764
2929
|
...inputProps,
|
|
@@ -2769,11 +2934,11 @@ var Input = React6.forwardRef((props, ref) => {
|
|
|
2769
2934
|
onChange: handleChange
|
|
2770
2935
|
}
|
|
2771
2936
|
),
|
|
2772
|
-
suffix && /* @__PURE__ */
|
|
2937
|
+
suffix && /* @__PURE__ */ jsx311("div", { className: "suffix", children: suffix })
|
|
2773
2938
|
]
|
|
2774
2939
|
}
|
|
2775
2940
|
),
|
|
2776
|
-
validations && /* @__PURE__ */
|
|
2941
|
+
validations && /* @__PURE__ */ jsx311("div", { className: "lib-xplat-input-validation-wrap", children: validations?.map((validation, idx) => /* @__PURE__ */ createElement(
|
|
2777
2942
|
InputValidations_default,
|
|
2778
2943
|
{
|
|
2779
2944
|
...validation,
|
|
@@ -2786,20 +2951,20 @@ Input.displayName = "Input";
|
|
|
2786
2951
|
var Input_default = Input;
|
|
2787
2952
|
|
|
2788
2953
|
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
2789
|
-
import
|
|
2790
|
-
import { jsx as
|
|
2791
|
-
var PasswordInput =
|
|
2954
|
+
import React9 from "react";
|
|
2955
|
+
import { jsx as jsx312 } from "react/jsx-runtime";
|
|
2956
|
+
var PasswordInput = React9.forwardRef(
|
|
2792
2957
|
(props, ref) => {
|
|
2793
2958
|
const { reg: _reg, ...inputProps } = props;
|
|
2794
|
-
const [isView, setIsView] =
|
|
2959
|
+
const [isView, setIsView] = React9.useState(false);
|
|
2795
2960
|
const handleChangeView = () => {
|
|
2796
2961
|
setIsView((prev) => !prev);
|
|
2797
2962
|
};
|
|
2798
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ jsx312(
|
|
2799
2964
|
Input_default,
|
|
2800
2965
|
{
|
|
2801
2966
|
...inputProps,
|
|
2802
|
-
suffix: /* @__PURE__ */
|
|
2967
|
+
suffix: /* @__PURE__ */ jsx312("div", { className: "wrapper pointer", onClick: handleChangeView, children: isView ? /* @__PURE__ */ jsx312(OpenEyeIcon_default, {}) : /* @__PURE__ */ jsx312(CloseEyeIcon_default, {}) }),
|
|
2803
2968
|
type: isView ? "text" : "password",
|
|
2804
2969
|
ref
|
|
2805
2970
|
}
|
|
@@ -2810,17 +2975,17 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
2810
2975
|
var PasswordInput_default = PasswordInput;
|
|
2811
2976
|
|
|
2812
2977
|
// src/components/Modal/Modal.tsx
|
|
2813
|
-
import
|
|
2978
|
+
import React11 from "react";
|
|
2814
2979
|
import { createPortal } from "react-dom";
|
|
2815
2980
|
|
|
2816
2981
|
// src/tokens/hooks/Portal.tsx
|
|
2817
|
-
import
|
|
2982
|
+
import React10 from "react";
|
|
2818
2983
|
import ReactDOM from "react-dom";
|
|
2819
|
-
import { jsx as
|
|
2820
|
-
var PortalContainerContext =
|
|
2821
|
-
var PortalProvider = ({ container, children }) => /* @__PURE__ */
|
|
2984
|
+
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
2985
|
+
var PortalContainerContext = React10.createContext(null);
|
|
2986
|
+
var PortalProvider = ({ container, children }) => /* @__PURE__ */ jsx313(PortalContainerContext.Provider, { value: container, children });
|
|
2822
2987
|
var Portal = ({ children }) => {
|
|
2823
|
-
const contextContainer =
|
|
2988
|
+
const contextContainer = React10.useContext(PortalContainerContext);
|
|
2824
2989
|
if (typeof document === "undefined") return null;
|
|
2825
2990
|
const container = contextContainer ?? document.body;
|
|
2826
2991
|
return ReactDOM.createPortal(children, container);
|
|
@@ -2829,14 +2994,14 @@ Portal.displayName = "Portal";
|
|
|
2829
2994
|
var Portal_default = Portal;
|
|
2830
2995
|
|
|
2831
2996
|
// src/components/Modal/Modal.tsx
|
|
2832
|
-
import { jsx as
|
|
2997
|
+
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
2833
2998
|
var ANIMATION_DURATION_MS = 200;
|
|
2834
2999
|
var Modal = (props) => {
|
|
2835
3000
|
const { isOpen, onClose, children } = props;
|
|
2836
|
-
const [mounted, setMounted] =
|
|
2837
|
-
const [visible, setVisible] =
|
|
2838
|
-
const boxRef =
|
|
2839
|
-
|
|
3001
|
+
const [mounted, setMounted] = React11.useState(false);
|
|
3002
|
+
const [visible, setVisible] = React11.useState(false);
|
|
3003
|
+
const boxRef = React11.useRef(null);
|
|
3004
|
+
React11.useEffect(() => {
|
|
2840
3005
|
if (isOpen) {
|
|
2841
3006
|
setMounted(true);
|
|
2842
3007
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -2850,12 +3015,12 @@ var Modal = (props) => {
|
|
|
2850
3015
|
if (!mounted) return null;
|
|
2851
3016
|
const stateClass = visible ? "enter" : "exit";
|
|
2852
3017
|
return createPortal(
|
|
2853
|
-
/* @__PURE__ */
|
|
3018
|
+
/* @__PURE__ */ jsx314(
|
|
2854
3019
|
"div",
|
|
2855
3020
|
{
|
|
2856
3021
|
className: clsx_default("lib-xplat-modal", "dim", stateClass),
|
|
2857
3022
|
onClick: onClose,
|
|
2858
|
-
children: /* @__PURE__ */
|
|
3023
|
+
children: /* @__PURE__ */ jsx314(
|
|
2859
3024
|
"div",
|
|
2860
3025
|
{
|
|
2861
3026
|
ref: boxRef,
|
|
@@ -2863,7 +3028,7 @@ var Modal = (props) => {
|
|
|
2863
3028
|
role: "dialog",
|
|
2864
3029
|
"aria-modal": "true",
|
|
2865
3030
|
onClick: (e) => e.stopPropagation(),
|
|
2866
|
-
children: /* @__PURE__ */
|
|
3031
|
+
children: /* @__PURE__ */ jsx314(PortalProvider, { container: boxRef.current, children })
|
|
2867
3032
|
}
|
|
2868
3033
|
)
|
|
2869
3034
|
}
|
|
@@ -2875,9 +3040,9 @@ Modal.displayName = "Modal";
|
|
|
2875
3040
|
var Modal_default = Modal;
|
|
2876
3041
|
|
|
2877
3042
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
2878
|
-
import
|
|
2879
|
-
import { Fragment as Fragment3, jsx as
|
|
2880
|
-
var DayCell2 =
|
|
3043
|
+
import React12 from "react";
|
|
3044
|
+
import { Fragment as Fragment3, jsx as jsx315, jsxs as jsxs201 } from "react/jsx-runtime";
|
|
3045
|
+
var DayCell2 = React12.memo(
|
|
2881
3046
|
({
|
|
2882
3047
|
day,
|
|
2883
3048
|
disabled,
|
|
@@ -2887,7 +3052,7 @@ var DayCell2 = React10.memo(
|
|
|
2887
3052
|
isEnd,
|
|
2888
3053
|
inRange,
|
|
2889
3054
|
onSelect
|
|
2890
|
-
}) => /* @__PURE__ */
|
|
3055
|
+
}) => /* @__PURE__ */ jsx315(
|
|
2891
3056
|
"button",
|
|
2892
3057
|
{
|
|
2893
3058
|
type: "button",
|
|
@@ -2929,26 +3094,26 @@ var SingleDatePicker = (props) => {
|
|
|
2929
3094
|
initialYear,
|
|
2930
3095
|
initialMonth
|
|
2931
3096
|
);
|
|
2932
|
-
const [pickerMode, setPickerMode] =
|
|
2933
|
-
const [yearRangeStart, setYearRangeStart] =
|
|
3097
|
+
const [pickerMode, setPickerMode] = React12.useState("days");
|
|
3098
|
+
const [yearRangeStart, setYearRangeStart] = React12.useState(
|
|
2934
3099
|
Math.floor((initialYear ?? (/* @__PURE__ */ new Date()).getFullYear()) / 12) * 12
|
|
2935
3100
|
);
|
|
2936
|
-
const minTime =
|
|
3101
|
+
const minTime = React12.useMemo(
|
|
2937
3102
|
() => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
|
|
2938
3103
|
[minDate]
|
|
2939
3104
|
);
|
|
2940
|
-
const maxTime =
|
|
3105
|
+
const maxTime = React12.useMemo(
|
|
2941
3106
|
() => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
|
|
2942
3107
|
[maxDate]
|
|
2943
3108
|
);
|
|
2944
|
-
const highlightSet =
|
|
3109
|
+
const highlightSet = React12.useMemo(() => {
|
|
2945
3110
|
const set = /* @__PURE__ */ new Set();
|
|
2946
3111
|
for (const h of highlightDates) {
|
|
2947
3112
|
set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
|
|
2948
3113
|
}
|
|
2949
3114
|
return set;
|
|
2950
3115
|
}, [highlightDates]);
|
|
2951
|
-
const handleSelect =
|
|
3116
|
+
const handleSelect = React12.useCallback(
|
|
2952
3117
|
(date) => {
|
|
2953
3118
|
onChange?.(date);
|
|
2954
3119
|
},
|
|
@@ -2985,20 +3150,20 @@ var SingleDatePicker = (props) => {
|
|
|
2985
3150
|
const monthLabels = MONTH_LABELS[locale];
|
|
2986
3151
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
2987
3152
|
const hasRange = rangeStart != null && rangeEnd != null;
|
|
2988
|
-
return /* @__PURE__ */
|
|
3153
|
+
return /* @__PURE__ */ jsxs201(
|
|
2989
3154
|
"div",
|
|
2990
3155
|
{
|
|
2991
3156
|
className: clsx_default("lib-xplat-datepicker", "single"),
|
|
2992
3157
|
children: [
|
|
2993
|
-
/* @__PURE__ */
|
|
2994
|
-
/* @__PURE__ */
|
|
2995
|
-
/* @__PURE__ */
|
|
2996
|
-
/* @__PURE__ */
|
|
3158
|
+
/* @__PURE__ */ jsxs201("div", { className: "datepicker-header", children: [
|
|
3159
|
+
/* @__PURE__ */ jsx315("button", { className: "datepicker-nav", onClick: handlePrev, type: "button", children: /* @__PURE__ */ jsx315(ChevronLeftIcon_default, {}) }),
|
|
3160
|
+
/* @__PURE__ */ jsx315("button", { className: "datepicker-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
3161
|
+
/* @__PURE__ */ jsx315("button", { className: "datepicker-nav", onClick: handleNext, type: "button", children: /* @__PURE__ */ jsx315(ChevronRightIcon_default, {}) })
|
|
2997
3162
|
] }),
|
|
2998
|
-
/* @__PURE__ */
|
|
2999
|
-
pickerMode === "years" && /* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ jsxs201("div", { className: "datepicker-body", children: [
|
|
3164
|
+
pickerMode === "years" && /* @__PURE__ */ jsx315("div", { className: "datepicker-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
3000
3165
|
const y = yearRangeStart + i;
|
|
3001
|
-
return /* @__PURE__ */
|
|
3166
|
+
return /* @__PURE__ */ jsx315(
|
|
3002
3167
|
"button",
|
|
3003
3168
|
{
|
|
3004
3169
|
type: "button",
|
|
@@ -3009,7 +3174,7 @@ var SingleDatePicker = (props) => {
|
|
|
3009
3174
|
y
|
|
3010
3175
|
);
|
|
3011
3176
|
}) }),
|
|
3012
|
-
pickerMode === "months" && /* @__PURE__ */
|
|
3177
|
+
pickerMode === "months" && /* @__PURE__ */ jsx315("div", { className: "datepicker-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ jsx315(
|
|
3013
3178
|
"button",
|
|
3014
3179
|
{
|
|
3015
3180
|
type: "button",
|
|
@@ -3019,8 +3184,8 @@ var SingleDatePicker = (props) => {
|
|
|
3019
3184
|
},
|
|
3020
3185
|
i
|
|
3021
3186
|
)) }),
|
|
3022
|
-
pickerMode === "days" && /* @__PURE__ */
|
|
3023
|
-
/* @__PURE__ */
|
|
3187
|
+
pickerMode === "days" && /* @__PURE__ */ jsxs201(Fragment3, { children: [
|
|
3188
|
+
/* @__PURE__ */ jsx315("div", { className: "datepicker-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ jsx315(
|
|
3024
3189
|
"div",
|
|
3025
3190
|
{
|
|
3026
3191
|
className: clsx_default(
|
|
@@ -3032,7 +3197,7 @@ var SingleDatePicker = (props) => {
|
|
|
3032
3197
|
},
|
|
3033
3198
|
label
|
|
3034
3199
|
)) }),
|
|
3035
|
-
/* @__PURE__ */
|
|
3200
|
+
/* @__PURE__ */ jsx315("div", { className: "datepicker-grid", children: days.map((day, idx) => {
|
|
3036
3201
|
const t = day.date.getTime();
|
|
3037
3202
|
const disabled = t < minTime || t > maxTime;
|
|
3038
3203
|
const selected = value ? isSameDay(day.date, value) : false;
|
|
@@ -3042,7 +3207,7 @@ var SingleDatePicker = (props) => {
|
|
|
3042
3207
|
const isStart = hasRange ? isSameDay(day.date, rangeStart) : false;
|
|
3043
3208
|
const isEnd = hasRange ? isSameDay(day.date, rangeEnd) : false;
|
|
3044
3209
|
const inRangeVal = hasRange ? isInRange(day.date, rangeStart, rangeEnd) : false;
|
|
3045
|
-
return /* @__PURE__ */
|
|
3210
|
+
return /* @__PURE__ */ jsx315(
|
|
3046
3211
|
DayCell2,
|
|
3047
3212
|
{
|
|
3048
3213
|
day,
|
|
@@ -3067,7 +3232,7 @@ SingleDatePicker.displayName = "SingleDatePicker";
|
|
|
3067
3232
|
var SingleDatePicker_default = SingleDatePicker;
|
|
3068
3233
|
|
|
3069
3234
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
3070
|
-
import { jsx as
|
|
3235
|
+
import { jsx as jsx316, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
3071
3236
|
var formatDate = (date) => {
|
|
3072
3237
|
if (!date || !(date instanceof Date) || isNaN(date.getTime())) return "";
|
|
3073
3238
|
const y = date.getFullYear();
|
|
@@ -3077,8 +3242,8 @@ var formatDate = (date) => {
|
|
|
3077
3242
|
};
|
|
3078
3243
|
var InputDatePicker = (props) => {
|
|
3079
3244
|
const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
|
|
3080
|
-
const [isOpen, setIsOpen] =
|
|
3081
|
-
const [tempDate, setTempDate] =
|
|
3245
|
+
const [isOpen, setIsOpen] = React13.useState(false);
|
|
3246
|
+
const [tempDate, setTempDate] = React13.useState(value ?? /* @__PURE__ */ new Date());
|
|
3082
3247
|
const handleOpen = () => {
|
|
3083
3248
|
if (disabled) return;
|
|
3084
3249
|
setTempDate(value ?? /* @__PURE__ */ new Date());
|
|
@@ -3094,19 +3259,19 @@ var InputDatePicker = (props) => {
|
|
|
3094
3259
|
const handleClose = () => {
|
|
3095
3260
|
setIsOpen(false);
|
|
3096
3261
|
};
|
|
3097
|
-
return /* @__PURE__ */
|
|
3098
|
-
/* @__PURE__ */
|
|
3262
|
+
return /* @__PURE__ */ jsxs202("div", { className: clsx_default("lib-xplat-datepicker input-datepicker", disabled && "disabled"), children: [
|
|
3263
|
+
/* @__PURE__ */ jsx316("div", { className: "input-datepicker-trigger", onClick: handleOpen, children: /* @__PURE__ */ jsx316(
|
|
3099
3264
|
Input_default,
|
|
3100
3265
|
{
|
|
3101
3266
|
value: formatDate(value),
|
|
3102
3267
|
placeholder,
|
|
3103
|
-
suffix: /* @__PURE__ */
|
|
3268
|
+
suffix: /* @__PURE__ */ jsx316(CalenderIcon_default, {}),
|
|
3104
3269
|
disabled,
|
|
3105
3270
|
readOnly: true
|
|
3106
3271
|
}
|
|
3107
3272
|
) }),
|
|
3108
|
-
/* @__PURE__ */
|
|
3109
|
-
/* @__PURE__ */
|
|
3273
|
+
/* @__PURE__ */ jsx316(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs202("div", { className: "lib-xplat-popup-datepicker-card", children: [
|
|
3274
|
+
/* @__PURE__ */ jsx316("div", { className: "popup-datepicker-content", children: /* @__PURE__ */ jsx316(
|
|
3110
3275
|
SingleDatePicker_default,
|
|
3111
3276
|
{
|
|
3112
3277
|
value: tempDate,
|
|
@@ -3116,9 +3281,9 @@ var InputDatePicker = (props) => {
|
|
|
3116
3281
|
locale
|
|
3117
3282
|
}
|
|
3118
3283
|
) }),
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3284
|
+
/* @__PURE__ */ jsxs202("div", { className: "popup-datepicker-footer", children: [
|
|
3285
|
+
/* @__PURE__ */ jsx316(Button_default, { type: "secondary", onClick: handleClose, children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel" }),
|
|
3286
|
+
/* @__PURE__ */ jsx316(Button_default, { type: "primary", onClick: handleApply, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3122
3287
|
] })
|
|
3123
3288
|
] }) })
|
|
3124
3289
|
] });
|
|
@@ -3127,20 +3292,20 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
3127
3292
|
var InputDatePicker_default = InputDatePicker;
|
|
3128
3293
|
|
|
3129
3294
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3130
|
-
import
|
|
3295
|
+
import React17 from "react";
|
|
3131
3296
|
|
|
3132
3297
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3133
|
-
import
|
|
3298
|
+
import React16 from "react";
|
|
3134
3299
|
|
|
3135
3300
|
// src/components/Tab/Tab.tsx
|
|
3136
|
-
import
|
|
3301
|
+
import React15 from "react";
|
|
3137
3302
|
|
|
3138
3303
|
// src/components/Tab/TabItem.tsx
|
|
3139
|
-
import
|
|
3140
|
-
import { jsx as
|
|
3141
|
-
var TabItem =
|
|
3304
|
+
import React14 from "react";
|
|
3305
|
+
import { jsx as jsx317 } from "react/jsx-runtime";
|
|
3306
|
+
var TabItem = React14.forwardRef((props, ref) => {
|
|
3142
3307
|
const { isActive, title, onClick } = props;
|
|
3143
|
-
return /* @__PURE__ */
|
|
3308
|
+
return /* @__PURE__ */ jsx317(
|
|
3144
3309
|
"div",
|
|
3145
3310
|
{
|
|
3146
3311
|
ref,
|
|
@@ -3154,25 +3319,25 @@ TabItem.displayName = "TabItem";
|
|
|
3154
3319
|
var TabItem_default = TabItem;
|
|
3155
3320
|
|
|
3156
3321
|
// src/components/Tab/Tab.tsx
|
|
3157
|
-
import { jsx as
|
|
3322
|
+
import { jsx as jsx318, jsxs as jsxs203 } from "react/jsx-runtime";
|
|
3158
3323
|
var Tab = (props) => {
|
|
3159
3324
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
3160
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
3325
|
+
const [underlineStyle, setUnderlineStyle] = React15.useState({
|
|
3161
3326
|
left: 0,
|
|
3162
3327
|
width: 0
|
|
3163
3328
|
});
|
|
3164
|
-
const itemRefs =
|
|
3329
|
+
const itemRefs = React15.useRef([]);
|
|
3165
3330
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
3166
3331
|
onChange(tabItem, tabIdx);
|
|
3167
3332
|
};
|
|
3168
|
-
|
|
3333
|
+
React15.useEffect(() => {
|
|
3169
3334
|
const el = itemRefs.current[activeIndex];
|
|
3170
3335
|
if (el) {
|
|
3171
3336
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
3172
3337
|
}
|
|
3173
3338
|
}, [activeIndex, tabs.length]);
|
|
3174
|
-
return /* @__PURE__ */
|
|
3175
|
-
tabs.map((tab, idx) => /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ jsxs203("div", { className: clsx_default("lib-xplat-tab", `type-${type}`, size), children: [
|
|
3340
|
+
tabs.map((tab, idx) => /* @__PURE__ */ jsx318(
|
|
3176
3341
|
TabItem_default,
|
|
3177
3342
|
{
|
|
3178
3343
|
onClick: () => handleChangeActiveTab(tab, idx),
|
|
@@ -3184,7 +3349,7 @@ var Tab = (props) => {
|
|
|
3184
3349
|
},
|
|
3185
3350
|
`${tab.value}_${idx}`
|
|
3186
3351
|
)),
|
|
3187
|
-
type === "toggle" && /* @__PURE__ */
|
|
3352
|
+
type === "toggle" && /* @__PURE__ */ jsx318(
|
|
3188
3353
|
"div",
|
|
3189
3354
|
{
|
|
3190
3355
|
className: "tab-toggle-underline",
|
|
@@ -3200,7 +3365,7 @@ Tab.displayName = "Tab";
|
|
|
3200
3365
|
var Tab_default = Tab;
|
|
3201
3366
|
|
|
3202
3367
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
3203
|
-
import { jsx as
|
|
3368
|
+
import { jsx as jsx319, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
3204
3369
|
var RangePicker = (props) => {
|
|
3205
3370
|
const {
|
|
3206
3371
|
startDate,
|
|
@@ -3210,7 +3375,7 @@ var RangePicker = (props) => {
|
|
|
3210
3375
|
maxDate,
|
|
3211
3376
|
locale = "ko"
|
|
3212
3377
|
} = props;
|
|
3213
|
-
const [activeTab, setActiveTab] =
|
|
3378
|
+
const [activeTab, setActiveTab] = React16.useState("start");
|
|
3214
3379
|
const handleStartChange = (date) => {
|
|
3215
3380
|
if (!date) return;
|
|
3216
3381
|
const newStart = date > endDate ? endDate : date;
|
|
@@ -3223,8 +3388,8 @@ var RangePicker = (props) => {
|
|
|
3223
3388
|
};
|
|
3224
3389
|
const startMaxDate = maxDate && endDate < maxDate ? endDate : endDate;
|
|
3225
3390
|
const endMinDate = minDate && startDate > minDate ? startDate : startDate;
|
|
3226
|
-
return /* @__PURE__ */
|
|
3227
|
-
/* @__PURE__ */
|
|
3391
|
+
return /* @__PURE__ */ jsxs204("div", { className: clsx_default("lib-xplat-datepicker", "range"), children: [
|
|
3392
|
+
/* @__PURE__ */ jsx319("div", { className: "datepicker-range-tabs", children: /* @__PURE__ */ jsx319(
|
|
3228
3393
|
Tab_default,
|
|
3229
3394
|
{
|
|
3230
3395
|
activeIndex: activeTab === "start" ? 0 : 1,
|
|
@@ -3237,8 +3402,8 @@ var RangePicker = (props) => {
|
|
|
3237
3402
|
size: "sm"
|
|
3238
3403
|
}
|
|
3239
3404
|
) }),
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ jsxs204("div", { className: "datepicker-range-panels", children: [
|
|
3406
|
+
/* @__PURE__ */ jsx319(
|
|
3242
3407
|
SingleDatePicker_default,
|
|
3243
3408
|
{
|
|
3244
3409
|
value: startDate,
|
|
@@ -3250,7 +3415,7 @@ var RangePicker = (props) => {
|
|
|
3250
3415
|
locale
|
|
3251
3416
|
}
|
|
3252
3417
|
),
|
|
3253
|
-
/* @__PURE__ */
|
|
3418
|
+
/* @__PURE__ */ jsx319(
|
|
3254
3419
|
SingleDatePicker_default,
|
|
3255
3420
|
{
|
|
3256
3421
|
value: endDate,
|
|
@@ -3263,7 +3428,7 @@ var RangePicker = (props) => {
|
|
|
3263
3428
|
}
|
|
3264
3429
|
)
|
|
3265
3430
|
] }),
|
|
3266
|
-
/* @__PURE__ */
|
|
3431
|
+
/* @__PURE__ */ jsx319("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? /* @__PURE__ */ jsx319(
|
|
3267
3432
|
SingleDatePicker_default,
|
|
3268
3433
|
{
|
|
3269
3434
|
value: startDate,
|
|
@@ -3274,7 +3439,7 @@ var RangePicker = (props) => {
|
|
|
3274
3439
|
rangeEnd: endDate,
|
|
3275
3440
|
locale
|
|
3276
3441
|
}
|
|
3277
|
-
) : /* @__PURE__ */
|
|
3442
|
+
) : /* @__PURE__ */ jsx319(
|
|
3278
3443
|
SingleDatePicker_default,
|
|
3279
3444
|
{
|
|
3280
3445
|
value: endDate,
|
|
@@ -3292,10 +3457,10 @@ RangePicker.displayName = "RangePicker";
|
|
|
3292
3457
|
var RangePicker_default = RangePicker;
|
|
3293
3458
|
|
|
3294
3459
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
3295
|
-
import { jsx as
|
|
3460
|
+
import { jsx as jsx320, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
3296
3461
|
var PopupPicker = (props) => {
|
|
3297
3462
|
const { component, type, locale } = props;
|
|
3298
|
-
const [isOpen, setIsOpen] =
|
|
3463
|
+
const [isOpen, setIsOpen] = React17.useState(false);
|
|
3299
3464
|
const handleClick = () => setIsOpen(true);
|
|
3300
3465
|
const handleClose = () => setIsOpen(false);
|
|
3301
3466
|
const handleSingleChange = (date) => {
|
|
@@ -3303,11 +3468,11 @@ var PopupPicker = (props) => {
|
|
|
3303
3468
|
props.onChange?.(date);
|
|
3304
3469
|
handleClose();
|
|
3305
3470
|
};
|
|
3306
|
-
return /* @__PURE__ */
|
|
3307
|
-
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
/* @__PURE__ */
|
|
3310
|
-
type === "single" && /* @__PURE__ */
|
|
3471
|
+
return /* @__PURE__ */ jsxs205("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
3472
|
+
React17.cloneElement(component, { onClick: handleClick }),
|
|
3473
|
+
/* @__PURE__ */ jsx320(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ jsxs205("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
3474
|
+
/* @__PURE__ */ jsxs205("div", { className: "popup-datepicker-content", children: [
|
|
3475
|
+
type === "single" && /* @__PURE__ */ jsx320(
|
|
3311
3476
|
SingleDatePicker_default,
|
|
3312
3477
|
{
|
|
3313
3478
|
value: props.value,
|
|
@@ -3317,7 +3482,7 @@ var PopupPicker = (props) => {
|
|
|
3317
3482
|
locale
|
|
3318
3483
|
}
|
|
3319
3484
|
),
|
|
3320
|
-
type === "range" && /* @__PURE__ */
|
|
3485
|
+
type === "range" && /* @__PURE__ */ jsx320(
|
|
3321
3486
|
RangePicker_default,
|
|
3322
3487
|
{
|
|
3323
3488
|
startDate: props.startDate,
|
|
@@ -3329,8 +3494,8 @@ var PopupPicker = (props) => {
|
|
|
3329
3494
|
}
|
|
3330
3495
|
)
|
|
3331
3496
|
] }),
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3497
|
+
/* @__PURE__ */ jsxs205("div", { className: "popup-datepicker-footer", children: [
|
|
3498
|
+
/* @__PURE__ */ jsx320(
|
|
3334
3499
|
Button_default,
|
|
3335
3500
|
{
|
|
3336
3501
|
type: "secondary",
|
|
@@ -3338,7 +3503,7 @@ var PopupPicker = (props) => {
|
|
|
3338
3503
|
children: locale === "ko" ? "\uCDE8\uC18C" : "Cancel"
|
|
3339
3504
|
}
|
|
3340
3505
|
),
|
|
3341
|
-
/* @__PURE__ */
|
|
3506
|
+
/* @__PURE__ */ jsx320(Button_default, { type: "primary", onClick: handleClose, children: locale === "ko" ? "\uC801\uC6A9" : "Apply" })
|
|
3342
3507
|
] })
|
|
3343
3508
|
] }) })
|
|
3344
3509
|
] });
|
|
@@ -3347,10 +3512,10 @@ PopupPicker.displayName = "PopupPicker";
|
|
|
3347
3512
|
var PopupPicker_default = PopupPicker;
|
|
3348
3513
|
|
|
3349
3514
|
// src/components/Divider/Divider.tsx
|
|
3350
|
-
import { jsx as
|
|
3515
|
+
import { jsx as jsx321 } from "react/jsx-runtime";
|
|
3351
3516
|
var Divider = (props) => {
|
|
3352
3517
|
const { orientation = "horizontal" } = props;
|
|
3353
|
-
return /* @__PURE__ */
|
|
3518
|
+
return /* @__PURE__ */ jsx321(
|
|
3354
3519
|
"div",
|
|
3355
3520
|
{
|
|
3356
3521
|
className: clsx_default("lib-xplat-divider", orientation),
|
|
@@ -3363,15 +3528,15 @@ Divider.displayName = "Divider";
|
|
|
3363
3528
|
var Divider_default = Divider;
|
|
3364
3529
|
|
|
3365
3530
|
// src/components/Drawer/Drawer.tsx
|
|
3366
|
-
import
|
|
3531
|
+
import React18 from "react";
|
|
3367
3532
|
import { createPortal as createPortal2 } from "react-dom";
|
|
3368
|
-
import { jsx as
|
|
3533
|
+
import { jsx as jsx322, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
3369
3534
|
var ANIMATION_DURATION_MS2 = 250;
|
|
3370
3535
|
var Drawer = (props) => {
|
|
3371
3536
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
3372
|
-
const [mounted, setMounted] =
|
|
3373
|
-
const [visible, setVisible] =
|
|
3374
|
-
|
|
3537
|
+
const [mounted, setMounted] = React18.useState(false);
|
|
3538
|
+
const [visible, setVisible] = React18.useState(false);
|
|
3539
|
+
React18.useEffect(() => {
|
|
3375
3540
|
if (isOpen) {
|
|
3376
3541
|
setMounted(true);
|
|
3377
3542
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -3385,12 +3550,12 @@ var Drawer = (props) => {
|
|
|
3385
3550
|
if (!mounted) return null;
|
|
3386
3551
|
const stateClass = visible ? "enter" : "exit";
|
|
3387
3552
|
return createPortal2(
|
|
3388
|
-
/* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ jsx322(
|
|
3389
3554
|
"div",
|
|
3390
3555
|
{
|
|
3391
3556
|
className: clsx_default("lib-xplat-drawer-overlay", stateClass),
|
|
3392
3557
|
onClick: onClose,
|
|
3393
|
-
children: /* @__PURE__ */
|
|
3558
|
+
children: /* @__PURE__ */ jsxs206(
|
|
3394
3559
|
"div",
|
|
3395
3560
|
{
|
|
3396
3561
|
className: clsx_default("lib-xplat-drawer", placement, size, stateClass),
|
|
@@ -3398,11 +3563,11 @@ var Drawer = (props) => {
|
|
|
3398
3563
|
"aria-modal": "true",
|
|
3399
3564
|
onClick: (e) => e.stopPropagation(),
|
|
3400
3565
|
children: [
|
|
3401
|
-
title && /* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3403
|
-
/* @__PURE__ */
|
|
3566
|
+
title && /* @__PURE__ */ jsxs206("div", { className: "drawer-header", children: [
|
|
3567
|
+
/* @__PURE__ */ jsx322("span", { className: "drawer-title", children: title }),
|
|
3568
|
+
/* @__PURE__ */ jsx322("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
3404
3569
|
] }),
|
|
3405
|
-
/* @__PURE__ */
|
|
3570
|
+
/* @__PURE__ */ jsx322("div", { className: "drawer-body", children })
|
|
3406
3571
|
]
|
|
3407
3572
|
}
|
|
3408
3573
|
)
|
|
@@ -3415,22 +3580,23 @@ Drawer.displayName = "Drawer";
|
|
|
3415
3580
|
var Drawer_default = Drawer;
|
|
3416
3581
|
|
|
3417
3582
|
// src/components/Dropdown/Dropdown.tsx
|
|
3418
|
-
import
|
|
3583
|
+
import React21 from "react";
|
|
3419
3584
|
|
|
3420
3585
|
// src/tokens/hooks/useAutoPosition.ts
|
|
3421
|
-
import
|
|
3586
|
+
import React19 from "react";
|
|
3422
3587
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
3423
|
-
const [position, setPosition] =
|
|
3588
|
+
const [position, setPosition] = React19.useState({
|
|
3424
3589
|
position: {},
|
|
3425
3590
|
direction: "bottom"
|
|
3426
3591
|
});
|
|
3427
|
-
const calculatePosition =
|
|
3592
|
+
const calculatePosition = React19.useCallback(() => {
|
|
3428
3593
|
if (!triggerRef.current || !popRef.current) return;
|
|
3429
3594
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
3430
3595
|
const popW = popRef.current.offsetWidth;
|
|
3431
3596
|
const popH = popRef.current.offsetHeight;
|
|
3432
3597
|
const viewportHeight = window.innerHeight;
|
|
3433
3598
|
const viewportWidth = window.innerWidth;
|
|
3599
|
+
if (popH === 0 || popW === 0) return;
|
|
3434
3600
|
let direction = "bottom";
|
|
3435
3601
|
let top;
|
|
3436
3602
|
let left;
|
|
@@ -3450,13 +3616,21 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3450
3616
|
direction
|
|
3451
3617
|
});
|
|
3452
3618
|
}, [triggerRef, popRef]);
|
|
3453
|
-
|
|
3619
|
+
React19.useLayoutEffect(() => {
|
|
3454
3620
|
if (!enabled) return;
|
|
3455
3621
|
calculatePosition();
|
|
3456
3622
|
const raf = requestAnimationFrame(calculatePosition);
|
|
3457
3623
|
return () => cancelAnimationFrame(raf);
|
|
3458
3624
|
}, [calculatePosition, enabled]);
|
|
3459
|
-
|
|
3625
|
+
React19.useEffect(() => {
|
|
3626
|
+
if (!enabled || !popRef.current) return;
|
|
3627
|
+
const observer = new ResizeObserver(() => {
|
|
3628
|
+
calculatePosition();
|
|
3629
|
+
});
|
|
3630
|
+
observer.observe(popRef.current);
|
|
3631
|
+
return () => observer.disconnect();
|
|
3632
|
+
}, [calculatePosition, enabled, popRef]);
|
|
3633
|
+
React19.useEffect(() => {
|
|
3460
3634
|
if (!enabled) return;
|
|
3461
3635
|
window.addEventListener("resize", calculatePosition);
|
|
3462
3636
|
window.addEventListener("scroll", calculatePosition, true);
|
|
@@ -3470,9 +3644,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3470
3644
|
var useAutoPosition_default = useAutoPosition;
|
|
3471
3645
|
|
|
3472
3646
|
// src/tokens/hooks/useClickOutside.ts
|
|
3473
|
-
import
|
|
3647
|
+
import React20 from "react";
|
|
3474
3648
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
3475
|
-
|
|
3649
|
+
React20.useEffect(() => {
|
|
3476
3650
|
if (!enabled) return;
|
|
3477
3651
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
3478
3652
|
const listener = (event) => {
|
|
@@ -3495,17 +3669,17 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
3495
3669
|
var useClickOutside_default = useClickOutside;
|
|
3496
3670
|
|
|
3497
3671
|
// src/components/Dropdown/Dropdown.tsx
|
|
3498
|
-
import { jsx as
|
|
3672
|
+
import { jsx as jsx323, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
3499
3673
|
var Dropdown = (props) => {
|
|
3500
3674
|
const { items, children } = props;
|
|
3501
|
-
const [isOpen, setIsOpen] =
|
|
3502
|
-
const [mounted, setMounted] =
|
|
3503
|
-
const [visible, setVisible] =
|
|
3504
|
-
const triggerRef =
|
|
3505
|
-
const menuRef =
|
|
3675
|
+
const [isOpen, setIsOpen] = React21.useState(false);
|
|
3676
|
+
const [mounted, setMounted] = React21.useState(false);
|
|
3677
|
+
const [visible, setVisible] = React21.useState(false);
|
|
3678
|
+
const triggerRef = React21.useRef(null);
|
|
3679
|
+
const menuRef = React21.useRef(null);
|
|
3506
3680
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, mounted);
|
|
3507
3681
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
|
|
3508
|
-
|
|
3682
|
+
React21.useEffect(() => {
|
|
3509
3683
|
if (isOpen) {
|
|
3510
3684
|
setMounted(true);
|
|
3511
3685
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -3520,8 +3694,8 @@ var Dropdown = (props) => {
|
|
|
3520
3694
|
item.onClick?.();
|
|
3521
3695
|
setIsOpen(false);
|
|
3522
3696
|
};
|
|
3523
|
-
return /* @__PURE__ */
|
|
3524
|
-
/* @__PURE__ */
|
|
3697
|
+
return /* @__PURE__ */ jsxs207("div", { className: "lib-xplat-dropdown", children: [
|
|
3698
|
+
/* @__PURE__ */ jsx323(
|
|
3525
3699
|
"div",
|
|
3526
3700
|
{
|
|
3527
3701
|
ref: triggerRef,
|
|
@@ -3530,14 +3704,14 @@ var Dropdown = (props) => {
|
|
|
3530
3704
|
children
|
|
3531
3705
|
}
|
|
3532
3706
|
),
|
|
3533
|
-
mounted && /* @__PURE__ */
|
|
3707
|
+
mounted && /* @__PURE__ */ jsx323(Portal_default, { children: /* @__PURE__ */ jsx323(
|
|
3534
3708
|
"div",
|
|
3535
3709
|
{
|
|
3536
3710
|
ref: menuRef,
|
|
3537
3711
|
className: clsx_default("lib-xplat-dropdown-menu", direction, { visible }),
|
|
3538
3712
|
style: { top: position.top, left: position.left },
|
|
3539
3713
|
role: "menu",
|
|
3540
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3714
|
+
children: items.map((item) => /* @__PURE__ */ jsx323(
|
|
3541
3715
|
"button",
|
|
3542
3716
|
{
|
|
3543
3717
|
className: clsx_default("dropdown-item", {
|
|
@@ -3559,23 +3733,23 @@ Dropdown.displayName = "Dropdown";
|
|
|
3559
3733
|
var Dropdown_default = Dropdown;
|
|
3560
3734
|
|
|
3561
3735
|
// src/components/EmptyState/EmptyState.tsx
|
|
3562
|
-
import { jsx as
|
|
3736
|
+
import { jsx as jsx324, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
3563
3737
|
var EmptyState = (props) => {
|
|
3564
3738
|
const { icon, title = "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", description, action } = props;
|
|
3565
|
-
return /* @__PURE__ */
|
|
3566
|
-
icon && /* @__PURE__ */
|
|
3567
|
-
!icon && /* @__PURE__ */
|
|
3568
|
-
/* @__PURE__ */
|
|
3569
|
-
description && /* @__PURE__ */
|
|
3570
|
-
action && /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsxs208("div", { className: "lib-xplat-empty-state", children: [
|
|
3740
|
+
icon && /* @__PURE__ */ jsx324("div", { className: "empty-icon", children: icon }),
|
|
3741
|
+
!icon && /* @__PURE__ */ jsx324("div", { className: "empty-icon", children: /* @__PURE__ */ jsx324("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx324("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" }) }) }),
|
|
3742
|
+
/* @__PURE__ */ jsx324("p", { className: "empty-title", children: title }),
|
|
3743
|
+
description && /* @__PURE__ */ jsx324("p", { className: "empty-description", children: description }),
|
|
3744
|
+
action && /* @__PURE__ */ jsx324("div", { className: "empty-action", children: action })
|
|
3571
3745
|
] });
|
|
3572
3746
|
};
|
|
3573
3747
|
EmptyState.displayName = "EmptyState";
|
|
3574
3748
|
var EmptyState_default = EmptyState;
|
|
3575
3749
|
|
|
3576
3750
|
// src/components/FileUpload/FileUpload.tsx
|
|
3577
|
-
import
|
|
3578
|
-
import { jsx as
|
|
3751
|
+
import React22 from "react";
|
|
3752
|
+
import { jsx as jsx325, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
3579
3753
|
var FileUpload = (props) => {
|
|
3580
3754
|
const {
|
|
3581
3755
|
accept,
|
|
@@ -3585,8 +3759,8 @@ var FileUpload = (props) => {
|
|
|
3585
3759
|
label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
3586
3760
|
description
|
|
3587
3761
|
} = props;
|
|
3588
|
-
const [isDragOver, setIsDragOver] =
|
|
3589
|
-
const inputRef =
|
|
3762
|
+
const [isDragOver, setIsDragOver] = React22.useState(false);
|
|
3763
|
+
const inputRef = React22.useRef(null);
|
|
3590
3764
|
const handleFiles = (fileList) => {
|
|
3591
3765
|
let files = Array.from(fileList);
|
|
3592
3766
|
if (maxSize) {
|
|
@@ -3616,7 +3790,7 @@ var FileUpload = (props) => {
|
|
|
3616
3790
|
handleFiles(e.target.files);
|
|
3617
3791
|
}
|
|
3618
3792
|
};
|
|
3619
|
-
return /* @__PURE__ */
|
|
3793
|
+
return /* @__PURE__ */ jsxs209(
|
|
3620
3794
|
"div",
|
|
3621
3795
|
{
|
|
3622
3796
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
|
|
@@ -3625,7 +3799,7 @@ var FileUpload = (props) => {
|
|
|
3625
3799
|
onDragLeave: handleDragLeave,
|
|
3626
3800
|
onClick: () => inputRef.current?.click(),
|
|
3627
3801
|
children: [
|
|
3628
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ jsx325(
|
|
3629
3803
|
"input",
|
|
3630
3804
|
{
|
|
3631
3805
|
ref: inputRef,
|
|
@@ -3635,9 +3809,9 @@ var FileUpload = (props) => {
|
|
|
3635
3809
|
onChange: handleChange
|
|
3636
3810
|
}
|
|
3637
3811
|
),
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3640
|
-
description && /* @__PURE__ */
|
|
3812
|
+
/* @__PURE__ */ jsx325("div", { className: "upload-icon", children: /* @__PURE__ */ jsx325(UploadIcon_default, {}) }),
|
|
3813
|
+
/* @__PURE__ */ jsx325("p", { className: "upload-label", children: label }),
|
|
3814
|
+
description && /* @__PURE__ */ jsx325("p", { className: "upload-description", children: description })
|
|
3641
3815
|
]
|
|
3642
3816
|
}
|
|
3643
3817
|
);
|
|
@@ -3646,10 +3820,10 @@ FileUpload.displayName = "FileUpload";
|
|
|
3646
3820
|
var FileUpload_default = FileUpload;
|
|
3647
3821
|
|
|
3648
3822
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
3649
|
-
import
|
|
3823
|
+
import React24 from "react";
|
|
3650
3824
|
|
|
3651
3825
|
// src/components/HtmlTypeWriter/utils.ts
|
|
3652
|
-
import
|
|
3826
|
+
import React23 from "react";
|
|
3653
3827
|
var voidTags = /* @__PURE__ */ new Set([
|
|
3654
3828
|
"br",
|
|
3655
3829
|
"img",
|
|
@@ -3717,41 +3891,41 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
|
|
|
3717
3891
|
props[attr.name] = attr.value;
|
|
3718
3892
|
});
|
|
3719
3893
|
if (voidTags.has(tag)) {
|
|
3720
|
-
return
|
|
3894
|
+
return React23.createElement(tag, props);
|
|
3721
3895
|
}
|
|
3722
3896
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
3723
|
-
return
|
|
3897
|
+
return React23.createElement(tag, props, ...children);
|
|
3724
3898
|
};
|
|
3725
3899
|
var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
3726
3900
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
3727
3901
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
3728
|
-
return node == null ? null :
|
|
3902
|
+
return node == null ? null : React23.createElement(React23.Fragment, { key: idx }, node);
|
|
3729
3903
|
}).filter(Boolean);
|
|
3730
3904
|
return nodes.length === 0 ? null : nodes;
|
|
3731
3905
|
};
|
|
3732
3906
|
|
|
3733
3907
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
3734
|
-
import { jsx as
|
|
3908
|
+
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
3735
3909
|
var HtmlTypeWriter = ({
|
|
3736
3910
|
html,
|
|
3737
3911
|
duration = 20,
|
|
3738
3912
|
onDone,
|
|
3739
3913
|
onChange
|
|
3740
3914
|
}) => {
|
|
3741
|
-
const [typedLen, setTypedLen] =
|
|
3742
|
-
const doneCalledRef =
|
|
3743
|
-
const { doc, rangeMap, totalLength } =
|
|
3915
|
+
const [typedLen, setTypedLen] = React24.useState(0);
|
|
3916
|
+
const doneCalledRef = React24.useRef(false);
|
|
3917
|
+
const { doc, rangeMap, totalLength } = React24.useMemo(() => {
|
|
3744
3918
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
3745
3919
|
const decoded = decodeHtmlEntities(html);
|
|
3746
3920
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
3747
3921
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
3748
3922
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
3749
3923
|
}, [html]);
|
|
3750
|
-
|
|
3924
|
+
React24.useEffect(() => {
|
|
3751
3925
|
setTypedLen(0);
|
|
3752
3926
|
doneCalledRef.current = false;
|
|
3753
3927
|
}, [html]);
|
|
3754
|
-
|
|
3928
|
+
React24.useEffect(() => {
|
|
3755
3929
|
if (!totalLength) return;
|
|
3756
3930
|
if (typedLen >= totalLength) return;
|
|
3757
3931
|
const timer = window.setInterval(() => {
|
|
@@ -3759,33 +3933,33 @@ var HtmlTypeWriter = ({
|
|
|
3759
3933
|
}, duration);
|
|
3760
3934
|
return () => window.clearInterval(timer);
|
|
3761
3935
|
}, [typedLen, totalLength, duration]);
|
|
3762
|
-
|
|
3936
|
+
React24.useEffect(() => {
|
|
3763
3937
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
3764
3938
|
onChange?.();
|
|
3765
3939
|
}
|
|
3766
3940
|
}, [typedLen, totalLength, onChange]);
|
|
3767
|
-
|
|
3941
|
+
React24.useEffect(() => {
|
|
3768
3942
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
3769
3943
|
doneCalledRef.current = true;
|
|
3770
3944
|
onDone?.();
|
|
3771
3945
|
}
|
|
3772
3946
|
}, [typedLen, totalLength, onDone]);
|
|
3773
|
-
const parsed =
|
|
3947
|
+
const parsed = React24.useMemo(
|
|
3774
3948
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
3775
3949
|
[doc, typedLen, rangeMap]
|
|
3776
3950
|
);
|
|
3777
|
-
return /* @__PURE__ */
|
|
3951
|
+
return /* @__PURE__ */ jsx326("div", { className: "lib-xplat-htmlTypewriter", children: parsed });
|
|
3778
3952
|
};
|
|
3779
3953
|
HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
3780
3954
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
3781
3955
|
|
|
3782
3956
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
3783
|
-
import
|
|
3784
|
-
import { jsx as
|
|
3957
|
+
import React25 from "react";
|
|
3958
|
+
import { jsx as jsx327, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
3785
3959
|
var ImageSelector = (props) => {
|
|
3786
3960
|
const { value, label, onChange } = props;
|
|
3787
|
-
const [previewUrl, setPreviewUrl] =
|
|
3788
|
-
|
|
3961
|
+
const [previewUrl, setPreviewUrl] = React25.useState();
|
|
3962
|
+
React25.useEffect(() => {
|
|
3789
3963
|
if (!value) {
|
|
3790
3964
|
setPreviewUrl(void 0);
|
|
3791
3965
|
return;
|
|
@@ -3794,7 +3968,7 @@ var ImageSelector = (props) => {
|
|
|
3794
3968
|
setPreviewUrl(url);
|
|
3795
3969
|
return () => URL.revokeObjectURL(url);
|
|
3796
3970
|
}, [value]);
|
|
3797
|
-
const inputRef =
|
|
3971
|
+
const inputRef = React25.useRef(null);
|
|
3798
3972
|
const handleFileChange = (e) => {
|
|
3799
3973
|
const selectedFile = e.target.files?.[0];
|
|
3800
3974
|
if (selectedFile) {
|
|
@@ -3807,8 +3981,8 @@ var ImageSelector = (props) => {
|
|
|
3807
3981
|
const handleOpenFileDialog = () => {
|
|
3808
3982
|
inputRef.current?.click();
|
|
3809
3983
|
};
|
|
3810
|
-
return /* @__PURE__ */
|
|
3811
|
-
/* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ jsxs210("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
3985
|
+
/* @__PURE__ */ jsx327(
|
|
3812
3986
|
"input",
|
|
3813
3987
|
{
|
|
3814
3988
|
type: "file",
|
|
@@ -3818,13 +3992,13 @@ var ImageSelector = (props) => {
|
|
|
3818
3992
|
ref: inputRef
|
|
3819
3993
|
}
|
|
3820
3994
|
),
|
|
3821
|
-
value && /* @__PURE__ */
|
|
3822
|
-
/* @__PURE__ */
|
|
3823
|
-
/* @__PURE__ */
|
|
3995
|
+
value && /* @__PURE__ */ jsxs210("div", { className: "action-bar", children: [
|
|
3996
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", onClick: handleOpenFileDialog, children: /* @__PURE__ */ jsx327(UploadIcon_default, {}) }),
|
|
3997
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", onClick: handleDeleteFile, children: /* @__PURE__ */ jsx327(DeleteIcon_default, {}) })
|
|
3824
3998
|
] }),
|
|
3825
|
-
/* @__PURE__ */
|
|
3826
|
-
/* @__PURE__ */
|
|
3827
|
-
/* @__PURE__ */
|
|
3999
|
+
/* @__PURE__ */ jsx327("div", { className: "content", children: previewUrl ? /* @__PURE__ */ jsx327("img", { src: previewUrl, alt: "preview" }) : /* @__PURE__ */ jsxs210("div", { className: "skeleton", onClick: handleOpenFileDialog, children: [
|
|
4000
|
+
/* @__PURE__ */ jsx327("div", { className: "icon-wrapper", children: /* @__PURE__ */ jsx327(ImageIcon_default, {}) }),
|
|
4001
|
+
/* @__PURE__ */ jsx327("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
3828
4002
|
] }) })
|
|
3829
4003
|
] });
|
|
3830
4004
|
};
|
|
@@ -3832,7 +4006,7 @@ ImageSelector.displayName = "ImageSelector";
|
|
|
3832
4006
|
var ImageSelector_default = ImageSelector;
|
|
3833
4007
|
|
|
3834
4008
|
// src/components/Pagination/Pagination.tsx
|
|
3835
|
-
import { jsx as
|
|
4009
|
+
import { jsx as jsx328, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
3836
4010
|
var getPageRange = (current, totalPages, siblingCount) => {
|
|
3837
4011
|
const totalNumbers = siblingCount * 2 + 5;
|
|
3838
4012
|
if (totalPages <= totalNumbers) {
|
|
@@ -3875,19 +4049,19 @@ var Pagination = (props) => {
|
|
|
3875
4049
|
onChange?.(page);
|
|
3876
4050
|
}
|
|
3877
4051
|
};
|
|
3878
|
-
return /* @__PURE__ */
|
|
3879
|
-
/* @__PURE__ */
|
|
4052
|
+
return /* @__PURE__ */ jsxs211("nav", { className: clsx_default("lib-xplat-pagination", size, type), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
4053
|
+
/* @__PURE__ */ jsx328(
|
|
3880
4054
|
"button",
|
|
3881
4055
|
{
|
|
3882
4056
|
className: "page-btn prev",
|
|
3883
4057
|
disabled: current <= 1,
|
|
3884
4058
|
onClick: () => handleClick(current - 1),
|
|
3885
4059
|
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0",
|
|
3886
|
-
children: /* @__PURE__ */
|
|
4060
|
+
children: /* @__PURE__ */ jsx328(ChevronLeftIcon_default, {})
|
|
3887
4061
|
}
|
|
3888
4062
|
),
|
|
3889
4063
|
pages.map(
|
|
3890
|
-
(page, i) => page === "..." ? /* @__PURE__ */
|
|
4064
|
+
(page, i) => page === "..." ? /* @__PURE__ */ jsx328("span", { className: "dots", children: "..." }, `dots-${i}`) : /* @__PURE__ */ jsx328(
|
|
3891
4065
|
"button",
|
|
3892
4066
|
{
|
|
3893
4067
|
className: clsx_default("page-btn", { active: page === current }),
|
|
@@ -3898,14 +4072,14 @@ var Pagination = (props) => {
|
|
|
3898
4072
|
page
|
|
3899
4073
|
)
|
|
3900
4074
|
),
|
|
3901
|
-
/* @__PURE__ */
|
|
4075
|
+
/* @__PURE__ */ jsx328(
|
|
3902
4076
|
"button",
|
|
3903
4077
|
{
|
|
3904
4078
|
className: "page-btn next",
|
|
3905
4079
|
disabled: current >= totalPages,
|
|
3906
4080
|
onClick: () => handleClick(current + 1),
|
|
3907
4081
|
"aria-label": "\uB2E4\uC74C \uD398\uC774\uC9C0",
|
|
3908
|
-
children: /* @__PURE__ */
|
|
4082
|
+
children: /* @__PURE__ */ jsx328(ChevronRightIcon_default, {})
|
|
3909
4083
|
}
|
|
3910
4084
|
)
|
|
3911
4085
|
] });
|
|
@@ -3914,17 +4088,17 @@ Pagination.displayName = "Pagination";
|
|
|
3914
4088
|
var Pagination_default = Pagination;
|
|
3915
4089
|
|
|
3916
4090
|
// src/components/PopOver/PopOver.tsx
|
|
3917
|
-
import
|
|
3918
|
-
import { jsx as
|
|
4091
|
+
import React26 from "react";
|
|
4092
|
+
import { jsx as jsx329, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
3919
4093
|
var PopOver = (props) => {
|
|
3920
4094
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
3921
|
-
const popRef =
|
|
3922
|
-
const triggerRef =
|
|
3923
|
-
const [localOpen, setLocalOpen] =
|
|
3924
|
-
const [eventTrigger, setEventTrigger] =
|
|
4095
|
+
const popRef = React26.useRef(null);
|
|
4096
|
+
const triggerRef = React26.useRef(null);
|
|
4097
|
+
const [localOpen, setLocalOpen] = React26.useState(false);
|
|
4098
|
+
const [eventTrigger, setEventTrigger] = React26.useState(false);
|
|
3925
4099
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
3926
4100
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
3927
|
-
|
|
4101
|
+
React26.useEffect(() => {
|
|
3928
4102
|
if (isOpen) {
|
|
3929
4103
|
setLocalOpen(isOpen);
|
|
3930
4104
|
setTimeout(() => {
|
|
@@ -3937,7 +4111,7 @@ var PopOver = (props) => {
|
|
|
3937
4111
|
}, 200);
|
|
3938
4112
|
}
|
|
3939
4113
|
}, [isOpen]);
|
|
3940
|
-
return /* @__PURE__ */
|
|
4114
|
+
return /* @__PURE__ */ jsxs212(
|
|
3941
4115
|
"div",
|
|
3942
4116
|
{
|
|
3943
4117
|
className: "lib-xplat-pop-over",
|
|
@@ -3947,7 +4121,7 @@ var PopOver = (props) => {
|
|
|
3947
4121
|
},
|
|
3948
4122
|
children: [
|
|
3949
4123
|
children,
|
|
3950
|
-
localOpen && /* @__PURE__ */
|
|
4124
|
+
localOpen && /* @__PURE__ */ jsx329(Portal_default, { children: /* @__PURE__ */ jsx329(
|
|
3951
4125
|
"div",
|
|
3952
4126
|
{
|
|
3953
4127
|
className: clsx_default(
|
|
@@ -3970,7 +4144,7 @@ PopOver.displayName = "PopOver";
|
|
|
3970
4144
|
var PopOver_default = PopOver;
|
|
3971
4145
|
|
|
3972
4146
|
// src/components/Progress/Progress.tsx
|
|
3973
|
-
import { jsx as
|
|
4147
|
+
import { jsx as jsx330, jsxs as jsxs213 } from "react/jsx-runtime";
|
|
3974
4148
|
var Progress = (props) => {
|
|
3975
4149
|
const {
|
|
3976
4150
|
value,
|
|
@@ -3980,8 +4154,8 @@ var Progress = (props) => {
|
|
|
3980
4154
|
showLabel = false
|
|
3981
4155
|
} = props;
|
|
3982
4156
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
3983
|
-
return /* @__PURE__ */
|
|
3984
|
-
/* @__PURE__ */
|
|
4157
|
+
return /* @__PURE__ */ jsxs213("div", { className: clsx_default("lib-xplat-progress", size, type), children: [
|
|
4158
|
+
/* @__PURE__ */ jsx330(
|
|
3985
4159
|
"div",
|
|
3986
4160
|
{
|
|
3987
4161
|
className: "track",
|
|
@@ -3989,7 +4163,7 @@ var Progress = (props) => {
|
|
|
3989
4163
|
"aria-valuenow": value,
|
|
3990
4164
|
"aria-valuemin": 0,
|
|
3991
4165
|
"aria-valuemax": max,
|
|
3992
|
-
children: /* @__PURE__ */
|
|
4166
|
+
children: /* @__PURE__ */ jsx330(
|
|
3993
4167
|
"div",
|
|
3994
4168
|
{
|
|
3995
4169
|
className: "bar",
|
|
@@ -3998,7 +4172,7 @@ var Progress = (props) => {
|
|
|
3998
4172
|
)
|
|
3999
4173
|
}
|
|
4000
4174
|
),
|
|
4001
|
-
showLabel && /* @__PURE__ */
|
|
4175
|
+
showLabel && /* @__PURE__ */ jsxs213("span", { className: "label", children: [
|
|
4002
4176
|
Math.round(percentage),
|
|
4003
4177
|
"%"
|
|
4004
4178
|
] })
|
|
@@ -4008,17 +4182,17 @@ Progress.displayName = "Progress";
|
|
|
4008
4182
|
var Progress_default = Progress;
|
|
4009
4183
|
|
|
4010
4184
|
// src/components/Radio/RadioGroupContext.tsx
|
|
4011
|
-
import
|
|
4012
|
-
var RadioGroupContext =
|
|
4185
|
+
import React27 from "react";
|
|
4186
|
+
var RadioGroupContext = React27.createContext(
|
|
4013
4187
|
null
|
|
4014
4188
|
);
|
|
4015
4189
|
var useRadioGroupContext = () => {
|
|
4016
|
-
return
|
|
4190
|
+
return React27.useContext(RadioGroupContext);
|
|
4017
4191
|
};
|
|
4018
4192
|
var RadioGroupContext_default = RadioGroupContext;
|
|
4019
4193
|
|
|
4020
4194
|
// src/components/Radio/Radio.tsx
|
|
4021
|
-
import { jsx as
|
|
4195
|
+
import { jsx as jsx331, jsxs as jsxs214 } from "react/jsx-runtime";
|
|
4022
4196
|
var Radio = (props) => {
|
|
4023
4197
|
const {
|
|
4024
4198
|
label,
|
|
@@ -4036,7 +4210,7 @@ var Radio = (props) => {
|
|
|
4036
4210
|
value,
|
|
4037
4211
|
onChange: rest.onChange
|
|
4038
4212
|
};
|
|
4039
|
-
return /* @__PURE__ */
|
|
4213
|
+
return /* @__PURE__ */ jsxs214(
|
|
4040
4214
|
"label",
|
|
4041
4215
|
{
|
|
4042
4216
|
className: clsx_default(
|
|
@@ -4046,18 +4220,18 @@ var Radio = (props) => {
|
|
|
4046
4220
|
localChecked ? "checked" : void 0
|
|
4047
4221
|
),
|
|
4048
4222
|
children: [
|
|
4049
|
-
/* @__PURE__ */
|
|
4050
|
-
/* @__PURE__ */
|
|
4223
|
+
/* @__PURE__ */ jsx331("input", { ...rest, ...inputProps, checked: localChecked, type: "radio" }),
|
|
4224
|
+
/* @__PURE__ */ jsx331(
|
|
4051
4225
|
"div",
|
|
4052
4226
|
{
|
|
4053
4227
|
className: clsx_default(
|
|
4054
4228
|
"circle",
|
|
4055
4229
|
localChecked ? "checked" : void 0
|
|
4056
4230
|
),
|
|
4057
|
-
children: localChecked && /* @__PURE__ */
|
|
4231
|
+
children: localChecked && /* @__PURE__ */ jsx331("div", { className: "inner-circle" })
|
|
4058
4232
|
}
|
|
4059
4233
|
),
|
|
4060
|
-
label && /* @__PURE__ */
|
|
4234
|
+
label && /* @__PURE__ */ jsx331("span", { children: label })
|
|
4061
4235
|
]
|
|
4062
4236
|
}
|
|
4063
4237
|
);
|
|
@@ -4066,28 +4240,28 @@ Radio.displayName = "Radio";
|
|
|
4066
4240
|
var Radio_default = Radio;
|
|
4067
4241
|
|
|
4068
4242
|
// src/components/Radio/RadioGroup.tsx
|
|
4069
|
-
import { Fragment as Fragment4, jsx as
|
|
4243
|
+
import { Fragment as Fragment4, jsx as jsx332 } from "react/jsx-runtime";
|
|
4070
4244
|
var RadioGroup = (props) => {
|
|
4071
4245
|
const { children, ...rest } = props;
|
|
4072
|
-
return /* @__PURE__ */
|
|
4246
|
+
return /* @__PURE__ */ jsx332(Fragment4, { children: /* @__PURE__ */ jsx332(RadioGroupContext_default.Provider, { value: rest, children }) });
|
|
4073
4247
|
};
|
|
4074
4248
|
RadioGroup.displayName = "RadioGroup";
|
|
4075
4249
|
var RadioGroup_default = RadioGroup;
|
|
4076
4250
|
|
|
4077
4251
|
// src/components/Select/Select.tsx
|
|
4078
|
-
import
|
|
4252
|
+
import React30 from "react";
|
|
4079
4253
|
|
|
4080
4254
|
// src/components/Select/context.ts
|
|
4081
|
-
import
|
|
4082
|
-
var SelectContext =
|
|
4255
|
+
import React28 from "react";
|
|
4256
|
+
var SelectContext = React28.createContext(null);
|
|
4083
4257
|
var context_default = SelectContext;
|
|
4084
4258
|
|
|
4085
4259
|
// src/components/Select/SelectItem.tsx
|
|
4086
|
-
import
|
|
4087
|
-
import { jsx as
|
|
4260
|
+
import React29 from "react";
|
|
4261
|
+
import { jsx as jsx333 } from "react/jsx-runtime";
|
|
4088
4262
|
var SelectItem = (props) => {
|
|
4089
4263
|
const { children, value, onClick, disabled = false } = props;
|
|
4090
|
-
const ctx =
|
|
4264
|
+
const ctx = React29.useContext(context_default);
|
|
4091
4265
|
const handleClick = (e) => {
|
|
4092
4266
|
e.preventDefault();
|
|
4093
4267
|
e.stopPropagation();
|
|
@@ -4096,7 +4270,7 @@ var SelectItem = (props) => {
|
|
|
4096
4270
|
ctx?.close();
|
|
4097
4271
|
onClick?.();
|
|
4098
4272
|
};
|
|
4099
|
-
return /* @__PURE__ */
|
|
4273
|
+
return /* @__PURE__ */ jsx333(
|
|
4100
4274
|
"div",
|
|
4101
4275
|
{
|
|
4102
4276
|
className: clsx_default("select-item", disabled && "disabled"),
|
|
@@ -4117,7 +4291,7 @@ SelectItem.displayName = "Select.Item";
|
|
|
4117
4291
|
var SelectItem_default = SelectItem;
|
|
4118
4292
|
|
|
4119
4293
|
// src/components/Select/Select.tsx
|
|
4120
|
-
import { jsx as
|
|
4294
|
+
import { jsx as jsx334, jsxs as jsxs215 } from "react/jsx-runtime";
|
|
4121
4295
|
var ANIMATION_DURATION_MS3 = 200;
|
|
4122
4296
|
var SelectRoot = (props) => {
|
|
4123
4297
|
const {
|
|
@@ -4129,26 +4303,26 @@ var SelectRoot = (props) => {
|
|
|
4129
4303
|
error = false,
|
|
4130
4304
|
size = "md"
|
|
4131
4305
|
} = props;
|
|
4132
|
-
const itemChildren =
|
|
4133
|
-
(child) =>
|
|
4306
|
+
const itemChildren = React30.Children.toArray(children).filter(
|
|
4307
|
+
(child) => React30.isValidElement(child) && child.type === SelectItem_default
|
|
4134
4308
|
);
|
|
4135
4309
|
const isControlled = valueProp !== void 0;
|
|
4136
|
-
const [isOpen, setOpen] =
|
|
4137
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
4138
|
-
const controlledLabel =
|
|
4310
|
+
const [isOpen, setOpen] = React30.useState(false);
|
|
4311
|
+
const [uncontrolledLabel, setUncontrolledLabel] = React30.useState(null);
|
|
4312
|
+
const controlledLabel = React30.useMemo(() => {
|
|
4139
4313
|
if (!isControlled) return null;
|
|
4140
4314
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
4141
4315
|
return match ? match.props.children : null;
|
|
4142
4316
|
}, [isControlled, valueProp, itemChildren]);
|
|
4143
4317
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
4144
|
-
const triggerRef =
|
|
4145
|
-
const contentRef =
|
|
4146
|
-
const [mounted, setMounted] =
|
|
4147
|
-
const [visible, setVisible] =
|
|
4148
|
-
|
|
4318
|
+
const triggerRef = React30.useRef(null);
|
|
4319
|
+
const contentRef = React30.useRef(null);
|
|
4320
|
+
const [mounted, setMounted] = React30.useState(false);
|
|
4321
|
+
const [visible, setVisible] = React30.useState(false);
|
|
4322
|
+
React30.useEffect(() => {
|
|
4149
4323
|
if (disabled && isOpen) setOpen(false);
|
|
4150
4324
|
}, [disabled, isOpen]);
|
|
4151
|
-
|
|
4325
|
+
React30.useEffect(() => {
|
|
4152
4326
|
if (isOpen) {
|
|
4153
4327
|
setMounted(true);
|
|
4154
4328
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -4158,12 +4332,12 @@ var SelectRoot = (props) => {
|
|
|
4158
4332
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
4159
4333
|
return () => clearTimeout(t);
|
|
4160
4334
|
}, [isOpen]);
|
|
4161
|
-
const open =
|
|
4162
|
-
const close =
|
|
4163
|
-
const toggle =
|
|
4335
|
+
const open = React30.useCallback(() => setOpen(true), []);
|
|
4336
|
+
const close = React30.useCallback(() => setOpen(false), []);
|
|
4337
|
+
const toggle = React30.useCallback(() => setOpen((prev) => !prev), []);
|
|
4164
4338
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
4165
4339
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
4166
|
-
const setSelected =
|
|
4340
|
+
const setSelected = React30.useCallback(
|
|
4167
4341
|
(label, itemValue) => {
|
|
4168
4342
|
if (!isControlled) {
|
|
4169
4343
|
setUncontrolledLabel(label);
|
|
@@ -4172,7 +4346,7 @@ var SelectRoot = (props) => {
|
|
|
4172
4346
|
},
|
|
4173
4347
|
[isControlled, onChange]
|
|
4174
4348
|
);
|
|
4175
|
-
const ctxValue =
|
|
4349
|
+
const ctxValue = React30.useMemo(
|
|
4176
4350
|
() => ({
|
|
4177
4351
|
isOpen,
|
|
4178
4352
|
mounted,
|
|
@@ -4193,7 +4367,7 @@ var SelectRoot = (props) => {
|
|
|
4193
4367
|
if (disabled) return;
|
|
4194
4368
|
toggle();
|
|
4195
4369
|
};
|
|
4196
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ jsx334(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs215(
|
|
4197
4371
|
"div",
|
|
4198
4372
|
{
|
|
4199
4373
|
className: clsx_default(
|
|
@@ -4204,7 +4378,7 @@ var SelectRoot = (props) => {
|
|
|
4204
4378
|
mounted && "is-open"
|
|
4205
4379
|
),
|
|
4206
4380
|
children: [
|
|
4207
|
-
/* @__PURE__ */
|
|
4381
|
+
/* @__PURE__ */ jsxs215(
|
|
4208
4382
|
"div",
|
|
4209
4383
|
{
|
|
4210
4384
|
ref: triggerRef,
|
|
@@ -4228,7 +4402,7 @@ var SelectRoot = (props) => {
|
|
|
4228
4402
|
}
|
|
4229
4403
|
},
|
|
4230
4404
|
children: [
|
|
4231
|
-
/* @__PURE__ */
|
|
4405
|
+
/* @__PURE__ */ jsx334(
|
|
4232
4406
|
"span",
|
|
4233
4407
|
{
|
|
4234
4408
|
className: clsx_default(
|
|
@@ -4238,25 +4412,25 @@ var SelectRoot = (props) => {
|
|
|
4238
4412
|
children: selectedLabel ?? placeholder
|
|
4239
4413
|
}
|
|
4240
4414
|
),
|
|
4241
|
-
/* @__PURE__ */
|
|
4415
|
+
/* @__PURE__ */ jsx334(
|
|
4242
4416
|
"span",
|
|
4243
4417
|
{
|
|
4244
4418
|
className: clsx_default("select-trigger-icon", isOpen && "open"),
|
|
4245
4419
|
"aria-hidden": true,
|
|
4246
|
-
children: /* @__PURE__ */
|
|
4420
|
+
children: /* @__PURE__ */ jsx334(ChevronDownIcon_default, {})
|
|
4247
4421
|
}
|
|
4248
4422
|
)
|
|
4249
4423
|
]
|
|
4250
4424
|
}
|
|
4251
4425
|
),
|
|
4252
|
-
mounted && /* @__PURE__ */
|
|
4426
|
+
mounted && /* @__PURE__ */ jsx334(Portal_default, { children: /* @__PURE__ */ jsx334(
|
|
4253
4427
|
"div",
|
|
4254
4428
|
{
|
|
4255
4429
|
className: clsx_default("lib-xplat-select-content", position.direction, stateClass),
|
|
4256
4430
|
ref: contentRef,
|
|
4257
4431
|
style: { ...position.position, width: triggerRef.current?.offsetWidth },
|
|
4258
4432
|
role: "listbox",
|
|
4259
|
-
children: /* @__PURE__ */
|
|
4433
|
+
children: /* @__PURE__ */ jsx334(context_default.Provider, { value: ctxValue, children: itemChildren })
|
|
4260
4434
|
}
|
|
4261
4435
|
) })
|
|
4262
4436
|
]
|
|
@@ -4270,7 +4444,7 @@ var Select = Object.assign(SelectRoot, {
|
|
|
4270
4444
|
var Select_default = Select;
|
|
4271
4445
|
|
|
4272
4446
|
// src/components/Skeleton/Skeleton.tsx
|
|
4273
|
-
import { jsx as
|
|
4447
|
+
import { jsx as jsx335 } from "react/jsx-runtime";
|
|
4274
4448
|
var SIZE_MAP = {
|
|
4275
4449
|
xs: "var(--spacing-size-1)",
|
|
4276
4450
|
sm: "var(--spacing-size-2)",
|
|
@@ -4286,7 +4460,7 @@ var Skeleton = (props) => {
|
|
|
4286
4460
|
...width != null && { width: SIZE_MAP[width] },
|
|
4287
4461
|
...height != null && { height: SIZE_MAP[height] }
|
|
4288
4462
|
};
|
|
4289
|
-
return /* @__PURE__ */
|
|
4463
|
+
return /* @__PURE__ */ jsx335(
|
|
4290
4464
|
"div",
|
|
4291
4465
|
{
|
|
4292
4466
|
className: clsx_default("lib-xplat-skeleton", variant),
|
|
@@ -4299,20 +4473,20 @@ Skeleton.displayName = "Skeleton";
|
|
|
4299
4473
|
var Skeleton_default = Skeleton;
|
|
4300
4474
|
|
|
4301
4475
|
// src/components/Spinner/Spinner.tsx
|
|
4302
|
-
import { jsx as
|
|
4476
|
+
import { jsx as jsx336, jsxs as jsxs216 } from "react/jsx-runtime";
|
|
4303
4477
|
var Spinner = (props) => {
|
|
4304
4478
|
const {
|
|
4305
4479
|
size = "md",
|
|
4306
4480
|
type = "brand"
|
|
4307
4481
|
} = props;
|
|
4308
|
-
return /* @__PURE__ */
|
|
4482
|
+
return /* @__PURE__ */ jsx336(
|
|
4309
4483
|
"div",
|
|
4310
4484
|
{
|
|
4311
4485
|
className: clsx_default("lib-xplat-spinner", size, type),
|
|
4312
4486
|
role: "status",
|
|
4313
4487
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
4314
|
-
children: /* @__PURE__ */
|
|
4315
|
-
/* @__PURE__ */
|
|
4488
|
+
children: /* @__PURE__ */ jsxs216("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
4489
|
+
/* @__PURE__ */ jsx336(
|
|
4316
4490
|
"circle",
|
|
4317
4491
|
{
|
|
4318
4492
|
className: "track",
|
|
@@ -4322,7 +4496,7 @@ var Spinner = (props) => {
|
|
|
4322
4496
|
strokeWidth: "3"
|
|
4323
4497
|
}
|
|
4324
4498
|
),
|
|
4325
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ jsx336(
|
|
4326
4500
|
"circle",
|
|
4327
4501
|
{
|
|
4328
4502
|
className: "indicator",
|
|
@@ -4341,20 +4515,20 @@ Spinner.displayName = "Spinner";
|
|
|
4341
4515
|
var Spinner_default = Spinner;
|
|
4342
4516
|
|
|
4343
4517
|
// src/components/Steps/Steps.tsx
|
|
4344
|
-
import { jsx as
|
|
4518
|
+
import { jsx as jsx337, jsxs as jsxs217 } from "react/jsx-runtime";
|
|
4345
4519
|
var Steps = (props) => {
|
|
4346
4520
|
const {
|
|
4347
4521
|
items,
|
|
4348
4522
|
current,
|
|
4349
4523
|
type = "brand"
|
|
4350
4524
|
} = props;
|
|
4351
|
-
return /* @__PURE__ */
|
|
4525
|
+
return /* @__PURE__ */ jsx337("div", { className: clsx_default("lib-xplat-steps", type), children: items.map((item, index) => {
|
|
4352
4526
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
4353
|
-
return /* @__PURE__ */
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
/* @__PURE__ */
|
|
4356
|
-
/* @__PURE__ */
|
|
4357
|
-
item.description && /* @__PURE__ */
|
|
4527
|
+
return /* @__PURE__ */ jsxs217("div", { className: clsx_default("step-item", status), children: [
|
|
4528
|
+
/* @__PURE__ */ jsx337("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ jsx337(CheckIcon_default, {}) : /* @__PURE__ */ jsx337("span", { children: index + 1 }) }),
|
|
4529
|
+
/* @__PURE__ */ jsxs217("div", { className: "step-content", children: [
|
|
4530
|
+
/* @__PURE__ */ jsx337("span", { className: "step-title", children: item.title }),
|
|
4531
|
+
item.description && /* @__PURE__ */ jsx337("span", { className: "step-description", children: item.description })
|
|
4358
4532
|
] })
|
|
4359
4533
|
] }, index);
|
|
4360
4534
|
}) });
|
|
@@ -4363,8 +4537,8 @@ Steps.displayName = "Steps";
|
|
|
4363
4537
|
var Steps_default = Steps;
|
|
4364
4538
|
|
|
4365
4539
|
// src/components/Swiper/Swiper.tsx
|
|
4366
|
-
import
|
|
4367
|
-
import { jsx as
|
|
4540
|
+
import React31 from "react";
|
|
4541
|
+
import { jsx as jsx338, jsxs as jsxs218 } from "react/jsx-runtime";
|
|
4368
4542
|
var Swiper = (props) => {
|
|
4369
4543
|
const {
|
|
4370
4544
|
auto = false,
|
|
@@ -4387,23 +4561,23 @@ var Swiper = (props) => {
|
|
|
4387
4561
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
4388
4562
|
const useLoop = loop && canSlide;
|
|
4389
4563
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
4390
|
-
const extendedItems =
|
|
4564
|
+
const extendedItems = React31.useMemo(() => {
|
|
4391
4565
|
if (!useLoop) return items;
|
|
4392
4566
|
return [...items, ...items, ...items];
|
|
4393
4567
|
}, [items, useLoop]);
|
|
4394
4568
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
4395
|
-
const [innerIndex, setInnerIndex] =
|
|
4569
|
+
const [innerIndex, setInnerIndex] = React31.useState(
|
|
4396
4570
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
4397
4571
|
);
|
|
4398
|
-
const [isDragging, setIsDragging] =
|
|
4399
|
-
const [dragOffset, setDragOffset] =
|
|
4400
|
-
const [animated, setAnimated] =
|
|
4401
|
-
const [containerWidth, setContainerWidth] =
|
|
4402
|
-
const containerRef =
|
|
4403
|
-
const startXRef =
|
|
4404
|
-
const startTimeRef =
|
|
4405
|
-
const autoplayTimerRef =
|
|
4406
|
-
|
|
4572
|
+
const [isDragging, setIsDragging] = React31.useState(false);
|
|
4573
|
+
const [dragOffset, setDragOffset] = React31.useState(0);
|
|
4574
|
+
const [animated, setAnimated] = React31.useState(true);
|
|
4575
|
+
const [containerWidth, setContainerWidth] = React31.useState(0);
|
|
4576
|
+
const containerRef = React31.useRef(null);
|
|
4577
|
+
const startXRef = React31.useRef(0);
|
|
4578
|
+
const startTimeRef = React31.useRef(0);
|
|
4579
|
+
const autoplayTimerRef = React31.useRef(null);
|
|
4580
|
+
React31.useEffect(() => {
|
|
4407
4581
|
const el = containerRef.current;
|
|
4408
4582
|
if (!el) return;
|
|
4409
4583
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -4422,7 +4596,7 @@ var Swiper = (props) => {
|
|
|
4422
4596
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
4423
4597
|
};
|
|
4424
4598
|
const realIndex = getRealIndex(innerIndex);
|
|
4425
|
-
const moveToInner =
|
|
4599
|
+
const moveToInner = React31.useCallback(
|
|
4426
4600
|
(idx, withAnim = true) => {
|
|
4427
4601
|
if (!useLoop) {
|
|
4428
4602
|
setAnimated(withAnim);
|
|
@@ -4450,7 +4624,7 @@ var Swiper = (props) => {
|
|
|
4450
4624
|
},
|
|
4451
4625
|
[useLoop, cloneCount, totalSlides]
|
|
4452
4626
|
);
|
|
4453
|
-
const handleTransitionEnd =
|
|
4627
|
+
const handleTransitionEnd = React31.useCallback(() => {
|
|
4454
4628
|
if (!useLoop) return;
|
|
4455
4629
|
const real = getRealIndex(innerIndex);
|
|
4456
4630
|
const canonical = cloneCount + real;
|
|
@@ -4460,7 +4634,7 @@ var Swiper = (props) => {
|
|
|
4460
4634
|
}
|
|
4461
4635
|
onChange?.(Math.min(real, maxIndex));
|
|
4462
4636
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
4463
|
-
const slideTo =
|
|
4637
|
+
const slideTo = React31.useCallback(
|
|
4464
4638
|
(logicalIndex) => {
|
|
4465
4639
|
if (!canSlide) return;
|
|
4466
4640
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -4470,7 +4644,7 @@ var Swiper = (props) => {
|
|
|
4470
4644
|
},
|
|
4471
4645
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
4472
4646
|
);
|
|
4473
|
-
const slideNext =
|
|
4647
|
+
const slideNext = React31.useCallback(() => {
|
|
4474
4648
|
if (!canSlide) return;
|
|
4475
4649
|
const nextInner = innerIndex + slideBy;
|
|
4476
4650
|
if (useLoop) {
|
|
@@ -4479,7 +4653,7 @@ var Swiper = (props) => {
|
|
|
4479
4653
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
4480
4654
|
}
|
|
4481
4655
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
4482
|
-
const slidePrev =
|
|
4656
|
+
const slidePrev = React31.useCallback(() => {
|
|
4483
4657
|
if (!canSlide) return;
|
|
4484
4658
|
const prevInner = innerIndex - slideBy;
|
|
4485
4659
|
if (useLoop) {
|
|
@@ -4488,7 +4662,7 @@ var Swiper = (props) => {
|
|
|
4488
4662
|
moveToInner(Math.max(prevInner, 0), true);
|
|
4489
4663
|
}
|
|
4490
4664
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
4491
|
-
|
|
4665
|
+
React31.useEffect(() => {
|
|
4492
4666
|
if (indexProp === void 0) return;
|
|
4493
4667
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
4494
4668
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -4496,12 +4670,12 @@ var Swiper = (props) => {
|
|
|
4496
4670
|
moveToInner(target, true);
|
|
4497
4671
|
}
|
|
4498
4672
|
}, [indexProp]);
|
|
4499
|
-
|
|
4673
|
+
React31.useImperativeHandle(swiperRef, () => ({
|
|
4500
4674
|
slidePrev,
|
|
4501
4675
|
slideNext,
|
|
4502
4676
|
slideTo
|
|
4503
4677
|
}));
|
|
4504
|
-
|
|
4678
|
+
React31.useEffect(() => {
|
|
4505
4679
|
if (!auto || !canSlide) return;
|
|
4506
4680
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
4507
4681
|
return () => {
|
|
@@ -4524,7 +4698,7 @@ var Swiper = (props) => {
|
|
|
4524
4698
|
startXRef.current = getClientX(e);
|
|
4525
4699
|
startTimeRef.current = Date.now();
|
|
4526
4700
|
};
|
|
4527
|
-
|
|
4701
|
+
React31.useEffect(() => {
|
|
4528
4702
|
if (!isDragging) return;
|
|
4529
4703
|
const handleMove = (e) => {
|
|
4530
4704
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -4562,8 +4736,8 @@ var Swiper = (props) => {
|
|
|
4562
4736
|
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
4563
4737
|
const slideWidthPercent = 100 / viewItemCount;
|
|
4564
4738
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
4565
|
-
const slideElements =
|
|
4566
|
-
() => extendedItems.map((item, idx) => /* @__PURE__ */
|
|
4739
|
+
const slideElements = React31.useMemo(
|
|
4740
|
+
() => extendedItems.map((item, idx) => /* @__PURE__ */ jsx338(
|
|
4567
4741
|
"div",
|
|
4568
4742
|
{
|
|
4569
4743
|
className: "lib-xplat-swiper__slide",
|
|
@@ -4582,14 +4756,14 @@ var Swiper = (props) => {
|
|
|
4582
4756
|
Math.floor(realIndex / slideBy),
|
|
4583
4757
|
totalSteps - 1
|
|
4584
4758
|
);
|
|
4585
|
-
return /* @__PURE__ */
|
|
4586
|
-
/* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ jsxs218("div", { className: "lib-xplat-swiper", ref: containerRef, children: [
|
|
4760
|
+
/* @__PURE__ */ jsx338(
|
|
4587
4761
|
"div",
|
|
4588
4762
|
{
|
|
4589
4763
|
className: "lib-xplat-swiper__viewport",
|
|
4590
4764
|
onMouseDown: handleDragStart,
|
|
4591
4765
|
onTouchStart: handleDragStart,
|
|
4592
|
-
children: /* @__PURE__ */
|
|
4766
|
+
children: /* @__PURE__ */ jsx338(
|
|
4593
4767
|
"div",
|
|
4594
4768
|
{
|
|
4595
4769
|
className: clsx_default(
|
|
@@ -4607,7 +4781,7 @@ var Swiper = (props) => {
|
|
|
4607
4781
|
)
|
|
4608
4782
|
}
|
|
4609
4783
|
),
|
|
4610
|
-
showProgress && canSlide && /* @__PURE__ */
|
|
4784
|
+
showProgress && canSlide && /* @__PURE__ */ jsx338("div", { className: "lib-xplat-swiper__progress", children: /* @__PURE__ */ jsx338("div", { className: "lib-xplat-swiper__progress-track", children: /* @__PURE__ */ jsx338(
|
|
4611
4785
|
"span",
|
|
4612
4786
|
{
|
|
4613
4787
|
className: "lib-xplat-swiper__progress-fill",
|
|
@@ -4617,7 +4791,7 @@ var Swiper = (props) => {
|
|
|
4617
4791
|
}
|
|
4618
4792
|
}
|
|
4619
4793
|
) }) }),
|
|
4620
|
-
canSlide && /* @__PURE__ */
|
|
4794
|
+
canSlide && /* @__PURE__ */ jsx338("div", { className: "lib-xplat-swiper__dots", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx338(
|
|
4621
4795
|
"button",
|
|
4622
4796
|
{
|
|
4623
4797
|
className: clsx_default(
|
|
@@ -4635,8 +4809,8 @@ Swiper.displayName = "Swiper";
|
|
|
4635
4809
|
var Swiper_default = Swiper;
|
|
4636
4810
|
|
|
4637
4811
|
// src/components/Switch/Switch.tsx
|
|
4638
|
-
import
|
|
4639
|
-
import { jsx as
|
|
4812
|
+
import React32 from "react";
|
|
4813
|
+
import { jsx as jsx339 } from "react/jsx-runtime";
|
|
4640
4814
|
var KNOB_TRANSITION_MS = 250;
|
|
4641
4815
|
var Switch = (props) => {
|
|
4642
4816
|
const {
|
|
@@ -4646,9 +4820,9 @@ var Switch = (props) => {
|
|
|
4646
4820
|
disabled,
|
|
4647
4821
|
onChange
|
|
4648
4822
|
} = props;
|
|
4649
|
-
const [isAnimating, setIsAnimating] =
|
|
4650
|
-
const timeoutRef =
|
|
4651
|
-
|
|
4823
|
+
const [isAnimating, setIsAnimating] = React32.useState(false);
|
|
4824
|
+
const timeoutRef = React32.useRef(null);
|
|
4825
|
+
React32.useEffect(() => {
|
|
4652
4826
|
return () => {
|
|
4653
4827
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4654
4828
|
};
|
|
@@ -4663,7 +4837,7 @@ var Switch = (props) => {
|
|
|
4663
4837
|
timeoutRef.current = null;
|
|
4664
4838
|
}, KNOB_TRANSITION_MS);
|
|
4665
4839
|
};
|
|
4666
|
-
return /* @__PURE__ */
|
|
4840
|
+
return /* @__PURE__ */ jsx339(
|
|
4667
4841
|
"div",
|
|
4668
4842
|
{
|
|
4669
4843
|
className: clsx_default(
|
|
@@ -4676,7 +4850,7 @@ var Switch = (props) => {
|
|
|
4676
4850
|
),
|
|
4677
4851
|
onClick: handleClick,
|
|
4678
4852
|
"aria-disabled": disabled || isAnimating,
|
|
4679
|
-
children: /* @__PURE__ */
|
|
4853
|
+
children: /* @__PURE__ */ jsx339("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
4680
4854
|
}
|
|
4681
4855
|
);
|
|
4682
4856
|
};
|
|
@@ -4684,26 +4858,27 @@ Switch.displayName = "Switch";
|
|
|
4684
4858
|
var Switch_default = Switch;
|
|
4685
4859
|
|
|
4686
4860
|
// src/components/Table/TableContext.tsx
|
|
4687
|
-
import
|
|
4688
|
-
var TableContext =
|
|
4861
|
+
import React33 from "react";
|
|
4862
|
+
var TableContext = React33.createContext(null);
|
|
4689
4863
|
var useTableContext = () => {
|
|
4690
|
-
const ctx =
|
|
4864
|
+
const ctx = React33.useContext(TableContext);
|
|
4691
4865
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
4692
4866
|
return ctx;
|
|
4693
4867
|
};
|
|
4694
4868
|
var TableContext_default = TableContext;
|
|
4695
4869
|
|
|
4696
4870
|
// src/components/Table/Table.tsx
|
|
4697
|
-
import { jsx as
|
|
4871
|
+
import { jsx as jsx340 } from "react/jsx-runtime";
|
|
4698
4872
|
var Table = (props) => {
|
|
4699
4873
|
const {
|
|
4700
4874
|
children,
|
|
4875
|
+
size = "md",
|
|
4701
4876
|
rowBorderUse = true,
|
|
4702
4877
|
colBorderUse = true,
|
|
4703
4878
|
headerSticky = false,
|
|
4704
4879
|
stickyShadow = true
|
|
4705
4880
|
} = props;
|
|
4706
|
-
return /* @__PURE__ */
|
|
4881
|
+
return /* @__PURE__ */ jsx340("div", { className: `lib-xplat-table-wrapper ${size}`, children: /* @__PURE__ */ jsx340(
|
|
4707
4882
|
TableContext_default.Provider,
|
|
4708
4883
|
{
|
|
4709
4884
|
value: {
|
|
@@ -4712,7 +4887,7 @@ var Table = (props) => {
|
|
|
4712
4887
|
headerSticky,
|
|
4713
4888
|
stickyShadow
|
|
4714
4889
|
},
|
|
4715
|
-
children: /* @__PURE__ */
|
|
4890
|
+
children: /* @__PURE__ */ jsx340("table", { className: "lib-xplat-table", children })
|
|
4716
4891
|
}
|
|
4717
4892
|
) });
|
|
4718
4893
|
};
|
|
@@ -4720,41 +4895,41 @@ Table.displayName = "Table";
|
|
|
4720
4895
|
var Table_default = Table;
|
|
4721
4896
|
|
|
4722
4897
|
// src/components/Table/TableBody.tsx
|
|
4723
|
-
import { jsx as
|
|
4898
|
+
import { jsx as jsx341 } from "react/jsx-runtime";
|
|
4724
4899
|
var TableBody = (props) => {
|
|
4725
4900
|
const { children } = props;
|
|
4726
|
-
return /* @__PURE__ */
|
|
4901
|
+
return /* @__PURE__ */ jsx341("tbody", { children });
|
|
4727
4902
|
};
|
|
4728
4903
|
TableBody.displayName = "TableBody";
|
|
4729
4904
|
var TableBody_default = TableBody;
|
|
4730
4905
|
|
|
4731
4906
|
// src/components/Table/TableCell.tsx
|
|
4732
|
-
import
|
|
4907
|
+
import React36 from "react";
|
|
4733
4908
|
|
|
4734
4909
|
// src/components/Table/TableHeadContext.tsx
|
|
4735
|
-
import
|
|
4736
|
-
var TableHeadContext =
|
|
4910
|
+
import React34 from "react";
|
|
4911
|
+
var TableHeadContext = React34.createContext(
|
|
4737
4912
|
null
|
|
4738
4913
|
);
|
|
4739
4914
|
var useTableHeadContext = () => {
|
|
4740
|
-
const ctx =
|
|
4915
|
+
const ctx = React34.useContext(TableHeadContext);
|
|
4741
4916
|
return ctx;
|
|
4742
4917
|
};
|
|
4743
4918
|
var TableHeadContext_default = TableHeadContext;
|
|
4744
4919
|
|
|
4745
4920
|
// src/components/Table/TableRowContext.tsx
|
|
4746
|
-
import
|
|
4747
|
-
var TableRowContext =
|
|
4921
|
+
import React35 from "react";
|
|
4922
|
+
var TableRowContext = React35.createContext(null);
|
|
4748
4923
|
var useTableRowContext = () => {
|
|
4749
|
-
const ctx =
|
|
4924
|
+
const ctx = React35.useContext(TableRowContext);
|
|
4750
4925
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
4751
4926
|
return ctx;
|
|
4752
4927
|
};
|
|
4753
4928
|
var TableRowContext_default = TableRowContext;
|
|
4754
4929
|
|
|
4755
4930
|
// src/components/Table/TableCell.tsx
|
|
4756
|
-
import { jsx as
|
|
4757
|
-
var TableCell =
|
|
4931
|
+
import { jsx as jsx342 } from "react/jsx-runtime";
|
|
4932
|
+
var TableCell = React36.memo((props) => {
|
|
4758
4933
|
const {
|
|
4759
4934
|
children,
|
|
4760
4935
|
align = "center",
|
|
@@ -4766,9 +4941,9 @@ var TableCell = React34.memo((props) => {
|
|
|
4766
4941
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
4767
4942
|
const { stickyShadow } = useTableContext();
|
|
4768
4943
|
const headContext = useTableHeadContext();
|
|
4769
|
-
const [left, setLeft] =
|
|
4770
|
-
const cellRef =
|
|
4771
|
-
const calculateLeft =
|
|
4944
|
+
const [left, setLeft] = React36.useState(0);
|
|
4945
|
+
const cellRef = React36.useRef(null);
|
|
4946
|
+
const calculateLeft = React36.useCallback(() => {
|
|
4772
4947
|
if (!cellRef.current) return 0;
|
|
4773
4948
|
let totalLeft = 0;
|
|
4774
4949
|
for (const ref of stickyCells) {
|
|
@@ -4777,7 +4952,7 @@ var TableCell = React34.memo((props) => {
|
|
|
4777
4952
|
}
|
|
4778
4953
|
return totalLeft;
|
|
4779
4954
|
}, [stickyCells]);
|
|
4780
|
-
|
|
4955
|
+
React36.useEffect(() => {
|
|
4781
4956
|
if (!isSticky || !cellRef.current) return;
|
|
4782
4957
|
registerStickyCell(cellRef);
|
|
4783
4958
|
setLeft(calculateLeft());
|
|
@@ -4795,7 +4970,7 @@ var TableCell = React34.memo((props) => {
|
|
|
4795
4970
|
const CellTag = cellRef.current?.tagName === "TH" ? "th" : "td";
|
|
4796
4971
|
const isLastSticky = isSticky && stickyCells[stickyCells.length - 1] === cellRef;
|
|
4797
4972
|
const enableHover = headContext && headContext.cellHover;
|
|
4798
|
-
return /* @__PURE__ */
|
|
4973
|
+
return /* @__PURE__ */ jsx342(
|
|
4799
4974
|
CellTag,
|
|
4800
4975
|
{
|
|
4801
4976
|
ref: cellRef,
|
|
@@ -4820,21 +4995,21 @@ TableCell.displayName = "TableCell";
|
|
|
4820
4995
|
var TableCell_default = TableCell;
|
|
4821
4996
|
|
|
4822
4997
|
// src/components/Table/TableHead.tsx
|
|
4823
|
-
import { jsx as
|
|
4998
|
+
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
4824
4999
|
var TableHead = ({
|
|
4825
5000
|
children,
|
|
4826
5001
|
cellHover = false
|
|
4827
5002
|
}) => {
|
|
4828
5003
|
const { headerSticky } = useTableContext();
|
|
4829
|
-
return /* @__PURE__ */
|
|
5004
|
+
return /* @__PURE__ */ jsx343(TableHeadContext_default.Provider, { value: { cellHover }, children: /* @__PURE__ */ jsx343("thead", { className: clsx_default(headerSticky ? "table-sticky" : null), children }) });
|
|
4830
5005
|
};
|
|
4831
5006
|
TableHead.displayName = "TableHead";
|
|
4832
5007
|
var TableHead_default = TableHead;
|
|
4833
5008
|
|
|
4834
5009
|
// src/components/Table/TableRow.tsx
|
|
4835
|
-
import
|
|
4836
|
-
import { jsx as
|
|
4837
|
-
var TableRow =
|
|
5010
|
+
import React37 from "react";
|
|
5011
|
+
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
5012
|
+
var TableRow = React37.memo((props) => {
|
|
4838
5013
|
const {
|
|
4839
5014
|
children,
|
|
4840
5015
|
type = "secondary",
|
|
@@ -4842,14 +5017,14 @@ var TableRow = React35.memo((props) => {
|
|
|
4842
5017
|
onClick
|
|
4843
5018
|
} = props;
|
|
4844
5019
|
const { rowBorderUse } = useTableContext();
|
|
4845
|
-
const [stickyCells, setStickyCells] =
|
|
5020
|
+
const [stickyCells, setStickyCells] = React37.useState([]);
|
|
4846
5021
|
const registerStickyCell = (ref) => {
|
|
4847
5022
|
setStickyCells((prev) => {
|
|
4848
5023
|
if (prev.includes(ref)) return prev;
|
|
4849
5024
|
return [...prev, ref];
|
|
4850
5025
|
});
|
|
4851
5026
|
};
|
|
4852
|
-
return /* @__PURE__ */
|
|
5027
|
+
return /* @__PURE__ */ jsx344(TableRowContext_default.Provider, { value: { stickyCells, registerStickyCell }, children: /* @__PURE__ */ jsx344(
|
|
4853
5028
|
"tr",
|
|
4854
5029
|
{
|
|
4855
5030
|
className: clsx_default(
|
|
@@ -4867,7 +5042,7 @@ TableRow.displayName = "TableRow";
|
|
|
4867
5042
|
var TableRow_default = TableRow;
|
|
4868
5043
|
|
|
4869
5044
|
// src/components/Tag/Tag.tsx
|
|
4870
|
-
import { jsx as
|
|
5045
|
+
import { jsx as jsx345, jsxs as jsxs219 } from "react/jsx-runtime";
|
|
4871
5046
|
var Tag = (props) => {
|
|
4872
5047
|
const {
|
|
4873
5048
|
children,
|
|
@@ -4877,7 +5052,7 @@ var Tag = (props) => {
|
|
|
4877
5052
|
disabled = false,
|
|
4878
5053
|
colorIndex
|
|
4879
5054
|
} = props;
|
|
4880
|
-
return /* @__PURE__ */
|
|
5055
|
+
return /* @__PURE__ */ jsxs219(
|
|
4881
5056
|
"span",
|
|
4882
5057
|
{
|
|
4883
5058
|
className: clsx_default(
|
|
@@ -4888,8 +5063,8 @@ var Tag = (props) => {
|
|
|
4888
5063
|
disabled && "disabled"
|
|
4889
5064
|
),
|
|
4890
5065
|
children: [
|
|
4891
|
-
/* @__PURE__ */
|
|
4892
|
-
onClose && /* @__PURE__ */
|
|
5066
|
+
/* @__PURE__ */ jsx345("span", { className: "tag-label", children }),
|
|
5067
|
+
onClose && /* @__PURE__ */ jsx345("button", { className: "tag-close", onClick: onClose, "aria-label": "\uC0AD\uC81C", disabled, children: /* @__PURE__ */ jsx345(XIcon_default, {}) })
|
|
4893
5068
|
]
|
|
4894
5069
|
}
|
|
4895
5070
|
);
|
|
@@ -4897,83 +5072,26 @@ var Tag = (props) => {
|
|
|
4897
5072
|
Tag.displayName = "Tag";
|
|
4898
5073
|
var Tag_default = Tag;
|
|
4899
5074
|
|
|
4900
|
-
// src/components/TextArea/TextArea.tsx
|
|
4901
|
-
import React36 from "react";
|
|
4902
|
-
import { jsx as jsx344 } from "react/jsx-runtime";
|
|
4903
|
-
var TextArea = React36.forwardRef(
|
|
4904
|
-
(props, ref) => {
|
|
4905
|
-
const { value, onChange, disabled, ...textareaProps } = props;
|
|
4906
|
-
const localRef = React36.useRef(null);
|
|
4907
|
-
const setRefs = (el) => {
|
|
4908
|
-
localRef.current = el;
|
|
4909
|
-
if (!ref) return;
|
|
4910
|
-
if (typeof ref === "function") {
|
|
4911
|
-
ref(el);
|
|
4912
|
-
} else if (ref && typeof ref === "object" && "current" in ref) {
|
|
4913
|
-
ref.current = el;
|
|
4914
|
-
}
|
|
4915
|
-
};
|
|
4916
|
-
const handleOnChange = (e) => {
|
|
4917
|
-
const val = e.target.value;
|
|
4918
|
-
if (onChange) {
|
|
4919
|
-
const event = {
|
|
4920
|
-
...e,
|
|
4921
|
-
target: { value: val }
|
|
4922
|
-
};
|
|
4923
|
-
onChange(event);
|
|
4924
|
-
}
|
|
4925
|
-
};
|
|
4926
|
-
React36.useEffect(() => {
|
|
4927
|
-
const el = localRef.current;
|
|
4928
|
-
if (!el) return;
|
|
4929
|
-
el.style.height = "0px";
|
|
4930
|
-
const nextHeight = Math.min(el.scrollHeight, 400);
|
|
4931
|
-
el.style.height = `${nextHeight}px`;
|
|
4932
|
-
}, [value]);
|
|
4933
|
-
return /* @__PURE__ */ jsx344("div", { className: "lib-xplat-textarea-wrapper", children: /* @__PURE__ */ jsx344(
|
|
4934
|
-
"div",
|
|
4935
|
-
{
|
|
4936
|
-
className: clsx_default(
|
|
4937
|
-
"lib-xplat-textarea",
|
|
4938
|
-
disabled ? "disabled" : void 0
|
|
4939
|
-
),
|
|
4940
|
-
children: /* @__PURE__ */ jsx344(
|
|
4941
|
-
"textarea",
|
|
4942
|
-
{
|
|
4943
|
-
...textareaProps,
|
|
4944
|
-
ref: setRefs,
|
|
4945
|
-
disabled,
|
|
4946
|
-
value,
|
|
4947
|
-
onChange: handleOnChange
|
|
4948
|
-
}
|
|
4949
|
-
)
|
|
4950
|
-
}
|
|
4951
|
-
) });
|
|
4952
|
-
}
|
|
4953
|
-
);
|
|
4954
|
-
TextArea.displayName = "TextArea";
|
|
4955
|
-
var TextArea_default = TextArea;
|
|
4956
|
-
|
|
4957
5075
|
// src/components/Toast/Toast.tsx
|
|
4958
|
-
import
|
|
5076
|
+
import React38 from "react";
|
|
4959
5077
|
import { createPortal as createPortal3 } from "react-dom";
|
|
4960
|
-
import { jsx as
|
|
4961
|
-
var ToastContext =
|
|
5078
|
+
import { jsx as jsx346, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
5079
|
+
var ToastContext = React38.createContext(null);
|
|
4962
5080
|
var useToast = () => {
|
|
4963
|
-
const ctx =
|
|
5081
|
+
const ctx = React38.useContext(ToastContext);
|
|
4964
5082
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
4965
5083
|
return ctx;
|
|
4966
5084
|
};
|
|
4967
5085
|
var EXIT_DURATION = 300;
|
|
4968
5086
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
4969
|
-
const ref =
|
|
4970
|
-
const [height, setHeight] =
|
|
4971
|
-
|
|
5087
|
+
const ref = React38.useRef(null);
|
|
5088
|
+
const [height, setHeight] = React38.useState(void 0);
|
|
5089
|
+
React38.useEffect(() => {
|
|
4972
5090
|
if (ref.current && !isExiting) {
|
|
4973
5091
|
setHeight(ref.current.offsetHeight);
|
|
4974
5092
|
}
|
|
4975
5093
|
}, [isExiting]);
|
|
4976
|
-
return /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ jsx346(
|
|
4977
5095
|
"div",
|
|
4978
5096
|
{
|
|
4979
5097
|
className: clsx_default("lib-xplat-toast-wrapper", { exit: isExiting }),
|
|
@@ -4981,15 +5099,15 @@ var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
|
4981
5099
|
maxHeight: isExiting ? 0 : height ?? "none",
|
|
4982
5100
|
marginBottom: isExiting ? 0 : void 0
|
|
4983
5101
|
},
|
|
4984
|
-
children: /* @__PURE__ */
|
|
5102
|
+
children: /* @__PURE__ */ jsxs220(
|
|
4985
5103
|
"div",
|
|
4986
5104
|
{
|
|
4987
5105
|
ref,
|
|
4988
5106
|
className: clsx_default("lib-xplat-toast", item.type, { exit: isExiting }),
|
|
4989
5107
|
role: "alert",
|
|
4990
5108
|
children: [
|
|
4991
|
-
/* @__PURE__ */
|
|
4992
|
-
/* @__PURE__ */
|
|
5109
|
+
/* @__PURE__ */ jsx346("span", { className: "message", children: item.message }),
|
|
5110
|
+
/* @__PURE__ */ jsx346("button", { className: "close-btn", onClick: onClose, "aria-label": "\uB2EB\uAE30", children: "\xD7" })
|
|
4993
5111
|
]
|
|
4994
5112
|
}
|
|
4995
5113
|
)
|
|
@@ -5000,13 +5118,13 @@ var ToastProvider = ({
|
|
|
5000
5118
|
children,
|
|
5001
5119
|
position = "top-right"
|
|
5002
5120
|
}) => {
|
|
5003
|
-
const [toasts, setToasts] =
|
|
5004
|
-
const [removing, setRemoving] =
|
|
5005
|
-
const [mounted, setMounted] =
|
|
5006
|
-
|
|
5121
|
+
const [toasts, setToasts] = React38.useState([]);
|
|
5122
|
+
const [removing, setRemoving] = React38.useState(/* @__PURE__ */ new Set());
|
|
5123
|
+
const [mounted, setMounted] = React38.useState(false);
|
|
5124
|
+
React38.useEffect(() => {
|
|
5007
5125
|
setMounted(true);
|
|
5008
5126
|
}, []);
|
|
5009
|
-
const remove =
|
|
5127
|
+
const remove = React38.useCallback((id) => {
|
|
5010
5128
|
setRemoving((prev) => new Set(prev).add(id));
|
|
5011
5129
|
setTimeout(() => {
|
|
5012
5130
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -5017,7 +5135,7 @@ var ToastProvider = ({
|
|
|
5017
5135
|
});
|
|
5018
5136
|
}, EXIT_DURATION);
|
|
5019
5137
|
}, []);
|
|
5020
|
-
const toast =
|
|
5138
|
+
const toast = React38.useCallback(
|
|
5021
5139
|
(type, message, duration = 3e3) => {
|
|
5022
5140
|
const id = `${Date.now()}-${Math.random()}`;
|
|
5023
5141
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -5027,10 +5145,10 @@ var ToastProvider = ({
|
|
|
5027
5145
|
},
|
|
5028
5146
|
[remove]
|
|
5029
5147
|
);
|
|
5030
|
-
return /* @__PURE__ */
|
|
5148
|
+
return /* @__PURE__ */ jsxs220(ToastContext.Provider, { value: { toast }, children: [
|
|
5031
5149
|
children,
|
|
5032
5150
|
mounted && createPortal3(
|
|
5033
|
-
/* @__PURE__ */
|
|
5151
|
+
/* @__PURE__ */ jsx346("div", { className: clsx_default("lib-xplat-toast-container", position), children: toasts.map((t) => /* @__PURE__ */ jsx346(
|
|
5034
5152
|
ToastItemComponent,
|
|
5035
5153
|
{
|
|
5036
5154
|
item: t,
|
|
@@ -5046,29 +5164,29 @@ var ToastProvider = ({
|
|
|
5046
5164
|
ToastProvider.displayName = "ToastProvider";
|
|
5047
5165
|
|
|
5048
5166
|
// src/components/Tooltip/Tooltip.tsx
|
|
5049
|
-
import
|
|
5050
|
-
import { jsx as
|
|
5167
|
+
import React39 from "react";
|
|
5168
|
+
import { jsx as jsx347, jsxs as jsxs221 } from "react/jsx-runtime";
|
|
5051
5169
|
var Tooltip = (props) => {
|
|
5052
5170
|
const {
|
|
5053
5171
|
type = "primary",
|
|
5054
5172
|
description,
|
|
5055
5173
|
children
|
|
5056
5174
|
} = props;
|
|
5057
|
-
const iconRef =
|
|
5058
|
-
return /* @__PURE__ */
|
|
5059
|
-
/* @__PURE__ */
|
|
5060
|
-
/* @__PURE__ */
|
|
5175
|
+
const iconRef = React39.useRef(null);
|
|
5176
|
+
return /* @__PURE__ */ jsxs221("div", { className: "lib-xplat-tooltip", children: [
|
|
5177
|
+
/* @__PURE__ */ jsx347("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
5178
|
+
/* @__PURE__ */ jsx347("div", { className: clsx_default("tooltip-wrapper", type), children: description })
|
|
5061
5179
|
] });
|
|
5062
5180
|
};
|
|
5063
5181
|
Tooltip.displayName = "Tooltip";
|
|
5064
5182
|
var Tooltip_default = Tooltip;
|
|
5065
5183
|
|
|
5066
5184
|
// src/components/Video/Video.tsx
|
|
5067
|
-
import
|
|
5068
|
-
import { jsx as
|
|
5069
|
-
var PipIcon = () => /* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5071
|
-
/* @__PURE__ */
|
|
5185
|
+
import React40 from "react";
|
|
5186
|
+
import { jsx as jsx348, jsxs as jsxs222 } from "react/jsx-runtime";
|
|
5187
|
+
var PipIcon = () => /* @__PURE__ */ jsxs222("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
5188
|
+
/* @__PURE__ */ jsx348("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
5189
|
+
/* @__PURE__ */ jsx348("rect", { x: "12", y: "11", width: "7", height: "6", rx: "1", fill: "currentColor" })
|
|
5072
5190
|
] });
|
|
5073
5191
|
var formatTime = (sec) => {
|
|
5074
5192
|
if (!Number.isFinite(sec) || sec < 0) return "0:00";
|
|
@@ -5076,7 +5194,7 @@ var formatTime = (sec) => {
|
|
|
5076
5194
|
const s = Math.floor(sec % 60);
|
|
5077
5195
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
5078
5196
|
};
|
|
5079
|
-
var Video =
|
|
5197
|
+
var Video = React40.forwardRef((props, ref) => {
|
|
5080
5198
|
const {
|
|
5081
5199
|
src,
|
|
5082
5200
|
poster,
|
|
@@ -5100,21 +5218,21 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5100
5218
|
children,
|
|
5101
5219
|
...rest
|
|
5102
5220
|
} = props;
|
|
5103
|
-
const containerRef =
|
|
5104
|
-
const videoRef =
|
|
5105
|
-
const [isPlaying, setIsPlaying] =
|
|
5106
|
-
const [isLoaded, setIsLoaded] =
|
|
5107
|
-
const [currentTime, setCurrentTime] =
|
|
5108
|
-
const [duration, setDuration] =
|
|
5109
|
-
const [buffered, setBuffered] =
|
|
5110
|
-
const [volume, setVolume] =
|
|
5111
|
-
const [isMuted, setIsMuted] =
|
|
5112
|
-
const [isFullscreen, setIsFullscreen] =
|
|
5113
|
-
const [playbackRate, setPlaybackRate] =
|
|
5114
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
5115
|
-
const [captionsOn, setCaptionsOn] =
|
|
5116
|
-
const [isPip, setIsPip] =
|
|
5117
|
-
const setRefs =
|
|
5221
|
+
const containerRef = React40.useRef(null);
|
|
5222
|
+
const videoRef = React40.useRef(null);
|
|
5223
|
+
const [isPlaying, setIsPlaying] = React40.useState(Boolean(autoPlay));
|
|
5224
|
+
const [isLoaded, setIsLoaded] = React40.useState(false);
|
|
5225
|
+
const [currentTime, setCurrentTime] = React40.useState(0);
|
|
5226
|
+
const [duration, setDuration] = React40.useState(0);
|
|
5227
|
+
const [buffered, setBuffered] = React40.useState(0);
|
|
5228
|
+
const [volume, setVolume] = React40.useState(1);
|
|
5229
|
+
const [isMuted, setIsMuted] = React40.useState(Boolean(muted));
|
|
5230
|
+
const [isFullscreen, setIsFullscreen] = React40.useState(false);
|
|
5231
|
+
const [playbackRate, setPlaybackRate] = React40.useState(1);
|
|
5232
|
+
const [rateMenuOpen, setRateMenuOpen] = React40.useState(false);
|
|
5233
|
+
const [captionsOn, setCaptionsOn] = React40.useState(false);
|
|
5234
|
+
const [isPip, setIsPip] = React40.useState(false);
|
|
5235
|
+
const setRefs = React40.useCallback(
|
|
5118
5236
|
(el) => {
|
|
5119
5237
|
videoRef.current = el;
|
|
5120
5238
|
if (typeof ref === "function") ref(el);
|
|
@@ -5122,14 +5240,14 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5122
5240
|
},
|
|
5123
5241
|
[ref]
|
|
5124
5242
|
);
|
|
5125
|
-
|
|
5243
|
+
React40.useEffect(() => {
|
|
5126
5244
|
const onFsChange = () => {
|
|
5127
5245
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
5128
5246
|
};
|
|
5129
5247
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
5130
5248
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
5131
5249
|
}, []);
|
|
5132
|
-
|
|
5250
|
+
React40.useEffect(() => {
|
|
5133
5251
|
const v = videoRef.current;
|
|
5134
5252
|
if (!v) return;
|
|
5135
5253
|
const onEnter = () => setIsPip(true);
|
|
@@ -5243,13 +5361,13 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5243
5361
|
const volumePct = (isMuted ? 0 : volume) * 100;
|
|
5244
5362
|
const VolumeGlyph = isMuted || volume === 0 ? VolumeXIcon_default : volume < 0.5 ? VolumeIcon_default : Volume2Icon_default;
|
|
5245
5363
|
const pipSupported = typeof document !== "undefined" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled;
|
|
5246
|
-
return /* @__PURE__ */
|
|
5364
|
+
return /* @__PURE__ */ jsxs222(
|
|
5247
5365
|
"div",
|
|
5248
5366
|
{
|
|
5249
5367
|
ref: containerRef,
|
|
5250
5368
|
className: clsx_default("lib-xplat-video", showControls && "has-controls"),
|
|
5251
5369
|
children: [
|
|
5252
|
-
/* @__PURE__ */
|
|
5370
|
+
/* @__PURE__ */ jsx348(
|
|
5253
5371
|
"video",
|
|
5254
5372
|
{
|
|
5255
5373
|
ref: setRefs,
|
|
@@ -5270,7 +5388,7 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5270
5388
|
children
|
|
5271
5389
|
}
|
|
5272
5390
|
),
|
|
5273
|
-
showCenterPlay && /* @__PURE__ */
|
|
5391
|
+
showCenterPlay && /* @__PURE__ */ jsx348(
|
|
5274
5392
|
"button",
|
|
5275
5393
|
{
|
|
5276
5394
|
type: "button",
|
|
@@ -5282,11 +5400,11 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5282
5400
|
onClick: togglePlay,
|
|
5283
5401
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
5284
5402
|
tabIndex: -1,
|
|
5285
|
-
children: /* @__PURE__ */
|
|
5403
|
+
children: /* @__PURE__ */ jsx348("span", { className: "center-play-icon", children: /* @__PURE__ */ jsx348(PlayCircleIcon_default, {}) })
|
|
5286
5404
|
}
|
|
5287
5405
|
),
|
|
5288
|
-
showControls && /* @__PURE__ */
|
|
5289
|
-
/* @__PURE__ */
|
|
5406
|
+
showControls && /* @__PURE__ */ jsxs222("div", { className: "controls", onClick: (e) => e.stopPropagation(), children: [
|
|
5407
|
+
/* @__PURE__ */ jsx348(
|
|
5290
5408
|
"input",
|
|
5291
5409
|
{
|
|
5292
5410
|
type: "range",
|
|
@@ -5303,29 +5421,29 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5303
5421
|
}
|
|
5304
5422
|
}
|
|
5305
5423
|
),
|
|
5306
|
-
/* @__PURE__ */
|
|
5307
|
-
/* @__PURE__ */
|
|
5424
|
+
/* @__PURE__ */ jsxs222("div", { className: "controls-row", children: [
|
|
5425
|
+
/* @__PURE__ */ jsx348(
|
|
5308
5426
|
"button",
|
|
5309
5427
|
{
|
|
5310
5428
|
type: "button",
|
|
5311
5429
|
className: "control-btn",
|
|
5312
5430
|
onClick: togglePlay,
|
|
5313
5431
|
"aria-label": isPlaying ? "\uC77C\uC2DC\uC815\uC9C0" : "\uC7AC\uC0DD",
|
|
5314
|
-
children: isPlaying ? /* @__PURE__ */
|
|
5432
|
+
children: isPlaying ? /* @__PURE__ */ jsx348(PauseIcon_default, {}) : /* @__PURE__ */ jsx348(PlayIcon_default, {})
|
|
5315
5433
|
}
|
|
5316
5434
|
),
|
|
5317
|
-
/* @__PURE__ */
|
|
5318
|
-
/* @__PURE__ */
|
|
5435
|
+
/* @__PURE__ */ jsxs222("div", { className: "volume-group", children: [
|
|
5436
|
+
/* @__PURE__ */ jsx348(
|
|
5319
5437
|
"button",
|
|
5320
5438
|
{
|
|
5321
5439
|
type: "button",
|
|
5322
5440
|
className: "control-btn",
|
|
5323
5441
|
onClick: toggleMute,
|
|
5324
5442
|
"aria-label": isMuted ? "\uC74C\uC18C\uAC70 \uD574\uC81C" : "\uC74C\uC18C\uAC70",
|
|
5325
|
-
children: /* @__PURE__ */
|
|
5443
|
+
children: /* @__PURE__ */ jsx348(VolumeGlyph, {})
|
|
5326
5444
|
}
|
|
5327
5445
|
),
|
|
5328
|
-
/* @__PURE__ */
|
|
5446
|
+
/* @__PURE__ */ jsx348(
|
|
5329
5447
|
"input",
|
|
5330
5448
|
{
|
|
5331
5449
|
type: "range",
|
|
@@ -5340,14 +5458,14 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5340
5458
|
}
|
|
5341
5459
|
)
|
|
5342
5460
|
] }),
|
|
5343
|
-
/* @__PURE__ */
|
|
5461
|
+
/* @__PURE__ */ jsxs222("span", { className: "time", children: [
|
|
5344
5462
|
formatTime(currentTime),
|
|
5345
5463
|
" / ",
|
|
5346
5464
|
formatTime(duration)
|
|
5347
5465
|
] }),
|
|
5348
|
-
/* @__PURE__ */
|
|
5349
|
-
playbackRates && playbackRates.length > 0 && /* @__PURE__ */
|
|
5350
|
-
/* @__PURE__ */
|
|
5466
|
+
/* @__PURE__ */ jsx348("div", { className: "controls-spacer" }),
|
|
5467
|
+
playbackRates && playbackRates.length > 0 && /* @__PURE__ */ jsxs222("div", { className: clsx_default("rate-group", rateMenuOpen && "is-open"), children: [
|
|
5468
|
+
/* @__PURE__ */ jsxs222(
|
|
5351
5469
|
"button",
|
|
5352
5470
|
{
|
|
5353
5471
|
type: "button",
|
|
@@ -5361,7 +5479,7 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5361
5479
|
]
|
|
5362
5480
|
}
|
|
5363
5481
|
),
|
|
5364
|
-
rateMenuOpen && /* @__PURE__ */
|
|
5482
|
+
rateMenuOpen && /* @__PURE__ */ jsx348("ul", { className: "rate-menu", role: "menu", children: playbackRates.map((r2) => /* @__PURE__ */ jsx348("li", { children: /* @__PURE__ */ jsxs222(
|
|
5365
5483
|
"button",
|
|
5366
5484
|
{
|
|
5367
5485
|
type: "button",
|
|
@@ -5375,7 +5493,7 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5375
5493
|
}
|
|
5376
5494
|
) }, r2)) })
|
|
5377
5495
|
] }),
|
|
5378
|
-
showCaptions && /* @__PURE__ */
|
|
5496
|
+
showCaptions && /* @__PURE__ */ jsx348(
|
|
5379
5497
|
"button",
|
|
5380
5498
|
{
|
|
5381
5499
|
type: "button",
|
|
@@ -5383,37 +5501,37 @@ var Video = React39.forwardRef((props, ref) => {
|
|
|
5383
5501
|
onClick: toggleCaptions,
|
|
5384
5502
|
"aria-label": captionsOn ? "\uC790\uB9C9 \uB044\uAE30" : "\uC790\uB9C9 \uCF1C\uAE30",
|
|
5385
5503
|
"aria-pressed": captionsOn,
|
|
5386
|
-
children: /* @__PURE__ */
|
|
5504
|
+
children: /* @__PURE__ */ jsx348(TypeIcon_default, {})
|
|
5387
5505
|
}
|
|
5388
5506
|
),
|
|
5389
|
-
showPip && pipSupported && /* @__PURE__ */
|
|
5507
|
+
showPip && pipSupported && /* @__PURE__ */ jsx348(
|
|
5390
5508
|
"button",
|
|
5391
5509
|
{
|
|
5392
5510
|
type: "button",
|
|
5393
5511
|
className: clsx_default("control-btn", isPip && "is-active"),
|
|
5394
5512
|
onClick: togglePip,
|
|
5395
5513
|
"aria-label": isPip ? "PIP \uC885\uB8CC" : "PIP",
|
|
5396
|
-
children: /* @__PURE__ */
|
|
5514
|
+
children: /* @__PURE__ */ jsx348(PipIcon, {})
|
|
5397
5515
|
}
|
|
5398
5516
|
),
|
|
5399
|
-
showDownload && /* @__PURE__ */
|
|
5517
|
+
showDownload && /* @__PURE__ */ jsx348(
|
|
5400
5518
|
"a",
|
|
5401
5519
|
{
|
|
5402
5520
|
className: "control-btn",
|
|
5403
5521
|
href: src,
|
|
5404
5522
|
download: downloadFileName ?? true,
|
|
5405
5523
|
"aria-label": "\uB2E4\uC6B4\uB85C\uB4DC",
|
|
5406
|
-
children: /* @__PURE__ */
|
|
5524
|
+
children: /* @__PURE__ */ jsx348(DownloadIcon_default, {})
|
|
5407
5525
|
}
|
|
5408
5526
|
),
|
|
5409
|
-
/* @__PURE__ */
|
|
5527
|
+
/* @__PURE__ */ jsx348(
|
|
5410
5528
|
"button",
|
|
5411
5529
|
{
|
|
5412
5530
|
type: "button",
|
|
5413
5531
|
className: "control-btn",
|
|
5414
5532
|
onClick: toggleFullscreen,
|
|
5415
5533
|
"aria-label": isFullscreen ? "\uC804\uCCB4\uD654\uBA74 \uC885\uB8CC" : "\uC804\uCCB4\uD654\uBA74",
|
|
5416
|
-
children: isFullscreen ? /* @__PURE__ */
|
|
5534
|
+
children: isFullscreen ? /* @__PURE__ */ jsx348(MinimizeIcon_default, {}) : /* @__PURE__ */ jsx348(MaximizeIcon_default, {})
|
|
5417
5535
|
}
|
|
5418
5536
|
)
|
|
5419
5537
|
] })
|
|
@@ -5435,6 +5553,7 @@ export {
|
|
|
5435
5553
|
Calendar_default as Calendar,
|
|
5436
5554
|
CardTab_default as CardTab,
|
|
5437
5555
|
Chart_default as Chart,
|
|
5556
|
+
ChatInput_default as ChatInput,
|
|
5438
5557
|
CheckBox_default as CheckBox,
|
|
5439
5558
|
Chip_default as Chip,
|
|
5440
5559
|
Divider_default as Divider,
|