@wistia/ui 0.21.7 → 0.21.8-beta.7d0080e7.cf35bb3
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 +99 -43
- package/dist/index.js +715 -639
- 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.7d0080e7.cf35bb3
|
|
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,12 +8995,12 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
8995
8995
|
ClickRegion.displayName = "ClickRegion_UI";
|
|
8996
8996
|
|
|
8997
8997
|
// src/components/Collapsible/Collapsible.tsx
|
|
8998
|
-
import {
|
|
8998
|
+
import { Collapsible as BaseCollapsible } from "@base-ui/react/collapsible";
|
|
8999
8999
|
import { isNotNil as isNotNil17 } from "@wistia/type-guards";
|
|
9000
9000
|
import { styled as styled29 } from "styled-components";
|
|
9001
9001
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
9002
|
-
var StyledRoot = styled29(
|
|
9003
|
-
&[data-
|
|
9002
|
+
var StyledRoot = styled29(BaseCollapsible.Root)`
|
|
9003
|
+
&[data-closed] [data-wui-collapsible-content] {
|
|
9004
9004
|
display: -webkit-box;
|
|
9005
9005
|
-webkit-box-orient: vertical;
|
|
9006
9006
|
-webkit-line-clamp: var(--wui-collapsible-content-clamp-lines);
|
|
@@ -9021,10 +9021,10 @@ Collapsible.displayName = "Collapsible_UI";
|
|
|
9021
9021
|
|
|
9022
9022
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
9023
9023
|
import { Children as Children4 } from "react";
|
|
9024
|
-
import {
|
|
9024
|
+
import { Collapsible as BaseCollapsible2 } from "@base-ui/react/collapsible";
|
|
9025
9025
|
import { styled as styled30 } from "styled-components";
|
|
9026
9026
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
9027
|
-
var StyledTrigger = styled30(Trigger)`
|
|
9027
|
+
var StyledTrigger = styled30(BaseCollapsible2.Trigger)`
|
|
9028
9028
|
[data-wui-collapsible-icon] {
|
|
9029
9029
|
transition: transform var(--wui-motion-duration-03) ease-in-out;
|
|
9030
9030
|
}
|
|
@@ -9047,7 +9047,7 @@ var StyledTrigger = styled30(Trigger)`
|
|
|
9047
9047
|
`;
|
|
9048
9048
|
var CollapsibleTrigger = ({ children }) => {
|
|
9049
9049
|
Children4.only(children);
|
|
9050
|
-
return /* @__PURE__ */ jsx248(StyledTrigger, {
|
|
9050
|
+
return /* @__PURE__ */ jsx248(StyledTrigger, { render: children });
|
|
9051
9051
|
};
|
|
9052
9052
|
|
|
9053
9053
|
// src/components/Collapsible/CollapsibleTriggerIcon.tsx
|
|
@@ -9074,7 +9074,7 @@ CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon_UI";
|
|
|
9074
9074
|
|
|
9075
9075
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
9076
9076
|
import { styled as styled31 } from "styled-components";
|
|
9077
|
-
import {
|
|
9077
|
+
import { Collapsible as BaseCollapsible3 } from "@base-ui/react/collapsible";
|
|
9078
9078
|
import { isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
|
|
9079
9079
|
import { Fragment as Fragment5, jsx as jsx250, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9080
9080
|
var ClampedContent = styled31.div`
|
|
@@ -9091,7 +9091,7 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9091
9091
|
}
|
|
9092
9092
|
);
|
|
9093
9093
|
}
|
|
9094
|
-
return /* @__PURE__ */ jsx250(
|
|
9094
|
+
return /* @__PURE__ */ jsx250(BaseCollapsible3.Panel, { children: /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
9095
9095
|
children,
|
|
9096
9096
|
" "
|
|
9097
9097
|
] }) });
|
|
@@ -9100,7 +9100,7 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
9100
9100
|
// src/components/ColorPicker/ColorGrid.tsx
|
|
9101
9101
|
import { useCallback as useCallback10 } from "react";
|
|
9102
9102
|
import { styled as styled33 } from "styled-components";
|
|
9103
|
-
import {
|
|
9103
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
9104
9104
|
|
|
9105
9105
|
// src/components/ColorPicker/ColorPickerContext.tsx
|
|
9106
9106
|
import { createContext as createContext5, useCallback as useCallback9, useContext as useContext4, useEffect as useEffect10, useMemo as useMemo7, useState as useState12 } from "react";
|
|
@@ -9713,7 +9713,7 @@ var Container = styled33.div`
|
|
|
9713
9713
|
var LabelContainer = styled33.div`
|
|
9714
9714
|
padding-top: var(--wui-space-01);
|
|
9715
9715
|
`;
|
|
9716
|
-
var ItemsContainer = styled33(
|
|
9716
|
+
var ItemsContainer = styled33(RadioGroup)`
|
|
9717
9717
|
display: flex;
|
|
9718
9718
|
flex-wrap: wrap;
|
|
9719
9719
|
align-items: center;
|
|
@@ -9725,8 +9725,10 @@ var ColorGrid = ({ children, label }) => {
|
|
|
9725
9725
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
9726
9726
|
const onValueChange = useCallback10(
|
|
9727
9727
|
(value) => {
|
|
9728
|
-
|
|
9729
|
-
|
|
9728
|
+
if (typeof value === "string") {
|
|
9729
|
+
const hsv = convertToHsv(value);
|
|
9730
|
+
onChangeNonDerivedValueAsHsv(hsv);
|
|
9731
|
+
}
|
|
9730
9732
|
},
|
|
9731
9733
|
[onChangeNonDerivedValueAsHsv]
|
|
9732
9734
|
);
|
|
@@ -9746,7 +9748,7 @@ ColorGrid.displayName = "ColorGrid_UI";
|
|
|
9746
9748
|
|
|
9747
9749
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
9748
9750
|
import { styled as styled36 } from "styled-components";
|
|
9749
|
-
import {
|
|
9751
|
+
import { Radio } from "@base-ui/react/radio";
|
|
9750
9752
|
import { formatHex as formatHex3 } from "culori/fn";
|
|
9751
9753
|
|
|
9752
9754
|
// src/components/ColorPicker/ColorSwatch.tsx
|
|
@@ -9807,14 +9809,9 @@ var ColorSwatch = ({
|
|
|
9807
9809
|
};
|
|
9808
9810
|
|
|
9809
9811
|
// 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";
|
|
9812
|
+
import { isValidElement as isValidElement2 } from "react";
|
|
9813
|
+
import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
|
|
9814
|
+
import { styled as styled35, css as css28, keyframes as keyframes2 } from "styled-components";
|
|
9818
9815
|
import { jsx as jsx255, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9819
9816
|
var hide = keyframes2`
|
|
9820
9817
|
from {
|
|
@@ -9864,7 +9861,7 @@ var slideRightAndFade = keyframes2`
|
|
|
9864
9861
|
transform: translateX(0);
|
|
9865
9862
|
}
|
|
9866
9863
|
`;
|
|
9867
|
-
var
|
|
9864
|
+
var StyledPopup = styled35(BaseTooltip.Popup)`
|
|
9868
9865
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
9869
9866
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
9870
9867
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -9890,28 +9887,55 @@ var StyledContent = styled35(TooltipContent)`
|
|
|
9890
9887
|
max-width: 30em;
|
|
9891
9888
|
z-index: var(--wui-zindex-tooltip);
|
|
9892
9889
|
|
|
9893
|
-
&[data-
|
|
9890
|
+
&[data-closed] {
|
|
9894
9891
|
animation-name: ${hide};
|
|
9895
9892
|
}
|
|
9896
9893
|
|
|
9897
|
-
&[data-
|
|
9894
|
+
&[data-open][data-side='top'] {
|
|
9898
9895
|
animation-name: ${slideUpAndFade};
|
|
9899
9896
|
}
|
|
9900
9897
|
|
|
9901
|
-
&[data-
|
|
9898
|
+
&[data-open][data-side='right'] {
|
|
9902
9899
|
animation-name: ${slideRightAndFade};
|
|
9903
9900
|
}
|
|
9904
9901
|
|
|
9905
|
-
&[data-
|
|
9902
|
+
&[data-open][data-side='bottom'] {
|
|
9906
9903
|
animation-name: ${slideDownAndFade};
|
|
9907
9904
|
}
|
|
9908
9905
|
|
|
9909
|
-
&[data-
|
|
9906
|
+
&[data-open][data-side='left'] {
|
|
9910
9907
|
animation-name: ${slideLeftAndFade};
|
|
9911
9908
|
}
|
|
9909
|
+
|
|
9910
|
+
overflow: visible;
|
|
9911
|
+
`;
|
|
9912
|
+
var arrowEdgeCss = css28`
|
|
9913
|
+
&[data-side='top'] {
|
|
9914
|
+
bottom: 0;
|
|
9915
|
+
transform: translateY(calc(100% - 2px));
|
|
9916
|
+
}
|
|
9917
|
+
|
|
9918
|
+
&[data-side='bottom'] {
|
|
9919
|
+
top: 0;
|
|
9920
|
+
transform: translateY(calc(-100% + 2px)) rotate(180deg);
|
|
9921
|
+
}
|
|
9922
|
+
|
|
9923
|
+
&[data-side='left'] {
|
|
9924
|
+
right: 0;
|
|
9925
|
+
transform: translateX(calc(100% - 4px)) rotate(-90deg);
|
|
9926
|
+
}
|
|
9927
|
+
|
|
9928
|
+
&[data-side='right'] {
|
|
9929
|
+
left: 0;
|
|
9930
|
+
transform: translateX(calc(-100% + 4px)) rotate(90deg);
|
|
9931
|
+
}
|
|
9932
|
+
`;
|
|
9933
|
+
var StyledTooltipArrow = styled35.svg`
|
|
9934
|
+
${arrowEdgeCss}
|
|
9912
9935
|
`;
|
|
9913
9936
|
var VISUAL_OFFSET = 6;
|
|
9914
|
-
var
|
|
9937
|
+
var ARROW_EXTENSION = 6;
|
|
9938
|
+
var Tooltip2 = ({
|
|
9915
9939
|
delay = 500,
|
|
9916
9940
|
direction = "top",
|
|
9917
9941
|
content,
|
|
@@ -9927,44 +9951,47 @@ var Tooltip = ({
|
|
|
9927
9951
|
if (forceOpen === true) {
|
|
9928
9952
|
rootProps.open = true;
|
|
9929
9953
|
}
|
|
9930
|
-
return /* @__PURE__ */ jsxs23(
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9954
|
+
return /* @__PURE__ */ jsxs23(BaseTooltip.Root, { ...rootProps, children: [
|
|
9955
|
+
/* @__PURE__ */ jsx255(
|
|
9956
|
+
BaseTooltip.Trigger,
|
|
9957
|
+
{
|
|
9958
|
+
delay,
|
|
9959
|
+
render: isValidElement2(children) ? children : /* @__PURE__ */ jsx255("span", { children })
|
|
9960
|
+
}
|
|
9961
|
+
),
|
|
9962
|
+
/* @__PURE__ */ jsx255(BaseTooltip.Portal, { ...container != null ? { container } : {}, children: /* @__PURE__ */ jsx255(
|
|
9963
|
+
BaseTooltip.Positioner,
|
|
9964
|
+
{
|
|
9965
|
+
side: direction,
|
|
9966
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET + ARROW_EXTENSION,
|
|
9967
|
+
children: /* @__PURE__ */ jsxs23(StyledPopup, { role: "tooltip", children: [
|
|
9968
|
+
content,
|
|
9969
|
+
!hideArrow ? /* @__PURE__ */ jsx255(
|
|
9970
|
+
BaseTooltip.Arrow,
|
|
9971
|
+
{
|
|
9972
|
+
render: /* @__PURE__ */ jsx255(
|
|
9973
|
+
StyledTooltipArrow,
|
|
9946
9974
|
{
|
|
9947
9975
|
fill: "var(--tooltip-bg)",
|
|
9948
9976
|
height: "8",
|
|
9949
|
-
style: { transform: "translateY(-2px)" },
|
|
9950
9977
|
viewBox: "0 0 12 8",
|
|
9951
9978
|
width: "12",
|
|
9952
9979
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9953
9980
|
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
9981
|
}
|
|
9955
|
-
)
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
}
|
|
9961
|
-
);
|
|
9982
|
+
)
|
|
9983
|
+
}
|
|
9984
|
+
) : null
|
|
9985
|
+
] })
|
|
9986
|
+
}
|
|
9987
|
+
) })
|
|
9988
|
+
] });
|
|
9962
9989
|
};
|
|
9963
|
-
|
|
9990
|
+
Tooltip2.displayName = "Tooltip_UI";
|
|
9964
9991
|
|
|
9965
9992
|
// src/components/ColorPicker/ColorGridOption.tsx
|
|
9966
9993
|
import { jsx as jsx256 } from "react/jsx-runtime";
|
|
9967
|
-
var Container2 = styled36(
|
|
9994
|
+
var Container2 = styled36(Radio.Root)`
|
|
9968
9995
|
border: none;
|
|
9969
9996
|
appearance: none;
|
|
9970
9997
|
outline: none;
|
|
@@ -9981,7 +10008,7 @@ var ColorGridOption = ({ value: rawValue, name }) => {
|
|
|
9981
10008
|
const isSelected = valueAsHex === value;
|
|
9982
10009
|
const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
|
|
9983
10010
|
return /* @__PURE__ */ jsx256(
|
|
9984
|
-
|
|
10011
|
+
Tooltip2,
|
|
9985
10012
|
{
|
|
9986
10013
|
content: name ?? /* @__PURE__ */ jsx256("span", { style: { fontFamily: "var(--wui-typography-family-mono)" }, children: value }),
|
|
9987
10014
|
children: /* @__PURE__ */ jsx256(
|
|
@@ -10010,17 +10037,18 @@ ColorGridOption.displayName = "ColorGridOption_UI";
|
|
|
10010
10037
|
// src/components/ColorPicker/ColorList.tsx
|
|
10011
10038
|
import { useCallback as useCallback11 } from "react";
|
|
10012
10039
|
import { styled as styled37 } from "styled-components";
|
|
10013
|
-
import {
|
|
10040
|
+
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
10014
10041
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
10015
|
-
var Container3 = styled37(
|
|
10042
|
+
var Container3 = styled37(ToggleGroup)`
|
|
10016
10043
|
display: grid;
|
|
10017
10044
|
grid-template-columns: minmax(0, 1fr);
|
|
10018
10045
|
`;
|
|
10019
10046
|
var ColorList = ({ children }) => {
|
|
10020
10047
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
10021
10048
|
const onValueChange = useCallback11(
|
|
10022
|
-
(
|
|
10023
|
-
|
|
10049
|
+
(newValue) => {
|
|
10050
|
+
const value = newValue[0];
|
|
10051
|
+
if (value === void 0 || value === "") {
|
|
10024
10052
|
return;
|
|
10025
10053
|
}
|
|
10026
10054
|
const hsv = convertToHsv(value);
|
|
@@ -10032,8 +10060,7 @@ var ColorList = ({ children }) => {
|
|
|
10032
10060
|
Container3,
|
|
10033
10061
|
{
|
|
10034
10062
|
onValueChange,
|
|
10035
|
-
|
|
10036
|
-
value: valueAsHex,
|
|
10063
|
+
value: [valueAsHex],
|
|
10037
10064
|
children
|
|
10038
10065
|
}
|
|
10039
10066
|
);
|
|
@@ -10072,7 +10099,7 @@ ColorListGroup.displayName = "ColorListGroup_UI";
|
|
|
10072
10099
|
|
|
10073
10100
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10074
10101
|
import { styled as styled39 } from "styled-components";
|
|
10075
|
-
import {
|
|
10102
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
10076
10103
|
import { formatHex as formatHex4 } from "culori/fn";
|
|
10077
10104
|
|
|
10078
10105
|
// src/components/ColorPicker/ColorNameOrHexCode.tsx
|
|
@@ -10110,7 +10137,7 @@ var ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
|
10110
10137
|
|
|
10111
10138
|
// src/components/ColorPicker/ColorListOption.tsx
|
|
10112
10139
|
import { jsx as jsx260, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
10113
|
-
var Container5 = styled39(
|
|
10140
|
+
var Container5 = styled39(Toggle)`
|
|
10114
10141
|
border: none;
|
|
10115
10142
|
appearance: none;
|
|
10116
10143
|
outline: none;
|
|
@@ -10169,7 +10196,7 @@ var ColorListOption = ({ value: rawValue, name }) => {
|
|
|
10169
10196
|
ColorListOption.displayName = "ColorListOption_UI";
|
|
10170
10197
|
|
|
10171
10198
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
10172
|
-
import {
|
|
10199
|
+
import { Popover } from "@base-ui/react/popover";
|
|
10173
10200
|
import { jsx as jsx261 } from "react/jsx-runtime";
|
|
10174
10201
|
var ColorPicker = ({
|
|
10175
10202
|
children,
|
|
@@ -10179,7 +10206,7 @@ var ColorPicker = ({
|
|
|
10179
10206
|
onValueChange,
|
|
10180
10207
|
value
|
|
10181
10208
|
}) => {
|
|
10182
|
-
return /* @__PURE__ */ jsx261(
|
|
10209
|
+
return /* @__PURE__ */ jsx261(Popover.Root, { modal: false, children: /* @__PURE__ */ jsx261(
|
|
10183
10210
|
ColorPickerProvider,
|
|
10184
10211
|
{
|
|
10185
10212
|
colorForComparison,
|
|
@@ -10194,10 +10221,10 @@ var ColorPicker = ({
|
|
|
10194
10221
|
ColorPicker.displayName = "ColorPicker_UI";
|
|
10195
10222
|
|
|
10196
10223
|
// src/components/ColorPicker/ColorPickerPopoverContent.tsx
|
|
10197
|
-
import {
|
|
10224
|
+
import { Popover as Popover2 } from "@base-ui/react/popover";
|
|
10198
10225
|
import { styled as styled40 } from "styled-components";
|
|
10199
10226
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
10200
|
-
var
|
|
10227
|
+
var StyledPopup2 = styled40(Popover2.Popup)`
|
|
10201
10228
|
background-color: var(--wui-color-bg-surface);
|
|
10202
10229
|
border-radius: var(--wui-border-radius-02);
|
|
10203
10230
|
border: 1px solid var(--wui-color-border);
|
|
@@ -10212,12 +10239,12 @@ var StyledPopoverContent = styled40(PopoverContent)`
|
|
|
10212
10239
|
var ColorPickerPopoverContent = ({
|
|
10213
10240
|
children
|
|
10214
10241
|
}) => {
|
|
10215
|
-
return /* @__PURE__ */ jsx262(
|
|
10216
|
-
|
|
10242
|
+
return /* @__PURE__ */ jsx262(Popover2.Portal, { children: /* @__PURE__ */ jsx262(
|
|
10243
|
+
Popover2.Positioner,
|
|
10217
10244
|
{
|
|
10218
10245
|
align: "start",
|
|
10219
10246
|
sideOffset: 4,
|
|
10220
|
-
children
|
|
10247
|
+
children: /* @__PURE__ */ jsx262(StyledPopup2, { children })
|
|
10221
10248
|
}
|
|
10222
10249
|
) });
|
|
10223
10250
|
};
|
|
@@ -10236,7 +10263,7 @@ ColorPickerSection.displayName = "ColorPickerSection_UI";
|
|
|
10236
10263
|
|
|
10237
10264
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10238
10265
|
import { forwardRef as forwardRef13 } from "react";
|
|
10239
|
-
import {
|
|
10266
|
+
import { Popover as Popover3 } from "@base-ui/react/popover";
|
|
10240
10267
|
import { styled as styled42 } from "styled-components";
|
|
10241
10268
|
|
|
10242
10269
|
// src/components/ColorPicker/ValueSwatch.tsx
|
|
@@ -10271,7 +10298,7 @@ ValueNameOrHexCode.displayName = "ValueNameOrHexCode_UI";
|
|
|
10271
10298
|
|
|
10272
10299
|
// src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
10273
10300
|
import { jsx as jsx266, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10274
|
-
var StyledPopoverTrigger = styled42(
|
|
10301
|
+
var StyledPopoverTrigger = styled42(Popover3.Trigger)`
|
|
10275
10302
|
background-color: var(--wui-color-bg-surface);
|
|
10276
10303
|
border-radius: var(--wui-border-radius-rounded);
|
|
10277
10304
|
border: 1px solid var(--wui-color-border);
|
|
@@ -10370,7 +10397,7 @@ import { useCallback as useCallback12 } from "react";
|
|
|
10370
10397
|
|
|
10371
10398
|
// src/components/Switch/Switch.tsx
|
|
10372
10399
|
import { forwardRef as forwardRef14, useId as useId3 } from "react";
|
|
10373
|
-
import { styled as styled44, css as
|
|
10400
|
+
import { styled as styled44, css as css29 } from "styled-components";
|
|
10374
10401
|
import { isNonEmptyString as isNonEmptyString4 } from "@wistia/type-guards";
|
|
10375
10402
|
import { jsx as jsx268, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10376
10403
|
var switchHeightMap = {
|
|
@@ -10378,7 +10405,7 @@ var switchHeightMap = {
|
|
|
10378
10405
|
md: 20,
|
|
10379
10406
|
lg: 24
|
|
10380
10407
|
};
|
|
10381
|
-
var getSizeCss2 = (size) =>
|
|
10408
|
+
var getSizeCss2 = (size) => css29`
|
|
10382
10409
|
--wui-switch-height: ${switchHeightMap[size]}px;
|
|
10383
10410
|
`;
|
|
10384
10411
|
var StyledSwitchWrapper = styled44.div`
|
|
@@ -10581,13 +10608,13 @@ import { useCallback as useCallback13, useEffect as useEffect11, useRef as useRe
|
|
|
10581
10608
|
import { parseHex as parseHex2 } from "culori/fn";
|
|
10582
10609
|
|
|
10583
10610
|
// src/components/Input/Input.tsx
|
|
10584
|
-
import { isValidElement as
|
|
10585
|
-
import { styled as styled45, css as
|
|
10611
|
+
import { isValidElement as isValidElement3, forwardRef as forwardRef15, cloneElement as cloneElement4, useRef as useRef10 } from "react";
|
|
10612
|
+
import { styled as styled45, css as css31 } from "styled-components";
|
|
10586
10613
|
import { isNil as isNil13, isNotNil as isNotNil18, isRecord as isRecord4 } from "@wistia/type-guards";
|
|
10587
10614
|
|
|
10588
10615
|
// src/css/inputCss.ts
|
|
10589
|
-
import { css as
|
|
10590
|
-
var inputCss =
|
|
10616
|
+
import { css as css30 } from "styled-components";
|
|
10617
|
+
var inputCss = css30`
|
|
10591
10618
|
/* Colors */
|
|
10592
10619
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
10593
10620
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -10614,7 +10641,7 @@ var inputCss = css29`
|
|
|
10614
10641
|
|
|
10615
10642
|
// src/components/Input/Input.tsx
|
|
10616
10643
|
import { jsx as jsx272, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
10617
|
-
var inputStyles =
|
|
10644
|
+
var inputStyles = css31`
|
|
10618
10645
|
${inputCss}
|
|
10619
10646
|
input,
|
|
10620
10647
|
textarea {
|
|
@@ -10782,14 +10809,14 @@ var Input = forwardRef15(
|
|
|
10782
10809
|
if (isNil13(leftIcon) && type === "search") {
|
|
10783
10810
|
leftIconToDisplay = /* @__PURE__ */ jsx272(Icon, { type: "search" });
|
|
10784
10811
|
}
|
|
10785
|
-
if (isNotNil18(leftIconToDisplay) &&
|
|
10812
|
+
if (isNotNil18(leftIconToDisplay) && isValidElement3(leftIconToDisplay)) {
|
|
10786
10813
|
leftIconToDisplay = cloneElement4(leftIconToDisplay, {
|
|
10787
10814
|
size: "md",
|
|
10788
10815
|
className: "wui-input-left-icon"
|
|
10789
10816
|
});
|
|
10790
10817
|
}
|
|
10791
10818
|
let rightIconToDisplay = rightIcon;
|
|
10792
|
-
if (isNotNil18(rightIconToDisplay) &&
|
|
10819
|
+
if (isNotNil18(rightIconToDisplay) && isValidElement3(rightIconToDisplay)) {
|
|
10793
10820
|
rightIconToDisplay = cloneElement4(rightIconToDisplay, {
|
|
10794
10821
|
size: "md",
|
|
10795
10822
|
className: "wui-input-right-icon"
|
|
@@ -11004,11 +11031,7 @@ HexColorInput.displayName = "HexColorInput_UI";
|
|
|
11004
11031
|
|
|
11005
11032
|
// src/components/ColorPicker/HueSlider.tsx
|
|
11006
11033
|
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";
|
|
11034
|
+
import { Slider } from "@base-ui/react/slider";
|
|
11012
11035
|
import { styled as styled47 } from "styled-components";
|
|
11013
11036
|
import { formatHex as formatHex6 } from "culori/fn";
|
|
11014
11037
|
|
|
@@ -11065,7 +11088,7 @@ var Container8 = styled47.div`
|
|
|
11065
11088
|
padding: 0 var(--wui-space-03);
|
|
11066
11089
|
position: relative;
|
|
11067
11090
|
`;
|
|
11068
|
-
var Root = styled47(
|
|
11091
|
+
var Root = styled47(Slider.Root)`
|
|
11069
11092
|
align-items: center;
|
|
11070
11093
|
display: flex;
|
|
11071
11094
|
position: absolute;
|
|
@@ -11074,10 +11097,10 @@ var Root = styled47(SliderRoot)`
|
|
|
11074
11097
|
width: calc(100% - var(--wui-space-05));
|
|
11075
11098
|
height: 16px;
|
|
11076
11099
|
`;
|
|
11077
|
-
var Track = styled47(
|
|
11100
|
+
var Track = styled47(Slider.Track)`
|
|
11078
11101
|
width: 100%;
|
|
11079
11102
|
`;
|
|
11080
|
-
var Thumb = styled47(
|
|
11103
|
+
var Thumb = styled47(Slider.Thumb)`
|
|
11081
11104
|
position: relative;
|
|
11082
11105
|
`;
|
|
11083
11106
|
var ThumbInner = styled47.div`
|
|
@@ -11116,7 +11139,7 @@ var HueSlider = (props) => {
|
|
|
11116
11139
|
}, [valueAsHsv]);
|
|
11117
11140
|
const onHueChange = useCallback14(
|
|
11118
11141
|
(values) => {
|
|
11119
|
-
const newHue = values[0] ?? 0;
|
|
11142
|
+
const newHue = typeof values === "number" ? values : values[0] ?? 0;
|
|
11120
11143
|
onChangeNonDerivedValueAsHsv({
|
|
11121
11144
|
...nonDerivedValueAsHsv,
|
|
11122
11145
|
h: newHue
|
|
@@ -11130,7 +11153,7 @@ var HueSlider = (props) => {
|
|
|
11130
11153
|
...props,
|
|
11131
11154
|
style: containerStyle,
|
|
11132
11155
|
children: [
|
|
11133
|
-
/* @__PURE__ */
|
|
11156
|
+
/* @__PURE__ */ jsx275(
|
|
11134
11157
|
Root,
|
|
11135
11158
|
{
|
|
11136
11159
|
max: THREE_SIXTY,
|
|
@@ -11139,10 +11162,10 @@ var HueSlider = (props) => {
|
|
|
11139
11162
|
orientation: "horizontal",
|
|
11140
11163
|
step: 1,
|
|
11141
11164
|
value: [nonDerivedValueAsHsv.h ?? 0],
|
|
11142
|
-
children: [
|
|
11165
|
+
children: /* @__PURE__ */ jsxs32(Slider.Control, { children: [
|
|
11143
11166
|
/* @__PURE__ */ jsx275(Track, {}),
|
|
11144
11167
|
/* @__PURE__ */ jsx275(Thumb, { "aria-label": "Hue slider", children: /* @__PURE__ */ jsx275(ThumbInner, { style: thumbInnerStyle }) })
|
|
11145
|
-
]
|
|
11168
|
+
] })
|
|
11146
11169
|
}
|
|
11147
11170
|
),
|
|
11148
11171
|
/* @__PURE__ */ jsx275(HSVHueCanvas, { hsv: valueAsHsv })
|
|
@@ -11534,7 +11557,7 @@ import {
|
|
|
11534
11557
|
useTransition,
|
|
11535
11558
|
useEffect as useEffect15,
|
|
11536
11559
|
Children as Children5,
|
|
11537
|
-
isValidElement as
|
|
11560
|
+
isValidElement as isValidElement4
|
|
11538
11561
|
} from "react";
|
|
11539
11562
|
import { matchSorter } from "match-sorter";
|
|
11540
11563
|
import { styled as styled51 } from "styled-components";
|
|
@@ -11697,10 +11720,10 @@ var Tag = forwardRef16(
|
|
|
11697
11720
|
Tag.displayName = "Tag_UI";
|
|
11698
11721
|
|
|
11699
11722
|
// src/private/helpers/getTypographicStyles/getTypographicStyles.ts
|
|
11700
|
-
import { css as
|
|
11723
|
+
import { css as css32 } from "styled-components";
|
|
11701
11724
|
var typographicVariantStyleMap = { ...variantStyleMap2, ...variantStyleMap };
|
|
11702
11725
|
var getTypographicStyles = (variant) => {
|
|
11703
|
-
return
|
|
11726
|
+
return css32`
|
|
11704
11727
|
${typographicVariantStyleMap[variant]}
|
|
11705
11728
|
font-family: var(--font-family);
|
|
11706
11729
|
font-size: var(--font-size);
|
|
@@ -11840,7 +11863,7 @@ var POPOVER_WIDTH_OFFSET = 20;
|
|
|
11840
11863
|
var extractOptions = (children) => {
|
|
11841
11864
|
const options = {};
|
|
11842
11865
|
Children5.forEach(children, (child) => {
|
|
11843
|
-
if (
|
|
11866
|
+
if (isValidElement4(child) && "value" in child.props && "children" in child.props) {
|
|
11844
11867
|
options[child.props.value] = child.props.children ?? child.props.value;
|
|
11845
11868
|
}
|
|
11846
11869
|
});
|
|
@@ -11988,20 +12011,15 @@ var ComboboxOption = ({ value, children }) => {
|
|
|
11988
12011
|
};
|
|
11989
12012
|
|
|
11990
12013
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
11991
|
-
import { isNil as
|
|
12014
|
+
import { isNil as isNil16, isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
11992
12015
|
import { useEffect as useEffect16, useState as useState17 } from "react";
|
|
11993
12016
|
import { createPortal } from "react-dom";
|
|
11994
12017
|
|
|
11995
12018
|
// src/components/Menu/Menu.tsx
|
|
11996
|
-
import {
|
|
11997
|
-
DropdownMenu,
|
|
11998
|
-
DropdownMenuContent,
|
|
11999
|
-
DropdownMenuPortal,
|
|
12000
|
-
DropdownMenuTrigger
|
|
12001
|
-
} from "@radix-ui/react-dropdown-menu";
|
|
12019
|
+
import { Menu as BaseMenu } from "@base-ui/react/menu";
|
|
12002
12020
|
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
|
|
12021
|
+
import { forwardRef as forwardRef17, useCallback as useCallback16, useMemo as useMemo11 } from "react";
|
|
12022
|
+
import { styled as styled52, css as css33, keyframes as keyframes3 } from "styled-components";
|
|
12005
12023
|
|
|
12006
12024
|
// src/components/Menu/MenuContext.tsx
|
|
12007
12025
|
import { createContext as createContext6, useContext as useContext5 } from "react";
|
|
@@ -12030,7 +12048,7 @@ var close = keyframes3`
|
|
|
12030
12048
|
transform: scale(.97) translateY(-8px);
|
|
12031
12049
|
}
|
|
12032
12050
|
`;
|
|
12033
|
-
var menuItemCss =
|
|
12051
|
+
var menuItemCss = css33`
|
|
12034
12052
|
--menu-label-description-gap: var(--wui-space-01);
|
|
12035
12053
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
12036
12054
|
--menu-item-left-icon-size: 24px;
|
|
@@ -12041,7 +12059,7 @@ var menuItemCss = css32`
|
|
|
12041
12059
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
12042
12060
|
--menu-divider-margin: var(--wui-space-02);
|
|
12043
12061
|
`;
|
|
12044
|
-
var compactMenuItemCss =
|
|
12062
|
+
var compactMenuItemCss = css33`
|
|
12045
12063
|
--menu-label-description-gap: 0;
|
|
12046
12064
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
12047
12065
|
--menu-item-left-icon-size: 16px;
|
|
@@ -12052,7 +12070,7 @@ var compactMenuItemCss = css32`
|
|
|
12052
12070
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
12053
12071
|
--menu-divider-margin: var(--wui-space-01);
|
|
12054
12072
|
`;
|
|
12055
|
-
var menuContentCss =
|
|
12073
|
+
var menuContentCss = css33`
|
|
12056
12074
|
--menu-font-family: var(--wui-typography-family-default);
|
|
12057
12075
|
--menu-bg: var(--wui-color-bg-surface);
|
|
12058
12076
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -12068,18 +12086,18 @@ var menuContentCss = css32`
|
|
|
12068
12086
|
font-family: var(--menu-font-family);
|
|
12069
12087
|
background: var(--menu-bg);
|
|
12070
12088
|
border-radius: var(--menu-border-radius);
|
|
12071
|
-
box-shadow: var(--menu-shadow);
|
|
12072
|
-
max-height: var(--
|
|
12089
|
+
box-shadow: var(--menu-shadow);
|
|
12090
|
+
max-height: var(--available-height);
|
|
12073
12091
|
min-width: var(--menu-min-width);
|
|
12074
12092
|
max-width: var(--menu-max-width);
|
|
12075
12093
|
overflow: auto;
|
|
12076
12094
|
padding: var(--menu-padding);
|
|
12077
|
-
transform-origin: var(--
|
|
12095
|
+
transform-origin: var(--transform-origin);
|
|
12078
12096
|
z-index: var(--wui-zindex-menu);
|
|
12079
12097
|
border: 1px solid var(--wui-color-border);
|
|
12080
12098
|
|
|
12081
|
-
&[data-
|
|
12082
|
-
animation: var(--menu-animation-duration) var(--wui-motion-ease-in) ${close};
|
|
12099
|
+
&[data-closed] {
|
|
12100
|
+
animation: var(--menu-animation-duration) var(--wui-motion-ease-in) ${close};
|
|
12083
12101
|
}
|
|
12084
12102
|
|
|
12085
12103
|
${mq.smAndUp} {
|
|
@@ -12094,9 +12112,9 @@ var menuContentCss = css32`
|
|
|
12094
12112
|
margin: var(--menu-divider-margin) 0;
|
|
12095
12113
|
}
|
|
12096
12114
|
`;
|
|
12097
|
-
var
|
|
12115
|
+
var MenuPopup = styled52(BaseMenu.Popup)`
|
|
12098
12116
|
${menuContentCss}
|
|
12099
|
-
min-width: var(--
|
|
12117
|
+
min-width: var(--anchor-width);
|
|
12100
12118
|
`;
|
|
12101
12119
|
var Menu = forwardRef17(
|
|
12102
12120
|
({
|
|
@@ -12113,8 +12131,16 @@ var Menu = forwardRef17(
|
|
|
12113
12131
|
...props
|
|
12114
12132
|
}, ref) => {
|
|
12115
12133
|
const contextValue = useMemo11(() => ({ compact }), [compact]);
|
|
12134
|
+
const handleOpenChange = useCallback16(
|
|
12135
|
+
(nextOpen) => {
|
|
12136
|
+
if (nextOpen !== isOpen) {
|
|
12137
|
+
onOpenChange?.(nextOpen);
|
|
12138
|
+
}
|
|
12139
|
+
},
|
|
12140
|
+
[isOpen, onOpenChange]
|
|
12141
|
+
);
|
|
12116
12142
|
let controlProps = {
|
|
12117
|
-
...isNotNil20(onOpenChange) && isNotNil20(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
12143
|
+
...isNotNil20(onOpenChange) && isNotNil20(isOpen) ? { open: isOpen, onOpenChange: handleOpenChange } : {}
|
|
12118
12144
|
};
|
|
12119
12145
|
if (disabled) {
|
|
12120
12146
|
controlProps = {
|
|
@@ -12123,36 +12149,43 @@ var Menu = forwardRef17(
|
|
|
12123
12149
|
};
|
|
12124
12150
|
}
|
|
12125
12151
|
return /* @__PURE__ */ jsx281(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs36(
|
|
12126
|
-
|
|
12152
|
+
BaseMenu.Root,
|
|
12127
12153
|
{
|
|
12128
12154
|
modal: false,
|
|
12129
12155
|
...controlProps,
|
|
12130
12156
|
children: [
|
|
12131
|
-
/* @__PURE__ */ jsx281(
|
|
12132
|
-
|
|
12157
|
+
/* @__PURE__ */ jsx281(
|
|
12158
|
+
BaseMenu.Trigger,
|
|
12133
12159
|
{
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12160
|
+
render: isNotUndefined9(trigger) ? trigger : /* @__PURE__ */ jsx281(
|
|
12161
|
+
Button,
|
|
12162
|
+
{
|
|
12163
|
+
ref,
|
|
12164
|
+
"aria-expanded": isOpen,
|
|
12165
|
+
disabled,
|
|
12166
|
+
forceState: isOpen ? "active" : void 0,
|
|
12167
|
+
rightIcon: /* @__PURE__ */ jsx281(Icon, { type: "caret-down" }),
|
|
12168
|
+
...triggerProps,
|
|
12169
|
+
children: label
|
|
12170
|
+
}
|
|
12171
|
+
)
|
|
12141
12172
|
}
|
|
12142
|
-
)
|
|
12143
|
-
/* @__PURE__ */ jsx281(
|
|
12144
|
-
|
|
12173
|
+
),
|
|
12174
|
+
/* @__PURE__ */ jsx281(BaseMenu.Portal, { children: /* @__PURE__ */ jsx281(
|
|
12175
|
+
BaseMenu.Positioner,
|
|
12145
12176
|
{
|
|
12146
|
-
...props,
|
|
12147
|
-
$compact: compact,
|
|
12148
12177
|
align,
|
|
12149
12178
|
collisionPadding: 8,
|
|
12150
|
-
onFocusOutside: (event) => {
|
|
12151
|
-
event.preventDefault();
|
|
12152
|
-
},
|
|
12153
12179
|
side,
|
|
12154
12180
|
sideOffset: 6,
|
|
12155
|
-
children
|
|
12181
|
+
children: /* @__PURE__ */ jsx281(
|
|
12182
|
+
MenuPopup,
|
|
12183
|
+
{
|
|
12184
|
+
...props,
|
|
12185
|
+
$compact: compact,
|
|
12186
|
+
children
|
|
12187
|
+
}
|
|
12188
|
+
)
|
|
12156
12189
|
}
|
|
12157
12190
|
) })
|
|
12158
12191
|
]
|
|
@@ -12161,27 +12194,24 @@ var Menu = forwardRef17(
|
|
|
12161
12194
|
}
|
|
12162
12195
|
);
|
|
12163
12196
|
Menu.displayName = "Menu_UI";
|
|
12164
|
-
Menu.displayName = "Menu_UI";
|
|
12165
12197
|
|
|
12166
12198
|
// src/components/Menu/MenuLabel.tsx
|
|
12167
12199
|
import { styled as styled53 } from "styled-components";
|
|
12168
|
-
import { DropdownMenuLabel } from "@radix-ui/react-dropdown-menu";
|
|
12169
12200
|
import { jsx as jsx282 } from "react/jsx-runtime";
|
|
12170
|
-
var StyledMenuLabel = styled53
|
|
12201
|
+
var StyledMenuLabel = styled53.div`
|
|
12171
12202
|
padding: var(--wui-space-02);
|
|
12172
12203
|
`;
|
|
12173
12204
|
var MenuLabel = ({ children, ...props }) => {
|
|
12174
12205
|
return /* @__PURE__ */ jsx282(
|
|
12175
12206
|
StyledMenuLabel,
|
|
12176
12207
|
{
|
|
12177
|
-
|
|
12208
|
+
role: "group",
|
|
12178
12209
|
...props,
|
|
12179
12210
|
children: /* @__PURE__ */ jsx282(
|
|
12180
12211
|
Heading,
|
|
12181
12212
|
{
|
|
12182
12213
|
renderAs: "span",
|
|
12183
12214
|
variant: "heading6",
|
|
12184
|
-
...props,
|
|
12185
12215
|
children
|
|
12186
12216
|
}
|
|
12187
12217
|
)
|
|
@@ -12193,14 +12223,7 @@ MenuLabel.displayName = "MenuLabel_UI";
|
|
|
12193
12223
|
// src/components/Menu/SubMenu.tsx
|
|
12194
12224
|
import { useState as useState16 } from "react";
|
|
12195
12225
|
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";
|
|
12226
|
+
import { Menu as Menu2 } from "@base-ui/react/menu";
|
|
12204
12227
|
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
12205
12228
|
|
|
12206
12229
|
// src/components/Menu/MenuItemButton.tsx
|
|
@@ -12353,7 +12376,7 @@ var MenuItemDescription = ({ children }) => {
|
|
|
12353
12376
|
|
|
12354
12377
|
// src/components/Menu/SubMenu.tsx
|
|
12355
12378
|
import { jsx as jsx286, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12356
|
-
var
|
|
12379
|
+
var SubMenuPopup = styled57(Menu2.Popup)`
|
|
12357
12380
|
${menuContentCss}
|
|
12358
12381
|
|
|
12359
12382
|
${mq.smAndDown} {
|
|
@@ -12363,25 +12386,31 @@ var SubMenuContent = styled57(DropdownMenuSubContent)`
|
|
|
12363
12386
|
var StyledMobileSubMenuItems = styled57.div`
|
|
12364
12387
|
margin-left: var(--wui-space-04);
|
|
12365
12388
|
`;
|
|
12366
|
-
var StyledSubTrigger = styled57(
|
|
12389
|
+
var StyledSubTrigger = styled57(Menu2.SubmenuTrigger)`
|
|
12367
12390
|
outline: none;
|
|
12368
12391
|
|
|
12369
|
-
&[data-
|
|
12392
|
+
&[data-popup-open],
|
|
12370
12393
|
&[data-highlighted] {
|
|
12371
12394
|
background-color: var(--wui-color-bg-surface-hover);
|
|
12372
12395
|
}
|
|
12373
12396
|
`;
|
|
12374
12397
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
12375
12398
|
const { isSmAndUp } = useMq();
|
|
12376
|
-
const
|
|
12377
|
-
return /* @__PURE__ */ jsx286(
|
|
12378
|
-
|
|
12399
|
+
const Trigger = isSmAndUp ? StyledSubTrigger : Menu2.Item;
|
|
12400
|
+
return /* @__PURE__ */ jsx286(
|
|
12401
|
+
Trigger,
|
|
12379
12402
|
{
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12403
|
+
nativeButton: true,
|
|
12404
|
+
render: /* @__PURE__ */ jsx286(
|
|
12405
|
+
MenuItemButton,
|
|
12406
|
+
{
|
|
12407
|
+
...props,
|
|
12408
|
+
leftIcon: icon,
|
|
12409
|
+
rightIcon: /* @__PURE__ */ jsx286(Icon, { type: "caret-right" })
|
|
12410
|
+
}
|
|
12411
|
+
)
|
|
12383
12412
|
}
|
|
12384
|
-
)
|
|
12413
|
+
);
|
|
12385
12414
|
};
|
|
12386
12415
|
var SubMenu = ({
|
|
12387
12416
|
label,
|
|
@@ -12393,13 +12422,13 @@ var SubMenu = ({
|
|
|
12393
12422
|
const { isSmAndUp } = useMq();
|
|
12394
12423
|
const [isExpanded, setIsExpanded] = useState16(false);
|
|
12395
12424
|
const { compact } = useMenuContext();
|
|
12396
|
-
return isSmAndUp ? /* @__PURE__ */ jsxs38(
|
|
12425
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs38(Menu2.SubmenuRoot, { onOpenChange, children: [
|
|
12397
12426
|
/* @__PURE__ */ jsxs38(SubMenuTrigger, { ...props, children: [
|
|
12398
12427
|
/* @__PURE__ */ jsx286(MenuItemLabel, { children: label }),
|
|
12399
12428
|
isNotNil22(description) ? /* @__PURE__ */ jsx286(MenuItemDescription, { children: description }) : null
|
|
12400
12429
|
] }),
|
|
12401
|
-
/* @__PURE__ */ jsx286(
|
|
12402
|
-
] }) : /* @__PURE__ */ jsxs38(
|
|
12430
|
+
/* @__PURE__ */ jsx286(Menu2.Portal, { children: /* @__PURE__ */ jsx286(Menu2.Positioner, { children: /* @__PURE__ */ jsx286(SubMenuPopup, { $compact: compact, children }) }) })
|
|
12431
|
+
] }) : /* @__PURE__ */ jsxs38(Menu2.Group, { children: [
|
|
12403
12432
|
/* @__PURE__ */ jsxs38(
|
|
12404
12433
|
SubMenuTrigger,
|
|
12405
12434
|
{
|
|
@@ -12421,16 +12450,18 @@ SubMenu.displayName = "SubMenu_UI";
|
|
|
12421
12450
|
|
|
12422
12451
|
// src/components/Menu/MenuItem.tsx
|
|
12423
12452
|
import { forwardRef as forwardRef19 } from "react";
|
|
12424
|
-
import {
|
|
12453
|
+
import { Menu as Menu3 } from "@base-ui/react/menu";
|
|
12454
|
+
import { isNil as isNil15 } from "@wistia/type-guards";
|
|
12425
12455
|
import { jsx as jsx287 } from "react/jsx-runtime";
|
|
12426
12456
|
var MenuItem = forwardRef19(
|
|
12427
|
-
({ onSelect = () => null, ...props }, ref) => {
|
|
12457
|
+
({ onSelect = () => null, closeOnClick = true, ...props }, ref) => {
|
|
12428
12458
|
return /* @__PURE__ */ jsx287(
|
|
12429
|
-
|
|
12459
|
+
Menu3.Item,
|
|
12430
12460
|
{
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12461
|
+
closeOnClick,
|
|
12462
|
+
nativeButton: isNil15(props.href),
|
|
12463
|
+
onClick: onSelect,
|
|
12464
|
+
render: /* @__PURE__ */ jsx287(
|
|
12434
12465
|
MenuItemButton,
|
|
12435
12466
|
{
|
|
12436
12467
|
...props,
|
|
@@ -12445,15 +12476,15 @@ var MenuItem = forwardRef19(
|
|
|
12445
12476
|
MenuItem.displayName = "MenuItem_UI";
|
|
12446
12477
|
|
|
12447
12478
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
12448
|
-
import {
|
|
12479
|
+
import { Menu as Menu4 } from "@base-ui/react/menu";
|
|
12449
12480
|
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
12450
12481
|
var MenuRadioGroup = ({ children, ...props }) => {
|
|
12451
|
-
return /* @__PURE__ */ jsx288(
|
|
12482
|
+
return /* @__PURE__ */ jsx288(Menu4.RadioGroup, { ...props, children });
|
|
12452
12483
|
};
|
|
12453
12484
|
MenuRadioGroup.displayName = "MenuRadioGroup_UI";
|
|
12454
12485
|
|
|
12455
12486
|
// src/components/Menu/RadioMenuItem.tsx
|
|
12456
|
-
import {
|
|
12487
|
+
import { Menu as Menu5 } from "@base-ui/react/menu";
|
|
12457
12488
|
import { jsx as jsx289 } from "react/jsx-runtime";
|
|
12458
12489
|
var RadioMenuItem = ({
|
|
12459
12490
|
onSelect,
|
|
@@ -12467,27 +12498,27 @@ var RadioMenuItem = ({
|
|
|
12467
12498
|
),
|
|
12468
12499
|
...props
|
|
12469
12500
|
}) => {
|
|
12470
|
-
const extraProps = onSelect ? { onSelect } : {};
|
|
12501
|
+
const extraProps = onSelect ? { onClick: onSelect } : {};
|
|
12471
12502
|
return /* @__PURE__ */ jsx289(
|
|
12472
|
-
|
|
12503
|
+
Menu5.RadioItem,
|
|
12473
12504
|
{
|
|
12505
|
+
nativeButton: true,
|
|
12474
12506
|
...extraProps,
|
|
12475
|
-
|
|
12476
|
-
value,
|
|
12477
|
-
children: /* @__PURE__ */ jsx289(
|
|
12507
|
+
render: /* @__PURE__ */ jsx289(
|
|
12478
12508
|
MenuItemButton,
|
|
12479
12509
|
{
|
|
12480
12510
|
...props,
|
|
12481
|
-
rightIcon: /* @__PURE__ */ jsx289(
|
|
12511
|
+
rightIcon: /* @__PURE__ */ jsx289(Menu5.RadioItemIndicator, { children: indicator })
|
|
12482
12512
|
}
|
|
12483
|
-
)
|
|
12513
|
+
),
|
|
12514
|
+
value
|
|
12484
12515
|
}
|
|
12485
12516
|
);
|
|
12486
12517
|
};
|
|
12487
12518
|
RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
12488
12519
|
|
|
12489
12520
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
12490
|
-
import {
|
|
12521
|
+
import { Menu as Menu6 } from "@base-ui/react/menu";
|
|
12491
12522
|
import { isNotNil as isNotNil23 } from "@wistia/type-guards";
|
|
12492
12523
|
import { jsx as jsx290, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12493
12524
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
@@ -12552,18 +12583,19 @@ var CheckboxMenuItem = ({
|
|
|
12552
12583
|
...props
|
|
12553
12584
|
}) => {
|
|
12554
12585
|
return /* @__PURE__ */ jsx290(
|
|
12555
|
-
|
|
12586
|
+
Menu6.CheckboxItem,
|
|
12556
12587
|
{
|
|
12557
|
-
asChild: true,
|
|
12558
12588
|
checked,
|
|
12589
|
+
closeOnClick: false,
|
|
12590
|
+
nativeButton: true,
|
|
12559
12591
|
onCheckedChange,
|
|
12560
|
-
onSelect,
|
|
12561
|
-
|
|
12592
|
+
onClick: onSelect,
|
|
12593
|
+
render: /* @__PURE__ */ jsx290(
|
|
12562
12594
|
MenuItemButton,
|
|
12563
12595
|
{
|
|
12564
12596
|
...props,
|
|
12565
12597
|
leftIcon: isNotNil23(props.icon) ? props.icon : /* @__PURE__ */ jsx290(CheckboxIndicator, { checked }),
|
|
12566
|
-
rightIcon: isNotNil23(props.icon) ? /* @__PURE__ */ jsx290(
|
|
12598
|
+
rightIcon: isNotNil23(props.icon) ? /* @__PURE__ */ jsx290(Menu6.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx290(Icon, { type: "checkmark" }) }) : void 0
|
|
12567
12599
|
}
|
|
12568
12600
|
)
|
|
12569
12601
|
}
|
|
@@ -12573,7 +12605,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem_UI";
|
|
|
12573
12605
|
|
|
12574
12606
|
// src/components/Menu/FilterMenu.tsx
|
|
12575
12607
|
import { Children as Children6, forwardRef as forwardRef20 } from "react";
|
|
12576
|
-
import {
|
|
12608
|
+
import { Menu as BaseMenu2 } from "@base-ui/react/menu";
|
|
12577
12609
|
import { jsx as jsx291, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12578
12610
|
var FilterMenuItem = CheckboxMenuItem;
|
|
12579
12611
|
var FilterMenu = forwardRef20(
|
|
@@ -12635,7 +12667,7 @@ var FilterMenu = forwardRef20(
|
|
|
12635
12667
|
),
|
|
12636
12668
|
Children6.toArray(children).length > 0 ? children : /* @__PURE__ */ jsx291(MenuItem, { disabled: true, children: "No results found" }),
|
|
12637
12669
|
value.length > 0 && /* @__PURE__ */ jsx291(
|
|
12638
|
-
|
|
12670
|
+
BaseMenu2.Item,
|
|
12639
12671
|
{
|
|
12640
12672
|
disabled: true,
|
|
12641
12673
|
style: { marginTop: "24px" },
|
|
@@ -12686,7 +12718,7 @@ var ContextMenu = ({
|
|
|
12686
12718
|
const [isRightClicked, setIsRightClicked] = useState17(false);
|
|
12687
12719
|
const [menuPosition, setMenuPosition] = useState17(position ?? { x: 0, y: 0 });
|
|
12688
12720
|
useEffect16(() => {
|
|
12689
|
-
if (
|
|
12721
|
+
if (isNil16(position)) {
|
|
12690
12722
|
const onContextMenu = (event) => {
|
|
12691
12723
|
event.preventDefault();
|
|
12692
12724
|
setMenuPosition({ x: event.clientX, y: event.clientY });
|
|
@@ -13152,9 +13184,9 @@ var DataListItemValue = (props) => {
|
|
|
13152
13184
|
DataListItemValue.displayName = "DataListItemValue_UI";
|
|
13153
13185
|
|
|
13154
13186
|
// src/components/Divider/Divider.tsx
|
|
13155
|
-
import { styled as styled64, css as
|
|
13187
|
+
import { styled as styled64, css as css34 } from "styled-components";
|
|
13156
13188
|
import { jsx as jsx301 } from "react/jsx-runtime";
|
|
13157
|
-
var horizontalBorderCss =
|
|
13189
|
+
var horizontalBorderCss = css34`
|
|
13158
13190
|
border-top-color: var(--wui-color-border);
|
|
13159
13191
|
border-top-style: solid;
|
|
13160
13192
|
border-top-width: 1px;
|
|
@@ -13163,7 +13195,7 @@ var horizontalBorderCss = css33`
|
|
|
13163
13195
|
margin-left: var(--wui-divider-inset);
|
|
13164
13196
|
margin-right: var(--wui-divider-inset);
|
|
13165
13197
|
`;
|
|
13166
|
-
var verticalBorderCss =
|
|
13198
|
+
var verticalBorderCss = css34`
|
|
13167
13199
|
background-color: var(--wui-color-border);
|
|
13168
13200
|
max-width: 1px;
|
|
13169
13201
|
min-height: 100%;
|
|
@@ -13206,7 +13238,7 @@ var Divider = ({
|
|
|
13206
13238
|
Divider.displayName = "Divider_UI";
|
|
13207
13239
|
|
|
13208
13240
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
13209
|
-
import { styled as styled65, css as
|
|
13241
|
+
import { styled as styled65, css as css35 } from "styled-components";
|
|
13210
13242
|
import { useState as useState18, useRef as useRef17 } from "react";
|
|
13211
13243
|
import { Fragment as Fragment7, jsx as jsx302, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13212
13244
|
var StyledInput = styled65(Input)`
|
|
@@ -13234,7 +13266,7 @@ var StyledInput = styled65(Input)`
|
|
|
13234
13266
|
resize: none;
|
|
13235
13267
|
}
|
|
13236
13268
|
`;
|
|
13237
|
-
var editableStyles =
|
|
13269
|
+
var editableStyles = css35`
|
|
13238
13270
|
&:has(+ :focus-within) {
|
|
13239
13271
|
background: var(--wui-color-bg-surface-hover);
|
|
13240
13272
|
}
|
|
@@ -13335,7 +13367,7 @@ var EditableHeading = ({
|
|
|
13335
13367
|
);
|
|
13336
13368
|
}
|
|
13337
13369
|
return /* @__PURE__ */ jsxs43(Fragment7, { children: [
|
|
13338
|
-
/* @__PURE__ */ jsx302(
|
|
13370
|
+
/* @__PURE__ */ jsx302(Tooltip2, { content: tooltipText, children: HeadingComponent2 }),
|
|
13339
13371
|
/* @__PURE__ */ jsx302(ScreenReaderOnly, { children: /* @__PURE__ */ jsx302(
|
|
13340
13372
|
"button",
|
|
13341
13373
|
{
|
|
@@ -13349,11 +13381,11 @@ var EditableHeading = ({
|
|
|
13349
13381
|
|
|
13350
13382
|
// src/components/EditableText/EditableTextDisplay.tsx
|
|
13351
13383
|
import { useContext as useContext6, useRef as useRef18, forwardRef as forwardRef21 } from "react";
|
|
13352
|
-
import { styled as styled67, css as
|
|
13384
|
+
import { styled as styled67, css as css36 } from "styled-components";
|
|
13353
13385
|
import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
13354
13386
|
|
|
13355
13387
|
// src/components/EditableText/EditableTextRoot.tsx
|
|
13356
|
-
import { createContext as createContext7, useMemo as useMemo12, useState as useState19, useCallback as
|
|
13388
|
+
import { createContext as createContext7, useMemo as useMemo12, useState as useState19, useCallback as useCallback17, useId as useId4 } from "react";
|
|
13357
13389
|
import { isNonEmptyString as isNonEmptyString6 } from "@wistia/type-guards";
|
|
13358
13390
|
import { styled as styled66 } from "styled-components";
|
|
13359
13391
|
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
@@ -13424,7 +13456,7 @@ var EditableTextRoot = ({
|
|
|
13424
13456
|
const value = isControlled ? controlledValue : internalValue;
|
|
13425
13457
|
const generatedId = useId4();
|
|
13426
13458
|
const computedId = isNonEmptyString6(id) ? id : `wistia-ui-editable-text-${generatedId}`;
|
|
13427
|
-
const handleSetIsEditing =
|
|
13459
|
+
const handleSetIsEditing = useCallback17(
|
|
13428
13460
|
(editing) => {
|
|
13429
13461
|
if (editing && !isEditing) {
|
|
13430
13462
|
setOriginalValue(value);
|
|
@@ -13434,7 +13466,7 @@ var EditableTextRoot = ({
|
|
|
13434
13466
|
},
|
|
13435
13467
|
[isEditing, value, onEditingChange]
|
|
13436
13468
|
);
|
|
13437
|
-
const setValue =
|
|
13469
|
+
const setValue = useCallback17(
|
|
13438
13470
|
(newValue) => {
|
|
13439
13471
|
if (!isControlled) {
|
|
13440
13472
|
setInternalValue(newValue);
|
|
@@ -13512,14 +13544,14 @@ var StyledEditableTextDisplay = styled67.div`
|
|
|
13512
13544
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
13513
13545
|
${({ $maxLines }) => {
|
|
13514
13546
|
if (isNotNil26($maxLines)) {
|
|
13515
|
-
return
|
|
13547
|
+
return css36`
|
|
13516
13548
|
${ellipsisStyle};
|
|
13517
13549
|
${lineClampCss($maxLines)};
|
|
13518
13550
|
`;
|
|
13519
13551
|
}
|
|
13520
13552
|
return void 0;
|
|
13521
13553
|
}}
|
|
13522
|
-
${({ $minLines }) => isNotNil26($minLines) &&
|
|
13554
|
+
${({ $minLines }) => isNotNil26($minLines) && css36`
|
|
13523
13555
|
min-height: calc(${$minLines}lh + calc(var(--wui-editable-text-padding) * 2));
|
|
13524
13556
|
`}
|
|
13525
13557
|
word-break: normal;
|
|
@@ -13847,7 +13879,7 @@ var EditableTextTrigger = ({
|
|
|
13847
13879
|
// src/components/FeatureCard/FeatureCard.tsx
|
|
13848
13880
|
import { useEffect as useEffect18, useState as useState20, useMemo as useMemo13 } from "react";
|
|
13849
13881
|
import { styled as styled69 } from "styled-components";
|
|
13850
|
-
import { isNil as
|
|
13882
|
+
import { isNil as isNil17, isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
13851
13883
|
import { Fragment as Fragment8, jsx as jsx308, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13852
13884
|
var BREAKPOINT_WIDTH = 600;
|
|
13853
13885
|
var VERTICAL_BREAKPOINT_WIDTH = 284;
|
|
@@ -13912,7 +13944,7 @@ var FeatureCard = ({
|
|
|
13912
13944
|
const hasImage = isNotNil28(image);
|
|
13913
13945
|
const shouldShowImage = hasImage && (isVerticalLayout || width >= MIN_IMAGE_WIDTH);
|
|
13914
13946
|
const iconPosition = useMemo13(() => {
|
|
13915
|
-
if (
|
|
13947
|
+
if (isNil17(icon)) {
|
|
13916
13948
|
return "none";
|
|
13917
13949
|
}
|
|
13918
13950
|
if (isSmallContainer) {
|
|
@@ -14104,12 +14136,12 @@ var FeatureCardImage = ({
|
|
|
14104
14136
|
};
|
|
14105
14137
|
|
|
14106
14138
|
// src/components/Form/useFormState.tsx
|
|
14107
|
-
import { useCallback as
|
|
14139
|
+
import { useCallback as useCallback18, useState as useState21 } from "react";
|
|
14108
14140
|
var useFormState = (action, initialData = {}) => {
|
|
14109
14141
|
const [data, setData] = useState21(initialData);
|
|
14110
14142
|
const [isPending, setIsPending] = useState21(false);
|
|
14111
14143
|
const [error, setError] = useState21(null);
|
|
14112
|
-
const formAction =
|
|
14144
|
+
const formAction = useCallback18(
|
|
14113
14145
|
async (nextFormData) => {
|
|
14114
14146
|
if (nextFormData === null) {
|
|
14115
14147
|
setData(initialData);
|
|
@@ -14203,18 +14235,18 @@ var validateWithYup = (schema) => {
|
|
|
14203
14235
|
|
|
14204
14236
|
// src/components/FormField/FormField.tsx
|
|
14205
14237
|
import { Children as Children10, cloneElement as cloneElement8, useContext as useContext13 } from "react";
|
|
14206
|
-
import { styled as styled71, css as
|
|
14238
|
+
import { styled as styled71, css as css37 } from "styled-components";
|
|
14207
14239
|
import { isArray as isArray4, isNotNil as isNotNil29, isNotUndefined as isNotUndefined13, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
14208
14240
|
import { jsx as jsx311, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
14209
|
-
var inlineErrorStyles =
|
|
14241
|
+
var inlineErrorStyles = css37`
|
|
14210
14242
|
grid-template-rows: 1fr auto;
|
|
14211
14243
|
grid-template-areas: 'label-description input' '. error';
|
|
14212
14244
|
`;
|
|
14213
|
-
var inlineBaseGridAreaStyles =
|
|
14245
|
+
var inlineBaseGridAreaStyles = css37`
|
|
14214
14246
|
grid-template-rows: 1fr;
|
|
14215
14247
|
grid-template-areas: 'label-description input';
|
|
14216
14248
|
`;
|
|
14217
|
-
var blockGridErrorStyles =
|
|
14249
|
+
var blockGridErrorStyles = css37`
|
|
14218
14250
|
grid-template-rows: auto 1fr auto;
|
|
14219
14251
|
grid-template-areas: 'label-description' 'input' 'error';
|
|
14220
14252
|
`;
|
|
@@ -14411,7 +14443,7 @@ var RadioGroupContext = createContext8(null);
|
|
|
14411
14443
|
var useRadioGroup = () => {
|
|
14412
14444
|
return useContext14(RadioGroupContext);
|
|
14413
14445
|
};
|
|
14414
|
-
var
|
|
14446
|
+
var RadioGroup2 = ({
|
|
14415
14447
|
children,
|
|
14416
14448
|
name,
|
|
14417
14449
|
onChange,
|
|
@@ -14429,28 +14461,28 @@ var RadioGroup = ({
|
|
|
14429
14461
|
}, [name, derivedValue, onChange]);
|
|
14430
14462
|
return /* @__PURE__ */ jsx312(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ jsx312(FormGroup, { ...props, children }) });
|
|
14431
14463
|
};
|
|
14432
|
-
|
|
14464
|
+
RadioGroup2.displayName = "RadioGroup_UI";
|
|
14433
14465
|
|
|
14434
14466
|
// src/components/Grid/Grid.tsx
|
|
14435
14467
|
import { forwardRef as forwardRef22 } from "react";
|
|
14436
|
-
import { styled as styled72, css as
|
|
14468
|
+
import { styled as styled72, css as css38 } from "styled-components";
|
|
14437
14469
|
import { isRecord as isRecord5 } from "@wistia/type-guards";
|
|
14438
14470
|
import { jsx as jsx313 } from "react/jsx-runtime";
|
|
14439
14471
|
var DEFAULT_ELEMENT5 = "div";
|
|
14440
14472
|
var getGridTemplateColumns = (maxColumns, minChildWidth, expandItems) => {
|
|
14441
14473
|
if (minChildWidth === "auto" && maxColumns === "auto") {
|
|
14442
|
-
return
|
|
14474
|
+
return css38`
|
|
14443
14475
|
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
|
14444
14476
|
`;
|
|
14445
14477
|
}
|
|
14446
14478
|
const gridMode = expandItems ? "auto-fit" : "auto-fill";
|
|
14447
14479
|
const minChildWidthValue = minChildWidth === "auto" ? 0 : minChildWidth;
|
|
14448
14480
|
if (maxColumns === "auto") {
|
|
14449
|
-
return
|
|
14481
|
+
return css38`
|
|
14450
14482
|
grid-template-columns: repeat(${gridMode}, minmax(${minChildWidthValue}px, 1fr));
|
|
14451
14483
|
`;
|
|
14452
14484
|
}
|
|
14453
|
-
return
|
|
14485
|
+
return css38`
|
|
14454
14486
|
/* Adapted from https://9elements.com/blog/building-a-rock-solid-auto-grid/ */
|
|
14455
14487
|
--wui-grid-total-column-gap-width: calc(${maxColumns - 1} * var(--wui-grid-column-gap));
|
|
14456
14488
|
--wui-grid-max-column-width: calc(
|
|
@@ -14507,8 +14539,8 @@ GridComponent.displayName = "Grid_UI";
|
|
|
14507
14539
|
var Grid = makePolymorphic(GridComponent);
|
|
14508
14540
|
|
|
14509
14541
|
// src/components/PreviewCard/PreviewCard.tsx
|
|
14510
|
-
import {
|
|
14511
|
-
import { styled as styled73, css as
|
|
14542
|
+
import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card";
|
|
14543
|
+
import { styled as styled73, css as css39, keyframes as keyframes5 } from "styled-components";
|
|
14512
14544
|
import { jsx as jsx314, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
14513
14545
|
var previewCardOpen = keyframes5`
|
|
14514
14546
|
from {
|
|
@@ -14530,26 +14562,26 @@ var previewCardClose = keyframes5`
|
|
|
14530
14562
|
transform: scale(0.96);
|
|
14531
14563
|
}
|
|
14532
14564
|
`;
|
|
14533
|
-
var
|
|
14565
|
+
var StyledPopup3 = styled73(BasePreviewCard.Popup)`
|
|
14534
14566
|
--preview-card-animation-duration: var(--wui-motion-duration-03);
|
|
14535
14567
|
--preview-card-animation-ease: var(--wui-motion-ease-out);
|
|
14536
14568
|
|
|
14537
14569
|
z-index: var(--wui-zindex-popover);
|
|
14538
|
-
transform-origin: var(--
|
|
14570
|
+
transform-origin: var(--transform-origin);
|
|
14539
14571
|
animation-duration: var(--preview-card-animation-duration);
|
|
14540
14572
|
animation-timing-function: var(--preview-card-animation-ease);
|
|
14541
14573
|
will-change: transform, opacity;
|
|
14542
14574
|
|
|
14543
|
-
&[data-
|
|
14575
|
+
&[data-open] {
|
|
14544
14576
|
animation-name: ${previewCardOpen};
|
|
14545
14577
|
}
|
|
14546
14578
|
|
|
14547
|
-
&[data-
|
|
14579
|
+
&[data-closed] {
|
|
14548
14580
|
animation-name: ${previewCardClose};
|
|
14549
14581
|
}
|
|
14550
14582
|
|
|
14551
14583
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
14552
|
-
${({ $unstyled, $paddingSize }) => !$unstyled &&
|
|
14584
|
+
${({ $unstyled, $paddingSize }) => !$unstyled && css39`
|
|
14553
14585
|
border-radius: var(--wui-border-radius-02);
|
|
14554
14586
|
padding: var(--wui-${$paddingSize});
|
|
14555
14587
|
max-width: var(--wui-preview-card-max-width, 320px);
|
|
@@ -14571,6 +14603,8 @@ var PreviewCard = ({
|
|
|
14571
14603
|
closeDelay = 300,
|
|
14572
14604
|
colorScheme = "inherit",
|
|
14573
14605
|
forceOpen,
|
|
14606
|
+
side,
|
|
14607
|
+
align,
|
|
14574
14608
|
...props
|
|
14575
14609
|
}) => {
|
|
14576
14610
|
const style = {
|
|
@@ -14581,29 +14615,35 @@ var PreviewCard = ({
|
|
|
14581
14615
|
if (forceOpen === true) {
|
|
14582
14616
|
rootProps.open = true;
|
|
14583
14617
|
}
|
|
14584
|
-
return /* @__PURE__ */ jsxs49(
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14618
|
+
return /* @__PURE__ */ jsxs49(BasePreviewCard.Root, { ...rootProps, children: [
|
|
14619
|
+
/* @__PURE__ */ jsx314(
|
|
14620
|
+
BasePreviewCard.Trigger,
|
|
14621
|
+
{
|
|
14622
|
+
closeDelay,
|
|
14623
|
+
delay: openDelay,
|
|
14624
|
+
render: trigger
|
|
14625
|
+
}
|
|
14626
|
+
),
|
|
14627
|
+
/* @__PURE__ */ jsx314(BasePreviewCard.Portal, { children: /* @__PURE__ */ jsx314(
|
|
14628
|
+
BasePreviewCard.Positioner,
|
|
14629
|
+
{
|
|
14630
|
+
align,
|
|
14631
|
+
side,
|
|
14632
|
+
sideOffset: 8,
|
|
14633
|
+
children: /* @__PURE__ */ jsx314(
|
|
14634
|
+
StyledPopup3,
|
|
14594
14635
|
{
|
|
14595
14636
|
$colorScheme: colorScheme,
|
|
14596
14637
|
$paddingSize: paddingSize,
|
|
14597
|
-
sideOffset: 8,
|
|
14598
14638
|
...props,
|
|
14599
14639
|
$unstyled: unstyled,
|
|
14600
14640
|
style,
|
|
14601
14641
|
children: /* @__PURE__ */ jsx314("div", { children })
|
|
14602
14642
|
}
|
|
14603
|
-
)
|
|
14604
|
-
|
|
14605
|
-
}
|
|
14606
|
-
);
|
|
14643
|
+
)
|
|
14644
|
+
}
|
|
14645
|
+
) })
|
|
14646
|
+
] });
|
|
14607
14647
|
};
|
|
14608
14648
|
PreviewCard.displayName = "PreviewCard_UI";
|
|
14609
14649
|
|
|
@@ -14835,17 +14875,17 @@ KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
|
14835
14875
|
|
|
14836
14876
|
// src/components/List/List.tsx
|
|
14837
14877
|
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
14838
|
-
import { styled as styled78, css as
|
|
14878
|
+
import { styled as styled78, css as css40 } from "styled-components";
|
|
14839
14879
|
|
|
14840
14880
|
// src/components/List/ListItem.tsx
|
|
14841
14881
|
import { styled as styled77 } from "styled-components";
|
|
14842
|
-
import { isNil as
|
|
14882
|
+
import { isNil as isNil18 } from "@wistia/type-guards";
|
|
14843
14883
|
import { jsx as jsx318 } from "react/jsx-runtime";
|
|
14844
14884
|
var ListItemComponent = styled77.li`
|
|
14845
14885
|
margin-bottom: var(--wui-space-02);
|
|
14846
14886
|
`;
|
|
14847
14887
|
var ListItem = ({ children }) => {
|
|
14848
|
-
if (
|
|
14888
|
+
if (isNil18(children)) {
|
|
14849
14889
|
return null;
|
|
14850
14890
|
}
|
|
14851
14891
|
return /* @__PURE__ */ jsx318(ListItemComponent, { children });
|
|
@@ -14854,7 +14894,7 @@ ListItem.displayName = "ListItem_UI";
|
|
|
14854
14894
|
|
|
14855
14895
|
// src/components/List/List.tsx
|
|
14856
14896
|
import { jsx as jsx319, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
14857
|
-
var spacesStyle =
|
|
14897
|
+
var spacesStyle = css40`
|
|
14858
14898
|
overflow: hidden;
|
|
14859
14899
|
padding-left: 0;
|
|
14860
14900
|
vertical-align: bottom;
|
|
@@ -14876,7 +14916,7 @@ var spacesStyle = css39`
|
|
|
14876
14916
|
}
|
|
14877
14917
|
}
|
|
14878
14918
|
`;
|
|
14879
|
-
var commasStyle =
|
|
14919
|
+
var commasStyle = css40`
|
|
14880
14920
|
${spacesStyle};
|
|
14881
14921
|
|
|
14882
14922
|
li {
|
|
@@ -14886,7 +14926,7 @@ var commasStyle = css39`
|
|
|
14886
14926
|
}
|
|
14887
14927
|
}
|
|
14888
14928
|
`;
|
|
14889
|
-
var slashesStyle =
|
|
14929
|
+
var slashesStyle = css40`
|
|
14890
14930
|
${spacesStyle};
|
|
14891
14931
|
|
|
14892
14932
|
li {
|
|
@@ -14897,7 +14937,7 @@ var slashesStyle = css39`
|
|
|
14897
14937
|
}
|
|
14898
14938
|
}
|
|
14899
14939
|
`;
|
|
14900
|
-
var breadcrumbsStyle =
|
|
14940
|
+
var breadcrumbsStyle = css40`
|
|
14901
14941
|
${spacesStyle};
|
|
14902
14942
|
|
|
14903
14943
|
li {
|
|
@@ -14908,7 +14948,7 @@ var breadcrumbsStyle = css39`
|
|
|
14908
14948
|
}
|
|
14909
14949
|
}
|
|
14910
14950
|
`;
|
|
14911
|
-
var unbulletedStyle =
|
|
14951
|
+
var unbulletedStyle = css40`
|
|
14912
14952
|
list-style: none;
|
|
14913
14953
|
padding-left: 0;
|
|
14914
14954
|
`;
|
|
@@ -15017,12 +15057,12 @@ import { styled as styled80 } from "styled-components";
|
|
|
15017
15057
|
import ReactMarkdown from "react-markdown";
|
|
15018
15058
|
|
|
15019
15059
|
// src/css/baseMarkdownCss.tsx
|
|
15020
|
-
import { css as
|
|
15060
|
+
import { css as css41 } from "styled-components";
|
|
15021
15061
|
var textSizeToTokenMap = {
|
|
15022
15062
|
body2: "--wui-typography-body-2-size",
|
|
15023
15063
|
body3: "--wui-typography-body-3-size"
|
|
15024
15064
|
};
|
|
15025
|
-
var baseMarkdownCss = (textSize = "body2") =>
|
|
15065
|
+
var baseMarkdownCss = (textSize = "body2") => css41`
|
|
15026
15066
|
--wui-markdown-base-unit: var(${textSizeToTokenMap[textSize]});
|
|
15027
15067
|
|
|
15028
15068
|
font-size: var(--wui-markdown-base-unit);
|
|
@@ -15361,40 +15401,37 @@ Meter.displayName = "Meter_UI";
|
|
|
15361
15401
|
|
|
15362
15402
|
// src/components/Modal/Modal.tsx
|
|
15363
15403
|
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";
|
|
15404
|
+
import { styled as styled85 } from "styled-components";
|
|
15405
|
+
import { Dialog as Dialog5 } from "@base-ui/react/dialog";
|
|
15406
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
15371
15407
|
|
|
15372
15408
|
// src/components/Modal/ModalHeader.tsx
|
|
15373
|
-
import { styled as
|
|
15374
|
-
import {
|
|
15409
|
+
import { styled as styled82 } from "styled-components";
|
|
15410
|
+
import { Dialog as Dialog2 } from "@base-ui/react/dialog";
|
|
15375
15411
|
|
|
15376
15412
|
// src/components/Modal/ModalCloseButton.tsx
|
|
15377
|
-
import {
|
|
15378
|
-
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
15413
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
15379
15414
|
import { jsx as jsx323 } from "react/jsx-runtime";
|
|
15380
|
-
var CloseButton = styled82(DialogClose)`
|
|
15381
|
-
align-self: start;
|
|
15382
|
-
`;
|
|
15383
15415
|
var ModalCloseButton = () => {
|
|
15384
|
-
return /* @__PURE__ */ jsx323(
|
|
15385
|
-
|
|
15416
|
+
return /* @__PURE__ */ jsx323(
|
|
15417
|
+
Dialog.Close,
|
|
15386
15418
|
{
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15419
|
+
render: /* @__PURE__ */ jsx323(
|
|
15420
|
+
IconButton,
|
|
15421
|
+
{
|
|
15422
|
+
label: "Dismiss modal",
|
|
15423
|
+
size: "sm",
|
|
15424
|
+
variant: "ghost",
|
|
15425
|
+
children: /* @__PURE__ */ jsx323(Icon, { type: "close" })
|
|
15426
|
+
}
|
|
15427
|
+
)
|
|
15391
15428
|
}
|
|
15392
|
-
)
|
|
15429
|
+
);
|
|
15393
15430
|
};
|
|
15394
15431
|
|
|
15395
15432
|
// src/components/Modal/ModalHeader.tsx
|
|
15396
15433
|
import { jsx as jsx324, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
15397
|
-
var Header =
|
|
15434
|
+
var Header = styled82.header`
|
|
15398
15435
|
display: flex;
|
|
15399
15436
|
order: 1;
|
|
15400
15437
|
padding: 0 var(--wui-space-05);
|
|
@@ -15402,7 +15439,7 @@ var Header = styled83.header`
|
|
|
15402
15439
|
gap: var(--wui-space-01);
|
|
15403
15440
|
justify-content: ${({ $hideTitle }) => $hideTitle ? "flex-end" : "space-between"}; /* ensure ModalCloseButton is right-aligned */
|
|
15404
15441
|
|
|
15405
|
-
/*
|
|
15442
|
+
/* Dialog.Title creates an h2 element which inherits some margin */
|
|
15406
15443
|
h2 {
|
|
15407
15444
|
margin: 0;
|
|
15408
15445
|
padding-right: ${({ $hideCloseButon }) => $hideCloseButon ? "0" : "var(--wui-space-03)"};
|
|
@@ -15414,7 +15451,7 @@ var Header = styled83.header`
|
|
|
15414
15451
|
top: var(--wui-space-03);
|
|
15415
15452
|
}
|
|
15416
15453
|
`;
|
|
15417
|
-
var Title =
|
|
15454
|
+
var Title = styled82(Dialog2.Title)`
|
|
15418
15455
|
font-family: var(--wui-typography-heading-2-family);
|
|
15419
15456
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
15420
15457
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -15442,8 +15479,9 @@ var ModalHeader = ({
|
|
|
15442
15479
|
|
|
15443
15480
|
// src/components/Modal/ModalContent.tsx
|
|
15444
15481
|
import { forwardRef as forwardRef25 } from "react";
|
|
15445
|
-
import { styled as
|
|
15446
|
-
import {
|
|
15482
|
+
import { styled as styled83, css as css42, keyframes as keyframes6 } from "styled-components";
|
|
15483
|
+
import { Dialog as Dialog3 } from "@base-ui/react/dialog";
|
|
15484
|
+
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
15447
15485
|
|
|
15448
15486
|
// src/components/Modal/constants.ts
|
|
15449
15487
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
@@ -15491,7 +15529,7 @@ var modalExit = keyframes6`
|
|
|
15491
15529
|
transform: translateX(-50%) translateY(calc(var(--wui-modal-translate-y) + 24px));
|
|
15492
15530
|
}
|
|
15493
15531
|
`;
|
|
15494
|
-
var centeredModalStyles =
|
|
15532
|
+
var centeredModalStyles = css42`
|
|
15495
15533
|
--wui-modal-screen-offset: var(--wui-space-05);
|
|
15496
15534
|
--wui-modal-translate-y: -50%;
|
|
15497
15535
|
|
|
@@ -15503,11 +15541,11 @@ var centeredModalStyles = css41`
|
|
|
15503
15541
|
transform-origin: left center;
|
|
15504
15542
|
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
15505
15543
|
|
|
15506
|
-
&[data-
|
|
15544
|
+
&[data-closed] {
|
|
15507
15545
|
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
15508
15546
|
}
|
|
15509
15547
|
`;
|
|
15510
|
-
var fixedTopModalStyles =
|
|
15548
|
+
var fixedTopModalStyles = css42`
|
|
15511
15549
|
--wui-modal-screen-offset-top: 15vh;
|
|
15512
15550
|
--wui-modal-screen-offset-bottom: 5vh;
|
|
15513
15551
|
--wui-modal-translate-y: 0%;
|
|
@@ -15522,7 +15560,7 @@ var fixedTopModalStyles = css41`
|
|
|
15522
15560
|
transform-origin: left center;
|
|
15523
15561
|
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
15524
15562
|
|
|
15525
|
-
&[data-
|
|
15563
|
+
&[data-closed] {
|
|
15526
15564
|
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
15527
15565
|
}
|
|
15528
15566
|
`;
|
|
@@ -15548,7 +15586,7 @@ var slideOutRight = keyframes6`
|
|
|
15548
15586
|
transform: translateX(100%);
|
|
15549
15587
|
}
|
|
15550
15588
|
`;
|
|
15551
|
-
var rightSidePanelModalStyles =
|
|
15589
|
+
var rightSidePanelModalStyles = css42`
|
|
15552
15590
|
--wui-modal-screen-offset: var(--wui-space-05);
|
|
15553
15591
|
|
|
15554
15592
|
height: calc(100vh - var(--wui-modal-screen-offset) * 2);
|
|
@@ -15557,7 +15595,7 @@ var rightSidePanelModalStyles = css41`
|
|
|
15557
15595
|
animation: ${slideInRight} var(--wui-motion-duration-05) var(--wui-motion-ease-out);
|
|
15558
15596
|
transform-origin: right center;
|
|
15559
15597
|
|
|
15560
|
-
&[data-
|
|
15598
|
+
&[data-closed] {
|
|
15561
15599
|
animation: ${slideOutRight} var(--wui-motion-duration-03) var(--wui-motion-ease-in);
|
|
15562
15600
|
}
|
|
15563
15601
|
`;
|
|
@@ -15566,7 +15604,7 @@ var positionStyleMap = {
|
|
|
15566
15604
|
"fixed-top": fixedTopModalStyles,
|
|
15567
15605
|
"right-side-panel": rightSidePanelModalStyles
|
|
15568
15606
|
};
|
|
15569
|
-
var StyledModalContent =
|
|
15607
|
+
var StyledModalContent = styled83(Dialog3.Popup)`
|
|
15570
15608
|
position: fixed;
|
|
15571
15609
|
display: flex;
|
|
15572
15610
|
flex-direction: column;
|
|
@@ -15594,7 +15632,7 @@ var StyledModalContent = styled84(DialogContent)`
|
|
|
15594
15632
|
}
|
|
15595
15633
|
`;
|
|
15596
15634
|
var ModalContent = forwardRef25(
|
|
15597
|
-
({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
|
|
15635
|
+
({ width, positionVariant = "fixed-top", initialFocusRef, children, ...props }, ref) => {
|
|
15598
15636
|
useFocusRestore();
|
|
15599
15637
|
return /* @__PURE__ */ jsx325(
|
|
15600
15638
|
StyledModalContent,
|
|
@@ -15602,6 +15640,7 @@ var ModalContent = forwardRef25(
|
|
|
15602
15640
|
ref,
|
|
15603
15641
|
$positionVariant: positionVariant,
|
|
15604
15642
|
$width: width,
|
|
15643
|
+
...isNotNil34(initialFocusRef) ? { initialFocus: initialFocusRef } : {},
|
|
15605
15644
|
...props,
|
|
15606
15645
|
children
|
|
15607
15646
|
}
|
|
@@ -15610,8 +15649,8 @@ var ModalContent = forwardRef25(
|
|
|
15610
15649
|
);
|
|
15611
15650
|
|
|
15612
15651
|
// src/components/Modal/ModalOverlay.tsx
|
|
15613
|
-
import {
|
|
15614
|
-
import { styled as
|
|
15652
|
+
import { Dialog as Dialog4 } from "@base-ui/react/dialog";
|
|
15653
|
+
import { styled as styled84, keyframes as keyframes7 } from "styled-components";
|
|
15615
15654
|
var backdropShow = keyframes7`
|
|
15616
15655
|
from {
|
|
15617
15656
|
opacity: 0;
|
|
@@ -15630,33 +15669,33 @@ var backdropHide = keyframes7`
|
|
|
15630
15669
|
opacity: 0;
|
|
15631
15670
|
}
|
|
15632
15671
|
`;
|
|
15633
|
-
var ModalOverlay =
|
|
15672
|
+
var ModalOverlay = styled84(Dialog4.Backdrop)`
|
|
15634
15673
|
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
15635
15674
|
background: var(--wui-color-backdrop);
|
|
15636
15675
|
inset: 0;
|
|
15637
15676
|
position: fixed;
|
|
15638
15677
|
z-index: var(--wui-zindex-backdrop);
|
|
15639
15678
|
|
|
15640
|
-
&[data-
|
|
15679
|
+
&[data-closed] {
|
|
15641
15680
|
animation: ${backdropHide} var(--wui-motion-duration-02);
|
|
15642
15681
|
}
|
|
15643
15682
|
`;
|
|
15644
15683
|
|
|
15645
15684
|
// src/components/Modal/Modal.tsx
|
|
15646
15685
|
import { jsx as jsx326, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
15647
|
-
var ModalHiddenDescription =
|
|
15648
|
-
var ModalBody =
|
|
15686
|
+
var ModalHiddenDescription = styled85(Dialog5.Description)({ ...visuallyHiddenStyle });
|
|
15687
|
+
var ModalBody = styled85.div`
|
|
15649
15688
|
flex-direction: column;
|
|
15650
15689
|
display: flex;
|
|
15651
15690
|
flex: 1 0 0;
|
|
15652
15691
|
padding: 0 var(--wui-space-05);
|
|
15653
15692
|
`;
|
|
15654
|
-
var ModalScrollArea =
|
|
15693
|
+
var ModalScrollArea = styled85.div`
|
|
15655
15694
|
order: 2;
|
|
15656
15695
|
max-height: 90vh;
|
|
15657
15696
|
overflow-y: auto;
|
|
15658
15697
|
`;
|
|
15659
|
-
var ModalFooter =
|
|
15698
|
+
var ModalFooter = styled85.footer`
|
|
15660
15699
|
padding: 0 var(--wui-space-05);
|
|
15661
15700
|
order: 3;
|
|
15662
15701
|
`;
|
|
@@ -15675,34 +15714,27 @@ var Modal = forwardRef26(
|
|
|
15675
15714
|
...props
|
|
15676
15715
|
}, ref) => {
|
|
15677
15716
|
return /* @__PURE__ */ jsx326(
|
|
15678
|
-
|
|
15717
|
+
Dialog5.Root,
|
|
15679
15718
|
{
|
|
15680
15719
|
onOpenChange: (open2) => {
|
|
15681
|
-
if (!open2 &&
|
|
15720
|
+
if (!open2 && isNotNil35(onRequestClose)) {
|
|
15682
15721
|
onRequestClose();
|
|
15683
15722
|
}
|
|
15684
15723
|
},
|
|
15685
15724
|
open: isOpen,
|
|
15686
|
-
children: /* @__PURE__ */ jsxs54(
|
|
15725
|
+
children: /* @__PURE__ */ jsxs54(Dialog5.Portal, { children: [
|
|
15687
15726
|
/* @__PURE__ */ jsx326(ModalOverlay, {}),
|
|
15688
15727
|
/* @__PURE__ */ jsxs54(
|
|
15689
15728
|
ModalContent,
|
|
15690
15729
|
{
|
|
15691
15730
|
ref,
|
|
15692
|
-
|
|
15693
|
-
if (isNotNil34(initialFocusRef) && initialFocusRef.current) {
|
|
15694
|
-
event.preventDefault();
|
|
15695
|
-
requestAnimationFrame(() => {
|
|
15696
|
-
initialFocusRef.current?.focus();
|
|
15697
|
-
});
|
|
15698
|
-
}
|
|
15699
|
-
},
|
|
15731
|
+
initialFocusRef,
|
|
15700
15732
|
positionVariant,
|
|
15701
15733
|
width,
|
|
15702
15734
|
...props,
|
|
15703
15735
|
children: [
|
|
15704
15736
|
/* @__PURE__ */ jsx326(ModalScrollArea, { children: /* @__PURE__ */ jsx326(ModalBody, { children }) }),
|
|
15705
|
-
|
|
15737
|
+
isNotNil35(footer) ? /* @__PURE__ */ jsx326(ModalFooter, { children: footer }) : null,
|
|
15706
15738
|
hideCloseButton && hideTitle ? null : /* @__PURE__ */ jsx326(
|
|
15707
15739
|
ModalHeader,
|
|
15708
15740
|
{
|
|
@@ -15745,20 +15777,28 @@ var ModalCallout = ({ title, image, children }) => {
|
|
|
15745
15777
|
ModalCallout.displayName = "ModalCallout_UI";
|
|
15746
15778
|
|
|
15747
15779
|
// src/components/Popover/Popover.tsx
|
|
15748
|
-
import {
|
|
15749
|
-
import { styled as
|
|
15780
|
+
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
15781
|
+
import { styled as styled87, css as css44 } from "styled-components";
|
|
15750
15782
|
|
|
15751
15783
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
15752
|
-
import { isNotNil as
|
|
15784
|
+
import { isNotNil as isNotNil36 } from "@wistia/type-guards";
|
|
15753
15785
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
15754
|
-
return
|
|
15786
|
+
return isNotNil36(onOpenChange) && isNotNil36(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
15755
15787
|
};
|
|
15756
15788
|
|
|
15757
15789
|
// src/components/Popover/PopoverArrow.tsx
|
|
15758
|
-
import {
|
|
15759
|
-
import { styled as
|
|
15790
|
+
import { Popover as Popover4 } from "@base-ui/react/popover";
|
|
15791
|
+
import { styled as styled86, css as css43, keyframes as keyframes8 } from "styled-components";
|
|
15760
15792
|
import { jsx as jsx328, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
15761
|
-
var
|
|
15793
|
+
var StyledArrowSvg = styled86.svg`
|
|
15794
|
+
/* Override Base UI's inline top positioning and rotate the arrow to match Radix behavior.
|
|
15795
|
+
Radix applied rotate(180deg) so the circle sits near the trigger and the stalk extends
|
|
15796
|
+
down toward the popup. Base UI does not rotate the arrow automatically. */
|
|
15797
|
+
top: 0 !important;
|
|
15798
|
+
transform: rotate(180deg);
|
|
15799
|
+
transform-origin: center 0;
|
|
15800
|
+
`;
|
|
15801
|
+
var StyledPath = styled86.path`
|
|
15762
15802
|
fill: var(--wui-color-border-secondary);
|
|
15763
15803
|
`;
|
|
15764
15804
|
var circleAnimation = keyframes8`
|
|
@@ -15769,7 +15809,7 @@ var circleAnimation = keyframes8`
|
|
|
15769
15809
|
opacity: 0;
|
|
15770
15810
|
}
|
|
15771
15811
|
`;
|
|
15772
|
-
var StyledCircle =
|
|
15812
|
+
var StyledCircle = styled86.circle`
|
|
15773
15813
|
stroke: var(--wui-color-border-active);
|
|
15774
15814
|
animation-duration: 2s;
|
|
15775
15815
|
animation-iteration-count: infinite;
|
|
@@ -15790,56 +15830,61 @@ var StyledCircle = styled87.circle`
|
|
|
15790
15830
|
}
|
|
15791
15831
|
|
|
15792
15832
|
@media (prefers-reduced-motion: no-preference) {
|
|
15793
|
-
${({ $isAnimated }) => $isAnimated &&
|
|
15833
|
+
${({ $isAnimated }) => $isAnimated && css43`
|
|
15794
15834
|
animation-name: ${circleAnimation};
|
|
15795
15835
|
`}
|
|
15796
15836
|
}
|
|
15797
15837
|
`;
|
|
15798
15838
|
var PopoverArrow = ({ isAnimated }) => {
|
|
15799
|
-
return /* @__PURE__ */ jsx328(
|
|
15800
|
-
|
|
15839
|
+
return /* @__PURE__ */ jsx328(
|
|
15840
|
+
Popover4.Arrow,
|
|
15801
15841
|
{
|
|
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
|
-
|
|
15842
|
+
render: /* @__PURE__ */ jsxs56(
|
|
15843
|
+
StyledArrowSvg,
|
|
15844
|
+
{
|
|
15845
|
+
fill: "none",
|
|
15846
|
+
height: "56",
|
|
15847
|
+
viewBox: "0 0 48 56",
|
|
15848
|
+
width: "48",
|
|
15849
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15850
|
+
children: [
|
|
15851
|
+
/* @__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" }),
|
|
15852
|
+
/* @__PURE__ */ jsx328(
|
|
15853
|
+
StyledCircle,
|
|
15854
|
+
{
|
|
15855
|
+
$isAnimated: isAnimated,
|
|
15856
|
+
cx: "24",
|
|
15857
|
+
cy: "32",
|
|
15858
|
+
"data-wui-popover-arrow-inner-circle": true,
|
|
15859
|
+
r: "10",
|
|
15860
|
+
strokeWidth: "4"
|
|
15861
|
+
}
|
|
15862
|
+
),
|
|
15863
|
+
/* @__PURE__ */ jsx328(
|
|
15864
|
+
StyledCircle,
|
|
15865
|
+
{
|
|
15866
|
+
$isAnimated: isAnimated,
|
|
15867
|
+
cx: "24",
|
|
15868
|
+
cy: "32",
|
|
15869
|
+
"data-wui-popover-arrow-outer-circle": true,
|
|
15870
|
+
r: "20",
|
|
15871
|
+
strokeWidth: "8"
|
|
15872
|
+
}
|
|
15873
|
+
)
|
|
15874
|
+
]
|
|
15875
|
+
}
|
|
15876
|
+
)
|
|
15832
15877
|
}
|
|
15833
|
-
)
|
|
15878
|
+
);
|
|
15834
15879
|
};
|
|
15835
15880
|
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
15836
15881
|
|
|
15837
15882
|
// src/components/Popover/Popover.tsx
|
|
15838
15883
|
import { jsx as jsx329, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
15839
|
-
var
|
|
15884
|
+
var StyledPopup4 = styled87(BasePopover.Popup)`
|
|
15840
15885
|
z-index: var(--wui-zindex-popover);
|
|
15841
15886
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
15842
|
-
${({ $unstyled }) => !$unstyled &&
|
|
15887
|
+
${({ $unstyled }) => !$unstyled && css44`
|
|
15843
15888
|
border-radius: var(--wui-border-radius-02);
|
|
15844
15889
|
padding: var(--wui-space-04);
|
|
15845
15890
|
max-width: var(--wui-popover-max-width, 320px);
|
|
@@ -15850,13 +15895,17 @@ var StyledContent3 = styled88(Content3)`
|
|
|
15850
15895
|
overflow: auto;
|
|
15851
15896
|
`}
|
|
15852
15897
|
|
|
15898
|
+
${({ $withArrow }) => $withArrow && css44`
|
|
15899
|
+
overflow: visible;
|
|
15900
|
+
`}
|
|
15901
|
+
|
|
15853
15902
|
[data-wui-popover-close] {
|
|
15854
15903
|
position: absolute;
|
|
15855
15904
|
top: var(--wui-space-02);
|
|
15856
15905
|
right: var(--wui-space-02);
|
|
15857
15906
|
}
|
|
15858
15907
|
`;
|
|
15859
|
-
var
|
|
15908
|
+
var Popover5 = ({
|
|
15860
15909
|
children,
|
|
15861
15910
|
trigger,
|
|
15862
15911
|
isOpen = false,
|
|
@@ -15869,63 +15918,75 @@ var Popover = ({
|
|
|
15869
15918
|
isAnimated = false,
|
|
15870
15919
|
colorScheme = "inherit",
|
|
15871
15920
|
style,
|
|
15921
|
+
side,
|
|
15922
|
+
align,
|
|
15872
15923
|
...props
|
|
15873
15924
|
}) => {
|
|
15874
|
-
const sideOffset = withArrow ?
|
|
15925
|
+
const sideOffset = withArrow ? 32 : 8;
|
|
15875
15926
|
const mergedStyle = {
|
|
15876
15927
|
"--wui-popover-max-width": maxWidth,
|
|
15877
15928
|
"--wui-popover-max-height": maxHeight,
|
|
15878
15929
|
...style
|
|
15879
15930
|
};
|
|
15880
|
-
return /* @__PURE__ */ jsxs57(
|
|
15881
|
-
/* @__PURE__ */ jsx329(
|
|
15882
|
-
/* @__PURE__ */ jsx329(
|
|
15883
|
-
|
|
15931
|
+
return /* @__PURE__ */ jsxs57(BasePopover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
15932
|
+
/* @__PURE__ */ jsx329(BasePopover.Trigger, { render: trigger }),
|
|
15933
|
+
/* @__PURE__ */ jsx329(BasePopover.Portal, { children: /* @__PURE__ */ jsx329(
|
|
15934
|
+
BasePopover.Positioner,
|
|
15884
15935
|
{
|
|
15885
|
-
|
|
15936
|
+
align,
|
|
15937
|
+
side,
|
|
15886
15938
|
sideOffset,
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
|
|
15891
|
-
|
|
15892
|
-
|
|
15893
|
-
|
|
15894
|
-
|
|
15895
|
-
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15939
|
+
children: /* @__PURE__ */ jsxs57(
|
|
15940
|
+
StyledPopup4,
|
|
15941
|
+
{
|
|
15942
|
+
$colorScheme: colorScheme,
|
|
15943
|
+
...props,
|
|
15944
|
+
$unstyled: unstyled,
|
|
15945
|
+
$withArrow: withArrow,
|
|
15946
|
+
style: mergedStyle,
|
|
15947
|
+
children: [
|
|
15948
|
+
!hideCloseButton && /* @__PURE__ */ jsx329(
|
|
15949
|
+
BasePopover.Close,
|
|
15950
|
+
{
|
|
15951
|
+
render: /* @__PURE__ */ jsx329(
|
|
15952
|
+
IconButton,
|
|
15953
|
+
{
|
|
15954
|
+
"data-wui-popover-close": true,
|
|
15955
|
+
label: "Close",
|
|
15956
|
+
variant: "ghost",
|
|
15957
|
+
children: /* @__PURE__ */ jsx329(Icon, { type: "close" })
|
|
15958
|
+
}
|
|
15959
|
+
)
|
|
15960
|
+
}
|
|
15961
|
+
),
|
|
15962
|
+
withArrow ? /* @__PURE__ */ jsx329(PopoverArrow, { isAnimated }) : null,
|
|
15963
|
+
/* @__PURE__ */ jsx329("div", { children })
|
|
15964
|
+
]
|
|
15965
|
+
}
|
|
15966
|
+
)
|
|
15903
15967
|
}
|
|
15904
15968
|
) })
|
|
15905
15969
|
] });
|
|
15906
15970
|
};
|
|
15907
|
-
|
|
15971
|
+
Popover5.displayName = "Popover_UI";
|
|
15908
15972
|
|
|
15909
15973
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
15910
|
-
import { styled as
|
|
15911
|
-
import {
|
|
15912
|
-
import { isNotNil as
|
|
15974
|
+
import { styled as styled88 } from "styled-components";
|
|
15975
|
+
import { Progress } from "@base-ui/react/progress";
|
|
15976
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
15913
15977
|
import { jsx as jsx330, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
15914
|
-
var ProgressBarWrapper =
|
|
15978
|
+
var ProgressBarWrapper = styled88.div`
|
|
15915
15979
|
--progress-bar-height: 8px;
|
|
15916
15980
|
|
|
15917
15981
|
display: flex;
|
|
15918
15982
|
align-items: center;
|
|
15919
15983
|
gap: var(--wui-space-02);
|
|
15920
15984
|
`;
|
|
15921
|
-
var
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
return `translateX(-${100 - progressPercentage}%)`;
|
|
15927
|
-
};
|
|
15928
|
-
var ProgressBarLabel = styled89.div`
|
|
15985
|
+
var StyledTrack = styled88(Progress.Track)`
|
|
15986
|
+
height: 100%;
|
|
15987
|
+
overflow: hidden;
|
|
15988
|
+
`;
|
|
15989
|
+
var ProgressBarLabel = styled88.div`
|
|
15929
15990
|
display: flex;
|
|
15930
15991
|
line-height: var(--wui-typography-label-3-line-height);
|
|
15931
15992
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -15933,17 +15994,15 @@ var ProgressBarLabel = styled89.div`
|
|
|
15933
15994
|
color: var(--wui-color-text-secondary);
|
|
15934
15995
|
flex-shrink: 0;
|
|
15935
15996
|
`;
|
|
15936
|
-
var StyledProgressIndicator =
|
|
15997
|
+
var StyledProgressIndicator = styled88(Progress.Indicator)`
|
|
15937
15998
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
15938
15999
|
background-color: var(--wui-color-bg-fill);
|
|
15939
|
-
|
|
15940
|
-
height: 100%;
|
|
16000
|
+
display: block;
|
|
15941
16001
|
border-top-right-radius: var(--wui-border-radius-rounded);
|
|
15942
16002
|
border-bottom-right-radius: var(--wui-border-radius-rounded);
|
|
15943
|
-
transition:
|
|
15944
|
-
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
16003
|
+
transition: width 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
15945
16004
|
`;
|
|
15946
|
-
var StyledProgressBar =
|
|
16005
|
+
var StyledProgressBar = styled88(Progress.Root)`
|
|
15947
16006
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
15948
16007
|
position: relative;
|
|
15949
16008
|
overflow: hidden;
|
|
@@ -15965,25 +16024,19 @@ var ProgressBar = ({
|
|
|
15965
16024
|
...props
|
|
15966
16025
|
}) => {
|
|
15967
16026
|
return /* @__PURE__ */ jsxs58(ProgressBarWrapper, { children: [
|
|
15968
|
-
|
|
16027
|
+
isNotNil37(labelLeft) ? /* @__PURE__ */ jsx330(ProgressBarLabel, { children: labelLeft }) : null,
|
|
15969
16028
|
/* @__PURE__ */ jsx330(
|
|
15970
16029
|
StyledProgressBar,
|
|
15971
16030
|
{
|
|
15972
16031
|
$colorScheme: colorScheme,
|
|
16032
|
+
getAriaValueText: (_formattedValue, value) => value != null ? `${Math.round(value / max * 100)}%` : "indeterminate progress",
|
|
15973
16033
|
max,
|
|
15974
16034
|
value: progress,
|
|
15975
16035
|
...props,
|
|
15976
|
-
children: /* @__PURE__ */ jsx330(
|
|
15977
|
-
StyledProgressIndicator,
|
|
15978
|
-
{
|
|
15979
|
-
$colorScheme: colorScheme,
|
|
15980
|
-
$max: max,
|
|
15981
|
-
$progress: progress
|
|
15982
|
-
}
|
|
15983
|
-
)
|
|
16036
|
+
children: /* @__PURE__ */ jsx330(StyledTrack, { children: /* @__PURE__ */ jsx330(StyledProgressIndicator, { $colorScheme: colorScheme }) })
|
|
15984
16037
|
}
|
|
15985
16038
|
),
|
|
15986
|
-
|
|
16039
|
+
isNotNil37(labelRight) ? /* @__PURE__ */ jsx330(ProgressBarLabel, { children: labelRight }) : null
|
|
15987
16040
|
] });
|
|
15988
16041
|
};
|
|
15989
16042
|
ProgressBar.displayName = "ProgressBar_UI";
|
|
@@ -15991,17 +16044,17 @@ ProgressBar.displayName = "ProgressBar_UI";
|
|
|
15991
16044
|
// src/components/Radio/Radio.tsx
|
|
15992
16045
|
import { isNonEmptyString as isNonEmptyString7, isNotUndefined as isNotUndefined14 } from "@wistia/type-guards";
|
|
15993
16046
|
import { forwardRef as forwardRef27, useId as useId6 } from "react";
|
|
15994
|
-
import { styled as
|
|
16047
|
+
import { styled as styled89, css as css45 } from "styled-components";
|
|
15995
16048
|
import { jsx as jsx331, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
15996
|
-
var sizeSmall2 =
|
|
16049
|
+
var sizeSmall2 = css45`
|
|
15997
16050
|
--wui-radio-size: 14px;
|
|
15998
16051
|
--wui-radio-icon-size: 7px;
|
|
15999
16052
|
`;
|
|
16000
|
-
var sizeMedium2 =
|
|
16053
|
+
var sizeMedium2 = css45`
|
|
16001
16054
|
--wui-radio-size: 16px;
|
|
16002
16055
|
--wui-radio-icon-size: 8px;
|
|
16003
16056
|
`;
|
|
16004
|
-
var sizeLarge2 =
|
|
16057
|
+
var sizeLarge2 = css45`
|
|
16005
16058
|
--wui-radio-size: 20px;
|
|
16006
16059
|
--wui-radio-icon-size: 10px;
|
|
16007
16060
|
`;
|
|
@@ -16014,7 +16067,7 @@ var getSizeCss3 = (size) => {
|
|
|
16014
16067
|
}
|
|
16015
16068
|
return sizeMedium2;
|
|
16016
16069
|
};
|
|
16017
|
-
var StyledRadioWrapper =
|
|
16070
|
+
var StyledRadioWrapper = styled89.div`
|
|
16018
16071
|
--wui-radio-background-color: var(--wui-color-bg-surface);
|
|
16019
16072
|
--wui-radio-border-color: var(--wui-color-border-secondary);
|
|
16020
16073
|
--wui-radio-icon-color: transparent;
|
|
@@ -16048,7 +16101,7 @@ var StyledRadioWrapper = styled90.div`
|
|
|
16048
16101
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
16049
16102
|
user-select: none;
|
|
16050
16103
|
`;
|
|
16051
|
-
var StyledRadioInput =
|
|
16104
|
+
var StyledRadioInput = styled89.div`
|
|
16052
16105
|
${({ $size }) => getSizeCss3($size)}
|
|
16053
16106
|
width: var(--wui-radio-size);
|
|
16054
16107
|
height: var(--wui-radio-size);
|
|
@@ -16074,10 +16127,10 @@ var StyledRadioInput = styled90.div`
|
|
|
16074
16127
|
transform: translate(-50%, -50%);
|
|
16075
16128
|
}
|
|
16076
16129
|
`;
|
|
16077
|
-
var StyledHiddenRadioInput =
|
|
16130
|
+
var StyledHiddenRadioInput = styled89.input`
|
|
16078
16131
|
${visuallyHiddenStyle}
|
|
16079
16132
|
`;
|
|
16080
|
-
var
|
|
16133
|
+
var Radio2 = forwardRef27(
|
|
16081
16134
|
({
|
|
16082
16135
|
checked,
|
|
16083
16136
|
disabled = false,
|
|
@@ -16139,24 +16192,24 @@ var Radio = forwardRef27(
|
|
|
16139
16192
|
);
|
|
16140
16193
|
}
|
|
16141
16194
|
);
|
|
16142
|
-
|
|
16195
|
+
Radio2.displayName = "Radio_UI";
|
|
16143
16196
|
|
|
16144
16197
|
// src/components/RadioCard/RadioCard.tsx
|
|
16145
16198
|
import { forwardRef as forwardRef29 } from "react";
|
|
16146
16199
|
|
|
16147
16200
|
// src/components/RadioCard/RadioCardRoot.tsx
|
|
16148
16201
|
import { forwardRef as forwardRef28, useId as useId7 } from "react";
|
|
16149
|
-
import { styled as
|
|
16202
|
+
import { styled as styled90, css as css46 } from "styled-components";
|
|
16150
16203
|
import { isNonEmptyString as isNonEmptyString8, isNotUndefined as isNotUndefined15 } from "@wistia/type-guards";
|
|
16151
16204
|
import { jsx as jsx332, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
16152
|
-
var checkedStyles =
|
|
16205
|
+
var checkedStyles = css46`
|
|
16153
16206
|
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
16154
16207
|
--wui-color-icon: var(--wui-color-icon-selected);
|
|
16155
16208
|
--wui-radio-card-background-color: var(--wui-color-bg-surface-info);
|
|
16156
16209
|
--wui-color-text: var(--wui-color-text-info);
|
|
16157
16210
|
--wui-color-text-secondary: var(--wui-color-text-info);
|
|
16158
16211
|
`;
|
|
16159
|
-
var disabledStyles =
|
|
16212
|
+
var disabledStyles = css46`
|
|
16160
16213
|
--wui-radio-card-border-color: var(--wui-color-border-disabled);
|
|
16161
16214
|
--wui-radio-card-background-color: var(--wui-color-bg-surface-disabled);
|
|
16162
16215
|
--wui-radio-card-cursor: not-allowed;
|
|
@@ -16164,10 +16217,10 @@ var disabledStyles = css45`
|
|
|
16164
16217
|
--wui-color-text: var(--wui-color-text-disabled);
|
|
16165
16218
|
--wui-color-text-secondary: var(--wui-color-text-disabled);
|
|
16166
16219
|
`;
|
|
16167
|
-
var focusStyles =
|
|
16220
|
+
var focusStyles = css46`
|
|
16168
16221
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
16169
16222
|
`;
|
|
16170
|
-
var imageCoverStyles =
|
|
16223
|
+
var imageCoverStyles = css46`
|
|
16171
16224
|
--wui-radio-card-image-inset: 0px;
|
|
16172
16225
|
--wui-radio-card-border-width: 0px;
|
|
16173
16226
|
--wui-inset-shadow-width: 1px;
|
|
@@ -16198,7 +16251,7 @@ var imageCoverStyles = css45`
|
|
|
16198
16251
|
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
16199
16252
|
}
|
|
16200
16253
|
`;
|
|
16201
|
-
var StyledCard2 =
|
|
16254
|
+
var StyledCard2 = styled90.label`
|
|
16202
16255
|
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
16203
16256
|
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
16204
16257
|
--wui-radio-card-cursor: pointer;
|
|
@@ -16252,7 +16305,7 @@ var StyledCard2 = styled91.label`
|
|
|
16252
16305
|
}
|
|
16253
16306
|
}
|
|
16254
16307
|
`;
|
|
16255
|
-
var StyledHiddenInput =
|
|
16308
|
+
var StyledHiddenInput = styled90.input`
|
|
16256
16309
|
${visuallyHiddenStyle}
|
|
16257
16310
|
`;
|
|
16258
16311
|
var RadioCardRoot = forwardRef28(
|
|
@@ -16309,12 +16362,12 @@ var RadioCardRoot = forwardRef28(
|
|
|
16309
16362
|
RadioCardRoot.displayName = "RadioCardRoot_UI";
|
|
16310
16363
|
|
|
16311
16364
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16312
|
-
import { styled as
|
|
16313
|
-
import { isNotNil as
|
|
16365
|
+
import { styled as styled92 } from "styled-components";
|
|
16366
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
16314
16367
|
|
|
16315
16368
|
// src/components/RadioCard/RadioCardIndicator.tsx
|
|
16316
|
-
import { styled as
|
|
16317
|
-
var RadioCardIndicator =
|
|
16369
|
+
import { styled as styled91 } from "styled-components";
|
|
16370
|
+
var RadioCardIndicator = styled91.div`
|
|
16318
16371
|
--wui-radio-card-indicator-size: 14px;
|
|
16319
16372
|
--wui-radio-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
16320
16373
|
--wui-radio-card-indicator-fill-color: var(--wui-color-bg-fill);
|
|
@@ -16364,21 +16417,21 @@ RadioCardIndicator.displayName = "RadioCardIndicator_UI";
|
|
|
16364
16417
|
|
|
16365
16418
|
// src/components/RadioCard/RadioCardDefaultLayout.tsx
|
|
16366
16419
|
import { jsx as jsx333, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
16367
|
-
var StyledCardContent =
|
|
16420
|
+
var StyledCardContent = styled92.div`
|
|
16368
16421
|
display: grid;
|
|
16369
16422
|
grid-auto-flow: column;
|
|
16370
16423
|
gap: var(--wui-space-02);
|
|
16371
16424
|
`;
|
|
16372
|
-
var StyledCardIcon =
|
|
16425
|
+
var StyledCardIcon = styled92.div`
|
|
16373
16426
|
display: contents;
|
|
16374
16427
|
`;
|
|
16375
|
-
var StyledGatedIcon =
|
|
16428
|
+
var StyledGatedIcon = styled92.div`
|
|
16376
16429
|
position: absolute;
|
|
16377
16430
|
right: 10px;
|
|
16378
16431
|
top: 10px;
|
|
16379
16432
|
z-index: 1;
|
|
16380
16433
|
`;
|
|
16381
|
-
var StyledIndicatorContainer =
|
|
16434
|
+
var StyledIndicatorContainer = styled92.div`
|
|
16382
16435
|
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
16383
16436
|
display: flex;
|
|
16384
16437
|
align-items: center;
|
|
@@ -16391,7 +16444,7 @@ var RadioCardDefaultLayout = ({
|
|
|
16391
16444
|
isGated = false
|
|
16392
16445
|
}) => {
|
|
16393
16446
|
return /* @__PURE__ */ jsxs61(StyledCardContent, { children: [
|
|
16394
|
-
showIndicator ? /* @__PURE__ */ jsx333(StyledIndicatorContainer, { $hasIcon:
|
|
16447
|
+
showIndicator ? /* @__PURE__ */ jsx333(StyledIndicatorContainer, { $hasIcon: isNotNil38(icon), children: /* @__PURE__ */ jsx333(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
|
|
16395
16448
|
isGated ? /* @__PURE__ */ jsx333(StyledGatedIcon, { "data-testid": "wui-radio-gated-icon", children: /* @__PURE__ */ jsx333(
|
|
16396
16449
|
Icon,
|
|
16397
16450
|
{
|
|
@@ -16401,15 +16454,15 @@ var RadioCardDefaultLayout = ({
|
|
|
16401
16454
|
}
|
|
16402
16455
|
) }) : null,
|
|
16403
16456
|
/* @__PURE__ */ jsxs61(Stack, { gap: "space-02", children: [
|
|
16404
|
-
|
|
16457
|
+
isNotNil38(icon) && /* @__PURE__ */ jsx333(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
|
|
16405
16458
|
/* @__PURE__ */ jsxs61(
|
|
16406
16459
|
Stack,
|
|
16407
16460
|
{
|
|
16408
16461
|
gap: "space-01",
|
|
16409
|
-
style:
|
|
16462
|
+
style: isNotNil38(icon) ? { paddingLeft: 2 } : void 0,
|
|
16410
16463
|
children: [
|
|
16411
|
-
|
|
16412
|
-
|
|
16464
|
+
isNotNil38(label) && /* @__PURE__ */ jsx333(Text, { variant: "label3", children: /* @__PURE__ */ jsx333("strong", { children: label }) }),
|
|
16465
|
+
isNotNil38(description) && /* @__PURE__ */ jsx333(
|
|
16413
16466
|
Text,
|
|
16414
16467
|
{
|
|
16415
16468
|
prominence: "secondary",
|
|
@@ -16426,8 +16479,8 @@ var RadioCardDefaultLayout = ({
|
|
|
16426
16479
|
RadioCardDefaultLayout.displayName = "RadioCardDefaultLayout_UI";
|
|
16427
16480
|
|
|
16428
16481
|
// src/components/RadioCard/RadioCardChildrenContainer.tsx
|
|
16429
|
-
import { styled as
|
|
16430
|
-
var RadioCardChildrenContainer =
|
|
16482
|
+
import { styled as styled93 } from "styled-components";
|
|
16483
|
+
var RadioCardChildrenContainer = styled93.div`
|
|
16431
16484
|
flex: 1 1 auto;
|
|
16432
16485
|
`;
|
|
16433
16486
|
|
|
@@ -16487,50 +16540,50 @@ var RadioCardImage = forwardRef30(
|
|
|
16487
16540
|
RadioCardImage.displayName = "RadioCardImage_UI";
|
|
16488
16541
|
|
|
16489
16542
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
16490
|
-
import { forwardRef as forwardRef31, useCallback as
|
|
16491
|
-
import { styled as
|
|
16543
|
+
import { forwardRef as forwardRef31, useCallback as useCallback19, useEffect as useEffect21, useMemo as useMemo15, useRef as useRef22, useState as useState24 } from "react";
|
|
16544
|
+
import { styled as styled94 } from "styled-components";
|
|
16492
16545
|
import { throttle } from "throttle-debounce";
|
|
16493
16546
|
import { jsx as jsx336, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
16494
16547
|
var SHADOW_SIZE_PX = 8;
|
|
16495
|
-
var Container10 =
|
|
16548
|
+
var Container10 = styled94.div`
|
|
16496
16549
|
overflow: hidden;
|
|
16497
16550
|
position: relative;
|
|
16498
16551
|
flex: 1 1 auto;
|
|
16499
16552
|
`;
|
|
16500
|
-
var ScrollContainer =
|
|
16553
|
+
var ScrollContainer = styled94.div`
|
|
16501
16554
|
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
16502
16555
|
height: 100%;
|
|
16503
16556
|
width: 100%;
|
|
16504
16557
|
`;
|
|
16505
|
-
var Shadow =
|
|
16558
|
+
var Shadow = styled94.div`
|
|
16506
16559
|
pointer-events: none;
|
|
16507
16560
|
position: absolute;
|
|
16508
16561
|
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
16509
16562
|
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
16510
16563
|
z-index: 1;
|
|
16511
16564
|
`;
|
|
16512
|
-
var ShadowAtTop =
|
|
16565
|
+
var ShadowAtTop = styled94(Shadow)`
|
|
16513
16566
|
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
16514
16567
|
height: 0;
|
|
16515
16568
|
left: 0;
|
|
16516
16569
|
right: 0;
|
|
16517
16570
|
top: 0;
|
|
16518
16571
|
`;
|
|
16519
|
-
var ShadowAtBottom =
|
|
16572
|
+
var ShadowAtBottom = styled94(Shadow)`
|
|
16520
16573
|
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
16521
16574
|
bottom: 0;
|
|
16522
16575
|
height: 0;
|
|
16523
16576
|
left: 0;
|
|
16524
16577
|
right: 0;
|
|
16525
16578
|
`;
|
|
16526
|
-
var ShadowAtLeft =
|
|
16579
|
+
var ShadowAtLeft = styled94(Shadow)`
|
|
16527
16580
|
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
16528
16581
|
bottom: 0;
|
|
16529
16582
|
left: 0;
|
|
16530
16583
|
top: 0;
|
|
16531
16584
|
width: 0;
|
|
16532
16585
|
`;
|
|
16533
|
-
var ShadowAtRight =
|
|
16586
|
+
var ShadowAtRight = styled94(Shadow)`
|
|
16534
16587
|
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
16535
16588
|
bottom: 0;
|
|
16536
16589
|
right: 0;
|
|
@@ -16547,7 +16600,7 @@ var ScrollArea = forwardRef31(
|
|
|
16547
16600
|
canScrollRight: false
|
|
16548
16601
|
});
|
|
16549
16602
|
const scrollContainerRef = mergeRefs([scrollContainerRefInternal, forwardedRef]);
|
|
16550
|
-
const updateShadows =
|
|
16603
|
+
const updateShadows = useCallback19(() => {
|
|
16551
16604
|
const scrollContainer = scrollContainerRefInternal.current;
|
|
16552
16605
|
if (!scrollContainer) {
|
|
16553
16606
|
return;
|
|
@@ -16560,7 +16613,7 @@ var ScrollArea = forwardRef31(
|
|
|
16560
16613
|
});
|
|
16561
16614
|
}, []);
|
|
16562
16615
|
const throttledUpdateShadows = useMemo15(() => throttle(100, updateShadows), [updateShadows]);
|
|
16563
|
-
const onScrollScrollContainer =
|
|
16616
|
+
const onScrollScrollContainer = useCallback19(
|
|
16564
16617
|
(event) => {
|
|
16565
16618
|
onScroll?.(event);
|
|
16566
16619
|
throttledUpdateShadows();
|
|
@@ -16592,9 +16645,9 @@ ScrollArea.displayName = "ScrollArea_UI";
|
|
|
16592
16645
|
|
|
16593
16646
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
16594
16647
|
import { forwardRef as forwardRef32 } from "react";
|
|
16595
|
-
import { styled as
|
|
16596
|
-
import {
|
|
16597
|
-
import { isNil as
|
|
16648
|
+
import { styled as styled96, css as css48 } from "styled-components";
|
|
16649
|
+
import { ToggleGroup as ToggleGroup2 } from "@base-ui/react/toggle-group";
|
|
16650
|
+
import { isNil as isNil19 } from "@wistia/type-guards";
|
|
16598
16651
|
|
|
16599
16652
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
16600
16653
|
import { createContext as createContext9, useContext as useContext15, useMemo as useMemo16, useState as useState25 } from "react";
|
|
@@ -16630,7 +16683,7 @@ var useSelectedItemStyle = () => {
|
|
|
16630
16683
|
};
|
|
16631
16684
|
|
|
16632
16685
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16633
|
-
import { styled as
|
|
16686
|
+
import { styled as styled95, css as css47 } from "styled-components";
|
|
16634
16687
|
import { isUndefined as isUndefined5 } from "@wistia/type-guards";
|
|
16635
16688
|
|
|
16636
16689
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
@@ -16647,12 +16700,12 @@ var useSegmentedControlValue = () => {
|
|
|
16647
16700
|
|
|
16648
16701
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
16649
16702
|
import { jsx as jsx338 } from "react/jsx-runtime";
|
|
16650
|
-
var selectedItemIndicatorStyles =
|
|
16703
|
+
var selectedItemIndicatorStyles = css47`
|
|
16651
16704
|
background-color: var(--wui-color-bg-fill-white);
|
|
16652
16705
|
border-radius: var(--wui-border-radius-rounded);
|
|
16653
16706
|
box-shadow: var(--wui-elevation-01);
|
|
16654
16707
|
`;
|
|
16655
|
-
var SelectedItemIndicatorDiv =
|
|
16708
|
+
var SelectedItemIndicatorDiv = styled95.div`
|
|
16656
16709
|
${selectedItemIndicatorStyles}
|
|
16657
16710
|
left: 0;
|
|
16658
16711
|
position: absolute;
|
|
@@ -16679,7 +16732,7 @@ var SelectedItemIndicator = () => {
|
|
|
16679
16732
|
|
|
16680
16733
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
16681
16734
|
import { jsx as jsx339, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
16682
|
-
var segmentedControlStyles =
|
|
16735
|
+
var segmentedControlStyles = css48`
|
|
16683
16736
|
${({ $colorScheme }) => $colorScheme && getColorScheme($colorScheme)};
|
|
16684
16737
|
${({ $colorScheme }) => $colorScheme !== "nav" && `--wui-color-text-selected: var(--wui-color-text-link);`}
|
|
16685
16738
|
|
|
@@ -16693,7 +16746,7 @@ var segmentedControlStyles = css47`
|
|
|
16693
16746
|
position: relative;
|
|
16694
16747
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
16695
16748
|
`;
|
|
16696
|
-
var StyledSegmentedControl =
|
|
16749
|
+
var StyledSegmentedControl = styled96(ToggleGroup2)`
|
|
16697
16750
|
${segmentedControlStyles}
|
|
16698
16751
|
`;
|
|
16699
16752
|
var SegmentedControl = forwardRef32(
|
|
@@ -16706,7 +16759,7 @@ var SegmentedControl = forwardRef32(
|
|
|
16706
16759
|
onSelectedValueChange,
|
|
16707
16760
|
...props
|
|
16708
16761
|
}, ref) => {
|
|
16709
|
-
if (
|
|
16762
|
+
if (isNil19(children)) {
|
|
16710
16763
|
return null;
|
|
16711
16764
|
}
|
|
16712
16765
|
return /* @__PURE__ */ jsx339(
|
|
@@ -16716,11 +16769,13 @@ var SegmentedControl = forwardRef32(
|
|
|
16716
16769
|
$colorScheme: colorScheme,
|
|
16717
16770
|
$fullWidth: fullWidth,
|
|
16718
16771
|
disabled,
|
|
16719
|
-
|
|
16720
|
-
onValueChange:
|
|
16721
|
-
|
|
16722
|
-
|
|
16723
|
-
|
|
16772
|
+
loopFocus: true,
|
|
16773
|
+
onValueChange: (newValue) => {
|
|
16774
|
+
if (newValue.length > 0 && newValue[0] !== void 0) {
|
|
16775
|
+
onSelectedValueChange(newValue[0]);
|
|
16776
|
+
}
|
|
16777
|
+
},
|
|
16778
|
+
value: [selectedValue],
|
|
16724
16779
|
...props,
|
|
16725
16780
|
children: /* @__PURE__ */ jsx339(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs63(SelectedItemStyleProvider, { children: [
|
|
16726
16781
|
children,
|
|
@@ -16734,12 +16789,12 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
16734
16789
|
|
|
16735
16790
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
16736
16791
|
import { forwardRef as forwardRef33, useEffect as useEffect22, useRef as useRef23 } from "react";
|
|
16737
|
-
import { styled as
|
|
16738
|
-
import {
|
|
16739
|
-
import { isNotNil as
|
|
16792
|
+
import { styled as styled97, css as css49 } from "styled-components";
|
|
16793
|
+
import { Toggle as Toggle2 } from "@base-ui/react/toggle";
|
|
16794
|
+
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
16740
16795
|
import { jsxs as jsxs64 } from "react/jsx-runtime";
|
|
16741
|
-
var segmentedControlItemStyles =
|
|
16742
|
-
all: unset;
|
|
16796
|
+
var segmentedControlItemStyles = css49`
|
|
16797
|
+
all: unset;
|
|
16743
16798
|
align-items: center;
|
|
16744
16799
|
border-radius: var(--wui-border-radius-rounded);
|
|
16745
16800
|
color: var(--wui-color-text-secondary);
|
|
@@ -16773,10 +16828,11 @@ var segmentedControlItemStyles = css48`
|
|
|
16773
16828
|
/* note: react-toggle-group uses 'aria-selected' and react-tabs uses "active" */
|
|
16774
16829
|
|
|
16775
16830
|
/* 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']) {
|
|
16831
|
+
&:hover:not([aria-pressed='true'], [aria-checked='true'], [aria-selected='true']) {
|
|
16777
16832
|
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
16778
16833
|
}
|
|
16779
16834
|
|
|
16835
|
+
&[aria-pressed='true'],
|
|
16780
16836
|
&[aria-checked='true'],
|
|
16781
16837
|
&[aria-selected='true'] {
|
|
16782
16838
|
color: var(--wui-color-segmented-color-text-override, var(--wui-color-text-selected));
|
|
@@ -16806,7 +16862,7 @@ var segmentedControlItemStyles = css48`
|
|
|
16806
16862
|
}
|
|
16807
16863
|
}
|
|
16808
16864
|
`;
|
|
16809
|
-
var StyledSegmentedControlItem =
|
|
16865
|
+
var StyledSegmentedControlItem = styled97(Toggle2)`
|
|
16810
16866
|
${segmentedControlItemStyles}
|
|
16811
16867
|
`;
|
|
16812
16868
|
var SegmentedControlItem = forwardRef33(
|
|
@@ -16817,8 +16873,8 @@ var SegmentedControlItem = forwardRef33(
|
|
|
16817
16873
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
16818
16874
|
const handleClick = (event) => {
|
|
16819
16875
|
const target = event.target;
|
|
16820
|
-
const
|
|
16821
|
-
if (
|
|
16876
|
+
const isPressed = target.getAttribute("aria-pressed") === "true";
|
|
16877
|
+
if (isPressed) {
|
|
16822
16878
|
event.preventDefault();
|
|
16823
16879
|
}
|
|
16824
16880
|
};
|
|
@@ -16852,8 +16908,8 @@ var SegmentedControlItem = forwardRef33(
|
|
|
16852
16908
|
{
|
|
16853
16909
|
ref: combinedRef,
|
|
16854
16910
|
...otherProps,
|
|
16855
|
-
$hasLabel:
|
|
16856
|
-
"aria-label":
|
|
16911
|
+
$hasLabel: isNotNil39(label),
|
|
16912
|
+
"aria-label": isNotNil39(label) ? void 0 : ariaLabel,
|
|
16857
16913
|
disabled,
|
|
16858
16914
|
onClick: handleClick,
|
|
16859
16915
|
value,
|
|
@@ -16868,20 +16924,11 @@ var SegmentedControlItem = forwardRef33(
|
|
|
16868
16924
|
SegmentedControlItem.displayName = "SegmentedControlItem_UI";
|
|
16869
16925
|
|
|
16870
16926
|
// 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";
|
|
16927
|
+
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
16928
|
+
import { Children as Children11, forwardRef as forwardRef34, isValidElement as isValidElement5 } from "react";
|
|
16929
|
+
import { styled as styled98, css as css50 } from "styled-components";
|
|
16883
16930
|
import { jsx as jsx340, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
16884
|
-
var StyledTrigger2 =
|
|
16931
|
+
var StyledTrigger2 = styled98(BaseSelect.Trigger)`
|
|
16885
16932
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
16886
16933
|
${inputCss};
|
|
16887
16934
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -16927,7 +16974,7 @@ var StyledTrigger2 = styled99(Trigger4)`
|
|
|
16927
16974
|
color: var(--wui-input-placeholder);
|
|
16928
16975
|
}
|
|
16929
16976
|
`;
|
|
16930
|
-
var
|
|
16977
|
+
var StyledPopup5 = styled98(BaseSelect.Popup)`
|
|
16931
16978
|
--wui-select-content-border: var(--wui-color-border);
|
|
16932
16979
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
16933
16980
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -16941,25 +16988,47 @@ var StyledContent4 = styled99(Content4)`
|
|
|
16941
16988
|
border-radius: var(--wui-select-content-border-radius);
|
|
16942
16989
|
box-shadow: var(--wui-elevation-01);
|
|
16943
16990
|
padding: var(--wui-select-option-padding);
|
|
16944
|
-
min-width: var(--
|
|
16945
|
-
max-height: var(--
|
|
16991
|
+
min-width: var(--anchor-width);
|
|
16992
|
+
max-height: var(--available-height);
|
|
16946
16993
|
z-index: var(--wui-zindex-select);
|
|
16947
16994
|
|
|
16948
16995
|
[role='separator'] {
|
|
16949
16996
|
margin: var(--wui-space-02) 0;
|
|
16950
16997
|
}
|
|
16951
16998
|
`;
|
|
16952
|
-
var scrollButtonStyles =
|
|
16999
|
+
var scrollButtonStyles = css50`
|
|
16953
17000
|
align-items: center;
|
|
16954
17001
|
display: flex;
|
|
16955
17002
|
justify-content: center;
|
|
16956
17003
|
`;
|
|
16957
|
-
var
|
|
17004
|
+
var StyledScrollDownArrow = styled98(BaseSelect.ScrollDownArrow)`
|
|
16958
17005
|
${scrollButtonStyles}
|
|
16959
17006
|
`;
|
|
16960
|
-
var
|
|
17007
|
+
var StyledScrollUpArrow = styled98(BaseSelect.ScrollUpArrow)`
|
|
16961
17008
|
${scrollButtonStyles}
|
|
16962
17009
|
`;
|
|
17010
|
+
var collectItemLabels = (children) => {
|
|
17011
|
+
const items = [];
|
|
17012
|
+
Children11.forEach(children, (child) => {
|
|
17013
|
+
if (!isValidElement5(child)) return;
|
|
17014
|
+
const childProps = child.props;
|
|
17015
|
+
const { value, selectedDisplayValue, children: childChildren, textValue } = childProps;
|
|
17016
|
+
if (typeof value === "string") {
|
|
17017
|
+
if (selectedDisplayValue !== void 0 && selectedDisplayValue !== null) {
|
|
17018
|
+
items.push({ value, label: selectedDisplayValue });
|
|
17019
|
+
} else if (typeof childChildren === "string") {
|
|
17020
|
+
items.push({ value, label: childChildren });
|
|
17021
|
+
} else if (typeof textValue === "string") {
|
|
17022
|
+
items.push({ value, label: textValue });
|
|
17023
|
+
}
|
|
17024
|
+
return;
|
|
17025
|
+
}
|
|
17026
|
+
if (childChildren !== void 0 && childChildren !== null) {
|
|
17027
|
+
items.push(...collectItemLabels(childChildren));
|
|
17028
|
+
}
|
|
17029
|
+
});
|
|
17030
|
+
return items;
|
|
17031
|
+
};
|
|
16963
17032
|
var Select = forwardRef34(
|
|
16964
17033
|
({
|
|
16965
17034
|
colorScheme = "inherit",
|
|
@@ -16972,15 +17041,17 @@ var Select = forwardRef34(
|
|
|
16972
17041
|
...props
|
|
16973
17042
|
}, forwardedRef) => {
|
|
16974
17043
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
17044
|
+
const items = collectItemLabels(children);
|
|
16975
17045
|
const rootProps = {
|
|
16976
17046
|
...props,
|
|
17047
|
+
items,
|
|
16977
17048
|
onOpenChange,
|
|
16978
17049
|
onValueChange: onChange
|
|
16979
17050
|
};
|
|
16980
17051
|
if (forceOpen) {
|
|
16981
17052
|
rootProps["open"] = true;
|
|
16982
17053
|
}
|
|
16983
|
-
return /* @__PURE__ */ jsxs65(
|
|
17054
|
+
return /* @__PURE__ */ jsxs65(BaseSelect.Root, { ...rootProps, children: [
|
|
16984
17055
|
/* @__PURE__ */ jsxs65(
|
|
16985
17056
|
StyledTrigger2,
|
|
16986
17057
|
{
|
|
@@ -16989,7 +17060,7 @@ var Select = forwardRef34(
|
|
|
16989
17060
|
$fullWidth: responsiveFullWidth,
|
|
16990
17061
|
...props,
|
|
16991
17062
|
children: [
|
|
16992
|
-
/* @__PURE__ */ jsx340(Value, { placeholder }),
|
|
17063
|
+
/* @__PURE__ */ jsx340(BaseSelect.Value, { placeholder }),
|
|
16993
17064
|
/* @__PURE__ */ jsx340(
|
|
16994
17065
|
Icon,
|
|
16995
17066
|
{
|
|
@@ -17000,28 +17071,29 @@ var Select = forwardRef34(
|
|
|
17000
17071
|
]
|
|
17001
17072
|
}
|
|
17002
17073
|
),
|
|
17003
|
-
/* @__PURE__ */ jsx340(
|
|
17004
|
-
|
|
17074
|
+
/* @__PURE__ */ jsx340(BaseSelect.Portal, { children: /* @__PURE__ */ jsx340(
|
|
17075
|
+
BaseSelect.Positioner,
|
|
17005
17076
|
{
|
|
17006
|
-
|
|
17077
|
+
align: "start",
|
|
17078
|
+
alignItemWithTrigger: false,
|
|
17007
17079
|
sideOffset: 8,
|
|
17008
|
-
children: [
|
|
17009
|
-
/* @__PURE__ */ jsx340(
|
|
17080
|
+
children: /* @__PURE__ */ jsxs65(StyledPopup5, { children: [
|
|
17081
|
+
/* @__PURE__ */ jsx340(StyledScrollUpArrow, { children: /* @__PURE__ */ jsx340(
|
|
17010
17082
|
Icon,
|
|
17011
17083
|
{
|
|
17012
17084
|
size: "sm",
|
|
17013
17085
|
type: "caret-up"
|
|
17014
17086
|
}
|
|
17015
17087
|
) }),
|
|
17016
|
-
|
|
17017
|
-
/* @__PURE__ */ jsx340(
|
|
17088
|
+
children,
|
|
17089
|
+
/* @__PURE__ */ jsx340(StyledScrollDownArrow, { children: /* @__PURE__ */ jsx340(
|
|
17018
17090
|
Icon,
|
|
17019
17091
|
{
|
|
17020
17092
|
size: "sm",
|
|
17021
17093
|
type: "caret-down"
|
|
17022
17094
|
}
|
|
17023
17095
|
) })
|
|
17024
|
-
]
|
|
17096
|
+
] })
|
|
17025
17097
|
}
|
|
17026
17098
|
) })
|
|
17027
17099
|
] });
|
|
@@ -17030,12 +17102,12 @@ var Select = forwardRef34(
|
|
|
17030
17102
|
Select.displayName = "Select_UI";
|
|
17031
17103
|
|
|
17032
17104
|
// src/components/Select/SelectOption.tsx
|
|
17033
|
-
import {
|
|
17105
|
+
import { Select as Select2 } from "@base-ui/react/select";
|
|
17034
17106
|
import { forwardRef as forwardRef35 } from "react";
|
|
17035
|
-
import { styled as
|
|
17036
|
-
import { isNotNil as
|
|
17107
|
+
import { styled as styled99 } from "styled-components";
|
|
17108
|
+
import { isNotNil as isNotNil40 } from "@wistia/type-guards";
|
|
17037
17109
|
import { jsx as jsx341, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
17038
|
-
var StyledItem =
|
|
17110
|
+
var StyledItem = styled99(Select2.Item)`
|
|
17039
17111
|
${getTypographicStyles("label3")}
|
|
17040
17112
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
17041
17113
|
background-color: transparent;
|
|
@@ -17062,19 +17134,21 @@ var StyledItem = styled100(Item)`
|
|
|
17062
17134
|
}
|
|
17063
17135
|
`;
|
|
17064
17136
|
var SelectOption = forwardRef35(
|
|
17065
|
-
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
17137
|
+
({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", textValue, ...props }, forwardedRef) => {
|
|
17138
|
+
const label = typeof children === "string" ? children : textValue;
|
|
17066
17139
|
return /* @__PURE__ */ jsxs66(
|
|
17067
17140
|
StyledItem,
|
|
17068
17141
|
{
|
|
17069
17142
|
...props,
|
|
17070
17143
|
ref: forwardedRef,
|
|
17071
17144
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
17145
|
+
...label != null ? { label } : {},
|
|
17072
17146
|
children: [
|
|
17073
|
-
|
|
17147
|
+
isNotNil40(selectedDisplayValue) ? /* @__PURE__ */ jsxs66("div", { children: [
|
|
17074
17148
|
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(
|
|
17149
|
+
/* @__PURE__ */ jsx341("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx341(Select2.ItemText, { children: selectedDisplayValue }) })
|
|
17150
|
+
] }) : /* @__PURE__ */ jsx341(Select2.ItemText, { children }),
|
|
17151
|
+
/* @__PURE__ */ jsx341(Select2.ItemIndicator, { children: /* @__PURE__ */ jsx341(
|
|
17078
17152
|
Icon,
|
|
17079
17153
|
{
|
|
17080
17154
|
size: "md",
|
|
@@ -17089,14 +17163,14 @@ var SelectOption = forwardRef35(
|
|
|
17089
17163
|
SelectOption.displayName = "SelectOption_UI";
|
|
17090
17164
|
|
|
17091
17165
|
// src/components/Select/SelectOptionGroup.tsx
|
|
17092
|
-
import {
|
|
17093
|
-
import { styled as
|
|
17166
|
+
import { Select as Select3 } from "@base-ui/react/select";
|
|
17167
|
+
import { styled as styled100 } from "styled-components";
|
|
17094
17168
|
import { jsx as jsx342, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
17095
|
-
var StyledLabel4 =
|
|
17169
|
+
var StyledLabel4 = styled100(Select3.GroupLabel)`
|
|
17096
17170
|
padding: var(--wui-select-option-padding);
|
|
17097
17171
|
`;
|
|
17098
17172
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
17099
|
-
return /* @__PURE__ */ jsxs67(Group, { ...props, children: [
|
|
17173
|
+
return /* @__PURE__ */ jsxs67(Select3.Group, { ...props, children: [
|
|
17100
17174
|
/* @__PURE__ */ jsx342(StyledLabel4, { children: /* @__PURE__ */ jsx342(
|
|
17101
17175
|
Heading,
|
|
17102
17176
|
{
|
|
@@ -17110,16 +17184,11 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
17110
17184
|
};
|
|
17111
17185
|
|
|
17112
17186
|
// 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";
|
|
17187
|
+
import { Slider as BaseSlider } from "@base-ui/react/slider";
|
|
17188
|
+
import { styled as styled101 } from "styled-components";
|
|
17120
17189
|
import { isNonEmptyString as isNonEmptyString9 } from "@wistia/type-guards";
|
|
17121
17190
|
import { jsx as jsx343, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
17122
|
-
var SliderContainer =
|
|
17191
|
+
var SliderContainer = styled101.div`
|
|
17123
17192
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
17124
17193
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
17125
17194
|
--wui-slider-range-color: var(--wui-color-bg-fill);
|
|
@@ -17135,28 +17204,28 @@ var SliderContainer = styled102.div`
|
|
|
17135
17204
|
pointer-events: none;
|
|
17136
17205
|
}
|
|
17137
17206
|
`;
|
|
17138
|
-
var StyledSliderRoot =
|
|
17139
|
-
|
|
17207
|
+
var StyledSliderRoot = styled101(BaseSlider.Root)`
|
|
17208
|
+
width: 100%;
|
|
17209
|
+
`;
|
|
17210
|
+
var StyledSliderControl = styled101(BaseSlider.Control)`
|
|
17140
17211
|
display: flex;
|
|
17141
17212
|
align-items: center;
|
|
17142
17213
|
user-select: none;
|
|
17143
17214
|
touch-action: none;
|
|
17144
17215
|
width: 100%;
|
|
17145
17216
|
`;
|
|
17146
|
-
var StyledSliderTrack =
|
|
17217
|
+
var StyledSliderTrack = styled101(BaseSlider.Track)`
|
|
17147
17218
|
background-color: var(--wui-slider-track-color);
|
|
17148
17219
|
border-radius: var(--wui-slider-track-border-radius);
|
|
17149
|
-
|
|
17220
|
+
width: 100%;
|
|
17150
17221
|
height: 6px;
|
|
17151
17222
|
position: relative;
|
|
17152
17223
|
`;
|
|
17153
|
-
var
|
|
17224
|
+
var StyledSliderIndicator = styled101(BaseSlider.Indicator)`
|
|
17154
17225
|
background-color: var(--wui-slider-range-color);
|
|
17155
17226
|
border-radius: var(--wui-slider-track-border-radius);
|
|
17156
|
-
height: 100%;
|
|
17157
|
-
position: absolute;
|
|
17158
17227
|
`;
|
|
17159
|
-
var StyledSliderThumb =
|
|
17228
|
+
var StyledSliderThumb = styled101(BaseSlider.Thumb)`
|
|
17160
17229
|
background-color: var(--wui-slider-thumb-color);
|
|
17161
17230
|
border-radius: var(--wui-border-radius-rounded);
|
|
17162
17231
|
cursor: grab;
|
|
@@ -17183,7 +17252,7 @@ var StyledSliderThumb = styled102(RadixSliderThumb)`
|
|
|
17183
17252
|
outline-width: 2px;
|
|
17184
17253
|
}
|
|
17185
17254
|
`;
|
|
17186
|
-
var
|
|
17255
|
+
var Slider2 = ({
|
|
17187
17256
|
"aria-label": ariaLabel,
|
|
17188
17257
|
"aria-labelledby": ariaLabelledby,
|
|
17189
17258
|
disabled = false,
|
|
@@ -17191,7 +17260,7 @@ var Slider = ({
|
|
|
17191
17260
|
max = 100,
|
|
17192
17261
|
min = 0,
|
|
17193
17262
|
onChange,
|
|
17194
|
-
|
|
17263
|
+
onValueCommitted,
|
|
17195
17264
|
step = 1,
|
|
17196
17265
|
value,
|
|
17197
17266
|
"data-testid": dataTestId = "ui-slider",
|
|
@@ -17205,7 +17274,12 @@ var Slider = ({
|
|
|
17205
17274
|
const values = value ?? initialValue;
|
|
17206
17275
|
const handleValueChange = (newValue) => {
|
|
17207
17276
|
if (onChange) {
|
|
17208
|
-
onChange(newValue);
|
|
17277
|
+
onChange(typeof newValue === "number" ? [newValue] : [...newValue]);
|
|
17278
|
+
}
|
|
17279
|
+
};
|
|
17280
|
+
const handleValueCommitted = (newValue) => {
|
|
17281
|
+
if (onValueCommitted) {
|
|
17282
|
+
onValueCommitted(typeof newValue === "number" ? [newValue] : [...newValue]);
|
|
17209
17283
|
}
|
|
17210
17284
|
};
|
|
17211
17285
|
return /* @__PURE__ */ jsx343(
|
|
@@ -17213,7 +17287,7 @@ var Slider = ({
|
|
|
17213
17287
|
{
|
|
17214
17288
|
...otherProps,
|
|
17215
17289
|
"data-testid": dataTestId,
|
|
17216
|
-
children: /* @__PURE__ */
|
|
17290
|
+
children: /* @__PURE__ */ jsx343(
|
|
17217
17291
|
StyledSliderRoot,
|
|
17218
17292
|
{
|
|
17219
17293
|
"aria-label": ariaLabel,
|
|
@@ -17223,11 +17297,11 @@ var Slider = ({
|
|
|
17223
17297
|
max,
|
|
17224
17298
|
min,
|
|
17225
17299
|
onValueChange: handleValueChange,
|
|
17300
|
+
onValueCommitted: handleValueCommitted,
|
|
17226
17301
|
step,
|
|
17227
|
-
...onValueCommit ? { onValueCommit } : {},
|
|
17228
17302
|
...value ? { value } : {},
|
|
17229
|
-
children: [
|
|
17230
|
-
/* @__PURE__ */ jsx343(
|
|
17303
|
+
children: /* @__PURE__ */ jsx343(StyledSliderControl, { children: /* @__PURE__ */ jsxs68(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: [
|
|
17304
|
+
/* @__PURE__ */ jsx343(StyledSliderIndicator, { "data-testid": `${dataTestId}-range` }),
|
|
17231
17305
|
values.map((_, index) => /* @__PURE__ */ jsx343(
|
|
17232
17306
|
StyledSliderThumb,
|
|
17233
17307
|
{
|
|
@@ -17235,20 +17309,20 @@ var Slider = ({
|
|
|
17235
17309
|
},
|
|
17236
17310
|
`thumb-${index}`
|
|
17237
17311
|
))
|
|
17238
|
-
]
|
|
17312
|
+
] }) })
|
|
17239
17313
|
}
|
|
17240
17314
|
)
|
|
17241
17315
|
}
|
|
17242
17316
|
);
|
|
17243
17317
|
};
|
|
17244
|
-
|
|
17318
|
+
Slider2.displayName = "Slider_UI";
|
|
17245
17319
|
|
|
17246
17320
|
// src/components/SplitButton/SplitButton.tsx
|
|
17247
|
-
import { styled as
|
|
17248
|
-
import { isNotNil as
|
|
17321
|
+
import { styled as styled102 } from "styled-components";
|
|
17322
|
+
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
17249
17323
|
import { cloneElement as cloneElement9 } from "react";
|
|
17250
17324
|
import { jsx as jsx344, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
17251
|
-
var StyledSplitButton =
|
|
17325
|
+
var StyledSplitButton = styled102.span`
|
|
17252
17326
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
17253
17327
|
white-space: nowrap;
|
|
17254
17328
|
|
|
@@ -17259,7 +17333,7 @@ var StyledSplitButton = styled103.span`
|
|
|
17259
17333
|
padding-right: 0;
|
|
17260
17334
|
}
|
|
17261
17335
|
|
|
17262
|
-
> [data-wui-button='true']:
|
|
17336
|
+
> [data-wui-button='true']:not(:first-child) {
|
|
17263
17337
|
border-top-left-radius: 0;
|
|
17264
17338
|
border-bottom-left-radius: 0;
|
|
17265
17339
|
display: inline-flex;
|
|
@@ -17292,7 +17366,7 @@ var SplitButton = ({
|
|
|
17292
17366
|
children
|
|
17293
17367
|
}
|
|
17294
17368
|
),
|
|
17295
|
-
|
|
17369
|
+
isNotNil41(menuItems) && /* @__PURE__ */ jsx344(
|
|
17296
17370
|
Menu,
|
|
17297
17371
|
{
|
|
17298
17372
|
...menuProps,
|
|
@@ -17311,31 +17385,31 @@ var SplitButton = ({
|
|
|
17311
17385
|
children: menuItems
|
|
17312
17386
|
}
|
|
17313
17387
|
),
|
|
17314
|
-
|
|
17388
|
+
isNotNil41(secondaryAction) && cloneElement9(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
|
|
17315
17389
|
] });
|
|
17316
17390
|
};
|
|
17317
17391
|
SplitButton.displayName = "SplitButton_UI";
|
|
17318
17392
|
|
|
17319
17393
|
// src/components/Table/Table.tsx
|
|
17320
|
-
import { styled as
|
|
17394
|
+
import { styled as styled103, css as css51 } from "styled-components";
|
|
17321
17395
|
import { jsx as jsx345 } from "react/jsx-runtime";
|
|
17322
|
-
var StyledTable =
|
|
17396
|
+
var StyledTable = styled103.table`
|
|
17323
17397
|
width: 100%;
|
|
17324
17398
|
border-collapse: collapse;
|
|
17325
17399
|
|
|
17326
|
-
${({ $divided }) => $divided &&
|
|
17400
|
+
${({ $divided }) => $divided && css51`
|
|
17327
17401
|
tr {
|
|
17328
17402
|
border-bottom: 1px solid var(--wui-color-border);
|
|
17329
17403
|
}
|
|
17330
17404
|
`}
|
|
17331
17405
|
|
|
17332
|
-
${({ $striped }) => $striped &&
|
|
17406
|
+
${({ $striped }) => $striped && css51`
|
|
17333
17407
|
tbody tr:nth-child(even) {
|
|
17334
17408
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
17335
17409
|
}
|
|
17336
17410
|
`}
|
|
17337
17411
|
|
|
17338
|
-
${({ $visuallyHiddenHeader }) => $visuallyHiddenHeader &&
|
|
17412
|
+
${({ $visuallyHiddenHeader }) => $visuallyHiddenHeader && css51`
|
|
17339
17413
|
thead {
|
|
17340
17414
|
${visuallyHiddenStyle}
|
|
17341
17415
|
}
|
|
@@ -17361,7 +17435,7 @@ var Table = ({
|
|
|
17361
17435
|
};
|
|
17362
17436
|
|
|
17363
17437
|
// src/components/Table/TableBody.tsx
|
|
17364
|
-
import { styled as
|
|
17438
|
+
import { styled as styled104 } from "styled-components";
|
|
17365
17439
|
|
|
17366
17440
|
// src/components/Table/TableSectionContext.ts
|
|
17367
17441
|
import { createContext as createContext11 } from "react";
|
|
@@ -17369,7 +17443,7 @@ var TableSectionContext = createContext11(null);
|
|
|
17369
17443
|
|
|
17370
17444
|
// src/components/Table/TableBody.tsx
|
|
17371
17445
|
import { jsx as jsx346 } from "react/jsx-runtime";
|
|
17372
|
-
var StyledTableBody =
|
|
17446
|
+
var StyledTableBody = styled104.tbody`
|
|
17373
17447
|
width: 100%;
|
|
17374
17448
|
`;
|
|
17375
17449
|
var TableBody = ({ children, ...props }) => {
|
|
@@ -17378,20 +17452,20 @@ var TableBody = ({ children, ...props }) => {
|
|
|
17378
17452
|
|
|
17379
17453
|
// src/components/Table/TableCell.tsx
|
|
17380
17454
|
import { useContext as useContext17 } from "react";
|
|
17381
|
-
import { styled as
|
|
17455
|
+
import { styled as styled105, css as css52 } from "styled-components";
|
|
17382
17456
|
import { jsx as jsx347 } from "react/jsx-runtime";
|
|
17383
|
-
var sharedStyles =
|
|
17457
|
+
var sharedStyles = css52`
|
|
17384
17458
|
color: var(--wui-color-text);
|
|
17385
17459
|
padding: var(--wui-space-02);
|
|
17386
17460
|
text-align: left;
|
|
17387
17461
|
`;
|
|
17388
|
-
var StyledTh =
|
|
17462
|
+
var StyledTh = styled105.th`
|
|
17389
17463
|
${sharedStyles}
|
|
17390
17464
|
font-size: var(--wui-typography-body-4-size);
|
|
17391
17465
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
17392
17466
|
line-height: var(--wui-typography-body-4-line-height);
|
|
17393
17467
|
`;
|
|
17394
|
-
var StyledTd =
|
|
17468
|
+
var StyledTd = styled105.td`
|
|
17395
17469
|
${sharedStyles}
|
|
17396
17470
|
font-size: var(--wui-typography-body-2-size);
|
|
17397
17471
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -17406,9 +17480,9 @@ var TableCell = ({ children, ...props }) => {
|
|
|
17406
17480
|
};
|
|
17407
17481
|
|
|
17408
17482
|
// src/components/Table/TableFoot.tsx
|
|
17409
|
-
import { styled as
|
|
17483
|
+
import { styled as styled106 } from "styled-components";
|
|
17410
17484
|
import { jsx as jsx348 } from "react/jsx-runtime";
|
|
17411
|
-
var StyledTableFoot =
|
|
17485
|
+
var StyledTableFoot = styled106.tfoot`
|
|
17412
17486
|
width: 100%;
|
|
17413
17487
|
`;
|
|
17414
17488
|
var TableFoot = ({ children, ...props }) => {
|
|
@@ -17416,9 +17490,9 @@ var TableFoot = ({ children, ...props }) => {
|
|
|
17416
17490
|
};
|
|
17417
17491
|
|
|
17418
17492
|
// src/components/Table/TableHead.tsx
|
|
17419
|
-
import { styled as
|
|
17493
|
+
import { styled as styled107 } from "styled-components";
|
|
17420
17494
|
import { jsx as jsx349 } from "react/jsx-runtime";
|
|
17421
|
-
var StyledThead =
|
|
17495
|
+
var StyledThead = styled107.thead`
|
|
17422
17496
|
width: 100%;
|
|
17423
17497
|
`;
|
|
17424
17498
|
var TableHead = ({ children, ...props }) => {
|
|
@@ -17426,9 +17500,9 @@ var TableHead = ({ children, ...props }) => {
|
|
|
17426
17500
|
};
|
|
17427
17501
|
|
|
17428
17502
|
// src/components/Table/TableRow.tsx
|
|
17429
|
-
import { styled as
|
|
17503
|
+
import { styled as styled108 } from "styled-components";
|
|
17430
17504
|
import { jsx as jsx350 } from "react/jsx-runtime";
|
|
17431
|
-
var StyledTableRow =
|
|
17505
|
+
var StyledTableRow = styled108.tr`
|
|
17432
17506
|
width: 100%;
|
|
17433
17507
|
`;
|
|
17434
17508
|
var TableRow = ({ children, ...props }) => {
|
|
@@ -17436,9 +17510,9 @@ var TableRow = ({ children, ...props }) => {
|
|
|
17436
17510
|
};
|
|
17437
17511
|
|
|
17438
17512
|
// src/components/Tabs/Tabs.tsx
|
|
17439
|
-
import {
|
|
17440
|
-
import { useCallback as
|
|
17441
|
-
import { isNotNil as
|
|
17513
|
+
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
17514
|
+
import { useCallback as useCallback20, useState as useState26 } from "react";
|
|
17515
|
+
import { isNotNil as isNotNil42 } from "@wistia/type-guards";
|
|
17442
17516
|
|
|
17443
17517
|
// src/components/Tabs/useTabsValue.tsx
|
|
17444
17518
|
import { createContext as createContext12, useContext as useContext18 } from "react";
|
|
@@ -17462,11 +17536,13 @@ var Tabs = ({
|
|
|
17462
17536
|
...props
|
|
17463
17537
|
}) => {
|
|
17464
17538
|
const [value, setValue] = useState26(valueProp ?? defaultValue);
|
|
17465
|
-
const onValueChange =
|
|
17539
|
+
const onValueChange = useCallback20(
|
|
17466
17540
|
(newValue) => {
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
onValueChangeProp
|
|
17541
|
+
if (newValue !== null) {
|
|
17542
|
+
setValue(newValue);
|
|
17543
|
+
if (onValueChangeProp) {
|
|
17544
|
+
onValueChangeProp(newValue);
|
|
17545
|
+
}
|
|
17470
17546
|
}
|
|
17471
17547
|
},
|
|
17472
17548
|
[onValueChangeProp]
|
|
@@ -17475,34 +17551,34 @@ var Tabs = ({
|
|
|
17475
17551
|
...props,
|
|
17476
17552
|
onValueChange
|
|
17477
17553
|
};
|
|
17478
|
-
if (
|
|
17554
|
+
if (isNotNil42(value)) {
|
|
17479
17555
|
rootProps.value = value;
|
|
17480
17556
|
}
|
|
17481
|
-
if (
|
|
17557
|
+
if (isNotNil42(defaultValue)) {
|
|
17482
17558
|
rootProps.defaultValue = defaultValue;
|
|
17483
17559
|
}
|
|
17484
|
-
return /* @__PURE__ */ jsx351(
|
|
17560
|
+
return /* @__PURE__ */ jsx351(BaseTabs.Root, { ...rootProps, children: /* @__PURE__ */ jsx351(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx351(SelectedItemStyleProvider, { children }) }) });
|
|
17485
17561
|
};
|
|
17486
17562
|
Tabs.displayName = "Tabs_UI";
|
|
17487
17563
|
|
|
17488
17564
|
// src/components/Tabs/TabsContent.tsx
|
|
17489
|
-
import {
|
|
17565
|
+
import { Tabs as Tabs2 } from "@base-ui/react/tabs";
|
|
17490
17566
|
import { jsx as jsx352 } from "react/jsx-runtime";
|
|
17491
17567
|
var TabsContent = ({ children, value }) => {
|
|
17492
|
-
return /* @__PURE__ */ jsx352(
|
|
17568
|
+
return /* @__PURE__ */ jsx352(Tabs2.Panel, { value, children });
|
|
17493
17569
|
};
|
|
17494
17570
|
TabsContent.displayName = "TabsContent_UI";
|
|
17495
17571
|
|
|
17496
17572
|
// src/components/Tabs/TabsList.tsx
|
|
17497
|
-
import {
|
|
17498
|
-
import { styled as
|
|
17573
|
+
import { Tabs as Tabs3 } from "@base-ui/react/tabs";
|
|
17574
|
+
import { styled as styled110 } from "styled-components";
|
|
17499
17575
|
|
|
17500
17576
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
17501
17577
|
import { isUndefined as isUndefined6 } from "@wistia/type-guards";
|
|
17502
17578
|
|
|
17503
17579
|
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
17504
|
-
import { styled as
|
|
17505
|
-
var TabsSelectedItemIndicatorDiv =
|
|
17580
|
+
import { styled as styled109 } from "styled-components";
|
|
17581
|
+
var TabsSelectedItemIndicatorDiv = styled109(SelectedItemIndicatorDiv)`
|
|
17506
17582
|
:has(button[role='tab']:focus-visible) > & {
|
|
17507
17583
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
17508
17584
|
}
|
|
@@ -17527,7 +17603,7 @@ var SelectedTabIndicator = () => {
|
|
|
17527
17603
|
|
|
17528
17604
|
// src/components/Tabs/TabsList.tsx
|
|
17529
17605
|
import { jsx as jsx354, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
17530
|
-
var StyledTabsList =
|
|
17606
|
+
var StyledTabsList = styled110(Tabs3.List)`
|
|
17531
17607
|
${segmentedControlStyles}
|
|
17532
17608
|
`;
|
|
17533
17609
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
@@ -17547,12 +17623,12 @@ TabsList.displayName = "TabsList_UI";
|
|
|
17547
17623
|
|
|
17548
17624
|
// src/components/Tabs/TabsTrigger.tsx
|
|
17549
17625
|
import { forwardRef as forwardRef36, useEffect as useEffect23, useRef as useRef24 } from "react";
|
|
17550
|
-
import { isNotNil as
|
|
17626
|
+
import { isNotNil as isNotNil43 } from "@wistia/type-guards";
|
|
17551
17627
|
|
|
17552
17628
|
// src/components/Tabs/StyledTabsTrigger.tsx
|
|
17553
|
-
import { styled as
|
|
17554
|
-
import {
|
|
17555
|
-
var StyledTabsTrigger =
|
|
17629
|
+
import { styled as styled111 } from "styled-components";
|
|
17630
|
+
import { Tabs as Tabs4 } from "@base-ui/react/tabs";
|
|
17631
|
+
var StyledTabsTrigger = styled111(Tabs4.Tab)`
|
|
17556
17632
|
${segmentedControlItemStyles}
|
|
17557
17633
|
|
|
17558
17634
|
&:focus-visible {
|
|
@@ -17598,8 +17674,8 @@ var TabsTrigger = forwardRef36(
|
|
|
17598
17674
|
{
|
|
17599
17675
|
...otherProps,
|
|
17600
17676
|
ref: combinedRef,
|
|
17601
|
-
$hasLabel:
|
|
17602
|
-
"aria-label":
|
|
17677
|
+
$hasLabel: isNotNil43(label),
|
|
17678
|
+
"aria-label": isNotNil43(label) ? void 0 : ariaLabel,
|
|
17603
17679
|
disabled,
|
|
17604
17680
|
value,
|
|
17605
17681
|
children: [
|
|
@@ -17613,10 +17689,10 @@ var TabsTrigger = forwardRef36(
|
|
|
17613
17689
|
TabsTrigger.displayName = "TabsTrigger_UI";
|
|
17614
17690
|
|
|
17615
17691
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
17616
|
-
import { styled as
|
|
17617
|
-
import { isNotNil as
|
|
17692
|
+
import { styled as styled112 } from "styled-components";
|
|
17693
|
+
import { isNotNil as isNotNil44 } from "@wistia/type-guards";
|
|
17618
17694
|
import { jsx as jsx355, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
17619
|
-
var StyledThumbnailBadge =
|
|
17695
|
+
var StyledThumbnailBadge = styled112.div`
|
|
17620
17696
|
align-items: center;
|
|
17621
17697
|
background-color: rgb(0 0 0 / 50%);
|
|
17622
17698
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -17643,18 +17719,18 @@ var StyledThumbnailBadge = styled113.div`
|
|
|
17643
17719
|
`;
|
|
17644
17720
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
17645
17721
|
return /* @__PURE__ */ jsxs72(StyledThumbnailBadge, { ...props, children: [
|
|
17646
|
-
|
|
17722
|
+
isNotNil44(icon) && icon,
|
|
17647
17723
|
/* @__PURE__ */ jsx355("span", { children: label })
|
|
17648
17724
|
] });
|
|
17649
17725
|
};
|
|
17650
17726
|
ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
17651
17727
|
|
|
17652
17728
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17653
|
-
import { forwardRef as forwardRef37, useState as useState27, useRef as useRef25, useCallback as
|
|
17654
|
-
import { styled as
|
|
17729
|
+
import { forwardRef as forwardRef37, useState as useState27, useRef as useRef25, useCallback as useCallback21, useMemo as useMemo17 } from "react";
|
|
17730
|
+
import { styled as styled114 } from "styled-components";
|
|
17655
17731
|
import {
|
|
17656
|
-
isNil as
|
|
17657
|
-
isNotNil as
|
|
17732
|
+
isNil as isNil20,
|
|
17733
|
+
isNotNil as isNotNil47,
|
|
17658
17734
|
isUndefined as isUndefined7,
|
|
17659
17735
|
isEmptyString as isEmptyString2,
|
|
17660
17736
|
isString as isString4,
|
|
@@ -17662,10 +17738,10 @@ import {
|
|
|
17662
17738
|
} from "@wistia/type-guards";
|
|
17663
17739
|
|
|
17664
17740
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17665
|
-
import { isNotNil as
|
|
17666
|
-
import { css as
|
|
17741
|
+
import { isNotNil as isNotNil45 } from "@wistia/type-guards";
|
|
17742
|
+
import { css as css53 } from "styled-components";
|
|
17667
17743
|
var gradients = {
|
|
17668
|
-
defaultDarkOne:
|
|
17744
|
+
defaultDarkOne: css53`
|
|
17669
17745
|
background-color: #222d66;
|
|
17670
17746
|
background-image:
|
|
17671
17747
|
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
@@ -17673,7 +17749,7 @@ var gradients = {
|
|
|
17673
17749
|
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
17674
17750
|
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
17675
17751
|
`,
|
|
17676
|
-
defaultDarkTwo:
|
|
17752
|
+
defaultDarkTwo: css53`
|
|
17677
17753
|
background-color: #222d66;
|
|
17678
17754
|
background-image:
|
|
17679
17755
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
@@ -17681,7 +17757,7 @@ var gradients = {
|
|
|
17681
17757
|
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
17682
17758
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
17683
17759
|
`,
|
|
17684
|
-
defaultLightOne:
|
|
17760
|
+
defaultLightOne: css53`
|
|
17685
17761
|
background-color: #ccd5ff;
|
|
17686
17762
|
background-image:
|
|
17687
17763
|
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
@@ -17689,13 +17765,13 @@ var gradients = {
|
|
|
17689
17765
|
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
17690
17766
|
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
17691
17767
|
`,
|
|
17692
|
-
defaultLightTwo:
|
|
17768
|
+
defaultLightTwo: css53`
|
|
17693
17769
|
background-color: #ccd5ff;
|
|
17694
17770
|
background-image:
|
|
17695
17771
|
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
17696
17772
|
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
17697
17773
|
`,
|
|
17698
|
-
defaultMidOne:
|
|
17774
|
+
defaultMidOne: css53`
|
|
17699
17775
|
background-color: #6b84ff;
|
|
17700
17776
|
background-image:
|
|
17701
17777
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
@@ -17703,13 +17779,13 @@ var gradients = {
|
|
|
17703
17779
|
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
17704
17780
|
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
17705
17781
|
`,
|
|
17706
|
-
defaultMidTwo:
|
|
17782
|
+
defaultMidTwo: css53`
|
|
17707
17783
|
background-color: #6b84ff;
|
|
17708
17784
|
background-image:
|
|
17709
17785
|
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
17710
17786
|
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
17711
17787
|
`,
|
|
17712
|
-
green:
|
|
17788
|
+
green: css53`
|
|
17713
17789
|
background-color: #fafffa;
|
|
17714
17790
|
background-image:
|
|
17715
17791
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -17717,7 +17793,7 @@ var gradients = {
|
|
|
17717
17793
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
17718
17794
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
17719
17795
|
`,
|
|
17720
|
-
greenWithPop:
|
|
17796
|
+
greenWithPop: css53`
|
|
17721
17797
|
background-color: #fafffa;
|
|
17722
17798
|
background-image:
|
|
17723
17799
|
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
@@ -17725,7 +17801,7 @@ var gradients = {
|
|
|
17725
17801
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
17726
17802
|
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
17727
17803
|
`,
|
|
17728
|
-
pink:
|
|
17804
|
+
pink: css53`
|
|
17729
17805
|
background-color: #fffff0;
|
|
17730
17806
|
background-image:
|
|
17731
17807
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
@@ -17733,7 +17809,7 @@ var gradients = {
|
|
|
17733
17809
|
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
17734
17810
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
17735
17811
|
`,
|
|
17736
|
-
pinkWithPop:
|
|
17812
|
+
pinkWithPop: css53`
|
|
17737
17813
|
background-color: #fffff0;
|
|
17738
17814
|
background-image:
|
|
17739
17815
|
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
@@ -17741,7 +17817,7 @@ var gradients = {
|
|
|
17741
17817
|
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
17742
17818
|
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
17743
17819
|
`,
|
|
17744
|
-
playfulGradientOne:
|
|
17820
|
+
playfulGradientOne: css53`
|
|
17745
17821
|
background-color: #f7f8ff;
|
|
17746
17822
|
background-image:
|
|
17747
17823
|
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
@@ -17749,7 +17825,7 @@ var gradients = {
|
|
|
17749
17825
|
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
17750
17826
|
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
17751
17827
|
`,
|
|
17752
|
-
playfulGradientTwo:
|
|
17828
|
+
playfulGradientTwo: css53`
|
|
17753
17829
|
background-color: #f7f8ff;
|
|
17754
17830
|
background-image:
|
|
17755
17831
|
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
@@ -17757,13 +17833,13 @@ var gradients = {
|
|
|
17757
17833
|
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
17758
17834
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
17759
17835
|
`,
|
|
17760
|
-
purple:
|
|
17836
|
+
purple: css53`
|
|
17761
17837
|
background-color: #f2caff;
|
|
17762
17838
|
background-image:
|
|
17763
17839
|
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
17764
17840
|
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
17765
17841
|
`,
|
|
17766
|
-
purpleWithPop:
|
|
17842
|
+
purpleWithPop: css53`
|
|
17767
17843
|
background-color: #f2caff;
|
|
17768
17844
|
background-image:
|
|
17769
17845
|
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
@@ -17771,7 +17847,7 @@ var gradients = {
|
|
|
17771
17847
|
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
17772
17848
|
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
17773
17849
|
`,
|
|
17774
|
-
yellow:
|
|
17850
|
+
yellow: css53`
|
|
17775
17851
|
background-color: #fffff0;
|
|
17776
17852
|
background-image:
|
|
17777
17853
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -17779,7 +17855,7 @@ var gradients = {
|
|
|
17779
17855
|
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
17780
17856
|
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
17781
17857
|
`,
|
|
17782
|
-
yellowWithPop:
|
|
17858
|
+
yellowWithPop: css53`
|
|
17783
17859
|
background-color: #fffff0;
|
|
17784
17860
|
background-image:
|
|
17785
17861
|
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
@@ -17790,14 +17866,14 @@ var gradients = {
|
|
|
17790
17866
|
};
|
|
17791
17867
|
var gradientMap = Object.keys(gradients);
|
|
17792
17868
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
17793
|
-
return
|
|
17869
|
+
return isNotNil45(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
17794
17870
|
};
|
|
17795
17871
|
|
|
17796
17872
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
17797
|
-
import { styled as
|
|
17798
|
-
import { isNotNil as
|
|
17873
|
+
import { styled as styled113 } from "styled-components";
|
|
17874
|
+
import { isNotNil as isNotNil46 } from "@wistia/type-guards";
|
|
17799
17875
|
import { jsx as jsx356, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
17800
|
-
var ScrubLine =
|
|
17876
|
+
var ScrubLine = styled113.div`
|
|
17801
17877
|
position: absolute;
|
|
17802
17878
|
top: 0;
|
|
17803
17879
|
height: 100%;
|
|
@@ -17889,8 +17965,8 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17889
17965
|
);
|
|
17890
17966
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
17891
17967
|
const backgroundImage = `url(${storyboardUrl})`;
|
|
17892
|
-
const showScrubLine =
|
|
17893
|
-
const scrubLinePosition =
|
|
17968
|
+
const showScrubLine = isNotNil46(cursorPosition);
|
|
17969
|
+
const scrubLinePosition = isNotNil46(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
17894
17970
|
const viewerStyles = {
|
|
17895
17971
|
position: "relative",
|
|
17896
17972
|
overflow: "hidden",
|
|
@@ -17938,12 +18014,12 @@ var getAspectRatioValue = (aspectRatio) => {
|
|
|
17938
18014
|
}
|
|
17939
18015
|
return WIDE_ASPECT_RATIO;
|
|
17940
18016
|
};
|
|
17941
|
-
var WideThumbnailImage =
|
|
18017
|
+
var WideThumbnailImage = styled114.img`
|
|
17942
18018
|
height: 100%;
|
|
17943
18019
|
object-fit: cover;
|
|
17944
18020
|
width: 100%;
|
|
17945
18021
|
`;
|
|
17946
|
-
var SquareThumbnailImage =
|
|
18022
|
+
var SquareThumbnailImage = styled114.img`
|
|
17947
18023
|
backdrop-filter: blur(8px);
|
|
17948
18024
|
object-fit: contain;
|
|
17949
18025
|
width: 100%;
|
|
@@ -17968,7 +18044,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17968
18044
|
}
|
|
17969
18045
|
);
|
|
17970
18046
|
};
|
|
17971
|
-
var StyledThumbnailContainer =
|
|
18047
|
+
var StyledThumbnailContainer = styled114.div`
|
|
17972
18048
|
container-type: size;
|
|
17973
18049
|
aspect-ratio: ${({ $aspectRatio }) => getAspectRatioValue($aspectRatio)};
|
|
17974
18050
|
width: ${({ $width }) => $width};
|
|
@@ -17976,13 +18052,13 @@ var StyledThumbnailContainer = styled115.div`
|
|
|
17976
18052
|
overflow: hidden;
|
|
17977
18053
|
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17978
18054
|
`;
|
|
17979
|
-
var StyledThumbnail =
|
|
18055
|
+
var StyledThumbnail = styled114.div`
|
|
17980
18056
|
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
17981
18057
|
|
|
17982
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
18058
|
+
background-image: ${({ $backgroundUrl }) => isNotNil47($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17983
18059
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17984
18060
|
// if we don't have $backgroundUrl show a gradient
|
|
17985
|
-
|
|
18061
|
+
isNil20($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
17986
18062
|
)};
|
|
17987
18063
|
background-position: center center;
|
|
17988
18064
|
background-size: cover;
|
|
@@ -18037,7 +18113,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18037
18113
|
};
|
|
18038
18114
|
};
|
|
18039
18115
|
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18040
|
-
return
|
|
18116
|
+
return isNotNil47(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
18041
18117
|
};
|
|
18042
18118
|
var Thumbnail = forwardRef37(
|
|
18043
18119
|
({
|
|
@@ -18060,8 +18136,8 @@ var Thumbnail = forwardRef37(
|
|
|
18060
18136
|
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18061
18137
|
[thumbnailImageType, thumbnailUrl]
|
|
18062
18138
|
);
|
|
18063
|
-
const isScrubbable =
|
|
18064
|
-
const trackStoryboardLoadStatus =
|
|
18139
|
+
const isScrubbable = isNotNil47(storyboard);
|
|
18140
|
+
const trackStoryboardLoadStatus = useCallback21(() => {
|
|
18065
18141
|
if (storyboardElementRef.current || !storyboard) {
|
|
18066
18142
|
return storyboardElementRef.current;
|
|
18067
18143
|
}
|
|
@@ -18071,7 +18147,7 @@ var Thumbnail = forwardRef37(
|
|
|
18071
18147
|
storyboardElementRef.current = asset;
|
|
18072
18148
|
return storyboardElementRef.current;
|
|
18073
18149
|
}, [storyboard]);
|
|
18074
|
-
const handleMouseMove =
|
|
18150
|
+
const handleMouseMove = useCallback21(
|
|
18075
18151
|
(mouseEvent) => {
|
|
18076
18152
|
if (!isScrubbable) {
|
|
18077
18153
|
return;
|
|
@@ -18086,7 +18162,7 @@ var Thumbnail = forwardRef37(
|
|
|
18086
18162
|
},
|
|
18087
18163
|
[isScrubbable, trackStoryboardLoadStatus]
|
|
18088
18164
|
);
|
|
18089
|
-
const handleMouseOut =
|
|
18165
|
+
const handleMouseOut = useCallback21(() => {
|
|
18090
18166
|
if (!isScrubbable) {
|
|
18091
18167
|
return;
|
|
18092
18168
|
}
|
|
@@ -18094,7 +18170,7 @@ var Thumbnail = forwardRef37(
|
|
|
18094
18170
|
setCursorPosition(null);
|
|
18095
18171
|
}, [isScrubbable]);
|
|
18096
18172
|
const shouldRenderStoryboard = useMemo17(() => {
|
|
18097
|
-
if (
|
|
18173
|
+
if (isNil20(storyboard) || isUndefined7(height) || isEmptyString2(height)) {
|
|
18098
18174
|
return false;
|
|
18099
18175
|
}
|
|
18100
18176
|
return isScrubbable && isMouseOver && isStoryboardReady;
|
|
@@ -18143,7 +18219,7 @@ var Thumbnail = forwardRef37(
|
|
|
18143
18219
|
$gradientBackground: gradientBackground,
|
|
18144
18220
|
"data-testid": "thumbnail-inner",
|
|
18145
18221
|
children: [
|
|
18146
|
-
|
|
18222
|
+
isNotNil47(children) ? children : null,
|
|
18147
18223
|
thumbnailContent
|
|
18148
18224
|
]
|
|
18149
18225
|
}
|
|
@@ -18155,17 +18231,17 @@ var Thumbnail = forwardRef37(
|
|
|
18155
18231
|
Thumbnail.displayName = "Thumbnail_UI";
|
|
18156
18232
|
|
|
18157
18233
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
18158
|
-
import { cloneElement as cloneElement10, Children as
|
|
18159
|
-
import { styled as
|
|
18234
|
+
import { cloneElement as cloneElement10, Children as Children12 } from "react";
|
|
18235
|
+
import { styled as styled115 } from "styled-components";
|
|
18160
18236
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
18161
18237
|
import { jsx as jsx358 } from "react/jsx-runtime";
|
|
18162
|
-
var ThumbnailCollageContainer =
|
|
18238
|
+
var ThumbnailCollageContainer = styled115.div`
|
|
18163
18239
|
container-type: size;
|
|
18164
18240
|
width: 100%;
|
|
18165
18241
|
aspect-ratio: 16 / 9;
|
|
18166
18242
|
display: flex;
|
|
18167
18243
|
`;
|
|
18168
|
-
var StyledThumbnailCollage =
|
|
18244
|
+
var StyledThumbnailCollage = styled115.div`
|
|
18169
18245
|
display: grid;
|
|
18170
18246
|
gap: var(--wui-space-01);
|
|
18171
18247
|
width: 100%;
|
|
@@ -18214,7 +18290,7 @@ var ThumbnailCollage = ({
|
|
|
18214
18290
|
gradientBackground = "defaultMidOne",
|
|
18215
18291
|
...props
|
|
18216
18292
|
}) => {
|
|
18217
|
-
const thumbnailArray =
|
|
18293
|
+
const thumbnailArray = Children12.toArray(children);
|
|
18218
18294
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
18219
18295
|
const thumbnails = isNonEmptyArray(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
18220
18296
|
return cloneElement10(child, {
|
|
@@ -18244,8 +18320,8 @@ var ThumbnailCollage = ({
|
|
|
18244
18320
|
};
|
|
18245
18321
|
|
|
18246
18322
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
18247
|
-
import { styled as
|
|
18248
|
-
import { isNotNil as
|
|
18323
|
+
import { styled as styled116, css as css54 } from "styled-components";
|
|
18324
|
+
import { isNotNil as isNotNil48 } from "@wistia/type-guards";
|
|
18249
18325
|
import { jsx as jsx359, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
18250
18326
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
18251
18327
|
if (iconOnly) {
|
|
@@ -18286,7 +18362,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
18286
18362
|
}
|
|
18287
18363
|
return "0 0 144 31.47";
|
|
18288
18364
|
};
|
|
18289
|
-
var WistiaLogoComponent =
|
|
18365
|
+
var WistiaLogoComponent = styled116.svg`
|
|
18290
18366
|
height: ${({ height }) => `${height}px`};
|
|
18291
18367
|
|
|
18292
18368
|
/* ensure it will always fit on mobile */
|
|
@@ -18302,12 +18378,12 @@ var WistiaLogoComponent = styled117.svg`
|
|
|
18302
18378
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
18303
18379
|
if ($opticallyCentered) {
|
|
18304
18380
|
if ($iconOnly) {
|
|
18305
|
-
return
|
|
18381
|
+
return css54`
|
|
18306
18382
|
aspect-ratio: 1;
|
|
18307
18383
|
padding: 11.85% 3.12% 13.91%;
|
|
18308
18384
|
`;
|
|
18309
18385
|
}
|
|
18310
|
-
return
|
|
18386
|
+
return css54`
|
|
18311
18387
|
aspect-ratio: 127 / 32;
|
|
18312
18388
|
`;
|
|
18313
18389
|
}
|
|
@@ -18358,7 +18434,7 @@ var WistiaLogo = ({
|
|
|
18358
18434
|
...props,
|
|
18359
18435
|
children: [
|
|
18360
18436
|
/* @__PURE__ */ jsx359("title", { children: title }),
|
|
18361
|
-
|
|
18437
|
+
isNotNil48(description) ? /* @__PURE__ */ jsx359("desc", { children: description }) : null,
|
|
18362
18438
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
18363
18439
|
renderLogotype(logotypeColor, iconOnly)
|
|
18364
18440
|
]
|
|
@@ -18462,13 +18538,13 @@ export {
|
|
|
18462
18538
|
ModalCallout,
|
|
18463
18539
|
ModalCallouts,
|
|
18464
18540
|
PersistentFileAmountLimitValidator,
|
|
18465
|
-
Popover,
|
|
18541
|
+
Popover5 as Popover,
|
|
18466
18542
|
PreviewCard,
|
|
18467
18543
|
ProgressBar,
|
|
18468
|
-
Radio,
|
|
18544
|
+
Radio2 as Radio,
|
|
18469
18545
|
RadioCard,
|
|
18470
18546
|
RadioCardImage,
|
|
18471
|
-
RadioGroup,
|
|
18547
|
+
RadioGroup2 as RadioGroup,
|
|
18472
18548
|
RadioMenuItem,
|
|
18473
18549
|
SaturationAndValuePicker,
|
|
18474
18550
|
ScreenReaderOnly,
|
|
@@ -18478,7 +18554,7 @@ export {
|
|
|
18478
18554
|
Select,
|
|
18479
18555
|
SelectOption,
|
|
18480
18556
|
SelectOptionGroup,
|
|
18481
|
-
Slider,
|
|
18557
|
+
Slider2 as Slider,
|
|
18482
18558
|
SplitButton,
|
|
18483
18559
|
Stack,
|
|
18484
18560
|
SubMenu,
|
|
@@ -18498,7 +18574,7 @@ export {
|
|
|
18498
18574
|
Thumbnail,
|
|
18499
18575
|
ThumbnailBadge,
|
|
18500
18576
|
ThumbnailCollage,
|
|
18501
|
-
Tooltip,
|
|
18577
|
+
Tooltip2 as Tooltip,
|
|
18502
18578
|
UIProvider,
|
|
18503
18579
|
ValueNameOrHexCode,
|
|
18504
18580
|
ValueSwatch,
|