@x-plat/design-system 0.8.3 → 0.10.0
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/AutoResizeTextArea/index.cjs +140 -4
- package/dist/components/AutoResizeTextArea/index.css +38 -0
- package/dist/components/AutoResizeTextArea/index.d.cts +4 -0
- package/dist/components/AutoResizeTextArea/index.d.ts +4 -0
- package/dist/components/AutoResizeTextArea/index.js +140 -4
- package/dist/components/Badge/index.cjs +5 -1
- package/dist/components/Badge/index.css +1 -0
- package/dist/components/Badge/index.d.cts +1 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +5 -1
- package/dist/components/Box/index.d.cts +3 -0
- package/dist/components/Box/index.d.ts +3 -0
- package/dist/components/Chart/index.cjs +7 -6
- package/dist/components/Chart/index.d.cts +12 -1
- package/dist/components/Chart/index.d.ts +12 -1
- package/dist/components/Chart/index.js +7 -6
- package/dist/components/ChatInput/index.cjs +150 -9
- package/dist/components/ChatInput/index.css +38 -0
- package/dist/components/ChatInput/index.d.cts +9 -0
- package/dist/components/ChatInput/index.d.ts +9 -0
- package/dist/components/ChatInput/index.js +151 -10
- package/dist/components/CheckBox/index.cjs +137 -6
- package/dist/components/CheckBox/index.css +40 -0
- package/dist/components/CheckBox/index.d.cts +13 -2
- package/dist/components/CheckBox/index.d.ts +13 -2
- package/dist/components/CheckBox/index.js +137 -6
- package/dist/components/Chip/index.d.cts +2 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/DatePicker/index.cjs +76 -62
- package/dist/components/DatePicker/index.css +38 -31
- package/dist/components/DatePicker/index.js +42 -28
- package/dist/components/Drawer/index.d.cts +1 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/FieldMessage/index.cjs +183 -0
- package/dist/components/FieldMessage/index.css +37 -0
- package/dist/components/FieldMessage/index.d.cts +37 -0
- package/dist/components/FieldMessage/index.d.ts +37 -0
- package/dist/components/FieldMessage/index.js +154 -0
- package/dist/components/FileUpload/index.cjs +135 -8
- package/dist/components/FileUpload/index.css +38 -0
- package/dist/components/FileUpload/index.d.cts +9 -0
- package/dist/components/FileUpload/index.d.ts +9 -0
- package/dist/components/FileUpload/index.js +135 -8
- package/dist/components/ImageSelector/index.cjs +153 -11
- package/dist/components/ImageSelector/index.css +38 -0
- package/dist/components/ImageSelector/index.d.cts +6 -0
- package/dist/components/ImageSelector/index.d.ts +6 -0
- package/dist/components/ImageSelector/index.js +153 -11
- package/dist/components/Input/index.cjs +38 -25
- package/dist/components/Input/index.css +38 -31
- package/dist/components/Input/index.d.cts +7 -8
- package/dist/components/Input/index.d.ts +7 -8
- package/dist/components/Input/index.js +36 -23
- package/dist/components/NotificationBadge/index.cjs +5 -1
- package/dist/components/NotificationBadge/index.css +1 -0
- package/dist/components/NotificationBadge/index.d.cts +6 -2
- package/dist/components/NotificationBadge/index.d.ts +6 -2
- package/dist/components/NotificationBadge/index.js +5 -1
- package/dist/components/Pagination/index.cjs +6 -2
- package/dist/components/Pagination/index.css +1 -0
- package/dist/components/Pagination/index.d.cts +13 -2
- package/dist/components/Pagination/index.d.ts +13 -2
- package/dist/components/Pagination/index.js +6 -2
- package/dist/components/Progress/index.cjs +6 -2
- package/dist/components/Progress/index.css +1 -0
- package/dist/components/Progress/index.d.cts +11 -2
- package/dist/components/Progress/index.d.ts +11 -2
- package/dist/components/Progress/index.js +6 -2
- package/dist/components/Radio/index.cjs +158 -10
- package/dist/components/Radio/index.css +40 -0
- package/dist/components/Radio/index.d.cts +14 -2
- package/dist/components/Radio/index.d.ts +14 -2
- package/dist/components/Radio/index.js +158 -10
- package/dist/components/Select/index.cjs +139 -13
- package/dist/components/Select/index.css +38 -0
- package/dist/components/Select/index.d.cts +8 -1
- package/dist/components/Select/index.d.ts +8 -1
- package/dist/components/Select/index.js +139 -13
- package/dist/components/Skeleton/index.d.cts +3 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Spinner/index.cjs +6 -2
- package/dist/components/Spinner/index.css +1 -0
- package/dist/components/Spinner/index.d.cts +8 -2
- package/dist/components/Spinner/index.d.ts +8 -2
- package/dist/components/Spinner/index.js +6 -2
- package/dist/components/Steps/index.cjs +6 -2
- package/dist/components/Steps/index.css +11 -0
- package/dist/components/Steps/index.d.cts +9 -2
- package/dist/components/Steps/index.d.ts +9 -2
- package/dist/components/Steps/index.js +6 -2
- package/dist/components/Switch/index.cjs +146 -6
- package/dist/components/Switch/index.css +40 -0
- package/dist/components/Switch/index.d.cts +13 -2
- package/dist/components/Switch/index.d.ts +13 -2
- package/dist/components/Switch/index.js +146 -6
- package/dist/components/Tab/index.cjs +4 -3
- package/dist/components/Tab/index.d.cts +12 -1
- package/dist/components/Tab/index.d.ts +12 -1
- package/dist/components/Tab/index.js +4 -3
- package/dist/components/Tag/index.cjs +5 -3
- package/dist/components/Tag/index.d.cts +12 -2
- package/dist/components/Tag/index.d.ts +12 -2
- package/dist/components/Tag/index.js +5 -3
- package/dist/components/TextArea/index.cjs +138 -2
- package/dist/components/TextArea/index.css +38 -0
- package/dist/components/TextArea/index.d.cts +6 -0
- package/dist/components/TextArea/index.d.ts +6 -0
- package/dist/components/TextArea/index.js +138 -2
- package/dist/components/Tooltip/index.cjs +4 -2
- package/dist/components/Tooltip/index.d.cts +11 -1
- package/dist/components/Tooltip/index.d.ts +11 -1
- package/dist/components/Tooltip/index.js +4 -2
- package/dist/components/index.cjs +479 -408
- package/dist/components/index.css +59 -31
- package/dist/components/index.d.cts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +262 -194
- package/dist/index.cjs +484 -413
- package/dist/index.css +59 -31
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +264 -196
- package/dist/status-g_KP3qT6.d.cts +8 -0
- package/dist/status-g_KP3qT6.d.ts +8 -0
- package/dist/validation-Dqo1zqhT.d.cts +13 -0
- package/dist/validation-Dqo1zqhT.d.ts +13 -0
- package/guidelines/AGENT_PROMPT.md +15 -0
- package/guidelines/components/card.md +3 -3
- package/guidelines/components/feedback.md +1 -1
- package/guidelines/components/form.md +26 -0
- package/guidelines/components/navigation.md +16 -15
- package/guidelines/components/overlay.md +43 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -165,6 +165,8 @@ __export(index_exports, {
|
|
|
165
165
|
FacebookIcon: () => FacebookIcon_default,
|
|
166
166
|
FastForwardIcon: () => FastForwardIcon_default,
|
|
167
167
|
FeatherIcon: () => FeatherIcon_default,
|
|
168
|
+
Field: () => Field,
|
|
169
|
+
FieldMessage: () => FieldMessage_default,
|
|
168
170
|
FigmaIcon: () => FigmaIcon_default,
|
|
169
171
|
FileIcon: () => FileIcon_default,
|
|
170
172
|
FileMinusIcon: () => FileMinusIcon_default,
|
|
@@ -393,6 +395,7 @@ __export(index_exports, {
|
|
|
393
395
|
breakpoints: () => breakpoints,
|
|
394
396
|
cssVar: () => import_tokens_core2.cssVar,
|
|
395
397
|
gridColumns: () => gridColumns,
|
|
398
|
+
hasError: () => hasError,
|
|
396
399
|
isInRange: () => isInRange,
|
|
397
400
|
isSameDay: () => isSameDay,
|
|
398
401
|
semantic: () => import_tokens_core.semantic,
|
|
@@ -5999,11 +6002,49 @@ var Alert_default = Alert;
|
|
|
5999
6002
|
|
|
6000
6003
|
// src/components/AutoResizeTextArea/AutoResizeTextArea.tsx
|
|
6001
6004
|
var import_react2 = __toESM(require("react"), 1);
|
|
6005
|
+
|
|
6006
|
+
// src/components/FieldMessage/FieldMessage.tsx
|
|
6002
6007
|
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
6008
|
+
var ICON = {
|
|
6009
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(InfoIcon_default, {}),
|
|
6010
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(SuccessIcon_default, {}),
|
|
6011
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(InfoIcon_default, {}),
|
|
6012
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(ErrorIcon_default, {})
|
|
6013
|
+
};
|
|
6014
|
+
var FieldMessage = (props) => {
|
|
6015
|
+
const { validations } = props;
|
|
6016
|
+
if (!validations || validations.length === 0) return null;
|
|
6017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: "lib-xplat-field-message-wrap", children: validations.map((v, idx) => /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
6018
|
+
"div",
|
|
6019
|
+
{
|
|
6020
|
+
className: clsx_default("lib-xplat-field-message", v.status),
|
|
6021
|
+
children: [
|
|
6022
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)("div", { className: "icon", children: ICON[v.status] }),
|
|
6023
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)("span", { children: v.message })
|
|
6024
|
+
]
|
|
6025
|
+
},
|
|
6026
|
+
`${v.message}_${idx}`
|
|
6027
|
+
)) });
|
|
6028
|
+
};
|
|
6029
|
+
FieldMessage.displayName = "FieldMessage";
|
|
6030
|
+
var FieldMessage_default = FieldMessage;
|
|
6031
|
+
var Field = (props) => {
|
|
6032
|
+
const { validations, children } = props;
|
|
6033
|
+
if (!validations || validations.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(import_jsx_runtime297.Fragment, { children });
|
|
6034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)("div", { className: "lib-xplat-field", children: [
|
|
6035
|
+
children,
|
|
6036
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsx)(FieldMessage, { validations })
|
|
6037
|
+
] });
|
|
6038
|
+
};
|
|
6039
|
+
Field.displayName = "Field";
|
|
6040
|
+
var hasError = (validations) => !!validations?.some((v) => v.status === "error");
|
|
6041
|
+
|
|
6042
|
+
// src/components/AutoResizeTextArea/AutoResizeTextArea.tsx
|
|
6043
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
6003
6044
|
var MAX_HEIGHT = 400;
|
|
6004
6045
|
var AutoResizeTextArea = import_react2.default.forwardRef(
|
|
6005
6046
|
(props, ref) => {
|
|
6006
|
-
const { value, className, onChange, disabled, bare = false, ...textareaProps } = props;
|
|
6047
|
+
const { value, className, onChange, disabled, bare = false, validations, ...textareaProps } = props;
|
|
6007
6048
|
const localRef = import_react2.default.useRef(null);
|
|
6008
6049
|
const setRefs = (el) => {
|
|
6009
6050
|
localRef.current = el;
|
|
@@ -6031,9 +6072,10 @@ var AutoResizeTextArea = import_react2.default.forwardRef(
|
|
|
6031
6072
|
updateHeight();
|
|
6032
6073
|
}, [value]);
|
|
6033
6074
|
if (bare) {
|
|
6034
|
-
return /* @__PURE__ */ (0,
|
|
6075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
6035
6076
|
"textarea",
|
|
6036
6077
|
{
|
|
6078
|
+
"aria-invalid": hasError(validations) || void 0,
|
|
6037
6079
|
...textareaProps,
|
|
6038
6080
|
ref: setRefs,
|
|
6039
6081
|
className,
|
|
@@ -6043,9 +6085,10 @@ var AutoResizeTextArea = import_react2.default.forwardRef(
|
|
|
6043
6085
|
}
|
|
6044
6086
|
);
|
|
6045
6087
|
}
|
|
6046
|
-
|
|
6088
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: clsx_default("lib-xplat-auto-resize-textarea-wrapper", className), children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)("div", { className: clsx_default("lib-xplat-auto-resize-textarea", disabled && "disabled"), children: /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
6047
6089
|
"textarea",
|
|
6048
6090
|
{
|
|
6091
|
+
"aria-invalid": hasError(validations) || void 0,
|
|
6049
6092
|
...textareaProps,
|
|
6050
6093
|
ref: setRefs,
|
|
6051
6094
|
disabled,
|
|
@@ -6053,13 +6096,14 @@ var AutoResizeTextArea = import_react2.default.forwardRef(
|
|
|
6053
6096
|
onChange: handleChange
|
|
6054
6097
|
}
|
|
6055
6098
|
) }) });
|
|
6099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(Field, { validations, children: control });
|
|
6056
6100
|
}
|
|
6057
6101
|
);
|
|
6058
6102
|
AutoResizeTextArea.displayName = "AutoResizeTextArea";
|
|
6059
6103
|
var AutoResizeTextArea_default = AutoResizeTextArea;
|
|
6060
6104
|
|
|
6061
6105
|
// src/components/Avatar/Avatar.tsx
|
|
6062
|
-
var
|
|
6106
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
6063
6107
|
var CATEGORICAL_COUNT = 8;
|
|
6064
6108
|
var getColorIndex = (name) => {
|
|
6065
6109
|
if (!name) return 1;
|
|
@@ -6076,36 +6120,36 @@ var Avatar = (props) => {
|
|
|
6076
6120
|
const fullInitials = name ? name.split(" ").map((s) => s[0]).join("").slice(0, 2).toUpperCase() : "";
|
|
6077
6121
|
const initials = size === "sm" ? fullInitials.slice(0, 1) : fullInitials;
|
|
6078
6122
|
const catIndex = getColorIndex(name || "");
|
|
6079
|
-
return /* @__PURE__ */ (0,
|
|
6123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: clsx_default("lib-xplat-avatar", size), children: src ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("img", { src, alt: alt || name || "avatar" }) : /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: clsx_default("fallback", `cat-${catIndex}`), children: initials || /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) }) });
|
|
6080
6124
|
};
|
|
6081
6125
|
Avatar.displayName = "Avatar";
|
|
6082
6126
|
var Avatar_default = Avatar;
|
|
6083
6127
|
|
|
6084
6128
|
// src/components/Box/Box.tsx
|
|
6085
|
-
var
|
|
6129
|
+
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
6086
6130
|
var Box = ({
|
|
6087
6131
|
children,
|
|
6088
6132
|
title,
|
|
6089
6133
|
variant = "outlined",
|
|
6090
6134
|
padding = "md"
|
|
6091
6135
|
}) => {
|
|
6092
|
-
return /* @__PURE__ */ (0,
|
|
6093
|
-
title && /* @__PURE__ */ (0,
|
|
6094
|
-
/* @__PURE__ */ (0,
|
|
6136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: clsx_default("lib-xplat-box", variant, `pad-${padding}`), children: [
|
|
6137
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "box-title", children: title }),
|
|
6138
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "box-content", children })
|
|
6095
6139
|
] });
|
|
6096
6140
|
};
|
|
6097
6141
|
Box.displayName = "Box";
|
|
6098
6142
|
var Box_default = Box;
|
|
6099
6143
|
|
|
6100
6144
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
6101
|
-
var
|
|
6145
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
6102
6146
|
var Breadcrumb = (props) => {
|
|
6103
6147
|
const { items, separator = "/" } = props;
|
|
6104
|
-
return /* @__PURE__ */ (0,
|
|
6148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("nav", { className: "lib-xplat-breadcrumb", "aria-label": "\uACBD\uB85C", children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("ol", { children: items.map((item, index) => {
|
|
6105
6149
|
const isLast = index === items.length - 1;
|
|
6106
|
-
return /* @__PURE__ */ (0,
|
|
6107
|
-
isLast ? /* @__PURE__ */ (0,
|
|
6108
|
-
!isLast && /* @__PURE__ */ (0,
|
|
6150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("li", { children: [
|
|
6151
|
+
isLast ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "current", "aria-current": "page", children: item.label }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("a", { href: item.href, className: "link", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("button", { className: "link", onClick: item.onClick, children: item.label }),
|
|
6152
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime301.jsx)("span", { className: "separator", children: separator })
|
|
6109
6153
|
] }, index);
|
|
6110
6154
|
}) }) });
|
|
6111
6155
|
};
|
|
@@ -6113,7 +6157,7 @@ Breadcrumb.displayName = "Breadcrumb";
|
|
|
6113
6157
|
var Breadcrumb_default = Breadcrumb;
|
|
6114
6158
|
|
|
6115
6159
|
// src/components/Button/Button.tsx
|
|
6116
|
-
var
|
|
6160
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
6117
6161
|
var Button = (props) => {
|
|
6118
6162
|
const {
|
|
6119
6163
|
children,
|
|
@@ -6122,7 +6166,7 @@ var Button = (props) => {
|
|
|
6122
6166
|
disabled,
|
|
6123
6167
|
...rest
|
|
6124
6168
|
} = props;
|
|
6125
|
-
return /* @__PURE__ */ (0,
|
|
6169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
6126
6170
|
"button",
|
|
6127
6171
|
{
|
|
6128
6172
|
className: clsx_default("lib-xplat-button", type, size),
|
|
@@ -6239,7 +6283,7 @@ var MONTH_LABELS = {
|
|
|
6239
6283
|
};
|
|
6240
6284
|
|
|
6241
6285
|
// src/components/Calendar/Calendar.tsx
|
|
6242
|
-
var
|
|
6286
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
6243
6287
|
var DayCell = import_react4.default.memo(
|
|
6244
6288
|
({
|
|
6245
6289
|
day,
|
|
@@ -6251,7 +6295,7 @@ var DayCell = import_react4.default.memo(
|
|
|
6251
6295
|
onEventClick
|
|
6252
6296
|
}) => {
|
|
6253
6297
|
if (renderDay) {
|
|
6254
|
-
return /* @__PURE__ */ (0,
|
|
6298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6255
6299
|
"div",
|
|
6256
6300
|
{
|
|
6257
6301
|
className: clsx_default(
|
|
@@ -6268,7 +6312,7 @@ var DayCell = import_react4.default.memo(
|
|
|
6268
6312
|
}
|
|
6269
6313
|
);
|
|
6270
6314
|
}
|
|
6271
|
-
return /* @__PURE__ */ (0,
|
|
6315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
6272
6316
|
"div",
|
|
6273
6317
|
{
|
|
6274
6318
|
className: clsx_default(
|
|
@@ -6284,9 +6328,9 @@ var DayCell = import_react4.default.memo(
|
|
|
6284
6328
|
if (!disabled && day.isCurrentMonth) onSelect?.(day.date);
|
|
6285
6329
|
},
|
|
6286
6330
|
children: [
|
|
6287
|
-
/* @__PURE__ */ (0,
|
|
6288
|
-
dayEvents.length > 0 && /* @__PURE__ */ (0,
|
|
6289
|
-
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0,
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("span", { className: "calendar-day-number", children: day.day }),
|
|
6332
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "calendar-day-events", children: [
|
|
6333
|
+
dayEvents.slice(0, 3).map((event, ei) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6290
6334
|
"span",
|
|
6291
6335
|
{
|
|
6292
6336
|
className: "calendar-event-dot",
|
|
@@ -6299,7 +6343,7 @@ var DayCell = import_react4.default.memo(
|
|
|
6299
6343
|
},
|
|
6300
6344
|
ei
|
|
6301
6345
|
)),
|
|
6302
|
-
dayEvents.length > 3 && /* @__PURE__ */ (0,
|
|
6346
|
+
dayEvents.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("span", { className: "calendar-event-more", children: [
|
|
6303
6347
|
"+",
|
|
6304
6348
|
dayEvents.length - 3
|
|
6305
6349
|
] })
|
|
@@ -6420,21 +6464,21 @@ var Calendar = (props) => {
|
|
|
6420
6464
|
const weekdays = WEEKDAY_LABELS[locale];
|
|
6421
6465
|
const monthLabels = MONTH_LABELS[locale];
|
|
6422
6466
|
const titleText = pickerMode === "days" ? locale === "ko" ? `${year}\uB144 ${monthLabels[month]}` : `${monthLabels[month]} ${year}` : pickerMode === "months" ? `${year}` : `${yearRangeStart} - ${yearRangeStart + 11}`;
|
|
6423
|
-
return /* @__PURE__ */ (0,
|
|
6467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
6424
6468
|
"div",
|
|
6425
6469
|
{
|
|
6426
6470
|
className: "lib-xplat-calendar",
|
|
6427
6471
|
style: selectedColor ? { "--calendar-selected-color": `var(--${selectedColor})` } : void 0,
|
|
6428
6472
|
children: [
|
|
6429
|
-
/* @__PURE__ */ (0,
|
|
6430
|
-
/* @__PURE__ */ (0,
|
|
6431
|
-
/* @__PURE__ */ (0,
|
|
6432
|
-
/* @__PURE__ */ (0,
|
|
6433
|
-
showToday && /* @__PURE__ */ (0,
|
|
6473
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "calendar-header", children: [
|
|
6474
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-nav", onClick: handlePrev, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ChevronLeftIcon_default, {}) }),
|
|
6475
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-title", onClick: handleTitleClick, type: "button", children: titleText }),
|
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-nav", onClick: handleNext, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(ChevronRightIcon_default, {}) }),
|
|
6477
|
+
showToday && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("button", { className: "calendar-today-btn", onClick: handleToday, children: locale === "ko" ? "\uC624\uB298" : "Today" })
|
|
6434
6478
|
] }),
|
|
6435
|
-
pickerMode === "years" && /* @__PURE__ */ (0,
|
|
6479
|
+
pickerMode === "years" && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-picker-grid", children: Array.from({ length: 12 }, (_, i) => {
|
|
6436
6480
|
const y = yearRangeStart + i;
|
|
6437
|
-
return /* @__PURE__ */ (0,
|
|
6481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6438
6482
|
"button",
|
|
6439
6483
|
{
|
|
6440
6484
|
type: "button",
|
|
@@ -6445,7 +6489,7 @@ var Calendar = (props) => {
|
|
|
6445
6489
|
y
|
|
6446
6490
|
);
|
|
6447
6491
|
}) }),
|
|
6448
|
-
pickerMode === "months" && /* @__PURE__ */ (0,
|
|
6492
|
+
pickerMode === "months" && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-picker-grid", children: monthLabels.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6449
6493
|
"button",
|
|
6450
6494
|
{
|
|
6451
6495
|
type: "button",
|
|
@@ -6455,8 +6499,8 @@ var Calendar = (props) => {
|
|
|
6455
6499
|
},
|
|
6456
6500
|
i
|
|
6457
6501
|
)) }),
|
|
6458
|
-
pickerMode === "days" && /* @__PURE__ */ (0,
|
|
6459
|
-
/* @__PURE__ */ (0,
|
|
6502
|
+
pickerMode === "days" && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
|
|
6503
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-weekdays", children: weekdays.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6460
6504
|
"div",
|
|
6461
6505
|
{
|
|
6462
6506
|
className: clsx_default(
|
|
@@ -6468,12 +6512,12 @@ var Calendar = (props) => {
|
|
|
6468
6512
|
},
|
|
6469
6513
|
label
|
|
6470
6514
|
)) }),
|
|
6471
|
-
/* @__PURE__ */ (0,
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "calendar-grid", children: days.map((day, idx) => {
|
|
6472
6516
|
const dayEvents = getEventsForDay(day.date);
|
|
6473
6517
|
const t = day.date.getTime();
|
|
6474
6518
|
const disabled = t < minTime || t > maxTime;
|
|
6475
6519
|
const isSelected = selectedDate ? isSameDay(day.date, selectedDate) : false;
|
|
6476
|
-
return /* @__PURE__ */ (0,
|
|
6520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
6477
6521
|
DayCell,
|
|
6478
6522
|
{
|
|
6479
6523
|
day,
|
|
@@ -6499,10 +6543,10 @@ var Calendar_default = Calendar;
|
|
|
6499
6543
|
var import_react5 = __toESM(require("react"), 1);
|
|
6500
6544
|
|
|
6501
6545
|
// src/components/CardTab/CardTabPanel.tsx
|
|
6502
|
-
var
|
|
6546
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
6503
6547
|
var CardTabPanel = (props) => {
|
|
6504
6548
|
const { children, columns = 3 } = props;
|
|
6505
|
-
return /* @__PURE__ */ (0,
|
|
6549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
6506
6550
|
"div",
|
|
6507
6551
|
{
|
|
6508
6552
|
className: "card-tab-panel",
|
|
@@ -6515,7 +6559,7 @@ CardTabPanel.displayName = "CardTab.Panel";
|
|
|
6515
6559
|
var CardTabPanel_default = CardTabPanel;
|
|
6516
6560
|
|
|
6517
6561
|
// src/components/CardTab/CardTab.tsx
|
|
6518
|
-
var
|
|
6562
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
6519
6563
|
var CardTabRoot = (props) => {
|
|
6520
6564
|
const {
|
|
6521
6565
|
tabs,
|
|
@@ -6539,10 +6583,10 @@ var CardTabRoot = (props) => {
|
|
|
6539
6583
|
const activePanel = panels.find(
|
|
6540
6584
|
(panel) => panel.props.value === activeValue
|
|
6541
6585
|
);
|
|
6542
|
-
return /* @__PURE__ */ (0,
|
|
6543
|
-
/* @__PURE__ */ (0,
|
|
6586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsxs)("div", { className: clsx_default("lib-xplat-card-tab", size), children: [
|
|
6587
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "card-tab-bar", children: tabs.map((tab) => {
|
|
6544
6588
|
const isActive2 = tab.value === activeValue;
|
|
6545
|
-
return /* @__PURE__ */ (0,
|
|
6589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
6546
6590
|
"button",
|
|
6547
6591
|
{
|
|
6548
6592
|
className: clsx_default("card-tab-trigger", isActive2 && "active"),
|
|
@@ -6554,7 +6598,7 @@ var CardTabRoot = (props) => {
|
|
|
6554
6598
|
tab.value
|
|
6555
6599
|
);
|
|
6556
6600
|
}) }),
|
|
6557
|
-
/* @__PURE__ */ (0,
|
|
6601
|
+
/* @__PURE__ */ (0, import_jsx_runtime305.jsx)("div", { className: "card-tab-body", children: activePanel })
|
|
6558
6602
|
] });
|
|
6559
6603
|
};
|
|
6560
6604
|
CardTabRoot.displayName = "CardTab";
|
|
@@ -6565,7 +6609,7 @@ var CardTab_default = CardTab;
|
|
|
6565
6609
|
|
|
6566
6610
|
// src/components/Chart/Chart.tsx
|
|
6567
6611
|
var import_react6 = __toESM(require("react"), 1);
|
|
6568
|
-
var
|
|
6612
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
6569
6613
|
var CATEGORICAL_COUNT2 = 8;
|
|
6570
6614
|
var LINE_BAR_PALETTES = Array.from({ length: CATEGORICAL_COUNT2 }, (_, i) => {
|
|
6571
6615
|
const n = i + 1;
|
|
@@ -6708,12 +6752,12 @@ var formatTick = (value, maxVal) => {
|
|
|
6708
6752
|
const fixed = value.toFixed(decimals);
|
|
6709
6753
|
return decimals === 0 ? Number(fixed).toLocaleString("en-US") : fixed;
|
|
6710
6754
|
};
|
|
6711
|
-
var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0,
|
|
6755
|
+
var GridLines = import_react6.default.memo(({ width, height, chartH, maxVal }) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_jsx_runtime306.Fragment, { children: [0, 0.25, 0.5, 0.75, 1].map((ratio) => {
|
|
6712
6756
|
const y = PADDING.top + (1 - ratio) * chartH;
|
|
6713
6757
|
const val = formatTick(maxVal * ratio, maxVal);
|
|
6714
|
-
return /* @__PURE__ */ (0,
|
|
6715
|
-
/* @__PURE__ */ (0,
|
|
6716
|
-
/* @__PURE__ */ (0,
|
|
6758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { children: [
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("line", { x1: PADDING.left, y1: y, x2: width - PADDING.right, y2: y, className: "chart-grid" }),
|
|
6760
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("text", { x: PADDING.left - 8, y: y + 4, className: "chart-axis-label", textAnchor: "end", children: val })
|
|
6717
6761
|
] }, ratio);
|
|
6718
6762
|
}) }));
|
|
6719
6763
|
GridLines.displayName = "GridLines";
|
|
@@ -6725,10 +6769,10 @@ var getLabelStep = (count, chartW) => {
|
|
|
6725
6769
|
};
|
|
6726
6770
|
var AxisLabels = import_react6.default.memo(({ labels, count, chartW, height }) => {
|
|
6727
6771
|
const step = getLabelStep(count, chartW);
|
|
6728
|
-
return /* @__PURE__ */ (0,
|
|
6772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(import_jsx_runtime306.Fragment, { children: labels.map((label, i) => {
|
|
6729
6773
|
if (i % step !== 0) return null;
|
|
6730
6774
|
const x = PADDING.left + i / (count - 1 || 1) * chartW;
|
|
6731
|
-
return /* @__PURE__ */ (0,
|
|
6775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("text", { x, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
6732
6776
|
}) });
|
|
6733
6777
|
});
|
|
6734
6778
|
AxisLabels.displayName = "AxisLabels";
|
|
@@ -6804,7 +6848,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6804
6848
|
}, [animate, width]);
|
|
6805
6849
|
const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
|
|
6806
6850
|
const lineClipId = "line-area-clip";
|
|
6807
|
-
return /* @__PURE__ */ (0,
|
|
6851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
6808
6852
|
"svg",
|
|
6809
6853
|
{
|
|
6810
6854
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -6822,9 +6866,9 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6822
6866
|
onLeave();
|
|
6823
6867
|
},
|
|
6824
6868
|
children: [
|
|
6825
|
-
animate && /* @__PURE__ */ (0,
|
|
6826
|
-
/* @__PURE__ */ (0,
|
|
6827
|
-
/* @__PURE__ */ (0,
|
|
6869
|
+
animate && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("clipPath", { id: lineClipId, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("rect", { ref: clipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
|
|
6870
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(GridLines, { width, height, chartH, maxVal }),
|
|
6871
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(AxisLabels, { labels, count, chartW, height }),
|
|
6828
6872
|
entries.map(([key], di) => {
|
|
6829
6873
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
6830
6874
|
const color = palette[2];
|
|
@@ -6833,16 +6877,16 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6833
6877
|
const gradientId = `line-gradient-${di}`;
|
|
6834
6878
|
const polyPoints = points.map((p) => `${p.x},${p.y}`).join(" ");
|
|
6835
6879
|
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`;
|
|
6836
|
-
return /* @__PURE__ */ (0,
|
|
6837
|
-
/* @__PURE__ */ (0,
|
|
6838
|
-
/* @__PURE__ */ (0,
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
6880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { children: [
|
|
6881
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6882
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.2" }),
|
|
6883
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0" })
|
|
6840
6884
|
] }) }),
|
|
6841
|
-
/* @__PURE__ */ (0,
|
|
6842
|
-
/* @__PURE__ */ (0,
|
|
6843
|
-
/* @__PURE__ */ (0,
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { clipPath: animate ? `url(#${lineClipId})` : void 0, children: [
|
|
6886
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("path", { d: areaD, fill: `url(#${gradientId})` }),
|
|
6887
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("polyline", { points: polyPoints, fill: "none", stroke: color, strokeWidth: "2" })
|
|
6844
6888
|
] }),
|
|
6845
|
-
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0,
|
|
6889
|
+
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
6846
6890
|
"circle",
|
|
6847
6891
|
{
|
|
6848
6892
|
cx: points[activeIndex].x,
|
|
@@ -6854,7 +6898,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6854
6898
|
)
|
|
6855
6899
|
] }, di);
|
|
6856
6900
|
}),
|
|
6857
|
-
activeX !== null && /* @__PURE__ */ (0,
|
|
6901
|
+
activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
6858
6902
|
"line",
|
|
6859
6903
|
{
|
|
6860
6904
|
x1: activeX,
|
|
@@ -6864,7 +6908,7 @@ var LineChart = import_react6.default.memo(({ data, labels, width, height, anima
|
|
|
6864
6908
|
className: "chart-crosshair"
|
|
6865
6909
|
}
|
|
6866
6910
|
),
|
|
6867
|
-
/* @__PURE__ */ (0,
|
|
6911
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
6868
6912
|
"rect",
|
|
6869
6913
|
{
|
|
6870
6914
|
x: PADDING.left,
|
|
@@ -6913,7 +6957,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6913
6957
|
}, [animate, width]);
|
|
6914
6958
|
const activeX = activeIndex !== null ? seriesPoints[0]?.[activeIndex]?.x ?? null : null;
|
|
6915
6959
|
const curveClipId = "curve-area-clip";
|
|
6916
|
-
return /* @__PURE__ */ (0,
|
|
6960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
6917
6961
|
"svg",
|
|
6918
6962
|
{
|
|
6919
6963
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -6932,9 +6976,9 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6932
6976
|
onLeave();
|
|
6933
6977
|
},
|
|
6934
6978
|
children: [
|
|
6935
|
-
animate && /* @__PURE__ */ (0,
|
|
6936
|
-
/* @__PURE__ */ (0,
|
|
6937
|
-
/* @__PURE__ */ (0,
|
|
6979
|
+
animate && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("clipPath", { id: curveClipId, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("rect", { ref: curveClipRef, x: "0", y: "0", width: animate ? 0 : width, height }) }) }),
|
|
6980
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(GridLines, { width, height, chartH, maxVal }),
|
|
6981
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(AxisLabels, { labels, count, chartW, height }),
|
|
6938
6982
|
entries.map(([key], di) => {
|
|
6939
6983
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
6940
6984
|
const color = palette[2];
|
|
@@ -6943,16 +6987,16 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6943
6987
|
const gradientId = `curve-gradient-${di}`;
|
|
6944
6988
|
const linePath = toSmoothPath(points);
|
|
6945
6989
|
const areaPath = linePath + ` L ${points[points.length - 1].x} ${PADDING.top + chartH} L ${points[0].x} ${PADDING.top + chartH} Z`;
|
|
6946
|
-
return /* @__PURE__ */ (0,
|
|
6947
|
-
/* @__PURE__ */ (0,
|
|
6948
|
-
/* @__PURE__ */ (0,
|
|
6949
|
-
/* @__PURE__ */ (0,
|
|
6990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { children: [
|
|
6991
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6992
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "0%", stopColor: areaColor, stopOpacity: "0.4" }),
|
|
6993
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("stop", { offset: "100%", stopColor: areaColor, stopOpacity: "0.02" })
|
|
6950
6994
|
] }) }),
|
|
6951
|
-
/* @__PURE__ */ (0,
|
|
6952
|
-
/* @__PURE__ */ (0,
|
|
6953
|
-
/* @__PURE__ */ (0,
|
|
6995
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("g", { clipPath: animate ? `url(#${curveClipId})` : void 0, children: [
|
|
6996
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` }),
|
|
6997
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("path", { d: linePath, fill: "none", stroke: color, strokeWidth: "2" })
|
|
6954
6998
|
] }),
|
|
6955
|
-
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0,
|
|
6999
|
+
activeIndex !== null && points[activeIndex] && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
6956
7000
|
"circle",
|
|
6957
7001
|
{
|
|
6958
7002
|
cx: points[activeIndex].x,
|
|
@@ -6964,7 +7008,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6964
7008
|
)
|
|
6965
7009
|
] }, di);
|
|
6966
7010
|
}),
|
|
6967
|
-
activeX !== null && /* @__PURE__ */ (0,
|
|
7011
|
+
activeX !== null && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
6968
7012
|
"line",
|
|
6969
7013
|
{
|
|
6970
7014
|
x1: activeX,
|
|
@@ -6974,7 +7018,7 @@ var CurveChart = import_react6.default.memo(({ data, labels, width, height, anim
|
|
|
6974
7018
|
className: "chart-crosshair"
|
|
6975
7019
|
}
|
|
6976
7020
|
),
|
|
6977
|
-
/* @__PURE__ */ (0,
|
|
7021
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
6978
7022
|
"rect",
|
|
6979
7023
|
{
|
|
6980
7024
|
x: PADDING.left,
|
|
@@ -7017,11 +7061,11 @@ var BarChart = import_react6.default.memo(({ data, labels, width, height, animat
|
|
|
7017
7061
|
[entries, maxVal, chartH, groupW, barW, barGap, groupCount]
|
|
7018
7062
|
);
|
|
7019
7063
|
const barLabelStep = getLabelStep(count, chartW);
|
|
7020
|
-
return /* @__PURE__ */ (0,
|
|
7021
|
-
/* @__PURE__ */ (0,
|
|
7064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, className: "chart-svg", children: [
|
|
7065
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)(GridLines, { width, height, chartH, maxVal }),
|
|
7022
7066
|
labels.map((label, i) => {
|
|
7023
7067
|
if (i % barLabelStep !== 0) return null;
|
|
7024
|
-
return /* @__PURE__ */ (0,
|
|
7068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("text", { x: PADDING.left + groupW * i + groupW / 2, y: height - 8, className: "chart-axis-label", textAnchor: "middle", children: label }, i);
|
|
7025
7069
|
}),
|
|
7026
7070
|
entries.map(([key], di) => {
|
|
7027
7071
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
@@ -7030,7 +7074,7 @@ var BarChart = import_react6.default.memo(({ data, labels, width, height, animat
|
|
|
7030
7074
|
const r2 = Math.min(4, b.w / 2);
|
|
7031
7075
|
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`;
|
|
7032
7076
|
const delay = 100 + i * 80;
|
|
7033
|
-
return /* @__PURE__ */ (0,
|
|
7077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
7034
7078
|
"path",
|
|
7035
7079
|
{
|
|
7036
7080
|
d,
|
|
@@ -7110,8 +7154,8 @@ var PieDonutChart = import_react6.default.memo(
|
|
|
7110
7154
|
});
|
|
7111
7155
|
}, [values, total, cx, cy, r2, innerR, labels]);
|
|
7112
7156
|
const maskId = `pie-mask-${isDoughnut ? "d" : "p"}`;
|
|
7113
|
-
return /* @__PURE__ */ (0,
|
|
7114
|
-
animate && /* @__PURE__ */ (0,
|
|
7157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("svg", { viewBox: `0 0 ${size} ${size}`, className: "chart-svg chart-pie", children: [
|
|
7158
|
+
animate && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("mask", { id: maskId, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
7115
7159
|
"circle",
|
|
7116
7160
|
{
|
|
7117
7161
|
ref: maskRef,
|
|
@@ -7124,7 +7168,7 @@ var PieDonutChart = import_react6.default.memo(
|
|
|
7124
7168
|
transform: `rotate(-90 ${cx} ${cy})`
|
|
7125
7169
|
}
|
|
7126
7170
|
) }) }),
|
|
7127
|
-
/* @__PURE__ */ (0,
|
|
7171
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("g", { mask: animate ? `url(#${maskId})` : void 0, children: sliceData.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
7128
7172
|
"path",
|
|
7129
7173
|
{
|
|
7130
7174
|
d: s.d,
|
|
@@ -7159,15 +7203,15 @@ var ChartTooltip = ({ x, y, containerWidth, containerHeight, tooltipType, childr
|
|
|
7159
7203
|
const sepIdx = content.indexOf(" \u2014 ");
|
|
7160
7204
|
const title = sepIdx >= 0 ? content.slice(0, sepIdx) : content;
|
|
7161
7205
|
const desc = sepIdx >= 0 ? content.slice(sepIdx + 3) : "";
|
|
7162
|
-
return /* @__PURE__ */ (0,
|
|
7206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
7163
7207
|
"div",
|
|
7164
7208
|
{
|
|
7165
7209
|
ref,
|
|
7166
7210
|
className: `lib-xplat-tooltip ${tooltipType} chart-tooltip-pos`,
|
|
7167
7211
|
style: { left: pos.left, top: pos.top },
|
|
7168
7212
|
children: [
|
|
7169
|
-
title && /* @__PURE__ */ (0,
|
|
7170
|
-
desc && /* @__PURE__ */ (0,
|
|
7213
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "tooltip-title", children: title }),
|
|
7214
|
+
desc && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "tooltip-desc", children: desc })
|
|
7171
7215
|
]
|
|
7172
7216
|
}
|
|
7173
7217
|
);
|
|
@@ -7179,14 +7223,14 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
7179
7223
|
const total = values.reduce((a, b) => a + b, 0) || 1;
|
|
7180
7224
|
const firstKey = entries[0]?.[0] ?? "";
|
|
7181
7225
|
const colorOffset = hashString(firstKey);
|
|
7182
|
-
return /* @__PURE__ */ (0,
|
|
7226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "chart-legend", children: values.map((v, i) => {
|
|
7183
7227
|
const pct = Math.round(v / total * 100);
|
|
7184
7228
|
const color = PIE_COLORS[(i + colorOffset) % PIE_COLORS.length];
|
|
7185
|
-
return /* @__PURE__ */ (0,
|
|
7186
|
-
/* @__PURE__ */ (0,
|
|
7187
|
-
/* @__PURE__ */ (0,
|
|
7188
|
-
/* @__PURE__ */ (0,
|
|
7189
|
-
/* @__PURE__ */ (0,
|
|
7229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-item", children: [
|
|
7230
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
|
|
7231
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-text", children: [
|
|
7232
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-label", children: labels[i] || `${i + 1}` }),
|
|
7233
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("span", { className: "chart-legend-value", children: [
|
|
7190
7234
|
v.toLocaleString(),
|
|
7191
7235
|
"(",
|
|
7192
7236
|
pct,
|
|
@@ -7196,22 +7240,23 @@ var ChartLegend = ({ data, labels, type }) => {
|
|
|
7196
7240
|
] }, i);
|
|
7197
7241
|
}) });
|
|
7198
7242
|
}
|
|
7199
|
-
return /* @__PURE__ */ (0,
|
|
7243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("div", { className: "chart-legend", children: entries.map(([key], di) => {
|
|
7200
7244
|
const palette = getPalette(LINE_BAR_PALETTES, di, key);
|
|
7201
7245
|
const color = palette[2];
|
|
7202
7246
|
const values = entries[di][1];
|
|
7203
7247
|
const sum = values.reduce((a, b) => a + b, 0);
|
|
7204
|
-
return /* @__PURE__ */ (0,
|
|
7205
|
-
/* @__PURE__ */ (0,
|
|
7206
|
-
/* @__PURE__ */ (0,
|
|
7207
|
-
/* @__PURE__ */ (0,
|
|
7208
|
-
/* @__PURE__ */ (0,
|
|
7248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-item", children: [
|
|
7249
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-dot", style: { backgroundColor: color } }),
|
|
7250
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "chart-legend-text", children: [
|
|
7251
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-label", children: key }),
|
|
7252
|
+
/* @__PURE__ */ (0, import_jsx_runtime306.jsx)("span", { className: "chart-legend-value", children: sum.toLocaleString() })
|
|
7209
7253
|
] })
|
|
7210
7254
|
] }, di);
|
|
7211
7255
|
}) });
|
|
7212
7256
|
};
|
|
7213
7257
|
var Chart = import_react6.default.memo((props) => {
|
|
7214
|
-
const { type, data, labels, tooltip: showTooltip = true, tooltipType = "light" } = props;
|
|
7258
|
+
const { variant, type, data, labels, tooltip: showTooltip = true, tooltipType = "light" } = props;
|
|
7259
|
+
const shape = variant ?? type ?? "line";
|
|
7215
7260
|
const { tooltip, show, hide, move, containerRef } = useChartTooltip(showTooltip);
|
|
7216
7261
|
const { width, height } = useChartSize(containerRef);
|
|
7217
7262
|
const stableData = import_react6.default.useMemo(() => data, [JSON.stringify(data)]);
|
|
@@ -7219,14 +7264,14 @@ var Chart = import_react6.default.memo((props) => {
|
|
|
7219
7264
|
const dataKey = import_react6.default.useMemo(() => JSON.stringify(labels), [labels]);
|
|
7220
7265
|
const animate = useChartAnimation(containerRef, dataKey);
|
|
7221
7266
|
const ready = width > 0 && height > 0;
|
|
7222
|
-
return /* @__PURE__ */ (0,
|
|
7223
|
-
ready &&
|
|
7224
|
-
ready &&
|
|
7225
|
-
ready &&
|
|
7226
|
-
ready &&
|
|
7227
|
-
ready &&
|
|
7228
|
-
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ (0,
|
|
7229
|
-
tooltip.visible && tooltip.content && /* @__PURE__ */ (0,
|
|
7267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("div", { className: "lib-xplat-chart", ref: containerRef, children: [
|
|
7268
|
+
ready && shape === "line" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(LineChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7269
|
+
ready && shape === "curve" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(CurveChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7270
|
+
ready && shape === "bar" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(BarChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7271
|
+
ready && shape === "pie" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, onHover: show, onMove: move, onLeave: hide }),
|
|
7272
|
+
ready && shape === "doughnut" && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(PieDonutChart, { data: stableData, labels: stableLabels, width, height, animate, isDoughnut: true, onHover: show, onMove: move, onLeave: hide }),
|
|
7273
|
+
ready && (type === "pie" || type === "doughnut") && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(ChartLegend, { data: stableData, labels: stableLabels, type }),
|
|
7274
|
+
tooltip.visible && tooltip.content && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(ChartTooltip, { x: tooltip.x, y: tooltip.y, containerWidth: width, containerHeight: height, tooltipType, children: tooltip.content })
|
|
7230
7275
|
] });
|
|
7231
7276
|
});
|
|
7232
7277
|
Chart.displayName = "Chart";
|
|
@@ -7236,7 +7281,7 @@ var Chart_default = Chart;
|
|
|
7236
7281
|
var import_react7 = __toESM(require("react"), 1);
|
|
7237
7282
|
|
|
7238
7283
|
// src/components/IconButton/IconButton.tsx
|
|
7239
|
-
var
|
|
7284
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
7240
7285
|
var IconButton = (props) => {
|
|
7241
7286
|
const {
|
|
7242
7287
|
icon,
|
|
@@ -7245,7 +7290,7 @@ var IconButton = (props) => {
|
|
|
7245
7290
|
disabled,
|
|
7246
7291
|
...rest
|
|
7247
7292
|
} = props;
|
|
7248
|
-
return /* @__PURE__ */ (0,
|
|
7293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
7249
7294
|
"button",
|
|
7250
7295
|
{
|
|
7251
7296
|
className: clsx_default("lib-xplat-icon-button", type, size),
|
|
@@ -7259,7 +7304,7 @@ IconButton.displayName = "IconButton";
|
|
|
7259
7304
|
var IconButton_default = IconButton;
|
|
7260
7305
|
|
|
7261
7306
|
// src/components/ChatInput/ChatInput.tsx
|
|
7262
|
-
var
|
|
7307
|
+
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
7263
7308
|
var ChatInput = import_react7.default.forwardRef(
|
|
7264
7309
|
(props, ref) => {
|
|
7265
7310
|
const {
|
|
@@ -7268,7 +7313,8 @@ var ChatInput = import_react7.default.forwardRef(
|
|
|
7268
7313
|
disabled = false,
|
|
7269
7314
|
buttonType = "primary",
|
|
7270
7315
|
onSubmit,
|
|
7271
|
-
onChange
|
|
7316
|
+
onChange,
|
|
7317
|
+
validations
|
|
7272
7318
|
} = props;
|
|
7273
7319
|
const isControlled = valueProp !== void 0;
|
|
7274
7320
|
const [internalValue, setInternalValue] = import_react7.default.useState("");
|
|
@@ -7290,8 +7336,8 @@ var ChatInput = import_react7.default.forwardRef(
|
|
|
7290
7336
|
handleSubmit();
|
|
7291
7337
|
}
|
|
7292
7338
|
};
|
|
7293
|
-
|
|
7294
|
-
/* @__PURE__ */ (0,
|
|
7339
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)("div", { className: clsx_default("lib-xplat-chat-input", disabled && "disabled"), children: [
|
|
7340
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
7295
7341
|
AutoResizeTextArea_default,
|
|
7296
7342
|
{
|
|
7297
7343
|
ref,
|
|
@@ -7302,13 +7348,14 @@ var ChatInput = import_react7.default.forwardRef(
|
|
|
7302
7348
|
disabled,
|
|
7303
7349
|
rows: 1,
|
|
7304
7350
|
onChange: handleChange,
|
|
7351
|
+
"aria-invalid": hasError(validations) || void 0,
|
|
7305
7352
|
onKeyDown: handleKeyDown
|
|
7306
7353
|
}
|
|
7307
7354
|
),
|
|
7308
|
-
/* @__PURE__ */ (0,
|
|
7355
|
+
/* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
7309
7356
|
IconButton_default,
|
|
7310
7357
|
{
|
|
7311
|
-
icon: /* @__PURE__ */ (0,
|
|
7358
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(MessageSquareIcon_default, {}),
|
|
7312
7359
|
type: buttonType,
|
|
7313
7360
|
size: "sm",
|
|
7314
7361
|
disabled: !hasText || disabled,
|
|
@@ -7317,6 +7364,7 @@ var ChatInput = import_react7.default.forwardRef(
|
|
|
7317
7364
|
}
|
|
7318
7365
|
)
|
|
7319
7366
|
] });
|
|
7367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Field, { validations, children: control });
|
|
7320
7368
|
}
|
|
7321
7369
|
);
|
|
7322
7370
|
ChatInput.displayName = "ChatInput";
|
|
@@ -7341,8 +7389,11 @@ var import_tokens_core = require("@x-plat/tokens-core");
|
|
|
7341
7389
|
// src/tokens/index.ts
|
|
7342
7390
|
var import_tokens_core2 = require("@x-plat/tokens-core");
|
|
7343
7391
|
|
|
7392
|
+
// src/tokens/interface/status.ts
|
|
7393
|
+
var normalizeStatus = (value) => value === "brand" ? "primary" : value;
|
|
7394
|
+
|
|
7344
7395
|
// src/components/CheckBox/CheckBox.tsx
|
|
7345
|
-
var
|
|
7396
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
7346
7397
|
var CheckBox = (props) => {
|
|
7347
7398
|
const {
|
|
7348
7399
|
checked,
|
|
@@ -7351,9 +7402,11 @@ var CheckBox = (props) => {
|
|
|
7351
7402
|
onChange,
|
|
7352
7403
|
disabled,
|
|
7353
7404
|
size = "md",
|
|
7354
|
-
type = "
|
|
7405
|
+
type = "primary",
|
|
7406
|
+
validations,
|
|
7355
7407
|
...rest
|
|
7356
7408
|
} = props;
|
|
7409
|
+
const statusType = normalizeStatus(type);
|
|
7357
7410
|
const handleChange = (e) => {
|
|
7358
7411
|
if (onChange) onChange(e);
|
|
7359
7412
|
};
|
|
@@ -7361,60 +7414,45 @@ var CheckBox = (props) => {
|
|
|
7361
7414
|
const checkedClasses = `checked`;
|
|
7362
7415
|
const disabledClasses = "disabled";
|
|
7363
7416
|
const boxClasses = disabled ? disabledClasses : checked ? checkedClasses : uncheckedClasses;
|
|
7364
|
-
|
|
7365
|
-
/* @__PURE__ */ (0,
|
|
7417
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("label", { className: clsx_default("lib-xplat-checkbox", size, statusType, className), children: [
|
|
7418
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
7366
7419
|
"input",
|
|
7367
7420
|
{
|
|
7368
7421
|
type: "checkbox",
|
|
7369
7422
|
checked,
|
|
7370
7423
|
onChange: handleChange,
|
|
7371
7424
|
disabled,
|
|
7425
|
+
"aria-invalid": hasError(validations) || void 0,
|
|
7372
7426
|
...rest
|
|
7373
7427
|
}
|
|
7374
7428
|
),
|
|
7375
|
-
/* @__PURE__ */ (0,
|
|
7376
|
-
label && /* @__PURE__ */ (0,
|
|
7429
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)("span", { className: clsx_default("checkbox", boxClasses), children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("span", { className: clsx_default("check-icon", { visible: checked }), children: /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(CheckIcon_default, {}) }) }),
|
|
7430
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)("span", { className: "label", children: label })
|
|
7377
7431
|
] });
|
|
7432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(Field, { validations, children: control });
|
|
7378
7433
|
};
|
|
7379
7434
|
CheckBox.displayName = "CheckBox";
|
|
7380
7435
|
var CheckBox_default = CheckBox;
|
|
7381
7436
|
|
|
7382
7437
|
// src/components/Chip/Chip.tsx
|
|
7383
|
-
var
|
|
7438
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
7384
7439
|
var Chip = (props) => {
|
|
7385
7440
|
const {
|
|
7386
7441
|
children,
|
|
7387
7442
|
type = "primary",
|
|
7388
7443
|
size = "md"
|
|
7389
7444
|
} = props;
|
|
7390
|
-
return /* @__PURE__ */ (0,
|
|
7445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: clsx_default("lib-xplat-chip", type, size), children });
|
|
7391
7446
|
};
|
|
7392
7447
|
Chip.displayName = "Chip";
|
|
7393
7448
|
var Chip_default = Chip;
|
|
7394
7449
|
|
|
7395
7450
|
// src/components/DatePicker/InputDatePicker/index.tsx
|
|
7396
|
-
var
|
|
7451
|
+
var import_react12 = __toESM(require("react"), 1);
|
|
7397
7452
|
|
|
7398
7453
|
// src/components/Input/Input.tsx
|
|
7399
7454
|
var import_react8 = __toESM(require("react"), 1);
|
|
7400
7455
|
|
|
7401
|
-
// src/components/Input/InputValidations.tsx
|
|
7402
|
-
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
7403
|
-
var InputValidations = (props) => {
|
|
7404
|
-
const { message, status = "default" } = props;
|
|
7405
|
-
return /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)("div", { className: clsx_default("lib-xplat-input-validation", status), children: [
|
|
7406
|
-
/* @__PURE__ */ (0, import_jsx_runtime310.jsxs)("div", { className: "icon", children: [
|
|
7407
|
-
status === "default" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(InfoIcon_default, {}),
|
|
7408
|
-
status === "success" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(SuccessIcon_default, {}),
|
|
7409
|
-
status === "warning" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(InfoIcon_default, {}),
|
|
7410
|
-
status === "error" && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(ErrorIcon_default, {})
|
|
7411
|
-
] }),
|
|
7412
|
-
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "message", children: message })
|
|
7413
|
-
] });
|
|
7414
|
-
};
|
|
7415
|
-
InputValidations.displayName = "InputValidations";
|
|
7416
|
-
var InputValidations_default = InputValidations;
|
|
7417
|
-
|
|
7418
7456
|
// src/components/Input/reg.ts
|
|
7419
7457
|
var numberAndCommaReg = /^[0-9,]+$/;
|
|
7420
7458
|
var phoneNumberMaxLengthReg = /^.{0,13}$/;
|
|
@@ -7451,7 +7489,6 @@ var handleTelBackspace = (prevValue, currValue) => {
|
|
|
7451
7489
|
|
|
7452
7490
|
// src/components/Input/Input.tsx
|
|
7453
7491
|
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
7454
|
-
var import_react9 = require("react");
|
|
7455
7492
|
var formatValue = (type, value) => {
|
|
7456
7493
|
if (value === null || value === void 0) return "";
|
|
7457
7494
|
const strValue = Array.isArray(value) ? String(value[0] ?? "") : String(value);
|
|
@@ -7540,32 +7577,27 @@ var Input = import_react8.default.forwardRef((props, ref) => {
|
|
|
7540
7577
|
disabled,
|
|
7541
7578
|
type: type === "number" ? "text" : type,
|
|
7542
7579
|
value: localValue,
|
|
7543
|
-
onChange: handleChange
|
|
7580
|
+
onChange: handleChange,
|
|
7581
|
+
"aria-invalid": hasError(validations) || void 0
|
|
7544
7582
|
}
|
|
7545
7583
|
),
|
|
7546
7584
|
suffix && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { className: "suffix", children: suffix })
|
|
7547
7585
|
]
|
|
7548
7586
|
}
|
|
7549
7587
|
),
|
|
7550
|
-
|
|
7551
|
-
InputValidations_default,
|
|
7552
|
-
{
|
|
7553
|
-
...validation,
|
|
7554
|
-
key: `${validation.message}_${idx}`
|
|
7555
|
-
}
|
|
7556
|
-
)) })
|
|
7588
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(FieldMessage_default, { validations })
|
|
7557
7589
|
] });
|
|
7558
7590
|
});
|
|
7559
7591
|
Input.displayName = "Input";
|
|
7560
7592
|
var Input_default = Input;
|
|
7561
7593
|
|
|
7562
7594
|
// src/components/Input/PasswordInput/PasswordInput.tsx
|
|
7563
|
-
var
|
|
7595
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
7564
7596
|
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
7565
|
-
var PasswordInput =
|
|
7597
|
+
var PasswordInput = import_react9.default.forwardRef(
|
|
7566
7598
|
(props, ref) => {
|
|
7567
7599
|
const { reg: _reg, ...inputProps } = props;
|
|
7568
|
-
const [isView, setIsView] =
|
|
7600
|
+
const [isView, setIsView] = import_react9.default.useState(false);
|
|
7569
7601
|
const handleChangeView = () => {
|
|
7570
7602
|
setIsView((prev) => !prev);
|
|
7571
7603
|
};
|
|
@@ -7584,16 +7616,16 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
7584
7616
|
var PasswordInput_default = PasswordInput;
|
|
7585
7617
|
|
|
7586
7618
|
// src/components/Modal/Modal.tsx
|
|
7587
|
-
var
|
|
7619
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
7588
7620
|
var import_react_dom = require("react-dom");
|
|
7589
7621
|
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
7590
7622
|
var ANIMATION_DURATION_MS = 200;
|
|
7591
7623
|
var Modal = (props) => {
|
|
7592
7624
|
const { isOpen, onClose, children } = props;
|
|
7593
|
-
const [mounted, setMounted] =
|
|
7594
|
-
const [visible, setVisible] =
|
|
7595
|
-
const [settled, setSettled] =
|
|
7596
|
-
|
|
7625
|
+
const [mounted, setMounted] = import_react10.default.useState(false);
|
|
7626
|
+
const [visible, setVisible] = import_react10.default.useState(false);
|
|
7627
|
+
const [settled, setSettled] = import_react10.default.useState(false);
|
|
7628
|
+
import_react10.default.useEffect(() => {
|
|
7597
7629
|
if (isOpen) {
|
|
7598
7630
|
setMounted(true);
|
|
7599
7631
|
const show = setTimeout(() => setVisible(true), 1);
|
|
@@ -7636,9 +7668,9 @@ Modal.displayName = "Modal";
|
|
|
7636
7668
|
var Modal_default = Modal;
|
|
7637
7669
|
|
|
7638
7670
|
// src/components/DatePicker/SingleDatePicker/index.tsx
|
|
7639
|
-
var
|
|
7671
|
+
var import_react11 = __toESM(require("react"), 1);
|
|
7640
7672
|
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
7641
|
-
var DayCell2 =
|
|
7673
|
+
var DayCell2 = import_react11.default.memo(
|
|
7642
7674
|
({
|
|
7643
7675
|
day,
|
|
7644
7676
|
disabled,
|
|
@@ -7690,26 +7722,26 @@ var SingleDatePicker = (props) => {
|
|
|
7690
7722
|
initialYear,
|
|
7691
7723
|
initialMonth
|
|
7692
7724
|
);
|
|
7693
|
-
const [pickerMode, setPickerMode] =
|
|
7694
|
-
const [yearRangeStart, setYearRangeStart] =
|
|
7725
|
+
const [pickerMode, setPickerMode] = import_react11.default.useState("days");
|
|
7726
|
+
const [yearRangeStart, setYearRangeStart] = import_react11.default.useState(
|
|
7695
7727
|
Math.floor((initialYear ?? (/* @__PURE__ */ new Date()).getFullYear()) / 12) * 12
|
|
7696
7728
|
);
|
|
7697
|
-
const minTime =
|
|
7729
|
+
const minTime = import_react11.default.useMemo(
|
|
7698
7730
|
() => minDate ? new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()).getTime() : -Infinity,
|
|
7699
7731
|
[minDate]
|
|
7700
7732
|
);
|
|
7701
|
-
const maxTime =
|
|
7733
|
+
const maxTime = import_react11.default.useMemo(
|
|
7702
7734
|
() => maxDate ? new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate()).getTime() : Infinity,
|
|
7703
7735
|
[maxDate]
|
|
7704
7736
|
);
|
|
7705
|
-
const highlightSet =
|
|
7737
|
+
const highlightSet = import_react11.default.useMemo(() => {
|
|
7706
7738
|
const set = /* @__PURE__ */ new Set();
|
|
7707
7739
|
for (const h of highlightDates) {
|
|
7708
7740
|
set.add(`${h.getFullYear()}-${h.getMonth()}-${h.getDate()}`);
|
|
7709
7741
|
}
|
|
7710
7742
|
return set;
|
|
7711
7743
|
}, [highlightDates]);
|
|
7712
|
-
const handleSelect =
|
|
7744
|
+
const handleSelect = import_react11.default.useCallback(
|
|
7713
7745
|
(date) => {
|
|
7714
7746
|
onChange?.(date);
|
|
7715
7747
|
},
|
|
@@ -7838,8 +7870,8 @@ var formatDate = (date) => {
|
|
|
7838
7870
|
};
|
|
7839
7871
|
var InputDatePicker = (props) => {
|
|
7840
7872
|
const { value, onChange, minDate, maxDate, disabled, locale = "ko", placeholder } = props;
|
|
7841
|
-
const [isOpen, setIsOpen] =
|
|
7842
|
-
const [tempDate, setTempDate] =
|
|
7873
|
+
const [isOpen, setIsOpen] = import_react12.default.useState(false);
|
|
7874
|
+
const [tempDate, setTempDate] = import_react12.default.useState(value ?? /* @__PURE__ */ new Date());
|
|
7843
7875
|
const handleOpen = () => {
|
|
7844
7876
|
if (disabled) return;
|
|
7845
7877
|
setTempDate(value ?? /* @__PURE__ */ new Date());
|
|
@@ -7888,18 +7920,18 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
7888
7920
|
var InputDatePicker_default = InputDatePicker;
|
|
7889
7921
|
|
|
7890
7922
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
7891
|
-
var
|
|
7923
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
7892
7924
|
|
|
7893
7925
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
7894
|
-
var
|
|
7926
|
+
var import_react15 = __toESM(require("react"), 1);
|
|
7895
7927
|
|
|
7896
7928
|
// src/components/Tab/Tab.tsx
|
|
7897
|
-
var
|
|
7929
|
+
var import_react14 = __toESM(require("react"), 1);
|
|
7898
7930
|
|
|
7899
7931
|
// src/components/Tab/TabItem.tsx
|
|
7900
|
-
var
|
|
7932
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
7901
7933
|
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
7902
|
-
var TabItem =
|
|
7934
|
+
var TabItem = import_react13.default.forwardRef((props, ref) => {
|
|
7903
7935
|
const { isActive: isActive2, title, onClick } = props;
|
|
7904
7936
|
return /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
7905
7937
|
"div",
|
|
@@ -7917,22 +7949,23 @@ var TabItem_default = TabItem;
|
|
|
7917
7949
|
// src/components/Tab/Tab.tsx
|
|
7918
7950
|
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
7919
7951
|
var Tab = (props) => {
|
|
7920
|
-
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
7921
|
-
const
|
|
7952
|
+
const { activeIndex, onChange, tabs, variant, type, size = "md" } = props;
|
|
7953
|
+
const shape = variant ?? type ?? "default";
|
|
7954
|
+
const [underlineStyle, setUnderlineStyle] = import_react14.default.useState({
|
|
7922
7955
|
left: 0,
|
|
7923
7956
|
width: 0
|
|
7924
7957
|
});
|
|
7925
|
-
const itemRefs =
|
|
7958
|
+
const itemRefs = import_react14.default.useRef([]);
|
|
7926
7959
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
7927
7960
|
onChange(tabItem, tabIdx);
|
|
7928
7961
|
};
|
|
7929
|
-
|
|
7962
|
+
import_react14.default.useEffect(() => {
|
|
7930
7963
|
const el = itemRefs.current[activeIndex];
|
|
7931
7964
|
if (el) {
|
|
7932
7965
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
7933
7966
|
}
|
|
7934
7967
|
}, [activeIndex, tabs.length]);
|
|
7935
|
-
return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${
|
|
7968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)("div", { className: clsx_default("lib-xplat-tab", `type-${shape}`, size), children: [
|
|
7936
7969
|
tabs.map((tab, idx) => /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
7937
7970
|
TabItem_default,
|
|
7938
7971
|
{
|
|
@@ -7945,7 +7978,7 @@ var Tab = (props) => {
|
|
|
7945
7978
|
},
|
|
7946
7979
|
`${tab.value}_${idx}`
|
|
7947
7980
|
)),
|
|
7948
|
-
|
|
7981
|
+
shape === "toggle" && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
|
|
7949
7982
|
"div",
|
|
7950
7983
|
{
|
|
7951
7984
|
className: "tab-toggle-underline",
|
|
@@ -7971,7 +8004,7 @@ var RangePicker = (props) => {
|
|
|
7971
8004
|
maxDate,
|
|
7972
8005
|
locale = "ko"
|
|
7973
8006
|
} = props;
|
|
7974
|
-
const [activeTab, setActiveTab] =
|
|
8007
|
+
const [activeTab, setActiveTab] = import_react15.default.useState("start");
|
|
7975
8008
|
const handleStartChange = (date) => {
|
|
7976
8009
|
if (!date) return;
|
|
7977
8010
|
const newStart = date > endDate ? endDate : date;
|
|
@@ -8056,7 +8089,7 @@ var RangePicker_default = RangePicker;
|
|
|
8056
8089
|
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
8057
8090
|
var PopupPicker = (props) => {
|
|
8058
8091
|
const { component, type, locale } = props;
|
|
8059
|
-
const [isOpen, setIsOpen] =
|
|
8092
|
+
const [isOpen, setIsOpen] = import_react16.default.useState(false);
|
|
8060
8093
|
const handleClick = () => setIsOpen(true);
|
|
8061
8094
|
const handleClose = () => setIsOpen(false);
|
|
8062
8095
|
const handleSingleChange = (date) => {
|
|
@@ -8065,7 +8098,7 @@ var PopupPicker = (props) => {
|
|
|
8065
8098
|
handleClose();
|
|
8066
8099
|
};
|
|
8067
8100
|
return /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
8068
|
-
|
|
8101
|
+
import_react16.default.cloneElement(component, { onClick: handleClick }),
|
|
8069
8102
|
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
8070
8103
|
/* @__PURE__ */ (0, import_jsx_runtime319.jsxs)("div", { className: "popup-datepicker-content", children: [
|
|
8071
8104
|
type === "single" && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
@@ -8124,15 +8157,15 @@ Divider.displayName = "Divider";
|
|
|
8124
8157
|
var Divider_default = Divider;
|
|
8125
8158
|
|
|
8126
8159
|
// src/components/Drawer/Drawer.tsx
|
|
8127
|
-
var
|
|
8160
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
8128
8161
|
var import_react_dom2 = require("react-dom");
|
|
8129
8162
|
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
8130
8163
|
var ANIMATION_DURATION_MS2 = 250;
|
|
8131
8164
|
var Drawer = (props) => {
|
|
8132
8165
|
const { isOpen, onClose, placement = "right", size = "md", title, children } = props;
|
|
8133
|
-
const [mounted, setMounted] =
|
|
8134
|
-
const [visible, setVisible] =
|
|
8135
|
-
|
|
8166
|
+
const [mounted, setMounted] = import_react17.default.useState(false);
|
|
8167
|
+
const [visible, setVisible] = import_react17.default.useState(false);
|
|
8168
|
+
import_react17.default.useEffect(() => {
|
|
8136
8169
|
if (isOpen) {
|
|
8137
8170
|
setMounted(true);
|
|
8138
8171
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -8176,7 +8209,7 @@ Drawer.displayName = "Drawer";
|
|
|
8176
8209
|
var Drawer_default = Drawer;
|
|
8177
8210
|
|
|
8178
8211
|
// src/components/Dropdown/Dropdown.tsx
|
|
8179
|
-
var
|
|
8212
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
8180
8213
|
|
|
8181
8214
|
// src/tokens/hooks/Portal.tsx
|
|
8182
8215
|
var import_react_dom3 = __toESM(require("react-dom"), 1);
|
|
@@ -8188,13 +8221,13 @@ Portal.displayName = "Portal";
|
|
|
8188
8221
|
var Portal_default = Portal;
|
|
8189
8222
|
|
|
8190
8223
|
// src/tokens/hooks/useAutoPosition.ts
|
|
8191
|
-
var
|
|
8224
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
8192
8225
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
8193
|
-
const [position, setPosition] =
|
|
8226
|
+
const [position, setPosition] = import_react18.default.useState({
|
|
8194
8227
|
position: {},
|
|
8195
8228
|
direction: "bottom"
|
|
8196
8229
|
});
|
|
8197
|
-
const calculatePosition =
|
|
8230
|
+
const calculatePosition = import_react18.default.useCallback(() => {
|
|
8198
8231
|
if (!triggerRef.current || !popRef.current) return;
|
|
8199
8232
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
8200
8233
|
const popW = popRef.current.offsetWidth;
|
|
@@ -8221,13 +8254,13 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
8221
8254
|
direction
|
|
8222
8255
|
});
|
|
8223
8256
|
}, [triggerRef, popRef]);
|
|
8224
|
-
|
|
8257
|
+
import_react18.default.useLayoutEffect(() => {
|
|
8225
8258
|
if (!enabled) return;
|
|
8226
8259
|
calculatePosition();
|
|
8227
8260
|
const raf = requestAnimationFrame(calculatePosition);
|
|
8228
8261
|
return () => cancelAnimationFrame(raf);
|
|
8229
8262
|
}, [calculatePosition, enabled]);
|
|
8230
|
-
|
|
8263
|
+
import_react18.default.useEffect(() => {
|
|
8231
8264
|
if (!enabled || !popRef.current) return;
|
|
8232
8265
|
const observer = new ResizeObserver(() => {
|
|
8233
8266
|
calculatePosition();
|
|
@@ -8235,7 +8268,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
8235
8268
|
observer.observe(popRef.current);
|
|
8236
8269
|
return () => observer.disconnect();
|
|
8237
8270
|
}, [calculatePosition, enabled, popRef]);
|
|
8238
|
-
|
|
8271
|
+
import_react18.default.useEffect(() => {
|
|
8239
8272
|
if (!enabled) return;
|
|
8240
8273
|
window.addEventListener("resize", calculatePosition);
|
|
8241
8274
|
window.addEventListener("scroll", calculatePosition, true);
|
|
@@ -8249,9 +8282,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
8249
8282
|
var useAutoPosition_default = useAutoPosition;
|
|
8250
8283
|
|
|
8251
8284
|
// src/tokens/hooks/useClickOutside.ts
|
|
8252
|
-
var
|
|
8285
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
8253
8286
|
var useClickOutside = (refs, handler, enabled = true) => {
|
|
8254
|
-
|
|
8287
|
+
import_react19.default.useEffect(() => {
|
|
8255
8288
|
if (!enabled) return;
|
|
8256
8289
|
const refArray = Array.isArray(refs) ? refs : [refs];
|
|
8257
8290
|
const listener = (event) => {
|
|
@@ -8277,14 +8310,14 @@ var useClickOutside_default = useClickOutside;
|
|
|
8277
8310
|
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
8278
8311
|
var Dropdown = (props) => {
|
|
8279
8312
|
const { items, children } = props;
|
|
8280
|
-
const [isOpen, setIsOpen] =
|
|
8281
|
-
const [mounted, setMounted] =
|
|
8282
|
-
const [visible, setVisible] =
|
|
8283
|
-
const triggerRef =
|
|
8284
|
-
const menuRef =
|
|
8313
|
+
const [isOpen, setIsOpen] = import_react20.default.useState(false);
|
|
8314
|
+
const [mounted, setMounted] = import_react20.default.useState(false);
|
|
8315
|
+
const [visible, setVisible] = import_react20.default.useState(false);
|
|
8316
|
+
const triggerRef = import_react20.default.useRef(null);
|
|
8317
|
+
const menuRef = import_react20.default.useRef(null);
|
|
8285
8318
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, mounted);
|
|
8286
8319
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
|
|
8287
|
-
|
|
8320
|
+
import_react20.default.useEffect(() => {
|
|
8288
8321
|
if (isOpen) {
|
|
8289
8322
|
setMounted(true);
|
|
8290
8323
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -8338,7 +8371,7 @@ Dropdown.displayName = "Dropdown";
|
|
|
8338
8371
|
var Dropdown_default = Dropdown;
|
|
8339
8372
|
|
|
8340
8373
|
// src/components/Editor/Editor.tsx
|
|
8341
|
-
var
|
|
8374
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
8342
8375
|
var import_jsx_runtime323 = require("react/jsx-runtime");
|
|
8343
8376
|
var DEFAULT_TOOLBAR = [
|
|
8344
8377
|
"bold",
|
|
@@ -8446,21 +8479,21 @@ var Editor = (props) => {
|
|
|
8446
8479
|
onImageUpload,
|
|
8447
8480
|
minHeight = 200
|
|
8448
8481
|
} = props;
|
|
8449
|
-
const editorRef =
|
|
8450
|
-
const lastRangeRef =
|
|
8451
|
-
const composingRef =
|
|
8452
|
-
const [isFocused, setIsFocused] =
|
|
8453
|
-
const [isEmpty, setIsEmpty] =
|
|
8454
|
-
const [activeFormats, setActiveFormats] =
|
|
8455
|
-
const [slashOpen, setSlashOpen] =
|
|
8456
|
-
const [slashFilter, setSlashFilter] =
|
|
8457
|
-
const [slashIdx, setSlashIdx] =
|
|
8458
|
-
const [slashPos, setSlashPos] =
|
|
8459
|
-
const slashStartRangeRef =
|
|
8460
|
-
const [linkOpen, setLinkOpen] =
|
|
8461
|
-
const [linkValue, setLinkValue] =
|
|
8462
|
-
const [linkPos, setLinkPos] =
|
|
8463
|
-
|
|
8482
|
+
const editorRef = import_react21.default.useRef(null);
|
|
8483
|
+
const lastRangeRef = import_react21.default.useRef(null);
|
|
8484
|
+
const composingRef = import_react21.default.useRef(false);
|
|
8485
|
+
const [isFocused, setIsFocused] = import_react21.default.useState(false);
|
|
8486
|
+
const [isEmpty, setIsEmpty] = import_react21.default.useState(!value);
|
|
8487
|
+
const [activeFormats, setActiveFormats] = import_react21.default.useState(/* @__PURE__ */ new Set());
|
|
8488
|
+
const [slashOpen, setSlashOpen] = import_react21.default.useState(false);
|
|
8489
|
+
const [slashFilter, setSlashFilter] = import_react21.default.useState("");
|
|
8490
|
+
const [slashIdx, setSlashIdx] = import_react21.default.useState(0);
|
|
8491
|
+
const [slashPos, setSlashPos] = import_react21.default.useState({ top: 0, left: 0 });
|
|
8492
|
+
const slashStartRangeRef = import_react21.default.useRef(null);
|
|
8493
|
+
const [linkOpen, setLinkOpen] = import_react21.default.useState(false);
|
|
8494
|
+
const [linkValue, setLinkValue] = import_react21.default.useState("");
|
|
8495
|
+
const [linkPos, setLinkPos] = import_react21.default.useState({ top: 0, left: 0 });
|
|
8496
|
+
import_react21.default.useEffect(() => {
|
|
8464
8497
|
if (!editorRef.current) return;
|
|
8465
8498
|
if (editorRef.current.innerHTML !== value) {
|
|
8466
8499
|
editorRef.current.innerHTML = sanitizeHtml(value || "");
|
|
@@ -8574,7 +8607,7 @@ var Editor = (props) => {
|
|
|
8574
8607
|
setSlashIdx(0);
|
|
8575
8608
|
slashStartRangeRef.current = null;
|
|
8576
8609
|
};
|
|
8577
|
-
const filteredSlashItems =
|
|
8610
|
+
const filteredSlashItems = import_react21.default.useMemo(() => {
|
|
8578
8611
|
if (!slashFilter) return SLASH_ITEMS;
|
|
8579
8612
|
const f = slashFilter.toLowerCase();
|
|
8580
8613
|
return SLASH_ITEMS.filter((it) => it.label.toLowerCase().includes(f) || it.key.includes(f));
|
|
@@ -8967,7 +9000,7 @@ var EditorToolbar = ({ items, active, onAction }) => {
|
|
|
8967
9000
|
)) });
|
|
8968
9001
|
};
|
|
8969
9002
|
var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
8970
|
-
|
|
9003
|
+
import_react21.default.useEffect(() => {
|
|
8971
9004
|
const handleClickOutside = (e) => {
|
|
8972
9005
|
const target = e.target;
|
|
8973
9006
|
const menu = document.querySelector(".lib-xplat-editor__slash-menu");
|
|
@@ -9001,8 +9034,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
9001
9034
|
);
|
|
9002
9035
|
};
|
|
9003
9036
|
var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
9004
|
-
const inputRef =
|
|
9005
|
-
|
|
9037
|
+
const inputRef = import_react21.default.useRef(null);
|
|
9038
|
+
import_react21.default.useEffect(() => {
|
|
9006
9039
|
inputRef.current?.focus();
|
|
9007
9040
|
}, []);
|
|
9008
9041
|
return /* @__PURE__ */ (0, import_jsx_runtime323.jsxs)(
|
|
@@ -9060,7 +9093,7 @@ EmptyState.displayName = "EmptyState";
|
|
|
9060
9093
|
var EmptyState_default = EmptyState;
|
|
9061
9094
|
|
|
9062
9095
|
// src/components/FileUpload/FileUpload.tsx
|
|
9063
|
-
var
|
|
9096
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
9064
9097
|
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
9065
9098
|
var FileUpload = (props) => {
|
|
9066
9099
|
const {
|
|
@@ -9069,10 +9102,11 @@ var FileUpload = (props) => {
|
|
|
9069
9102
|
maxSize,
|
|
9070
9103
|
onChange,
|
|
9071
9104
|
label = "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8\uD558\uAC70\uB098 \uD074\uB9AD\uD558\uC5EC \uC5C5\uB85C\uB4DC",
|
|
9072
|
-
description
|
|
9105
|
+
description,
|
|
9106
|
+
validations
|
|
9073
9107
|
} = props;
|
|
9074
|
-
const [isDragOver, setIsDragOver] =
|
|
9075
|
-
const inputRef =
|
|
9108
|
+
const [isDragOver, setIsDragOver] = import_react22.default.useState(false);
|
|
9109
|
+
const inputRef = import_react22.default.useRef(null);
|
|
9076
9110
|
const handleFiles = (fileList) => {
|
|
9077
9111
|
let files = Array.from(fileList);
|
|
9078
9112
|
if (maxSize) {
|
|
@@ -9102,7 +9136,7 @@ var FileUpload = (props) => {
|
|
|
9102
9136
|
handleFiles(e.target.files);
|
|
9103
9137
|
}
|
|
9104
9138
|
};
|
|
9105
|
-
|
|
9139
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(
|
|
9106
9140
|
"div",
|
|
9107
9141
|
{
|
|
9108
9142
|
className: clsx_default("lib-xplat-file-upload", { "drag-over": isDragOver }),
|
|
@@ -9118,7 +9152,8 @@ var FileUpload = (props) => {
|
|
|
9118
9152
|
type: "file",
|
|
9119
9153
|
accept,
|
|
9120
9154
|
multiple,
|
|
9121
|
-
onChange: handleChange
|
|
9155
|
+
onChange: handleChange,
|
|
9156
|
+
"aria-invalid": hasError(validations) || void 0
|
|
9122
9157
|
}
|
|
9123
9158
|
),
|
|
9124
9159
|
/* @__PURE__ */ (0, import_jsx_runtime325.jsx)("div", { className: "upload-icon", children: /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(UploadIcon_default, {}) }),
|
|
@@ -9127,15 +9162,16 @@ var FileUpload = (props) => {
|
|
|
9127
9162
|
]
|
|
9128
9163
|
}
|
|
9129
9164
|
);
|
|
9165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(Field, { validations, children: control });
|
|
9130
9166
|
};
|
|
9131
9167
|
FileUpload.displayName = "FileUpload";
|
|
9132
9168
|
var FileUpload_default = FileUpload;
|
|
9133
9169
|
|
|
9134
9170
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
9135
|
-
var
|
|
9171
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
9136
9172
|
|
|
9137
9173
|
// src/components/HtmlTypeWriter/utils.ts
|
|
9138
|
-
var
|
|
9174
|
+
var import_react23 = __toESM(require("react"), 1);
|
|
9139
9175
|
var voidTags = /* @__PURE__ */ new Set([
|
|
9140
9176
|
"br",
|
|
9141
9177
|
"img",
|
|
@@ -9203,15 +9239,15 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
|
|
|
9203
9239
|
props[attr.name] = attr.value;
|
|
9204
9240
|
});
|
|
9205
9241
|
if (voidTags.has(tag)) {
|
|
9206
|
-
return
|
|
9242
|
+
return import_react23.default.createElement(tag, props);
|
|
9207
9243
|
}
|
|
9208
9244
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
9209
|
-
return
|
|
9245
|
+
return import_react23.default.createElement(tag, props, ...children);
|
|
9210
9246
|
};
|
|
9211
9247
|
var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
9212
9248
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
9213
9249
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
9214
|
-
return node == null ? null :
|
|
9250
|
+
return node == null ? null : import_react23.default.createElement(import_react23.default.Fragment, { key: idx }, node);
|
|
9215
9251
|
}).filter(Boolean);
|
|
9216
9252
|
return nodes.length === 0 ? null : nodes;
|
|
9217
9253
|
};
|
|
@@ -9224,20 +9260,20 @@ var HtmlTypeWriter = ({
|
|
|
9224
9260
|
onDone,
|
|
9225
9261
|
onChange
|
|
9226
9262
|
}) => {
|
|
9227
|
-
const [typedLen, setTypedLen] =
|
|
9228
|
-
const doneCalledRef =
|
|
9229
|
-
const { doc, rangeMap, totalLength } =
|
|
9263
|
+
const [typedLen, setTypedLen] = import_react24.default.useState(0);
|
|
9264
|
+
const doneCalledRef = import_react24.default.useRef(false);
|
|
9265
|
+
const { doc, rangeMap, totalLength } = import_react24.default.useMemo(() => {
|
|
9230
9266
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
9231
9267
|
const decoded = decodeHtmlEntities(html);
|
|
9232
9268
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
9233
9269
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
9234
9270
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
9235
9271
|
}, [html]);
|
|
9236
|
-
|
|
9272
|
+
import_react24.default.useEffect(() => {
|
|
9237
9273
|
setTypedLen(0);
|
|
9238
9274
|
doneCalledRef.current = false;
|
|
9239
9275
|
}, [html]);
|
|
9240
|
-
|
|
9276
|
+
import_react24.default.useEffect(() => {
|
|
9241
9277
|
if (!totalLength) return;
|
|
9242
9278
|
if (typedLen >= totalLength) return;
|
|
9243
9279
|
const timer = window.setInterval(() => {
|
|
@@ -9245,18 +9281,18 @@ var HtmlTypeWriter = ({
|
|
|
9245
9281
|
}, duration);
|
|
9246
9282
|
return () => window.clearInterval(timer);
|
|
9247
9283
|
}, [typedLen, totalLength, duration]);
|
|
9248
|
-
|
|
9284
|
+
import_react24.default.useEffect(() => {
|
|
9249
9285
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
9250
9286
|
onChange?.();
|
|
9251
9287
|
}
|
|
9252
9288
|
}, [typedLen, totalLength, onChange]);
|
|
9253
|
-
|
|
9289
|
+
import_react24.default.useEffect(() => {
|
|
9254
9290
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
9255
9291
|
doneCalledRef.current = true;
|
|
9256
9292
|
onDone?.();
|
|
9257
9293
|
}
|
|
9258
9294
|
}, [typedLen, totalLength, onDone]);
|
|
9259
|
-
const parsed =
|
|
9295
|
+
const parsed = import_react24.default.useMemo(
|
|
9260
9296
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
9261
9297
|
[doc, typedLen, rangeMap]
|
|
9262
9298
|
);
|
|
@@ -9266,12 +9302,12 @@ HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
|
9266
9302
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
9267
9303
|
|
|
9268
9304
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
9269
|
-
var
|
|
9305
|
+
var import_react25 = __toESM(require("react"), 1);
|
|
9270
9306
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
9271
9307
|
var ImageSelector = (props) => {
|
|
9272
|
-
const { value, label, onChange } = props;
|
|
9273
|
-
const [previewUrl, setPreviewUrl] =
|
|
9274
|
-
|
|
9308
|
+
const { value, label, onChange, validations } = props;
|
|
9309
|
+
const [previewUrl, setPreviewUrl] = import_react25.default.useState();
|
|
9310
|
+
import_react25.default.useEffect(() => {
|
|
9275
9311
|
if (!value) {
|
|
9276
9312
|
setPreviewUrl(void 0);
|
|
9277
9313
|
return;
|
|
@@ -9280,7 +9316,7 @@ var ImageSelector = (props) => {
|
|
|
9280
9316
|
setPreviewUrl(url);
|
|
9281
9317
|
return () => URL.revokeObjectURL(url);
|
|
9282
9318
|
}, [value]);
|
|
9283
|
-
const inputRef =
|
|
9319
|
+
const inputRef = import_react25.default.useRef(null);
|
|
9284
9320
|
const handleFileChange = (e) => {
|
|
9285
9321
|
const selectedFile = e.target.files?.[0];
|
|
9286
9322
|
if (selectedFile) {
|
|
@@ -9293,7 +9329,7 @@ var ImageSelector = (props) => {
|
|
|
9293
9329
|
const handleOpenFileDialog = () => {
|
|
9294
9330
|
inputRef.current?.click();
|
|
9295
9331
|
};
|
|
9296
|
-
|
|
9332
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: `lib-xplat-imageselector${value ? "" : " none-value"}`, children: [
|
|
9297
9333
|
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
9298
9334
|
"input",
|
|
9299
9335
|
{
|
|
@@ -9301,7 +9337,8 @@ var ImageSelector = (props) => {
|
|
|
9301
9337
|
accept: "image/*",
|
|
9302
9338
|
id: "image-input",
|
|
9303
9339
|
onChange: handleFileChange,
|
|
9304
|
-
ref: inputRef
|
|
9340
|
+
ref: inputRef,
|
|
9341
|
+
"aria-invalid": hasError(validations) || void 0
|
|
9305
9342
|
}
|
|
9306
9343
|
),
|
|
9307
9344
|
value && /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)("div", { className: "action-bar", children: [
|
|
@@ -9313,6 +9350,7 @@ var ImageSelector = (props) => {
|
|
|
9313
9350
|
/* @__PURE__ */ (0, import_jsx_runtime327.jsx)("div", { className: "label", children: label || "\uC774\uBBF8\uC9C0 \uCD94\uAC00\uD558\uAE30" })
|
|
9314
9351
|
] }) })
|
|
9315
9352
|
] });
|
|
9353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(Field, { validations, children: control });
|
|
9316
9354
|
};
|
|
9317
9355
|
ImageSelector.displayName = "ImageSelector";
|
|
9318
9356
|
var ImageSelector_default = ImageSelector;
|
|
@@ -9366,11 +9404,12 @@ var NotificationBadge = (props) => {
|
|
|
9366
9404
|
dot = false,
|
|
9367
9405
|
size = "md"
|
|
9368
9406
|
} = props;
|
|
9407
|
+
const statusType = normalizeStatus(type);
|
|
9369
9408
|
const showBadge = dot || count !== void 0 && count > 0;
|
|
9370
9409
|
const displayCount = count !== void 0 && count > maxCount ? `${maxCount}+` : count;
|
|
9371
9410
|
return /* @__PURE__ */ (0, import_jsx_runtime330.jsxs)("div", { className: clsx_default("lib-xplat-notification-badge", size), children: [
|
|
9372
9411
|
children,
|
|
9373
|
-
showBadge && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("span", { className: clsx_default("badge-indicator",
|
|
9412
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)("span", { className: clsx_default("badge-indicator", statusType, { dot }), children: !dot && displayCount })
|
|
9374
9413
|
] });
|
|
9375
9414
|
};
|
|
9376
9415
|
NotificationBadge.displayName = "NotificationBadge";
|
|
@@ -9411,8 +9450,9 @@ var Pagination = (props) => {
|
|
|
9411
9450
|
siblingCount = 1,
|
|
9412
9451
|
onChange,
|
|
9413
9452
|
size = "md",
|
|
9414
|
-
type = "
|
|
9453
|
+
type = "primary"
|
|
9415
9454
|
} = props;
|
|
9455
|
+
const statusType = normalizeStatus(type);
|
|
9416
9456
|
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
9417
9457
|
const pages = getPageRange(current, totalPages, siblingCount);
|
|
9418
9458
|
const handleClick = (page) => {
|
|
@@ -9420,7 +9460,7 @@ var Pagination = (props) => {
|
|
|
9420
9460
|
onChange?.(page);
|
|
9421
9461
|
}
|
|
9422
9462
|
};
|
|
9423
|
-
return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size,
|
|
9463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime331.jsxs)("nav", { className: clsx_default("lib-xplat-pagination", size, statusType), "aria-label": "\uD398\uC774\uC9C0 \uB124\uBE44\uAC8C\uC774\uC158", children: [
|
|
9424
9464
|
/* @__PURE__ */ (0, import_jsx_runtime331.jsx)(
|
|
9425
9465
|
"button",
|
|
9426
9466
|
{
|
|
@@ -9459,17 +9499,17 @@ Pagination.displayName = "Pagination";
|
|
|
9459
9499
|
var Pagination_default = Pagination;
|
|
9460
9500
|
|
|
9461
9501
|
// src/components/PopOver/PopOver.tsx
|
|
9462
|
-
var
|
|
9502
|
+
var import_react26 = __toESM(require("react"), 1);
|
|
9463
9503
|
var import_jsx_runtime332 = require("react/jsx-runtime");
|
|
9464
9504
|
var PopOver = (props) => {
|
|
9465
9505
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
9466
|
-
const popRef =
|
|
9467
|
-
const triggerRef =
|
|
9468
|
-
const [localOpen, setLocalOpen] =
|
|
9469
|
-
const [eventTrigger, setEventTrigger] =
|
|
9506
|
+
const popRef = import_react26.default.useRef(null);
|
|
9507
|
+
const triggerRef = import_react26.default.useRef(null);
|
|
9508
|
+
const [localOpen, setLocalOpen] = import_react26.default.useState(false);
|
|
9509
|
+
const [eventTrigger, setEventTrigger] = import_react26.default.useState(false);
|
|
9470
9510
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
9471
9511
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
9472
|
-
|
|
9512
|
+
import_react26.default.useEffect(() => {
|
|
9473
9513
|
if (isOpen) {
|
|
9474
9514
|
setLocalOpen(isOpen);
|
|
9475
9515
|
setTimeout(() => {
|
|
@@ -9521,11 +9561,12 @@ var Progress = (props) => {
|
|
|
9521
9561
|
value,
|
|
9522
9562
|
max = 100,
|
|
9523
9563
|
size = "md",
|
|
9524
|
-
type = "
|
|
9564
|
+
type = "primary",
|
|
9525
9565
|
showLabel = false
|
|
9526
9566
|
} = props;
|
|
9567
|
+
const statusType = normalizeStatus(type);
|
|
9527
9568
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
9528
|
-
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: clsx_default("lib-xplat-progress", size,
|
|
9569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime333.jsxs)("div", { className: clsx_default("lib-xplat-progress", size, statusType), children: [
|
|
9529
9570
|
/* @__PURE__ */ (0, import_jsx_runtime333.jsx)(
|
|
9530
9571
|
"div",
|
|
9531
9572
|
{
|
|
@@ -9553,12 +9594,12 @@ Progress.displayName = "Progress";
|
|
|
9553
9594
|
var Progress_default = Progress;
|
|
9554
9595
|
|
|
9555
9596
|
// src/components/Radio/RadioGroupContext.tsx
|
|
9556
|
-
var
|
|
9557
|
-
var RadioGroupContext =
|
|
9597
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
9598
|
+
var RadioGroupContext = import_react27.default.createContext(
|
|
9558
9599
|
null
|
|
9559
9600
|
);
|
|
9560
9601
|
var useRadioGroupContext = () => {
|
|
9561
|
-
return
|
|
9602
|
+
return import_react27.default.useContext(RadioGroupContext);
|
|
9562
9603
|
};
|
|
9563
9604
|
var RadioGroupContext_default = RadioGroupContext;
|
|
9564
9605
|
|
|
@@ -9570,9 +9611,11 @@ var Radio = (props) => {
|
|
|
9570
9611
|
className,
|
|
9571
9612
|
value,
|
|
9572
9613
|
size: sizeProp,
|
|
9573
|
-
type = "
|
|
9614
|
+
type = "primary",
|
|
9615
|
+
validations,
|
|
9574
9616
|
...rest
|
|
9575
9617
|
} = props;
|
|
9618
|
+
const statusType = normalizeStatus(type);
|
|
9576
9619
|
const context = useRadioGroupContext();
|
|
9577
9620
|
const size = sizeProp ?? context?.size ?? "md";
|
|
9578
9621
|
const isGroup = !!context;
|
|
@@ -9582,18 +9625,27 @@ var Radio = (props) => {
|
|
|
9582
9625
|
value,
|
|
9583
9626
|
onChange: rest.onChange
|
|
9584
9627
|
};
|
|
9585
|
-
|
|
9628
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime334.jsxs)(
|
|
9586
9629
|
"label",
|
|
9587
9630
|
{
|
|
9588
9631
|
className: clsx_default(
|
|
9589
9632
|
"lib-xplat-radio",
|
|
9590
9633
|
size,
|
|
9591
|
-
|
|
9634
|
+
statusType,
|
|
9592
9635
|
localChecked ? "checked" : void 0,
|
|
9593
9636
|
className
|
|
9594
9637
|
),
|
|
9595
9638
|
children: [
|
|
9596
|
-
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
9639
|
+
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
9640
|
+
"input",
|
|
9641
|
+
{
|
|
9642
|
+
...rest,
|
|
9643
|
+
...inputProps,
|
|
9644
|
+
checked: localChecked,
|
|
9645
|
+
type: "radio",
|
|
9646
|
+
"aria-invalid": hasError(validations) || void 0
|
|
9647
|
+
}
|
|
9648
|
+
),
|
|
9597
9649
|
/* @__PURE__ */ (0, import_jsx_runtime334.jsx)(
|
|
9598
9650
|
"div",
|
|
9599
9651
|
{
|
|
@@ -9608,6 +9660,7 @@ var Radio = (props) => {
|
|
|
9608
9660
|
]
|
|
9609
9661
|
}
|
|
9610
9662
|
);
|
|
9663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime334.jsx)(Field, { validations, children: control });
|
|
9611
9664
|
};
|
|
9612
9665
|
Radio.displayName = "Radio";
|
|
9613
9666
|
var Radio_default = Radio;
|
|
@@ -9622,19 +9675,19 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
9622
9675
|
var RadioGroup_default = RadioGroup;
|
|
9623
9676
|
|
|
9624
9677
|
// src/components/Select/Select.tsx
|
|
9625
|
-
var
|
|
9678
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
9626
9679
|
|
|
9627
9680
|
// src/components/Select/context.ts
|
|
9628
|
-
var
|
|
9629
|
-
var SelectContext =
|
|
9681
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
9682
|
+
var SelectContext = import_react28.default.createContext(null);
|
|
9630
9683
|
var context_default = SelectContext;
|
|
9631
9684
|
|
|
9632
9685
|
// src/components/Select/SelectItem.tsx
|
|
9633
|
-
var
|
|
9686
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
9634
9687
|
var import_jsx_runtime336 = require("react/jsx-runtime");
|
|
9635
9688
|
var SelectItem = (props) => {
|
|
9636
9689
|
const { children, value, onClick, disabled = false } = props;
|
|
9637
|
-
const ctx =
|
|
9690
|
+
const ctx = import_react29.default.useContext(context_default);
|
|
9638
9691
|
const handleClick = (e) => {
|
|
9639
9692
|
e.preventDefault();
|
|
9640
9693
|
e.stopPropagation();
|
|
@@ -9675,30 +9728,31 @@ var SelectRoot = (props) => {
|
|
|
9675
9728
|
children,
|
|
9676
9729
|
disabled = false,
|
|
9677
9730
|
error = false,
|
|
9731
|
+
validations,
|
|
9678
9732
|
size = "md"
|
|
9679
9733
|
} = props;
|
|
9680
|
-
const itemChildren =
|
|
9681
|
-
(child) =>
|
|
9734
|
+
const itemChildren = import_react30.default.Children.toArray(children).filter(
|
|
9735
|
+
(child) => import_react30.default.isValidElement(child) && child.type === SelectItem_default
|
|
9682
9736
|
);
|
|
9683
9737
|
const isControlled = valueProp !== void 0;
|
|
9684
|
-
const [isOpen, setOpen] =
|
|
9685
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
9686
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
9687
|
-
const controlledLabel =
|
|
9738
|
+
const [isOpen, setOpen] = import_react30.default.useState(false);
|
|
9739
|
+
const [uncontrolledLabel, setUncontrolledLabel] = import_react30.default.useState(null);
|
|
9740
|
+
const [uncontrolledValue, setUncontrolledValue] = import_react30.default.useState(void 0);
|
|
9741
|
+
const controlledLabel = import_react30.default.useMemo(() => {
|
|
9688
9742
|
if (!isControlled) return null;
|
|
9689
9743
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
9690
9744
|
return match ? match.props.children : null;
|
|
9691
9745
|
}, [isControlled, valueProp, itemChildren]);
|
|
9692
9746
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
9693
9747
|
const selectedValue = isControlled ? valueProp : uncontrolledValue;
|
|
9694
|
-
const triggerRef =
|
|
9695
|
-
const contentRef =
|
|
9696
|
-
const [mounted, setMounted] =
|
|
9697
|
-
const [visible, setVisible] =
|
|
9698
|
-
|
|
9748
|
+
const triggerRef = import_react30.default.useRef(null);
|
|
9749
|
+
const contentRef = import_react30.default.useRef(null);
|
|
9750
|
+
const [mounted, setMounted] = import_react30.default.useState(false);
|
|
9751
|
+
const [visible, setVisible] = import_react30.default.useState(false);
|
|
9752
|
+
import_react30.default.useEffect(() => {
|
|
9699
9753
|
if (disabled && isOpen) setOpen(false);
|
|
9700
9754
|
}, [disabled, isOpen]);
|
|
9701
|
-
|
|
9755
|
+
import_react30.default.useEffect(() => {
|
|
9702
9756
|
if (isOpen) {
|
|
9703
9757
|
setMounted(true);
|
|
9704
9758
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -9708,12 +9762,12 @@ var SelectRoot = (props) => {
|
|
|
9708
9762
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
9709
9763
|
return () => clearTimeout(t);
|
|
9710
9764
|
}, [isOpen]);
|
|
9711
|
-
const open =
|
|
9712
|
-
const close =
|
|
9713
|
-
const toggle =
|
|
9765
|
+
const open = import_react30.default.useCallback(() => setOpen(true), []);
|
|
9766
|
+
const close = import_react30.default.useCallback(() => setOpen(false), []);
|
|
9767
|
+
const toggle = import_react30.default.useCallback(() => setOpen((prev) => !prev), []);
|
|
9714
9768
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
9715
9769
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
9716
|
-
const setSelected =
|
|
9770
|
+
const setSelected = import_react30.default.useCallback(
|
|
9717
9771
|
(label, itemValue) => {
|
|
9718
9772
|
if (!isControlled) {
|
|
9719
9773
|
setUncontrolledLabel(label);
|
|
@@ -9723,7 +9777,7 @@ var SelectRoot = (props) => {
|
|
|
9723
9777
|
},
|
|
9724
9778
|
[isControlled, onChange]
|
|
9725
9779
|
);
|
|
9726
|
-
const ctxValue =
|
|
9780
|
+
const ctxValue = import_react30.default.useMemo(
|
|
9727
9781
|
() => ({
|
|
9728
9782
|
isOpen,
|
|
9729
9783
|
mounted,
|
|
@@ -9745,14 +9799,14 @@ var SelectRoot = (props) => {
|
|
|
9745
9799
|
if (disabled) return;
|
|
9746
9800
|
toggle();
|
|
9747
9801
|
};
|
|
9748
|
-
|
|
9802
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(context_default.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime337.jsxs)(
|
|
9749
9803
|
"div",
|
|
9750
9804
|
{
|
|
9751
9805
|
className: clsx_default(
|
|
9752
9806
|
"lib-xplat-select",
|
|
9753
9807
|
size,
|
|
9754
9808
|
disabled && "disabled",
|
|
9755
|
-
error && "error",
|
|
9809
|
+
(error || hasError(validations)) && "error",
|
|
9756
9810
|
mounted && "is-open"
|
|
9757
9811
|
),
|
|
9758
9812
|
children: [
|
|
@@ -9763,14 +9817,14 @@ var SelectRoot = (props) => {
|
|
|
9763
9817
|
className: clsx_default(
|
|
9764
9818
|
"select-trigger",
|
|
9765
9819
|
disabled && "disabled",
|
|
9766
|
-
error && "error"
|
|
9820
|
+
(error || hasError(validations)) && "error"
|
|
9767
9821
|
),
|
|
9768
9822
|
onClick: handleTriggerClick,
|
|
9769
9823
|
role: "combobox",
|
|
9770
9824
|
"aria-expanded": isOpen,
|
|
9771
9825
|
"aria-haspopup": "listbox",
|
|
9772
9826
|
"aria-disabled": disabled,
|
|
9773
|
-
"aria-invalid": error,
|
|
9827
|
+
"aria-invalid": error || hasError(validations) || void 0,
|
|
9774
9828
|
tabIndex: disabled ? -1 : 0,
|
|
9775
9829
|
onKeyDown: (e) => {
|
|
9776
9830
|
if (disabled) return;
|
|
@@ -9814,6 +9868,7 @@ var SelectRoot = (props) => {
|
|
|
9814
9868
|
]
|
|
9815
9869
|
}
|
|
9816
9870
|
) });
|
|
9871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime337.jsx)(Field, { validations, children: control });
|
|
9817
9872
|
};
|
|
9818
9873
|
SelectRoot.displayName = "Select";
|
|
9819
9874
|
var Select = Object.assign(SelectRoot, {
|
|
@@ -9855,12 +9910,13 @@ var import_jsx_runtime339 = require("react/jsx-runtime");
|
|
|
9855
9910
|
var Spinner = (props) => {
|
|
9856
9911
|
const {
|
|
9857
9912
|
size = "md",
|
|
9858
|
-
type = "
|
|
9913
|
+
type = "primary"
|
|
9859
9914
|
} = props;
|
|
9915
|
+
const statusType = normalizeStatus(type);
|
|
9860
9916
|
return /* @__PURE__ */ (0, import_jsx_runtime339.jsx)(
|
|
9861
9917
|
"div",
|
|
9862
9918
|
{
|
|
9863
|
-
className: clsx_default("lib-xplat-spinner", size,
|
|
9919
|
+
className: clsx_default("lib-xplat-spinner", size, statusType),
|
|
9864
9920
|
role: "status",
|
|
9865
9921
|
"aria-label": "\uB85C\uB529 \uC911",
|
|
9866
9922
|
children: /* @__PURE__ */ (0, import_jsx_runtime339.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
@@ -9898,9 +9954,10 @@ var Steps = (props) => {
|
|
|
9898
9954
|
const {
|
|
9899
9955
|
items,
|
|
9900
9956
|
current,
|
|
9901
|
-
type = "
|
|
9957
|
+
type = "primary"
|
|
9902
9958
|
} = props;
|
|
9903
|
-
|
|
9959
|
+
const statusType = normalizeStatus(type);
|
|
9960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { className: clsx_default("lib-xplat-steps", statusType), children: items.map((item, index) => {
|
|
9904
9961
|
const status = index < current ? "completed" : index === current ? "active" : "pending";
|
|
9905
9962
|
return /* @__PURE__ */ (0, import_jsx_runtime340.jsxs)("div", { className: clsx_default("step-item", status), children: [
|
|
9906
9963
|
/* @__PURE__ */ (0, import_jsx_runtime340.jsx)("div", { className: "step-circle", children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime340.jsx)(CheckIcon_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime340.jsx)("span", { children: index + 1 }) }),
|
|
@@ -9915,7 +9972,7 @@ Steps.displayName = "Steps";
|
|
|
9915
9972
|
var Steps_default = Steps;
|
|
9916
9973
|
|
|
9917
9974
|
// src/components/Swiper/Swiper.tsx
|
|
9918
|
-
var
|
|
9975
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
9919
9976
|
var import_jsx_runtime341 = require("react/jsx-runtime");
|
|
9920
9977
|
var Swiper = (props) => {
|
|
9921
9978
|
const {
|
|
@@ -9940,26 +9997,26 @@ var Swiper = (props) => {
|
|
|
9940
9997
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
9941
9998
|
const useLoop = loop && canSlide;
|
|
9942
9999
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
9943
|
-
const extendedItems =
|
|
10000
|
+
const extendedItems = import_react31.default.useMemo(() => {
|
|
9944
10001
|
if (!useLoop) return items;
|
|
9945
10002
|
return [...items, ...items, ...items];
|
|
9946
10003
|
}, [items, useLoop]);
|
|
9947
10004
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
9948
|
-
const [innerIndex, setInnerIndex] =
|
|
10005
|
+
const [innerIndex, setInnerIndex] = import_react31.default.useState(
|
|
9949
10006
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
9950
10007
|
);
|
|
9951
|
-
const [isDragging, setIsDragging] =
|
|
9952
|
-
const [dragOffset, setDragOffset] =
|
|
9953
|
-
const [animated, setAnimated] =
|
|
9954
|
-
const [containerWidth, setContainerWidth] =
|
|
9955
|
-
const containerRef =
|
|
9956
|
-
const startXRef =
|
|
9957
|
-
const startTimeRef =
|
|
9958
|
-
const autoplayTimerRef =
|
|
9959
|
-
const resumeTimeoutRef =
|
|
9960
|
-
const [paused, setPaused] =
|
|
9961
|
-
const initializedRef =
|
|
9962
|
-
|
|
10008
|
+
const [isDragging, setIsDragging] = import_react31.default.useState(false);
|
|
10009
|
+
const [dragOffset, setDragOffset] = import_react31.default.useState(0);
|
|
10010
|
+
const [animated, setAnimated] = import_react31.default.useState(false);
|
|
10011
|
+
const [containerWidth, setContainerWidth] = import_react31.default.useState(0);
|
|
10012
|
+
const containerRef = import_react31.default.useRef(null);
|
|
10013
|
+
const startXRef = import_react31.default.useRef(0);
|
|
10014
|
+
const startTimeRef = import_react31.default.useRef(0);
|
|
10015
|
+
const autoplayTimerRef = import_react31.default.useRef(null);
|
|
10016
|
+
const resumeTimeoutRef = import_react31.default.useRef(null);
|
|
10017
|
+
const [paused, setPaused] = import_react31.default.useState(false);
|
|
10018
|
+
const initializedRef = import_react31.default.useRef(false);
|
|
10019
|
+
import_react31.default.useEffect(() => {
|
|
9963
10020
|
const el = containerRef.current;
|
|
9964
10021
|
if (!el) return;
|
|
9965
10022
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -9982,7 +10039,7 @@ var Swiper = (props) => {
|
|
|
9982
10039
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
9983
10040
|
};
|
|
9984
10041
|
const realIndex = getRealIndex(innerIndex);
|
|
9985
|
-
const moveToInner =
|
|
10042
|
+
const moveToInner = import_react31.default.useCallback(
|
|
9986
10043
|
(idx, withAnim = true) => {
|
|
9987
10044
|
if (!useLoop) {
|
|
9988
10045
|
setAnimated(withAnim);
|
|
@@ -10010,7 +10067,7 @@ var Swiper = (props) => {
|
|
|
10010
10067
|
},
|
|
10011
10068
|
[useLoop, cloneCount, totalSlides]
|
|
10012
10069
|
);
|
|
10013
|
-
const handleTransitionEnd =
|
|
10070
|
+
const handleTransitionEnd = import_react31.default.useCallback(() => {
|
|
10014
10071
|
if (!useLoop) return;
|
|
10015
10072
|
const real = getRealIndex(innerIndex);
|
|
10016
10073
|
const canonical = cloneCount + real;
|
|
@@ -10020,7 +10077,7 @@ var Swiper = (props) => {
|
|
|
10020
10077
|
}
|
|
10021
10078
|
onChange?.(Math.min(real, maxIndex));
|
|
10022
10079
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
10023
|
-
const slideTo =
|
|
10080
|
+
const slideTo = import_react31.default.useCallback(
|
|
10024
10081
|
(logicalIndex) => {
|
|
10025
10082
|
if (!canSlide) return;
|
|
10026
10083
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -10030,7 +10087,7 @@ var Swiper = (props) => {
|
|
|
10030
10087
|
},
|
|
10031
10088
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
10032
10089
|
);
|
|
10033
|
-
const slideNext =
|
|
10090
|
+
const slideNext = import_react31.default.useCallback(() => {
|
|
10034
10091
|
if (!canSlide) return;
|
|
10035
10092
|
const nextInner = innerIndex + slideBy;
|
|
10036
10093
|
if (useLoop) {
|
|
@@ -10039,7 +10096,7 @@ var Swiper = (props) => {
|
|
|
10039
10096
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
10040
10097
|
}
|
|
10041
10098
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
10042
|
-
const slidePrev =
|
|
10099
|
+
const slidePrev = import_react31.default.useCallback(() => {
|
|
10043
10100
|
if (!canSlide) return;
|
|
10044
10101
|
const prevInner = innerIndex - slideBy;
|
|
10045
10102
|
if (useLoop) {
|
|
@@ -10048,7 +10105,7 @@ var Swiper = (props) => {
|
|
|
10048
10105
|
moveToInner(Math.max(prevInner, 0), true);
|
|
10049
10106
|
}
|
|
10050
10107
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
10051
|
-
|
|
10108
|
+
import_react31.default.useEffect(() => {
|
|
10052
10109
|
if (indexProp === void 0) return;
|
|
10053
10110
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
10054
10111
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -10056,12 +10113,12 @@ var Swiper = (props) => {
|
|
|
10056
10113
|
moveToInner(target, true);
|
|
10057
10114
|
}
|
|
10058
10115
|
}, [indexProp]);
|
|
10059
|
-
|
|
10116
|
+
import_react31.default.useImperativeHandle(swiperRef, () => ({
|
|
10060
10117
|
slidePrev,
|
|
10061
10118
|
slideNext,
|
|
10062
10119
|
slideTo
|
|
10063
10120
|
}));
|
|
10064
|
-
|
|
10121
|
+
import_react31.default.useEffect(() => {
|
|
10065
10122
|
if (!auto || !canSlide || paused) return;
|
|
10066
10123
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
10067
10124
|
return () => {
|
|
@@ -10087,7 +10144,7 @@ var Swiper = (props) => {
|
|
|
10087
10144
|
resumeTimeoutRef.current = null;
|
|
10088
10145
|
}, pauseOnInteraction);
|
|
10089
10146
|
};
|
|
10090
|
-
|
|
10147
|
+
import_react31.default.useEffect(() => {
|
|
10091
10148
|
return () => {
|
|
10092
10149
|
if (resumeTimeoutRef.current) clearTimeout(resumeTimeoutRef.current);
|
|
10093
10150
|
};
|
|
@@ -10105,7 +10162,7 @@ var Swiper = (props) => {
|
|
|
10105
10162
|
startXRef.current = getClientX(e);
|
|
10106
10163
|
startTimeRef.current = Date.now();
|
|
10107
10164
|
};
|
|
10108
|
-
|
|
10165
|
+
import_react31.default.useEffect(() => {
|
|
10109
10166
|
if (!isDragging) return;
|
|
10110
10167
|
const handleMove = (e) => {
|
|
10111
10168
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -10144,7 +10201,7 @@ var Swiper = (props) => {
|
|
|
10144
10201
|
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
10145
10202
|
const slideWidthPercent = 100 / viewItemCount;
|
|
10146
10203
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
10147
|
-
const slideElements =
|
|
10204
|
+
const slideElements = import_react31.default.useMemo(
|
|
10148
10205
|
() => extendedItems.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime341.jsx)(
|
|
10149
10206
|
"div",
|
|
10150
10207
|
{
|
|
@@ -10218,20 +10275,22 @@ Swiper.displayName = "Swiper";
|
|
|
10218
10275
|
var Swiper_default = Swiper;
|
|
10219
10276
|
|
|
10220
10277
|
// src/components/Switch/Switch.tsx
|
|
10221
|
-
var
|
|
10278
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
10222
10279
|
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
10223
10280
|
var KNOB_TRANSITION_MS = 250;
|
|
10224
10281
|
var Switch = (props) => {
|
|
10225
10282
|
const {
|
|
10226
10283
|
value,
|
|
10227
10284
|
size = "md",
|
|
10228
|
-
type = "
|
|
10285
|
+
type = "primary",
|
|
10229
10286
|
disabled,
|
|
10230
|
-
onChange
|
|
10287
|
+
onChange,
|
|
10288
|
+
validations
|
|
10231
10289
|
} = props;
|
|
10232
|
-
const
|
|
10233
|
-
const
|
|
10234
|
-
|
|
10290
|
+
const statusType = normalizeStatus(type);
|
|
10291
|
+
const [isAnimating, setIsAnimating] = import_react32.default.useState(false);
|
|
10292
|
+
const timeoutRef = import_react32.default.useRef(null);
|
|
10293
|
+
import_react32.default.useEffect(() => {
|
|
10235
10294
|
return () => {
|
|
10236
10295
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
10237
10296
|
};
|
|
@@ -10246,31 +10305,33 @@ var Switch = (props) => {
|
|
|
10246
10305
|
timeoutRef.current = null;
|
|
10247
10306
|
}, KNOB_TRANSITION_MS);
|
|
10248
10307
|
};
|
|
10249
|
-
|
|
10308
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(
|
|
10250
10309
|
"div",
|
|
10251
10310
|
{
|
|
10252
10311
|
className: clsx_default(
|
|
10253
10312
|
"lib-xplat-switch",
|
|
10254
10313
|
size,
|
|
10255
|
-
|
|
10314
|
+
statusType,
|
|
10256
10315
|
value ? "checked" : void 0,
|
|
10257
10316
|
disabled && "disabled",
|
|
10258
10317
|
isAnimating && "animating"
|
|
10259
10318
|
),
|
|
10260
10319
|
onClick: handleClick,
|
|
10320
|
+
"aria-invalid": hasError(validations) || void 0,
|
|
10261
10321
|
"aria-disabled": disabled || isAnimating,
|
|
10262
10322
|
children: /* @__PURE__ */ (0, import_jsx_runtime342.jsx)("div", { className: clsx_default("knob", value ? "checked" : void 0) })
|
|
10263
10323
|
}
|
|
10264
10324
|
);
|
|
10325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime342.jsx)(Field, { validations, children: control });
|
|
10265
10326
|
};
|
|
10266
10327
|
Switch.displayName = "Switch";
|
|
10267
10328
|
var Switch_default = Switch;
|
|
10268
10329
|
|
|
10269
10330
|
// src/components/Table/TableContext.tsx
|
|
10270
|
-
var
|
|
10271
|
-
var TableContext =
|
|
10331
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
10332
|
+
var TableContext = import_react33.default.createContext(null);
|
|
10272
10333
|
var useTableContext = () => {
|
|
10273
|
-
const ctx =
|
|
10334
|
+
const ctx = import_react33.default.useContext(TableContext);
|
|
10274
10335
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
10275
10336
|
return ctx;
|
|
10276
10337
|
};
|
|
@@ -10313,24 +10374,24 @@ TableBody.displayName = "TableBody";
|
|
|
10313
10374
|
var TableBody_default = TableBody;
|
|
10314
10375
|
|
|
10315
10376
|
// src/components/Table/TableCell.tsx
|
|
10316
|
-
var
|
|
10377
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
10317
10378
|
|
|
10318
10379
|
// src/components/Table/TableHeadContext.tsx
|
|
10319
|
-
var
|
|
10320
|
-
var TableHeadContext =
|
|
10380
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
10381
|
+
var TableHeadContext = import_react34.default.createContext(
|
|
10321
10382
|
null
|
|
10322
10383
|
);
|
|
10323
10384
|
var useTableHeadContext = () => {
|
|
10324
|
-
const ctx =
|
|
10385
|
+
const ctx = import_react34.default.useContext(TableHeadContext);
|
|
10325
10386
|
return ctx;
|
|
10326
10387
|
};
|
|
10327
10388
|
var TableHeadContext_default = TableHeadContext;
|
|
10328
10389
|
|
|
10329
10390
|
// src/components/Table/TableRowContext.tsx
|
|
10330
|
-
var
|
|
10331
|
-
var TableRowContext =
|
|
10391
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
10392
|
+
var TableRowContext = import_react35.default.createContext(null);
|
|
10332
10393
|
var useTableRowContext = () => {
|
|
10333
|
-
const ctx =
|
|
10394
|
+
const ctx = import_react35.default.useContext(TableRowContext);
|
|
10334
10395
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
10335
10396
|
return ctx;
|
|
10336
10397
|
};
|
|
@@ -10338,7 +10399,7 @@ var TableRowContext_default = TableRowContext;
|
|
|
10338
10399
|
|
|
10339
10400
|
// src/components/Table/TableCell.tsx
|
|
10340
10401
|
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
10341
|
-
var TableCell =
|
|
10402
|
+
var TableCell = import_react36.default.memo((props) => {
|
|
10342
10403
|
const {
|
|
10343
10404
|
children,
|
|
10344
10405
|
align = "center",
|
|
@@ -10352,9 +10413,9 @@ var TableCell = import_react37.default.memo((props) => {
|
|
|
10352
10413
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
10353
10414
|
const { stickyShadow } = useTableContext();
|
|
10354
10415
|
const headContext = useTableHeadContext();
|
|
10355
|
-
const [left, setLeft] =
|
|
10356
|
-
const cellRef =
|
|
10357
|
-
const calculateLeft =
|
|
10416
|
+
const [left, setLeft] = import_react36.default.useState(0);
|
|
10417
|
+
const cellRef = import_react36.default.useRef(null);
|
|
10418
|
+
const calculateLeft = import_react36.default.useCallback(() => {
|
|
10358
10419
|
if (!cellRef.current) return 0;
|
|
10359
10420
|
let totalLeft = 0;
|
|
10360
10421
|
for (const ref of stickyCells) {
|
|
@@ -10363,7 +10424,7 @@ var TableCell = import_react37.default.memo((props) => {
|
|
|
10363
10424
|
}
|
|
10364
10425
|
return totalLeft;
|
|
10365
10426
|
}, [stickyCells]);
|
|
10366
|
-
|
|
10427
|
+
import_react36.default.useEffect(() => {
|
|
10367
10428
|
if (!isSticky || !cellRef.current) return;
|
|
10368
10429
|
registerStickyCell(cellRef);
|
|
10369
10430
|
setLeft(calculateLeft());
|
|
@@ -10421,9 +10482,9 @@ TableHead.displayName = "TableHead";
|
|
|
10421
10482
|
var TableHead_default = TableHead;
|
|
10422
10483
|
|
|
10423
10484
|
// src/components/Table/TableRow.tsx
|
|
10424
|
-
var
|
|
10485
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
10425
10486
|
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
10426
|
-
var TableRow =
|
|
10487
|
+
var TableRow = import_react37.default.memo((props) => {
|
|
10427
10488
|
const {
|
|
10428
10489
|
children,
|
|
10429
10490
|
type = "secondary",
|
|
@@ -10432,7 +10493,7 @@ var TableRow = import_react38.default.memo((props) => {
|
|
|
10432
10493
|
onClick
|
|
10433
10494
|
} = props;
|
|
10434
10495
|
const { rowBorderUse } = useTableContext();
|
|
10435
|
-
const [stickyCells, setStickyCells] =
|
|
10496
|
+
const [stickyCells, setStickyCells] = import_react37.default.useState([]);
|
|
10436
10497
|
const registerStickyCell = (ref) => {
|
|
10437
10498
|
setStickyCells((prev) => {
|
|
10438
10499
|
if (prev.includes(ref)) return prev;
|
|
@@ -10467,20 +10528,22 @@ var import_jsx_runtime348 = require("react/jsx-runtime");
|
|
|
10467
10528
|
var Tag = (props) => {
|
|
10468
10529
|
const {
|
|
10469
10530
|
children,
|
|
10470
|
-
|
|
10531
|
+
variant,
|
|
10532
|
+
type,
|
|
10471
10533
|
onClose,
|
|
10472
10534
|
size = "md",
|
|
10473
10535
|
disabled = false,
|
|
10474
10536
|
colorIndex
|
|
10475
10537
|
} = props;
|
|
10538
|
+
const shape = variant ?? type ?? "neutral";
|
|
10476
10539
|
return /* @__PURE__ */ (0, import_jsx_runtime348.jsxs)(
|
|
10477
10540
|
"span",
|
|
10478
10541
|
{
|
|
10479
10542
|
className: clsx_default(
|
|
10480
10543
|
"lib-xplat-tag",
|
|
10481
|
-
|
|
10544
|
+
shape,
|
|
10482
10545
|
size,
|
|
10483
|
-
|
|
10546
|
+
shape === "categorical" && colorIndex !== void 0 && `cat-${colorIndex}`,
|
|
10484
10547
|
disabled && "disabled"
|
|
10485
10548
|
),
|
|
10486
10549
|
children: [
|
|
@@ -10494,49 +10557,52 @@ Tag.displayName = "Tag";
|
|
|
10494
10557
|
var Tag_default = Tag;
|
|
10495
10558
|
|
|
10496
10559
|
// src/components/TextArea/TextArea.tsx
|
|
10497
|
-
var
|
|
10560
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
10498
10561
|
var import_jsx_runtime349 = require("react/jsx-runtime");
|
|
10499
|
-
var TextArea =
|
|
10562
|
+
var TextArea = import_react38.default.forwardRef(
|
|
10500
10563
|
(props, ref) => {
|
|
10501
10564
|
const {
|
|
10502
10565
|
className,
|
|
10503
10566
|
size = "md",
|
|
10567
|
+
validations,
|
|
10504
10568
|
resize = "vertical",
|
|
10505
10569
|
rows = 3,
|
|
10506
10570
|
disabled,
|
|
10507
10571
|
...textareaProps
|
|
10508
10572
|
} = props;
|
|
10509
|
-
|
|
10573
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime349.jsx)("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(
|
|
10510
10574
|
"textarea",
|
|
10511
10575
|
{
|
|
10512
10576
|
...textareaProps,
|
|
10513
10577
|
ref,
|
|
10514
10578
|
rows,
|
|
10515
10579
|
disabled,
|
|
10580
|
+
"aria-invalid": hasError(validations) || void 0,
|
|
10516
10581
|
className: clsx_default("lib-xplat-textarea", size, disabled && "disabled"),
|
|
10517
10582
|
style: { resize }
|
|
10518
10583
|
}
|
|
10519
10584
|
) });
|
|
10585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime349.jsx)(Field, { validations, children: control });
|
|
10520
10586
|
}
|
|
10521
10587
|
);
|
|
10522
10588
|
TextArea.displayName = "TextArea";
|
|
10523
10589
|
var TextArea_default = TextArea;
|
|
10524
10590
|
|
|
10525
10591
|
// src/components/Toast/Toast.tsx
|
|
10526
|
-
var
|
|
10592
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
10527
10593
|
var import_react_dom4 = require("react-dom");
|
|
10528
10594
|
var import_jsx_runtime350 = require("react/jsx-runtime");
|
|
10529
|
-
var ToastContext =
|
|
10595
|
+
var ToastContext = import_react39.default.createContext(null);
|
|
10530
10596
|
var useToast = () => {
|
|
10531
|
-
const ctx =
|
|
10597
|
+
const ctx = import_react39.default.useContext(ToastContext);
|
|
10532
10598
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
10533
10599
|
return ctx;
|
|
10534
10600
|
};
|
|
10535
10601
|
var EXIT_DURATION = 300;
|
|
10536
10602
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
10537
|
-
const ref =
|
|
10538
|
-
const [height, setHeight] =
|
|
10539
|
-
|
|
10603
|
+
const ref = import_react39.default.useRef(null);
|
|
10604
|
+
const [height, setHeight] = import_react39.default.useState(void 0);
|
|
10605
|
+
import_react39.default.useEffect(() => {
|
|
10540
10606
|
if (ref.current && !isExiting) {
|
|
10541
10607
|
setHeight(ref.current.offsetHeight);
|
|
10542
10608
|
}
|
|
@@ -10568,13 +10634,13 @@ var ToastProvider = ({
|
|
|
10568
10634
|
children,
|
|
10569
10635
|
position = "top-right"
|
|
10570
10636
|
}) => {
|
|
10571
|
-
const [toasts, setToasts] =
|
|
10572
|
-
const [removing, setRemoving] =
|
|
10573
|
-
const [mounted, setMounted] =
|
|
10574
|
-
|
|
10637
|
+
const [toasts, setToasts] = import_react39.default.useState([]);
|
|
10638
|
+
const [removing, setRemoving] = import_react39.default.useState(/* @__PURE__ */ new Set());
|
|
10639
|
+
const [mounted, setMounted] = import_react39.default.useState(false);
|
|
10640
|
+
import_react39.default.useEffect(() => {
|
|
10575
10641
|
setMounted(true);
|
|
10576
10642
|
}, []);
|
|
10577
|
-
const remove =
|
|
10643
|
+
const remove = import_react39.default.useCallback((id) => {
|
|
10578
10644
|
setRemoving((prev) => new Set(prev).add(id));
|
|
10579
10645
|
setTimeout(() => {
|
|
10580
10646
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -10585,7 +10651,7 @@ var ToastProvider = ({
|
|
|
10585
10651
|
});
|
|
10586
10652
|
}, EXIT_DURATION);
|
|
10587
10653
|
}, []);
|
|
10588
|
-
const toast =
|
|
10654
|
+
const toast = import_react39.default.useCallback(
|
|
10589
10655
|
(type, message, duration = 3e3) => {
|
|
10590
10656
|
const id = `${Date.now()}-${Math.random()}`;
|
|
10591
10657
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -10614,7 +10680,7 @@ var ToastProvider = ({
|
|
|
10614
10680
|
ToastProvider.displayName = "ToastProvider";
|
|
10615
10681
|
|
|
10616
10682
|
// src/components/Tooltip/Tooltip.tsx
|
|
10617
|
-
var
|
|
10683
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
10618
10684
|
var import_jsx_runtime351 = require("react/jsx-runtime");
|
|
10619
10685
|
var OFFSET = 12;
|
|
10620
10686
|
var GAP = 8;
|
|
@@ -10624,18 +10690,20 @@ var Tooltip = (props) => {
|
|
|
10624
10690
|
children,
|
|
10625
10691
|
title,
|
|
10626
10692
|
description,
|
|
10627
|
-
|
|
10693
|
+
variant,
|
|
10694
|
+
type,
|
|
10628
10695
|
follow = false,
|
|
10629
10696
|
disabled = false
|
|
10630
10697
|
} = props;
|
|
10631
|
-
const
|
|
10632
|
-
const
|
|
10633
|
-
const
|
|
10634
|
-
const [
|
|
10635
|
-
const
|
|
10636
|
-
const
|
|
10637
|
-
const
|
|
10638
|
-
const
|
|
10698
|
+
const shape = variant ?? type ?? "dark";
|
|
10699
|
+
const triggerRef = import_react40.default.useRef(null);
|
|
10700
|
+
const tooltipRef = import_react40.default.useRef(null);
|
|
10701
|
+
const [visible, setVisible] = import_react40.default.useState(false);
|
|
10702
|
+
const [pos, setPos] = import_react40.default.useState({ left: 0, top: 0 });
|
|
10703
|
+
const delayTimer = import_react40.default.useRef(0);
|
|
10704
|
+
const rafRef = import_react40.default.useRef(0);
|
|
10705
|
+
const cursor = import_react40.default.useRef(null);
|
|
10706
|
+
const clamp = import_react40.default.useCallback((left, top, w, h) => {
|
|
10639
10707
|
const vw = window.innerWidth;
|
|
10640
10708
|
const vh = window.innerHeight;
|
|
10641
10709
|
return {
|
|
@@ -10643,7 +10711,7 @@ var Tooltip = (props) => {
|
|
|
10643
10711
|
top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
|
|
10644
10712
|
};
|
|
10645
10713
|
}, []);
|
|
10646
|
-
const placeAtCursor =
|
|
10714
|
+
const placeAtCursor = import_react40.default.useCallback((x, y) => {
|
|
10647
10715
|
const el = tooltipRef.current;
|
|
10648
10716
|
if (!el) return;
|
|
10649
10717
|
const w = el.offsetWidth;
|
|
@@ -10654,7 +10722,7 @@ var Tooltip = (props) => {
|
|
|
10654
10722
|
if (top < GAP) top = y + OFFSET;
|
|
10655
10723
|
setPos(clamp(left, top, w, h));
|
|
10656
10724
|
}, [clamp]);
|
|
10657
|
-
const placeAtTrigger =
|
|
10725
|
+
const placeAtTrigger = import_react40.default.useCallback(() => {
|
|
10658
10726
|
const el = tooltipRef.current;
|
|
10659
10727
|
const trigger = triggerRef.current;
|
|
10660
10728
|
if (!el || !trigger) return;
|
|
@@ -10666,19 +10734,19 @@ var Tooltip = (props) => {
|
|
|
10666
10734
|
const left = rect.left + rect.width / 2 - w / 2;
|
|
10667
10735
|
setPos(clamp(left, top, w, h));
|
|
10668
10736
|
}, [clamp]);
|
|
10669
|
-
const reposition =
|
|
10737
|
+
const reposition = import_react40.default.useCallback(() => {
|
|
10670
10738
|
if (follow && cursor.current) {
|
|
10671
10739
|
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
10672
10740
|
} else {
|
|
10673
10741
|
placeAtTrigger();
|
|
10674
10742
|
}
|
|
10675
10743
|
}, [follow, placeAtCursor, placeAtTrigger]);
|
|
10676
|
-
const handleMouseEnter =
|
|
10744
|
+
const handleMouseEnter = import_react40.default.useCallback((e) => {
|
|
10677
10745
|
if (disabled) return;
|
|
10678
10746
|
cursor.current = { x: e.clientX, y: e.clientY };
|
|
10679
10747
|
delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
|
|
10680
10748
|
}, [disabled]);
|
|
10681
|
-
const handleMouseMove =
|
|
10749
|
+
const handleMouseMove = import_react40.default.useCallback((e) => {
|
|
10682
10750
|
cursor.current = { x: e.clientX, y: e.clientY };
|
|
10683
10751
|
if (!visible || !follow) return;
|
|
10684
10752
|
cancelAnimationFrame(rafRef.current);
|
|
@@ -10686,25 +10754,25 @@ var Tooltip = (props) => {
|
|
|
10686
10754
|
if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
|
|
10687
10755
|
});
|
|
10688
10756
|
}, [visible, follow, placeAtCursor]);
|
|
10689
|
-
const close =
|
|
10757
|
+
const close = import_react40.default.useCallback(() => {
|
|
10690
10758
|
window.clearTimeout(delayTimer.current);
|
|
10691
10759
|
cancelAnimationFrame(rafRef.current);
|
|
10692
10760
|
setVisible(false);
|
|
10693
10761
|
}, []);
|
|
10694
|
-
const handleMouseLeave =
|
|
10762
|
+
const handleMouseLeave = import_react40.default.useCallback(() => {
|
|
10695
10763
|
cursor.current = null;
|
|
10696
10764
|
close();
|
|
10697
10765
|
}, [close]);
|
|
10698
|
-
const handleFocus =
|
|
10766
|
+
const handleFocus = import_react40.default.useCallback(() => {
|
|
10699
10767
|
if (disabled) return;
|
|
10700
10768
|
cursor.current = null;
|
|
10701
10769
|
setVisible(true);
|
|
10702
10770
|
}, [disabled]);
|
|
10703
|
-
|
|
10771
|
+
import_react40.default.useLayoutEffect(() => {
|
|
10704
10772
|
if (!visible) return;
|
|
10705
10773
|
reposition();
|
|
10706
10774
|
}, [visible, reposition]);
|
|
10707
|
-
|
|
10775
|
+
import_react40.default.useEffect(() => {
|
|
10708
10776
|
if (!visible || follow) return;
|
|
10709
10777
|
const onChange = () => placeAtTrigger();
|
|
10710
10778
|
window.addEventListener("scroll", onChange, true);
|
|
@@ -10714,7 +10782,7 @@ var Tooltip = (props) => {
|
|
|
10714
10782
|
window.removeEventListener("resize", onChange);
|
|
10715
10783
|
};
|
|
10716
10784
|
}, [visible, follow, placeAtTrigger]);
|
|
10717
|
-
|
|
10785
|
+
import_react40.default.useEffect(() => () => {
|
|
10718
10786
|
window.clearTimeout(delayTimer.current);
|
|
10719
10787
|
cancelAnimationFrame(rafRef.current);
|
|
10720
10788
|
}, []);
|
|
@@ -10737,7 +10805,7 @@ var Tooltip = (props) => {
|
|
|
10737
10805
|
{
|
|
10738
10806
|
ref: tooltipRef,
|
|
10739
10807
|
role: "tooltip",
|
|
10740
|
-
className: clsx_default("lib-xplat-tooltip",
|
|
10808
|
+
className: clsx_default("lib-xplat-tooltip", shape),
|
|
10741
10809
|
style: { position: "fixed", left: pos.left, top: pos.top },
|
|
10742
10810
|
children: [
|
|
10743
10811
|
title && /* @__PURE__ */ (0, import_jsx_runtime351.jsx)("div", { className: "tooltip-title", children: title }),
|
|
@@ -10753,7 +10821,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
10753
10821
|
var Tooltip_default = Tooltip;
|
|
10754
10822
|
|
|
10755
10823
|
// src/components/Video/Video.tsx
|
|
10756
|
-
var
|
|
10824
|
+
var import_react41 = __toESM(require("react"), 1);
|
|
10757
10825
|
var import_jsx_runtime352 = require("react/jsx-runtime");
|
|
10758
10826
|
var PipIcon = () => /* @__PURE__ */ (0, import_jsx_runtime352.jsxs)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
10759
10827
|
/* @__PURE__ */ (0, import_jsx_runtime352.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
@@ -10765,7 +10833,7 @@ var formatTime = (sec) => {
|
|
|
10765
10833
|
const s = Math.floor(sec % 60);
|
|
10766
10834
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
10767
10835
|
};
|
|
10768
|
-
var Video =
|
|
10836
|
+
var Video = import_react41.default.forwardRef((props, ref) => {
|
|
10769
10837
|
const {
|
|
10770
10838
|
src,
|
|
10771
10839
|
poster,
|
|
@@ -10789,21 +10857,21 @@ var Video = import_react42.default.forwardRef((props, ref) => {
|
|
|
10789
10857
|
children,
|
|
10790
10858
|
...rest
|
|
10791
10859
|
} = props;
|
|
10792
|
-
const containerRef =
|
|
10793
|
-
const videoRef =
|
|
10794
|
-
const [isPlaying, setIsPlaying] =
|
|
10795
|
-
const [isLoaded, setIsLoaded] =
|
|
10796
|
-
const [currentTime, setCurrentTime] =
|
|
10797
|
-
const [duration, setDuration] =
|
|
10798
|
-
const [buffered, setBuffered] =
|
|
10799
|
-
const [volume, setVolume] =
|
|
10800
|
-
const [isMuted, setIsMuted] =
|
|
10801
|
-
const [isFullscreen, setIsFullscreen] =
|
|
10802
|
-
const [playbackRate, setPlaybackRate] =
|
|
10803
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
10804
|
-
const [captionsOn, setCaptionsOn] =
|
|
10805
|
-
const [isPip, setIsPip] =
|
|
10806
|
-
const setRefs =
|
|
10860
|
+
const containerRef = import_react41.default.useRef(null);
|
|
10861
|
+
const videoRef = import_react41.default.useRef(null);
|
|
10862
|
+
const [isPlaying, setIsPlaying] = import_react41.default.useState(Boolean(autoPlay));
|
|
10863
|
+
const [isLoaded, setIsLoaded] = import_react41.default.useState(false);
|
|
10864
|
+
const [currentTime, setCurrentTime] = import_react41.default.useState(0);
|
|
10865
|
+
const [duration, setDuration] = import_react41.default.useState(0);
|
|
10866
|
+
const [buffered, setBuffered] = import_react41.default.useState(0);
|
|
10867
|
+
const [volume, setVolume] = import_react41.default.useState(1);
|
|
10868
|
+
const [isMuted, setIsMuted] = import_react41.default.useState(Boolean(muted));
|
|
10869
|
+
const [isFullscreen, setIsFullscreen] = import_react41.default.useState(false);
|
|
10870
|
+
const [playbackRate, setPlaybackRate] = import_react41.default.useState(1);
|
|
10871
|
+
const [rateMenuOpen, setRateMenuOpen] = import_react41.default.useState(false);
|
|
10872
|
+
const [captionsOn, setCaptionsOn] = import_react41.default.useState(false);
|
|
10873
|
+
const [isPip, setIsPip] = import_react41.default.useState(false);
|
|
10874
|
+
const setRefs = import_react41.default.useCallback(
|
|
10807
10875
|
(el) => {
|
|
10808
10876
|
videoRef.current = el;
|
|
10809
10877
|
if (typeof ref === "function") ref(el);
|
|
@@ -10811,14 +10879,14 @@ var Video = import_react42.default.forwardRef((props, ref) => {
|
|
|
10811
10879
|
},
|
|
10812
10880
|
[ref]
|
|
10813
10881
|
);
|
|
10814
|
-
|
|
10882
|
+
import_react41.default.useEffect(() => {
|
|
10815
10883
|
const onFsChange = () => {
|
|
10816
10884
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
10817
10885
|
};
|
|
10818
10886
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
10819
10887
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
10820
10888
|
}, []);
|
|
10821
|
-
|
|
10889
|
+
import_react41.default.useEffect(() => {
|
|
10822
10890
|
const v = videoRef.current;
|
|
10823
10891
|
if (!v) return;
|
|
10824
10892
|
const onEnter = () => setIsPip(true);
|
|
@@ -11207,13 +11275,13 @@ Layout.displayName = "Layout";
|
|
|
11207
11275
|
var Layout_default = Layout;
|
|
11208
11276
|
|
|
11209
11277
|
// src/layout/SideBar/SideBar.tsx
|
|
11210
|
-
var
|
|
11278
|
+
var import_react43 = __toESM(require("react"), 1);
|
|
11211
11279
|
|
|
11212
11280
|
// src/layout/SideBar/SideBarContext.tsx
|
|
11213
|
-
var
|
|
11214
|
-
var SideBarContext =
|
|
11281
|
+
var import_react42 = __toESM(require("react"), 1);
|
|
11282
|
+
var SideBarContext = import_react42.default.createContext(null);
|
|
11215
11283
|
var useSideBarContext = () => {
|
|
11216
|
-
const ctx =
|
|
11284
|
+
const ctx = import_react42.default.useContext(SideBarContext);
|
|
11217
11285
|
if (!ctx) throw new Error("Error");
|
|
11218
11286
|
return ctx;
|
|
11219
11287
|
};
|
|
@@ -11223,7 +11291,7 @@ var SideBarContext_default = SideBarContext;
|
|
|
11223
11291
|
var import_jsx_runtime358 = require("react/jsx-runtime");
|
|
11224
11292
|
var SideBar = (props) => {
|
|
11225
11293
|
const { children, className } = props;
|
|
11226
|
-
const [isOpen, setIsOpen] =
|
|
11294
|
+
const [isOpen, setIsOpen] = import_react43.default.useState(true);
|
|
11227
11295
|
const handleSwitchSideBar = () => {
|
|
11228
11296
|
setIsOpen((prev) => !prev);
|
|
11229
11297
|
};
|
|
@@ -11384,6 +11452,8 @@ var SideBar_default = SideBar;
|
|
|
11384
11452
|
FacebookIcon,
|
|
11385
11453
|
FastForwardIcon,
|
|
11386
11454
|
FeatherIcon,
|
|
11455
|
+
Field,
|
|
11456
|
+
FieldMessage,
|
|
11387
11457
|
FigmaIcon,
|
|
11388
11458
|
FileIcon,
|
|
11389
11459
|
FileMinusIcon,
|
|
@@ -11612,6 +11682,7 @@ var SideBar_default = SideBar;
|
|
|
11612
11682
|
breakpoints,
|
|
11613
11683
|
cssVar,
|
|
11614
11684
|
gridColumns,
|
|
11685
|
+
hasError,
|
|
11615
11686
|
isInRange,
|
|
11616
11687
|
isSameDay,
|
|
11617
11688
|
semantic,
|