@x-plat/design-system 0.14.19 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Dropdown/index.cjs +48 -18
- package/dist/components/Dropdown/index.js +48 -18
- package/dist/components/PopOver/index.cjs +47 -17
- package/dist/components/PopOver/index.js +47 -17
- package/dist/components/Select/index.cjs +67 -37
- package/dist/components/Select/index.js +67 -37
- package/dist/components/Table/index.cjs +17 -10
- package/dist/components/Table/index.js +17 -10
- package/dist/components/TimePicker/index.cjs +52 -22
- package/dist/components/TimePicker/index.js +52 -22
- package/dist/components/Tooltip/index.cjs +2 -2
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/index.cjs +266 -226
- package/dist/components/index.js +266 -226
- package/dist/index.cjs +271 -231
- package/dist/index.js +271 -231
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -3134,8 +3134,10 @@ import React11 from "react";
|
|
|
3134
3134
|
import React10 from "react";
|
|
3135
3135
|
var findScrollParent = (el) => {
|
|
3136
3136
|
for (let p = el.parentElement; p; p = p.parentElement) {
|
|
3137
|
-
|
|
3138
|
-
|
|
3137
|
+
if (p.dataset.xplatOverlayEscape !== void 0) continue;
|
|
3138
|
+
const { overflowY } = getComputedStyle(p);
|
|
3139
|
+
if (!/(auto|scroll)/.test(overflowY)) continue;
|
|
3140
|
+
if (p.scrollHeight > p.clientHeight) return p;
|
|
3139
3141
|
}
|
|
3140
3142
|
return null;
|
|
3141
3143
|
};
|
|
@@ -3231,8 +3233,9 @@ var useAutoPosition = (triggerRef, popRef, enabled = true) => {
|
|
|
3231
3233
|
);
|
|
3232
3234
|
if (frozenMaxRef.current === void 0) frozenMaxRef.current = suggested;
|
|
3233
3235
|
const maxHeight = frozenMaxRef.current;
|
|
3234
|
-
|
|
3235
|
-
pop.style.
|
|
3236
|
+
const hostRect = (pop.offsetParent ?? pop.parentElement)?.getBoundingClientRect();
|
|
3237
|
+
pop.style.top = `${top - (hostRect?.top ?? 0)}px`;
|
|
3238
|
+
pop.style.left = `${left - (hostRect?.left ?? 0)}px`;
|
|
3236
3239
|
pop.style.maxHeight = maxHeight === null ? "" : `${maxHeight}px`;
|
|
3237
3240
|
pop.style.clipPath = over.top || over.right || over.bottom || over.left ? `inset(${over.top}px ${over.right}px ${over.bottom}px ${over.left}px)` : "none";
|
|
3238
3241
|
directionRef.current = next;
|
|
@@ -4034,13 +4037,13 @@ Drawer.displayName = "Drawer";
|
|
|
4034
4037
|
var Drawer_default = Drawer;
|
|
4035
4038
|
|
|
4036
4039
|
// src/components/Dropdown/Dropdown.tsx
|
|
4037
|
-
import
|
|
4040
|
+
import React22 from "react";
|
|
4038
4041
|
|
|
4039
4042
|
// src/tokens/hooks/Portal.tsx
|
|
4040
4043
|
import ReactDOM from "react-dom";
|
|
4041
|
-
var Portal = ({ children }) => {
|
|
4044
|
+
var Portal = ({ children, container }) => {
|
|
4042
4045
|
if (typeof document === "undefined") return null;
|
|
4043
|
-
return ReactDOM.createPortal(children, document.body);
|
|
4046
|
+
return ReactDOM.createPortal(children, container ?? document.body);
|
|
4044
4047
|
};
|
|
4045
4048
|
Portal.displayName = "Portal";
|
|
4046
4049
|
var Portal_default = Portal;
|
|
@@ -4070,15 +4073,42 @@ var useClickOutside = (refs, handler, enabled = true) => {
|
|
|
4070
4073
|
};
|
|
4071
4074
|
var useClickOutside_default = useClickOutside;
|
|
4072
4075
|
|
|
4076
|
+
// src/tokens/hooks/useOverlayHost.ts
|
|
4077
|
+
import React21 from "react";
|
|
4078
|
+
var useOverlayHost = (triggerRef, enabled) => {
|
|
4079
|
+
const [host, setHost] = React21.useState(null);
|
|
4080
|
+
React21.useLayoutEffect(() => {
|
|
4081
|
+
if (!enabled || !triggerRef.current) {
|
|
4082
|
+
setHost(null);
|
|
4083
|
+
return;
|
|
4084
|
+
}
|
|
4085
|
+
const el = document.createElement("div");
|
|
4086
|
+
el.dataset.xplatOverlayHost = "";
|
|
4087
|
+
el.style.position = "relative";
|
|
4088
|
+
el.style.width = "0";
|
|
4089
|
+
el.style.height = "0";
|
|
4090
|
+
const parent = findScrollParent(triggerRef.current) ?? document.body;
|
|
4091
|
+
parent.appendChild(el);
|
|
4092
|
+
setHost(el);
|
|
4093
|
+
return () => {
|
|
4094
|
+
el.remove();
|
|
4095
|
+
setHost(null);
|
|
4096
|
+
};
|
|
4097
|
+
}, [enabled, triggerRef]);
|
|
4098
|
+
return host;
|
|
4099
|
+
};
|
|
4100
|
+
var useOverlayHost_default = useOverlayHost;
|
|
4101
|
+
|
|
4073
4102
|
// src/components/Dropdown/Dropdown.tsx
|
|
4074
4103
|
import { jsx as jsx322, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
4075
4104
|
var Dropdown = (props) => {
|
|
4076
4105
|
const { items, children } = props;
|
|
4077
|
-
const [isOpen, setIsOpen] =
|
|
4078
|
-
const [mounted, setMounted] =
|
|
4079
|
-
const [visible, setVisible] =
|
|
4080
|
-
const triggerRef =
|
|
4081
|
-
const menuRef =
|
|
4106
|
+
const [isOpen, setIsOpen] = React22.useState(false);
|
|
4107
|
+
const [mounted, setMounted] = React22.useState(false);
|
|
4108
|
+
const [visible, setVisible] = React22.useState(false);
|
|
4109
|
+
const triggerRef = React22.useRef(null);
|
|
4110
|
+
const menuRef = React22.useRef(null);
|
|
4111
|
+
const host = useOverlayHost_default(triggerRef, mounted);
|
|
4082
4112
|
useAutoPosition_default(triggerRef, menuRef, mounted);
|
|
4083
4113
|
useClickOutside_default([triggerRef, menuRef], () => setIsOpen(false), isOpen);
|
|
4084
4114
|
useCloseWhenFocusHidden(isOpen, triggerRef, menuRef, () => setIsOpen(false));
|
|
@@ -4086,7 +4116,7 @@ var Dropdown = (props) => {
|
|
|
4086
4116
|
setIsOpen(false);
|
|
4087
4117
|
triggerRef.current?.focus({ preventScroll: true });
|
|
4088
4118
|
});
|
|
4089
|
-
|
|
4119
|
+
React22.useEffect(() => {
|
|
4090
4120
|
if (isOpen) {
|
|
4091
4121
|
setMounted(true);
|
|
4092
4122
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -4111,7 +4141,7 @@ var Dropdown = (props) => {
|
|
|
4111
4141
|
children
|
|
4112
4142
|
}
|
|
4113
4143
|
),
|
|
4114
|
-
mounted && /* @__PURE__ */ jsx322(Portal_default, { children: /* @__PURE__ */ jsx322(
|
|
4144
|
+
mounted && /* @__PURE__ */ jsx322(Portal_default, { container: host, children: /* @__PURE__ */ jsx322(
|
|
4115
4145
|
"div",
|
|
4116
4146
|
{
|
|
4117
4147
|
ref: menuRef,
|
|
@@ -4139,7 +4169,7 @@ Dropdown.displayName = "Dropdown";
|
|
|
4139
4169
|
var Dropdown_default = Dropdown;
|
|
4140
4170
|
|
|
4141
4171
|
// src/components/Editor/Editor.tsx
|
|
4142
|
-
import
|
|
4172
|
+
import React23 from "react";
|
|
4143
4173
|
|
|
4144
4174
|
// src/components/Editor/highlight.ts
|
|
4145
4175
|
var CODE_LANGUAGES = [
|
|
@@ -4410,22 +4440,22 @@ var Editor = (props) => {
|
|
|
4410
4440
|
onImageUpload,
|
|
4411
4441
|
minHeight = 200
|
|
4412
4442
|
} = props;
|
|
4413
|
-
const editorRef =
|
|
4414
|
-
const lastRangeRef =
|
|
4415
|
-
const composingRef =
|
|
4416
|
-
const [isFocused, setIsFocused] =
|
|
4417
|
-
const [isEmpty, setIsEmpty] =
|
|
4418
|
-
const [activeFormats, setActiveFormats] =
|
|
4419
|
-
const [slashOpen, setSlashOpen] =
|
|
4420
|
-
const [slashFilter, setSlashFilter] =
|
|
4421
|
-
const [slashIdx, setSlashIdx] =
|
|
4422
|
-
const [slashPos, setSlashPos] =
|
|
4423
|
-
const slashStartRangeRef =
|
|
4424
|
-
const [linkOpen, setLinkOpen] =
|
|
4425
|
-
const [linkValue, setLinkValue] =
|
|
4426
|
-
const [linkPos, setLinkPos] =
|
|
4427
|
-
const lastEmittedRef =
|
|
4428
|
-
|
|
4443
|
+
const editorRef = React23.useRef(null);
|
|
4444
|
+
const lastRangeRef = React23.useRef(null);
|
|
4445
|
+
const composingRef = React23.useRef(false);
|
|
4446
|
+
const [isFocused, setIsFocused] = React23.useState(false);
|
|
4447
|
+
const [isEmpty, setIsEmpty] = React23.useState(!value);
|
|
4448
|
+
const [activeFormats, setActiveFormats] = React23.useState(/* @__PURE__ */ new Set());
|
|
4449
|
+
const [slashOpen, setSlashOpen] = React23.useState(false);
|
|
4450
|
+
const [slashFilter, setSlashFilter] = React23.useState("");
|
|
4451
|
+
const [slashIdx, setSlashIdx] = React23.useState(0);
|
|
4452
|
+
const [slashPos, setSlashPos] = React23.useState({ top: 0, left: 0 });
|
|
4453
|
+
const slashStartRangeRef = React23.useRef(null);
|
|
4454
|
+
const [linkOpen, setLinkOpen] = React23.useState(false);
|
|
4455
|
+
const [linkValue, setLinkValue] = React23.useState("");
|
|
4456
|
+
const [linkPos, setLinkPos] = React23.useState({ top: 0, left: 0 });
|
|
4457
|
+
const lastEmittedRef = React23.useRef(null);
|
|
4458
|
+
React23.useEffect(() => {
|
|
4429
4459
|
const el = editorRef.current;
|
|
4430
4460
|
if (!el) return;
|
|
4431
4461
|
if (value === lastEmittedRef.current) return;
|
|
@@ -4507,10 +4537,10 @@ var Editor = (props) => {
|
|
|
4507
4537
|
const current = String(document.queryCommandValue("formatBlock") || "").toLowerCase();
|
|
4508
4538
|
setBlock(current === tag ? "p" : tag);
|
|
4509
4539
|
};
|
|
4510
|
-
const historyRef =
|
|
4511
|
-
const historyIdxRef =
|
|
4512
|
-
const lastPushAtRef =
|
|
4513
|
-
const isRestoringRef =
|
|
4540
|
+
const historyRef = React23.useRef([]);
|
|
4541
|
+
const historyIdxRef = React23.useRef(-1);
|
|
4542
|
+
const lastPushAtRef = React23.useRef(0);
|
|
4543
|
+
const isRestoringRef = React23.useRef(false);
|
|
4514
4544
|
const caretOffset = (rootEl) => {
|
|
4515
4545
|
const el = rootEl ?? editorRef.current;
|
|
4516
4546
|
const sel = window.getSelection();
|
|
@@ -4587,8 +4617,8 @@ var Editor = (props) => {
|
|
|
4587
4617
|
const cls = Array.from(pre.classList).find((c) => c.startsWith("lang-"));
|
|
4588
4618
|
return cls?.slice(5) ?? "plain";
|
|
4589
4619
|
};
|
|
4590
|
-
const [codeLang, setCodeLang] =
|
|
4591
|
-
const highlightRafRef =
|
|
4620
|
+
const [codeLang, setCodeLang] = React23.useState("plain");
|
|
4621
|
+
const highlightRafRef = React23.useRef(0);
|
|
4592
4622
|
const rehighlight = (pre) => {
|
|
4593
4623
|
if (composingRef.current) return;
|
|
4594
4624
|
const code = pre.querySelector("code");
|
|
@@ -4933,7 +4963,7 @@ var Editor = (props) => {
|
|
|
4933
4963
|
setSlashIdx(0);
|
|
4934
4964
|
slashStartRangeRef.current = null;
|
|
4935
4965
|
};
|
|
4936
|
-
const filteredSlashItems =
|
|
4966
|
+
const filteredSlashItems = React23.useMemo(() => {
|
|
4937
4967
|
if (!slashFilter) return SLASH_ITEMS;
|
|
4938
4968
|
const f = slashFilter.toLowerCase();
|
|
4939
4969
|
return SLASH_ITEMS.filter((it) => it.label.toLowerCase().includes(f) || it.key.includes(f));
|
|
@@ -5198,7 +5228,7 @@ var Editor = (props) => {
|
|
|
5198
5228
|
}
|
|
5199
5229
|
}
|
|
5200
5230
|
};
|
|
5201
|
-
const plainPasteRef =
|
|
5231
|
+
const plainPasteRef = React23.useRef(false);
|
|
5202
5232
|
const handlePaste = (e) => {
|
|
5203
5233
|
if (readOnly) return;
|
|
5204
5234
|
e.preventDefault();
|
|
@@ -5499,7 +5529,7 @@ var EditorToolbar = ({
|
|
|
5499
5529
|
] });
|
|
5500
5530
|
};
|
|
5501
5531
|
var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
5502
|
-
|
|
5532
|
+
React23.useEffect(() => {
|
|
5503
5533
|
const handleClickOutside = (e) => {
|
|
5504
5534
|
const target = e.target;
|
|
5505
5535
|
const menu = document.querySelector(".lib-xplat-editor__slash-menu");
|
|
@@ -5533,8 +5563,8 @@ var SlashMenu = ({ position, items, activeIndex, onSelect, onClose }) => {
|
|
|
5533
5563
|
);
|
|
5534
5564
|
};
|
|
5535
5565
|
var LinkPopover = ({ position, value, onChange, onConfirm, onClose }) => {
|
|
5536
|
-
const inputRef =
|
|
5537
|
-
|
|
5566
|
+
const inputRef = React23.useRef(null);
|
|
5567
|
+
React23.useEffect(() => {
|
|
5538
5568
|
inputRef.current?.focus();
|
|
5539
5569
|
}, []);
|
|
5540
5570
|
return /* @__PURE__ */ jsxs207(
|
|
@@ -5592,7 +5622,7 @@ EmptyState.displayName = "EmptyState";
|
|
|
5592
5622
|
var EmptyState_default = EmptyState;
|
|
5593
5623
|
|
|
5594
5624
|
// src/components/FileUpload/FileUpload.tsx
|
|
5595
|
-
import
|
|
5625
|
+
import React24 from "react";
|
|
5596
5626
|
import { jsx as jsx325, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
5597
5627
|
var FileUpload = (props) => {
|
|
5598
5628
|
const {
|
|
@@ -5606,9 +5636,9 @@ var FileUpload = (props) => {
|
|
|
5606
5636
|
label,
|
|
5607
5637
|
required
|
|
5608
5638
|
} = props;
|
|
5609
|
-
const fieldId =
|
|
5610
|
-
const [isDragOver, setIsDragOver] =
|
|
5611
|
-
const inputRef =
|
|
5639
|
+
const fieldId = React24.useId();
|
|
5640
|
+
const [isDragOver, setIsDragOver] = React24.useState(false);
|
|
5641
|
+
const inputRef = React24.useRef(null);
|
|
5612
5642
|
const handleFiles = (fileList) => {
|
|
5613
5643
|
let files = Array.from(fileList);
|
|
5614
5644
|
if (maxSize) {
|
|
@@ -5671,10 +5701,10 @@ FileUpload.displayName = "FileUpload";
|
|
|
5671
5701
|
var FileUpload_default = FileUpload;
|
|
5672
5702
|
|
|
5673
5703
|
// src/components/HtmlTypeWriter/HtmlTypeWriter.tsx
|
|
5674
|
-
import
|
|
5704
|
+
import React26 from "react";
|
|
5675
5705
|
|
|
5676
5706
|
// src/components/HtmlTypeWriter/utils.ts
|
|
5677
|
-
import
|
|
5707
|
+
import React25 from "react";
|
|
5678
5708
|
var voidTags = /* @__PURE__ */ new Set([
|
|
5679
5709
|
"br",
|
|
5680
5710
|
"img",
|
|
@@ -5742,15 +5772,15 @@ var convertNodeToReactWithRange = (node, typedLen, rangeMap) => {
|
|
|
5742
5772
|
props[attr.name] = attr.value;
|
|
5743
5773
|
});
|
|
5744
5774
|
if (voidTags.has(tag)) {
|
|
5745
|
-
return
|
|
5775
|
+
return React25.createElement(tag, props);
|
|
5746
5776
|
}
|
|
5747
5777
|
const children = Array.from(element.childNodes).map((child) => convertNodeToReactWithRange(child, typedLen, rangeMap)).filter((n) => n != null);
|
|
5748
|
-
return
|
|
5778
|
+
return React25.createElement(tag, props, ...children);
|
|
5749
5779
|
};
|
|
5750
5780
|
var htmlToReactProgressive = (root, typedLen, rangeMap) => {
|
|
5751
5781
|
const nodes = Array.from(root.childNodes).map((child, idx) => {
|
|
5752
5782
|
const node = convertNodeToReactWithRange(child, typedLen, rangeMap);
|
|
5753
|
-
return node == null ? null :
|
|
5783
|
+
return node == null ? null : React25.createElement(React25.Fragment, { key: idx }, node);
|
|
5754
5784
|
}).filter(Boolean);
|
|
5755
5785
|
return nodes.length === 0 ? null : nodes;
|
|
5756
5786
|
};
|
|
@@ -5763,20 +5793,20 @@ var HtmlTypeWriter = ({
|
|
|
5763
5793
|
onDone,
|
|
5764
5794
|
onChange
|
|
5765
5795
|
}) => {
|
|
5766
|
-
const [typedLen, setTypedLen] =
|
|
5767
|
-
const doneCalledRef =
|
|
5768
|
-
const { doc, rangeMap, totalLength } =
|
|
5796
|
+
const [typedLen, setTypedLen] = React26.useState(0);
|
|
5797
|
+
const doneCalledRef = React26.useRef(false);
|
|
5798
|
+
const { doc, rangeMap, totalLength } = React26.useMemo(() => {
|
|
5769
5799
|
if (typeof window === "undefined") return { doc: null, rangeMap: /* @__PURE__ */ new Map(), totalLength: 0 };
|
|
5770
5800
|
const decoded = decodeHtmlEntities(html);
|
|
5771
5801
|
const doc2 = new DOMParser().parseFromString(decoded, "text/html");
|
|
5772
5802
|
const { rangeMap: rangeMap2, totalLength: totalLength2 } = buildRangeMap(doc2.body);
|
|
5773
5803
|
return { doc: doc2, rangeMap: rangeMap2, totalLength: totalLength2 };
|
|
5774
5804
|
}, [html]);
|
|
5775
|
-
|
|
5805
|
+
React26.useEffect(() => {
|
|
5776
5806
|
setTypedLen(0);
|
|
5777
5807
|
doneCalledRef.current = false;
|
|
5778
5808
|
}, [html]);
|
|
5779
|
-
|
|
5809
|
+
React26.useEffect(() => {
|
|
5780
5810
|
if (!totalLength) return;
|
|
5781
5811
|
if (typedLen >= totalLength) return;
|
|
5782
5812
|
const timer = window.setInterval(() => {
|
|
@@ -5784,18 +5814,18 @@ var HtmlTypeWriter = ({
|
|
|
5784
5814
|
}, duration);
|
|
5785
5815
|
return () => window.clearInterval(timer);
|
|
5786
5816
|
}, [typedLen, totalLength, duration]);
|
|
5787
|
-
|
|
5817
|
+
React26.useEffect(() => {
|
|
5788
5818
|
if (typedLen > 0 && typedLen < totalLength) {
|
|
5789
5819
|
onChange?.();
|
|
5790
5820
|
}
|
|
5791
5821
|
}, [typedLen, totalLength, onChange]);
|
|
5792
|
-
|
|
5822
|
+
React26.useEffect(() => {
|
|
5793
5823
|
if (typedLen === totalLength && totalLength > 0 && !doneCalledRef.current) {
|
|
5794
5824
|
doneCalledRef.current = true;
|
|
5795
5825
|
onDone?.();
|
|
5796
5826
|
}
|
|
5797
5827
|
}, [typedLen, totalLength, onDone]);
|
|
5798
|
-
const parsed =
|
|
5828
|
+
const parsed = React26.useMemo(
|
|
5799
5829
|
() => doc ? htmlToReactProgressive(doc.body, typedLen, rangeMap) : null,
|
|
5800
5830
|
[doc, typedLen, rangeMap]
|
|
5801
5831
|
);
|
|
@@ -5805,13 +5835,13 @@ HtmlTypeWriter.displayName = "HtmlTypeWriter";
|
|
|
5805
5835
|
var HtmlTypeWriter_default = HtmlTypeWriter;
|
|
5806
5836
|
|
|
5807
5837
|
// src/components/ImageSelector/ImageSelector.tsx
|
|
5808
|
-
import
|
|
5838
|
+
import React27 from "react";
|
|
5809
5839
|
import { jsx as jsx327, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
5810
5840
|
var ImageSelector = (props) => {
|
|
5811
5841
|
const { value, placeholder, onChange, validations, label, required } = props;
|
|
5812
|
-
const fieldId =
|
|
5813
|
-
const [previewUrl, setPreviewUrl] =
|
|
5814
|
-
|
|
5842
|
+
const fieldId = React27.useId();
|
|
5843
|
+
const [previewUrl, setPreviewUrl] = React27.useState();
|
|
5844
|
+
React27.useEffect(() => {
|
|
5815
5845
|
if (!value) {
|
|
5816
5846
|
setPreviewUrl(void 0);
|
|
5817
5847
|
return;
|
|
@@ -5820,7 +5850,7 @@ var ImageSelector = (props) => {
|
|
|
5820
5850
|
setPreviewUrl(url);
|
|
5821
5851
|
return () => URL.revokeObjectURL(url);
|
|
5822
5852
|
}, [value]);
|
|
5823
|
-
const inputRef =
|
|
5853
|
+
const inputRef = React27.useRef(null);
|
|
5824
5854
|
const handleFileChange = (e) => {
|
|
5825
5855
|
const selectedFile = e.target.files?.[0];
|
|
5826
5856
|
if (selectedFile) {
|
|
@@ -6003,22 +6033,23 @@ Pagination.displayName = "Pagination";
|
|
|
6003
6033
|
var Pagination_default = Pagination;
|
|
6004
6034
|
|
|
6005
6035
|
// src/components/PopOver/PopOver.tsx
|
|
6006
|
-
import
|
|
6036
|
+
import React28 from "react";
|
|
6007
6037
|
import { jsx as jsx332, jsxs as jsxs213 } from "react/jsx-runtime";
|
|
6008
6038
|
var PopOver = (props) => {
|
|
6009
6039
|
const { children, isOpen, onClose, PopOverEl } = props;
|
|
6010
|
-
const popRef =
|
|
6011
|
-
const triggerRef =
|
|
6012
|
-
const [localOpen, setLocalOpen] =
|
|
6013
|
-
const [eventTrigger, setEventTrigger] =
|
|
6040
|
+
const popRef = React28.useRef(null);
|
|
6041
|
+
const triggerRef = React28.useRef(null);
|
|
6042
|
+
const [localOpen, setLocalOpen] = React28.useState(false);
|
|
6043
|
+
const [eventTrigger, setEventTrigger] = React28.useState(false);
|
|
6014
6044
|
useClickOutside_default([popRef, triggerRef], onClose, isOpen);
|
|
6015
6045
|
useCloseWhenFocusHidden(isOpen, triggerRef, popRef, onClose);
|
|
6016
6046
|
useEscapeKey(isOpen, () => {
|
|
6017
6047
|
onClose();
|
|
6018
6048
|
triggerRef.current?.focus({ preventScroll: true });
|
|
6019
6049
|
});
|
|
6050
|
+
const host = useOverlayHost_default(triggerRef, localOpen);
|
|
6020
6051
|
useAutoPosition_default(triggerRef, popRef, localOpen);
|
|
6021
|
-
|
|
6052
|
+
React28.useEffect(() => {
|
|
6022
6053
|
if (isOpen) {
|
|
6023
6054
|
setLocalOpen(isOpen);
|
|
6024
6055
|
setTimeout(() => {
|
|
@@ -6041,7 +6072,7 @@ var PopOver = (props) => {
|
|
|
6041
6072
|
},
|
|
6042
6073
|
children: [
|
|
6043
6074
|
children,
|
|
6044
|
-
localOpen && /* @__PURE__ */ jsx332(Portal_default, { children: /* @__PURE__ */ jsx332(
|
|
6075
|
+
localOpen && /* @__PURE__ */ jsx332(Portal_default, { container: host, children: /* @__PURE__ */ jsx332(
|
|
6045
6076
|
"div",
|
|
6046
6077
|
{
|
|
6047
6078
|
className: clsx_default(
|
|
@@ -6099,12 +6130,12 @@ Progress.displayName = "Progress";
|
|
|
6099
6130
|
var Progress_default = Progress;
|
|
6100
6131
|
|
|
6101
6132
|
// src/components/Radio/RadioGroupContext.tsx
|
|
6102
|
-
import
|
|
6103
|
-
var RadioGroupContext =
|
|
6133
|
+
import React29 from "react";
|
|
6134
|
+
var RadioGroupContext = React29.createContext(
|
|
6104
6135
|
null
|
|
6105
6136
|
);
|
|
6106
6137
|
var useRadioGroupContext = () => {
|
|
6107
|
-
return
|
|
6138
|
+
return React29.useContext(RadioGroupContext);
|
|
6108
6139
|
};
|
|
6109
6140
|
var RadioGroupContext_default = RadioGroupContext;
|
|
6110
6141
|
|
|
@@ -6180,19 +6211,19 @@ RadioGroup.displayName = "RadioGroup";
|
|
|
6180
6211
|
var RadioGroup_default = RadioGroup;
|
|
6181
6212
|
|
|
6182
6213
|
// src/components/Select/Select.tsx
|
|
6183
|
-
import
|
|
6214
|
+
import React32 from "react";
|
|
6184
6215
|
|
|
6185
6216
|
// src/components/Select/context.ts
|
|
6186
|
-
import
|
|
6187
|
-
var SelectContext =
|
|
6217
|
+
import React30 from "react";
|
|
6218
|
+
var SelectContext = React30.createContext(null);
|
|
6188
6219
|
var context_default = SelectContext;
|
|
6189
6220
|
|
|
6190
6221
|
// src/components/Select/SelectItem.tsx
|
|
6191
|
-
import
|
|
6222
|
+
import React31 from "react";
|
|
6192
6223
|
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
6193
6224
|
var SelectItem = (props) => {
|
|
6194
6225
|
const { children, value, onClick, disabled = false } = props;
|
|
6195
|
-
const ctx =
|
|
6226
|
+
const ctx = React31.useContext(context_default);
|
|
6196
6227
|
const handleClick = (e) => {
|
|
6197
6228
|
e.preventDefault();
|
|
6198
6229
|
e.stopPropagation();
|
|
@@ -6242,29 +6273,29 @@ var SelectRoot = (props) => {
|
|
|
6242
6273
|
required,
|
|
6243
6274
|
size = "md"
|
|
6244
6275
|
} = props;
|
|
6245
|
-
const fieldId =
|
|
6246
|
-
const itemChildren =
|
|
6247
|
-
(child) =>
|
|
6276
|
+
const fieldId = React32.useId();
|
|
6277
|
+
const itemChildren = React32.Children.toArray(children).filter(
|
|
6278
|
+
(child) => React32.isValidElement(child) && child.type === SelectItem_default
|
|
6248
6279
|
);
|
|
6249
6280
|
const isControlled = valueProp !== void 0;
|
|
6250
|
-
const [isOpen, setOpen] =
|
|
6251
|
-
const [uncontrolledLabel, setUncontrolledLabel] =
|
|
6252
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
6253
|
-
const controlledLabel =
|
|
6281
|
+
const [isOpen, setOpen] = React32.useState(false);
|
|
6282
|
+
const [uncontrolledLabel, setUncontrolledLabel] = React32.useState(null);
|
|
6283
|
+
const [uncontrolledValue, setUncontrolledValue] = React32.useState(void 0);
|
|
6284
|
+
const controlledLabel = React32.useMemo(() => {
|
|
6254
6285
|
if (!isControlled) return null;
|
|
6255
6286
|
const match = itemChildren.find((child) => child.props.value === valueProp);
|
|
6256
6287
|
return match ? match.props.children : null;
|
|
6257
6288
|
}, [isControlled, valueProp, itemChildren]);
|
|
6258
6289
|
const selectedLabel = isControlled ? controlledLabel : uncontrolledLabel;
|
|
6259
6290
|
const selectedValue = isControlled ? valueProp : uncontrolledValue;
|
|
6260
|
-
const triggerRef =
|
|
6261
|
-
const contentRef =
|
|
6262
|
-
const [mounted, setMounted] =
|
|
6263
|
-
const [visible, setVisible] =
|
|
6264
|
-
|
|
6291
|
+
const triggerRef = React32.useRef(null);
|
|
6292
|
+
const contentRef = React32.useRef(null);
|
|
6293
|
+
const [mounted, setMounted] = React32.useState(false);
|
|
6294
|
+
const [visible, setVisible] = React32.useState(false);
|
|
6295
|
+
React32.useEffect(() => {
|
|
6265
6296
|
if (disabled && isOpen) setOpen(false);
|
|
6266
6297
|
}, [disabled, isOpen]);
|
|
6267
|
-
|
|
6298
|
+
React32.useEffect(() => {
|
|
6268
6299
|
if (isOpen) {
|
|
6269
6300
|
setMounted(true);
|
|
6270
6301
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -6274,33 +6305,34 @@ var SelectRoot = (props) => {
|
|
|
6274
6305
|
const t = setTimeout(() => setMounted(false), ANIMATION_DURATION_MS3);
|
|
6275
6306
|
return () => clearTimeout(t);
|
|
6276
6307
|
}, [isOpen]);
|
|
6277
|
-
const [query, setQuery] =
|
|
6308
|
+
const [query, setQuery] = React32.useState("");
|
|
6278
6309
|
const textOf = (node) => {
|
|
6279
6310
|
if (node === null || node === void 0 || typeof node === "boolean") return "";
|
|
6280
6311
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
6281
6312
|
if (Array.isArray(node)) return node.map(textOf).join("");
|
|
6282
|
-
if (
|
|
6313
|
+
if (React32.isValidElement(node)) return textOf(node.props.children);
|
|
6283
6314
|
return "";
|
|
6284
6315
|
};
|
|
6285
|
-
const visibleItems =
|
|
6316
|
+
const visibleItems = React32.useMemo(() => {
|
|
6286
6317
|
if (!searchable || !query.trim()) return itemChildren;
|
|
6287
6318
|
const q = query.trim().toLowerCase();
|
|
6288
6319
|
return itemChildren.filter((c) => textOf(c.props.children).toLowerCase().includes(q));
|
|
6289
6320
|
}, [searchable, query, itemChildren]);
|
|
6290
|
-
const open =
|
|
6291
|
-
const close =
|
|
6321
|
+
const open = React32.useCallback(() => setOpen(true), []);
|
|
6322
|
+
const close = React32.useCallback(() => {
|
|
6292
6323
|
setOpen(false);
|
|
6293
6324
|
setQuery("");
|
|
6294
6325
|
}, []);
|
|
6295
|
-
const toggle =
|
|
6326
|
+
const toggle = React32.useCallback(() => setOpen((prev) => !prev), []);
|
|
6296
6327
|
useClickOutside_default([contentRef, triggerRef], close, isOpen);
|
|
6297
6328
|
useCloseWhenFocusHidden(isOpen, triggerRef, contentRef, close);
|
|
6298
6329
|
useEscapeKey(isOpen, () => {
|
|
6299
6330
|
close();
|
|
6300
6331
|
triggerRef.current?.focus({ preventScroll: true });
|
|
6301
6332
|
});
|
|
6333
|
+
const host = useOverlayHost_default(triggerRef, mounted);
|
|
6302
6334
|
useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
6303
|
-
const setSelected =
|
|
6335
|
+
const setSelected = React32.useCallback(
|
|
6304
6336
|
(label2, itemValue) => {
|
|
6305
6337
|
if (!isControlled) {
|
|
6306
6338
|
setUncontrolledLabel(label2);
|
|
@@ -6310,7 +6342,7 @@ var SelectRoot = (props) => {
|
|
|
6310
6342
|
},
|
|
6311
6343
|
[isControlled, onChange]
|
|
6312
6344
|
);
|
|
6313
|
-
const ctxValue =
|
|
6345
|
+
const ctxValue = React32.useMemo(
|
|
6314
6346
|
() => ({
|
|
6315
6347
|
isOpen,
|
|
6316
6348
|
mounted,
|
|
@@ -6389,7 +6421,7 @@ var SelectRoot = (props) => {
|
|
|
6389
6421
|
]
|
|
6390
6422
|
}
|
|
6391
6423
|
),
|
|
6392
|
-
mounted && /* @__PURE__ */ jsx337(Portal_default, { children: /* @__PURE__ */ jsxs216(
|
|
6424
|
+
mounted && /* @__PURE__ */ jsx337(Portal_default, { container: host, children: /* @__PURE__ */ jsxs216(
|
|
6393
6425
|
"div",
|
|
6394
6426
|
{
|
|
6395
6427
|
className: clsx_default("lib-xplat-select-content", size, stateClass),
|
|
@@ -6555,7 +6587,7 @@ Steps.displayName = "Steps";
|
|
|
6555
6587
|
var Steps_default = Steps;
|
|
6556
6588
|
|
|
6557
6589
|
// src/components/Swiper/Swiper.tsx
|
|
6558
|
-
import
|
|
6590
|
+
import React33 from "react";
|
|
6559
6591
|
import { jsx as jsx342, jsxs as jsxs220 } from "react/jsx-runtime";
|
|
6560
6592
|
var Swiper = (props) => {
|
|
6561
6593
|
const {
|
|
@@ -6580,26 +6612,26 @@ var Swiper = (props) => {
|
|
|
6580
6612
|
const maxIndex = Math.max(0, totalSlides - viewItemCount);
|
|
6581
6613
|
const useLoop = loop && canSlide;
|
|
6582
6614
|
const cloneCount = useLoop ? totalSlides : 0;
|
|
6583
|
-
const extendedItems =
|
|
6615
|
+
const extendedItems = React33.useMemo(() => {
|
|
6584
6616
|
if (!useLoop) return items;
|
|
6585
6617
|
return [...items, ...items, ...items];
|
|
6586
6618
|
}, [items, useLoop]);
|
|
6587
6619
|
const initialIdx = Math.max(0, Math.min(indexProp ?? 0, maxIndex));
|
|
6588
|
-
const [innerIndex, setInnerIndex] =
|
|
6620
|
+
const [innerIndex, setInnerIndex] = React33.useState(
|
|
6589
6621
|
useLoop ? cloneCount + initialIdx : initialIdx
|
|
6590
6622
|
);
|
|
6591
|
-
const [isDragging, setIsDragging] =
|
|
6592
|
-
const [dragOffset, setDragOffset] =
|
|
6593
|
-
const [animated, setAnimated] =
|
|
6594
|
-
const [containerWidth, setContainerWidth] =
|
|
6595
|
-
const containerRef =
|
|
6596
|
-
const startXRef =
|
|
6597
|
-
const startTimeRef =
|
|
6598
|
-
const autoplayTimerRef =
|
|
6599
|
-
const resumeTimeoutRef =
|
|
6600
|
-
const [paused, setPaused] =
|
|
6601
|
-
const initializedRef =
|
|
6602
|
-
|
|
6623
|
+
const [isDragging, setIsDragging] = React33.useState(false);
|
|
6624
|
+
const [dragOffset, setDragOffset] = React33.useState(0);
|
|
6625
|
+
const [animated, setAnimated] = React33.useState(false);
|
|
6626
|
+
const [containerWidth, setContainerWidth] = React33.useState(0);
|
|
6627
|
+
const containerRef = React33.useRef(null);
|
|
6628
|
+
const startXRef = React33.useRef(0);
|
|
6629
|
+
const startTimeRef = React33.useRef(0);
|
|
6630
|
+
const autoplayTimerRef = React33.useRef(null);
|
|
6631
|
+
const resumeTimeoutRef = React33.useRef(null);
|
|
6632
|
+
const [paused, setPaused] = React33.useState(false);
|
|
6633
|
+
const initializedRef = React33.useRef(false);
|
|
6634
|
+
React33.useEffect(() => {
|
|
6603
6635
|
const el = containerRef.current;
|
|
6604
6636
|
if (!el) return;
|
|
6605
6637
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -6622,7 +6654,7 @@ var Swiper = (props) => {
|
|
|
6622
6654
|
return ((inner - cloneCount) % totalSlides + totalSlides) % totalSlides;
|
|
6623
6655
|
};
|
|
6624
6656
|
const realIndex = getRealIndex(innerIndex);
|
|
6625
|
-
const moveToInner =
|
|
6657
|
+
const moveToInner = React33.useCallback(
|
|
6626
6658
|
(idx, withAnim = true) => {
|
|
6627
6659
|
if (!useLoop) {
|
|
6628
6660
|
setAnimated(withAnim);
|
|
@@ -6650,7 +6682,7 @@ var Swiper = (props) => {
|
|
|
6650
6682
|
},
|
|
6651
6683
|
[useLoop, cloneCount, totalSlides]
|
|
6652
6684
|
);
|
|
6653
|
-
const handleTransitionEnd =
|
|
6685
|
+
const handleTransitionEnd = React33.useCallback(() => {
|
|
6654
6686
|
if (!useLoop) return;
|
|
6655
6687
|
const real = getRealIndex(innerIndex);
|
|
6656
6688
|
const canonical = cloneCount + real;
|
|
@@ -6660,7 +6692,7 @@ var Swiper = (props) => {
|
|
|
6660
6692
|
}
|
|
6661
6693
|
onChange?.(Math.min(real, maxIndex));
|
|
6662
6694
|
}, [useLoop, innerIndex, cloneCount, totalSlides, maxIndex, onChange]);
|
|
6663
|
-
const slideTo =
|
|
6695
|
+
const slideTo = React33.useCallback(
|
|
6664
6696
|
(logicalIndex) => {
|
|
6665
6697
|
if (!canSlide) return;
|
|
6666
6698
|
const clamped = useLoop ? logicalIndex : Math.max(0, Math.min(logicalIndex, maxIndex));
|
|
@@ -6670,7 +6702,7 @@ var Swiper = (props) => {
|
|
|
6670
6702
|
},
|
|
6671
6703
|
[canSlide, useLoop, cloneCount, maxIndex, onChange, moveToInner]
|
|
6672
6704
|
);
|
|
6673
|
-
const slideNext =
|
|
6705
|
+
const slideNext = React33.useCallback(() => {
|
|
6674
6706
|
if (!canSlide) return;
|
|
6675
6707
|
const nextInner = innerIndex + slideBy;
|
|
6676
6708
|
if (useLoop) {
|
|
@@ -6679,7 +6711,7 @@ var Swiper = (props) => {
|
|
|
6679
6711
|
moveToInner(Math.min(nextInner, maxIndex), true);
|
|
6680
6712
|
}
|
|
6681
6713
|
}, [canSlide, useLoop, innerIndex, slideBy, maxIndex, moveToInner]);
|
|
6682
|
-
const slidePrev =
|
|
6714
|
+
const slidePrev = React33.useCallback(() => {
|
|
6683
6715
|
if (!canSlide) return;
|
|
6684
6716
|
const prevInner = innerIndex - slideBy;
|
|
6685
6717
|
if (useLoop) {
|
|
@@ -6688,7 +6720,7 @@ var Swiper = (props) => {
|
|
|
6688
6720
|
moveToInner(Math.max(prevInner, 0), true);
|
|
6689
6721
|
}
|
|
6690
6722
|
}, [canSlide, useLoop, innerIndex, slideBy, moveToInner]);
|
|
6691
|
-
|
|
6723
|
+
React33.useEffect(() => {
|
|
6692
6724
|
if (indexProp === void 0) return;
|
|
6693
6725
|
const clamped = Math.max(0, Math.min(indexProp, maxIndex));
|
|
6694
6726
|
const target = useLoop ? cloneCount + clamped : clamped;
|
|
@@ -6696,12 +6728,12 @@ var Swiper = (props) => {
|
|
|
6696
6728
|
moveToInner(target, true);
|
|
6697
6729
|
}
|
|
6698
6730
|
}, [indexProp]);
|
|
6699
|
-
|
|
6731
|
+
React33.useImperativeHandle(swiperRef, () => ({
|
|
6700
6732
|
slidePrev,
|
|
6701
6733
|
slideNext,
|
|
6702
6734
|
slideTo
|
|
6703
6735
|
}));
|
|
6704
|
-
|
|
6736
|
+
React33.useEffect(() => {
|
|
6705
6737
|
if (!auto || !canSlide || paused) return;
|
|
6706
6738
|
autoplayTimerRef.current = setInterval(slideNext, autoplayDelay);
|
|
6707
6739
|
return () => {
|
|
@@ -6727,7 +6759,7 @@ var Swiper = (props) => {
|
|
|
6727
6759
|
resumeTimeoutRef.current = null;
|
|
6728
6760
|
}, pauseOnInteraction);
|
|
6729
6761
|
};
|
|
6730
|
-
|
|
6762
|
+
React33.useEffect(() => {
|
|
6731
6763
|
return () => {
|
|
6732
6764
|
if (resumeTimeoutRef.current) clearTimeout(resumeTimeoutRef.current);
|
|
6733
6765
|
};
|
|
@@ -6745,7 +6777,7 @@ var Swiper = (props) => {
|
|
|
6745
6777
|
startXRef.current = getClientX(e);
|
|
6746
6778
|
startTimeRef.current = Date.now();
|
|
6747
6779
|
};
|
|
6748
|
-
|
|
6780
|
+
React33.useEffect(() => {
|
|
6749
6781
|
if (!isDragging) return;
|
|
6750
6782
|
const handleMove = (e) => {
|
|
6751
6783
|
setDragOffset(getClientX(e) - startXRef.current);
|
|
@@ -6784,7 +6816,7 @@ var Swiper = (props) => {
|
|
|
6784
6816
|
}, [isDragging, dragOffset, innerIndex, useLoop, maxIndex, slideStep, moveToInner]);
|
|
6785
6817
|
const slideWidthPercent = 100 / viewItemCount;
|
|
6786
6818
|
const gapAdjust = spaceBetween * (viewItemCount - 1) / viewItemCount;
|
|
6787
|
-
const slideElements =
|
|
6819
|
+
const slideElements = React33.useMemo(
|
|
6788
6820
|
() => extendedItems.map((item, idx) => /* @__PURE__ */ jsx342(
|
|
6789
6821
|
"div",
|
|
6790
6822
|
{
|
|
@@ -6858,7 +6890,7 @@ Swiper.displayName = "Swiper";
|
|
|
6858
6890
|
var Swiper_default = Swiper;
|
|
6859
6891
|
|
|
6860
6892
|
// src/components/Switch/Switch.tsx
|
|
6861
|
-
import
|
|
6893
|
+
import React34 from "react";
|
|
6862
6894
|
import { jsx as jsx343 } from "react/jsx-runtime";
|
|
6863
6895
|
var KNOB_TRANSITION_MS = 250;
|
|
6864
6896
|
var Switch = (props) => {
|
|
@@ -6872,11 +6904,11 @@ var Switch = (props) => {
|
|
|
6872
6904
|
label,
|
|
6873
6905
|
required
|
|
6874
6906
|
} = props;
|
|
6875
|
-
const fieldId =
|
|
6907
|
+
const fieldId = React34.useId();
|
|
6876
6908
|
const statusType = normalizeStatus(type);
|
|
6877
|
-
const [isAnimating, setIsAnimating] =
|
|
6878
|
-
const timeoutRef =
|
|
6879
|
-
|
|
6909
|
+
const [isAnimating, setIsAnimating] = React34.useState(false);
|
|
6910
|
+
const timeoutRef = React34.useRef(null);
|
|
6911
|
+
React34.useEffect(() => {
|
|
6880
6912
|
return () => {
|
|
6881
6913
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6882
6914
|
};
|
|
@@ -6915,10 +6947,10 @@ Switch.displayName = "Switch";
|
|
|
6915
6947
|
var Switch_default = Switch;
|
|
6916
6948
|
|
|
6917
6949
|
// src/components/Table/TableContext.tsx
|
|
6918
|
-
import
|
|
6919
|
-
var TableContext =
|
|
6950
|
+
import React35 from "react";
|
|
6951
|
+
var TableContext = React35.createContext(null);
|
|
6920
6952
|
var useTableContext = () => {
|
|
6921
|
-
const ctx =
|
|
6953
|
+
const ctx = React35.useContext(TableContext);
|
|
6922
6954
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
6923
6955
|
return ctx;
|
|
6924
6956
|
};
|
|
@@ -6935,18 +6967,25 @@ var Table = (props) => {
|
|
|
6935
6967
|
headerSticky = false,
|
|
6936
6968
|
stickyShadow = true
|
|
6937
6969
|
} = props;
|
|
6938
|
-
return /* @__PURE__ */ jsx344(
|
|
6939
|
-
|
|
6970
|
+
return /* @__PURE__ */ jsx344(
|
|
6971
|
+
"div",
|
|
6940
6972
|
{
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6973
|
+
className: `lib-xplat-table-wrapper ${size}`,
|
|
6974
|
+
"data-xplat-overlay-escape": "",
|
|
6975
|
+
children: /* @__PURE__ */ jsx344(
|
|
6976
|
+
TableContext_default.Provider,
|
|
6977
|
+
{
|
|
6978
|
+
value: {
|
|
6979
|
+
rowBorderUse,
|
|
6980
|
+
colBorderUse,
|
|
6981
|
+
headerSticky,
|
|
6982
|
+
stickyShadow
|
|
6983
|
+
},
|
|
6984
|
+
children: /* @__PURE__ */ jsx344("table", { className: "lib-xplat-table", children })
|
|
6985
|
+
}
|
|
6986
|
+
)
|
|
6948
6987
|
}
|
|
6949
|
-
)
|
|
6988
|
+
);
|
|
6950
6989
|
};
|
|
6951
6990
|
Table.displayName = "Table";
|
|
6952
6991
|
var Table_default = Table;
|
|
@@ -6961,24 +7000,24 @@ TableBody.displayName = "TableBody";
|
|
|
6961
7000
|
var TableBody_default = TableBody;
|
|
6962
7001
|
|
|
6963
7002
|
// src/components/Table/TableCell.tsx
|
|
6964
|
-
import
|
|
7003
|
+
import React38 from "react";
|
|
6965
7004
|
|
|
6966
7005
|
// src/components/Table/TableHeadContext.tsx
|
|
6967
|
-
import
|
|
6968
|
-
var TableHeadContext =
|
|
7006
|
+
import React36 from "react";
|
|
7007
|
+
var TableHeadContext = React36.createContext(
|
|
6969
7008
|
null
|
|
6970
7009
|
);
|
|
6971
7010
|
var useTableHeadContext = () => {
|
|
6972
|
-
const ctx =
|
|
7011
|
+
const ctx = React36.useContext(TableHeadContext);
|
|
6973
7012
|
return ctx;
|
|
6974
7013
|
};
|
|
6975
7014
|
var TableHeadContext_default = TableHeadContext;
|
|
6976
7015
|
|
|
6977
7016
|
// src/components/Table/TableRowContext.tsx
|
|
6978
|
-
import
|
|
6979
|
-
var TableRowContext =
|
|
7017
|
+
import React37 from "react";
|
|
7018
|
+
var TableRowContext = React37.createContext(null);
|
|
6980
7019
|
var useTableRowContext = () => {
|
|
6981
|
-
const ctx =
|
|
7020
|
+
const ctx = React37.useContext(TableRowContext);
|
|
6982
7021
|
if (!ctx) throw new Error("Table components must be used inside <Table>");
|
|
6983
7022
|
return ctx;
|
|
6984
7023
|
};
|
|
@@ -6986,7 +7025,7 @@ var TableRowContext_default = TableRowContext;
|
|
|
6986
7025
|
|
|
6987
7026
|
// src/components/Table/TableCell.tsx
|
|
6988
7027
|
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
6989
|
-
var TableCell =
|
|
7028
|
+
var TableCell = React38.memo((props) => {
|
|
6990
7029
|
const {
|
|
6991
7030
|
children,
|
|
6992
7031
|
align = "center",
|
|
@@ -7000,9 +7039,9 @@ var TableCell = React37.memo((props) => {
|
|
|
7000
7039
|
const { registerStickyCell, stickyCells } = useTableRowContext();
|
|
7001
7040
|
const { stickyShadow } = useTableContext();
|
|
7002
7041
|
const headContext = useTableHeadContext();
|
|
7003
|
-
const [left, setLeft] =
|
|
7004
|
-
const cellRef =
|
|
7005
|
-
const calculateLeft =
|
|
7042
|
+
const [left, setLeft] = React38.useState(0);
|
|
7043
|
+
const cellRef = React38.useRef(null);
|
|
7044
|
+
const calculateLeft = React38.useCallback(() => {
|
|
7006
7045
|
if (!cellRef.current) return 0;
|
|
7007
7046
|
let totalLeft = 0;
|
|
7008
7047
|
for (const ref of stickyCells) {
|
|
@@ -7011,7 +7050,7 @@ var TableCell = React37.memo((props) => {
|
|
|
7011
7050
|
}
|
|
7012
7051
|
return totalLeft;
|
|
7013
7052
|
}, [stickyCells]);
|
|
7014
|
-
|
|
7053
|
+
React38.useEffect(() => {
|
|
7015
7054
|
if (!isSticky || !cellRef.current) return;
|
|
7016
7055
|
registerStickyCell(cellRef);
|
|
7017
7056
|
setLeft(calculateLeft());
|
|
@@ -7069,9 +7108,9 @@ TableHead.displayName = "TableHead";
|
|
|
7069
7108
|
var TableHead_default = TableHead;
|
|
7070
7109
|
|
|
7071
7110
|
// src/components/Table/TableRow.tsx
|
|
7072
|
-
import
|
|
7111
|
+
import React39 from "react";
|
|
7073
7112
|
import { jsx as jsx348 } from "react/jsx-runtime";
|
|
7074
|
-
var TableRow =
|
|
7113
|
+
var TableRow = React39.memo((props) => {
|
|
7075
7114
|
const {
|
|
7076
7115
|
children,
|
|
7077
7116
|
type = "secondary",
|
|
@@ -7080,7 +7119,7 @@ var TableRow = React38.memo((props) => {
|
|
|
7080
7119
|
onClick
|
|
7081
7120
|
} = props;
|
|
7082
7121
|
const { rowBorderUse } = useTableContext();
|
|
7083
|
-
const [stickyCells, setStickyCells] =
|
|
7122
|
+
const [stickyCells, setStickyCells] = React39.useState([]);
|
|
7084
7123
|
const registerStickyCell = (ref) => {
|
|
7085
7124
|
setStickyCells((prev) => {
|
|
7086
7125
|
if (prev.includes(ref)) return prev;
|
|
@@ -7144,9 +7183,9 @@ Tag.displayName = "Tag";
|
|
|
7144
7183
|
var Tag_default = Tag;
|
|
7145
7184
|
|
|
7146
7185
|
// src/components/TextArea/TextArea.tsx
|
|
7147
|
-
import
|
|
7186
|
+
import React40 from "react";
|
|
7148
7187
|
import { jsx as jsx350 } from "react/jsx-runtime";
|
|
7149
|
-
var TextArea =
|
|
7188
|
+
var TextArea = React40.forwardRef(
|
|
7150
7189
|
(props, ref) => {
|
|
7151
7190
|
const {
|
|
7152
7191
|
className,
|
|
@@ -7159,7 +7198,7 @@ var TextArea = React39.forwardRef(
|
|
|
7159
7198
|
disabled,
|
|
7160
7199
|
...textareaProps
|
|
7161
7200
|
} = props;
|
|
7162
|
-
const autoId =
|
|
7201
|
+
const autoId = React40.useId();
|
|
7163
7202
|
const fieldId = props.id ?? autoId;
|
|
7164
7203
|
const control = /* @__PURE__ */ jsx350("div", { className: clsx_default("lib-xplat-textarea-wrap", className), children: /* @__PURE__ */ jsx350(
|
|
7165
7204
|
"textarea",
|
|
@@ -7181,7 +7220,7 @@ TextArea.displayName = "TextArea";
|
|
|
7181
7220
|
var TextArea_default = TextArea;
|
|
7182
7221
|
|
|
7183
7222
|
// src/components/TimePicker/TimePicker.tsx
|
|
7184
|
-
import
|
|
7223
|
+
import React41 from "react";
|
|
7185
7224
|
import { jsx as jsx351, jsxs as jsxs222 } from "react/jsx-runtime";
|
|
7186
7225
|
var ANIMATION_DURATION_MS4 = 200;
|
|
7187
7226
|
var toMinutes = (hhmm) => {
|
|
@@ -7219,13 +7258,13 @@ var TimePicker = (props) => {
|
|
|
7219
7258
|
required,
|
|
7220
7259
|
validations
|
|
7221
7260
|
} = props;
|
|
7222
|
-
const fieldId =
|
|
7223
|
-
const triggerRef =
|
|
7224
|
-
const contentRef =
|
|
7225
|
-
const [isOpen, setOpen] =
|
|
7226
|
-
const [mounted, setMounted] =
|
|
7227
|
-
const [visible, setVisible] =
|
|
7228
|
-
const options =
|
|
7261
|
+
const fieldId = React41.useId();
|
|
7262
|
+
const triggerRef = React41.useRef(null);
|
|
7263
|
+
const contentRef = React41.useRef(null);
|
|
7264
|
+
const [isOpen, setOpen] = React41.useState(false);
|
|
7265
|
+
const [mounted, setMounted] = React41.useState(false);
|
|
7266
|
+
const [visible, setVisible] = React41.useState(false);
|
|
7267
|
+
const options = React41.useMemo(() => {
|
|
7229
7268
|
const safeStep = step > 0 && step <= 720 ? step : 30;
|
|
7230
7269
|
const lo = toMinutes(min) ?? 0;
|
|
7231
7270
|
const hi = toMinutes(max) ?? 24 * 60 - 1;
|
|
@@ -7233,18 +7272,19 @@ var TimePicker = (props) => {
|
|
|
7233
7272
|
for (let t = lo; t <= hi; t += safeStep) out.push(toHHmm(t));
|
|
7234
7273
|
return out;
|
|
7235
7274
|
}, [step, min, max]);
|
|
7236
|
-
const close =
|
|
7275
|
+
const close = React41.useCallback(() => setOpen(false), []);
|
|
7237
7276
|
useClickOutside_default([triggerRef, contentRef], close, isOpen);
|
|
7238
7277
|
useCloseWhenFocusHidden(isOpen, triggerRef, contentRef, close);
|
|
7239
7278
|
useEscapeKey(isOpen, () => {
|
|
7240
7279
|
close();
|
|
7241
7280
|
triggerRef.current?.focus({ preventScroll: true });
|
|
7242
7281
|
});
|
|
7282
|
+
const host = useOverlayHost_default(triggerRef, mounted);
|
|
7243
7283
|
useAutoPosition_default(triggerRef, contentRef, mounted);
|
|
7244
|
-
|
|
7284
|
+
React41.useEffect(() => {
|
|
7245
7285
|
if (disabled && isOpen) setOpen(false);
|
|
7246
7286
|
}, [disabled, isOpen]);
|
|
7247
|
-
|
|
7287
|
+
React41.useEffect(() => {
|
|
7248
7288
|
if (isOpen) {
|
|
7249
7289
|
setMounted(true);
|
|
7250
7290
|
const t2 = setTimeout(() => setVisible(true), 1);
|
|
@@ -7282,7 +7322,7 @@ var TimePicker = (props) => {
|
|
|
7282
7322
|
children: /* @__PURE__ */ jsx351("span", { className: clsx_default("time-picker-value", !value && "placeholder"), children: value ? display(value, use12Hours) : placeholder })
|
|
7283
7323
|
}
|
|
7284
7324
|
),
|
|
7285
|
-
mounted && /* @__PURE__ */ jsx351(Portal_default, { children: /* @__PURE__ */ jsx351(
|
|
7325
|
+
mounted && /* @__PURE__ */ jsx351(Portal_default, { container: host, children: /* @__PURE__ */ jsx351(
|
|
7286
7326
|
"div",
|
|
7287
7327
|
{
|
|
7288
7328
|
ref: contentRef,
|
|
@@ -7316,20 +7356,20 @@ TimePicker.displayName = "TimePicker";
|
|
|
7316
7356
|
var TimePicker_default = TimePicker;
|
|
7317
7357
|
|
|
7318
7358
|
// src/components/Toast/Toast.tsx
|
|
7319
|
-
import
|
|
7359
|
+
import React42 from "react";
|
|
7320
7360
|
import { createPortal as createPortal3 } from "react-dom";
|
|
7321
7361
|
import { jsx as jsx352, jsxs as jsxs223 } from "react/jsx-runtime";
|
|
7322
|
-
var ToastContext =
|
|
7362
|
+
var ToastContext = React42.createContext(null);
|
|
7323
7363
|
var useToast = () => {
|
|
7324
|
-
const ctx =
|
|
7364
|
+
const ctx = React42.useContext(ToastContext);
|
|
7325
7365
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
7326
7366
|
return ctx;
|
|
7327
7367
|
};
|
|
7328
7368
|
var EXIT_DURATION = 300;
|
|
7329
7369
|
var ToastItemComponent = ({ item, isExiting, onClose }) => {
|
|
7330
|
-
const ref =
|
|
7331
|
-
const [height, setHeight] =
|
|
7332
|
-
|
|
7370
|
+
const ref = React42.useRef(null);
|
|
7371
|
+
const [height, setHeight] = React42.useState(void 0);
|
|
7372
|
+
React42.useEffect(() => {
|
|
7333
7373
|
if (ref.current && !isExiting) {
|
|
7334
7374
|
setHeight(ref.current.offsetHeight);
|
|
7335
7375
|
}
|
|
@@ -7361,13 +7401,13 @@ var ToastProvider = ({
|
|
|
7361
7401
|
children,
|
|
7362
7402
|
position = "top-right"
|
|
7363
7403
|
}) => {
|
|
7364
|
-
const [toasts, setToasts] =
|
|
7365
|
-
const [removing, setRemoving] =
|
|
7366
|
-
const [mounted, setMounted] =
|
|
7367
|
-
|
|
7404
|
+
const [toasts, setToasts] = React42.useState([]);
|
|
7405
|
+
const [removing, setRemoving] = React42.useState(/* @__PURE__ */ new Set());
|
|
7406
|
+
const [mounted, setMounted] = React42.useState(false);
|
|
7407
|
+
React42.useEffect(() => {
|
|
7368
7408
|
setMounted(true);
|
|
7369
7409
|
}, []);
|
|
7370
|
-
const remove =
|
|
7410
|
+
const remove = React42.useCallback((id) => {
|
|
7371
7411
|
setRemoving((prev) => new Set(prev).add(id));
|
|
7372
7412
|
setTimeout(() => {
|
|
7373
7413
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
@@ -7378,7 +7418,7 @@ var ToastProvider = ({
|
|
|
7378
7418
|
});
|
|
7379
7419
|
}, EXIT_DURATION);
|
|
7380
7420
|
}, []);
|
|
7381
|
-
const toast =
|
|
7421
|
+
const toast = React42.useCallback(
|
|
7382
7422
|
(type, message, duration = 3e3) => {
|
|
7383
7423
|
const id = `${Date.now()}-${Math.random()}`;
|
|
7384
7424
|
setToasts((prev) => [...prev, { id, type, message }]);
|
|
@@ -7431,7 +7471,7 @@ ToggleChip.displayName = "ToggleChip";
|
|
|
7431
7471
|
var ToggleChip_default = ToggleChip;
|
|
7432
7472
|
|
|
7433
7473
|
// src/components/Tooltip/Tooltip.tsx
|
|
7434
|
-
import
|
|
7474
|
+
import React43 from "react";
|
|
7435
7475
|
import { Fragment as Fragment6, jsx as jsx354, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
7436
7476
|
var OFFSET = 12;
|
|
7437
7477
|
var GAP = 8;
|
|
@@ -7447,14 +7487,14 @@ var Tooltip = (props) => {
|
|
|
7447
7487
|
disabled = false
|
|
7448
7488
|
} = props;
|
|
7449
7489
|
const shape = variant ?? type ?? "dark";
|
|
7450
|
-
const triggerRef =
|
|
7451
|
-
const tooltipRef =
|
|
7452
|
-
const [visible, setVisible] =
|
|
7453
|
-
const [pos, setPos] =
|
|
7454
|
-
const delayTimer =
|
|
7455
|
-
const rafRef =
|
|
7456
|
-
const cursor =
|
|
7457
|
-
const clamp =
|
|
7490
|
+
const triggerRef = React43.useRef(null);
|
|
7491
|
+
const tooltipRef = React43.useRef(null);
|
|
7492
|
+
const [visible, setVisible] = React43.useState(false);
|
|
7493
|
+
const [pos, setPos] = React43.useState({ left: 0, top: 0 });
|
|
7494
|
+
const delayTimer = React43.useRef(0);
|
|
7495
|
+
const rafRef = React43.useRef(0);
|
|
7496
|
+
const cursor = React43.useRef(null);
|
|
7497
|
+
const clamp = React43.useCallback((left, top, w, h) => {
|
|
7458
7498
|
const vw = window.innerWidth;
|
|
7459
7499
|
const vh = window.innerHeight;
|
|
7460
7500
|
return {
|
|
@@ -7462,7 +7502,7 @@ var Tooltip = (props) => {
|
|
|
7462
7502
|
top: Math.min(Math.max(GAP, top), Math.max(GAP, vh - h - GAP))
|
|
7463
7503
|
};
|
|
7464
7504
|
}, []);
|
|
7465
|
-
const placeAtCursor =
|
|
7505
|
+
const placeAtCursor = React43.useCallback((x, y) => {
|
|
7466
7506
|
const el = tooltipRef.current;
|
|
7467
7507
|
if (!el) return;
|
|
7468
7508
|
const w = el.offsetWidth;
|
|
@@ -7473,7 +7513,7 @@ var Tooltip = (props) => {
|
|
|
7473
7513
|
if (top < GAP) top = y + OFFSET;
|
|
7474
7514
|
setPos(clamp(left, top, w, h));
|
|
7475
7515
|
}, [clamp]);
|
|
7476
|
-
const placeAtTrigger =
|
|
7516
|
+
const placeAtTrigger = React43.useCallback(() => {
|
|
7477
7517
|
const el = tooltipRef.current;
|
|
7478
7518
|
const trigger = triggerRef.current;
|
|
7479
7519
|
if (!el || !trigger) return;
|
|
@@ -7485,19 +7525,19 @@ var Tooltip = (props) => {
|
|
|
7485
7525
|
const left = rect.left + rect.width / 2 - w / 2;
|
|
7486
7526
|
setPos(clamp(left, top, w, h));
|
|
7487
7527
|
}, [clamp]);
|
|
7488
|
-
const reposition =
|
|
7528
|
+
const reposition = React43.useCallback(() => {
|
|
7489
7529
|
if (follow && cursor.current) {
|
|
7490
7530
|
placeAtCursor(cursor.current.x, cursor.current.y);
|
|
7491
7531
|
} else {
|
|
7492
7532
|
placeAtTrigger();
|
|
7493
7533
|
}
|
|
7494
7534
|
}, [follow, placeAtCursor, placeAtTrigger]);
|
|
7495
|
-
const handleMouseEnter =
|
|
7535
|
+
const handleMouseEnter = React43.useCallback((e) => {
|
|
7496
7536
|
if (disabled) return;
|
|
7497
7537
|
cursor.current = { x: e.clientX, y: e.clientY };
|
|
7498
7538
|
delayTimer.current = window.setTimeout(() => setVisible(true), SHOW_DELAY);
|
|
7499
7539
|
}, [disabled]);
|
|
7500
|
-
const handleMouseMove =
|
|
7540
|
+
const handleMouseMove = React43.useCallback((e) => {
|
|
7501
7541
|
cursor.current = { x: e.clientX, y: e.clientY };
|
|
7502
7542
|
if (!visible || !follow) return;
|
|
7503
7543
|
cancelAnimationFrame(rafRef.current);
|
|
@@ -7505,25 +7545,25 @@ var Tooltip = (props) => {
|
|
|
7505
7545
|
if (cursor.current) placeAtCursor(cursor.current.x, cursor.current.y);
|
|
7506
7546
|
});
|
|
7507
7547
|
}, [visible, follow, placeAtCursor]);
|
|
7508
|
-
const close =
|
|
7548
|
+
const close = React43.useCallback(() => {
|
|
7509
7549
|
window.clearTimeout(delayTimer.current);
|
|
7510
7550
|
cancelAnimationFrame(rafRef.current);
|
|
7511
7551
|
setVisible(false);
|
|
7512
7552
|
}, []);
|
|
7513
|
-
const handleMouseLeave =
|
|
7553
|
+
const handleMouseLeave = React43.useCallback(() => {
|
|
7514
7554
|
cursor.current = null;
|
|
7515
7555
|
close();
|
|
7516
7556
|
}, [close]);
|
|
7517
|
-
const handleFocus =
|
|
7557
|
+
const handleFocus = React43.useCallback(() => {
|
|
7518
7558
|
if (disabled) return;
|
|
7519
7559
|
cursor.current = null;
|
|
7520
7560
|
setVisible(true);
|
|
7521
7561
|
}, [disabled]);
|
|
7522
|
-
|
|
7562
|
+
React43.useLayoutEffect(() => {
|
|
7523
7563
|
if (!visible) return;
|
|
7524
7564
|
reposition();
|
|
7525
7565
|
}, [visible, reposition]);
|
|
7526
|
-
|
|
7566
|
+
React43.useEffect(() => {
|
|
7527
7567
|
if (!visible || follow) return;
|
|
7528
7568
|
const onChange = () => placeAtTrigger();
|
|
7529
7569
|
window.addEventListener("scroll", onChange, true);
|
|
@@ -7533,7 +7573,7 @@ var Tooltip = (props) => {
|
|
|
7533
7573
|
window.removeEventListener("resize", onChange);
|
|
7534
7574
|
};
|
|
7535
7575
|
}, [visible, follow, placeAtTrigger]);
|
|
7536
|
-
|
|
7576
|
+
React43.useEffect(() => () => {
|
|
7537
7577
|
window.clearTimeout(delayTimer.current);
|
|
7538
7578
|
cancelAnimationFrame(rafRef.current);
|
|
7539
7579
|
}, []);
|
|
@@ -7572,7 +7612,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
7572
7612
|
var Tooltip_default = Tooltip;
|
|
7573
7613
|
|
|
7574
7614
|
// src/components/Video/Video.tsx
|
|
7575
|
-
import
|
|
7615
|
+
import React44 from "react";
|
|
7576
7616
|
import { jsx as jsx355, jsxs as jsxs225 } from "react/jsx-runtime";
|
|
7577
7617
|
var PipIcon = () => /* @__PURE__ */ jsxs225("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
7578
7618
|
/* @__PURE__ */ jsx355("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
@@ -7584,7 +7624,7 @@ var formatTime = (sec) => {
|
|
|
7584
7624
|
const s = Math.floor(sec % 60);
|
|
7585
7625
|
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
7586
7626
|
};
|
|
7587
|
-
var Video =
|
|
7627
|
+
var Video = React44.forwardRef((props, ref) => {
|
|
7588
7628
|
const {
|
|
7589
7629
|
src,
|
|
7590
7630
|
poster,
|
|
@@ -7608,21 +7648,21 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
7608
7648
|
children,
|
|
7609
7649
|
...rest
|
|
7610
7650
|
} = props;
|
|
7611
|
-
const containerRef =
|
|
7612
|
-
const videoRef =
|
|
7613
|
-
const [isPlaying, setIsPlaying] =
|
|
7614
|
-
const [isLoaded, setIsLoaded] =
|
|
7615
|
-
const [currentTime, setCurrentTime] =
|
|
7616
|
-
const [duration, setDuration] =
|
|
7617
|
-
const [buffered, setBuffered] =
|
|
7618
|
-
const [volume, setVolume] =
|
|
7619
|
-
const [isMuted, setIsMuted] =
|
|
7620
|
-
const [isFullscreen, setIsFullscreen] =
|
|
7621
|
-
const [playbackRate, setPlaybackRate] =
|
|
7622
|
-
const [rateMenuOpen, setRateMenuOpen] =
|
|
7623
|
-
const [captionsOn, setCaptionsOn] =
|
|
7624
|
-
const [isPip, setIsPip] =
|
|
7625
|
-
const setRefs =
|
|
7651
|
+
const containerRef = React44.useRef(null);
|
|
7652
|
+
const videoRef = React44.useRef(null);
|
|
7653
|
+
const [isPlaying, setIsPlaying] = React44.useState(Boolean(autoPlay));
|
|
7654
|
+
const [isLoaded, setIsLoaded] = React44.useState(false);
|
|
7655
|
+
const [currentTime, setCurrentTime] = React44.useState(0);
|
|
7656
|
+
const [duration, setDuration] = React44.useState(0);
|
|
7657
|
+
const [buffered, setBuffered] = React44.useState(0);
|
|
7658
|
+
const [volume, setVolume] = React44.useState(1);
|
|
7659
|
+
const [isMuted, setIsMuted] = React44.useState(Boolean(muted));
|
|
7660
|
+
const [isFullscreen, setIsFullscreen] = React44.useState(false);
|
|
7661
|
+
const [playbackRate, setPlaybackRate] = React44.useState(1);
|
|
7662
|
+
const [rateMenuOpen, setRateMenuOpen] = React44.useState(false);
|
|
7663
|
+
const [captionsOn, setCaptionsOn] = React44.useState(false);
|
|
7664
|
+
const [isPip, setIsPip] = React44.useState(false);
|
|
7665
|
+
const setRefs = React44.useCallback(
|
|
7626
7666
|
(el) => {
|
|
7627
7667
|
videoRef.current = el;
|
|
7628
7668
|
if (typeof ref === "function") ref(el);
|
|
@@ -7630,14 +7670,14 @@ var Video = React43.forwardRef((props, ref) => {
|
|
|
7630
7670
|
},
|
|
7631
7671
|
[ref]
|
|
7632
7672
|
);
|
|
7633
|
-
|
|
7673
|
+
React44.useEffect(() => {
|
|
7634
7674
|
const onFsChange = () => {
|
|
7635
7675
|
setIsFullscreen(document.fullscreenElement === containerRef.current);
|
|
7636
7676
|
};
|
|
7637
7677
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
7638
7678
|
return () => document.removeEventListener("fullscreenchange", onFsChange);
|
|
7639
7679
|
}, []);
|
|
7640
|
-
|
|
7680
|
+
React44.useEffect(() => {
|
|
7641
7681
|
const v = videoRef.current;
|
|
7642
7682
|
if (!v) return;
|
|
7643
7683
|
const onEnter = () => setIsPip(true);
|