@x-plat/design-system 0.4.3 → 0.4.5
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/Card/index.css +1 -2
- package/dist/components/DatePicker/index.cjs +30 -5
- package/dist/components/DatePicker/index.css +43 -0
- package/dist/components/DatePicker/index.js +30 -5
- package/dist/components/PopOver/index.css +4 -0
- package/dist/components/index.cjs +166 -141
- package/dist/components/index.css +48 -2
- package/dist/components/index.js +166 -141
- package/dist/index.cjs +171 -146
- package/dist/index.css +74 -2
- package/dist/index.js +171 -146
- package/dist/layout/Header/index.css +11 -0
- package/dist/layout/Layout/index.css +15 -0
- package/dist/layout/index.css +26 -0
- package/package.json +1 -1
|
@@ -16953,7 +16953,7 @@ InputDatePicker.displayName = "InputDatePicker";
|
|
|
16953
16953
|
var InputDatePicker_default = InputDatePicker;
|
|
16954
16954
|
|
|
16955
16955
|
// src/components/DatePicker/PopupPicker/index.tsx
|
|
16956
|
-
var
|
|
16956
|
+
var import_react15 = __toESM(require("react"), 1);
|
|
16957
16957
|
|
|
16958
16958
|
// src/components/Modal/Modal.tsx
|
|
16959
16959
|
var import_react13 = __toESM(require("react"), 1);
|
|
@@ -17002,6 +17002,7 @@ Modal.displayName = "Modal";
|
|
|
17002
17002
|
var Modal_default = Modal;
|
|
17003
17003
|
|
|
17004
17004
|
// src/components/DatePicker/RangePicker/index.tsx
|
|
17005
|
+
var import_react14 = __toESM(require("react"), 1);
|
|
17005
17006
|
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
17006
17007
|
var RangePicker = (props) => {
|
|
17007
17008
|
const {
|
|
@@ -17013,6 +17014,7 @@ var RangePicker = (props) => {
|
|
|
17013
17014
|
maxDate,
|
|
17014
17015
|
locale = "ko"
|
|
17015
17016
|
} = props;
|
|
17017
|
+
const [activeTab, setActiveTab] = import_react14.default.useState("start");
|
|
17016
17018
|
const startCal = useCalendar(startDate.getFullYear(), startDate.getMonth());
|
|
17017
17019
|
const endCal = useCalendar(endDate.getFullYear(), endDate.getMonth());
|
|
17018
17020
|
const isDisabled = (date, type) => {
|
|
@@ -17119,8 +17121,31 @@ var RangePicker = (props) => {
|
|
|
17119
17121
|
"--datepicker-active-color": `var(--${color2})`
|
|
17120
17122
|
},
|
|
17121
17123
|
children: [
|
|
17122
|
-
|
|
17123
|
-
|
|
17124
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "datepicker-range-tabs", children: [
|
|
17125
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
17126
|
+
"button",
|
|
17127
|
+
{
|
|
17128
|
+
type: "button",
|
|
17129
|
+
className: clsx_default("datepicker-range-tab", activeTab === "start" && "active"),
|
|
17130
|
+
onClick: () => setActiveTab("start"),
|
|
17131
|
+
children: locale === "ko" ? "\uC2DC\uC791\uC77C" : "Start"
|
|
17132
|
+
}
|
|
17133
|
+
),
|
|
17134
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
17135
|
+
"button",
|
|
17136
|
+
{
|
|
17137
|
+
type: "button",
|
|
17138
|
+
className: clsx_default("datepicker-range-tab", activeTab === "end" && "active"),
|
|
17139
|
+
onClick: () => setActiveTab("end"),
|
|
17140
|
+
children: locale === "ko" ? "\uC885\uB8CC\uC77C" : "End"
|
|
17141
|
+
}
|
|
17142
|
+
)
|
|
17143
|
+
] }),
|
|
17144
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "datepicker-range-panels", children: [
|
|
17145
|
+
renderCalendar(startCal, "start"),
|
|
17146
|
+
renderCalendar(endCal, "end")
|
|
17147
|
+
] }),
|
|
17148
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "datepicker-range-mobile", children: activeTab === "start" ? renderCalendar(startCal, "start") : renderCalendar(endCal, "end") })
|
|
17124
17149
|
]
|
|
17125
17150
|
}
|
|
17126
17151
|
);
|
|
@@ -17132,7 +17157,7 @@ var RangePicker_default = RangePicker;
|
|
|
17132
17157
|
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
17133
17158
|
var PopupPicker = (props) => {
|
|
17134
17159
|
const { component, type, locale } = props;
|
|
17135
|
-
const [isOpen, setIsOpen] =
|
|
17160
|
+
const [isOpen, setIsOpen] = import_react15.default.useState(false);
|
|
17136
17161
|
const handleClick = () => setIsOpen(true);
|
|
17137
17162
|
const handleClose = () => setIsOpen(false);
|
|
17138
17163
|
const handleSingleChange = (date) => {
|
|
@@ -17141,7 +17166,7 @@ var PopupPicker = (props) => {
|
|
|
17141
17166
|
handleClose();
|
|
17142
17167
|
};
|
|
17143
17168
|
return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "lib-xplat-popup-datepicker", children: [
|
|
17144
|
-
|
|
17169
|
+
import_react15.default.cloneElement(component, { onClick: handleClick }),
|
|
17145
17170
|
/* @__PURE__ */ (0, import_jsx_runtime316.jsx)(Modal_default, { isOpen, onClose: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: clsx_default("lib-xplat-popup-datepicker-card", type === "range" && "range-mode"), children: [
|
|
17146
17171
|
/* @__PURE__ */ (0, import_jsx_runtime316.jsxs)("div", { className: "popup-datepicker-content", children: [
|
|
17147
17172
|
type === "single" && /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
@@ -17201,15 +17226,15 @@ Divider.displayName = "Divider";
|
|
|
17201
17226
|
var Divider_default = Divider;
|
|
17202
17227
|
|
|
17203
17228
|
// src/components/Drawer/Drawer.tsx
|
|
17204
|
-
var
|
|
17229
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
17205
17230
|
var import_react_dom2 = require("react-dom");
|
|
17206
17231
|
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
17207
17232
|
var ANIMATION_DURATION_MS2 = 250;
|
|
17208
17233
|
var Drawer = (props) => {
|
|
17209
17234
|
const { isOpen, onClose, placement = "right", width = 320, title, children } = props;
|
|
17210
|
-
const [mounted, setMounted] =
|
|
17211
|
-
const [visible, setVisible] =
|
|
17212
|
-
|
|
17235
|
+
const [mounted, setMounted] = import_react16.default.useState(false);
|
|
17236
|
+
const [visible, setVisible] = import_react16.default.useState(false);
|
|
17237
|
+
import_react16.default.useEffect(() => {
|
|
17213
17238
|
if (isOpen) {
|
|
17214
17239
|
setMounted(true);
|
|
17215
17240
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -17255,16 +17280,16 @@ Drawer.displayName = "Drawer";
|
|
|
17255
17280
|
var Drawer_default = Drawer;
|
|
17256
17281
|
|
|
17257
17282
|
// src/components/Dropdown/Dropdown.tsx
|
|
17258
|
-
var
|
|
17283
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
17259
17284
|
|
|
17260
17285
|
// src/tokens/hooks/useAutoPosition.ts
|
|
17261
|
-
var
|
|
17286
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
17262
17287
|
var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
17263
|
-
const [position, setPosition] =
|
|
17288
|
+
const [position, setPosition] = import_react17.default.useState({
|
|
17264
17289
|
position: {},
|
|
17265
17290
|
direction: "bottom"
|
|
17266
17291
|
});
|
|
17267
|
-
const calculatePosition =
|
|
17292
|
+
const calculatePosition = import_react17.default.useCallback(() => {
|
|
17268
17293
|
if (!triggerRef.current || !popRef.current) return;
|
|
17269
17294
|
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
17270
17295
|
const popRect = popRef.current.getBoundingClientRect();
|
|
@@ -17286,7 +17311,7 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
17286
17311
|
direction
|
|
17287
17312
|
});
|
|
17288
17313
|
}, [triggerRef, popRef]);
|
|
17289
|
-
|
|
17314
|
+
import_react17.default.useEffect(() => {
|
|
17290
17315
|
calculatePosition();
|
|
17291
17316
|
window.addEventListener("resize", calculatePosition);
|
|
17292
17317
|
return () => window.removeEventListener("resize", calculatePosition);
|
|
@@ -17299,14 +17324,14 @@ var useAutoPosition_default = useAutoPosition;
|
|
|
17299
17324
|
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
17300
17325
|
var Dropdown = (props) => {
|
|
17301
17326
|
const { items, children, className } = props;
|
|
17302
|
-
const [isOpen, setIsOpen] =
|
|
17303
|
-
const [mounted, setMounted] =
|
|
17304
|
-
const [visible, setVisible] =
|
|
17305
|
-
const triggerRef =
|
|
17306
|
-
const menuRef =
|
|
17327
|
+
const [isOpen, setIsOpen] = import_react18.default.useState(false);
|
|
17328
|
+
const [mounted, setMounted] = import_react18.default.useState(false);
|
|
17329
|
+
const [visible, setVisible] = import_react18.default.useState(false);
|
|
17330
|
+
const triggerRef = import_react18.default.useRef(null);
|
|
17331
|
+
const menuRef = import_react18.default.useRef(null);
|
|
17307
17332
|
const { position, direction } = useAutoPosition_default(triggerRef, menuRef, isOpen);
|
|
17308
17333
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false));
|
|
17309
|
-
|
|
17334
|
+
import_react18.default.useEffect(() => {
|
|
17310
17335
|
if (isOpen) {
|
|
17311
17336
|
setMounted(true);
|
|
17312
17337
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -17375,7 +17400,7 @@ EmptyState.displayName = "EmptyState";
|
|
|
17375
17400
|
var EmptyState_default = EmptyState;
|
|
17376
17401
|
|
|
17377
17402
|
// src/components/FileUpload/FileUpload.tsx
|
|
17378
|
-
var
|
|
17403
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
17379
17404
|
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
17380
17405
|
var FileUpload = (props) => {
|
|
17381
17406
|
const {
|
|
@@ -17387,8 +17412,8 @@ var FileUpload = (props) => {
|
|
|
17387
17412
|
description,
|
|
17388
17413
|
className
|
|
17389
17414
|
} = props;
|
|
17390
|
-
const [isDragOver, setIsDragOver] =
|
|
17391
|
-
const inputRef =
|
|
17415
|
+
const [isDragOver, setIsDragOver] = import_react19.default.useState(false);
|
|
17416
|
+
const inputRef = import_react19.default.useRef(null);
|
|
17392
17417
|
const handleFiles = (fileList) => {
|
|
17393
17418
|
let files = Array.from(fileList);
|
|
17394
17419
|
if (maxSize) {
|
|
@@ -17448,19 +17473,19 @@ FileUpload.displayName = "FileUpload";
|
|
|
17448
17473
|
var FileUpload_default = FileUpload;
|
|
17449
17474
|
|
|
17450
17475
|
// src/components/Select/Select.tsx
|
|
17451
|
-
var
|
|
17476
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
17452
17477
|
|
|
17453
17478
|
// src/components/Select/context.ts
|
|
17454
|
-
var
|
|
17455
|
-
var SelectContext =
|
|
17479
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
17480
|
+
var SelectContext = import_react20.default.createContext(null);
|
|
17456
17481
|
var context_default = SelectContext;
|
|
17457
17482
|
|
|
17458
17483
|
// src/components/Select/SelectItem.tsx
|
|
17459
|
-
var
|
|
17484
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
17460
17485
|
var import_jsx_runtime322 = require("react/jsx-runtime");
|
|
17461
17486
|
var SelectItem = (props) => {
|
|
17462
17487
|
const { children, value, onClick, disabled = false, className } = props;
|
|
17463
|
-
const ctx =
|
|
17488
|
+
const ctx = import_react21.default.useContext(context_default);
|
|
17464
17489
|
const handleClick = (e) => {
|
|
17465
17490
|
e.preventDefault();
|
|
17466
17491
|
e.stopPropagation();
|
|
@@ -17502,26 +17527,26 @@ var SelectRoot = (props) => {
|
|
|
17502
17527
|
error = false,
|
|
17503
17528
|
size = "md"
|
|
17504
17529
|
} = props;
|
|
17505
|
-
const itemChildren =
|
|
17506
|
-
(child) =>
|
|
17530
|
+
const itemChildren = import_react22.default.Children.toArray(children).filter(
|
|
17531
|
+
(child) => import_react22.default.isValidElement(child) && child.type === SelectItem_default
|
|
17507
17532
|
);
|
|
17508
17533
|
const isControlled = valueProp !== void 0;
|
|
17509
|
-
const [isOpen, setOpen] =
|
|
17510
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
17511
|
-
const controlledLabel =
|
|
17534
|
+
const [isOpen, setOpen] = import_react22.default.useState(false);
|
|
17535
|
+
const [uncontrolledLabel, setUncontrolledLabel] = import_react22.default.useState(null);
|
|
17536
|
+
const controlledLabel = import_react22.default.useMemo(() => {
|
|
17512
17537
|
if (!isControlled) return null;
|
|
17513
17538
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
17514
17539
|
return match ? match.props.children : null;
|
|
17515
17540
|
}, [isControlled, valueProp, itemChildren]);
|
|
17516
17541
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
17517
|
-
const triggerRef =
|
|
17518
|
-
const contentRef =
|
|
17519
|
-
const [mounted, setMounted] =
|
|
17520
|
-
const [visible, setVisible] =
|
|
17521
|
-
|
|
17542
|
+
const triggerRef = import_react22.default.useRef(null);
|
|
17543
|
+
const contentRef = import_react22.default.useRef(null);
|
|
17544
|
+
const [mounted, setMounted] = import_react22.default.useState(false);
|
|
17545
|
+
const [visible, setVisible] = import_react22.default.useState(false);
|
|
17546
|
+
import_react22.default.useEffect(() => {
|
|
17522
17547
|
if (disabled && isOpen) setOpen(false);
|
|
17523
17548
|
}, [disabled, isOpen]);
|
|
17524
|
-
|
|
17549
|
+
import_react22.default.useEffect(() => {
|
|
17525
17550
|
if (isOpen) {
|
|
17526
17551
|
setMounted(true);
|
|
17527
17552
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -17531,12 +17556,12 @@ var SelectRoot = (props) => {
|
|
|
17531
17556
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
17532
17557
|
return () => clearTimeout(t);
|
|
17533
17558
|
}, [isOpen]);
|
|
17534
|
-
const open =
|
|
17535
|
-
const close =
|
|
17536
|
-
const toggle =
|
|
17559
|
+
const open = import_react22.default.useCallback(() => setOpen(true), []);
|
|
17560
|
+
const close = import_react22.default.useCallback(() => setOpen(false), []);
|
|
17561
|
+
const toggle = import_react22.default.useCallback(() => setOpen((prev) => !prev), []);
|
|
17537
17562
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
17538
17563
|
const position = useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
17539
|
-
const setSelected =
|
|
17564
|
+
const setSelected = import_react22.default.useCallback(
|
|
17540
17565
|
(label, itemValue) => {
|
|
17541
17566
|
if (!isControlled) {
|
|
17542
17567
|
setUncontrolledLabel(label);
|
|
@@ -17545,7 +17570,7 @@ var SelectRoot = (props) => {
|
|
|
17545
17570
|
},
|
|
17546
17571
|
[isControlled, onChange]
|
|
17547
17572
|
);
|
|
17548
|
-
const ctxValue =
|
|
17573
|
+
const ctxValue = import_react22.default.useMemo(
|
|
17549
17574
|
() => ({
|
|
17550
17575
|
isOpen,
|
|
17551
17576
|
mounted,
|
|
@@ -17643,10 +17668,10 @@ var Select = Object.assign(SelectRoot, {
|
|
|
17643
17668
|
var Select_default = Select;
|
|
17644
17669
|
|
|
17645
17670
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
17646
|
-
var
|
|
17671
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
17647
17672
|
|
|
17648
17673
|
// src/components/HtmlTypeWriter/utils.ts
|
|
17649
|
-
var
|
|
17674
|
+
var import_react23 = __toESM(require("react"), 1);
|
|
17650
17675
|
var voidTags = /* @__PURE__ */ new Set([
|
|
17651
17676
|
"br",
|
|
17652
17677
|
"img",
|
|
@@ -17714,15 +17739,15 @@ function convertNodeToReactWithRange(node, typedLen, rangeMap) {
|
|
|
17714
17739
|
props[attr.name] = attr.value;
|
|
17715
17740
|
});
|
|
17716
17741
|
if (voidTags.has(tag)) {
|
|
17717
|
-
return
|
|
17742
|
+
return import_react23.default.createElement(tag, props);
|
|
17718
17743
|
}
|
|
17719
17744
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
17720
|
-
return
|
|
17745
|
+
return import_react23.default.createElement(tag, props, ...children);
|
|
17721
17746
|
}
|
|
17722
17747
|
function htmlToReactProgressive(root, typedLen, rangeMap) {
|
|
17723
17748
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
17724
17749
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
17725
|
-
return node == null ? null :
|
|
17750
|
+
return node == null ? null : import_react23.default.createElement(import_react23.default.Fragment, { key: idx }, node);
|
|
17726
17751
|
}).filter(Boolean);
|
|
17727
17752
|
return nodes.length === 0 ? null : nodes;
|
|
17728
17753
|
}
|
|
@@ -17735,20 +17760,20 @@ var HtmlTypeWriter = ({
|
|
|
17735
17760
|
onDone,
|
|
17736
17761
|
onChange
|
|
17737
17762
|
}) => {
|
|
17738
|
-
const [typedLen, setTypedLen] =
|
|
17739
|
-
const doneCalledRef =
|
|
17740
|
-
const { doc, rangeMap, totalLength } =
|
|
17763
|
+
const [typedLen, setTypedLen] = import_react24.default.useState(0);
|
|
17764
|
+
const doneCalledRef = import_react24.default.useRef(false);
|
|
17765
|
+
const { doc, rangeMap, totalLength } = import_react24.default.useMemo(() => {
|
|
17741
17766
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
17742
17767
|
const decoded = decodeHtmlEntities(html);
|
|
17743
17768
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
17744
17769
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
17745
17770
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
17746
17771
|
}, [html]);
|
|
17747
|
-
|
|
17772
|
+
import_react24.default.useEffect(() => {
|
|
17748
17773
|
setTypedLen(0);
|
|
17749
17774
|
doneCalledRef.current = false;
|
|
17750
17775
|
}, [html]);
|
|
17751
|
-
|
|
17776
|
+
import_react24.default.useEffect(() => {
|
|
17752
17777
|
if (!totalLength) return;
|
|
17753
17778
|
if (typedLen >= totalLength) return;
|
|
17754
17779
|
const timer = window.setInterval(() => {
|
|
@@ -17756,18 +17781,18 @@ var HtmlTypeWriter = ({
|
|
|
17756
17781
|
}, duration);
|
|
17757
17782
|
return () => window.clearInterval(timer);
|
|
17758
17783
|
}, [typedLen, totalLength, duration]);
|
|
17759
|
-
|
|
17784
|
+
import_react24.default.useEffect(() => {
|
|
17760
17785
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
17761
17786
|
onChange?.();
|
|
17762
17787
|
}
|
|
17763
17788
|
}, [typedLen, totalLength, onChange]);
|
|
17764
|
-
|
|
17789
|
+
import_react24.default.useEffect(() => {
|
|
17765
17790
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
17766
17791
|
doneCalledRef.current = true;
|
|
17767
17792
|
onDone?.();
|
|
17768
17793
|
}
|
|
17769
17794
|
}, [typedLen, totalLength, onDone]);
|
|
17770
|
-
const parsed =
|
|
17795
|
+
const parsed = import_react24.default.useMemo(
|
|
17771
17796
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
17772
17797
|
[doc, typedLen, rangeMap]
|
|
17773
17798
|
);
|
|
@@ -17777,12 +17802,12 @@ HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
|
17777
17802
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
17778
17803
|
|
|
17779
17804
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
17780
|
-
var
|
|
17805
|
+
var import_react25 = __toESM(require("react"), 1);
|
|
17781
17806
|
var import_jsx_runtime325 = require("react/jsx-runtime");
|
|
17782
17807
|
var ImageSelector = (props) => {
|
|
17783
17808
|
const { value, label, onChange } = props;
|
|
17784
|
-
const [previewUrl, setPreviewUrl] =
|
|
17785
|
-
|
|
17809
|
+
const [previewUrl, setPreviewUrl] = import_react25.default.useState();
|
|
17810
|
+
import_react25.default.useEffect(() => {
|
|
17786
17811
|
if (!value) {
|
|
17787
17812
|
setPreviewUrl(void 0);
|
|
17788
17813
|
return;
|
|
@@ -17791,7 +17816,7 @@ var ImageSelector = (props) => {
|
|
|
17791
17816
|
setPreviewUrl(url);
|
|
17792
17817
|
return () => URL.revokeObjectURL(url);
|
|
17793
17818
|
}, [value]);
|
|
17794
|
-
const inputRef =
|
|
17819
|
+
const inputRef = import_react25.default.useRef(null);
|
|
17795
17820
|
const handleFileChange = (e) => {
|
|
17796
17821
|
const selectedFile = e.target.files?.[0];
|
|
17797
17822
|
if (selectedFile) {
|
|
@@ -17913,17 +17938,17 @@ Pagination.displayName = "Pagination";
|
|
|
17913
17938
|
var Pagination_default = Pagination;
|
|
17914
17939
|
|
|
17915
17940
|
// src/components/PopOver/PopOver.tsx
|
|
17916
|
-
var
|
|
17941
|
+
var import_react26 = __toESM(require("react"), 1);
|
|
17917
17942
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
17918
17943
|
var PopOver = (props) => {
|
|
17919
17944
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
17920
|
-
const popRef =
|
|
17921
|
-
const triggerRef =
|
|
17922
|
-
const [localOpen, setLocalOpen] =
|
|
17923
|
-
const [eventTrigger, setEventTrigger] =
|
|
17945
|
+
const popRef = import_react26.default.useRef(null);
|
|
17946
|
+
const triggerRef = import_react26.default.useRef(null);
|
|
17947
|
+
const [localOpen, setLocalOpen] = import_react26.default.useState(false);
|
|
17948
|
+
const [eventTrigger, setEventTrigger] = import_react26.default.useState(false);
|
|
17924
17949
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
17925
17950
|
const position = useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
17926
|
-
|
|
17951
|
+
import_react26.default.useEffect(() => {
|
|
17927
17952
|
if (isOpen) {
|
|
17928
17953
|
setLocalOpen(isOpen);
|
|
17929
17954
|
setTimeout(() => {
|
|
@@ -18009,12 +18034,12 @@ Progress.displayName = "Progress";
|
|
|
18009
18034
|
var Progress_default = Progress;
|
|
18010
18035
|
|
|
18011
18036
|
// src/components/Radio/RadioGroupContext.tsx
|
|
18012
|
-
var
|
|
18013
|
-
var RadioGroupContext =
|
|
18037
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
18038
|
+
var RadioGroupContext = import_react27.default.createContext(
|
|
18014
18039
|
null
|
|
18015
18040
|
);
|
|
18016
18041
|
var useRadioGroupContext = () => {
|
|
18017
|
-
return
|
|
18042
|
+
return import_react27.default.useContext(RadioGroupContext);
|
|
18018
18043
|
};
|
|
18019
18044
|
var RadioGroupContext_default = RadioGroupContext;
|
|
18020
18045
|
|
|
@@ -18170,7 +18195,7 @@ Steps.displayName = "Steps";
|
|
|
18170
18195
|
var Steps_default = Steps;
|
|
18171
18196
|
|
|
18172
18197
|
// src/components/Swiper/Swiper.tsx
|
|
18173
|
-
var
|
|
18198
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
18174
18199
|
var import_jsx_runtime334 = require("react/jsx-runtime");
|
|
18175
18200
|
var Swiper = (props) => {
|
|
18176
18201
|
const {
|
|
@@ -18195,23 +18220,23 @@ var Swiper = (props) => {
|
|
|
18195
18220
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
18196
18221
|
const useLoop = loop && canSlide;
|
|
18197
18222
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
18198
|
-
const extendedItems =
|
|
18223
|
+
const extendedItems = import_react28.default.useMemo(() => {
|
|
18199
18224
|
if (!useLoop) return items;
|
|
18200
18225
|
return [...items, ...items, ...items];
|
|
18201
18226
|
}, [items, useLoop]);
|
|
18202
18227
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
18203
|
-
const [innerIndex, setInnerIndex] =
|
|
18228
|
+
const [innerIndex, setInnerIndex] = import_react28.default.useState(
|
|
18204
18229
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
18205
18230
|
);
|
|
18206
|
-
const [isDragging, setIsDragging] =
|
|
18207
|
-
const [dragOffset, setDragOffset] =
|
|
18208
|
-
const [animated, setAnimated] =
|
|
18209
|
-
const [containerWidth, setContainerWidth] =
|
|
18210
|
-
const containerRef =
|
|
18211
|
-
const startXRef =
|
|
18212
|
-
const startTimeRef =
|
|
18213
|
-
const autoplayTimerRef =
|
|
18214
|
-
|
|
18231
|
+
const [isDragging, setIsDragging] = import_react28.default.useState(false);
|
|
18232
|
+
const [dragOffset, setDragOffset] = import_react28.default.useState(0);
|
|
18233
|
+
const [animated, setAnimated] = import_react28.default.useState(true);
|
|
18234
|
+
const [containerWidth, setContainerWidth] = import_react28.default.useState(0);
|
|
18235
|
+
const containerRef = import_react28.default.useRef(null);
|
|
18236
|
+
const startXRef = import_react28.default.useRef(0);
|
|
18237
|
+
const startTimeRef = import_react28.default.useRef(0);
|
|
18238
|
+
const autoplayTimerRef = import_react28.default.useRef(null);
|
|
18239
|
+
import_react28.default.useEffect(() => {
|
|
18215
18240
|
const el = containerRef.current;
|
|
18216
18241
|
if (!el) return;
|
|
18217
18242
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -18230,7 +18255,7 @@ var Swiper = (props) => {
|
|
|
18230
18255
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
18231
18256
|
};
|
|
18232
18257
|
const realIndex = getRealIndex(innerIndex);
|
|
18233
|
-
const moveToInner =
|
|
18258
|
+
const moveToInner = import_react28.default.useCallback(
|
|
18234
18259
|
(idx, withAnim = true) => {
|
|
18235
18260
|
if (!useLoop) {
|
|
18236
18261
|
setAnimated(withAnim);
|
|
@@ -18258,7 +18283,7 @@ var Swiper = (props) => {
|
|
|
18258
18283
|
},
|
|
18259
18284
|
[useLoop, cloneCount, totalSlides]
|
|
18260
18285
|
);
|
|
18261
|
-
const handleTransitionEnd =
|
|
18286
|
+
const handleTransitionEnd = import_react28.default.useCallback(() => {
|
|
18262
18287
|
if (!useLoop) return;
|
|
18263
18288
|
const real = getRealIndex(innerIndex);
|
|
18264
18289
|
const canonical = cloneCount + real;
|
|
@@ -18268,7 +18293,7 @@ var Swiper = (props) => {
|
|
|
18268
18293
|
}
|
|
18269
18294
|
onChange?.(Math.min(real, maxIndex));
|
|
18270
18295
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
18271
|
-
const slideTo =
|
|
18296
|
+
const slideTo = import_react28.default.useCallback(
|
|
18272
18297
|
(logicalIndex) => {
|
|
18273
18298
|
if (!canSlide) return;
|
|
18274
18299
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -18278,7 +18303,7 @@ var Swiper = (props) => {
|
|
|
18278
18303
|
},
|
|
18279
18304
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
18280
18305
|
);
|
|
18281
|
-
const slideNext =
|
|
18306
|
+
const slideNext = import_react28.default.useCallback(() => {
|
|
18282
18307
|
if (!canSlide) return;
|
|
18283
18308
|
const nextInner = innerIndex + slideBy;
|
|
18284
18309
|
if (useLoop) {
|
|
@@ -18287,7 +18312,7 @@ var Swiper = (props) => {
|
|
|
18287
18312
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
18288
18313
|
}
|
|
18289
18314
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
18290
|
-
const slidePrev =
|
|
18315
|
+
const slidePrev = import_react28.default.useCallback(() => {
|
|
18291
18316
|
if (!canSlide) return;
|
|
18292
18317
|
const prevInner = innerIndex - slideBy;
|
|
18293
18318
|
if (useLoop) {
|
|
@@ -18296,7 +18321,7 @@ var Swiper = (props) => {
|
|
|
18296
18321
|
moveToInner(Math.max(prevInner, 0), true);
|
|
18297
18322
|
}
|
|
18298
18323
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
18299
|
-
|
|
18324
|
+
import_react28.default.useEffect(() => {
|
|
18300
18325
|
if (indexProp === void 0) return;
|
|
18301
18326
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
18302
18327
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -18304,12 +18329,12 @@ var Swiper = (props) => {
|
|
|
18304
18329
|
moveToInner(target, true);
|
|
18305
18330
|
}
|
|
18306
18331
|
}, [indexProp]);
|
|
18307
|
-
|
|
18332
|
+
import_react28.default.useImperativeHandle(swiperRef, () => ({
|
|
18308
18333
|
slidePrev,
|
|
18309
18334
|
slideNext,
|
|
18310
18335
|
slideTo
|
|
18311
18336
|
}));
|
|
18312
|
-
|
|
18337
|
+
import_react28.default.useEffect(() => {
|
|
18313
18338
|
if (!auto || !canSlide) return;
|
|
18314
18339
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
18315
18340
|
return () => {
|
|
@@ -18332,7 +18357,7 @@ var Swiper = (props) => {
|
|
|
18332
18357
|
startXRef.current = getClientX(e);
|
|
18333
18358
|
startTimeRef.current = Date.now();
|
|
18334
18359
|
};
|
|
18335
|
-
|
|
18360
|
+
import_react28.default.useEffect(() => {
|
|
18336
18361
|
if (!isDragging) return;
|
|
18337
18362
|
const handleMove = (e) => {
|
|
18338
18363
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -18439,7 +18464,7 @@ Swiper.displayName = "Swiper";
|
|
|
18439
18464
|
var Swiper_default = Swiper;
|
|
18440
18465
|
|
|
18441
18466
|
// src/components/Switch/Switch.tsx
|
|
18442
|
-
var
|
|
18467
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
18443
18468
|
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
18444
18469
|
var KNOB_TRANSITION_MS = 250;
|
|
18445
18470
|
var Switch = (props) => {
|
|
@@ -18451,9 +18476,9 @@ var Switch = (props) => {
|
|
|
18451
18476
|
color: color2 = "xplat-blue-500",
|
|
18452
18477
|
className
|
|
18453
18478
|
} = props;
|
|
18454
|
-
const [isAnimating, setIsAnimating] =
|
|
18455
|
-
const timeoutRef =
|
|
18456
|
-
|
|
18479
|
+
const [isAnimating, setIsAnimating] = import_react29.default.useState(false);
|
|
18480
|
+
const timeoutRef = import_react29.default.useRef(null);
|
|
18481
|
+
import_react29.default.useEffect(() => {
|
|
18457
18482
|
return () => {
|
|
18458
18483
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
18459
18484
|
};
|
|
@@ -18491,12 +18516,12 @@ Switch.displayName = "Switch";
|
|
|
18491
18516
|
var Switch_default = Switch;
|
|
18492
18517
|
|
|
18493
18518
|
// src/components/Tab/Tab.tsx
|
|
18494
|
-
var
|
|
18519
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
18495
18520
|
|
|
18496
18521
|
// src/components/Tab/TabItem.tsx
|
|
18497
|
-
var
|
|
18522
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
18498
18523
|
var import_jsx_runtime336 = require("react/jsx-runtime");
|
|
18499
|
-
var TabItem =
|
|
18524
|
+
var TabItem = import_react30.default.forwardRef((props, ref) => {
|
|
18500
18525
|
const { isActive, title, onClick } = props;
|
|
18501
18526
|
return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
|
|
18502
18527
|
"div",
|
|
@@ -18515,15 +18540,15 @@ var TabItem_default = TabItem;
|
|
|
18515
18540
|
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
18516
18541
|
var Tab = (props) => {
|
|
18517
18542
|
const { activeIndex, onChange, tabs, type, size = "md" } = props;
|
|
18518
|
-
const [underlineStyle, setUnderlineStyle] =
|
|
18543
|
+
const [underlineStyle, setUnderlineStyle] = import_react31.default.useState({
|
|
18519
18544
|
left: 0,
|
|
18520
18545
|
width: 0
|
|
18521
18546
|
});
|
|
18522
|
-
const itemRefs =
|
|
18547
|
+
const itemRefs = import_react31.default.useRef([]);
|
|
18523
18548
|
const handleChangeActiveTab = (tabItem, tabIdx) => {
|
|
18524
18549
|
onChange(tabItem, tabIdx);
|
|
18525
18550
|
};
|
|
18526
|
-
|
|
18551
|
+
import_react31.default.useEffect(() => {
|
|
18527
18552
|
const el = itemRefs.current[activeIndex];
|
|
18528
18553
|
if (el) {
|
|
18529
18554
|
setUnderlineStyle({ left: el.offsetLeft, width: el.offsetWidth });
|
|
@@ -18558,10 +18583,10 @@ Tab.displayName = "Tab";
|
|
|
18558
18583
|
var Tab_default = Tab;
|
|
18559
18584
|
|
|
18560
18585
|
// src/components/Table/TableContext.tsx
|
|
18561
|
-
var
|
|
18562
|
-
var TableContext =
|
|
18586
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
18587
|
+
var TableContext = import_react32.default.createContext(null);
|
|
18563
18588
|
var useTableContext = () => {
|
|
18564
|
-
const ctx =
|
|
18589
|
+
const ctx = import_react32.default.useContext(TableContext);
|
|
18565
18590
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
18566
18591
|
return ctx;
|
|
18567
18592
|
};
|
|
@@ -18604,24 +18629,24 @@ TableBody.displayName = "TableBody";
|
|
|
18604
18629
|
var TableBody_default = TableBody;
|
|
18605
18630
|
|
|
18606
18631
|
// src/components/Table/TableCell.tsx
|
|
18607
|
-
var
|
|
18632
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
18608
18633
|
|
|
18609
18634
|
// src/components/Table/TableHeadContext.tsx
|
|
18610
|
-
var
|
|
18611
|
-
var TableHeadContext =
|
|
18635
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
18636
|
+
var TableHeadContext = import_react33.default.createContext(
|
|
18612
18637
|
null
|
|
18613
18638
|
);
|
|
18614
18639
|
var useTableHeadContext = () => {
|
|
18615
|
-
const ctx =
|
|
18640
|
+
const ctx = import_react33.default.useContext(TableHeadContext);
|
|
18616
18641
|
return ctx;
|
|
18617
18642
|
};
|
|
18618
18643
|
var TableHeadContext_default = TableHeadContext;
|
|
18619
18644
|
|
|
18620
18645
|
// src/components/Table/TableRowContext.tsx
|
|
18621
|
-
var
|
|
18622
|
-
var TableRowContext =
|
|
18646
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
18647
|
+
var TableRowContext = import_react34.default.createContext(null);
|
|
18623
18648
|
var useTableRowContext = () => {
|
|
18624
|
-
const ctx =
|
|
18649
|
+
const ctx = import_react34.default.useContext(TableRowContext);
|
|
18625
18650
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
18626
18651
|
return ctx;
|
|
18627
18652
|
};
|
|
@@ -18640,9 +18665,9 @@ var TableCell = (props) => {
|
|
|
18640
18665
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
18641
18666
|
const { stickyShadow } = useTableContext();
|
|
18642
18667
|
const headContext = useTableHeadContext();
|
|
18643
|
-
const [left, setLeft] =
|
|
18644
|
-
const cellRef =
|
|
18645
|
-
const calculateLeft =
|
|
18668
|
+
const [left, setLeft] = import_react35.default.useState(0);
|
|
18669
|
+
const cellRef = import_react35.default.useRef(null);
|
|
18670
|
+
const calculateLeft = import_react35.default.useCallback(() => {
|
|
18646
18671
|
if (!cellRef.current) return 0;
|
|
18647
18672
|
let totalLeft = 0;
|
|
18648
18673
|
for (const ref of stickyCells) {
|
|
@@ -18651,7 +18676,7 @@ var TableCell = (props) => {
|
|
|
18651
18676
|
}
|
|
18652
18677
|
return totalLeft;
|
|
18653
18678
|
}, [stickyCells]);
|
|
18654
|
-
|
|
18679
|
+
import_react35.default.useEffect(() => {
|
|
18655
18680
|
if (!isSticky || !cellRef.current) return;
|
|
18656
18681
|
registerStickyCell(cellRef);
|
|
18657
18682
|
setLeft(calculateLeft());
|
|
@@ -18704,7 +18729,7 @@ TableHead.displayName = "TableHead";
|
|
|
18704
18729
|
var TableHead_default = TableHead;
|
|
18705
18730
|
|
|
18706
18731
|
// src/components/Table/TableRow.tsx
|
|
18707
|
-
var
|
|
18732
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
18708
18733
|
var import_jsx_runtime342 = require("react/jsx-runtime");
|
|
18709
18734
|
var TableRow = (props) => {
|
|
18710
18735
|
const {
|
|
@@ -18716,7 +18741,7 @@ var TableRow = (props) => {
|
|
|
18716
18741
|
onClick
|
|
18717
18742
|
} = props;
|
|
18718
18743
|
const { rowBorderUse } = useTableContext();
|
|
18719
|
-
const [stickyCells, setStickyCells] =
|
|
18744
|
+
const [stickyCells, setStickyCells] = import_react36.default.useState([]);
|
|
18720
18745
|
const registerStickyCell = (ref) => {
|
|
18721
18746
|
setStickyCells((prev) => {
|
|
18722
18747
|
if (prev.includes(ref)) return prev;
|
|
@@ -18763,12 +18788,12 @@ Tag.displayName = "Tag";
|
|
|
18763
18788
|
var Tag_default = Tag;
|
|
18764
18789
|
|
|
18765
18790
|
// src/components/TextArea/TextArea.tsx
|
|
18766
|
-
var
|
|
18791
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
18767
18792
|
var import_jsx_runtime344 = require("react/jsx-runtime");
|
|
18768
|
-
var TextArea =
|
|
18793
|
+
var TextArea = import_react37.default.forwardRef(
|
|
18769
18794
|
(props, ref) => {
|
|
18770
18795
|
const { value, onChange, className, disabled, ...textareaProps } = props;
|
|
18771
|
-
const localRef =
|
|
18796
|
+
const localRef = import_react37.default.useRef(null);
|
|
18772
18797
|
const setRefs = (el) => {
|
|
18773
18798
|
localRef.current = el;
|
|
18774
18799
|
if (!ref) return;
|
|
@@ -18788,7 +18813,7 @@ var TextArea = import_react36.default.forwardRef(
|
|
|
18788
18813
|
onChange(event);
|
|
18789
18814
|
}
|
|
18790
18815
|
};
|
|
18791
|
-
|
|
18816
|
+
import_react37.default.useEffect(() => {
|
|
18792
18817
|
const el = localRef.current;
|
|
18793
18818
|
if (!el) return;
|
|
18794
18819
|
el.style.height = "0px";
|
|
@@ -18820,20 +18845,20 @@ TextArea.displayName = "TextArea";
|
|
|
18820
18845
|
var TextArea_default = TextArea;
|
|
18821
18846
|
|
|
18822
18847
|
// src/components/Toast/Toast.tsx
|
|
18823
|
-
var
|
|
18848
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
18824
18849
|
var import_react_dom3 = require("react-dom");
|
|
18825
18850
|
var import_jsx_runtime345 = require("react/jsx-runtime");
|
|
18826
|
-
var ToastContext =
|
|
18851
|
+
var ToastContext = import_react38.default.createContext(null);
|
|
18827
18852
|
var useToast = () => {
|
|
18828
|
-
const ctx =
|
|
18853
|
+
const ctx = import_react38.default.useContext(ToastContext);
|
|
18829
18854
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
18830
18855
|
return ctx;
|
|
18831
18856
|
};
|
|
18832
18857
|
var EXIT_DURATION = 300;
|
|
18833
18858
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
18834
|
-
const ref =
|
|
18835
|
-
const [height, setHeight] =
|
|
18836
|
-
|
|
18859
|
+
const ref = import_react38.default.useRef(null);
|
|
18860
|
+
const [height, setHeight] = import_react38.default.useState(void 0);
|
|
18861
|
+
import_react38.default.useEffect(() => {
|
|
18837
18862
|
if (ref.current && !isExiting) {
|
|
18838
18863
|
setHeight(ref.current.offsetHeight);
|
|
18839
18864
|
}
|
|
@@ -18865,13 +18890,13 @@ var ToastProvider = ({
|
|
|
18865
18890
|
children,
|
|
18866
18891
|
position = "top-right"
|
|
18867
18892
|
}) => {
|
|
18868
|
-
const [toasts, setToasts] =
|
|
18869
|
-
const [removing, setRemoving] =
|
|
18870
|
-
const [mounted, setMounted] =
|
|
18871
|
-
|
|
18893
|
+
const [toasts, setToasts] = import_react38.default.useState([]);
|
|
18894
|
+
const [removing, setRemoving] = import_react38.default.useState(/* @__PURE__ */ new Set());
|
|
18895
|
+
const [mounted, setMounted] = import_react38.default.useState(false);
|
|
18896
|
+
import_react38.default.useEffect(() => {
|
|
18872
18897
|
setMounted(true);
|
|
18873
18898
|
}, []);
|
|
18874
|
-
const remove =
|
|
18899
|
+
const remove = import_react38.default.useCallback((id) => {
|
|
18875
18900
|
setRemoving((prev) => new Set(prev).add(id));
|
|
18876
18901
|
setTimeout(() => {
|
|
18877
18902
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -18882,7 +18907,7 @@ var ToastProvider = ({
|
|
|
18882
18907
|
});
|
|
18883
18908
|
}, EXIT_DURATION);
|
|
18884
18909
|
}, []);
|
|
18885
|
-
const toast =
|
|
18910
|
+
const toast = import_react38.default.useCallback(
|
|
18886
18911
|
(type, message, duration = 3e3) => {
|
|
18887
18912
|
const id = `${Date.now()}-${Math.random()}`;
|
|
18888
18913
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -18911,7 +18936,7 @@ var ToastProvider = ({
|
|
|
18911
18936
|
ToastProvider.displayName = "ToastProvider";
|
|
18912
18937
|
|
|
18913
18938
|
// src/components/Tooltip/Tooltip.tsx
|
|
18914
|
-
var
|
|
18939
|
+
var import_react39 = __toESM(require("react"), 1);
|
|
18915
18940
|
var import_jsx_runtime346 = require("react/jsx-runtime");
|
|
18916
18941
|
var Tooltip2 = (props) => {
|
|
18917
18942
|
const {
|
|
@@ -18920,7 +18945,7 @@ var Tooltip2 = (props) => {
|
|
|
18920
18945
|
description,
|
|
18921
18946
|
children
|
|
18922
18947
|
} = props;
|
|
18923
|
-
const iconRef =
|
|
18948
|
+
const iconRef = import_react39.default.useRef(null);
|
|
18924
18949
|
const colorClass = color2;
|
|
18925
18950
|
return /* @__PURE__ */ (0, import_jsx_runtime346.jsxs)("div", { className: "lib-xplat-tooltip", children: [
|
|
18926
18951
|
/* @__PURE__ */ (0, import_jsx_runtime346.jsx)("div", { className: "tooltip-content", ref: iconRef, children: children || "Tooltip" }),
|
|
@@ -18931,9 +18956,9 @@ Tooltip2.displayName = "Tooltip";
|
|
|
18931
18956
|
var Tooltip_default = Tooltip2;
|
|
18932
18957
|
|
|
18933
18958
|
// src/components/Video/Video.tsx
|
|
18934
|
-
var
|
|
18959
|
+
var import_react40 = __toESM(require("react"), 1);
|
|
18935
18960
|
var import_jsx_runtime347 = require("react/jsx-runtime");
|
|
18936
|
-
var Video =
|
|
18961
|
+
var Video = import_react40.default.forwardRef((props, ref) => {
|
|
18937
18962
|
const {
|
|
18938
18963
|
src,
|
|
18939
18964
|
poster,
|
|
@@ -18947,10 +18972,10 @@ var Video = import_react39.default.forwardRef((props, ref) => {
|
|
|
18947
18972
|
onPause,
|
|
18948
18973
|
...rest
|
|
18949
18974
|
} = props;
|
|
18950
|
-
const videoRef =
|
|
18951
|
-
const [isPlaying, setIsPlaying] =
|
|
18952
|
-
const [isLoaded, setIsLoaded] =
|
|
18953
|
-
const setRefs =
|
|
18975
|
+
const videoRef = import_react40.default.useRef(null);
|
|
18976
|
+
const [isPlaying, setIsPlaying] = import_react40.default.useState(Boolean(autoPlay));
|
|
18977
|
+
const [isLoaded, setIsLoaded] = import_react40.default.useState(false);
|
|
18978
|
+
const setRefs = import_react40.default.useCallback(
|
|
18954
18979
|
(el) => {
|
|
18955
18980
|
videoRef.current = el;
|
|
18956
18981
|
if (typeof ref === "function") ref(el);
|