@wistia/ui 0.15.11-beta.f489c1c2.ebd328f → 0.15.12-beta.3ecc0076.d529776
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/index.cjs +16 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +16 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.15.
|
|
3
|
+
* @license @wistia/ui v0.15.12-beta.3ecc0076.d529776
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -12835,6 +12835,7 @@ var Combobox2 = ({
|
|
|
12835
12835
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
12836
12836
|
import { isNil as isNil15, isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
12837
12837
|
import { useEffect as useEffect16, useState as useState17 } from "react";
|
|
12838
|
+
import { createPortal } from "react-dom";
|
|
12838
12839
|
|
|
12839
12840
|
// src/components/Menu/Menu.tsx
|
|
12840
12841
|
import {
|
|
@@ -13536,7 +13537,10 @@ var ContextMenu = ({
|
|
|
13536
13537
|
return () => null;
|
|
13537
13538
|
}, [position, triggerRef]);
|
|
13538
13539
|
const isOpen = isNotNil24(position) || isRightClicked;
|
|
13539
|
-
|
|
13540
|
+
if (!isOpen) {
|
|
13541
|
+
return null;
|
|
13542
|
+
}
|
|
13543
|
+
const menu = /* @__PURE__ */ jsx267(
|
|
13540
13544
|
Menu,
|
|
13541
13545
|
{
|
|
13542
13546
|
isOpen,
|
|
@@ -13564,7 +13568,11 @@ var ContextMenu = ({
|
|
|
13564
13568
|
),
|
|
13565
13569
|
children
|
|
13566
13570
|
}
|
|
13567
|
-
)
|
|
13571
|
+
);
|
|
13572
|
+
if (isNotNil24(triggerRef)) {
|
|
13573
|
+
return createPortal(menu, document.body);
|
|
13574
|
+
}
|
|
13575
|
+
return menu;
|
|
13568
13576
|
};
|
|
13569
13577
|
|
|
13570
13578
|
// src/components/DataCards/DataCard.tsx
|
|
@@ -14094,7 +14102,8 @@ var EditableHeading = ({
|
|
|
14094
14102
|
onBlur: handleFinishEditing,
|
|
14095
14103
|
onChange: (event) => setValue(event.target.value),
|
|
14096
14104
|
onFocus: (event) => {
|
|
14097
|
-
event.currentTarget.
|
|
14105
|
+
const { length } = event.currentTarget.value;
|
|
14106
|
+
event.currentTarget.setSelectionRange(length, length);
|
|
14098
14107
|
},
|
|
14099
14108
|
onKeyDown: handleKeyDown,
|
|
14100
14109
|
type: "multiline",
|
|
@@ -14337,9 +14346,9 @@ var EditableTextDisplay = makePolymorphic(
|
|
|
14337
14346
|
);
|
|
14338
14347
|
|
|
14339
14348
|
// src/components/EditableText/EditableTextInput.tsx
|
|
14340
|
-
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
14341
14349
|
import { useContext as useContext7, useEffect as useEffect17, useRef as useRef18 } from "react";
|
|
14342
14350
|
import styled65 from "styled-components";
|
|
14351
|
+
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
14343
14352
|
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
14344
14353
|
var StyledInput2 = styled65(Input)`
|
|
14345
14354
|
&& {
|
|
@@ -14441,7 +14450,8 @@ var EditableTextInput = (props) => {
|
|
|
14441
14450
|
onBlur: handleBlur2,
|
|
14442
14451
|
onChange: handleChange,
|
|
14443
14452
|
onFocus: (event) => {
|
|
14444
|
-
event.currentTarget.
|
|
14453
|
+
const { length } = event.currentTarget.value;
|
|
14454
|
+
event.currentTarget.setSelectionRange(length, length);
|
|
14445
14455
|
},
|
|
14446
14456
|
onKeyDown: handleKeyDown,
|
|
14447
14457
|
placeholder,
|