@wistia/ui 0.15.2-beta.f16ddbc2.511b369 → 0.15.2-beta.ff7c5558.c2b6c70
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 +13 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +13 -14
- package/dist/index.d.ts +13 -14
- package/dist/index.mjs +18 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.15.2-beta.
|
|
3
|
+
* @license @wistia/ui v0.15.2-beta.ff7c5558.c2b6c70
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2992,26 +2992,11 @@ var useForceUpdate = () => {
|
|
|
2992
2992
|
var import_react11 = require("react");
|
|
2993
2993
|
var useIsHovered = () => {
|
|
2994
2994
|
const [isHovered, setIsHovered] = (0, import_react11.useState)(false);
|
|
2995
|
-
const onFocus = (
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
const
|
|
3000
|
-
if (event.target !== event.currentTarget) return;
|
|
3001
|
-
setIsHovered(true);
|
|
3002
|
-
};
|
|
3003
|
-
const onMouseMove = (event) => {
|
|
3004
|
-
if (event.target !== event.currentTarget) return;
|
|
3005
|
-
setIsHovered(true);
|
|
3006
|
-
};
|
|
3007
|
-
const onBlur = (event) => {
|
|
3008
|
-
if (event.target !== event.currentTarget) return;
|
|
3009
|
-
setIsHovered(false);
|
|
3010
|
-
};
|
|
3011
|
-
const onMouseLeave = (event) => {
|
|
3012
|
-
if (event.target !== event.currentTarget) return;
|
|
3013
|
-
setIsHovered(false);
|
|
3014
|
-
};
|
|
2995
|
+
const onFocus = () => setIsHovered(true);
|
|
2996
|
+
const onMouseEnter = () => setIsHovered(true);
|
|
2997
|
+
const onMouseMove = () => setIsHovered(true);
|
|
2998
|
+
const onBlur = () => setIsHovered(false);
|
|
2999
|
+
const onMouseLeave = () => setIsHovered(false);
|
|
3015
3000
|
const hoverProps = {
|
|
3016
3001
|
onFocus,
|
|
3017
3002
|
onMouseEnter,
|
|
@@ -12845,12 +12830,14 @@ var Combobox2 = ({
|
|
|
12845
12830
|
onSearchValueChange,
|
|
12846
12831
|
displayValues = defaultDisplayValues,
|
|
12847
12832
|
children,
|
|
12833
|
+
flipPopover = true,
|
|
12848
12834
|
fullWidth = true
|
|
12849
12835
|
}) => {
|
|
12850
12836
|
const [isPending, startTransition] = (0, import_react54.useTransition)();
|
|
12851
12837
|
const [wrapperWidth, setWrapperWidth] = (0, import_react54.useState)("auto");
|
|
12852
12838
|
const comboboxWrapperRef = (0, import_react54.useRef)(null);
|
|
12853
12839
|
const options = (0, import_react54.useMemo)(() => extractOptions(children), [children]);
|
|
12840
|
+
const isMultiSelect = (0, import_type_guards37.isArray)(value);
|
|
12854
12841
|
(0, import_react54.useEffect)(() => {
|
|
12855
12842
|
const comboboxWrapper = comboboxWrapperRef.current;
|
|
12856
12843
|
if (comboboxWrapper) {
|
|
@@ -12893,7 +12880,7 @@ var Combobox2 = ({
|
|
|
12893
12880
|
ref: comboboxWrapperRef,
|
|
12894
12881
|
$fullWidth: fullWidth,
|
|
12895
12882
|
children: [
|
|
12896
|
-
displayValues(value, handleRemoveValue),
|
|
12883
|
+
isMultiSelect ? displayValues(value, handleRemoveValue) : null,
|
|
12897
12884
|
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
12898
12885
|
ComboboxInput,
|
|
12899
12886
|
{
|
|
@@ -12908,7 +12895,9 @@ var Combobox2 = ({
|
|
|
12908
12895
|
ComboboxPopover2,
|
|
12909
12896
|
{
|
|
12910
12897
|
"aria-busy": isPending,
|
|
12898
|
+
flip: flipPopover,
|
|
12911
12899
|
gutter: 8,
|
|
12900
|
+
onClose: () => onSearchValueChange(""),
|
|
12912
12901
|
sameWidth: false,
|
|
12913
12902
|
style: {
|
|
12914
12903
|
width: wrapperWidth
|
|
@@ -16513,7 +16502,7 @@ var Container10 = import_styled_components106.default.div`
|
|
|
16513
16502
|
flex: 1 1 auto;
|
|
16514
16503
|
`;
|
|
16515
16504
|
var ScrollContainer = import_styled_components106.default.div`
|
|
16516
|
-
overflow:
|
|
16505
|
+
overflow: auto;
|
|
16517
16506
|
height: 100%;
|
|
16518
16507
|
width: 100%;
|
|
16519
16508
|
`;
|
|
@@ -16553,7 +16542,7 @@ var ShadowAtRight = (0, import_styled_components106.default)(Shadow)`
|
|
|
16553
16542
|
width: 0;
|
|
16554
16543
|
`;
|
|
16555
16544
|
var ScrollArea = (0, import_react85.forwardRef)(
|
|
16556
|
-
({ children, onScroll, style,
|
|
16545
|
+
({ children, onScroll, style, ...props }, forwardedRef) => {
|
|
16557
16546
|
const scrollContainerRefInternal = (0, import_react85.useRef)(null);
|
|
16558
16547
|
const [shadowState, setShadowState] = (0, import_react85.useState)({
|
|
16559
16548
|
canScrollUp: false,
|
|
@@ -16594,7 +16583,6 @@ var ScrollArea = (0, import_react85.forwardRef)(
|
|
|
16594
16583
|
ScrollContainer,
|
|
16595
16584
|
{
|
|
16596
16585
|
ref: scrollContainerRef,
|
|
16597
|
-
$locked: locked,
|
|
16598
16586
|
onScroll: onScrollScrollContainer,
|
|
16599
16587
|
...props,
|
|
16600
16588
|
children
|