@wistia/ui 0.21.7 → 0.21.8-beta.6afbcd24.72472cd
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.d.ts +100 -43
- package/dist/index.js +798 -700
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.21.
|
|
3
|
+
* @license @wistia/ui v0.21.8-beta.6afbcd24.72472cd
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
// src/providers/UIProvider/UIProvider.tsx
|
|
12
|
-
import {
|
|
12
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
13
13
|
import { createContext as createContext2, useContext } from "react";
|
|
14
14
|
|
|
15
15
|
// src/css/GlobalStyle.tsx
|
|
@@ -499,7 +499,7 @@ var UIProvider = ({ children }) => {
|
|
|
499
499
|
if (isNested) {
|
|
500
500
|
return /* @__PURE__ */ jsx3(Fragment, { children });
|
|
501
501
|
}
|
|
502
|
-
return /* @__PURE__ */ jsx3(UIProviderNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsx3(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(
|
|
502
|
+
return /* @__PURE__ */ jsx3(UIProviderNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsx3(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(Tooltip.Provider, { children: [
|
|
503
503
|
/* @__PURE__ */ jsx3(GlobalStyle, {}),
|
|
504
504
|
children,
|
|
505
505
|
/* @__PURE__ */ jsx3(ToastProvider, {})
|
|
@@ -8995,36 +8995,53 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8995
8995
|
ClickRegion.displayName = "ClickRegion_UI";
|
|
8996
8996
|
|
|
8997
8997
|
// src/components/Collapsible/Collapsible.tsx
|
|
8998
|
-
import {
|
|
8998
|
+
import { useState as useState12 } from "react";
|
|
8999
|
+
import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
|
|
8999
9000
|
import { isNotNil as isNotNil17 } from "@wistia/type-guards";
|
|
9000
|
-
import { styled as styled29 } from "styled-components";
|
|
9001
|
+
import { styled as styled29, css as css27 } from "styled-components";
|
|
9001
9002
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
9002
|
-
var StyledRoot = styled29(
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9003
|
+
var StyledRoot = styled29(BaseCollapsible.Root)`
|
|
9004
|
+
${({ $isOpen }) => !$isOpen && css27`
|
|
9005
|
+
[data-wui-collapsible-content] {
|
|
9006
|
+
display: -webkit-box;
|
|
9007
|
+
-webkit-box-orient: vertical;
|
|
9008
|
+
-webkit-line-clamp: var(--wui-collapsible-content-clamp-lines);
|
|
9009
|
+
overflow: hidden;
|
|
9010
|
+
}
|
|
9011
|
+
`}
|
|
9009
9012
|
`;
|
|
9010
9013
|
var Collapsible = ({
|
|
9011
9014
|
children,
|
|
9012
9015
|
isOpen = false,
|
|
9013
9016
|
onOpenChange
|
|
9014
9017
|
}) => {
|
|
9015
|
-
const
|
|
9016
|
-
|
|
9018
|
+
const isControlled = isNotNil17(onOpenChange);
|
|
9019
|
+
const [internalOpen, setInternalOpen] = useState12(false);
|
|
9020
|
+
const handleOpenChange = (open2) => {
|
|
9021
|
+
if (!isControlled) {
|
|
9022
|
+
setInternalOpen(open2);
|
|
9023
|
+
}
|
|
9024
|
+
onOpenChange?.(open2);
|
|
9017
9025
|
};
|
|
9018
|
-
|
|
9026
|
+
const controlProps = isControlled ? { open: isOpen, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange };
|
|
9027
|
+
const currentOpen = isControlled ? isOpen : internalOpen;
|
|
9028
|
+
return /* @__PURE__ */ jsx247(
|
|
9029
|
+
StyledRoot,
|
|
9030
|
+
{
|
|
9031
|
+
$isOpen: currentOpen,
|
|
9032
|
+
...controlProps,
|
|
9033
|
+
children
|
|
9034
|
+
}
|
|
9035
|
+
);
|
|
9019
9036
|
};
|
|
9020
9037
|
Collapsible.displayName = "Collapsible_UI";
|
|
9021
9038
|
|
|
9022
9039
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
9023
9040
|
import { Children as Children4 } from "react";
|
|
9024
|
-
import {
|
|
9041
|
+
import { Collapsible as BaseCollapsible2 } from "@base-ui/react/collapsible";
|
|
9025
9042
|
import { styled as styled30 } from "styled-components";
|
|
9026
9043
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
9027
|
-
var StyledTrigger = styled30(Trigger)`
|
|
9044
|
+
var StyledTrigger = styled30(BaseCollapsible2.Trigger)`
|
|
9028
9045
|
[data-wui-collapsible-icon] {
|
|
9029
9046
|
transition: transform var(--wui-motion-duration-03) ease-in-out;
|
|
9030
9047
|
}
|
|
@@ -9047,7 +9064,7 @@ var StyledTrigger = styled30(Trigger)`
|
|
|
9047
9064
|
`;
|
|
9048
9065
|
var CollapsibleTrigger = ({ children }) => {
|
|
9049
9066
|
Children4.only(children);
|
|
9050
|
-
return /* @__PURE__ */ jsx248(StyledTrigger, {
|
|
9067
|
+
return /* @__PURE__ */ jsx248(StyledTrigger, { render: children });
|
|
9051
9068
|
};
|
|
9052
9069
|
|
|
9053
9070
|
// src/components/Collapsible/CollapsibleTriggerIcon.tsx
|
|
@@ -9074,7 +9091,7 @@ CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon_UI";
|
|
|
9074
9091
|
|
|
9075
9092
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
9076
9093
|
import { styled as styled31 } from "styled-components";
|
|
9077
|
-
import {
|
|
9094
|
+
import { Collapsible as BaseCollapsible3 } from "@base-ui/react/collapsible";
|
|
9078
9095
|
import { isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
|
|
9079
9096
|
import { Fragment as Fragment5, jsx as jsx250, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9080
9097
|
var ClampedContent = styled31.div`
|
|
@@ -9091,7 +9108,7 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9091
9108
|
}
|
|
9092
9109
|
);
|
|
9093
9110
|
}
|
|
9094
|
-
return /* @__PURE__ */ jsx250(
|
|
9111
|
+
return /* @__PURE__ */ jsx250(BaseCollapsible3.Panel, { children: /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
9095
9112
|
children,
|
|
9096
9113
|
" "
|
|
9097
9114
|
] }) });
|
|
@@ -9100,10 +9117,10 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9100
9117
|
// src/components/ColorPicker/ColorGrid.tsx
|
|
9101
9118
|
import { useCallback as useCallback10 } from "react";
|
|
9102
9119
|
import { styled as styled33 } from "styled-components";
|
|
9103
|
-
import {
|
|
9120
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
9104
9121
|
|
|
9105
9122
|
// src/components/ColorPicker/ColorPickerContext.tsx
|
|
9106
|
-
import { createContext as createContext5, useCallback as useCallback9, useContext as useContext4, useEffect as useEffect10, useMemo as useMemo7, useState as
|
|
9123
|
+
import { createContext as createContext5, useCallback as useCallback9, useContext as useContext4, useEffect as useEffect10, useMemo as useMemo7, useState as useState13 } from "react";
|
|
9107
9124
|
import { formatHex as formatHex2 } from "culori/fn";
|
|
9108
9125
|
|
|
9109
9126
|
// src/components/ColorPicker/color-conversion-utils.ts
|
|
@@ -9502,11 +9519,11 @@ var ColorPickerProvider = ({
|
|
|
9502
9519
|
opacityForContrastCalculation,
|
|
9503
9520
|
value: valueAsHex
|
|
9504
9521
|
}) => {
|
|
9505
|
-
const [isTransitioning, setIsTransitioning] =
|
|
9506
|
-
const [isDragging, setIsDragging] =
|
|
9507
|
-
const [nonDerivedValueAsHsv, setNonDerivedValueAsHsv] =
|
|
9508
|
-
const [valueAsHsv, setValueAsHsv] =
|
|
9509
|
-
const [shouldEnforceMinContrast, setShouldEnforceMinContrast] =
|
|
9522
|
+
const [isTransitioning, setIsTransitioning] = useState13(false);
|
|
9523
|
+
const [isDragging, setIsDragging] = useState13(false);
|
|
9524
|
+
const [nonDerivedValueAsHsv, setNonDerivedValueAsHsv] = useState13(convertToHsv(valueAsHex));
|
|
9525
|
+
const [valueAsHsv, setValueAsHsv] = useState13(convertToHsv(valueAsHex));
|
|
9526
|
+
const [shouldEnforceMinContrast, setShouldEnforceMinContrast] = useState13(false);
|
|
9510
9527
|
const getAccessibleDerivativeColor = useCallback9(
|
|
9511
9528
|
(originalColor) => getAccessibleColor({
|
|
9512
9529
|
originalColor,
|
|
@@ -9644,9 +9661,9 @@ var useColorPickerState = () => {
|
|
|
9644
9661
|
};
|
|
9645
9662
|
|
|
9646
9663
|
// src/components/Label/Label.tsx
|
|
9647
|
-
import { styled as styled32, css as
|
|
9664
|
+
import { styled as styled32, css as css28 } from "styled-components";
|
|
9648
9665
|
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
9649
|
-
var requiredStyle =
|
|
9666
|
+
var requiredStyle = css28`
|
|
9650
9667
|
&::after {
|
|
9651
9668
|
color: var(--wui-color-text-error);
|
|
9652
9669
|
display: inline;
|
|
@@ -9654,7 +9671,7 @@ var requiredStyle = css27`
|
|
|
9654
9671
|
content: '*';
|
|
9655
9672
|
}
|
|
9656
9673
|
`;
|
|
9657
|
-
var disabledStyle3 =
|
|
9674
|
+
var disabledStyle3 = css28`
|
|
9658
9675
|
color: var(--wui-color-text-disabled);
|
|
9659
9676
|
`;
|
|
9660
9677
|
var StyledLabel2 = styled32.label`
|
|
@@ -9713,7 +9730,7 @@ var Container = styled33.div`
|
|
|
9713
9730
|
var LabelContainer = styled33.div`
|
|
9714
9731
|
padding-top: var(--wui-space-01);
|
|
9715
9732
|
`;
|
|
9716
|
-
var ItemsContainer = styled33(
|
|
9733
|
+
var ItemsContainer = styled33(RadioGroup)`
|
|
9717
9734
|
display: flex;
|
|
9718
9735
|
flex-wrap: wrap;
|
|
9719
9736
|
align-items: center;
|
|
@@ -9725,8 +9742,10 @@ var ColorGrid = ({ children, label }) => {
|
|
|
9725
9742
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
9726
9743
|
const onValueChange = useCallback10(
|
|
9727
9744
|
(value) => {
|
|
9728
|
-
|
|
9729
|
-
|
|
9745
|
+
if (typeof value === "string") {
|
|
9746
|
+
const hsv = convertToHsv(value);
|
|
9747
|
+
onChangeNonDerivedValueAsHsv(hsv);
|
|
9748
|
+
}
|
|
9730
9749
|
},
|
|
9731
9750
|
[onChangeNonDerivedValueAsHsv]
|
|
9732
9751
|
);
|
|
@@ -9746,7 +9765,7 @@ ColorGrid.displayName = "ColorGrid_UI";
|
|
|
9746
9765
|
|
|
9747
9766
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
9748
9767
|
import { styled as styled36 } from "styled-components";
|
|
9749
|
-
import {
|
|
9768
|
+
import { Radio } from "@base-ui/react/radio";
|
|
9750
9769
|
import { formatHex as formatHex3 } from "culori/fn";
|
|
9751
9770
|
|
|
9752
9771
|
// src/components/ColorPicker/ColorSwatch.tsx
|
|
@@ -9807,14 +9826,9 @@ var ColorSwatch = ({
|
|
|
9807
9826
|
};
|
|
9808
9827
|
|
|
9809
9828
|
// src/components/Tooltip/Tooltip.tsx
|
|
9810
|
-
import {
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
Trigger as TooltipTrigger,
|
|
9814
|
-
Portal as TooltipPortal,
|
|
9815
|
-
Arrow as TooltipArrow
|
|
9816
|
-
} from "@radix-ui/react-tooltip";
|
|
9817
|
-
import { styled as styled35, keyframes as keyframes2 } from "styled-components";
|
|
9829
|
+
import { isValidElement as isValidElement2 } from "react";
|
|
9830
|
+
import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
|
|
9831
|
+
import { styled as styled35, css as css29, keyframes as keyframes2 } from "styled-components";
|
|
9818
9832
|
import { jsx as jsx255, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9819
9833
|
var hide = keyframes2`
|
|
9820
9834
|
from {
|
|
@@ -9864,7 +9878,7 @@ var slideRightAndFade = keyframes2`
|
|
|
9864
9878
|
transform: translateX(0);
|
|
9865
9879
|
}
|
|
9866
9880
|
`;
|
|
9867
|
-
var
|
|
9881
|
+
var StyledPopup = styled35(BaseTooltip.Popup)`
|
|
9868
9882
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
9869
9883
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
9870
9884
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -9890,28 +9904,55 @@ var StyledContent = styled35(TooltipContent)`
|
|
|
9890
9904
|
max-width: 30em;
|
|
9891
9905
|
z-index: var(--wui-zindex-tooltip);
|
|
9892
9906
|
|
|
9893
|
-
&[data-
|
|
9907
|
+
&[data-closed] {
|
|
9894
9908
|
animation-name: ${hide};
|
|
9895
9909
|
}
|
|
9896
9910
|
|
|
9897
|
-
&[data-
|
|
9911
|
+
&[data-open][data-side='top'] {
|
|
9898
9912
|
animation-name: ${slideUpAndFade};
|
|
9899
9913
|
}
|
|
9900
9914
|
|
|
9901
|
-
&[data-
|
|
9915
|
+
&[data-open][data-side='right'] {
|
|
9902
9916
|
animation-name: ${slideRightAndFade};
|
|
9903
9917
|
}
|
|
9904
9918
|
|
|
9905
|
-
&[data-
|
|
9919
|
+
&[data-open][data-side='bottom'] {
|
|
9906
9920
|
animation-name: ${slideDownAndFade};
|
|
9907
9921
|
}
|
|
9908
9922
|
|
|
9909
|
-
&[data-
|
|
9923
|
+
&[data-open][data-side='left'] {
|
|
9910
9924
|
animation-name: ${slideLeftAndFade};
|
|
9911
9925
|
}
|
|
9926
|
+
|
|
9927
|
+
overflow: visible;
|
|
9928
|
+
`;
|
|
9929
|
+
var arrowEdgeCss = css29`
|
|
9930
|
+
&[data-side='top'] {
|
|
9931
|
+
bottom: 0;
|
|
9932
|
+
transform: translateY(calc(100% - 2px));
|
|
9933
|
+
}
|
|
9934
|
+
|
|
9935
|
+
&[data-side='bottom'] {
|
|
9936
|
+
top: 0;
|
|
9937
|
+
transform: translateY(calc(-100% + 2px)) rotate(180deg);
|
|
9938
|
+
}
|
|
9939
|
+
|
|
9940
|
+
&[data-side='left'] {
|
|
9941
|
+
right: 0;
|
|
9942
|
+
transform: translateX(calc(100% - 4px)) rotate(-90deg);
|
|
9943
|
+
}
|
|
9944
|
+
|
|
9945
|
+
&[data-side='right'] {
|
|
9946
|
+
left: 0;
|
|
9947
|
+
transform: translateX(calc(-100% + 4px)) rotate(90deg);
|
|
9948
|
+
}
|
|
9949
|
+
`;
|
|
9950
|
+
var StyledTooltipArrow = styled35.svg`
|
|
9951
|
+
${arrowEdgeCss}
|
|
9912
9952
|
`;
|
|
9913
9953
|
var VISUAL_OFFSET = 6;
|
|
9914
|
-
var
|
|
9954
|
+
var ARROW_EXTENSION = 6;
|
|
9955
|
+
var Tooltip2 = ({
|
|
9915
9956
|
delay = 500,
|
|
9916
9957
|
direction = "top",
|
|
9917
9958
|
content,
|
|
@@ -9927,44 +9968,47 @@ var Tooltip = ({
|
|
|
9927
9968
|
if (forceOpen === true) {
|
|
9928
9969
|
rootProps.open = true;
|
|
9929
9970
|
}
|
|
9930
|
-
return /* @__PURE__ */ jsxs23(
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9971
|
+
return /* @__PURE__ */ jsxs23(BaseTooltip.Root, { ...rootProps, children: [
|
|
9972
|
+
/* @__PURE__ */ jsx255(
|
|
9973
|
+
BaseTooltip.Trigger,
|
|
9974
|
+
{
|
|
9975
|
+
delay,
|
|
9976
|
+
render: isValidElement2(children) ? children : /* @__PURE__ */ jsx255("span", { children })
|
|
9977
|
+
}
|
|
9978
|
+
),
|
|
9979
|
+
/* @__PURE__ */ jsx255(BaseTooltip.Portal, { ...container != null ? { container } : {}, children: /* @__PURE__ */ jsx255(
|
|
9980
|
+
BaseTooltip.Positioner,
|
|
9981
|
+
{
|
|
9982
|
+
side: direction,
|
|
9983
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET + ARROW_EXTENSION,
|
|
9984
|
+
children: /* @__PURE__ */ jsxs23(StyledPopup, { role: "tooltip", children: [
|
|
9985
|
+
content,
|
|
9986
|
+
!hideArrow ? /* @__PURE__ */ jsx255(
|
|
9987
|
+
BaseTooltip.Arrow,
|
|
9988
|
+
{
|
|
9989
|
+
render: /* @__PURE__ */ jsx255(
|
|
9990
|
+
StyledTooltipArrow,
|
|
9946
9991
|
{
|
|
9947
9992
|
fill: "var(--tooltip-bg)",
|
|
9948
9993
|
height: "8",
|
|
9949
|
-
style: { transform: "translateY(-2px)" },
|
|
9950
9994
|
viewBox: "0 0 12 8",
|
|
9951
9995
|
width: "12",
|
|
9952
9996
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9953
9997
|
children: /* @__PURE__ */ jsx255("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
9954
9998
|
}
|
|
9955
|
-
)
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
}
|
|
9961
|
-
);
|
|
9999
|
+
)
|
|
10000
|
+
}
|
|
10001
|
+
) : null
|
|
10002
|
+
] })
|
|
10003
|
+
}
|
|
10004
|
+
) })
|
|
10005
|
+
] });
|
|
9962
10006
|
};
|
|
9963
|
-
|
|
10007
|
+
Tooltip2.displayName = "Tooltip_UI";
|
|
9964
10008
|
|
|
9965
10009
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
9966
10010
|
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
9967
|
-
var Container2 = styled36(
|
|
10011
|
+
var Container2 = styled36(Radio.Root)`
|
|
9968
10012
|
border: none;
|
|
9969
10013
|
appearance: none;
|
|
9970
10014
|
outline: none;
|
|
@@ -9981,7 +10025,7 @@ var ColorGridOption = ({ value: rawValue, name }) => {
|
|
|
9981
10025
|
const isSelected = valueAsHex === value;
|
|
9982
10026
|
const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
|
|
9983
10027
|
return /* @__PURE__ */ jsx256(
|
|
9984
|
-
|
|
10028
|
+
Tooltip2,
|
|
9985
10029
|
{
|
|
9986
10030
|
content: name ?? /* @__PURE__ */ jsx256("span", { style: { fontFamily: "var(--wui-typography-family-mono)" }, children: value }),
|
|
9987
10031
|
children: /* @__PURE__ */ jsx256(
|
|
@@ -10010,17 +10054,18 @@ ColorGridOption.displayName = "ColorGridOption_UI";
|
|
|
10010
10054
|
// src/components/ColorPicker/ColorList.tsx
|
|
10011
10055
|
import { useCallback as useCallback11 } from "react";
|
|
10012
10056
|
import { styled as styled37 } from "styled-components";
|
|
10013
|
-
import {
|
|
10057
|
+
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
10014
10058
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
10015
|
-
var Container3 = styled37(
|
|
10059
|
+
var Container3 = styled37(ToggleGroup)`
|
|
10016
10060
|
display: grid;
|
|
10017
10061
|
grid-template-columns: minmax(0, 1fr);
|
|
10018
10062
|
`;
|
|
10019
10063
|
var ColorList = ({ children }) => {
|
|
10020
10064
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
10021
10065
|
const onValueChange = useCallback11(
|
|
10022
|
-
(
|
|
10023
|
-
|
|
10066
|
+
(newValue) => {
|
|
10067
|
+
const value = newValue[0];
|
|
10068
|
+
if (value === void 0 || value === "") {
|
|
10024
10069
|
return;
|
|
10025
10070
|
}
|
|
10026
10071
|
const hsv = convertToHsv(value);
|
|
@@ -10032,8 +10077,7 @@ var ColorList = ({ children }) => {
|
|
|
10032
10077
|
Container3,
|
|
10033
10078
|
{
|
|
10034
10079
|
onValueChange,
|
|
10035
|
-
|
|
10036
|
-
value: valueAsHex,
|
|
10080
|
+
value: [valueAsHex],
|
|
10037
10081
|
children
|
|
10038
10082
|
}
|
|
10039
10083
|
);
|
|
@@ -10072,7 +10116,7 @@ ColorListGroup.displayName = "ColorListGroup_UI";
|
|
|
10072
10116
|
|
|
10073
10117
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10074
10118
|
import { styled as styled39 } from "styled-components";
|
|
10075
|
-
import {
|
|
10119
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
10076
10120
|
import { formatHex as formatHex4 } from "culori/fn";
|
|
10077
10121
|
|
|
10078
10122
|
// src/components/ColorPicker/ColorNameOrHexCode.tsx
|
|
@@ -10110,7 +10154,7 @@ var ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
|
10110
10154
|
|
|
10111
10155
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10112
10156
|
import { jsx as jsx260, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10113
|
-
var Container5 = styled39(
|
|
10157
|
+
var Container5 = styled39(Toggle)`
|
|
10114
10158
|
border: none;
|
|
10115
10159
|
appearance: none;
|
|
10116
10160
|
outline: none;
|
|
@@ -10169,7 +10213,7 @@ var ColorListOption = ({ value: rawValue, name }) => {
|
|
|
10169
10213
|
ColorListOption.displayName = "ColorListOption_UI";
|
|
10170
10214
|
|
|
10171
10215
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
10172
|
-
import {
|
|
10216
|
+
import { Popover } from "@base-ui/react/popover";
|
|
10173
10217
|
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
10174
10218
|
var ColorPicker = ({
|
|
10175
10219
|
children,
|
|
@@ -10179,7 +10223,7 @@ var ColorPicker = ({
|
|
|
10179
10223
|
onValueChange,
|
|
10180
10224
|
value
|
|
10181
10225
|
}) => {
|
|
10182
|
-
return /* @__PURE__ */ jsx261(
|
|
10226
|
+
return /* @__PURE__ */ jsx261(Popover.Root, { modal: false, children: /* @__PURE__ */ jsx261(
|
|
10183
10227
|
ColorPickerProvider,
|
|
10184
10228
|
{
|
|
10185
10229
|
colorForComparison,
|
|
@@ -10194,10 +10238,10 @@ var ColorPicker = ({
|
|
|
10194
10238
|
ColorPicker.displayName = "ColorPicker_UI";
|
|
10195
10239
|
|
|
10196
10240
|
// src/components/ColorPicker/ColorPickerPopoverContent.tsx
|
|
10197
|
-
import {
|
|
10241
|
+
import { Popover as Popover2 } from "@base-ui/react/popover";
|
|
10198
10242
|
import { styled as styled40 } from "styled-components";
|
|
10199
10243
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
10200
|
-
var
|
|
10244
|
+
var StyledPopup2 = styled40(Popover2.Popup)`
|
|
10201
10245
|
background-color: var(--wui-color-bg-surface);
|
|
10202
10246
|
border-radius: var(--wui-border-radius-02);
|
|
10203
10247
|
border: 1px solid var(--wui-color-border);
|
|
@@ -10212,12 +10256,12 @@ var StyledPopoverContent = styled40(PopoverContent)`
|
|
|
10212
10256
|
var ColorPickerPopoverContent = ({
|
|
10213
10257
|
children
|
|
10214
10258
|
}) => {
|
|
10215
|
-
return /* @__PURE__ */ jsx262(
|
|
10216
|
-
|
|
10259
|
+
return /* @__PURE__ */ jsx262(Popover2.Portal, { children: /* @__PURE__ */ jsx262(
|
|
10260
|
+
Popover2.Positioner,
|
|
10217
10261
|
{
|
|
10218
10262
|
align: "start",
|
|
10219
10263
|
sideOffset: 4,
|
|
10220
|
-
children
|
|
10264
|
+
children: /* @__PURE__ */ jsx262(StyledPopup2, { children })
|
|
10221
10265
|
}
|
|
10222
10266
|
) });
|
|
10223
10267
|
};
|
|
@@ -10236,7 +10280,7 @@ ColorPickerSection.displayName = "ColorPickerSection_UI";
|
|
|
10236
10280
|
|
|
10237
10281
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10238
10282
|
import { forwardRef as forwardRef13 } from "react";
|
|
10239
|
-
import {
|
|
10283
|
+
import { Popover as Popover3 } from "@base-ui/react/popover";
|
|
10240
10284
|
import { styled as styled42 } from "styled-components";
|
|
10241
10285
|
|
|
10242
10286
|
// src/components/ColorPicker/ValueSwatch.tsx
|
|
@@ -10271,7 +10315,7 @@ ValueNameOrHexCode.displayName = "ValueNameOrHexCode_UI";
|
|
|
10271
10315
|
|
|
10272
10316
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10273
10317
|
import { jsx as jsx266, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10274
|
-
var StyledPopoverTrigger = styled42(
|
|
10318
|
+
var StyledPopoverTrigger = styled42(Popover3.Trigger)`
|
|
10275
10319
|
background-color: var(--wui-color-bg-surface);
|
|
10276
10320
|
border-radius: var(--wui-border-radius-rounded);
|
|
10277
10321
|
border: 1px solid var(--wui-color-border);
|
|
@@ -10370,7 +10414,7 @@ import { useCallback as useCallback12 } from "react";
|
|
|
10370
10414
|
|
|
10371
10415
|
// src/components/Switch/Switch.tsx
|
|
10372
10416
|
import { forwardRef as forwardRef14, useId as useId3 } from "react";
|
|
10373
|
-
import { styled as styled44, css as
|
|
10417
|
+
import { styled as styled44, css as css30 } from "styled-components";
|
|
10374
10418
|
import { isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
10375
10419
|
import { jsx as jsx268, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10376
10420
|
var switchHeightMap = {
|
|
@@ -10378,7 +10422,7 @@ var switchHeightMap = {
|
|
|
10378
10422
|
md: 20,
|
|
10379
10423
|
lg: 24
|
|
10380
10424
|
};
|
|
10381
|
-
var getSizeCss2 = (size) =>
|
|
10425
|
+
var getSizeCss2 = (size) => css30`
|
|
10382
10426
|
--wui-switch-height: ${switchHeightMap[size]}px;
|
|
10383
10427
|
`;
|
|
10384
10428
|
var StyledSwitchWrapper = styled44.div`
|
|
@@ -10577,17 +10621,17 @@ var ContrastControls = (props) => {
|
|
|
10577
10621
|
ContrastControls.displayName = "ContrastControls_UI";
|
|
10578
10622
|
|
|
10579
10623
|
// src/components/ColorPicker/HexColorInput.tsx
|
|
10580
|
-
import { useCallback as useCallback13, useEffect as useEffect11, useRef as useRef11, useState as
|
|
10624
|
+
import { useCallback as useCallback13, useEffect as useEffect11, useRef as useRef11, useState as useState14 } from "react";
|
|
10581
10625
|
import { parseHex as parseHex2 } from "culori/fn";
|
|
10582
10626
|
|
|
10583
10627
|
// src/components/Input/Input.tsx
|
|
10584
|
-
import { isValidElement as
|
|
10585
|
-
import { styled as styled45, css as
|
|
10628
|
+
import { isValidElement as isValidElement3, forwardRef as forwardRef15, cloneElement as cloneElement4, useRef as useRef10 } from "react";
|
|
10629
|
+
import { styled as styled45, css as css32 } from "styled-components";
|
|
10586
10630
|
import { isNil as isNil13, isNotNil as isNotNil18, isRecord as isRecord4 } from "@wistia/type-guards";
|
|
10587
10631
|
|
|
10588
10632
|
// src/css/inputCss.ts
|
|
10589
|
-
import { css as
|
|
10590
|
-
var inputCss =
|
|
10633
|
+
import { css as css31 } from "styled-components";
|
|
10634
|
+
var inputCss = css31`
|
|
10591
10635
|
/* Colors */
|
|
10592
10636
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
10593
10637
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -10614,7 +10658,7 @@ var inputCss = css29`
|
|
|
10614
10658
|
|
|
10615
10659
|
// src/components/Input/Input.tsx
|
|
10616
10660
|
import { jsx as jsx272, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10617
|
-
var inputStyles =
|
|
10661
|
+
var inputStyles = css32`
|
|
10618
10662
|
${inputCss}
|
|
10619
10663
|
input,
|
|
10620
10664
|
textarea {
|
|
@@ -10782,14 +10826,14 @@ var Input = forwardRef15(
|
|
|
10782
10826
|
if (isNil13(leftIcon) && type === "search") {
|
|
10783
10827
|
leftIconToDisplay = /* @__PURE__ */ jsx272(Icon, { type: "search" });
|
|
10784
10828
|
}
|
|
10785
|
-
if (isNotNil18(leftIconToDisplay) &&
|
|
10829
|
+
if (isNotNil18(leftIconToDisplay) && isValidElement3(leftIconToDisplay)) {
|
|
10786
10830
|
leftIconToDisplay = cloneElement4(leftIconToDisplay, {
|
|
10787
10831
|
size: "md",
|
|
10788
10832
|
className: "wui-input-left-icon"
|
|
10789
10833
|
});
|
|
10790
10834
|
}
|
|
10791
10835
|
let rightIconToDisplay = rightIcon;
|
|
10792
|
-
if (isNotNil18(rightIconToDisplay) &&
|
|
10836
|
+
if (isNotNil18(rightIconToDisplay) && isValidElement3(rightIconToDisplay)) {
|
|
10793
10837
|
rightIconToDisplay = cloneElement4(rightIconToDisplay, {
|
|
10794
10838
|
size: "md",
|
|
10795
10839
|
className: "wui-input-right-icon"
|
|
@@ -10856,7 +10900,7 @@ var normalizeHexInput = (input) => {
|
|
|
10856
10900
|
var HexColorInput = ({ autoFocus = true }) => {
|
|
10857
10901
|
const { valueAsHex, nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
10858
10902
|
const inputRef = useRef11(null);
|
|
10859
|
-
const [textInputValue, setTextInputValue] =
|
|
10903
|
+
const [textInputValue, setTextInputValue] = useState14(valueAsHex);
|
|
10860
10904
|
const onChangeInputValue = useCallback13(
|
|
10861
10905
|
(event) => {
|
|
10862
10906
|
const newValue = (event.target.value || "#").trim().toLocaleLowerCase();
|
|
@@ -11004,11 +11048,7 @@ HexColorInput.displayName = "HexColorInput_UI";
|
|
|
11004
11048
|
|
|
11005
11049
|
// src/components/ColorPicker/HueSlider.tsx
|
|
11006
11050
|
import { useCallback as useCallback14, useMemo as useMemo8 } from "react";
|
|
11007
|
-
import {
|
|
11008
|
-
Root as SliderRoot,
|
|
11009
|
-
Track as SliderTrack,
|
|
11010
|
-
Thumb as SliderThumb
|
|
11011
|
-
} from "@radix-ui/react-slider";
|
|
11051
|
+
import { Slider } from "@base-ui/react/slider";
|
|
11012
11052
|
import { styled as styled47 } from "styled-components";
|
|
11013
11053
|
import { formatHex as formatHex6 } from "culori/fn";
|
|
11014
11054
|
|
|
@@ -11065,7 +11105,7 @@ var Container8 = styled47.div`
|
|
|
11065
11105
|
padding: 0 var(--wui-space-03);
|
|
11066
11106
|
position: relative;
|
|
11067
11107
|
`;
|
|
11068
|
-
var Root = styled47(
|
|
11108
|
+
var Root = styled47(Slider.Root)`
|
|
11069
11109
|
align-items: center;
|
|
11070
11110
|
display: flex;
|
|
11071
11111
|
position: absolute;
|
|
@@ -11074,10 +11114,10 @@ var Root = styled47(SliderRoot)`
|
|
|
11074
11114
|
width: calc(100% - var(--wui-space-05));
|
|
11075
11115
|
height: 16px;
|
|
11076
11116
|
`;
|
|
11077
|
-
var Track = styled47(
|
|
11117
|
+
var Track = styled47(Slider.Track)`
|
|
11078
11118
|
width: 100%;
|
|
11079
11119
|
`;
|
|
11080
|
-
var Thumb = styled47(
|
|
11120
|
+
var Thumb = styled47(Slider.Thumb)`
|
|
11081
11121
|
position: relative;
|
|
11082
11122
|
`;
|
|
11083
11123
|
var ThumbInner = styled47.div`
|
|
@@ -11116,7 +11156,7 @@ var HueSlider = (props) => {
|
|
|
11116
11156
|
}, [valueAsHsv]);
|
|
11117
11157
|
const onHueChange = useCallback14(
|
|
11118
11158
|
(values) => {
|
|
11119
|
-
const newHue = values[0] ?? 0;
|
|
11159
|
+
const newHue = typeof values === "number" ? values : values[0] ?? 0;
|
|
11120
11160
|
onChangeNonDerivedValueAsHsv({
|
|
11121
11161
|
...nonDerivedValueAsHsv,
|
|
11122
11162
|
h: newHue
|
|
@@ -11130,7 +11170,7 @@ var HueSlider = (props) => {
|
|
|
11130
11170
|
...props,
|
|
11131
11171
|
style: containerStyle,
|
|
11132
11172
|
children: [
|
|
11133
|
-
/* @__PURE__ */
|
|
11173
|
+
/* @__PURE__ */ jsx275(
|
|
11134
11174
|
Root,
|
|
11135
11175
|
{
|
|
11136
11176
|
max: THREE_SIXTY,
|
|
@@ -11139,10 +11179,10 @@ var HueSlider = (props) => {
|
|
|
11139
11179
|
orientation: "horizontal",
|
|
11140
11180
|
step: 1,
|
|
11141
11181
|
value: [nonDerivedValueAsHsv.h ?? 0],
|
|
11142
|
-
children: [
|
|
11182
|
+
children: /* @__PURE__ */ jsxs32(Slider.Control, { children: [
|
|
11143
11183
|
/* @__PURE__ */ jsx275(Track, {}),
|
|
11144
11184
|
/* @__PURE__ */ jsx275(Thumb, { "aria-label": "Hue slider", children: /* @__PURE__ */ jsx275(ThumbInner, { style: thumbInnerStyle }) })
|
|
11145
|
-
]
|
|
11185
|
+
] })
|
|
11146
11186
|
}
|
|
11147
11187
|
),
|
|
11148
11188
|
/* @__PURE__ */ jsx275(HSVHueCanvas, { hsv: valueAsHsv })
|
|
@@ -11153,7 +11193,7 @@ var HueSlider = (props) => {
|
|
|
11153
11193
|
HueSlider.displayName = "HueSlider_UI";
|
|
11154
11194
|
|
|
11155
11195
|
// src/components/ColorPicker/SaturationAndValuePicker.tsx
|
|
11156
|
-
import { useCallback as useCallback15, useEffect as useEffect14, useLayoutEffect as useLayoutEffect4, useMemo as useMemo9, useRef as useRef14, useState as
|
|
11196
|
+
import { useCallback as useCallback15, useEffect as useEffect14, useLayoutEffect as useLayoutEffect4, useMemo as useMemo9, useRef as useRef14, useState as useState15 } from "react";
|
|
11157
11197
|
import { styled as styled49 } from "styled-components";
|
|
11158
11198
|
|
|
11159
11199
|
// src/components/ColorPicker/HSVSaturationValueCanvas.tsx
|
|
@@ -11362,7 +11402,7 @@ var SaturationAndValuePicker = ({
|
|
|
11362
11402
|
}
|
|
11363
11403
|
return valueAsHexConvertedToHsv;
|
|
11364
11404
|
}, [isTransitioning, valueAsHexConvertedToHsv, valueAsHsv]);
|
|
11365
|
-
const [thumbStyle, setThumbStyle] =
|
|
11405
|
+
const [thumbStyle, setThumbStyle] = useState15({
|
|
11366
11406
|
backgroundColor: valueAsHex
|
|
11367
11407
|
});
|
|
11368
11408
|
useLayoutEffect4(() => {
|
|
@@ -11530,11 +11570,11 @@ import * as Ariakit from "@ariakit/react";
|
|
|
11530
11570
|
import {
|
|
11531
11571
|
useMemo as useMemo10,
|
|
11532
11572
|
useRef as useRef15,
|
|
11533
|
-
useState as
|
|
11573
|
+
useState as useState16,
|
|
11534
11574
|
useTransition,
|
|
11535
11575
|
useEffect as useEffect15,
|
|
11536
11576
|
Children as Children5,
|
|
11537
|
-
isValidElement as
|
|
11577
|
+
isValidElement as isValidElement4
|
|
11538
11578
|
} from "react";
|
|
11539
11579
|
import { matchSorter } from "match-sorter";
|
|
11540
11580
|
import { styled as styled51 } from "styled-components";
|
|
@@ -11697,10 +11737,10 @@ var Tag = forwardRef16(
|
|
|
11697
11737
|
Tag.displayName = "Tag_UI";
|
|
11698
11738
|
|
|
11699
11739
|
// src/private/helpers/getTypographicStyles/getTypographicStyles.ts
|
|
11700
|
-
import { css as
|
|
11740
|
+
import { css as css33 } from "styled-components";
|
|
11701
11741
|
var typographicVariantStyleMap = { ...variantStyleMap2, ...variantStyleMap };
|
|
11702
11742
|
var getTypographicStyles = (variant) => {
|
|
11703
|
-
return
|
|
11743
|
+
return css33`
|
|
11704
11744
|
${typographicVariantStyleMap[variant]}
|
|
11705
11745
|
font-family: var(--font-family);
|
|
11706
11746
|
font-size: var(--font-size);
|
|
@@ -11840,7 +11880,7 @@ var POPOVER_WIDTH_OFFSET = 20;
|
|
|
11840
11880
|
var extractOptions = (children) => {
|
|
11841
11881
|
const options = {};
|
|
11842
11882
|
Children5.forEach(children, (child) => {
|
|
11843
|
-
if (
|
|
11883
|
+
if (isValidElement4(child) && "value" in child.props && "children" in child.props) {
|
|
11844
11884
|
options[child.props.value] = child.props.children ?? child.props.value;
|
|
11845
11885
|
}
|
|
11846
11886
|
});
|
|
@@ -11869,9 +11909,9 @@ var Combobox2 = ({
|
|
|
11869
11909
|
flipPopover = true,
|
|
11870
11910
|
fullWidth = true
|
|
11871
11911
|
}) => {
|
|
11872
|
-
const [isOpen, setIsOpen] =
|
|
11912
|
+
const [isOpen, setIsOpen] = useState16(false);
|
|
11873
11913
|
const [isPending, startTransition] = useTransition();
|
|
11874
|
-
const [wrapperWidth, setWrapperWidth] =
|
|
11914
|
+
const [wrapperWidth, setWrapperWidth] = useState16("auto");
|
|
11875
11915
|
const comboboxWrapperRef = useRef15(null);
|
|
11876
11916
|
const options = useMemo10(() => extractOptions(children), [children]);
|
|
11877
11917
|
const isMultiSelect = isArray2(value);
|
|
@@ -11988,20 +12028,15 @@ var ComboboxOption = ({ value, children }) => {
|
|
|
11988
12028
|
};
|
|
11989
12029
|
|
|
11990
12030
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
11991
|
-
import { isNil as
|
|
11992
|
-
import { useEffect as useEffect16, useState as
|
|
12031
|
+
import { isNil as isNil16, isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
12032
|
+
import { useEffect as useEffect16, useState as useState18 } from "react";
|
|
11993
12033
|
import { createPortal } from "react-dom";
|
|
11994
12034
|
|
|
11995
12035
|
// src/components/Menu/Menu.tsx
|
|
11996
|
-
import {
|
|
11997
|
-
DropdownMenu,
|
|
11998
|
-
DropdownMenuContent,
|
|
11999
|
-
DropdownMenuPortal,
|
|
12000
|
-
DropdownMenuTrigger
|
|
12001
|
-
} from "@radix-ui/react-dropdown-menu";
|
|
12036
|
+
import { Menu as BaseMenu } from "@base-ui/react/menu";
|
|
12002
12037
|
import { isNotNil as isNotNil20, isNotUndefined as isNotUndefined9 } from "@wistia/type-guards";
|
|
12003
|
-
import { forwardRef as forwardRef17, useMemo as useMemo11 } from "react";
|
|
12004
|
-
import { styled as styled52, css as
|
|
12038
|
+
import { forwardRef as forwardRef17, useCallback as useCallback16, useMemo as useMemo11 } from "react";
|
|
12039
|
+
import { styled as styled52, css as css34, keyframes as keyframes3 } from "styled-components";
|
|
12005
12040
|
|
|
12006
12041
|
// src/components/Menu/MenuContext.tsx
|
|
12007
12042
|
import { createContext as createContext6, useContext as useContext5 } from "react";
|
|
@@ -12030,7 +12065,7 @@ var close = keyframes3`
|
|
|
12030
12065
|
transform: scale(.97) translateY(-8px);
|
|
12031
12066
|
}
|
|
12032
12067
|
`;
|
|
12033
|
-
var menuItemCss =
|
|
12068
|
+
var menuItemCss = css34`
|
|
12034
12069
|
--menu-label-description-gap: var(--wui-space-01);
|
|
12035
12070
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
12036
12071
|
--menu-item-left-icon-size: 24px;
|
|
@@ -12041,7 +12076,7 @@ var menuItemCss = css32`
|
|
|
12041
12076
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
12042
12077
|
--menu-divider-margin: var(--wui-space-02);
|
|
12043
12078
|
`;
|
|
12044
|
-
var compactMenuItemCss =
|
|
12079
|
+
var compactMenuItemCss = css34`
|
|
12045
12080
|
--menu-label-description-gap: 0;
|
|
12046
12081
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
12047
12082
|
--menu-item-left-icon-size: 16px;
|
|
@@ -12052,7 +12087,7 @@ var compactMenuItemCss = css32`
|
|
|
12052
12087
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
12053
12088
|
--menu-divider-margin: var(--wui-space-01);
|
|
12054
12089
|
`;
|
|
12055
|
-
var menuContentCss =
|
|
12090
|
+
var menuContentCss = css34`
|
|
12056
12091
|
--menu-font-family: var(--wui-typography-family-default);
|
|
12057
12092
|
--menu-bg: var(--wui-color-bg-surface);
|
|
12058
12093
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -12068,18 +12103,18 @@ var menuContentCss = css32`
|
|
|
12068
12103
|
font-family: var(--menu-font-family);
|
|
12069
12104
|
background: var(--menu-bg);
|
|
12070
12105
|
border-radius: var(--menu-border-radius);
|
|
12071
|
-
box-shadow: var(--menu-shadow);
|
|
12072
|
-
max-height: var(--
|
|
12106
|
+
box-shadow: var(--menu-shadow);
|
|
12107
|
+
max-height: var(--available-height);
|
|
12073
12108
|
min-width: var(--menu-min-width);
|
|
12074
12109
|
max-width: var(--menu-max-width);
|
|
12075
12110
|
overflow: auto;
|
|
12076
12111
|
padding: var(--menu-padding);
|
|
12077
|
-
transform-origin: var(--
|
|
12112
|
+
transform-origin: var(--transform-origin);
|
|
12078
12113
|
z-index: var(--wui-zindex-menu);
|
|
12079
12114
|
border: 1px solid var(--wui-color-border);
|
|
12080
12115
|
|
|
12081
|
-
&[data-
|
|
12082
|
-
animation: var(--menu-animation-duration) var(--wui-motion-ease-in) ${close};
|
|
12116
|
+
&[data-closed] {
|
|
12117
|
+
animation: var(--menu-animation-duration) var(--wui-motion-ease-in) ${close};
|
|
12083
12118
|
}
|
|
12084
12119
|
|
|
12085
12120
|
${mq.smAndUp} {
|
|
@@ -12094,9 +12129,9 @@ var menuContentCss = css32`
|
|
|
12094
12129
|
margin: var(--menu-divider-margin) 0;
|
|
12095
12130
|
}
|
|
12096
12131
|
`;
|
|
12097
|
-
var
|
|
12132
|
+
var MenuPopup = styled52(BaseMenu.Popup)`
|
|
12098
12133
|
${menuContentCss}
|
|
12099
|
-
min-width: var(--
|
|
12134
|
+
min-width: var(--anchor-width);
|
|
12100
12135
|
`;
|
|
12101
12136
|
var Menu = forwardRef17(
|
|
12102
12137
|
({
|
|
@@ -12113,8 +12148,16 @@ var Menu = forwardRef17(
|
|
|
12113
12148
|
...props
|
|
12114
12149
|
}, ref) => {
|
|
12115
12150
|
const contextValue = useMemo11(() => ({ compact }), [compact]);
|
|
12151
|
+
const handleOpenChange = useCallback16(
|
|
12152
|
+
(nextOpen) => {
|
|
12153
|
+
if (nextOpen !== isOpen) {
|
|
12154
|
+
onOpenChange?.(nextOpen);
|
|
12155
|
+
}
|
|
12156
|
+
},
|
|
12157
|
+
[isOpen, onOpenChange]
|
|
12158
|
+
);
|
|
12116
12159
|
let controlProps = {
|
|
12117
|
-
...isNotNil20(onOpenChange) && isNotNil20(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
12160
|
+
...isNotNil20(onOpenChange) && isNotNil20(isOpen) ? { open: isOpen, onOpenChange: handleOpenChange } : {}
|
|
12118
12161
|
};
|
|
12119
12162
|
if (disabled) {
|
|
12120
12163
|
controlProps = {
|
|
@@ -12123,36 +12166,42 @@ var Menu = forwardRef17(
|
|
|
12123
12166
|
};
|
|
12124
12167
|
}
|
|
12125
12168
|
return /* @__PURE__ */ jsx281(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs36(
|
|
12126
|
-
|
|
12169
|
+
BaseMenu.Root,
|
|
12127
12170
|
{
|
|
12128
12171
|
modal: false,
|
|
12129
12172
|
...controlProps,
|
|
12130
12173
|
children: [
|
|
12131
|
-
/* @__PURE__ */ jsx281(
|
|
12132
|
-
|
|
12174
|
+
/* @__PURE__ */ jsx281(
|
|
12175
|
+
BaseMenu.Trigger,
|
|
12133
12176
|
{
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12177
|
+
render: isNotUndefined9(trigger) ? trigger : /* @__PURE__ */ jsx281(
|
|
12178
|
+
Button,
|
|
12179
|
+
{
|
|
12180
|
+
ref,
|
|
12181
|
+
disabled,
|
|
12182
|
+
forceState: isOpen ? "active" : void 0,
|
|
12183
|
+
rightIcon: /* @__PURE__ */ jsx281(Icon, { type: "caret-down" }),
|
|
12184
|
+
...triggerProps,
|
|
12185
|
+
children: label
|
|
12186
|
+
}
|
|
12187
|
+
)
|
|
12141
12188
|
}
|
|
12142
|
-
)
|
|
12143
|
-
/* @__PURE__ */ jsx281(
|
|
12144
|
-
|
|
12189
|
+
),
|
|
12190
|
+
/* @__PURE__ */ jsx281(BaseMenu.Portal, { children: /* @__PURE__ */ jsx281(
|
|
12191
|
+
BaseMenu.Positioner,
|
|
12145
12192
|
{
|
|
12146
|
-
...props,
|
|
12147
|
-
$compact: compact,
|
|
12148
12193
|
align,
|
|
12149
12194
|
collisionPadding: 8,
|
|
12150
|
-
onFocusOutside: (event) => {
|
|
12151
|
-
event.preventDefault();
|
|
12152
|
-
},
|
|
12153
12195
|
side,
|
|
12154
12196
|
sideOffset: 6,
|
|
12155
|
-
children
|
|
12197
|
+
children: /* @__PURE__ */ jsx281(
|
|
12198
|
+
MenuPopup,
|
|
12199
|
+
{
|
|
12200
|
+
...props,
|
|
12201
|
+
$compact: compact,
|
|
12202
|
+
children
|
|
12203
|
+
}
|
|
12204
|
+
)
|
|
12156
12205
|
}
|
|
12157
12206
|
) })
|
|
12158
12207
|
]
|
|
@@ -12161,27 +12210,24 @@ var Menu = forwardRef17(
|
|
|
12161
12210
|
}
|
|
12162
12211
|
);
|
|
12163
12212
|
Menu.displayName = "Menu_UI";
|
|
12164
|
-
Menu.displayName = "Menu_UI";
|
|
12165
12213
|
|
|
12166
12214
|
// src/components/Menu/MenuLabel.tsx
|
|
12167
12215
|
import { styled as styled53 } from "styled-components";
|
|
12168
|
-
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
12169
12216
|
import { jsx as jsx282 } from "react/jsx-runtime";
|
|
12170
|
-
var StyledMenuLabel = styled53
|
|
12217
|
+
var StyledMenuLabel = styled53.div`
|
|
12171
12218
|
padding: var(--wui-space-02);
|
|
12172
12219
|
`;
|
|
12173
12220
|
var MenuLabel = ({ children, ...props }) => {
|
|
12174
12221
|
return /* @__PURE__ */ jsx282(
|
|
12175
12222
|
StyledMenuLabel,
|
|
12176
12223
|
{
|
|
12177
|
-
|
|
12224
|
+
role: "group",
|
|
12178
12225
|
...props,
|
|
12179
12226
|
children: /* @__PURE__ */ jsx282(
|
|
12180
12227
|
Heading,
|
|
12181
12228
|
{
|
|
12182
12229
|
renderAs: "span",
|
|
12183
12230
|
variant: "heading6",
|
|
12184
|
-
...props,
|
|
12185
12231
|
children
|
|
12186
12232
|
}
|
|
12187
12233
|
)
|
|
@@ -12191,16 +12237,9 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
12191
12237
|
MenuLabel.displayName = "MenuLabel_UI";
|
|
12192
12238
|
|
|
12193
12239
|
// src/components/Menu/SubMenu.tsx
|
|
12194
|
-
import { useState as
|
|
12240
|
+
import { useState as useState17 } from "react";
|
|
12195
12241
|
import { styled as styled57 } from "styled-components";
|
|
12196
|
-
import {
|
|
12197
|
-
DropdownMenuPortal as DropdownMenuPortal2,
|
|
12198
|
-
DropdownMenuSub,
|
|
12199
|
-
DropdownMenuGroup,
|
|
12200
|
-
DropdownMenuSubContent,
|
|
12201
|
-
DropdownMenuSubTrigger,
|
|
12202
|
-
DropdownMenuItem
|
|
12203
|
-
} from "@radix-ui/react-dropdown-menu";
|
|
12242
|
+
import { Menu as Menu2 } from "@base-ui/react/menu";
|
|
12204
12243
|
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
12205
12244
|
|
|
12206
12245
|
// src/components/Menu/MenuItemButton.tsx
|
|
@@ -12353,7 +12392,7 @@ var MenuItemDescription = ({ children }) => {
|
|
|
12353
12392
|
|
|
12354
12393
|
// src/components/Menu/SubMenu.tsx
|
|
12355
12394
|
import { jsx as jsx286, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12356
|
-
var
|
|
12395
|
+
var SubMenuPopup = styled57(Menu2.Popup)`
|
|
12357
12396
|
${menuContentCss}
|
|
12358
12397
|
|
|
12359
12398
|
${mq.smAndDown} {
|
|
@@ -12363,25 +12402,31 @@ var SubMenuContent = styled57(DropdownMenuSubContent)`
|
|
|
12363
12402
|
var StyledMobileSubMenuItems = styled57.div`
|
|
12364
12403
|
margin-left: var(--wui-space-04);
|
|
12365
12404
|
`;
|
|
12366
|
-
var StyledSubTrigger = styled57(
|
|
12405
|
+
var StyledSubTrigger = styled57(Menu2.SubmenuTrigger)`
|
|
12367
12406
|
outline: none;
|
|
12368
12407
|
|
|
12369
|
-
&[data-
|
|
12408
|
+
&[data-popup-open],
|
|
12370
12409
|
&[data-highlighted] {
|
|
12371
12410
|
background-color: var(--wui-color-bg-surface-hover);
|
|
12372
12411
|
}
|
|
12373
12412
|
`;
|
|
12374
12413
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
12375
12414
|
const { isSmAndUp } = useMq();
|
|
12376
|
-
const
|
|
12377
|
-
return /* @__PURE__ */ jsx286(
|
|
12378
|
-
|
|
12415
|
+
const Trigger = isSmAndUp ? StyledSubTrigger : Menu2.Item;
|
|
12416
|
+
return /* @__PURE__ */ jsx286(
|
|
12417
|
+
Trigger,
|
|
12379
12418
|
{
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12419
|
+
nativeButton: true,
|
|
12420
|
+
render: /* @__PURE__ */ jsx286(
|
|
12421
|
+
MenuItemButton,
|
|
12422
|
+
{
|
|
12423
|
+
...props,
|
|
12424
|
+
leftIcon: icon,
|
|
12425
|
+
rightIcon: /* @__PURE__ */ jsx286(Icon, { type: "caret-right" })
|
|
12426
|
+
}
|
|
12427
|
+
)
|
|
12383
12428
|
}
|
|
12384
|
-
)
|
|
12429
|
+
);
|
|
12385
12430
|
};
|
|
12386
12431
|
var SubMenu = ({
|
|
12387
12432
|
label,
|
|
@@ -12391,15 +12436,15 @@ var SubMenu = ({
|
|
|
12391
12436
|
...props
|
|
12392
12437
|
}) => {
|
|
12393
12438
|
const { isSmAndUp } = useMq();
|
|
12394
|
-
const [isExpanded, setIsExpanded] =
|
|
12439
|
+
const [isExpanded, setIsExpanded] = useState17(false);
|
|
12395
12440
|
const { compact } = useMenuContext();
|
|
12396
|
-
return isSmAndUp ? /* @__PURE__ */ jsxs38(
|
|
12441
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs38(Menu2.SubmenuRoot, { onOpenChange, children: [
|
|
12397
12442
|
/* @__PURE__ */ jsxs38(SubMenuTrigger, { ...props, children: [
|
|
12398
12443
|
/* @__PURE__ */ jsx286(MenuItemLabel, { children: label }),
|
|
12399
12444
|
isNotNil22(description) ? /* @__PURE__ */ jsx286(MenuItemDescription, { children: description }) : null
|
|
12400
12445
|
] }),
|
|
12401
|
-
/* @__PURE__ */ jsx286(
|
|
12402
|
-
] }) : /* @__PURE__ */ jsxs38(
|
|
12446
|
+
/* @__PURE__ */ jsx286(Menu2.Portal, { children: /* @__PURE__ */ jsx286(Menu2.Positioner, { children: /* @__PURE__ */ jsx286(SubMenuPopup, { $compact: compact, children }) }) })
|
|
12447
|
+
] }) : /* @__PURE__ */ jsxs38(Menu2.Group, { children: [
|
|
12403
12448
|
/* @__PURE__ */ jsxs38(
|
|
12404
12449
|
SubMenuTrigger,
|
|
12405
12450
|
{
|
|
@@ -12421,16 +12466,18 @@ SubMenu.displayName = "SubMenu_UI";
|
|
|
12421
12466
|
|
|
12422
12467
|
// src/components/Menu/MenuItem.tsx
|
|
12423
12468
|
import { forwardRef as forwardRef19 } from "react";
|
|
12424
|
-
import {
|
|
12469
|
+
import { Menu as Menu3 } from "@base-ui/react/menu";
|
|
12470
|
+
import { isNil as isNil15 } from "@wistia/type-guards";
|
|
12425
12471
|
import { jsx as jsx287 } from "react/jsx-runtime";
|
|
12426
12472
|
var MenuItem = forwardRef19(
|
|
12427
|
-
({ onSelect = () => null, ...props }, ref) => {
|
|
12473
|
+
({ onSelect = () => null, closeOnClick = true, ...props }, ref) => {
|
|
12428
12474
|
return /* @__PURE__ */ jsx287(
|
|
12429
|
-
|
|
12475
|
+
Menu3.Item,
|
|
12430
12476
|
{
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12477
|
+
closeOnClick,
|
|
12478
|
+
nativeButton: isNil15(props.href),
|
|
12479
|
+
onClick: onSelect,
|
|
12480
|
+
render: /* @__PURE__ */ jsx287(
|
|
12434
12481
|
MenuItemButton,
|
|
12435
12482
|
{
|
|
12436
12483
|
...props,
|
|
@@ -12445,15 +12492,15 @@ var MenuItem = forwardRef19(
|
|
|
12445
12492
|
MenuItem.displayName = "MenuItem_UI";
|
|
12446
12493
|
|
|
12447
12494
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
12448
|
-
import {
|
|
12495
|
+
import { Menu as Menu4 } from "@base-ui/react/menu";
|
|
12449
12496
|
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
12450
12497
|
var MenuRadioGroup = ({ children, ...props }) => {
|
|
12451
|
-
return /* @__PURE__ */ jsx288(
|
|
12498
|
+
return /* @__PURE__ */ jsx288(Menu4.RadioGroup, { ...props, children });
|
|
12452
12499
|
};
|
|
12453
12500
|
MenuRadioGroup.displayName = "MenuRadioGroup_UI";
|
|
12454
12501
|
|
|
12455
12502
|
// src/components/Menu/RadioMenuItem.tsx
|
|
12456
|
-
import {
|
|
12503
|
+
import { Menu as Menu5 } from "@base-ui/react/menu";
|
|
12457
12504
|
import { jsx as jsx289 } from "react/jsx-runtime";
|
|
12458
12505
|
var RadioMenuItem = ({
|
|
12459
12506
|
onSelect,
|
|
@@ -12467,27 +12514,28 @@ var RadioMenuItem = ({
|
|
|
12467
12514
|
),
|
|
12468
12515
|
...props
|
|
12469
12516
|
}) => {
|
|
12470
|
-
const extraProps = onSelect ? { onSelect } : {};
|
|
12517
|
+
const extraProps = onSelect ? { onClick: onSelect } : {};
|
|
12471
12518
|
return /* @__PURE__ */ jsx289(
|
|
12472
|
-
|
|
12519
|
+
Menu5.RadioItem,
|
|
12473
12520
|
{
|
|
12521
|
+
closeOnClick: false,
|
|
12522
|
+
nativeButton: true,
|
|
12474
12523
|
...extraProps,
|
|
12475
|
-
|
|
12476
|
-
value,
|
|
12477
|
-
children: /* @__PURE__ */ jsx289(
|
|
12524
|
+
render: /* @__PURE__ */ jsx289(
|
|
12478
12525
|
MenuItemButton,
|
|
12479
12526
|
{
|
|
12480
12527
|
...props,
|
|
12481
|
-
rightIcon: /* @__PURE__ */ jsx289(
|
|
12528
|
+
rightIcon: /* @__PURE__ */ jsx289(Menu5.RadioItemIndicator, { children: indicator })
|
|
12482
12529
|
}
|
|
12483
|
-
)
|
|
12530
|
+
),
|
|
12531
|
+
value
|
|
12484
12532
|
}
|
|
12485
12533
|
);
|
|
12486
12534
|
};
|
|
12487
12535
|
RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
12488
12536
|
|
|
12489
12537
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
12490
|
-
import {
|
|
12538
|
+
import { Menu as Menu6 } from "@base-ui/react/menu";
|
|
12491
12539
|
import { isNotNil as isNotNil23 } from "@wistia/type-guards";
|
|
12492
12540
|
import { jsx as jsx290, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12493
12541
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
@@ -12552,18 +12600,19 @@ var CheckboxMenuItem = ({
|
|
|
12552
12600
|
...props
|
|
12553
12601
|
}) => {
|
|
12554
12602
|
return /* @__PURE__ */ jsx290(
|
|
12555
|
-
|
|
12603
|
+
Menu6.CheckboxItem,
|
|
12556
12604
|
{
|
|
12557
|
-
asChild: true,
|
|
12558
12605
|
checked,
|
|
12606
|
+
closeOnClick: false,
|
|
12607
|
+
nativeButton: true,
|
|
12559
12608
|
onCheckedChange,
|
|
12560
|
-
onSelect,
|
|
12561
|
-
|
|
12609
|
+
onClick: onSelect,
|
|
12610
|
+
render: /* @__PURE__ */ jsx290(
|
|
12562
12611
|
MenuItemButton,
|
|
12563
12612
|
{
|
|
12564
12613
|
...props,
|
|
12565
12614
|
leftIcon: isNotNil23(props.icon) ? props.icon : /* @__PURE__ */ jsx290(CheckboxIndicator, { checked }),
|
|
12566
|
-
rightIcon: isNotNil23(props.icon) ? /* @__PURE__ */ jsx290(
|
|
12615
|
+
rightIcon: isNotNil23(props.icon) ? /* @__PURE__ */ jsx290(Menu6.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx290(Icon, { type: "checkmark" }) }) : void 0
|
|
12567
12616
|
}
|
|
12568
12617
|
)
|
|
12569
12618
|
}
|
|
@@ -12573,7 +12622,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem_UI";
|
|
|
12573
12622
|
|
|
12574
12623
|
// src/components/Menu/FilterMenu.tsx
|
|
12575
12624
|
import { Children as Children6, forwardRef as forwardRef20 } from "react";
|
|
12576
|
-
import {
|
|
12625
|
+
import { Menu as BaseMenu2 } from "@base-ui/react/menu";
|
|
12577
12626
|
import { jsx as jsx291, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12578
12627
|
var FilterMenuItem = CheckboxMenuItem;
|
|
12579
12628
|
var FilterMenu = forwardRef20(
|
|
@@ -12635,7 +12684,7 @@ var FilterMenu = forwardRef20(
|
|
|
12635
12684
|
),
|
|
12636
12685
|
Children6.toArray(children).length > 0 ? children : /* @__PURE__ */ jsx291(MenuItem, { disabled: true, children: "No results found" }),
|
|
12637
12686
|
value.length > 0 && /* @__PURE__ */ jsx291(
|
|
12638
|
-
|
|
12687
|
+
BaseMenu2.Item,
|
|
12639
12688
|
{
|
|
12640
12689
|
disabled: true,
|
|
12641
12690
|
style: { marginTop: "24px" },
|
|
@@ -12683,10 +12732,10 @@ var ContextMenu = ({
|
|
|
12683
12732
|
onRequestClose = () => null,
|
|
12684
12733
|
compact = false
|
|
12685
12734
|
}) => {
|
|
12686
|
-
const [isRightClicked, setIsRightClicked] =
|
|
12687
|
-
const [menuPosition, setMenuPosition] =
|
|
12735
|
+
const [isRightClicked, setIsRightClicked] = useState18(false);
|
|
12736
|
+
const [menuPosition, setMenuPosition] = useState18(position ?? { x: 0, y: 0 });
|
|
12688
12737
|
useEffect16(() => {
|
|
12689
|
-
if (
|
|
12738
|
+
if (isNil16(position)) {
|
|
12690
12739
|
const onContextMenu = (event) => {
|
|
12691
12740
|
event.preventDefault();
|
|
12692
12741
|
setMenuPosition({ x: event.clientX, y: event.clientY });
|
|
@@ -13152,9 +13201,9 @@ var DataListItemValue = (props) => {
|
|
|
13152
13201
|
DataListItemValue.displayName = "DataListItemValue_UI";
|
|
13153
13202
|
|
|
13154
13203
|
// src/components/Divider/Divider.tsx
|
|
13155
|
-
import { styled as styled64, css as
|
|
13204
|
+
import { styled as styled64, css as css35 } from "styled-components";
|
|
13156
13205
|
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
13157
|
-
var horizontalBorderCss =
|
|
13206
|
+
var horizontalBorderCss = css35`
|
|
13158
13207
|
border-top-color: var(--wui-color-border);
|
|
13159
13208
|
border-top-style: solid;
|
|
13160
13209
|
border-top-width: 1px;
|
|
@@ -13163,7 +13212,7 @@ var horizontalBorderCss = css33`
|
|
|
13163
13212
|
margin-left: var(--wui-divider-inset);
|
|
13164
13213
|
margin-right: var(--wui-divider-inset);
|
|
13165
13214
|
`;
|
|
13166
|
-
var verticalBorderCss =
|
|
13215
|
+
var verticalBorderCss = css35`
|
|
13167
13216
|
background-color: var(--wui-color-border);
|
|
13168
13217
|
max-width: 1px;
|
|
13169
13218
|
min-height: 100%;
|
|
@@ -13206,8 +13255,8 @@ var Divider = ({
|
|
|
13206
13255
|
Divider.displayName = "Divider_UI";
|
|
13207
13256
|
|
|
13208
13257
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
13209
|
-
import { styled as styled65, css as
|
|
13210
|
-
import { useState as
|
|
13258
|
+
import { styled as styled65, css as css36 } from "styled-components";
|
|
13259
|
+
import { useState as useState19, useRef as useRef17 } from "react";
|
|
13211
13260
|
import { Fragment as Fragment7, jsx as jsx302, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13212
13261
|
var StyledInput = styled65(Input)`
|
|
13213
13262
|
&:not([rows]) {
|
|
@@ -13234,7 +13283,7 @@ var StyledInput = styled65(Input)`
|
|
|
13234
13283
|
resize: none;
|
|
13235
13284
|
}
|
|
13236
13285
|
`;
|
|
13237
|
-
var editableStyles =
|
|
13286
|
+
var editableStyles = css36`
|
|
13238
13287
|
&:has(+ :focus-within) {
|
|
13239
13288
|
background: var(--wui-color-bg-surface-hover);
|
|
13240
13289
|
}
|
|
@@ -13262,10 +13311,10 @@ var EditableHeading = ({
|
|
|
13262
13311
|
__forceEditing = false,
|
|
13263
13312
|
editingDisabled = false
|
|
13264
13313
|
}) => {
|
|
13265
|
-
const [isEditing, setIsEditing] =
|
|
13266
|
-
const [value, setValue] =
|
|
13267
|
-
const [previousValue, setPreviousValue] =
|
|
13268
|
-
const [headingHeight, setHeadingHeight] =
|
|
13314
|
+
const [isEditing, setIsEditing] = useState19(false);
|
|
13315
|
+
const [value, setValue] = useState19(children);
|
|
13316
|
+
const [previousValue, setPreviousValue] = useState19(children);
|
|
13317
|
+
const [headingHeight, setHeadingHeight] = useState19("60");
|
|
13269
13318
|
const headingRef = useRef17(null);
|
|
13270
13319
|
const handleSetEditing = (editing) => {
|
|
13271
13320
|
if (editingDisabled) {
|
|
@@ -13335,7 +13384,7 @@ var EditableHeading = ({
|
|
|
13335
13384
|
);
|
|
13336
13385
|
}
|
|
13337
13386
|
return /* @__PURE__ */ jsxs43(Fragment7, { children: [
|
|
13338
|
-
/* @__PURE__ */ jsx302(
|
|
13387
|
+
/* @__PURE__ */ jsx302(Tooltip2, { content: tooltipText, children: HeadingComponent2 }),
|
|
13339
13388
|
/* @__PURE__ */ jsx302(ScreenReaderOnly, { children: /* @__PURE__ */ jsx302(
|
|
13340
13389
|
"button",
|
|
13341
13390
|
{
|
|
@@ -13349,11 +13398,11 @@ var EditableHeading = ({
|
|
|
13349
13398
|
|
|
13350
13399
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
13351
13400
|
import { useContext as useContext6, useRef as useRef18, forwardRef as forwardRef21 } from "react";
|
|
13352
|
-
import { styled as styled67, css as
|
|
13401
|
+
import { styled as styled67, css as css37 } from "styled-components";
|
|
13353
13402
|
import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
13354
13403
|
|
|
13355
13404
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
13356
|
-
import { createContext as createContext7, useMemo as useMemo12, useState as
|
|
13405
|
+
import { createContext as createContext7, useMemo as useMemo12, useState as useState20, useCallback as useCallback17, useId as useId4 } from "react";
|
|
13357
13406
|
import { isNonEmptyString as isNonEmptyString6 } from "@wistia/type-guards";
|
|
13358
13407
|
import { styled as styled66 } from "styled-components";
|
|
13359
13408
|
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
@@ -13418,13 +13467,13 @@ var EditableTextRoot = ({
|
|
|
13418
13467
|
...props
|
|
13419
13468
|
}) => {
|
|
13420
13469
|
const isControlled = controlledValue !== void 0;
|
|
13421
|
-
const [internalValue, setInternalValue] =
|
|
13422
|
-
const [originalValue, setOriginalValue] =
|
|
13423
|
-
const [isEditing, setIsEditing] =
|
|
13470
|
+
const [internalValue, setInternalValue] = useState20(defaultValue);
|
|
13471
|
+
const [originalValue, setOriginalValue] = useState20(defaultValue);
|
|
13472
|
+
const [isEditing, setIsEditing] = useState20(false);
|
|
13424
13473
|
const value = isControlled ? controlledValue : internalValue;
|
|
13425
13474
|
const generatedId = useId4();
|
|
13426
13475
|
const computedId = isNonEmptyString6(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
13427
|
-
const handleSetIsEditing =
|
|
13476
|
+
const handleSetIsEditing = useCallback17(
|
|
13428
13477
|
(editing) => {
|
|
13429
13478
|
if (editing && !isEditing) {
|
|
13430
13479
|
setOriginalValue(value);
|
|
@@ -13434,7 +13483,7 @@ var EditableTextRoot = ({
|
|
|
13434
13483
|
},
|
|
13435
13484
|
[isEditing, value, onEditingChange]
|
|
13436
13485
|
);
|
|
13437
|
-
const setValue =
|
|
13486
|
+
const setValue = useCallback17(
|
|
13438
13487
|
(newValue) => {
|
|
13439
13488
|
if (!isControlled) {
|
|
13440
13489
|
setInternalValue(newValue);
|
|
@@ -13512,14 +13561,14 @@ var StyledEditableTextDisplay = styled67.div`
|
|
|
13512
13561
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
13513
13562
|
${({ $maxLines }) => {
|
|
13514
13563
|
if (isNotNil26($maxLines)) {
|
|
13515
|
-
return
|
|
13564
|
+
return css37`
|
|
13516
13565
|
${ellipsisStyle};
|
|
13517
13566
|
${lineClampCss($maxLines)};
|
|
13518
13567
|
`;
|
|
13519
13568
|
}
|
|
13520
13569
|
return void 0;
|
|
13521
13570
|
}}
|
|
13522
|
-
${({ $minLines }) => isNotNil26($minLines) &&
|
|
13571
|
+
${({ $minLines }) => isNotNil26($minLines) && css37`
|
|
13523
13572
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
13524
13573
|
`}
|
|
13525
13574
|
word-break: normal;
|
|
@@ -13845,9 +13894,9 @@ var EditableTextTrigger = ({
|
|
|
13845
13894
|
};
|
|
13846
13895
|
|
|
13847
13896
|
// src/components/FeatureCard/FeatureCard.tsx
|
|
13848
|
-
import { useEffect as useEffect18, useState as
|
|
13897
|
+
import { useEffect as useEffect18, useState as useState21, useMemo as useMemo13 } from "react";
|
|
13849
13898
|
import { styled as styled69 } from "styled-components";
|
|
13850
|
-
import { isNil as
|
|
13899
|
+
import { isNil as isNil17, isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
13851
13900
|
import { Fragment as Fragment8, jsx as jsx308, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13852
13901
|
var BREAKPOINT_WIDTH = 600;
|
|
13853
13902
|
var VERTICAL_BREAKPOINT_WIDTH = 284;
|
|
@@ -13900,8 +13949,8 @@ var FeatureCard = ({
|
|
|
13900
13949
|
}) => {
|
|
13901
13950
|
const [containerRef, { width }] = useElementObserver();
|
|
13902
13951
|
const [contentRef, { height: contentHeight }] = useElementObserver();
|
|
13903
|
-
const [isSmallContainer, setIsSmallContainer] =
|
|
13904
|
-
const [isVerticalLayout, setIsVerticalLayout] =
|
|
13952
|
+
const [isSmallContainer, setIsSmallContainer] = useState21(false);
|
|
13953
|
+
const [isVerticalLayout, setIsVerticalLayout] = useState21(orientation === "vertical");
|
|
13905
13954
|
useEffect18(() => {
|
|
13906
13955
|
const breakpoint = orientation === "vertical" ? VERTICAL_BREAKPOINT_WIDTH : BREAKPOINT_WIDTH;
|
|
13907
13956
|
setIsSmallContainer(width <= breakpoint);
|
|
@@ -13912,7 +13961,7 @@ var FeatureCard = ({
|
|
|
13912
13961
|
const hasImage = isNotNil28(image);
|
|
13913
13962
|
const shouldShowImage = hasImage && (isVerticalLayout || width >= MIN_IMAGE_WIDTH);
|
|
13914
13963
|
const iconPosition = useMemo13(() => {
|
|
13915
|
-
if (
|
|
13964
|
+
if (isNil17(icon)) {
|
|
13916
13965
|
return "none";
|
|
13917
13966
|
}
|
|
13918
13967
|
if (isSmallContainer) {
|
|
@@ -14104,12 +14153,12 @@ var FeatureCardImage = ({
|
|
|
14104
14153
|
};
|
|
14105
14154
|
|
|
14106
14155
|
// src/components/Form/useFormState.tsx
|
|
14107
|
-
import { useCallback as
|
|
14156
|
+
import { useCallback as useCallback18, useState as useState22 } from "react";
|
|
14108
14157
|
var useFormState = (action, initialData = {}) => {
|
|
14109
|
-
const [data, setData] =
|
|
14110
|
-
const [isPending, setIsPending] =
|
|
14111
|
-
const [error, setError] =
|
|
14112
|
-
const formAction =
|
|
14158
|
+
const [data, setData] = useState22(initialData);
|
|
14159
|
+
const [isPending, setIsPending] = useState22(false);
|
|
14160
|
+
const [error, setError] = useState22(null);
|
|
14161
|
+
const formAction = useCallback18(
|
|
14113
14162
|
async (nextFormData) => {
|
|
14114
14163
|
if (nextFormData === null) {
|
|
14115
14164
|
setData(initialData);
|
|
@@ -14203,18 +14252,18 @@ var validateWithYup = (schema) => {
|
|
|
14203
14252
|
|
|
14204
14253
|
// src/components/FormField/FormField.tsx
|
|
14205
14254
|
import { Children as Children10, cloneElement as cloneElement8, useContext as useContext13 } from "react";
|
|
14206
|
-
import { styled as styled71, css as
|
|
14255
|
+
import { styled as styled71, css as css38 } from "styled-components";
|
|
14207
14256
|
import { isArray as isArray4, isNotNil as isNotNil29, isNotUndefined as isNotUndefined13, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
14208
14257
|
import { jsx as jsx311, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
14209
|
-
var inlineErrorStyles =
|
|
14258
|
+
var inlineErrorStyles = css38`
|
|
14210
14259
|
grid-template-rows: 1fr auto;
|
|
14211
14260
|
grid-template-areas: 'label-description input' '. error';
|
|
14212
14261
|
`;
|
|
14213
|
-
var inlineBaseGridAreaStyles =
|
|
14262
|
+
var inlineBaseGridAreaStyles = css38`
|
|
14214
14263
|
grid-template-rows: 1fr;
|
|
14215
14264
|
grid-template-areas: 'label-description input';
|
|
14216
14265
|
`;
|
|
14217
|
-
var blockGridErrorStyles =
|
|
14266
|
+
var blockGridErrorStyles = css38`
|
|
14218
14267
|
grid-template-rows: auto 1fr auto;
|
|
14219
14268
|
grid-template-areas: 'label-description' 'input' 'error';
|
|
14220
14269
|
`;
|
|
@@ -14411,7 +14460,7 @@ var RadioGroupContext = createContext8(null);
|
|
|
14411
14460
|
var useRadioGroup = () => {
|
|
14412
14461
|
return useContext14(RadioGroupContext);
|
|
14413
14462
|
};
|
|
14414
|
-
var
|
|
14463
|
+
var RadioGroup2 = ({
|
|
14415
14464
|
children,
|
|
14416
14465
|
name,
|
|
14417
14466
|
onChange,
|
|
@@ -14429,28 +14478,28 @@ var RadioGroup = ({
|
|
|
14429
14478
|
}, [name, derivedValue, onChange]);
|
|
14430
14479
|
return /* @__PURE__ */ jsx312(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx312(FormGroup, { ...props, children }) });
|
|
14431
14480
|
};
|
|
14432
|
-
|
|
14481
|
+
RadioGroup2.displayName = "RadioGroup_UI";
|
|
14433
14482
|
|
|
14434
14483
|
// src/components/Grid/Grid.tsx
|
|
14435
14484
|
import { forwardRef as forwardRef22 } from "react";
|
|
14436
|
-
import { styled as styled72, css as
|
|
14485
|
+
import { styled as styled72, css as css39 } from "styled-components";
|
|
14437
14486
|
import { isRecord as isRecord5 } from "@wistia/type-guards";
|
|
14438
14487
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
14439
14488
|
var DEFAULT_ELEMENT5 = "div";
|
|
14440
14489
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
14441
14490
|
if (minChildWidth === "auto" && maxColumns === "auto") {
|
|
14442
|
-
return
|
|
14491
|
+
return css39`
|
|
14443
14492
|
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
|
14444
14493
|
`;
|
|
14445
14494
|
}
|
|
14446
14495
|
const gridMode = expandItems ? "auto-fit" : "auto-fill";
|
|
14447
14496
|
const minChildWidthValue = minChildWidth === "auto" ? 0 : minChildWidth;
|
|
14448
14497
|
if (maxColumns === "auto") {
|
|
14449
|
-
return
|
|
14498
|
+
return css39`
|
|
14450
14499
|
grid-template-columns: repeat(${gridMode}, minmax(${minChildWidthValue}px, 1fr));
|
|
14451
14500
|
`;
|
|
14452
14501
|
}
|
|
14453
|
-
return
|
|
14502
|
+
return css39`
|
|
14454
14503
|
/* Adapted from https://9elements.com/blog/building-a-rock-solid-auto-grid/ */
|
|
14455
14504
|
--wui-grid-total-column-gap-width: calc(${maxColumns - 1} * var(--wui-grid-column-gap));
|
|
14456
14505
|
--wui-grid-max-column-width: calc(
|
|
@@ -14507,8 +14556,8 @@ GridComponent.displayName = "Grid_UI";
|
|
|
14507
14556
|
var Grid = makePolymorphic(GridComponent);
|
|
14508
14557
|
|
|
14509
14558
|
// src/components/PreviewCard/PreviewCard.tsx
|
|
14510
|
-
import {
|
|
14511
|
-
import { styled as styled73, css as
|
|
14559
|
+
import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card";
|
|
14560
|
+
import { styled as styled73, css as css40, keyframes as keyframes5 } from "styled-components";
|
|
14512
14561
|
import { jsx as jsx314, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
14513
14562
|
var previewCardOpen = keyframes5`
|
|
14514
14563
|
from {
|
|
@@ -14530,26 +14579,26 @@ var previewCardClose = keyframes5`
|
|
|
14530
14579
|
transform: scale(0.96);
|
|
14531
14580
|
}
|
|
14532
14581
|
`;
|
|
14533
|
-
var
|
|
14582
|
+
var StyledPopup3 = styled73(BasePreviewCard.Popup)`
|
|
14534
14583
|
--preview-card-animation-duration: var(--wui-motion-duration-03);
|
|
14535
14584
|
--preview-card-animation-ease: var(--wui-motion-ease-out);
|
|
14536
14585
|
|
|
14537
14586
|
z-index: var(--wui-zindex-popover);
|
|
14538
|
-
transform-origin: var(--
|
|
14587
|
+
transform-origin: var(--transform-origin);
|
|
14539
14588
|
animation-duration: var(--preview-card-animation-duration);
|
|
14540
14589
|
animation-timing-function: var(--preview-card-animation-ease);
|
|
14541
14590
|
will-change: transform, opacity;
|
|
14542
14591
|
|
|
14543
|
-
&[data-
|
|
14592
|
+
&[data-open] {
|
|
14544
14593
|
animation-name: ${previewCardOpen};
|
|
14545
14594
|
}
|
|
14546
14595
|
|
|
14547
|
-
&[data-
|
|
14596
|
+
&[data-closed] {
|
|
14548
14597
|
animation-name: ${previewCardClose};
|
|
14549
14598
|
}
|
|
14550
14599
|
|
|
14551
14600
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
14552
|
-
${({ $unstyled, $paddingSize }) => !$unstyled &&
|
|
14601
|
+
${({ $unstyled, $paddingSize }) => !$unstyled && css40`
|
|
14553
14602
|
border-radius: var(--wui-border-radius-02);
|
|
14554
14603
|
padding: var(--wui-${$paddingSize});
|
|
14555
14604
|
max-width: var(--wui-preview-card-max-width, 320px);
|
|
@@ -14571,6 +14620,8 @@ var PreviewCard = ({
|
|
|
14571
14620
|
closeDelay = 300,
|
|
14572
14621
|
colorScheme = "inherit",
|
|
14573
14622
|
forceOpen,
|
|
14623
|
+
side,
|
|
14624
|
+
align,
|
|
14574
14625
|
...props
|
|
14575
14626
|
}) => {
|
|
14576
14627
|
const style = {
|
|
@@ -14581,35 +14632,41 @@ var PreviewCard = ({
|
|
|
14581
14632
|
if (forceOpen === true) {
|
|
14582
14633
|
rootProps.open = true;
|
|
14583
14634
|
}
|
|
14584
|
-
return /* @__PURE__ */ jsxs49(
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14635
|
+
return /* @__PURE__ */ jsxs49(BasePreviewCard.Root, { ...rootProps, children: [
|
|
14636
|
+
/* @__PURE__ */ jsx314(
|
|
14637
|
+
BasePreviewCard.Trigger,
|
|
14638
|
+
{
|
|
14639
|
+
closeDelay,
|
|
14640
|
+
delay: openDelay,
|
|
14641
|
+
render: trigger
|
|
14642
|
+
}
|
|
14643
|
+
),
|
|
14644
|
+
/* @__PURE__ */ jsx314(BasePreviewCard.Portal, { children: /* @__PURE__ */ jsx314(
|
|
14645
|
+
BasePreviewCard.Positioner,
|
|
14646
|
+
{
|
|
14647
|
+
align,
|
|
14648
|
+
side,
|
|
14649
|
+
sideOffset: 8,
|
|
14650
|
+
children: /* @__PURE__ */ jsx314(
|
|
14651
|
+
StyledPopup3,
|
|
14594
14652
|
{
|
|
14595
14653
|
$colorScheme: colorScheme,
|
|
14596
14654
|
$paddingSize: paddingSize,
|
|
14597
|
-
sideOffset: 8,
|
|
14598
14655
|
...props,
|
|
14599
14656
|
$unstyled: unstyled,
|
|
14600
14657
|
style,
|
|
14601
14658
|
children: /* @__PURE__ */ jsx314("div", { children })
|
|
14602
14659
|
}
|
|
14603
|
-
)
|
|
14604
|
-
|
|
14605
|
-
}
|
|
14606
|
-
);
|
|
14660
|
+
)
|
|
14661
|
+
}
|
|
14662
|
+
) })
|
|
14663
|
+
] });
|
|
14607
14664
|
};
|
|
14608
14665
|
PreviewCard.displayName = "PreviewCard_UI";
|
|
14609
14666
|
|
|
14610
14667
|
// src/components/InputClickToCopy/InputClickToCopy.tsx
|
|
14611
14668
|
import { styled as styled74 } from "styled-components";
|
|
14612
|
-
import { forwardRef as forwardRef23, useEffect as useEffect19, useState as
|
|
14669
|
+
import { forwardRef as forwardRef23, useEffect as useEffect19, useState as useState23 } from "react";
|
|
14613
14670
|
import { isFunction as isFunction3 } from "@wistia/type-guards";
|
|
14614
14671
|
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
14615
14672
|
var StyledIconButton = styled74(IconButton)`
|
|
@@ -14623,7 +14680,7 @@ var StyledIconButton = styled74(IconButton)`
|
|
|
14623
14680
|
var COPY_SUCCESS_DURATION = 2e3;
|
|
14624
14681
|
var InputClickToCopy = forwardRef23(
|
|
14625
14682
|
({ value, onCopy, disabled = false, ...props }, ref) => {
|
|
14626
|
-
const [isCopied, setIsCopied] =
|
|
14683
|
+
const [isCopied, setIsCopied] = useState23(false);
|
|
14627
14684
|
useEffect19(() => {
|
|
14628
14685
|
if (isCopied) {
|
|
14629
14686
|
const timeout = setTimeout(() => {
|
|
@@ -14679,7 +14736,7 @@ InputClickToCopy.displayName = "InputClickToCopy_UI";
|
|
|
14679
14736
|
|
|
14680
14737
|
// src/components/InputPassword/InputPassword.tsx
|
|
14681
14738
|
import { styled as styled75 } from "styled-components";
|
|
14682
|
-
import { forwardRef as forwardRef24, useState as
|
|
14739
|
+
import { forwardRef as forwardRef24, useState as useState24 } from "react";
|
|
14683
14740
|
import { isFunction as isFunction4 } from "@wistia/type-guards";
|
|
14684
14741
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
14685
14742
|
var StyledIconButton2 = styled75(IconButton)`
|
|
@@ -14692,7 +14749,7 @@ var StyledIconButton2 = styled75(IconButton)`
|
|
|
14692
14749
|
`;
|
|
14693
14750
|
var InputPassword = forwardRef24(
|
|
14694
14751
|
({ onVisibilityToggle, disabled = false, ...props }, ref) => {
|
|
14695
|
-
const [isVisible, setIsVisible] =
|
|
14752
|
+
const [isVisible, setIsVisible] = useState24(false);
|
|
14696
14753
|
const handleClick = () => {
|
|
14697
14754
|
const newVisibility = !isVisible;
|
|
14698
14755
|
setIsVisible(newVisibility);
|
|
@@ -14835,17 +14892,17 @@ KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
|
14835
14892
|
|
|
14836
14893
|
// src/components/List/List.tsx
|
|
14837
14894
|
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
14838
|
-
import { styled as styled78, css as
|
|
14895
|
+
import { styled as styled78, css as css41 } from "styled-components";
|
|
14839
14896
|
|
|
14840
14897
|
// src/components/List/ListItem.tsx
|
|
14841
14898
|
import { styled as styled77 } from "styled-components";
|
|
14842
|
-
import { isNil as
|
|
14899
|
+
import { isNil as isNil18 } from "@wistia/type-guards";
|
|
14843
14900
|
import { jsx as jsx318 } from "react/jsx-runtime";
|
|
14844
14901
|
var ListItemComponent = styled77.li`
|
|
14845
14902
|
margin-bottom: var(--wui-space-02);
|
|
14846
14903
|
`;
|
|
14847
14904
|
var ListItem = ({ children }) => {
|
|
14848
|
-
if (
|
|
14905
|
+
if (isNil18(children)) {
|
|
14849
14906
|
return null;
|
|
14850
14907
|
}
|
|
14851
14908
|
return /* @__PURE__ */ jsx318(ListItemComponent, { children });
|
|
@@ -14854,7 +14911,7 @@ ListItem.displayName = "ListItem_UI";
|
|
|
14854
14911
|
|
|
14855
14912
|
// src/components/List/List.tsx
|
|
14856
14913
|
import { jsx as jsx319, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
14857
|
-
var spacesStyle =
|
|
14914
|
+
var spacesStyle = css41`
|
|
14858
14915
|
overflow: hidden;
|
|
14859
14916
|
padding-left: 0;
|
|
14860
14917
|
vertical-align: bottom;
|
|
@@ -14876,7 +14933,7 @@ var spacesStyle = css39`
|
|
|
14876
14933
|
}
|
|
14877
14934
|
}
|
|
14878
14935
|
`;
|
|
14879
|
-
var commasStyle =
|
|
14936
|
+
var commasStyle = css41`
|
|
14880
14937
|
${spacesStyle};
|
|
14881
14938
|
|
|
14882
14939
|
li {
|
|
@@ -14886,7 +14943,7 @@ var commasStyle = css39`
|
|
|
14886
14943
|
}
|
|
14887
14944
|
}
|
|
14888
14945
|
`;
|
|
14889
|
-
var slashesStyle =
|
|
14946
|
+
var slashesStyle = css41`
|
|
14890
14947
|
${spacesStyle};
|
|
14891
14948
|
|
|
14892
14949
|
li {
|
|
@@ -14897,7 +14954,7 @@ var slashesStyle = css39`
|
|
|
14897
14954
|
}
|
|
14898
14955
|
}
|
|
14899
14956
|
`;
|
|
14900
|
-
var breadcrumbsStyle =
|
|
14957
|
+
var breadcrumbsStyle = css41`
|
|
14901
14958
|
${spacesStyle};
|
|
14902
14959
|
|
|
14903
14960
|
li {
|
|
@@ -14908,7 +14965,7 @@ var breadcrumbsStyle = css39`
|
|
|
14908
14965
|
}
|
|
14909
14966
|
}
|
|
14910
14967
|
`;
|
|
14911
|
-
var unbulletedStyle =
|
|
14968
|
+
var unbulletedStyle = css41`
|
|
14912
14969
|
list-style: none;
|
|
14913
14970
|
padding-left: 0;
|
|
14914
14971
|
`;
|
|
@@ -15017,12 +15074,12 @@ import { styled as styled80 } from "styled-components";
|
|
|
15017
15074
|
import ReactMarkdown from "react-markdown";
|
|
15018
15075
|
|
|
15019
15076
|
// src/css/baseMarkdownCss.tsx
|
|
15020
|
-
import { css as
|
|
15077
|
+
import { css as css42 } from "styled-components";
|
|
15021
15078
|
var textSizeToTokenMap = {
|
|
15022
15079
|
body2: "--wui-typography-body-2-size",
|
|
15023
15080
|
body3: "--wui-typography-body-3-size"
|
|
15024
15081
|
};
|
|
15025
|
-
var baseMarkdownCss = (textSize = "body2") =>
|
|
15082
|
+
var baseMarkdownCss = (textSize = "body2") => css42`
|
|
15026
15083
|
--wui-markdown-base-unit: var(${textSizeToTokenMap[textSize]});
|
|
15027
15084
|
|
|
15028
15085
|
font-size: var(--wui-markdown-base-unit);
|
|
@@ -15361,40 +15418,38 @@ Meter.displayName = "Meter_UI";
|
|
|
15361
15418
|
|
|
15362
15419
|
// src/components/Modal/Modal.tsx
|
|
15363
15420
|
import { forwardRef as forwardRef26 } from "react";
|
|
15364
|
-
import { styled as
|
|
15365
|
-
import {
|
|
15366
|
-
|
|
15367
|
-
Portal as DialogPortal,
|
|
15368
|
-
Description as DialogDescription
|
|
15369
|
-
} from "@radix-ui/react-dialog";
|
|
15370
|
-
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
15421
|
+
import { styled as styled85 } from "styled-components";
|
|
15422
|
+
import { Dialog as Dialog5 } from "@base-ui/react/dialog";
|
|
15423
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
15371
15424
|
|
|
15372
15425
|
// src/components/Modal/ModalHeader.tsx
|
|
15373
|
-
import { styled as
|
|
15374
|
-
import {
|
|
15426
|
+
import { styled as styled82 } from "styled-components";
|
|
15427
|
+
import { Dialog as Dialog2 } from "@base-ui/react/dialog";
|
|
15375
15428
|
|
|
15376
15429
|
// src/components/Modal/ModalCloseButton.tsx
|
|
15377
|
-
import {
|
|
15378
|
-
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
15430
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
15379
15431
|
import { jsx as jsx323 } from "react/jsx-runtime";
|
|
15380
|
-
var CloseButton = styled82(DialogClose)`
|
|
15381
|
-
align-self: start;
|
|
15382
|
-
`;
|
|
15383
15432
|
var ModalCloseButton = () => {
|
|
15384
|
-
return /* @__PURE__ */ jsx323(
|
|
15385
|
-
|
|
15433
|
+
return /* @__PURE__ */ jsx323(
|
|
15434
|
+
Dialog.Close,
|
|
15386
15435
|
{
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15436
|
+
render: /* @__PURE__ */ jsx323(
|
|
15437
|
+
IconButton,
|
|
15438
|
+
{
|
|
15439
|
+
label: "Dismiss modal",
|
|
15440
|
+
size: "sm",
|
|
15441
|
+
style: { alignSelf: "start" },
|
|
15442
|
+
variant: "ghost",
|
|
15443
|
+
children: /* @__PURE__ */ jsx323(Icon, { type: "close" })
|
|
15444
|
+
}
|
|
15445
|
+
)
|
|
15391
15446
|
}
|
|
15392
|
-
)
|
|
15447
|
+
);
|
|
15393
15448
|
};
|
|
15394
15449
|
|
|
15395
15450
|
// src/components/Modal/ModalHeader.tsx
|
|
15396
15451
|
import { jsx as jsx324, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
15397
|
-
var Header =
|
|
15452
|
+
var Header = styled82.header`
|
|
15398
15453
|
display: flex;
|
|
15399
15454
|
order: 1;
|
|
15400
15455
|
padding: 0 var(--wui-space-05);
|
|
@@ -15402,7 +15457,7 @@ var Header = styled83.header`
|
|
|
15402
15457
|
gap: var(--wui-space-01);
|
|
15403
15458
|
justify-content: ${({ $hideTitle }) => $hideTitle ? "flex-end" : "space-between"}; /* ensure ModalCloseButton is right-aligned */
|
|
15404
15459
|
|
|
15405
|
-
/*
|
|
15460
|
+
/* Dialog.Title creates an h2 element which inherits some margin */
|
|
15406
15461
|
h2 {
|
|
15407
15462
|
margin: 0;
|
|
15408
15463
|
padding-right: ${({ $hideCloseButon }) => $hideCloseButon ? "0" : "var(--wui-space-03)"};
|
|
@@ -15414,7 +15469,7 @@ var Header = styled83.header`
|
|
|
15414
15469
|
top: var(--wui-space-03);
|
|
15415
15470
|
}
|
|
15416
15471
|
`;
|
|
15417
|
-
var Title =
|
|
15472
|
+
var Title = styled82(Dialog2.Title)`
|
|
15418
15473
|
font-family: var(--wui-typography-heading-2-family);
|
|
15419
15474
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
15420
15475
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -15442,8 +15497,9 @@ var ModalHeader = ({
|
|
|
15442
15497
|
|
|
15443
15498
|
// src/components/Modal/ModalContent.tsx
|
|
15444
15499
|
import { forwardRef as forwardRef25 } from "react";
|
|
15445
|
-
import { styled as
|
|
15446
|
-
import {
|
|
15500
|
+
import { styled as styled83, css as css43, keyframes as keyframes6 } from "styled-components";
|
|
15501
|
+
import { Dialog as Dialog3 } from "@base-ui/react/dialog";
|
|
15502
|
+
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
15447
15503
|
|
|
15448
15504
|
// src/components/Modal/constants.ts
|
|
15449
15505
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
@@ -15491,7 +15547,7 @@ var modalExit = keyframes6`
|
|
|
15491
15547
|
transform: translateX(-50%) translateY(calc(var(--wui-modal-translate-y) + 24px));
|
|
15492
15548
|
}
|
|
15493
15549
|
`;
|
|
15494
|
-
var centeredModalStyles =
|
|
15550
|
+
var centeredModalStyles = css43`
|
|
15495
15551
|
--wui-modal-screen-offset: var(--wui-space-05);
|
|
15496
15552
|
--wui-modal-translate-y: -50%;
|
|
15497
15553
|
|
|
@@ -15503,11 +15559,11 @@ var centeredModalStyles = css41`
|
|
|
15503
15559
|
transform-origin: left center;
|
|
15504
15560
|
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
15505
15561
|
|
|
15506
|
-
&[data-
|
|
15562
|
+
&[data-closed] {
|
|
15507
15563
|
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
15508
15564
|
}
|
|
15509
15565
|
`;
|
|
15510
|
-
var fixedTopModalStyles =
|
|
15566
|
+
var fixedTopModalStyles = css43`
|
|
15511
15567
|
--wui-modal-screen-offset-top: 15vh;
|
|
15512
15568
|
--wui-modal-screen-offset-bottom: 5vh;
|
|
15513
15569
|
--wui-modal-translate-y: 0%;
|
|
@@ -15522,7 +15578,7 @@ var fixedTopModalStyles = css41`
|
|
|
15522
15578
|
transform-origin: left center;
|
|
15523
15579
|
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
15524
15580
|
|
|
15525
|
-
&[data-
|
|
15581
|
+
&[data-closed] {
|
|
15526
15582
|
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
15527
15583
|
}
|
|
15528
15584
|
`;
|
|
@@ -15548,7 +15604,7 @@ var slideOutRight = keyframes6`
|
|
|
15548
15604
|
transform: translateX(100%);
|
|
15549
15605
|
}
|
|
15550
15606
|
`;
|
|
15551
|
-
var rightSidePanelModalStyles =
|
|
15607
|
+
var rightSidePanelModalStyles = css43`
|
|
15552
15608
|
--wui-modal-screen-offset: var(--wui-space-05);
|
|
15553
15609
|
|
|
15554
15610
|
height: calc(100vh - var(--wui-modal-screen-offset) * 2);
|
|
@@ -15557,7 +15613,7 @@ var rightSidePanelModalStyles = css41`
|
|
|
15557
15613
|
animation: ${slideInRight} var(--wui-motion-duration-05) var(--wui-motion-ease-out);
|
|
15558
15614
|
transform-origin: right center;
|
|
15559
15615
|
|
|
15560
|
-
&[data-
|
|
15616
|
+
&[data-closed] {
|
|
15561
15617
|
animation: ${slideOutRight} var(--wui-motion-duration-03) var(--wui-motion-ease-in);
|
|
15562
15618
|
}
|
|
15563
15619
|
`;
|
|
@@ -15566,7 +15622,7 @@ var positionStyleMap = {
|
|
|
15566
15622
|
"fixed-top": fixedTopModalStyles,
|
|
15567
15623
|
"right-side-panel": rightSidePanelModalStyles
|
|
15568
15624
|
};
|
|
15569
|
-
var StyledModalContent =
|
|
15625
|
+
var StyledModalContent = styled83(Dialog3.Popup)`
|
|
15570
15626
|
position: fixed;
|
|
15571
15627
|
display: flex;
|
|
15572
15628
|
flex-direction: column;
|
|
@@ -15594,7 +15650,7 @@ var StyledModalContent = styled84(DialogContent)`
|
|
|
15594
15650
|
}
|
|
15595
15651
|
`;
|
|
15596
15652
|
var ModalContent = forwardRef25(
|
|
15597
|
-
({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
|
|
15653
|
+
({ width, positionVariant = "fixed-top", initialFocusRef, children, ...props }, ref) => {
|
|
15598
15654
|
useFocusRestore();
|
|
15599
15655
|
return /* @__PURE__ */ jsx325(
|
|
15600
15656
|
StyledModalContent,
|
|
@@ -15602,6 +15658,7 @@ var ModalContent = forwardRef25(
|
|
|
15602
15658
|
ref,
|
|
15603
15659
|
$positionVariant: positionVariant,
|
|
15604
15660
|
$width: width,
|
|
15661
|
+
...isNotNil34(initialFocusRef) ? { initialFocus: initialFocusRef } : {},
|
|
15605
15662
|
...props,
|
|
15606
15663
|
children
|
|
15607
15664
|
}
|
|
@@ -15610,8 +15667,8 @@ var ModalContent = forwardRef25(
|
|
|
15610
15667
|
);
|
|
15611
15668
|
|
|
15612
15669
|
// src/components/Modal/ModalOverlay.tsx
|
|
15613
|
-
import {
|
|
15614
|
-
import { styled as
|
|
15670
|
+
import { Dialog as Dialog4 } from "@base-ui/react/dialog";
|
|
15671
|
+
import { styled as styled84, keyframes as keyframes7 } from "styled-components";
|
|
15615
15672
|
var backdropShow = keyframes7`
|
|
15616
15673
|
from {
|
|
15617
15674
|
opacity: 0;
|
|
@@ -15630,33 +15687,33 @@ var backdropHide = keyframes7`
|
|
|
15630
15687
|
opacity: 0;
|
|
15631
15688
|
}
|
|
15632
15689
|
`;
|
|
15633
|
-
var ModalOverlay =
|
|
15690
|
+
var ModalOverlay = styled84(Dialog4.Backdrop)`
|
|
15634
15691
|
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
15635
15692
|
background: var(--wui-color-backdrop);
|
|
15636
15693
|
inset: 0;
|
|
15637
15694
|
position: fixed;
|
|
15638
15695
|
z-index: var(--wui-zindex-backdrop);
|
|
15639
15696
|
|
|
15640
|
-
&[data-
|
|
15697
|
+
&[data-closed] {
|
|
15641
15698
|
animation: ${backdropHide} var(--wui-motion-duration-02);
|
|
15642
15699
|
}
|
|
15643
15700
|
`;
|
|
15644
15701
|
|
|
15645
15702
|
// src/components/Modal/Modal.tsx
|
|
15646
15703
|
import { jsx as jsx326, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
15647
|
-
var ModalHiddenDescription =
|
|
15648
|
-
var ModalBody =
|
|
15704
|
+
var ModalHiddenDescription = styled85(Dialog5.Description)({ ...visuallyHiddenStyle });
|
|
15705
|
+
var ModalBody = styled85.div`
|
|
15649
15706
|
flex-direction: column;
|
|
15650
15707
|
display: flex;
|
|
15651
15708
|
flex: 1 0 0;
|
|
15652
15709
|
padding: 0 var(--wui-space-05);
|
|
15653
15710
|
`;
|
|
15654
|
-
var ModalScrollArea =
|
|
15711
|
+
var ModalScrollArea = styled85.div`
|
|
15655
15712
|
order: 2;
|
|
15656
15713
|
max-height: 90vh;
|
|
15657
15714
|
overflow-y: auto;
|
|
15658
15715
|
`;
|
|
15659
|
-
var ModalFooter =
|
|
15716
|
+
var ModalFooter = styled85.footer`
|
|
15660
15717
|
padding: 0 var(--wui-space-05);
|
|
15661
15718
|
order: 3;
|
|
15662
15719
|
`;
|
|
@@ -15675,34 +15732,27 @@ var Modal = forwardRef26(
|
|
|
15675
15732
|
...props
|
|
15676
15733
|
}, ref) => {
|
|
15677
15734
|
return /* @__PURE__ */ jsx326(
|
|
15678
|
-
|
|
15735
|
+
Dialog5.Root,
|
|
15679
15736
|
{
|
|
15680
15737
|
onOpenChange: (open2) => {
|
|
15681
|
-
if (!open2 &&
|
|
15738
|
+
if (!open2 && isNotNil35(onRequestClose)) {
|
|
15682
15739
|
onRequestClose();
|
|
15683
15740
|
}
|
|
15684
15741
|
},
|
|
15685
15742
|
open: isOpen,
|
|
15686
|
-
children: /* @__PURE__ */ jsxs54(
|
|
15743
|
+
children: /* @__PURE__ */ jsxs54(Dialog5.Portal, { children: [
|
|
15687
15744
|
/* @__PURE__ */ jsx326(ModalOverlay, {}),
|
|
15688
15745
|
/* @__PURE__ */ jsxs54(
|
|
15689
15746
|
ModalContent,
|
|
15690
15747
|
{
|
|
15691
15748
|
ref,
|
|
15692
|
-
|
|
15693
|
-
if (isNotNil34(initialFocusRef) && initialFocusRef.current) {
|
|
15694
|
-
event.preventDefault();
|
|
15695
|
-
requestAnimationFrame(() => {
|
|
15696
|
-
initialFocusRef.current?.focus();
|
|
15697
|
-
});
|
|
15698
|
-
}
|
|
15699
|
-
},
|
|
15749
|
+
initialFocusRef,
|
|
15700
15750
|
positionVariant,
|
|
15701
15751
|
width,
|
|
15702
15752
|
...props,
|
|
15703
15753
|
children: [
|
|
15704
15754
|
/* @__PURE__ */ jsx326(ModalScrollArea, { children: /* @__PURE__ */ jsx326(ModalBody, { children }) }),
|
|
15705
|
-
|
|
15755
|
+
isNotNil35(footer) ? /* @__PURE__ */ jsx326(ModalFooter, { children: footer }) : null,
|
|
15706
15756
|
hideCloseButton && hideTitle ? null : /* @__PURE__ */ jsx326(
|
|
15707
15757
|
ModalHeader,
|
|
15708
15758
|
{
|
|
@@ -15745,20 +15795,28 @@ var ModalCallout = ({ title, image, children }) => {
|
|
|
15745
15795
|
ModalCallout.displayName = "ModalCallout_UI";
|
|
15746
15796
|
|
|
15747
15797
|
// src/components/Popover/Popover.tsx
|
|
15748
|
-
import {
|
|
15749
|
-
import { styled as
|
|
15798
|
+
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
15799
|
+
import { styled as styled87, css as css45 } from "styled-components";
|
|
15750
15800
|
|
|
15751
15801
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
15752
|
-
import { isNotNil as
|
|
15802
|
+
import { isNotNil as isNotNil36 } from "@wistia/type-guards";
|
|
15753
15803
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
15754
|
-
return
|
|
15804
|
+
return isNotNil36(onOpenChange) && isNotNil36(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
15755
15805
|
};
|
|
15756
15806
|
|
|
15757
15807
|
// src/components/Popover/PopoverArrow.tsx
|
|
15758
|
-
import {
|
|
15759
|
-
import { styled as
|
|
15808
|
+
import { Popover as Popover4 } from "@base-ui/react/popover";
|
|
15809
|
+
import { styled as styled86, css as css44, keyframes as keyframes8 } from "styled-components";
|
|
15760
15810
|
import { jsx as jsx328, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
15761
|
-
var
|
|
15811
|
+
var StyledArrowSvg = styled86.svg`
|
|
15812
|
+
/* Override Base UI's inline top positioning and rotate the arrow to match Radix behavior.
|
|
15813
|
+
Radix applied rotate(180deg) so the circle sits near the trigger and the stalk extends
|
|
15814
|
+
down toward the popup. Base UI does not rotate the arrow automatically. */
|
|
15815
|
+
top: 0 !important;
|
|
15816
|
+
transform: rotate(180deg);
|
|
15817
|
+
transform-origin: center 0;
|
|
15818
|
+
`;
|
|
15819
|
+
var StyledPath = styled86.path`
|
|
15762
15820
|
fill: var(--wui-color-border-secondary);
|
|
15763
15821
|
`;
|
|
15764
15822
|
var circleAnimation = keyframes8`
|
|
@@ -15769,7 +15827,7 @@ var circleAnimation = keyframes8`
|
|
|
15769
15827
|
opacity: 0;
|
|
15770
15828
|
}
|
|
15771
15829
|
`;
|
|
15772
|
-
var StyledCircle =
|
|
15830
|
+
var StyledCircle = styled86.circle`
|
|
15773
15831
|
stroke: var(--wui-color-border-active);
|
|
15774
15832
|
animation-duration: 2s;
|
|
15775
15833
|
animation-iteration-count: infinite;
|
|
@@ -15790,56 +15848,61 @@ var StyledCircle = styled87.circle`
|
|
|
15790
15848
|
}
|
|
15791
15849
|
|
|
15792
15850
|
@media (prefers-reduced-motion: no-preference) {
|
|
15793
|
-
${({ $isAnimated }) => $isAnimated &&
|
|
15851
|
+
${({ $isAnimated }) => $isAnimated && css44`
|
|
15794
15852
|
animation-name: ${circleAnimation};
|
|
15795
15853
|
`}
|
|
15796
15854
|
}
|
|
15797
15855
|
`;
|
|
15798
15856
|
var PopoverArrow = ({ isAnimated }) => {
|
|
15799
|
-
return /* @__PURE__ */ jsx328(
|
|
15800
|
-
|
|
15857
|
+
return /* @__PURE__ */ jsx328(
|
|
15858
|
+
Popover4.Arrow,
|
|
15801
15859
|
{
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15825
|
-
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15860
|
+
render: /* @__PURE__ */ jsxs56(
|
|
15861
|
+
StyledArrowSvg,
|
|
15862
|
+
{
|
|
15863
|
+
fill: "none",
|
|
15864
|
+
height: "56",
|
|
15865
|
+
viewBox: "0 0 48 56",
|
|
15866
|
+
width: "48",
|
|
15867
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15868
|
+
children: [
|
|
15869
|
+
/* @__PURE__ */ jsx328(StyledPath, { d: "M24 26.6667C21.0545 26.6667 18.6667 29.0545 18.6667 32C18.6667 34.9455 21.0545 37.3333 24 37.3333C26.9455 37.3333 29.3333 34.9455 29.3333 32C29.3333 29.0545 26.9455 26.6667 24 26.6667ZM23 0V32H25V0H23Z" }),
|
|
15870
|
+
/* @__PURE__ */ jsx328(
|
|
15871
|
+
StyledCircle,
|
|
15872
|
+
{
|
|
15873
|
+
$isAnimated: isAnimated,
|
|
15874
|
+
cx: "24",
|
|
15875
|
+
cy: "32",
|
|
15876
|
+
"data-wui-popover-arrow-inner-circle": true,
|
|
15877
|
+
r: "10",
|
|
15878
|
+
strokeWidth: "4"
|
|
15879
|
+
}
|
|
15880
|
+
),
|
|
15881
|
+
/* @__PURE__ */ jsx328(
|
|
15882
|
+
StyledCircle,
|
|
15883
|
+
{
|
|
15884
|
+
$isAnimated: isAnimated,
|
|
15885
|
+
cx: "24",
|
|
15886
|
+
cy: "32",
|
|
15887
|
+
"data-wui-popover-arrow-outer-circle": true,
|
|
15888
|
+
r: "20",
|
|
15889
|
+
strokeWidth: "8"
|
|
15890
|
+
}
|
|
15891
|
+
)
|
|
15892
|
+
]
|
|
15893
|
+
}
|
|
15894
|
+
)
|
|
15832
15895
|
}
|
|
15833
|
-
)
|
|
15896
|
+
);
|
|
15834
15897
|
};
|
|
15835
15898
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
15836
15899
|
|
|
15837
15900
|
// src/components/Popover/Popover.tsx
|
|
15838
15901
|
import { jsx as jsx329, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
15839
|
-
var
|
|
15902
|
+
var StyledPopup4 = styled87(BasePopover.Popup)`
|
|
15840
15903
|
z-index: var(--wui-zindex-popover);
|
|
15841
15904
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
15842
|
-
${({ $unstyled }) => !$unstyled &&
|
|
15905
|
+
${({ $unstyled }) => !$unstyled && css45`
|
|
15843
15906
|
border-radius: var(--wui-border-radius-02);
|
|
15844
15907
|
padding: var(--wui-space-04);
|
|
15845
15908
|
max-width: var(--wui-popover-max-width, 320px);
|
|
@@ -15850,13 +15913,17 @@ var StyledContent3 = styled88(Content3)`
|
|
|
15850
15913
|
overflow: auto;
|
|
15851
15914
|
`}
|
|
15852
15915
|
|
|
15916
|
+
${({ $withArrow }) => $withArrow && css45`
|
|
15917
|
+
overflow: visible;
|
|
15918
|
+
`}
|
|
15919
|
+
|
|
15853
15920
|
[data-wui-popover-close] {
|
|
15854
15921
|
position: absolute;
|
|
15855
15922
|
top: var(--wui-space-02);
|
|
15856
15923
|
right: var(--wui-space-02);
|
|
15857
15924
|
}
|
|
15858
15925
|
`;
|
|
15859
|
-
var
|
|
15926
|
+
var Popover5 = ({
|
|
15860
15927
|
children,
|
|
15861
15928
|
trigger,
|
|
15862
15929
|
isOpen = false,
|
|
@@ -15869,63 +15936,75 @@ var Popover = ({
|
|
|
15869
15936
|
isAnimated = false,
|
|
15870
15937
|
colorScheme = "inherit",
|
|
15871
15938
|
style,
|
|
15939
|
+
side,
|
|
15940
|
+
align,
|
|
15872
15941
|
...props
|
|
15873
15942
|
}) => {
|
|
15874
|
-
const sideOffset = withArrow ?
|
|
15943
|
+
const sideOffset = withArrow ? 32 : 8;
|
|
15875
15944
|
const mergedStyle = {
|
|
15876
15945
|
"--wui-popover-max-width": maxWidth,
|
|
15877
15946
|
"--wui-popover-max-height": maxHeight,
|
|
15878
15947
|
...style
|
|
15879
15948
|
};
|
|
15880
|
-
return /* @__PURE__ */ jsxs57(
|
|
15881
|
-
/* @__PURE__ */ jsx329(
|
|
15882
|
-
/* @__PURE__ */ jsx329(
|
|
15883
|
-
|
|
15949
|
+
return /* @__PURE__ */ jsxs57(BasePopover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
15950
|
+
/* @__PURE__ */ jsx329(BasePopover.Trigger, { render: trigger }),
|
|
15951
|
+
/* @__PURE__ */ jsx329(BasePopover.Portal, { children: /* @__PURE__ */ jsx329(
|
|
15952
|
+
BasePopover.Positioner,
|
|
15884
15953
|
{
|
|
15885
|
-
|
|
15954
|
+
align,
|
|
15955
|
+
side,
|
|
15886
15956
|
sideOffset,
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
|
|
15891
|
-
|
|
15892
|
-
|
|
15893
|
-
|
|
15894
|
-
|
|
15895
|
-
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15957
|
+
children: /* @__PURE__ */ jsxs57(
|
|
15958
|
+
StyledPopup4,
|
|
15959
|
+
{
|
|
15960
|
+
$colorScheme: colorScheme,
|
|
15961
|
+
...props,
|
|
15962
|
+
$unstyled: unstyled,
|
|
15963
|
+
$withArrow: withArrow,
|
|
15964
|
+
style: mergedStyle,
|
|
15965
|
+
children: [
|
|
15966
|
+
!hideCloseButton && /* @__PURE__ */ jsx329(
|
|
15967
|
+
BasePopover.Close,
|
|
15968
|
+
{
|
|
15969
|
+
render: /* @__PURE__ */ jsx329(
|
|
15970
|
+
IconButton,
|
|
15971
|
+
{
|
|
15972
|
+
"data-wui-popover-close": true,
|
|
15973
|
+
label: "Close",
|
|
15974
|
+
variant: "ghost",
|
|
15975
|
+
children: /* @__PURE__ */ jsx329(Icon, { type: "close" })
|
|
15976
|
+
}
|
|
15977
|
+
)
|
|
15978
|
+
}
|
|
15979
|
+
),
|
|
15980
|
+
withArrow ? /* @__PURE__ */ jsx329(PopoverArrow, { isAnimated }) : null,
|
|
15981
|
+
/* @__PURE__ */ jsx329("div", { children })
|
|
15982
|
+
]
|
|
15983
|
+
}
|
|
15984
|
+
)
|
|
15903
15985
|
}
|
|
15904
15986
|
) })
|
|
15905
15987
|
] });
|
|
15906
15988
|
};
|
|
15907
|
-
|
|
15989
|
+
Popover5.displayName = "Popover_UI";
|
|
15908
15990
|
|
|
15909
15991
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
15910
|
-
import { styled as
|
|
15911
|
-
import {
|
|
15912
|
-
import { isNotNil as
|
|
15992
|
+
import { styled as styled88 } from "styled-components";
|
|
15993
|
+
import { Progress } from "@base-ui/react/progress";
|
|
15994
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
15913
15995
|
import { jsx as jsx330, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
15914
|
-
var ProgressBarWrapper =
|
|
15996
|
+
var ProgressBarWrapper = styled88.div`
|
|
15915
15997
|
--progress-bar-height: 8px;
|
|
15916
15998
|
|
|
15917
15999
|
display: flex;
|
|
15918
16000
|
align-items: center;
|
|
15919
16001
|
gap: var(--wui-space-02);
|
|
15920
16002
|
`;
|
|
15921
|
-
var
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
return `translateX(-${100 - progressPercentage}%)`;
|
|
15927
|
-
};
|
|
15928
|
-
var ProgressBarLabel = styled89.div`
|
|
16003
|
+
var StyledTrack = styled88(Progress.Track)`
|
|
16004
|
+
height: 100%;
|
|
16005
|
+
overflow: hidden;
|
|
16006
|
+
`;
|
|
16007
|
+
var ProgressBarLabel = styled88.div`
|
|
15929
16008
|
display: flex;
|
|
15930
16009
|
line-height: var(--wui-typography-label-3-line-height);
|
|
15931
16010
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -15933,17 +16012,15 @@ var ProgressBarLabel = styled89.div`
|
|
|
15933
16012
|
color: var(--wui-color-text-secondary);
|
|
15934
16013
|
flex-shrink: 0;
|
|
15935
16014
|
`;
|
|
15936
|
-
var StyledProgressIndicator =
|
|
16015
|
+
var StyledProgressIndicator = styled88(Progress.Indicator)`
|
|
15937
16016
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
15938
16017
|
background-color: var(--wui-color-bg-fill);
|
|
15939
|
-
|
|
15940
|
-
height: 100%;
|
|
16018
|
+
display: block;
|
|
15941
16019
|
border-top-right-radius: var(--wui-border-radius-rounded);
|
|
15942
16020
|
border-bottom-right-radius: var(--wui-border-radius-rounded);
|
|
15943
|
-
transition:
|
|
15944
|
-
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
16021
|
+
transition: width 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
15945
16022
|
`;
|
|
15946
|
-
var StyledProgressBar =
|
|
16023
|
+
var StyledProgressBar = styled88(Progress.Root)`
|
|
15947
16024
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
15948
16025
|
position: relative;
|
|
15949
16026
|
overflow: hidden;
|
|
@@ -15965,25 +16042,19 @@ var ProgressBar = ({
|
|
|
15965
16042
|
...props
|
|
15966
16043
|
}) => {
|
|
15967
16044
|
return /* @__PURE__ */ jsxs58(ProgressBarWrapper, { children: [
|
|
15968
|
-
|
|
16045
|
+
isNotNil37(labelLeft) ? /* @__PURE__ */ jsx330(ProgressBarLabel, { children: labelLeft }) : null,
|
|
15969
16046
|
/* @__PURE__ */ jsx330(
|
|
15970
16047
|
StyledProgressBar,
|
|
15971
16048
|
{
|
|
15972
16049
|
$colorScheme: colorScheme,
|
|
16050
|
+
getAriaValueText: (_formattedValue, value) => value != null ? `${Math.round(value / max * 100)}%` : "indeterminate progress",
|
|
15973
16051
|
max,
|
|
15974
16052
|
value: progress,
|
|
15975
16053
|
...props,
|
|
15976
|
-
children: /* @__PURE__ */ jsx330(
|
|
15977
|
-
StyledProgressIndicator,
|
|
15978
|
-
{
|
|
15979
|
-
$colorScheme: colorScheme,
|
|
15980
|
-
$max: max,
|
|
15981
|
-
$progress: progress
|
|
15982
|
-
}
|
|
15983
|
-
)
|
|
16054
|
+
children: /* @__PURE__ */ jsx330(StyledTrack, { children: /* @__PURE__ */ jsx330(StyledProgressIndicator, { $colorScheme: colorScheme }) })
|
|
15984
16055
|
}
|
|
15985
16056
|
),
|
|
15986
|
-
|
|
16057
|
+
isNotNil37(labelRight) ? /* @__PURE__ */ jsx330(ProgressBarLabel, { children: labelRight }) : null
|
|
15987
16058
|
] });
|
|
15988
16059
|
};
|
|
15989
16060
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
@@ -15991,17 +16062,17 @@ ProgressBar.displayName = "ProgressBar_UI";
|
|
|
15991
16062
|
// src/components/Radio/Radio.tsx
|
|
15992
16063
|
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
15993
16064
|
import { forwardRef as forwardRef27, useId as useId6 } from "react";
|
|
15994
|
-
import { styled as
|
|
16065
|
+
import { styled as styled89, css as css46 } from "styled-components";
|
|
15995
16066
|
import { jsx as jsx331, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
15996
|
-
var sizeSmall2 =
|
|
16067
|
+
var sizeSmall2 = css46`
|
|
15997
16068
|
--wui-radio-size: 14px;
|
|
15998
16069
|
--wui-radio-icon-size: 7px;
|
|
15999
16070
|
`;
|
|
16000
|
-
var sizeMedium2 =
|
|
16071
|
+
var sizeMedium2 = css46`
|
|
16001
16072
|
--wui-radio-size: 16px;
|
|
16002
16073
|
--wui-radio-icon-size: 8px;
|
|
16003
16074
|
`;
|
|
16004
|
-
var sizeLarge2 =
|
|
16075
|
+
var sizeLarge2 = css46`
|
|
16005
16076
|
--wui-radio-size: 20px;
|
|
16006
16077
|
--wui-radio-icon-size: 10px;
|
|
16007
16078
|
`;
|
|
@@ -16014,7 +16085,7 @@ var getSizeCss3 = (size) => {
|
|
|
16014
16085
|
}
|
|
16015
16086
|
return sizeMedium2;
|
|
16016
16087
|
};
|
|
16017
|
-
var StyledRadioWrapper =
|
|
16088
|
+
var StyledRadioWrapper = styled89.div`
|
|
16018
16089
|
--wui-radio-background-color: var(--wui-color-bg-surface);
|
|
16019
16090
|
--wui-radio-border-color: var(--wui-color-border-secondary);
|
|
16020
16091
|
--wui-radio-icon-color: transparent;
|
|
@@ -16048,7 +16119,7 @@ var StyledRadioWrapper = styled90.div`
|
|
|
16048
16119
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
16049
16120
|
user-select: none;
|
|
16050
16121
|
`;
|
|
16051
|
-
var StyledRadioInput =
|
|
16122
|
+
var StyledRadioInput = styled89.div`
|
|
16052
16123
|
${({ $size }) => getSizeCss3($size)}
|
|
16053
16124
|
width: var(--wui-radio-size);
|
|
16054
16125
|
height: var(--wui-radio-size);
|
|
@@ -16074,10 +16145,10 @@ var StyledRadioInput = styled90.div`
|
|
|
16074
16145
|
transform: translate(-50%, -50%);
|
|
16075
16146
|
}
|
|
16076
16147
|
`;
|
|
16077
|
-
var StyledHiddenRadioInput =
|
|
16148
|
+
var StyledHiddenRadioInput = styled89.input`
|
|
16078
16149
|
${visuallyHiddenStyle}
|
|
16079
16150
|
`;
|
|
16080
|
-
var
|
|
16151
|
+
var Radio2 = forwardRef27(
|
|
16081
16152
|
({
|
|
16082
16153
|
checked,
|
|
16083
16154
|
disabled = false,
|
|
@@ -16139,24 +16210,24 @@ var Radio = forwardRef27(
|
|
|
16139
16210
|
);
|
|
16140
16211
|
}
|
|
16141
16212
|
);
|
|
16142
|
-
|
|
16213
|
+
Radio2.displayName = "Radio_UI";
|
|
16143
16214
|
|
|
16144
16215
|
// src/components/RadioCard/RadioCard.tsx
|
|
16145
16216
|
import { forwardRef as forwardRef29 } from "react";
|
|
16146
16217
|
|
|
16147
16218
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
16148
16219
|
import { forwardRef as forwardRef28, useId as useId7 } from "react";
|
|
16149
|
-
import { styled as
|
|
16220
|
+
import { styled as styled90, css as css47 } from "styled-components";
|
|
16150
16221
|
import { isNonEmptyString as isNonEmptyString8, isNotUndefined as isNotUndefined15 } from "@wistia/type-guards";
|
|
16151
16222
|
import { jsx as jsx332, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
16152
|
-
var checkedStyles =
|
|
16223
|
+
var checkedStyles = css47`
|
|
16153
16224
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
16154
16225
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
16155
16226
|
--wui-radio-card-background-color: var(--wui-color-bg-surface-info);
|
|
16156
16227
|
--wui-color-text: var(--wui-color-text-info);
|
|
16157
16228
|
--wui-color-text-secondary: var(--wui-color-text-info);
|
|
16158
16229
|
`;
|
|
16159
|
-
var disabledStyles =
|
|
16230
|
+
var disabledStyles = css47`
|
|
16160
16231
|
--wui-radio-card-border-color: var(--wui-color-border-disabled);
|
|
16161
16232
|
--wui-radio-card-background-color: var(--wui-color-bg-surface-disabled);
|
|
16162
16233
|
--wui-radio-card-cursor: not-allowed;
|
|
@@ -16164,10 +16235,10 @@ var disabledStyles = css45`
|
|
|
16164
16235
|
--wui-color-text: var(--wui-color-text-disabled);
|
|
16165
16236
|
--wui-color-text-secondary: var(--wui-color-text-disabled);
|
|
16166
16237
|
`;
|
|
16167
|
-
var focusStyles =
|
|
16238
|
+
var focusStyles = css47`
|
|
16168
16239
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
16169
16240
|
`;
|
|
16170
|
-
var imageCoverStyles =
|
|
16241
|
+
var imageCoverStyles = css47`
|
|
16171
16242
|
--wui-radio-card-image-inset: 0px;
|
|
16172
16243
|
--wui-radio-card-border-width: 0px;
|
|
16173
16244
|
--wui-inset-shadow-width: 1px;
|
|
@@ -16198,7 +16269,7 @@ var imageCoverStyles = css45`
|
|
|
16198
16269
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
16199
16270
|
}
|
|
16200
16271
|
`;
|
|
16201
|
-
var StyledCard2 =
|
|
16272
|
+
var StyledCard2 = styled90.label`
|
|
16202
16273
|
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
16203
16274
|
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
16204
16275
|
--wui-radio-card-cursor: pointer;
|
|
@@ -16252,7 +16323,7 @@ var StyledCard2 = styled91.label`
|
|
|
16252
16323
|
}
|
|
16253
16324
|
}
|
|
16254
16325
|
`;
|
|
16255
|
-
var StyledHiddenInput =
|
|
16326
|
+
var StyledHiddenInput = styled90.input`
|
|
16256
16327
|
${visuallyHiddenStyle}
|
|
16257
16328
|
`;
|
|
16258
16329
|
var RadioCardRoot = forwardRef28(
|
|
@@ -16309,12 +16380,12 @@ var RadioCardRoot = forwardRef28(
|
|
|
16309
16380
|
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
16310
16381
|
|
|
16311
16382
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16312
|
-
import { styled as
|
|
16313
|
-
import { isNotNil as
|
|
16383
|
+
import { styled as styled92 } from "styled-components";
|
|
16384
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
16314
16385
|
|
|
16315
16386
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
16316
|
-
import { styled as
|
|
16317
|
-
var RadioCardIndicator =
|
|
16387
|
+
import { styled as styled91 } from "styled-components";
|
|
16388
|
+
var RadioCardIndicator = styled91.div`
|
|
16318
16389
|
--wui-radio-card-indicator-size: 14px;
|
|
16319
16390
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
16320
16391
|
--wui-radio-card-indicator-fill-color: var(--wui-color-bg-fill);
|
|
@@ -16364,21 +16435,21 @@ RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
|
16364
16435
|
|
|
16365
16436
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16366
16437
|
import { jsx as jsx333, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
16367
|
-
var StyledCardContent =
|
|
16438
|
+
var StyledCardContent = styled92.div`
|
|
16368
16439
|
display: grid;
|
|
16369
16440
|
grid-auto-flow: column;
|
|
16370
16441
|
gap: var(--wui-space-02);
|
|
16371
16442
|
`;
|
|
16372
|
-
var StyledCardIcon =
|
|
16443
|
+
var StyledCardIcon = styled92.div`
|
|
16373
16444
|
display: contents;
|
|
16374
16445
|
`;
|
|
16375
|
-
var StyledGatedIcon =
|
|
16446
|
+
var StyledGatedIcon = styled92.div`
|
|
16376
16447
|
position: absolute;
|
|
16377
16448
|
right: 10px;
|
|
16378
16449
|
top: 10px;
|
|
16379
16450
|
z-index: 1;
|
|
16380
16451
|
`;
|
|
16381
|
-
var StyledIndicatorContainer =
|
|
16452
|
+
var StyledIndicatorContainer = styled92.div`
|
|
16382
16453
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
16383
16454
|
display: flex;
|
|
16384
16455
|
align-items: center;
|
|
@@ -16391,7 +16462,7 @@ var RadioCardDefaultLayout = ({
|
|
|
16391
16462
|
isGated = false
|
|
16392
16463
|
}) => {
|
|
16393
16464
|
return /* @__PURE__ */ jsxs61(StyledCardContent, { children: [
|
|
16394
|
-
showIndicator ? /* @__PURE__ */ jsx333(StyledIndicatorContainer, { $hasIcon:
|
|
16465
|
+
showIndicator ? /* @__PURE__ */ jsx333(StyledIndicatorContainer, { $hasIcon: isNotNil38(icon), children: /* @__PURE__ */ jsx333(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
16395
16466
|
isGated ? /* @__PURE__ */ jsx333(StyledGatedIcon, { "data-testid": "wui-radio-gated-icon", children: /* @__PURE__ */ jsx333(
|
|
16396
16467
|
Icon,
|
|
16397
16468
|
{
|
|
@@ -16401,15 +16472,15 @@ var RadioCardDefaultLayout = ({
|
|
|
16401
16472
|
}
|
|
16402
16473
|
) }) : null,
|
|
16403
16474
|
/* @__PURE__ */ jsxs61(Stack, { gap: "space-02", children: [
|
|
16404
|
-
|
|
16475
|
+
isNotNil38(icon) && /* @__PURE__ */ jsx333(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
16405
16476
|
/* @__PURE__ */ jsxs61(
|
|
16406
16477
|
Stack,
|
|
16407
16478
|
{
|
|
16408
16479
|
gap: "space-01",
|
|
16409
|
-
style:
|
|
16480
|
+
style: isNotNil38(icon) ? { paddingLeft: 2 } : void 0,
|
|
16410
16481
|
children: [
|
|
16411
|
-
|
|
16412
|
-
|
|
16482
|
+
isNotNil38(label) && /* @__PURE__ */ jsx333(Text, { variant: "label3", children: /* @__PURE__ */ jsx333("strong", { children: label }) }),
|
|
16483
|
+
isNotNil38(description) && /* @__PURE__ */ jsx333(
|
|
16413
16484
|
Text,
|
|
16414
16485
|
{
|
|
16415
16486
|
prominence: "secondary",
|
|
@@ -16426,8 +16497,8 @@ var RadioCardDefaultLayout = ({
|
|
|
16426
16497
|
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
16427
16498
|
|
|
16428
16499
|
// src/components/RadioCard/RadioCardChildrenContainer.tsx
|
|
16429
|
-
import { styled as
|
|
16430
|
-
var RadioCardChildrenContainer =
|
|
16500
|
+
import { styled as styled93 } from "styled-components";
|
|
16501
|
+
var RadioCardChildrenContainer = styled93.div`
|
|
16431
16502
|
flex: 1 1 auto;
|
|
16432
16503
|
`;
|
|
16433
16504
|
|
|
@@ -16487,50 +16558,50 @@ var RadioCardImage = forwardRef30(
|
|
|
16487
16558
|
RadioCardImage.displayName = "RadioCardImage_UI";
|
|
16488
16559
|
|
|
16489
16560
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
16490
|
-
import { forwardRef as forwardRef31, useCallback as
|
|
16491
|
-
import { styled as
|
|
16561
|
+
import { forwardRef as forwardRef31, useCallback as useCallback19, useEffect as useEffect21, useMemo as useMemo15, useRef as useRef22, useState as useState25 } from "react";
|
|
16562
|
+
import { styled as styled94 } from "styled-components";
|
|
16492
16563
|
import { throttle } from "throttle-debounce";
|
|
16493
16564
|
import { jsx as jsx336, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
16494
16565
|
var SHADOW_SIZE_PX = 8;
|
|
16495
|
-
var Container10 =
|
|
16566
|
+
var Container10 = styled94.div`
|
|
16496
16567
|
overflow: hidden;
|
|
16497
16568
|
position: relative;
|
|
16498
16569
|
flex: 1 1 auto;
|
|
16499
16570
|
`;
|
|
16500
|
-
var ScrollContainer =
|
|
16571
|
+
var ScrollContainer = styled94.div`
|
|
16501
16572
|
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
16502
16573
|
height: 100%;
|
|
16503
16574
|
width: 100%;
|
|
16504
16575
|
`;
|
|
16505
|
-
var Shadow =
|
|
16576
|
+
var Shadow = styled94.div`
|
|
16506
16577
|
pointer-events: none;
|
|
16507
16578
|
position: absolute;
|
|
16508
16579
|
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
16509
16580
|
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
16510
16581
|
z-index: 1;
|
|
16511
16582
|
`;
|
|
16512
|
-
var ShadowAtTop =
|
|
16583
|
+
var ShadowAtTop = styled94(Shadow)`
|
|
16513
16584
|
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
16514
16585
|
height: 0;
|
|
16515
16586
|
left: 0;
|
|
16516
16587
|
right: 0;
|
|
16517
16588
|
top: 0;
|
|
16518
16589
|
`;
|
|
16519
|
-
var ShadowAtBottom =
|
|
16590
|
+
var ShadowAtBottom = styled94(Shadow)`
|
|
16520
16591
|
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
16521
16592
|
bottom: 0;
|
|
16522
16593
|
height: 0;
|
|
16523
16594
|
left: 0;
|
|
16524
16595
|
right: 0;
|
|
16525
16596
|
`;
|
|
16526
|
-
var ShadowAtLeft =
|
|
16597
|
+
var ShadowAtLeft = styled94(Shadow)`
|
|
16527
16598
|
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
16528
16599
|
bottom: 0;
|
|
16529
16600
|
left: 0;
|
|
16530
16601
|
top: 0;
|
|
16531
16602
|
width: 0;
|
|
16532
16603
|
`;
|
|
16533
|
-
var ShadowAtRight =
|
|
16604
|
+
var ShadowAtRight = styled94(Shadow)`
|
|
16534
16605
|
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
16535
16606
|
bottom: 0;
|
|
16536
16607
|
right: 0;
|
|
@@ -16540,14 +16611,14 @@ var ShadowAtRight = styled95(Shadow)`
|
|
|
16540
16611
|
var ScrollArea = forwardRef31(
|
|
16541
16612
|
({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
|
|
16542
16613
|
const scrollContainerRefInternal = useRef22(null);
|
|
16543
|
-
const [shadowState, setShadowState] =
|
|
16614
|
+
const [shadowState, setShadowState] = useState25({
|
|
16544
16615
|
canScrollUp: false,
|
|
16545
16616
|
canScrollLeft: false,
|
|
16546
16617
|
canScrollDown: false,
|
|
16547
16618
|
canScrollRight: false
|
|
16548
16619
|
});
|
|
16549
16620
|
const scrollContainerRef = mergeRefs([scrollContainerRefInternal, forwardedRef]);
|
|
16550
|
-
const updateShadows =
|
|
16621
|
+
const updateShadows = useCallback19(() => {
|
|
16551
16622
|
const scrollContainer = scrollContainerRefInternal.current;
|
|
16552
16623
|
if (!scrollContainer) {
|
|
16553
16624
|
return;
|
|
@@ -16560,7 +16631,7 @@ var ScrollArea = forwardRef31(
|
|
|
16560
16631
|
});
|
|
16561
16632
|
}, []);
|
|
16562
16633
|
const throttledUpdateShadows = useMemo15(() => throttle(100, updateShadows), [updateShadows]);
|
|
16563
|
-
const onScrollScrollContainer =
|
|
16634
|
+
const onScrollScrollContainer = useCallback19(
|
|
16564
16635
|
(event) => {
|
|
16565
16636
|
onScroll?.(event);
|
|
16566
16637
|
throttledUpdateShadows();
|
|
@@ -16592,18 +16663,18 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
16592
16663
|
|
|
16593
16664
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
16594
16665
|
import { forwardRef as forwardRef32 } from "react";
|
|
16595
|
-
import { styled as
|
|
16596
|
-
import {
|
|
16597
|
-
import { isNil as
|
|
16666
|
+
import { styled as styled96, css as css49 } from "styled-components";
|
|
16667
|
+
import { ToggleGroup as ToggleGroup2 } from "@base-ui/react/toggle-group";
|
|
16668
|
+
import { isNil as isNil19 } from "@wistia/type-guards";
|
|
16598
16669
|
|
|
16599
16670
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
16600
|
-
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo16, useState as
|
|
16671
|
+
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo16, useState as useState26 } from "react";
|
|
16601
16672
|
import { jsx as jsx337 } from "react/jsx-runtime";
|
|
16602
16673
|
var SelectedItemStyleContext = createContext9(null);
|
|
16603
16674
|
var SelectedItemStyleProvider = ({
|
|
16604
16675
|
children
|
|
16605
16676
|
}) => {
|
|
16606
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] =
|
|
16677
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = useState26(null);
|
|
16607
16678
|
const selectedItemIndicatorStyle = useMemo16(
|
|
16608
16679
|
() => selectedItemMeasurements != null ? {
|
|
16609
16680
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
@@ -16630,7 +16701,7 @@ var useSelectedItemStyle = () => {
|
|
|
16630
16701
|
};
|
|
16631
16702
|
|
|
16632
16703
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16633
|
-
import { styled as
|
|
16704
|
+
import { styled as styled95, css as css48 } from "styled-components";
|
|
16634
16705
|
import { isUndefined as isUndefined5 } from "@wistia/type-guards";
|
|
16635
16706
|
|
|
16636
16707
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
@@ -16647,12 +16718,12 @@ var useSegmentedControlValue = () => {
|
|
|
16647
16718
|
|
|
16648
16719
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16649
16720
|
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
16650
|
-
var selectedItemIndicatorStyles =
|
|
16721
|
+
var selectedItemIndicatorStyles = css48`
|
|
16651
16722
|
background-color: var(--wui-color-bg-fill-white);
|
|
16652
16723
|
border-radius: var(--wui-border-radius-rounded);
|
|
16653
16724
|
box-shadow: var(--wui-elevation-01);
|
|
16654
16725
|
`;
|
|
16655
|
-
var SelectedItemIndicatorDiv =
|
|
16726
|
+
var SelectedItemIndicatorDiv = styled95.div`
|
|
16656
16727
|
${selectedItemIndicatorStyles}
|
|
16657
16728
|
left: 0;
|
|
16658
16729
|
position: absolute;
|
|
@@ -16679,7 +16750,7 @@ var SelectedItemIndicator = () => {
|
|
|
16679
16750
|
|
|
16680
16751
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
16681
16752
|
import { jsx as jsx339, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
16682
|
-
var segmentedControlStyles =
|
|
16753
|
+
var segmentedControlStyles = css49`
|
|
16683
16754
|
${({ $colorScheme }) => $colorScheme && getColorScheme($colorScheme)};
|
|
16684
16755
|
${({ $colorScheme }) => $colorScheme !== "nav" && `--wui-color-text-selected: var(--wui-color-text-link);`}
|
|
16685
16756
|
|
|
@@ -16693,7 +16764,7 @@ var segmentedControlStyles = css47`
|
|
|
16693
16764
|
position: relative;
|
|
16694
16765
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
16695
16766
|
`;
|
|
16696
|
-
var StyledSegmentedControl =
|
|
16767
|
+
var StyledSegmentedControl = styled96(ToggleGroup2)`
|
|
16697
16768
|
${segmentedControlStyles}
|
|
16698
16769
|
`;
|
|
16699
16770
|
var SegmentedControl = forwardRef32(
|
|
@@ -16706,7 +16777,7 @@ var SegmentedControl = forwardRef32(
|
|
|
16706
16777
|
onSelectedValueChange,
|
|
16707
16778
|
...props
|
|
16708
16779
|
}, ref) => {
|
|
16709
|
-
if (
|
|
16780
|
+
if (isNil19(children)) {
|
|
16710
16781
|
return null;
|
|
16711
16782
|
}
|
|
16712
16783
|
return /* @__PURE__ */ jsx339(
|
|
@@ -16716,11 +16787,13 @@ var SegmentedControl = forwardRef32(
|
|
|
16716
16787
|
$colorScheme: colorScheme,
|
|
16717
16788
|
$fullWidth: fullWidth,
|
|
16718
16789
|
disabled,
|
|
16719
|
-
|
|
16720
|
-
onValueChange:
|
|
16721
|
-
|
|
16722
|
-
|
|
16723
|
-
|
|
16790
|
+
loopFocus: true,
|
|
16791
|
+
onValueChange: (newValue) => {
|
|
16792
|
+
if (newValue.length > 0 && newValue[0] !== void 0) {
|
|
16793
|
+
onSelectedValueChange(newValue[0]);
|
|
16794
|
+
}
|
|
16795
|
+
},
|
|
16796
|
+
value: [selectedValue],
|
|
16724
16797
|
...props,
|
|
16725
16798
|
children: /* @__PURE__ */ jsx339(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs63(SelectedItemStyleProvider, { children: [
|
|
16726
16799
|
children,
|
|
@@ -16734,12 +16807,12 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
16734
16807
|
|
|
16735
16808
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
16736
16809
|
import { forwardRef as forwardRef33, useEffect as useEffect22, useRef as useRef23 } from "react";
|
|
16737
|
-
import { styled as
|
|
16738
|
-
import {
|
|
16739
|
-
import { isNotNil as
|
|
16810
|
+
import { styled as styled97, css as css50 } from "styled-components";
|
|
16811
|
+
import { Toggle as Toggle2 } from "@base-ui/react/toggle";
|
|
16812
|
+
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
16740
16813
|
import { jsxs as jsxs64 } from "react/jsx-runtime";
|
|
16741
|
-
var segmentedControlItemStyles =
|
|
16742
|
-
all: unset;
|
|
16814
|
+
var segmentedControlItemStyles = css50`
|
|
16815
|
+
all: unset;
|
|
16743
16816
|
align-items: center;
|
|
16744
16817
|
border-radius: var(--wui-border-radius-rounded);
|
|
16745
16818
|
color: var(--wui-color-text-secondary);
|
|
@@ -16773,10 +16846,11 @@ var segmentedControlItemStyles = css48`
|
|
|
16773
16846
|
/* note: react-toggle-group uses 'aria-selected' and react-tabs uses "active" */
|
|
16774
16847
|
|
|
16775
16848
|
/* we can't style off of 'data-state' since that gets overridden when wrapped in a Tooltip */
|
|
16776
|
-
&:hover:not([aria-checked='true'], [aria-selected='true']) {
|
|
16849
|
+
&:hover:not([aria-pressed='true'], [aria-checked='true'], [aria-selected='true']) {
|
|
16777
16850
|
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
16778
16851
|
}
|
|
16779
16852
|
|
|
16853
|
+
&[aria-pressed='true'],
|
|
16780
16854
|
&[aria-checked='true'],
|
|
16781
16855
|
&[aria-selected='true'] {
|
|
16782
16856
|
color: var(--wui-color-segmented-color-text-override, var(--wui-color-text-selected));
|
|
@@ -16806,7 +16880,7 @@ var segmentedControlItemStyles = css48`
|
|
|
16806
16880
|
}
|
|
16807
16881
|
}
|
|
16808
16882
|
`;
|
|
16809
|
-
var StyledSegmentedControlItem =
|
|
16883
|
+
var StyledSegmentedControlItem = styled97(Toggle2)`
|
|
16810
16884
|
${segmentedControlItemStyles}
|
|
16811
16885
|
`;
|
|
16812
16886
|
var SegmentedControlItem = forwardRef33(
|
|
@@ -16816,9 +16890,8 @@ var SegmentedControlItem = forwardRef33(
|
|
|
16816
16890
|
const buttonRef = useRef23(null);
|
|
16817
16891
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
16818
16892
|
const handleClick = (event) => {
|
|
16819
|
-
const
|
|
16820
|
-
|
|
16821
|
-
if (state === "on") {
|
|
16893
|
+
const isPressed = event.currentTarget.getAttribute("aria-pressed") === "true";
|
|
16894
|
+
if (isPressed) {
|
|
16822
16895
|
event.preventDefault();
|
|
16823
16896
|
}
|
|
16824
16897
|
};
|
|
@@ -16852,8 +16925,8 @@ var SegmentedControlItem = forwardRef33(
|
|
|
16852
16925
|
{
|
|
16853
16926
|
ref: combinedRef,
|
|
16854
16927
|
...otherProps,
|
|
16855
|
-
$hasLabel:
|
|
16856
|
-
"aria-label":
|
|
16928
|
+
$hasLabel: isNotNil39(label),
|
|
16929
|
+
"aria-label": isNotNil39(label) ? void 0 : ariaLabel,
|
|
16857
16930
|
disabled,
|
|
16858
16931
|
onClick: handleClick,
|
|
16859
16932
|
value,
|
|
@@ -16868,20 +16941,11 @@ var SegmentedControlItem = forwardRef33(
|
|
|
16868
16941
|
SegmentedControlItem.displayName = "SegmentedControlItem_UI";
|
|
16869
16942
|
|
|
16870
16943
|
// src/components/Select/Select.tsx
|
|
16871
|
-
import {
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
Portal as Portal3,
|
|
16875
|
-
Content as Content4,
|
|
16876
|
-
ScrollUpButton,
|
|
16877
|
-
Viewport,
|
|
16878
|
-
Value,
|
|
16879
|
-
ScrollDownButton
|
|
16880
|
-
} from "@radix-ui/react-select";
|
|
16881
|
-
import { forwardRef as forwardRef34 } from "react";
|
|
16882
|
-
import { styled as styled99, css as css49 } from "styled-components";
|
|
16944
|
+
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
16945
|
+
import { Children as Children11, forwardRef as forwardRef34, isValidElement as isValidElement5, useMemo as useMemo17 } from "react";
|
|
16946
|
+
import { styled as styled98, css as css51 } from "styled-components";
|
|
16883
16947
|
import { jsx as jsx340, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
16884
|
-
var StyledTrigger2 =
|
|
16948
|
+
var StyledTrigger2 = styled98(BaseSelect.Trigger)`
|
|
16885
16949
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16886
16950
|
${inputCss};
|
|
16887
16951
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -16927,7 +16991,7 @@ var StyledTrigger2 = styled99(Trigger4)`
|
|
|
16927
16991
|
color: var(--wui-input-placeholder);
|
|
16928
16992
|
}
|
|
16929
16993
|
`;
|
|
16930
|
-
var
|
|
16994
|
+
var StyledPopup5 = styled98(BaseSelect.Popup)`
|
|
16931
16995
|
--wui-select-content-border: var(--wui-color-border);
|
|
16932
16996
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
16933
16997
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -16941,25 +17005,47 @@ var StyledContent4 = styled99(Content4)`
|
|
|
16941
17005
|
border-radius: var(--wui-select-content-border-radius);
|
|
16942
17006
|
box-shadow: var(--wui-elevation-01);
|
|
16943
17007
|
padding: var(--wui-select-option-padding);
|
|
16944
|
-
min-width: var(--
|
|
16945
|
-
max-height: var(--
|
|
17008
|
+
min-width: var(--anchor-width);
|
|
17009
|
+
max-height: var(--available-height);
|
|
16946
17010
|
z-index: var(--wui-zindex-select);
|
|
16947
17011
|
|
|
16948
17012
|
[role='separator'] {
|
|
16949
17013
|
margin: var(--wui-space-02) 0;
|
|
16950
17014
|
}
|
|
16951
17015
|
`;
|
|
16952
|
-
var scrollButtonStyles =
|
|
17016
|
+
var scrollButtonStyles = css51`
|
|
16953
17017
|
align-items: center;
|
|
16954
17018
|
display: flex;
|
|
16955
17019
|
justify-content: center;
|
|
16956
17020
|
`;
|
|
16957
|
-
var
|
|
17021
|
+
var StyledScrollDownArrow = styled98(BaseSelect.ScrollDownArrow)`
|
|
16958
17022
|
${scrollButtonStyles}
|
|
16959
17023
|
`;
|
|
16960
|
-
var
|
|
17024
|
+
var StyledScrollUpArrow = styled98(BaseSelect.ScrollUpArrow)`
|
|
16961
17025
|
${scrollButtonStyles}
|
|
16962
17026
|
`;
|
|
17027
|
+
var collectItemLabels = (children) => {
|
|
17028
|
+
const items = [];
|
|
17029
|
+
Children11.forEach(children, (child) => {
|
|
17030
|
+
if (!isValidElement5(child)) return;
|
|
17031
|
+
const childProps = child.props;
|
|
17032
|
+
const { value, selectedDisplayValue, children: childChildren, textValue } = childProps;
|
|
17033
|
+
if (typeof value === "string") {
|
|
17034
|
+
if (selectedDisplayValue !== void 0 && selectedDisplayValue !== null) {
|
|
17035
|
+
items.push({ value, label: selectedDisplayValue });
|
|
17036
|
+
} else if (typeof childChildren === "string") {
|
|
17037
|
+
items.push({ value, label: childChildren });
|
|
17038
|
+
} else if (typeof textValue === "string") {
|
|
17039
|
+
items.push({ value, label: textValue });
|
|
17040
|
+
}
|
|
17041
|
+
return;
|
|
17042
|
+
}
|
|
17043
|
+
if (childChildren !== void 0 && childChildren !== null) {
|
|
17044
|
+
items.push(...collectItemLabels(childChildren));
|
|
17045
|
+
}
|
|
17046
|
+
});
|
|
17047
|
+
return items;
|
|
17048
|
+
};
|
|
16963
17049
|
var Select = forwardRef34(
|
|
16964
17050
|
({
|
|
16965
17051
|
colorScheme = "inherit",
|
|
@@ -16969,27 +17055,34 @@ var Select = forwardRef34(
|
|
|
16969
17055
|
placeholder = "Select...",
|
|
16970
17056
|
fullWidth = false,
|
|
16971
17057
|
forceOpen = false,
|
|
17058
|
+
disabled,
|
|
17059
|
+
value,
|
|
17060
|
+
"aria-invalid": ariaInvalid,
|
|
16972
17061
|
...props
|
|
16973
17062
|
}, forwardedRef) => {
|
|
16974
17063
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
17064
|
+
const items = useMemo17(() => collectItemLabels(children), [children]);
|
|
16975
17065
|
const rootProps = {
|
|
16976
|
-
|
|
17066
|
+
disabled,
|
|
17067
|
+
items,
|
|
16977
17068
|
onOpenChange,
|
|
16978
|
-
onValueChange: onChange
|
|
17069
|
+
onValueChange: onChange,
|
|
17070
|
+
value
|
|
16979
17071
|
};
|
|
16980
17072
|
if (forceOpen) {
|
|
16981
17073
|
rootProps["open"] = true;
|
|
16982
17074
|
}
|
|
16983
|
-
return /* @__PURE__ */ jsxs65(
|
|
17075
|
+
return /* @__PURE__ */ jsxs65(BaseSelect.Root, { ...rootProps, children: [
|
|
16984
17076
|
/* @__PURE__ */ jsxs65(
|
|
16985
17077
|
StyledTrigger2,
|
|
16986
17078
|
{
|
|
16987
17079
|
ref: forwardedRef,
|
|
16988
17080
|
$colorScheme: colorScheme,
|
|
16989
17081
|
$fullWidth: responsiveFullWidth,
|
|
17082
|
+
"aria-invalid": ariaInvalid,
|
|
16990
17083
|
...props,
|
|
16991
17084
|
children: [
|
|
16992
|
-
/* @__PURE__ */ jsx340(Value, { placeholder }),
|
|
17085
|
+
/* @__PURE__ */ jsx340(BaseSelect.Value, { placeholder }),
|
|
16993
17086
|
/* @__PURE__ */ jsx340(
|
|
16994
17087
|
Icon,
|
|
16995
17088
|
{
|
|
@@ -17000,28 +17093,29 @@ var Select = forwardRef34(
|
|
|
17000
17093
|
]
|
|
17001
17094
|
}
|
|
17002
17095
|
),
|
|
17003
|
-
/* @__PURE__ */ jsx340(
|
|
17004
|
-
|
|
17096
|
+
/* @__PURE__ */ jsx340(BaseSelect.Portal, { children: /* @__PURE__ */ jsx340(
|
|
17097
|
+
BaseSelect.Positioner,
|
|
17005
17098
|
{
|
|
17006
|
-
|
|
17099
|
+
align: "start",
|
|
17100
|
+
alignItemWithTrigger: false,
|
|
17007
17101
|
sideOffset: 8,
|
|
17008
|
-
children: [
|
|
17009
|
-
/* @__PURE__ */ jsx340(
|
|
17102
|
+
children: /* @__PURE__ */ jsxs65(StyledPopup5, { children: [
|
|
17103
|
+
/* @__PURE__ */ jsx340(StyledScrollUpArrow, { children: /* @__PURE__ */ jsx340(
|
|
17010
17104
|
Icon,
|
|
17011
17105
|
{
|
|
17012
17106
|
size: "sm",
|
|
17013
17107
|
type: "caret-up"
|
|
17014
17108
|
}
|
|
17015
17109
|
) }),
|
|
17016
|
-
|
|
17017
|
-
/* @__PURE__ */ jsx340(
|
|
17110
|
+
children,
|
|
17111
|
+
/* @__PURE__ */ jsx340(StyledScrollDownArrow, { children: /* @__PURE__ */ jsx340(
|
|
17018
17112
|
Icon,
|
|
17019
17113
|
{
|
|
17020
17114
|
size: "sm",
|
|
17021
17115
|
type: "caret-down"
|
|
17022
17116
|
}
|
|
17023
17117
|
) })
|
|
17024
|
-
]
|
|
17118
|
+
] })
|
|
17025
17119
|
}
|
|
17026
17120
|
) })
|
|
17027
17121
|
] });
|
|
@@ -17030,12 +17124,12 @@ var Select = forwardRef34(
|
|
|
17030
17124
|
Select.displayName = "Select_UI";
|
|
17031
17125
|
|
|
17032
17126
|
// src/components/Select/SelectOption.tsx
|
|
17033
|
-
import {
|
|
17127
|
+
import { Select as Select2 } from "@base-ui/react/select";
|
|
17034
17128
|
import { forwardRef as forwardRef35 } from "react";
|
|
17035
|
-
import { styled as
|
|
17036
|
-
import { isNotNil as
|
|
17129
|
+
import { styled as styled99 } from "styled-components";
|
|
17130
|
+
import { isNotNil as isNotNil40 } from "@wistia/type-guards";
|
|
17037
17131
|
import { jsx as jsx341, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
17038
|
-
var StyledItem =
|
|
17132
|
+
var StyledItem = styled99(Select2.Item)`
|
|
17039
17133
|
${getTypographicStyles("label3")}
|
|
17040
17134
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
17041
17135
|
background-color: transparent;
|
|
@@ -17062,19 +17156,21 @@ var StyledItem = styled100(Item)`
|
|
|
17062
17156
|
}
|
|
17063
17157
|
`;
|
|
17064
17158
|
var SelectOption = forwardRef35(
|
|
17065
|
-
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
17159
|
+
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", textValue, ...props }, forwardedRef) => {
|
|
17160
|
+
const label = typeof children === "string" ? children : textValue;
|
|
17066
17161
|
return /* @__PURE__ */ jsxs66(
|
|
17067
17162
|
StyledItem,
|
|
17068
17163
|
{
|
|
17069
17164
|
...props,
|
|
17070
17165
|
ref: forwardedRef,
|
|
17071
17166
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
17167
|
+
...label != null ? { label } : {},
|
|
17072
17168
|
children: [
|
|
17073
|
-
|
|
17169
|
+
isNotNil40(selectedDisplayValue) ? /* @__PURE__ */ jsxs66("div", { children: [
|
|
17074
17170
|
children,
|
|
17075
|
-
/* @__PURE__ */ jsx341("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx341(ItemText, { children: selectedDisplayValue }) })
|
|
17076
|
-
] }) : /* @__PURE__ */ jsx341(ItemText, { children }),
|
|
17077
|
-
/* @__PURE__ */ jsx341(ItemIndicator, { children: /* @__PURE__ */ jsx341(
|
|
17171
|
+
/* @__PURE__ */ jsx341("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx341(Select2.ItemText, { children: selectedDisplayValue }) })
|
|
17172
|
+
] }) : /* @__PURE__ */ jsx341(Select2.ItemText, { children }),
|
|
17173
|
+
/* @__PURE__ */ jsx341(Select2.ItemIndicator, { children: /* @__PURE__ */ jsx341(
|
|
17078
17174
|
Icon,
|
|
17079
17175
|
{
|
|
17080
17176
|
size: "md",
|
|
@@ -17089,14 +17185,14 @@ var SelectOption = forwardRef35(
|
|
|
17089
17185
|
SelectOption.displayName = "SelectOption_UI";
|
|
17090
17186
|
|
|
17091
17187
|
// src/components/Select/SelectOptionGroup.tsx
|
|
17092
|
-
import {
|
|
17093
|
-
import { styled as
|
|
17188
|
+
import { Select as Select3 } from "@base-ui/react/select";
|
|
17189
|
+
import { styled as styled100 } from "styled-components";
|
|
17094
17190
|
import { jsx as jsx342, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
17095
|
-
var StyledLabel4 =
|
|
17191
|
+
var StyledLabel4 = styled100(Select3.GroupLabel)`
|
|
17096
17192
|
padding: var(--wui-select-option-padding);
|
|
17097
17193
|
`;
|
|
17098
17194
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
17099
|
-
return /* @__PURE__ */ jsxs67(Group, { ...props, children: [
|
|
17195
|
+
return /* @__PURE__ */ jsxs67(Select3.Group, { ...props, children: [
|
|
17100
17196
|
/* @__PURE__ */ jsx342(StyledLabel4, { children: /* @__PURE__ */ jsx342(
|
|
17101
17197
|
Heading,
|
|
17102
17198
|
{
|
|
@@ -17110,16 +17206,11 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
17110
17206
|
};
|
|
17111
17207
|
|
|
17112
17208
|
// src/components/Slider/Slider.tsx
|
|
17113
|
-
import {
|
|
17114
|
-
|
|
17115
|
-
Track as RadixSliderTrack,
|
|
17116
|
-
Range as RadixSliderRange,
|
|
17117
|
-
Thumb as RadixSliderThumb
|
|
17118
|
-
} from "@radix-ui/react-slider";
|
|
17119
|
-
import { styled as styled102 } from "styled-components";
|
|
17209
|
+
import { Slider as BaseSlider } from "@base-ui/react/slider";
|
|
17210
|
+
import { styled as styled101 } from "styled-components";
|
|
17120
17211
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
17121
17212
|
import { jsx as jsx343, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
17122
|
-
var SliderContainer =
|
|
17213
|
+
var SliderContainer = styled101.div`
|
|
17123
17214
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
17124
17215
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
17125
17216
|
--wui-slider-range-color: var(--wui-color-bg-fill);
|
|
@@ -17135,28 +17226,28 @@ var SliderContainer = styled102.div`
|
|
|
17135
17226
|
pointer-events: none;
|
|
17136
17227
|
}
|
|
17137
17228
|
`;
|
|
17138
|
-
var StyledSliderRoot =
|
|
17139
|
-
|
|
17229
|
+
var StyledSliderRoot = styled101(BaseSlider.Root)`
|
|
17230
|
+
width: 100%;
|
|
17231
|
+
`;
|
|
17232
|
+
var StyledSliderControl = styled101(BaseSlider.Control)`
|
|
17140
17233
|
display: flex;
|
|
17141
17234
|
align-items: center;
|
|
17142
17235
|
user-select: none;
|
|
17143
17236
|
touch-action: none;
|
|
17144
17237
|
width: 100%;
|
|
17145
17238
|
`;
|
|
17146
|
-
var StyledSliderTrack =
|
|
17239
|
+
var StyledSliderTrack = styled101(BaseSlider.Track)`
|
|
17147
17240
|
background-color: var(--wui-slider-track-color);
|
|
17148
17241
|
border-radius: var(--wui-slider-track-border-radius);
|
|
17149
|
-
|
|
17242
|
+
width: 100%;
|
|
17150
17243
|
height: 6px;
|
|
17151
17244
|
position: relative;
|
|
17152
17245
|
`;
|
|
17153
|
-
var
|
|
17246
|
+
var StyledSliderIndicator = styled101(BaseSlider.Indicator)`
|
|
17154
17247
|
background-color: var(--wui-slider-range-color);
|
|
17155
17248
|
border-radius: var(--wui-slider-track-border-radius);
|
|
17156
|
-
height: 100%;
|
|
17157
|
-
position: absolute;
|
|
17158
17249
|
`;
|
|
17159
|
-
var StyledSliderThumb =
|
|
17250
|
+
var StyledSliderThumb = styled101(BaseSlider.Thumb)`
|
|
17160
17251
|
background-color: var(--wui-slider-thumb-color);
|
|
17161
17252
|
border-radius: var(--wui-border-radius-rounded);
|
|
17162
17253
|
cursor: grab;
|
|
@@ -17183,7 +17274,7 @@ var StyledSliderThumb = styled102(RadixSliderThumb)`
|
|
|
17183
17274
|
outline-width: 2px;
|
|
17184
17275
|
}
|
|
17185
17276
|
`;
|
|
17186
|
-
var
|
|
17277
|
+
var Slider2 = ({
|
|
17187
17278
|
"aria-label": ariaLabel,
|
|
17188
17279
|
"aria-labelledby": ariaLabelledby,
|
|
17189
17280
|
disabled = false,
|
|
@@ -17191,7 +17282,7 @@ var Slider = ({
|
|
|
17191
17282
|
max = 100,
|
|
17192
17283
|
min = 0,
|
|
17193
17284
|
onChange,
|
|
17194
|
-
|
|
17285
|
+
onValueCommitted,
|
|
17195
17286
|
step = 1,
|
|
17196
17287
|
value,
|
|
17197
17288
|
"data-testid": dataTestId = "ui-slider",
|
|
@@ -17205,7 +17296,12 @@ var Slider = ({
|
|
|
17205
17296
|
const values = value ?? initialValue;
|
|
17206
17297
|
const handleValueChange = (newValue) => {
|
|
17207
17298
|
if (onChange) {
|
|
17208
|
-
onChange(newValue);
|
|
17299
|
+
onChange(typeof newValue === "number" ? [newValue] : [...newValue]);
|
|
17300
|
+
}
|
|
17301
|
+
};
|
|
17302
|
+
const handleValueCommitted = (newValue) => {
|
|
17303
|
+
if (onValueCommitted) {
|
|
17304
|
+
onValueCommitted(typeof newValue === "number" ? [newValue] : [...newValue]);
|
|
17209
17305
|
}
|
|
17210
17306
|
};
|
|
17211
17307
|
return /* @__PURE__ */ jsx343(
|
|
@@ -17213,7 +17309,7 @@ var Slider = ({
|
|
|
17213
17309
|
{
|
|
17214
17310
|
...otherProps,
|
|
17215
17311
|
"data-testid": dataTestId,
|
|
17216
|
-
children: /* @__PURE__ */
|
|
17312
|
+
children: /* @__PURE__ */ jsx343(
|
|
17217
17313
|
StyledSliderRoot,
|
|
17218
17314
|
{
|
|
17219
17315
|
"aria-label": ariaLabel,
|
|
@@ -17223,11 +17319,11 @@ var Slider = ({
|
|
|
17223
17319
|
max,
|
|
17224
17320
|
min,
|
|
17225
17321
|
onValueChange: handleValueChange,
|
|
17322
|
+
onValueCommitted: handleValueCommitted,
|
|
17226
17323
|
step,
|
|
17227
|
-
...onValueCommit ? { onValueCommit } : {},
|
|
17228
17324
|
...value ? { value } : {},
|
|
17229
|
-
children: [
|
|
17230
|
-
/* @__PURE__ */ jsx343(
|
|
17325
|
+
children: /* @__PURE__ */ jsx343(StyledSliderControl, { children: /* @__PURE__ */ jsxs68(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: [
|
|
17326
|
+
/* @__PURE__ */ jsx343(StyledSliderIndicator, { "data-testid": `${dataTestId}-range` }),
|
|
17231
17327
|
values.map((_, index) => /* @__PURE__ */ jsx343(
|
|
17232
17328
|
StyledSliderThumb,
|
|
17233
17329
|
{
|
|
@@ -17235,20 +17331,20 @@ var Slider = ({
|
|
|
17235
17331
|
},
|
|
17236
17332
|
`thumb-${index}`
|
|
17237
17333
|
))
|
|
17238
|
-
]
|
|
17334
|
+
] }) })
|
|
17239
17335
|
}
|
|
17240
17336
|
)
|
|
17241
17337
|
}
|
|
17242
17338
|
);
|
|
17243
17339
|
};
|
|
17244
|
-
|
|
17340
|
+
Slider2.displayName = "Slider_UI";
|
|
17245
17341
|
|
|
17246
17342
|
// src/components/SplitButton/SplitButton.tsx
|
|
17247
|
-
import { styled as
|
|
17248
|
-
import { isNotNil as
|
|
17343
|
+
import { styled as styled102 } from "styled-components";
|
|
17344
|
+
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
17249
17345
|
import { cloneElement as cloneElement9 } from "react";
|
|
17250
17346
|
import { jsx as jsx344, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
17251
|
-
var StyledSplitButton =
|
|
17347
|
+
var StyledSplitButton = styled102.span`
|
|
17252
17348
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
17253
17349
|
white-space: nowrap;
|
|
17254
17350
|
|
|
@@ -17259,7 +17355,7 @@ var StyledSplitButton = styled103.span`
|
|
|
17259
17355
|
padding-right: 0;
|
|
17260
17356
|
}
|
|
17261
17357
|
|
|
17262
|
-
> [data-wui-button='true']:
|
|
17358
|
+
> [data-wui-button='true']:not(:first-child) {
|
|
17263
17359
|
border-top-left-radius: 0;
|
|
17264
17360
|
border-bottom-left-radius: 0;
|
|
17265
17361
|
display: inline-flex;
|
|
@@ -17292,7 +17388,7 @@ var SplitButton = ({
|
|
|
17292
17388
|
children
|
|
17293
17389
|
}
|
|
17294
17390
|
),
|
|
17295
|
-
|
|
17391
|
+
isNotNil41(menuItems) && /* @__PURE__ */ jsx344(
|
|
17296
17392
|
Menu,
|
|
17297
17393
|
{
|
|
17298
17394
|
...menuProps,
|
|
@@ -17311,31 +17407,31 @@ var SplitButton = ({
|
|
|
17311
17407
|
children: menuItems
|
|
17312
17408
|
}
|
|
17313
17409
|
),
|
|
17314
|
-
|
|
17410
|
+
isNotNil41(secondaryAction) && cloneElement9(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
17315
17411
|
] });
|
|
17316
17412
|
};
|
|
17317
17413
|
SplitButton.displayName = "SplitButton_UI";
|
|
17318
17414
|
|
|
17319
17415
|
// src/components/Table/Table.tsx
|
|
17320
|
-
import { styled as
|
|
17416
|
+
import { styled as styled103, css as css52 } from "styled-components";
|
|
17321
17417
|
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
17322
|
-
var StyledTable =
|
|
17418
|
+
var StyledTable = styled103.table`
|
|
17323
17419
|
width: 100%;
|
|
17324
17420
|
border-collapse: collapse;
|
|
17325
17421
|
|
|
17326
|
-
${({ $divided }) => $divided &&
|
|
17422
|
+
${({ $divided }) => $divided && css52`
|
|
17327
17423
|
tr {
|
|
17328
17424
|
border-bottom: 1px solid var(--wui-color-border);
|
|
17329
17425
|
}
|
|
17330
17426
|
`}
|
|
17331
17427
|
|
|
17332
|
-
${({ $striped }) => $striped &&
|
|
17428
|
+
${({ $striped }) => $striped && css52`
|
|
17333
17429
|
tbody tr:nth-child(even) {
|
|
17334
17430
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
17335
17431
|
}
|
|
17336
17432
|
`}
|
|
17337
17433
|
|
|
17338
|
-
${({ $visuallyHiddenHeader }) => $visuallyHiddenHeader &&
|
|
17434
|
+
${({ $visuallyHiddenHeader }) => $visuallyHiddenHeader && css52`
|
|
17339
17435
|
thead {
|
|
17340
17436
|
${visuallyHiddenStyle}
|
|
17341
17437
|
}
|
|
@@ -17361,7 +17457,7 @@ var Table = ({
|
|
|
17361
17457
|
};
|
|
17362
17458
|
|
|
17363
17459
|
// src/components/Table/TableBody.tsx
|
|
17364
|
-
import { styled as
|
|
17460
|
+
import { styled as styled104 } from "styled-components";
|
|
17365
17461
|
|
|
17366
17462
|
// src/components/Table/TableSectionContext.ts
|
|
17367
17463
|
import { createContext as createContext11 } from "react";
|
|
@@ -17369,7 +17465,7 @@ var TableSectionContext = createContext11(null);
|
|
|
17369
17465
|
|
|
17370
17466
|
// src/components/Table/TableBody.tsx
|
|
17371
17467
|
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
17372
|
-
var StyledTableBody =
|
|
17468
|
+
var StyledTableBody = styled104.tbody`
|
|
17373
17469
|
width: 100%;
|
|
17374
17470
|
`;
|
|
17375
17471
|
var TableBody = ({ children, ...props }) => {
|
|
@@ -17378,20 +17474,20 @@ var TableBody = ({ children, ...props }) => {
|
|
|
17378
17474
|
|
|
17379
17475
|
// src/components/Table/TableCell.tsx
|
|
17380
17476
|
import { useContext as useContext17 } from "react";
|
|
17381
|
-
import { styled as
|
|
17477
|
+
import { styled as styled105, css as css53 } from "styled-components";
|
|
17382
17478
|
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
17383
|
-
var sharedStyles =
|
|
17479
|
+
var sharedStyles = css53`
|
|
17384
17480
|
color: var(--wui-color-text);
|
|
17385
17481
|
padding: var(--wui-space-02);
|
|
17386
17482
|
text-align: left;
|
|
17387
17483
|
`;
|
|
17388
|
-
var StyledTh =
|
|
17484
|
+
var StyledTh = styled105.th`
|
|
17389
17485
|
${sharedStyles}
|
|
17390
17486
|
font-size: var(--wui-typography-body-4-size);
|
|
17391
17487
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
17392
17488
|
line-height: var(--wui-typography-body-4-line-height);
|
|
17393
17489
|
`;
|
|
17394
|
-
var StyledTd =
|
|
17490
|
+
var StyledTd = styled105.td`
|
|
17395
17491
|
${sharedStyles}
|
|
17396
17492
|
font-size: var(--wui-typography-body-2-size);
|
|
17397
17493
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -17406,9 +17502,9 @@ var TableCell = ({ children, ...props }) => {
|
|
|
17406
17502
|
};
|
|
17407
17503
|
|
|
17408
17504
|
// src/components/Table/TableFoot.tsx
|
|
17409
|
-
import { styled as
|
|
17505
|
+
import { styled as styled106 } from "styled-components";
|
|
17410
17506
|
import { jsx as jsx348 } from "react/jsx-runtime";
|
|
17411
|
-
var StyledTableFoot =
|
|
17507
|
+
var StyledTableFoot = styled106.tfoot`
|
|
17412
17508
|
width: 100%;
|
|
17413
17509
|
`;
|
|
17414
17510
|
var TableFoot = ({ children, ...props }) => {
|
|
@@ -17416,9 +17512,9 @@ var TableFoot = ({ children, ...props }) => {
|
|
|
17416
17512
|
};
|
|
17417
17513
|
|
|
17418
17514
|
// src/components/Table/TableHead.tsx
|
|
17419
|
-
import { styled as
|
|
17515
|
+
import { styled as styled107 } from "styled-components";
|
|
17420
17516
|
import { jsx as jsx349 } from "react/jsx-runtime";
|
|
17421
|
-
var StyledThead =
|
|
17517
|
+
var StyledThead = styled107.thead`
|
|
17422
17518
|
width: 100%;
|
|
17423
17519
|
`;
|
|
17424
17520
|
var TableHead = ({ children, ...props }) => {
|
|
@@ -17426,9 +17522,9 @@ var TableHead = ({ children, ...props }) => {
|
|
|
17426
17522
|
};
|
|
17427
17523
|
|
|
17428
17524
|
// src/components/Table/TableRow.tsx
|
|
17429
|
-
import { styled as
|
|
17525
|
+
import { styled as styled108 } from "styled-components";
|
|
17430
17526
|
import { jsx as jsx350 } from "react/jsx-runtime";
|
|
17431
|
-
var StyledTableRow =
|
|
17527
|
+
var StyledTableRow = styled108.tr`
|
|
17432
17528
|
width: 100%;
|
|
17433
17529
|
`;
|
|
17434
17530
|
var TableRow = ({ children, ...props }) => {
|
|
@@ -17436,9 +17532,9 @@ var TableRow = ({ children, ...props }) => {
|
|
|
17436
17532
|
};
|
|
17437
17533
|
|
|
17438
17534
|
// src/components/Tabs/Tabs.tsx
|
|
17439
|
-
import {
|
|
17440
|
-
import { useCallback as
|
|
17441
|
-
import { isNotNil as
|
|
17535
|
+
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
17536
|
+
import { useCallback as useCallback20, useState as useState27 } from "react";
|
|
17537
|
+
import { isNotNil as isNotNil42 } from "@wistia/type-guards";
|
|
17442
17538
|
|
|
17443
17539
|
// src/components/Tabs/useTabsValue.tsx
|
|
17444
17540
|
import { createContext as createContext12, useContext as useContext18 } from "react";
|
|
@@ -17461,12 +17557,14 @@ var Tabs = ({
|
|
|
17461
17557
|
defaultValue,
|
|
17462
17558
|
...props
|
|
17463
17559
|
}) => {
|
|
17464
|
-
const [value, setValue] =
|
|
17465
|
-
const onValueChange =
|
|
17560
|
+
const [value, setValue] = useState27(valueProp ?? defaultValue);
|
|
17561
|
+
const onValueChange = useCallback20(
|
|
17466
17562
|
(newValue) => {
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
onValueChangeProp
|
|
17563
|
+
if (newValue !== null) {
|
|
17564
|
+
setValue(newValue);
|
|
17565
|
+
if (onValueChangeProp) {
|
|
17566
|
+
onValueChangeProp(newValue);
|
|
17567
|
+
}
|
|
17470
17568
|
}
|
|
17471
17569
|
},
|
|
17472
17570
|
[onValueChangeProp]
|
|
@@ -17475,34 +17573,34 @@ var Tabs = ({
|
|
|
17475
17573
|
...props,
|
|
17476
17574
|
onValueChange
|
|
17477
17575
|
};
|
|
17478
|
-
if (
|
|
17576
|
+
if (isNotNil42(value)) {
|
|
17479
17577
|
rootProps.value = value;
|
|
17480
17578
|
}
|
|
17481
|
-
if (
|
|
17579
|
+
if (isNotNil42(defaultValue)) {
|
|
17482
17580
|
rootProps.defaultValue = defaultValue;
|
|
17483
17581
|
}
|
|
17484
|
-
return /* @__PURE__ */ jsx351(
|
|
17582
|
+
return /* @__PURE__ */ jsx351(BaseTabs.Root, { ...rootProps, children: /* @__PURE__ */ jsx351(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx351(SelectedItemStyleProvider, { children }) }) });
|
|
17485
17583
|
};
|
|
17486
17584
|
Tabs.displayName = "Tabs_UI";
|
|
17487
17585
|
|
|
17488
17586
|
// src/components/Tabs/TabsContent.tsx
|
|
17489
|
-
import {
|
|
17587
|
+
import { Tabs as Tabs2 } from "@base-ui/react/tabs";
|
|
17490
17588
|
import { jsx as jsx352 } from "react/jsx-runtime";
|
|
17491
17589
|
var TabsContent = ({ children, value }) => {
|
|
17492
|
-
return /* @__PURE__ */ jsx352(
|
|
17590
|
+
return /* @__PURE__ */ jsx352(Tabs2.Panel, { value, children });
|
|
17493
17591
|
};
|
|
17494
17592
|
TabsContent.displayName = "TabsContent_UI";
|
|
17495
17593
|
|
|
17496
17594
|
// src/components/Tabs/TabsList.tsx
|
|
17497
|
-
import {
|
|
17498
|
-
import { styled as
|
|
17595
|
+
import { Tabs as Tabs3 } from "@base-ui/react/tabs";
|
|
17596
|
+
import { styled as styled110 } from "styled-components";
|
|
17499
17597
|
|
|
17500
17598
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17501
17599
|
import { isUndefined as isUndefined6 } from "@wistia/type-guards";
|
|
17502
17600
|
|
|
17503
17601
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
17504
|
-
import { styled as
|
|
17505
|
-
var TabsSelectedItemIndicatorDiv =
|
|
17602
|
+
import { styled as styled109 } from "styled-components";
|
|
17603
|
+
var TabsSelectedItemIndicatorDiv = styled109(SelectedItemIndicatorDiv)`
|
|
17506
17604
|
:has(button[role='tab']:focus-visible) > & {
|
|
17507
17605
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
17508
17606
|
}
|
|
@@ -17527,7 +17625,7 @@ var SelectedTabIndicator = () => {
|
|
|
17527
17625
|
|
|
17528
17626
|
// src/components/Tabs/TabsList.tsx
|
|
17529
17627
|
import { jsx as jsx354, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
17530
|
-
var StyledTabsList =
|
|
17628
|
+
var StyledTabsList = styled110(Tabs3.List)`
|
|
17531
17629
|
${segmentedControlStyles}
|
|
17532
17630
|
`;
|
|
17533
17631
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
@@ -17547,12 +17645,12 @@ TabsList.displayName = "TabsList_UI";
|
|
|
17547
17645
|
|
|
17548
17646
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17549
17647
|
import { forwardRef as forwardRef36, useEffect as useEffect23, useRef as useRef24 } from "react";
|
|
17550
|
-
import { isNotNil as
|
|
17648
|
+
import { isNotNil as isNotNil43 } from "@wistia/type-guards";
|
|
17551
17649
|
|
|
17552
17650
|
// src/components/Tabs/StyledTabsTrigger.tsx
|
|
17553
|
-
import { styled as
|
|
17554
|
-
import {
|
|
17555
|
-
var StyledTabsTrigger =
|
|
17651
|
+
import { styled as styled111 } from "styled-components";
|
|
17652
|
+
import { Tabs as Tabs4 } from "@base-ui/react/tabs";
|
|
17653
|
+
var StyledTabsTrigger = styled111(Tabs4.Tab)`
|
|
17556
17654
|
${segmentedControlItemStyles}
|
|
17557
17655
|
|
|
17558
17656
|
&:focus-visible {
|
|
@@ -17598,8 +17696,8 @@ var TabsTrigger = forwardRef36(
|
|
|
17598
17696
|
{
|
|
17599
17697
|
...otherProps,
|
|
17600
17698
|
ref: combinedRef,
|
|
17601
|
-
$hasLabel:
|
|
17602
|
-
"aria-label":
|
|
17699
|
+
$hasLabel: isNotNil43(label),
|
|
17700
|
+
"aria-label": isNotNil43(label) ? void 0 : ariaLabel,
|
|
17603
17701
|
disabled,
|
|
17604
17702
|
value,
|
|
17605
17703
|
children: [
|
|
@@ -17613,10 +17711,10 @@ var TabsTrigger = forwardRef36(
|
|
|
17613
17711
|
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
17614
17712
|
|
|
17615
17713
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
17616
|
-
import { styled as
|
|
17617
|
-
import { isNotNil as
|
|
17714
|
+
import { styled as styled112 } from "styled-components";
|
|
17715
|
+
import { isNotNil as isNotNil44 } from "@wistia/type-guards";
|
|
17618
17716
|
import { jsx as jsx355, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
17619
|
-
var StyledThumbnailBadge =
|
|
17717
|
+
var StyledThumbnailBadge = styled112.div`
|
|
17620
17718
|
align-items: center;
|
|
17621
17719
|
background-color: rgb(0 0 0 / 50%);
|
|
17622
17720
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -17643,18 +17741,18 @@ var StyledThumbnailBadge = styled113.div`
|
|
|
17643
17741
|
`;
|
|
17644
17742
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
17645
17743
|
return /* @__PURE__ */ jsxs72(StyledThumbnailBadge, { ...props, children: [
|
|
17646
|
-
|
|
17744
|
+
isNotNil44(icon) && icon,
|
|
17647
17745
|
/* @__PURE__ */ jsx355("span", { children: label })
|
|
17648
17746
|
] });
|
|
17649
17747
|
};
|
|
17650
17748
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
17651
17749
|
|
|
17652
17750
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17653
|
-
import { forwardRef as forwardRef37, useState as
|
|
17654
|
-
import { styled as
|
|
17751
|
+
import { forwardRef as forwardRef37, useState as useState28, useRef as useRef25, useCallback as useCallback21, useMemo as useMemo18 } from "react";
|
|
17752
|
+
import { styled as styled114 } from "styled-components";
|
|
17655
17753
|
import {
|
|
17656
|
-
isNil as
|
|
17657
|
-
isNotNil as
|
|
17754
|
+
isNil as isNil20,
|
|
17755
|
+
isNotNil as isNotNil47,
|
|
17658
17756
|
isUndefined as isUndefined7,
|
|
17659
17757
|
isEmptyString as isEmptyString2,
|
|
17660
17758
|
isString as isString4,
|
|
@@ -17662,10 +17760,10 @@ import {
|
|
|
17662
17760
|
} from "@wistia/type-guards";
|
|
17663
17761
|
|
|
17664
17762
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17665
|
-
import { isNotNil as
|
|
17666
|
-
import { css as
|
|
17763
|
+
import { isNotNil as isNotNil45 } from "@wistia/type-guards";
|
|
17764
|
+
import { css as css54 } from "styled-components";
|
|
17667
17765
|
var gradients = {
|
|
17668
|
-
defaultDarkOne:
|
|
17766
|
+
defaultDarkOne: css54`
|
|
17669
17767
|
background-color: #222d66;
|
|
17670
17768
|
background-image:
|
|
17671
17769
|
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
@@ -17673,7 +17771,7 @@ var gradients = {
|
|
|
17673
17771
|
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
17674
17772
|
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
17675
17773
|
`,
|
|
17676
|
-
defaultDarkTwo:
|
|
17774
|
+
defaultDarkTwo: css54`
|
|
17677
17775
|
background-color: #222d66;
|
|
17678
17776
|
background-image:
|
|
17679
17777
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
@@ -17681,7 +17779,7 @@ var gradients = {
|
|
|
17681
17779
|
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
17682
17780
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
17683
17781
|
`,
|
|
17684
|
-
defaultLightOne:
|
|
17782
|
+
defaultLightOne: css54`
|
|
17685
17783
|
background-color: #ccd5ff;
|
|
17686
17784
|
background-image:
|
|
17687
17785
|
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
@@ -17689,13 +17787,13 @@ var gradients = {
|
|
|
17689
17787
|
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
17690
17788
|
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
17691
17789
|
`,
|
|
17692
|
-
defaultLightTwo:
|
|
17790
|
+
defaultLightTwo: css54`
|
|
17693
17791
|
background-color: #ccd5ff;
|
|
17694
17792
|
background-image:
|
|
17695
17793
|
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
17696
17794
|
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
17697
17795
|
`,
|
|
17698
|
-
defaultMidOne:
|
|
17796
|
+
defaultMidOne: css54`
|
|
17699
17797
|
background-color: #6b84ff;
|
|
17700
17798
|
background-image:
|
|
17701
17799
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
@@ -17703,13 +17801,13 @@ var gradients = {
|
|
|
17703
17801
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
17704
17802
|
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
17705
17803
|
`,
|
|
17706
|
-
defaultMidTwo:
|
|
17804
|
+
defaultMidTwo: css54`
|
|
17707
17805
|
background-color: #6b84ff;
|
|
17708
17806
|
background-image:
|
|
17709
17807
|
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
17710
17808
|
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
17711
17809
|
`,
|
|
17712
|
-
green:
|
|
17810
|
+
green: css54`
|
|
17713
17811
|
background-color: #fafffa;
|
|
17714
17812
|
background-image:
|
|
17715
17813
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -17717,7 +17815,7 @@ var gradients = {
|
|
|
17717
17815
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
17718
17816
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
17719
17817
|
`,
|
|
17720
|
-
greenWithPop:
|
|
17818
|
+
greenWithPop: css54`
|
|
17721
17819
|
background-color: #fafffa;
|
|
17722
17820
|
background-image:
|
|
17723
17821
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -17725,7 +17823,7 @@ var gradients = {
|
|
|
17725
17823
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
17726
17824
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
17727
17825
|
`,
|
|
17728
|
-
pink:
|
|
17826
|
+
pink: css54`
|
|
17729
17827
|
background-color: #fffff0;
|
|
17730
17828
|
background-image:
|
|
17731
17829
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
@@ -17733,7 +17831,7 @@ var gradients = {
|
|
|
17733
17831
|
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
17734
17832
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
17735
17833
|
`,
|
|
17736
|
-
pinkWithPop:
|
|
17834
|
+
pinkWithPop: css54`
|
|
17737
17835
|
background-color: #fffff0;
|
|
17738
17836
|
background-image:
|
|
17739
17837
|
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
@@ -17741,7 +17839,7 @@ var gradients = {
|
|
|
17741
17839
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
17742
17840
|
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
17743
17841
|
`,
|
|
17744
|
-
playfulGradientOne:
|
|
17842
|
+
playfulGradientOne: css54`
|
|
17745
17843
|
background-color: #f7f8ff;
|
|
17746
17844
|
background-image:
|
|
17747
17845
|
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
@@ -17749,7 +17847,7 @@ var gradients = {
|
|
|
17749
17847
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
17750
17848
|
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
17751
17849
|
`,
|
|
17752
|
-
playfulGradientTwo:
|
|
17850
|
+
playfulGradientTwo: css54`
|
|
17753
17851
|
background-color: #f7f8ff;
|
|
17754
17852
|
background-image:
|
|
17755
17853
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
@@ -17757,13 +17855,13 @@ var gradients = {
|
|
|
17757
17855
|
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
17758
17856
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
17759
17857
|
`,
|
|
17760
|
-
purple:
|
|
17858
|
+
purple: css54`
|
|
17761
17859
|
background-color: #f2caff;
|
|
17762
17860
|
background-image:
|
|
17763
17861
|
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
17764
17862
|
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
17765
17863
|
`,
|
|
17766
|
-
purpleWithPop:
|
|
17864
|
+
purpleWithPop: css54`
|
|
17767
17865
|
background-color: #f2caff;
|
|
17768
17866
|
background-image:
|
|
17769
17867
|
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
@@ -17771,7 +17869,7 @@ var gradients = {
|
|
|
17771
17869
|
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
17772
17870
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
17773
17871
|
`,
|
|
17774
|
-
yellow:
|
|
17872
|
+
yellow: css54`
|
|
17775
17873
|
background-color: #fffff0;
|
|
17776
17874
|
background-image:
|
|
17777
17875
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -17779,7 +17877,7 @@ var gradients = {
|
|
|
17779
17877
|
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
17780
17878
|
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
17781
17879
|
`,
|
|
17782
|
-
yellowWithPop:
|
|
17880
|
+
yellowWithPop: css54`
|
|
17783
17881
|
background-color: #fffff0;
|
|
17784
17882
|
background-image:
|
|
17785
17883
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -17790,14 +17888,14 @@ var gradients = {
|
|
|
17790
17888
|
};
|
|
17791
17889
|
var gradientMap = Object.keys(gradients);
|
|
17792
17890
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
17793
|
-
return
|
|
17891
|
+
return isNotNil45(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
17794
17892
|
};
|
|
17795
17893
|
|
|
17796
17894
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
17797
|
-
import { styled as
|
|
17798
|
-
import { isNotNil as
|
|
17895
|
+
import { styled as styled113 } from "styled-components";
|
|
17896
|
+
import { isNotNil as isNotNil46 } from "@wistia/type-guards";
|
|
17799
17897
|
import { jsx as jsx356, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
17800
|
-
var ScrubLine =
|
|
17898
|
+
var ScrubLine = styled113.div`
|
|
17801
17899
|
position: absolute;
|
|
17802
17900
|
top: 0;
|
|
17803
17901
|
height: 100%;
|
|
@@ -17889,8 +17987,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17889
17987
|
);
|
|
17890
17988
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
17891
17989
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
17892
|
-
const showScrubLine =
|
|
17893
|
-
const scrubLinePosition =
|
|
17990
|
+
const showScrubLine = isNotNil46(cursorPosition);
|
|
17991
|
+
const scrubLinePosition = isNotNil46(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
17894
17992
|
const viewerStyles = {
|
|
17895
17993
|
position: "relative",
|
|
17896
17994
|
overflow: "hidden",
|
|
@@ -17938,12 +18036,12 @@ var getAspectRatioValue = (aspectRatio) => {
|
|
|
17938
18036
|
}
|
|
17939
18037
|
return WIDE_ASPECT_RATIO;
|
|
17940
18038
|
};
|
|
17941
|
-
var WideThumbnailImage =
|
|
18039
|
+
var WideThumbnailImage = styled114.img`
|
|
17942
18040
|
height: 100%;
|
|
17943
18041
|
object-fit: cover;
|
|
17944
18042
|
width: 100%;
|
|
17945
18043
|
`;
|
|
17946
|
-
var SquareThumbnailImage =
|
|
18044
|
+
var SquareThumbnailImage = styled114.img`
|
|
17947
18045
|
backdrop-filter: blur(8px);
|
|
17948
18046
|
object-fit: contain;
|
|
17949
18047
|
width: 100%;
|
|
@@ -17968,7 +18066,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17968
18066
|
}
|
|
17969
18067
|
);
|
|
17970
18068
|
};
|
|
17971
|
-
var StyledThumbnailContainer =
|
|
18069
|
+
var StyledThumbnailContainer = styled114.div`
|
|
17972
18070
|
container-type: size;
|
|
17973
18071
|
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
17974
18072
|
width: ${({ $width }) => $width};
|
|
@@ -17976,13 +18074,13 @@ var StyledThumbnailContainer = styled115.div`
|
|
|
17976
18074
|
overflow: hidden;
|
|
17977
18075
|
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17978
18076
|
`;
|
|
17979
|
-
var StyledThumbnail =
|
|
18077
|
+
var StyledThumbnail = styled114.div`
|
|
17980
18078
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
17981
18079
|
|
|
17982
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
18080
|
+
background-image: ${({ $backgroundUrl }) => isNotNil47($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17983
18081
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17984
18082
|
// if we don't have $backgroundUrl show a gradient
|
|
17985
|
-
|
|
18083
|
+
isNil20($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
17986
18084
|
)};
|
|
17987
18085
|
background-position: center center;
|
|
17988
18086
|
background-size: cover;
|
|
@@ -18037,7 +18135,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18037
18135
|
};
|
|
18038
18136
|
};
|
|
18039
18137
|
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18040
|
-
return
|
|
18138
|
+
return isNotNil47(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
18041
18139
|
};
|
|
18042
18140
|
var Thumbnail = forwardRef37(
|
|
18043
18141
|
({
|
|
@@ -18051,17 +18149,17 @@ var Thumbnail = forwardRef37(
|
|
|
18051
18149
|
aspectRatio = "wide",
|
|
18052
18150
|
...props
|
|
18053
18151
|
}, ref) => {
|
|
18054
|
-
const [percent, setPercent] =
|
|
18055
|
-
const [isMouseOver, setIsMouseOver] =
|
|
18056
|
-
const [isStoryboardReady, setIsStoryboardReady] =
|
|
18152
|
+
const [percent, setPercent] = useState28(0);
|
|
18153
|
+
const [isMouseOver, setIsMouseOver] = useState28(false);
|
|
18154
|
+
const [isStoryboardReady, setIsStoryboardReady] = useState28(false);
|
|
18057
18155
|
const storyboardElementRef = useRef25(null);
|
|
18058
|
-
const [cursorPosition, setCursorPosition] =
|
|
18059
|
-
const backgroundUrl =
|
|
18156
|
+
const [cursorPosition, setCursorPosition] = useState28(null);
|
|
18157
|
+
const backgroundUrl = useMemo18(
|
|
18060
18158
|
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18061
18159
|
[thumbnailImageType, thumbnailUrl]
|
|
18062
18160
|
);
|
|
18063
|
-
const isScrubbable =
|
|
18064
|
-
const trackStoryboardLoadStatus =
|
|
18161
|
+
const isScrubbable = isNotNil47(storyboard);
|
|
18162
|
+
const trackStoryboardLoadStatus = useCallback21(() => {
|
|
18065
18163
|
if (storyboardElementRef.current || !storyboard) {
|
|
18066
18164
|
return storyboardElementRef.current;
|
|
18067
18165
|
}
|
|
@@ -18071,7 +18169,7 @@ var Thumbnail = forwardRef37(
|
|
|
18071
18169
|
storyboardElementRef.current = asset;
|
|
18072
18170
|
return storyboardElementRef.current;
|
|
18073
18171
|
}, [storyboard]);
|
|
18074
|
-
const handleMouseMove =
|
|
18172
|
+
const handleMouseMove = useCallback21(
|
|
18075
18173
|
(mouseEvent) => {
|
|
18076
18174
|
if (!isScrubbable) {
|
|
18077
18175
|
return;
|
|
@@ -18086,15 +18184,15 @@ var Thumbnail = forwardRef37(
|
|
|
18086
18184
|
},
|
|
18087
18185
|
[isScrubbable, trackStoryboardLoadStatus]
|
|
18088
18186
|
);
|
|
18089
|
-
const handleMouseOut =
|
|
18187
|
+
const handleMouseOut = useCallback21(() => {
|
|
18090
18188
|
if (!isScrubbable) {
|
|
18091
18189
|
return;
|
|
18092
18190
|
}
|
|
18093
18191
|
setIsMouseOver(false);
|
|
18094
18192
|
setCursorPosition(null);
|
|
18095
18193
|
}, [isScrubbable]);
|
|
18096
|
-
const shouldRenderStoryboard =
|
|
18097
|
-
if (
|
|
18194
|
+
const shouldRenderStoryboard = useMemo18(() => {
|
|
18195
|
+
if (isNil20(storyboard) || isUndefined7(height) || isEmptyString2(height)) {
|
|
18098
18196
|
return false;
|
|
18099
18197
|
}
|
|
18100
18198
|
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
@@ -18143,7 +18241,7 @@ var Thumbnail = forwardRef37(
|
|
|
18143
18241
|
$gradientBackground: gradientBackground,
|
|
18144
18242
|
"data-testid": "thumbnail-inner",
|
|
18145
18243
|
children: [
|
|
18146
|
-
|
|
18244
|
+
isNotNil47(children) ? children : null,
|
|
18147
18245
|
thumbnailContent
|
|
18148
18246
|
]
|
|
18149
18247
|
}
|
|
@@ -18155,17 +18253,17 @@ var Thumbnail = forwardRef37(
|
|
|
18155
18253
|
Thumbnail.displayName = "Thumbnail_UI";
|
|
18156
18254
|
|
|
18157
18255
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
18158
|
-
import { cloneElement as cloneElement10, Children as
|
|
18159
|
-
import { styled as
|
|
18256
|
+
import { cloneElement as cloneElement10, Children as Children12 } from "react";
|
|
18257
|
+
import { styled as styled115 } from "styled-components";
|
|
18160
18258
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
18161
18259
|
import { jsx as jsx358 } from "react/jsx-runtime";
|
|
18162
|
-
var ThumbnailCollageContainer =
|
|
18260
|
+
var ThumbnailCollageContainer = styled115.div`
|
|
18163
18261
|
container-type: size;
|
|
18164
18262
|
width: 100%;
|
|
18165
18263
|
aspect-ratio: 16 / 9;
|
|
18166
18264
|
display: flex;
|
|
18167
18265
|
`;
|
|
18168
|
-
var StyledThumbnailCollage =
|
|
18266
|
+
var StyledThumbnailCollage = styled115.div`
|
|
18169
18267
|
display: grid;
|
|
18170
18268
|
gap: var(--wui-space-01);
|
|
18171
18269
|
width: 100%;
|
|
@@ -18214,7 +18312,7 @@ var ThumbnailCollage = ({
|
|
|
18214
18312
|
gradientBackground = "defaultMidOne",
|
|
18215
18313
|
...props
|
|
18216
18314
|
}) => {
|
|
18217
|
-
const thumbnailArray =
|
|
18315
|
+
const thumbnailArray = Children12.toArray(children);
|
|
18218
18316
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
18219
18317
|
const thumbnails = isNonEmptyArray(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
18220
18318
|
return cloneElement10(child, {
|
|
@@ -18244,8 +18342,8 @@ var ThumbnailCollage = ({
|
|
|
18244
18342
|
};
|
|
18245
18343
|
|
|
18246
18344
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
18247
|
-
import { styled as
|
|
18248
|
-
import { isNotNil as
|
|
18345
|
+
import { styled as styled116, css as css55 } from "styled-components";
|
|
18346
|
+
import { isNotNil as isNotNil48 } from "@wistia/type-guards";
|
|
18249
18347
|
import { jsx as jsx359, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
18250
18348
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
18251
18349
|
if (iconOnly) {
|
|
@@ -18286,7 +18384,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
18286
18384
|
}
|
|
18287
18385
|
return "0 0 144 31.47";
|
|
18288
18386
|
};
|
|
18289
|
-
var WistiaLogoComponent =
|
|
18387
|
+
var WistiaLogoComponent = styled116.svg`
|
|
18290
18388
|
height: ${({ height }) => `${height}px`};
|
|
18291
18389
|
|
|
18292
18390
|
/* ensure it will always fit on mobile */
|
|
@@ -18302,12 +18400,12 @@ var WistiaLogoComponent = styled117.svg`
|
|
|
18302
18400
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
18303
18401
|
if ($opticallyCentered) {
|
|
18304
18402
|
if ($iconOnly) {
|
|
18305
|
-
return
|
|
18403
|
+
return css55`
|
|
18306
18404
|
aspect-ratio: 1;
|
|
18307
18405
|
padding: 11.85% 3.12% 13.91%;
|
|
18308
18406
|
`;
|
|
18309
18407
|
}
|
|
18310
|
-
return
|
|
18408
|
+
return css55`
|
|
18311
18409
|
aspect-ratio: 127 / 32;
|
|
18312
18410
|
`;
|
|
18313
18411
|
}
|
|
@@ -18358,7 +18456,7 @@ var WistiaLogo = ({
|
|
|
18358
18456
|
...props,
|
|
18359
18457
|
children: [
|
|
18360
18458
|
/* @__PURE__ */ jsx359("title", { children: title }),
|
|
18361
|
-
|
|
18459
|
+
isNotNil48(description) ? /* @__PURE__ */ jsx359("desc", { children: description }) : null,
|
|
18362
18460
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
18363
18461
|
renderLogotype(logotypeColor, iconOnly)
|
|
18364
18462
|
]
|
|
@@ -18462,13 +18560,13 @@ export {
|
|
|
18462
18560
|
ModalCallout,
|
|
18463
18561
|
ModalCallouts,
|
|
18464
18562
|
PersistentFileAmountLimitValidator,
|
|
18465
|
-
Popover,
|
|
18563
|
+
Popover5 as Popover,
|
|
18466
18564
|
PreviewCard,
|
|
18467
18565
|
ProgressBar,
|
|
18468
|
-
Radio,
|
|
18566
|
+
Radio2 as Radio,
|
|
18469
18567
|
RadioCard,
|
|
18470
18568
|
RadioCardImage,
|
|
18471
|
-
RadioGroup,
|
|
18569
|
+
RadioGroup2 as RadioGroup,
|
|
18472
18570
|
RadioMenuItem,
|
|
18473
18571
|
SaturationAndValuePicker,
|
|
18474
18572
|
ScreenReaderOnly,
|
|
@@ -18478,7 +18576,7 @@ export {
|
|
|
18478
18576
|
Select,
|
|
18479
18577
|
SelectOption,
|
|
18480
18578
|
SelectOptionGroup,
|
|
18481
|
-
Slider,
|
|
18579
|
+
Slider2 as Slider,
|
|
18482
18580
|
SplitButton,
|
|
18483
18581
|
Stack,
|
|
18484
18582
|
SubMenu,
|
|
@@ -18498,7 +18596,7 @@ export {
|
|
|
18498
18596
|
Thumbnail,
|
|
18499
18597
|
ThumbnailBadge,
|
|
18500
18598
|
ThumbnailCollage,
|
|
18501
|
-
Tooltip,
|
|
18599
|
+
Tooltip2 as Tooltip,
|
|
18502
18600
|
UIProvider,
|
|
18503
18601
|
ValueNameOrHexCode,
|
|
18504
18602
|
ValueSwatch,
|