@wistia/ui 0.15.11-beta.f489c1c2.ebd328f → 0.15.12-beta.2844925e.bc89e3c
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 +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1634,6 +1634,10 @@ declare const Combobox: ({ placeholder, value, onChange, searchValue, onSearchVa
|
|
|
1634
1634
|
type ContextMenuProps = {
|
|
1635
1635
|
children: ReactNode;
|
|
1636
1636
|
onRequestClose?: () => void;
|
|
1637
|
+
/**
|
|
1638
|
+
* If the menu is compact
|
|
1639
|
+
*/
|
|
1640
|
+
compact?: boolean;
|
|
1637
1641
|
} & ({
|
|
1638
1642
|
position: {
|
|
1639
1643
|
x: number;
|
|
@@ -1652,7 +1656,7 @@ type ContextMenuProps = {
|
|
|
1652
1656
|
* 1. By providing a `triggerRef`, which will render the menu when the referenced element is right-clicked.
|
|
1653
1657
|
* 2. By providing a `position` prop, which will render the menu at the specified coordinates.
|
|
1654
1658
|
*/
|
|
1655
|
-
declare const ContextMenu: ({ position, triggerRef, children, side, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
1659
|
+
declare const ContextMenu: ({ position, triggerRef, children, side, onRequestClose, compact, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
1656
1660
|
|
|
1657
1661
|
type DataCardProps = ComponentPropsWithoutRef<'div'> & Partial<Pick<ButtonAsLinkProps, 'beforeAction' | 'disabled' | 'href' | 'onClick' | 'type'>> & {
|
|
1658
1662
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1634,6 +1634,10 @@ declare const Combobox: ({ placeholder, value, onChange, searchValue, onSearchVa
|
|
|
1634
1634
|
type ContextMenuProps = {
|
|
1635
1635
|
children: ReactNode;
|
|
1636
1636
|
onRequestClose?: () => void;
|
|
1637
|
+
/**
|
|
1638
|
+
* If the menu is compact
|
|
1639
|
+
*/
|
|
1640
|
+
compact?: boolean;
|
|
1637
1641
|
} & ({
|
|
1638
1642
|
position: {
|
|
1639
1643
|
x: number;
|
|
@@ -1652,7 +1656,7 @@ type ContextMenuProps = {
|
|
|
1652
1656
|
* 1. By providing a `triggerRef`, which will render the menu when the referenced element is right-clicked.
|
|
1653
1657
|
* 2. By providing a `position` prop, which will render the menu at the specified coordinates.
|
|
1654
1658
|
*/
|
|
1655
|
-
declare const ContextMenu: ({ position, triggerRef, children, side, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
1659
|
+
declare const ContextMenu: ({ position, triggerRef, children, side, onRequestClose, compact, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
1656
1660
|
|
|
1657
1661
|
type DataCardProps = ComponentPropsWithoutRef<'div'> & Partial<Pick<ButtonAsLinkProps, 'beforeAction' | 'disabled' | 'href' | 'onClick' | 'type'>> & {
|
|
1658
1662
|
/**
|
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.2844925e.bc89e3c
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -13516,7 +13516,8 @@ var ContextMenu = ({
|
|
|
13516
13516
|
triggerRef,
|
|
13517
13517
|
children,
|
|
13518
13518
|
side = "bottom",
|
|
13519
|
-
onRequestClose = () => null
|
|
13519
|
+
onRequestClose = () => null,
|
|
13520
|
+
compact = false
|
|
13520
13521
|
}) => {
|
|
13521
13522
|
const [isRightClicked, setIsRightClicked] = useState17(false);
|
|
13522
13523
|
const [menuPosition, setMenuPosition] = useState17(position ?? { x: 0, y: 0 });
|
|
@@ -13539,6 +13540,7 @@ var ContextMenu = ({
|
|
|
13539
13540
|
return isOpen ? /* @__PURE__ */ jsx267(
|
|
13540
13541
|
Menu,
|
|
13541
13542
|
{
|
|
13543
|
+
compact,
|
|
13542
13544
|
isOpen,
|
|
13543
13545
|
onOpenChange: (next) => {
|
|
13544
13546
|
setIsRightClicked(next);
|
|
@@ -14094,7 +14096,8 @@ var EditableHeading = ({
|
|
|
14094
14096
|
onBlur: handleFinishEditing,
|
|
14095
14097
|
onChange: (event) => setValue(event.target.value),
|
|
14096
14098
|
onFocus: (event) => {
|
|
14097
|
-
event.currentTarget.
|
|
14099
|
+
const { length } = event.currentTarget.value;
|
|
14100
|
+
event.currentTarget.setSelectionRange(length, length);
|
|
14098
14101
|
},
|
|
14099
14102
|
onKeyDown: handleKeyDown,
|
|
14100
14103
|
type: "multiline",
|
|
@@ -14337,9 +14340,9 @@ var EditableTextDisplay = makePolymorphic(
|
|
|
14337
14340
|
);
|
|
14338
14341
|
|
|
14339
14342
|
// src/components/EditableText/EditableTextInput.tsx
|
|
14340
|
-
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
14341
14343
|
import { useContext as useContext7, useEffect as useEffect17, useRef as useRef18 } from "react";
|
|
14342
14344
|
import styled65 from "styled-components";
|
|
14345
|
+
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
14343
14346
|
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
14344
14347
|
var StyledInput2 = styled65(Input)`
|
|
14345
14348
|
&& {
|
|
@@ -14441,7 +14444,8 @@ var EditableTextInput = (props) => {
|
|
|
14441
14444
|
onBlur: handleBlur2,
|
|
14442
14445
|
onChange: handleChange,
|
|
14443
14446
|
onFocus: (event) => {
|
|
14444
|
-
event.currentTarget.
|
|
14447
|
+
const { length } = event.currentTarget.value;
|
|
14448
|
+
event.currentTarget.setSelectionRange(length, length);
|
|
14445
14449
|
},
|
|
14446
14450
|
onKeyDown: handleKeyDown,
|
|
14447
14451
|
placeholder,
|