@wistia/ui 0.5.6-beta.cccfda76.bed4cef → 0.5.6-beta.e5d75923.87d3f76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +143 -238
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +121 -216
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.5.6-beta.
|
|
3
|
+
* @license @wistia/ui v0.5.6-beta.e5d75923.87d3f76
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -9503,10 +9503,11 @@ var SelectedItemIndicatorDiv = import_styled_components61.default.div`
|
|
|
9503
9503
|
left: 0;
|
|
9504
9504
|
position: absolute;
|
|
9505
9505
|
top: 0;
|
|
9506
|
-
transition:
|
|
9507
|
-
transform var(--wui-motion-duration-03) var(--wui-motion-ease-out),
|
|
9508
|
-
width var(--wui-motion-duration-02) var(--wui-motion-ease-out);
|
|
9509
9506
|
z-index: ${Z_INDEX_TO_SIT_BEHIND_SIBLINGS};
|
|
9507
|
+
|
|
9508
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
9509
|
+
transition: transform var(--wui-motion-duration-03) var(--wui-motion-ease-in);
|
|
9510
|
+
}
|
|
9510
9511
|
`;
|
|
9511
9512
|
var SelectedItemIndicator = () => {
|
|
9512
9513
|
const selectedValue = useSegmentedControlValue();
|
|
@@ -9615,9 +9616,8 @@ var segmentedControlItemStyles = import_styled_components63.css`
|
|
|
9615
9616
|
flex-grow: 1;
|
|
9616
9617
|
flex-shrink: 1;
|
|
9617
9618
|
font-size: var(--wui-typography-label-3-size);
|
|
9618
|
-
font-weight: var(--wui-typography-label-3-weight);
|
|
9619
9619
|
justify-content: center;
|
|
9620
|
-
padding: 6px
|
|
9620
|
+
padding: 6px 8px;
|
|
9621
9621
|
user-select: none;
|
|
9622
9622
|
|
|
9623
9623
|
/* Icon component */
|
|
@@ -9654,10 +9654,6 @@ var segmentedControlItemStyles = import_styled_components63.css`
|
|
|
9654
9654
|
|
|
9655
9655
|
&[data-disabled] {
|
|
9656
9656
|
cursor: not-allowed;
|
|
9657
|
-
color: var(--wui-color-text-disabled);
|
|
9658
|
-
svg path {
|
|
9659
|
-
fill: var(--wui-color-icon-disabled);
|
|
9660
|
-
}
|
|
9661
9657
|
|
|
9662
9658
|
&:hover {
|
|
9663
9659
|
background-color: inherit;
|
|
@@ -9725,7 +9721,7 @@ var SegmentedControlItem = (0, import_react47.forwardRef)(
|
|
|
9725
9721
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
9726
9722
|
|
|
9727
9723
|
// src/components/Tabs/Tabs.tsx
|
|
9728
|
-
var
|
|
9724
|
+
var import_react50 = require("react");
|
|
9729
9725
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
9730
9726
|
var import_type_guards39 = require("@wistia/type-guards");
|
|
9731
9727
|
|
|
@@ -9777,67 +9773,24 @@ var TabList = ({
|
|
|
9777
9773
|
TabList.displayName = "TabList";
|
|
9778
9774
|
|
|
9779
9775
|
// src/components/Tabs/TabItem.tsx
|
|
9780
|
-
var
|
|
9776
|
+
var import_react48 = require("react");
|
|
9781
9777
|
var import_styled_components66 = __toESM(require("styled-components"));
|
|
9782
9778
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
9783
9779
|
var import_type_guards38 = require("@wistia/type-guards");
|
|
9784
|
-
|
|
9785
|
-
// src/components/Tabs/useTabsValue.tsx
|
|
9786
|
-
var import_react48 = require("react");
|
|
9787
|
-
var TabsValueContext = (0, import_react48.createContext)(null);
|
|
9788
|
-
var TabsValueProvider = TabsValueContext.Provider;
|
|
9789
|
-
var useTabsValue = () => {
|
|
9790
|
-
const context = (0, import_react48.useContext)(TabsValueContext);
|
|
9791
|
-
if (context === null) {
|
|
9792
|
-
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
9793
|
-
}
|
|
9794
|
-
return context;
|
|
9795
|
-
};
|
|
9796
|
-
|
|
9797
|
-
// src/components/Tabs/TabItem.tsx
|
|
9798
9780
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
9799
9781
|
var StyledTabItem = (0, import_styled_components66.default)(import_react_tabs3.Trigger)`
|
|
9800
9782
|
${segmentedControlItemStyles}
|
|
9801
9783
|
|
|
9802
|
-
|
|
9803
|
-
|
|
9784
|
+
&[data-state='active'] {
|
|
9785
|
+
background-color: white;
|
|
9804
9786
|
}
|
|
9805
9787
|
`;
|
|
9806
|
-
var TabItem = (0,
|
|
9807
|
-
({ disabled = false, icon, label, "aria-label": ariaLabel, value },
|
|
9808
|
-
const selectedValue = useTabsValue();
|
|
9809
|
-
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
9810
|
-
const buttonRef = (0, import_react49.useRef)(null);
|
|
9811
|
-
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
9812
|
-
(0, import_react49.useEffect)(() => {
|
|
9813
|
-
const buttonElem = buttonRef.current;
|
|
9814
|
-
if (!buttonElem) {
|
|
9815
|
-
return void 0;
|
|
9816
|
-
}
|
|
9817
|
-
if (selectedValue !== value) {
|
|
9818
|
-
return void 0;
|
|
9819
|
-
}
|
|
9820
|
-
setSelectedItemMeasurements({
|
|
9821
|
-
offsetLeft: buttonElem.offsetLeft,
|
|
9822
|
-
offsetWidth: buttonElem.offsetWidth,
|
|
9823
|
-
offsetHeight: buttonElem.offsetHeight
|
|
9824
|
-
});
|
|
9825
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
9826
|
-
setSelectedItemMeasurements({
|
|
9827
|
-
offsetLeft: buttonElem.offsetLeft,
|
|
9828
|
-
offsetWidth: buttonElem.offsetWidth,
|
|
9829
|
-
offsetHeight: buttonElem.offsetHeight
|
|
9830
|
-
});
|
|
9831
|
-
});
|
|
9832
|
-
resizeObserver.observe(buttonElem);
|
|
9833
|
-
return () => {
|
|
9834
|
-
resizeObserver.disconnect();
|
|
9835
|
-
};
|
|
9836
|
-
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
9788
|
+
var TabItem = (0, import_react48.forwardRef)(
|
|
9789
|
+
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, ref) => {
|
|
9837
9790
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
|
|
9838
9791
|
StyledTabItem,
|
|
9839
9792
|
{
|
|
9840
|
-
ref
|
|
9793
|
+
ref,
|
|
9841
9794
|
$hasLabel: (0, import_type_guards38.isNotNil)(label),
|
|
9842
9795
|
"aria-label": (0, import_type_guards38.isNotNil)(label) ? void 0 : ariaLabel,
|
|
9843
9796
|
disabled,
|
|
@@ -9853,16 +9806,16 @@ var TabItem = (0, import_react49.forwardRef)(
|
|
|
9853
9806
|
TabItem.displayName = "TabItem";
|
|
9854
9807
|
|
|
9855
9808
|
// src/components/Tabs/extractTabItems.ts
|
|
9856
|
-
var
|
|
9809
|
+
var import_react49 = require("react");
|
|
9857
9810
|
var extractTabItems = (children) => {
|
|
9858
9811
|
const tabItems = [];
|
|
9859
|
-
|
|
9860
|
-
if (!(0,
|
|
9812
|
+
import_react49.Children.forEach(children, (child) => {
|
|
9813
|
+
if (!(0, import_react49.isValidElement)(child)) {
|
|
9861
9814
|
return;
|
|
9862
9815
|
}
|
|
9863
9816
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
9864
9817
|
tabItems.push(child);
|
|
9865
|
-
} else if (child.type ===
|
|
9818
|
+
} else if (child.type === import_react49.Fragment) {
|
|
9866
9819
|
const fragmentElement = child;
|
|
9867
9820
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
9868
9821
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -9874,44 +9827,9 @@ var extractTabItems = (children) => {
|
|
|
9874
9827
|
return tabItems;
|
|
9875
9828
|
};
|
|
9876
9829
|
|
|
9877
|
-
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
9878
|
-
var import_react51 = require("react");
|
|
9879
|
-
var import_styled_components67 = __toESM(require("styled-components"));
|
|
9880
|
-
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9881
|
-
var TabsSelectedItemIndicatorDiv = (0, import_styled_components67.default)(SelectedItemIndicatorDiv)`
|
|
9882
|
-
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
9883
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
9884
|
-
}
|
|
9885
|
-
`;
|
|
9886
|
-
var SelectedItemIndicator2 = () => {
|
|
9887
|
-
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
9888
|
-
const selectedValue = useTabsValue();
|
|
9889
|
-
const selectedItemIndicatorStyle = (0, import_react51.useMemo)(
|
|
9890
|
-
() => selectedItemMeasurements != null ? {
|
|
9891
|
-
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
9892
|
-
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
9893
|
-
width: `${selectedItemMeasurements.offsetWidth}px`
|
|
9894
|
-
} : {},
|
|
9895
|
-
[selectedItemMeasurements]
|
|
9896
|
-
);
|
|
9897
|
-
if (selectedValue == null) {
|
|
9898
|
-
return null;
|
|
9899
|
-
}
|
|
9900
|
-
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9901
|
-
TabsSelectedItemIndicatorDiv,
|
|
9902
|
-
{
|
|
9903
|
-
style: {
|
|
9904
|
-
width: selectedItemIndicatorStyle.width,
|
|
9905
|
-
transform: selectedItemIndicatorStyle.transform,
|
|
9906
|
-
height: selectedItemIndicatorStyle.height
|
|
9907
|
-
}
|
|
9908
|
-
}
|
|
9909
|
-
);
|
|
9910
|
-
};
|
|
9911
|
-
|
|
9912
9830
|
// src/components/Tabs/Tabs.tsx
|
|
9913
|
-
var
|
|
9914
|
-
var Tabs = (0,
|
|
9831
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9832
|
+
var Tabs = (0, import_react50.forwardRef)(
|
|
9915
9833
|
({
|
|
9916
9834
|
children,
|
|
9917
9835
|
fullWidth = true,
|
|
@@ -9922,89 +9840,76 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
9922
9840
|
...otherProps
|
|
9923
9841
|
}, ref) => {
|
|
9924
9842
|
const tabItems = extractTabItems(children);
|
|
9925
|
-
const
|
|
9926
|
-
|
|
9927
|
-
defaultValue: defaultSelectedValue,
|
|
9928
|
-
onValueChange: setInternalSelectedValue
|
|
9929
|
-
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
9930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
9843
|
+
const modeProps = defaultSelectedValue !== void 0 ? { defaultValue: defaultSelectedValue } : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
9844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
9931
9845
|
import_react_tabs4.Root,
|
|
9932
9846
|
{
|
|
9933
9847
|
ref,
|
|
9934
9848
|
activationMode: "automatic",
|
|
9935
9849
|
...otherProps,
|
|
9936
9850
|
...modeProps,
|
|
9937
|
-
children:
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
{
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
disabled,
|
|
9962
|
-
label,
|
|
9963
|
-
value
|
|
9964
|
-
},
|
|
9965
|
-
value
|
|
9966
|
-
);
|
|
9967
|
-
}
|
|
9968
|
-
if ((0, import_type_guards39.isNotNil)(label)) {
|
|
9969
|
-
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
9970
|
-
TabItem,
|
|
9971
|
-
{
|
|
9972
|
-
disabled,
|
|
9973
|
-
icon,
|
|
9974
|
-
label,
|
|
9975
|
-
value
|
|
9976
|
-
},
|
|
9977
|
-
value
|
|
9978
|
-
);
|
|
9979
|
-
}
|
|
9980
|
-
if ((0, import_type_guards39.isNotNil)(ariaLabelForTab)) {
|
|
9981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
9982
|
-
TabItem,
|
|
9983
|
-
{
|
|
9984
|
-
"aria-label": ariaLabelForTab,
|
|
9985
|
-
disabled,
|
|
9986
|
-
icon,
|
|
9987
|
-
value
|
|
9988
|
-
},
|
|
9989
|
-
value
|
|
9990
|
-
);
|
|
9991
|
-
}
|
|
9992
|
-
throw new Error("A `Tab` with an icon must have either label or aria-label");
|
|
9993
|
-
})
|
|
9994
|
-
]
|
|
9851
|
+
children: [
|
|
9852
|
+
/* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9853
|
+
TabList,
|
|
9854
|
+
{
|
|
9855
|
+
ariaLabel,
|
|
9856
|
+
fullWidth,
|
|
9857
|
+
children: tabItems.map((tab) => {
|
|
9858
|
+
const {
|
|
9859
|
+
value,
|
|
9860
|
+
disabled = false,
|
|
9861
|
+
icon,
|
|
9862
|
+
label,
|
|
9863
|
+
"aria-label": ariaLabelForTab
|
|
9864
|
+
} = tab.props;
|
|
9865
|
+
if ((0, import_type_guards39.isNil)(icon)) {
|
|
9866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9867
|
+
TabItem,
|
|
9868
|
+
{
|
|
9869
|
+
disabled,
|
|
9870
|
+
label,
|
|
9871
|
+
value
|
|
9872
|
+
},
|
|
9873
|
+
value
|
|
9874
|
+
);
|
|
9995
9875
|
}
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
9876
|
+
if ((0, import_type_guards39.isNotNil)(label)) {
|
|
9877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9878
|
+
TabItem,
|
|
9879
|
+
{
|
|
9880
|
+
disabled,
|
|
9881
|
+
icon,
|
|
9882
|
+
label,
|
|
9883
|
+
value
|
|
9884
|
+
},
|
|
9885
|
+
value
|
|
9886
|
+
);
|
|
9887
|
+
}
|
|
9888
|
+
if ((0, import_type_guards39.isNotNil)(ariaLabelForTab)) {
|
|
9889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9890
|
+
TabItem,
|
|
9891
|
+
{
|
|
9892
|
+
"aria-label": ariaLabelForTab,
|
|
9893
|
+
disabled,
|
|
9894
|
+
icon,
|
|
9895
|
+
value
|
|
9896
|
+
},
|
|
9897
|
+
value
|
|
9898
|
+
);
|
|
9899
|
+
}
|
|
9900
|
+
throw new Error("A `Tab` with an icon must have either label or aria-label");
|
|
9901
|
+
})
|
|
9902
|
+
}
|
|
9903
|
+
),
|
|
9904
|
+
tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9905
|
+
TabPanel,
|
|
9906
|
+
{
|
|
9907
|
+
value: tab.props.value,
|
|
9908
|
+
children: tab.props.children
|
|
9909
|
+
},
|
|
9910
|
+
tab.props.value
|
|
9911
|
+
))
|
|
9912
|
+
]
|
|
10008
9913
|
}
|
|
10009
9914
|
);
|
|
10010
9915
|
}
|
|
@@ -10012,19 +9917,19 @@ var Tabs = (0, import_react52.forwardRef)(
|
|
|
10012
9917
|
Tabs.displayName = "Tabs";
|
|
10013
9918
|
|
|
10014
9919
|
// src/components/Tabs/Tab.tsx
|
|
10015
|
-
var
|
|
10016
|
-
var
|
|
10017
|
-
var Tab = (0,
|
|
10018
|
-
return /* @__PURE__ */ (0,
|
|
9920
|
+
var import_react51 = require("react");
|
|
9921
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
9922
|
+
var Tab = (0, import_react51.forwardRef)(({ children }, ref) => {
|
|
9923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", { ref, children });
|
|
10019
9924
|
});
|
|
10020
9925
|
Tab.displayName = "Tab";
|
|
10021
9926
|
|
|
10022
9927
|
// src/components/Tag/Tag.tsx
|
|
10023
|
-
var
|
|
10024
|
-
var
|
|
9928
|
+
var import_react52 = require("react");
|
|
9929
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10025
9930
|
var import_type_guards40 = require("@wistia/type-guards");
|
|
10026
|
-
var
|
|
10027
|
-
var TagLabel =
|
|
9931
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9932
|
+
var TagLabel = import_styled_components67.default.a`
|
|
10028
9933
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10029
9934
|
font-size: var(--wui-typography-label-4-size);
|
|
10030
9935
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -10052,14 +9957,14 @@ var TagLabel = import_styled_components68.default.a`
|
|
|
10052
9957
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10053
9958
|
}
|
|
10054
9959
|
`;
|
|
10055
|
-
var TagDivider =
|
|
9960
|
+
var TagDivider = import_styled_components67.default.div`
|
|
10056
9961
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10057
9962
|
border-left: 1px solid var(--wui-color-border);
|
|
10058
9963
|
display: flex;
|
|
10059
9964
|
height: 14px;
|
|
10060
9965
|
width: 1px;
|
|
10061
9966
|
`;
|
|
10062
|
-
var StyledRemoveButton =
|
|
9967
|
+
var StyledRemoveButton = import_styled_components67.default.button`
|
|
10063
9968
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10064
9969
|
all: unset;
|
|
10065
9970
|
cursor: pointer;
|
|
@@ -10087,7 +9992,7 @@ var StyledRemoveButton = import_styled_components68.default.button`
|
|
|
10087
9992
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
10088
9993
|
}
|
|
10089
9994
|
`;
|
|
10090
|
-
var StyledTag =
|
|
9995
|
+
var StyledTag = import_styled_components67.default.div`
|
|
10091
9996
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10092
9997
|
align-items: center;
|
|
10093
9998
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10108,39 +10013,39 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
10108
10013
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
10109
10014
|
);
|
|
10110
10015
|
}
|
|
10111
|
-
return /* @__PURE__ */ (0,
|
|
10112
|
-
/* @__PURE__ */ (0,
|
|
10113
|
-
/* @__PURE__ */ (0,
|
|
10016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
|
|
10017
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
10018
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
|
|
10114
10019
|
StyledRemoveButton,
|
|
10115
10020
|
{
|
|
10116
10021
|
$colorScheme: colorScheme,
|
|
10117
10022
|
onClick: onClickRemove,
|
|
10118
10023
|
type: "button",
|
|
10119
10024
|
children: [
|
|
10120
|
-
/* @__PURE__ */ (0,
|
|
10025
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
10121
10026
|
Icon,
|
|
10122
10027
|
{
|
|
10123
10028
|
size: "sm",
|
|
10124
10029
|
type: "close"
|
|
10125
10030
|
}
|
|
10126
10031
|
),
|
|
10127
|
-
/* @__PURE__ */ (0,
|
|
10032
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
10128
10033
|
]
|
|
10129
10034
|
}
|
|
10130
10035
|
)
|
|
10131
10036
|
] });
|
|
10132
10037
|
};
|
|
10133
|
-
var Tag = (0,
|
|
10038
|
+
var Tag = (0, import_react52.forwardRef)(
|
|
10134
10039
|
({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
|
|
10135
10040
|
const labelProps = (0, import_type_guards40.isNotNil)(href) && (0, import_type_guards40.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
10136
|
-
return /* @__PURE__ */ (0,
|
|
10041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
|
|
10137
10042
|
StyledTag,
|
|
10138
10043
|
{
|
|
10139
10044
|
ref,
|
|
10140
10045
|
$colorScheme: colorScheme,
|
|
10141
10046
|
...otherProps,
|
|
10142
10047
|
children: [
|
|
10143
|
-
/* @__PURE__ */ (0,
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
10144
10049
|
TagLabel,
|
|
10145
10050
|
{
|
|
10146
10051
|
...labelProps,
|
|
@@ -10148,7 +10053,7 @@ var Tag = (0, import_react54.forwardRef)(
|
|
|
10148
10053
|
children: label
|
|
10149
10054
|
}
|
|
10150
10055
|
),
|
|
10151
|
-
/* @__PURE__ */ (0,
|
|
10056
|
+
/* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
10152
10057
|
RemoveButton,
|
|
10153
10058
|
{
|
|
10154
10059
|
colorScheme,
|
|
@@ -10164,26 +10069,26 @@ var Tag = (0, import_react54.forwardRef)(
|
|
|
10164
10069
|
Tag.displayName = "Tag";
|
|
10165
10070
|
|
|
10166
10071
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
10167
|
-
var
|
|
10072
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10168
10073
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
10169
|
-
var
|
|
10074
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
10170
10075
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
10171
10076
|
if (iconOnly) {
|
|
10172
|
-
return /* @__PURE__ */ (0,
|
|
10077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
10173
10078
|
"g",
|
|
10174
10079
|
{
|
|
10175
10080
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10176
10081
|
fill: brandmarkColor,
|
|
10177
|
-
children: /* @__PURE__ */ (0,
|
|
10082
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
10178
10083
|
}
|
|
10179
10084
|
);
|
|
10180
10085
|
}
|
|
10181
|
-
return /* @__PURE__ */ (0,
|
|
10086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
10182
10087
|
"g",
|
|
10183
10088
|
{
|
|
10184
10089
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
10185
10090
|
fill: brandmarkColor,
|
|
10186
|
-
children: /* @__PURE__ */ (0,
|
|
10091
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
10187
10092
|
}
|
|
10188
10093
|
);
|
|
10189
10094
|
};
|
|
@@ -10191,12 +10096,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
10191
10096
|
if (iconOnly) {
|
|
10192
10097
|
return null;
|
|
10193
10098
|
}
|
|
10194
|
-
return /* @__PURE__ */ (0,
|
|
10099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
10195
10100
|
"g",
|
|
10196
10101
|
{
|
|
10197
10102
|
"data-testid": "ui-wistia-logo-logotype",
|
|
10198
10103
|
fill: logotypeColor,
|
|
10199
|
-
children: /* @__PURE__ */ (0,
|
|
10104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
10200
10105
|
}
|
|
10201
10106
|
);
|
|
10202
10107
|
};
|
|
@@ -10206,7 +10111,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
10206
10111
|
}
|
|
10207
10112
|
return "0 0 144 31.47";
|
|
10208
10113
|
};
|
|
10209
|
-
var WistiaLogoComponent =
|
|
10114
|
+
var WistiaLogoComponent = import_styled_components68.default.svg`
|
|
10210
10115
|
height: ${({ height }) => `${height}px`};
|
|
10211
10116
|
|
|
10212
10117
|
/* ensure it will always fit on mobile */
|
|
@@ -10248,7 +10153,7 @@ var WistiaLogo = ({
|
|
|
10248
10153
|
};
|
|
10249
10154
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
10250
10155
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
10251
|
-
const Logo = /* @__PURE__ */ (0,
|
|
10156
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
10252
10157
|
WistiaLogoComponent,
|
|
10253
10158
|
{
|
|
10254
10159
|
$hoverColor: hoverColor,
|
|
@@ -10258,23 +10163,23 @@ var WistiaLogo = ({
|
|
|
10258
10163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10259
10164
|
...otherProps,
|
|
10260
10165
|
children: [
|
|
10261
|
-
/* @__PURE__ */ (0,
|
|
10262
|
-
(0, import_type_guards41.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
10166
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("title", { children: title }),
|
|
10167
|
+
(0, import_type_guards41.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("desc", { children: description }) : null,
|
|
10263
10168
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
10264
10169
|
renderLogotype(logotypeColor, iconOnly)
|
|
10265
10170
|
]
|
|
10266
10171
|
}
|
|
10267
10172
|
);
|
|
10268
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
10173
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("a", { href, children: Logo }) : Logo;
|
|
10269
10174
|
};
|
|
10270
10175
|
WistiaLogo.displayName = "WistiaLogo";
|
|
10271
10176
|
|
|
10272
10177
|
// src/components/Select/Select.tsx
|
|
10273
10178
|
var import_react_select = require("@radix-ui/react-select");
|
|
10274
|
-
var
|
|
10275
|
-
var
|
|
10276
|
-
var
|
|
10277
|
-
var StyledTrigger = (0,
|
|
10179
|
+
var import_react53 = require("react");
|
|
10180
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
10181
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
10182
|
+
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
10278
10183
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10279
10184
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10280
10185
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -10315,7 +10220,7 @@ var StyledTrigger = (0, import_styled_components70.default)(import_react_select.
|
|
|
10315
10220
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
10316
10221
|
}
|
|
10317
10222
|
`;
|
|
10318
|
-
var StyledContent2 = (0,
|
|
10223
|
+
var StyledContent2 = (0, import_styled_components69.default)(import_react_select.Content)`
|
|
10319
10224
|
--wui-select-content-border: var(--wui-color-border);
|
|
10320
10225
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10321
10226
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -10331,7 +10236,7 @@ var StyledContent2 = (0, import_styled_components70.default)(import_react_select
|
|
|
10331
10236
|
padding: var(--wui-select-option-padding);
|
|
10332
10237
|
min-width: 200px;
|
|
10333
10238
|
`;
|
|
10334
|
-
var Select = (0,
|
|
10239
|
+
var Select = (0, import_react53.forwardRef)(
|
|
10335
10240
|
({
|
|
10336
10241
|
colorScheme = "inherit",
|
|
10337
10242
|
children,
|
|
@@ -10341,13 +10246,13 @@ var Select = (0, import_react55.forwardRef)(
|
|
|
10341
10246
|
...props
|
|
10342
10247
|
}, forwardedRef) => {
|
|
10343
10248
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10344
|
-
return /* @__PURE__ */ (0,
|
|
10249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(
|
|
10345
10250
|
import_react_select.Root,
|
|
10346
10251
|
{
|
|
10347
10252
|
...props,
|
|
10348
10253
|
onValueChange: onChange,
|
|
10349
10254
|
children: [
|
|
10350
|
-
/* @__PURE__ */ (0,
|
|
10255
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(
|
|
10351
10256
|
StyledTrigger,
|
|
10352
10257
|
{
|
|
10353
10258
|
ref: forwardedRef,
|
|
@@ -10355,8 +10260,8 @@ var Select = (0, import_react55.forwardRef)(
|
|
|
10355
10260
|
$fullWidth: responsiveFullWidth,
|
|
10356
10261
|
...props,
|
|
10357
10262
|
children: [
|
|
10358
|
-
/* @__PURE__ */ (0,
|
|
10359
|
-
/* @__PURE__ */ (0,
|
|
10263
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_react_select.Value, { placeholder }),
|
|
10264
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
10360
10265
|
Icon,
|
|
10361
10266
|
{
|
|
10362
10267
|
size: "md",
|
|
@@ -10366,10 +10271,10 @@ var Select = (0, import_react55.forwardRef)(
|
|
|
10366
10271
|
]
|
|
10367
10272
|
}
|
|
10368
10273
|
),
|
|
10369
|
-
/* @__PURE__ */ (0,
|
|
10370
|
-
/* @__PURE__ */ (0,
|
|
10371
|
-
/* @__PURE__ */ (0,
|
|
10372
|
-
/* @__PURE__ */ (0,
|
|
10274
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(StyledContent2, { position: "popper", children: [
|
|
10275
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Icon, { type: "caret-up" }) }),
|
|
10276
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_react_select.Viewport, { children }),
|
|
10277
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Icon, { type: "caret-down" }) })
|
|
10373
10278
|
] }) })
|
|
10374
10279
|
]
|
|
10375
10280
|
}
|
|
@@ -10380,10 +10285,10 @@ Select.displayName = "Select";
|
|
|
10380
10285
|
|
|
10381
10286
|
// src/components/Select/SelectOption.tsx
|
|
10382
10287
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
10383
|
-
var
|
|
10384
|
-
var
|
|
10385
|
-
var
|
|
10386
|
-
var StyledItem = (0,
|
|
10288
|
+
var import_react54 = require("react");
|
|
10289
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
10290
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
10291
|
+
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
10387
10292
|
${variantStyleMap2.body3};
|
|
10388
10293
|
display: flex;
|
|
10389
10294
|
padding: var(--wui-select-option-padding);
|
|
@@ -10406,25 +10311,25 @@ var StyledItem = (0, import_styled_components71.default)(import_react_select2.It
|
|
|
10406
10311
|
background-color: transparent;
|
|
10407
10312
|
}
|
|
10408
10313
|
`;
|
|
10409
|
-
var StyledIconContainer =
|
|
10314
|
+
var StyledIconContainer = import_styled_components70.default.span`
|
|
10410
10315
|
width: 12px;
|
|
10411
10316
|
`;
|
|
10412
|
-
var SelectOption = (0,
|
|
10317
|
+
var SelectOption = (0, import_react54.forwardRef)(
|
|
10413
10318
|
({ children, ...props }, forwardedRef) => {
|
|
10414
|
-
return /* @__PURE__ */ (0,
|
|
10319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsxs)(
|
|
10415
10320
|
StyledItem,
|
|
10416
10321
|
{
|
|
10417
10322
|
...props,
|
|
10418
10323
|
ref: forwardedRef,
|
|
10419
10324
|
children: [
|
|
10420
|
-
/* @__PURE__ */ (0,
|
|
10325
|
+
/* @__PURE__ */ (0, import_jsx_runtime223.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
10421
10326
|
Icon,
|
|
10422
10327
|
{
|
|
10423
10328
|
size: "sm",
|
|
10424
10329
|
type: "checkmark"
|
|
10425
10330
|
}
|
|
10426
10331
|
) }) }),
|
|
10427
|
-
/* @__PURE__ */ (0,
|
|
10332
|
+
/* @__PURE__ */ (0, import_jsx_runtime223.jsx)(import_react_select2.ItemText, { children })
|
|
10428
10333
|
]
|
|
10429
10334
|
}
|
|
10430
10335
|
);
|
|
@@ -10434,14 +10339,14 @@ SelectOption.displayName = "Option";
|
|
|
10434
10339
|
|
|
10435
10340
|
// src/components/Select/SelectOptionGroup.tsx
|
|
10436
10341
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
10437
|
-
var
|
|
10438
|
-
var
|
|
10439
|
-
var StyledLabel4 = (0,
|
|
10342
|
+
var import_styled_components71 = __toESM(require("styled-components"));
|
|
10343
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
10344
|
+
var StyledLabel4 = (0, import_styled_components71.default)(import_react_select3.Label)`
|
|
10440
10345
|
padding: var(--wui-select-option-padding);
|
|
10441
10346
|
`;
|
|
10442
10347
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10443
|
-
return /* @__PURE__ */ (0,
|
|
10444
|
-
/* @__PURE__ */ (0,
|
|
10348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
10349
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
10445
10350
|
Text,
|
|
10446
10351
|
{
|
|
10447
10352
|
prominence: "secondary",
|