@wistia/ui 0.9.2 → 0.9.3-beta.2248d8ec.76736a6
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 +443 -460
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +26 -69
- package/dist/index.d.ts +26 -69
- package/dist/index.mjs +362 -381
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.9.
|
|
3
|
+
* @license @wistia/ui v0.9.3-beta.2248d8ec.76736a6
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7242,6 +7242,8 @@ var StyledActionButton = styled6(Button)`
|
|
|
7242
7242
|
|
|
7243
7243
|
&:hover,
|
|
7244
7244
|
:focus-visible {
|
|
7245
|
+
--wui-color-text: var(--wui-color-text-button);
|
|
7246
|
+
|
|
7245
7247
|
${({ $hoverColorScheme }) => getColorScheme($hoverColorScheme)};
|
|
7246
7248
|
background: var(--wui-color-bg-surface-tertiary);
|
|
7247
7249
|
}
|
|
@@ -7284,7 +7286,7 @@ var StyledSecondaryIcon = styled6.div`
|
|
|
7284
7286
|
width: 100%;
|
|
7285
7287
|
display: flex;
|
|
7286
7288
|
justify-content: flex-end;
|
|
7287
|
-
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-
|
|
7289
|
+
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-out);
|
|
7288
7290
|
|
|
7289
7291
|
${({ $hideUntilHover }) => $hideUntilHover && css17`
|
|
7290
7292
|
will-change: transform;
|
|
@@ -8454,8 +8456,9 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
8454
8456
|
};
|
|
8455
8457
|
|
|
8456
8458
|
// src/components/DataCards/DataCard.tsx
|
|
8459
|
+
import { useRef as useRef6 } from "react";
|
|
8457
8460
|
import styled24, { keyframes } from "styled-components";
|
|
8458
|
-
import { isNotNull } from "@wistia/type-guards";
|
|
8461
|
+
import { isNotNil as isNotNil15, isNotNull } from "@wistia/type-guards";
|
|
8459
8462
|
|
|
8460
8463
|
// src/components/Heading/Heading.tsx
|
|
8461
8464
|
import { forwardRef as forwardRef8 } from "react";
|
|
@@ -8587,7 +8590,6 @@ var Heading = makePolymorphic(HeadingComponent);
|
|
|
8587
8590
|
// src/components/DataCards/DataCard.tsx
|
|
8588
8591
|
import { jsx as jsx213, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
8589
8592
|
var StyledDataCard = styled24.div`
|
|
8590
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
8591
8593
|
display: grid;
|
|
8592
8594
|
grid-template-areas: 'label slot' 'value value';
|
|
8593
8595
|
grid-template-rows: auto auto;
|
|
@@ -8598,6 +8600,49 @@ var StyledDataCard = styled24.div`
|
|
|
8598
8600
|
flex: 1;
|
|
8599
8601
|
border-radius: var(--wui-border-radius-02);
|
|
8600
8602
|
position: relative;
|
|
8603
|
+
transition: background var(--wui-motion-duration-01) var(--wui-motion-ease);
|
|
8604
|
+
|
|
8605
|
+
&[data-click-region] {
|
|
8606
|
+
[data-wui-data-card-hover-icon] {
|
|
8607
|
+
opacity: 0;
|
|
8608
|
+
transform: translateX(-16px);
|
|
8609
|
+
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease-out);
|
|
8610
|
+
}
|
|
8611
|
+
|
|
8612
|
+
&:not([disabled]) {
|
|
8613
|
+
cursor: pointer;
|
|
8614
|
+
|
|
8615
|
+
&:hover,
|
|
8616
|
+
&:has([data-click-region-target-button]:focus-visible),
|
|
8617
|
+
&:has([data-click-region-target-link]:focus-visible) {
|
|
8618
|
+
--wui-color-text: var(--wui-color-text-button);
|
|
8619
|
+
|
|
8620
|
+
background: var(--wui-color-bg-surface-secondary-hover);
|
|
8621
|
+
|
|
8622
|
+
[data-wui-data-card-hover-icon] {
|
|
8623
|
+
opacity: 1;
|
|
8624
|
+
transform: translateX(0);
|
|
8625
|
+
}
|
|
8626
|
+
}
|
|
8627
|
+
|
|
8628
|
+
&:has([data-click-region-target-button]:active),
|
|
8629
|
+
&:has([data-click-region-target-link]:active) {
|
|
8630
|
+
background: var(--wui-color-bg-surface-secondary-active);
|
|
8631
|
+
}
|
|
8632
|
+
|
|
8633
|
+
&:has([data-click-region-target-button]:focus-visible),
|
|
8634
|
+
&:has([data-click-region-target-link]:focus-visible) {
|
|
8635
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
8636
|
+
outline-offset: 2px;
|
|
8637
|
+
}
|
|
8638
|
+
}
|
|
8639
|
+
|
|
8640
|
+
&[disabled] {
|
|
8641
|
+
pointer-events: none;
|
|
8642
|
+
}
|
|
8643
|
+
|
|
8644
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
8645
|
+
}
|
|
8601
8646
|
`;
|
|
8602
8647
|
var shimmer = keyframes`
|
|
8603
8648
|
0% {
|
|
@@ -8643,7 +8688,7 @@ var StyledDataCardTrendContainer = styled24.div`
|
|
|
8643
8688
|
bottom: var(--wui-space-01);
|
|
8644
8689
|
right: var(--wui-space-01);
|
|
8645
8690
|
`;
|
|
8646
|
-
var
|
|
8691
|
+
var DataCardInner = ({
|
|
8647
8692
|
label,
|
|
8648
8693
|
value,
|
|
8649
8694
|
upperRightSlot,
|
|
@@ -8678,6 +8723,38 @@ var DataCard = ({
|
|
|
8678
8723
|
]
|
|
8679
8724
|
}
|
|
8680
8725
|
);
|
|
8726
|
+
var DataCardArrowIcon = /* @__PURE__ */ jsx213(
|
|
8727
|
+
Icon,
|
|
8728
|
+
{
|
|
8729
|
+
"data-wui-data-card-hover-icon": true,
|
|
8730
|
+
type: "arrow-right"
|
|
8731
|
+
}
|
|
8732
|
+
);
|
|
8733
|
+
var DataCard = (props) => {
|
|
8734
|
+
const ref = useRef6(null);
|
|
8735
|
+
if (isNotNil15(props.href) || isNotNil15(props.onClick)) {
|
|
8736
|
+
return /* @__PURE__ */ jsx213(ClickRegion, { targetRef: ref, children: /* @__PURE__ */ jsx213(
|
|
8737
|
+
DataCardInner,
|
|
8738
|
+
{
|
|
8739
|
+
upperRightSlot: props.upperRightSlot ?? DataCardArrowIcon,
|
|
8740
|
+
...props,
|
|
8741
|
+
label: /* @__PURE__ */ jsx213(
|
|
8742
|
+
Button,
|
|
8743
|
+
{
|
|
8744
|
+
ref,
|
|
8745
|
+
...isNotNil15(props.beforeAction) ? { beforeAction: props.beforeAction } : {},
|
|
8746
|
+
disabled: props.disabled ?? false,
|
|
8747
|
+
href: props.href,
|
|
8748
|
+
onClick: props.onClick,
|
|
8749
|
+
unstyled: true,
|
|
8750
|
+
children: props.label
|
|
8751
|
+
}
|
|
8752
|
+
)
|
|
8753
|
+
}
|
|
8754
|
+
) });
|
|
8755
|
+
}
|
|
8756
|
+
return /* @__PURE__ */ jsx213(DataCardInner, { ...props });
|
|
8757
|
+
};
|
|
8681
8758
|
DataCard.displayName = "DataCard";
|
|
8682
8759
|
|
|
8683
8760
|
// src/components/DataCards/DataCards.tsx
|
|
@@ -8720,7 +8797,7 @@ import styled27 from "styled-components";
|
|
|
8720
8797
|
// src/components/Text/Text.tsx
|
|
8721
8798
|
import { forwardRef as forwardRef9 } from "react";
|
|
8722
8799
|
import styled26, { css as css23 } from "styled-components";
|
|
8723
|
-
import { isNotNil as
|
|
8800
|
+
import { isNotNil as isNotNil16 } from "@wistia/type-guards";
|
|
8724
8801
|
import { jsx as jsx215 } from "react/jsx-runtime";
|
|
8725
8802
|
var bodyBoldStyles = css23`
|
|
8726
8803
|
> strong,
|
|
@@ -8865,7 +8942,7 @@ var StyledText = styled26.div`
|
|
|
8865
8942
|
margin: 0;
|
|
8866
8943
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8867
8944
|
${({ $truncate }) => {
|
|
8868
|
-
if (
|
|
8945
|
+
if (isNotNil16($truncate)) {
|
|
8869
8946
|
return css23`
|
|
8870
8947
|
${ellipsisStyle};
|
|
8871
8948
|
${lineClampCss($truncate)};
|
|
@@ -9006,7 +9083,7 @@ Divider.displayName = "Divider";
|
|
|
9006
9083
|
|
|
9007
9084
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
9008
9085
|
import styled31, { css as css27 } from "styled-components";
|
|
9009
|
-
import { useState as useState9, useRef as
|
|
9086
|
+
import { useState as useState9, useRef as useRef8 } from "react";
|
|
9010
9087
|
|
|
9011
9088
|
// src/components/Tooltip/Tooltip.tsx
|
|
9012
9089
|
import {
|
|
@@ -9164,9 +9241,9 @@ var Tooltip = ({
|
|
|
9164
9241
|
Tooltip.displayName = "Tooltip";
|
|
9165
9242
|
|
|
9166
9243
|
// src/components/Input/Input.tsx
|
|
9167
|
-
import { forwardRef as forwardRef10, cloneElement as cloneElement3, useRef as
|
|
9244
|
+
import { forwardRef as forwardRef10, cloneElement as cloneElement3, useRef as useRef7 } from "react";
|
|
9168
9245
|
import styled30, { css as css26 } from "styled-components";
|
|
9169
|
-
import { isNil as isNil12, isNotNil as
|
|
9246
|
+
import { isNil as isNil12, isNotNil as isNotNil17, isRecord as isRecord4 } from "@wistia/type-guards";
|
|
9170
9247
|
|
|
9171
9248
|
// src/css/sharedStyles/inputCssVariables.ts
|
|
9172
9249
|
import { css as css25 } from "styled-components";
|
|
@@ -9309,30 +9386,30 @@ var Input = forwardRef10(
|
|
|
9309
9386
|
rightIcon,
|
|
9310
9387
|
...props
|
|
9311
9388
|
}, externalRef) => {
|
|
9312
|
-
const internalRef =
|
|
9389
|
+
const internalRef = useRef7();
|
|
9313
9390
|
const ref = (
|
|
9314
9391
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
9315
|
-
|
|
9392
|
+
isNotNil17(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
9316
9393
|
);
|
|
9317
9394
|
let leftIconToDisplay = leftIcon;
|
|
9318
9395
|
if (isNil12(leftIcon) && type === "search") {
|
|
9319
9396
|
leftIconToDisplay = /* @__PURE__ */ jsx219(Icon, { type: "search" });
|
|
9320
9397
|
}
|
|
9321
|
-
if (
|
|
9398
|
+
if (isNotNil17(leftIconToDisplay)) {
|
|
9322
9399
|
leftIconToDisplay = cloneElement3(leftIconToDisplay, {
|
|
9323
9400
|
size: "md",
|
|
9324
9401
|
className: "wui-input-left-icon"
|
|
9325
9402
|
});
|
|
9326
9403
|
}
|
|
9327
9404
|
let rightIconToDisplay = rightIcon;
|
|
9328
|
-
if (
|
|
9405
|
+
if (isNotNil17(rightIconToDisplay)) {
|
|
9329
9406
|
rightIconToDisplay = cloneElement3(rightIconToDisplay, {
|
|
9330
9407
|
size: "md",
|
|
9331
9408
|
className: "wui-input-right-icon"
|
|
9332
9409
|
});
|
|
9333
9410
|
}
|
|
9334
9411
|
const handleFocus2 = (event) => {
|
|
9335
|
-
if (
|
|
9412
|
+
if (isNotNil17(props.onFocus)) {
|
|
9336
9413
|
props.onFocus(event);
|
|
9337
9414
|
}
|
|
9338
9415
|
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
@@ -9422,7 +9499,7 @@ var EditableHeading = ({
|
|
|
9422
9499
|
const [value, setValue] = useState9(children);
|
|
9423
9500
|
const [previousValue, setPreviousValue] = useState9(children);
|
|
9424
9501
|
const [headingHeight, setHeadingHeight] = useState9("60");
|
|
9425
|
-
const headingRef =
|
|
9502
|
+
const headingRef = useRef8(null);
|
|
9426
9503
|
const handleSetEditing = (editing) => {
|
|
9427
9504
|
if (editingDisabled) return;
|
|
9428
9505
|
if (editing && headingRef.current) {
|
|
@@ -9501,7 +9578,7 @@ var EditableHeading = ({
|
|
|
9501
9578
|
};
|
|
9502
9579
|
|
|
9503
9580
|
// src/components/Form/Form.tsx
|
|
9504
|
-
import { forwardRef as forwardRef12, useRef as
|
|
9581
|
+
import { forwardRef as forwardRef12, useRef as useRef9, useMemo as useMemo4, createContext as createContext3, useState as useState10, useId as useId2 } from "react";
|
|
9505
9582
|
import styled33 from "styled-components";
|
|
9506
9583
|
import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined3 } from "@wistia/type-guards";
|
|
9507
9584
|
|
|
@@ -9563,7 +9640,7 @@ var FormComponent = ({
|
|
|
9563
9640
|
}, forwardedRef) => {
|
|
9564
9641
|
const [errors, setErrors] = useState10({});
|
|
9565
9642
|
const [hasSubmitted, setHasSubmitted] = useState10(false);
|
|
9566
|
-
const innerRef =
|
|
9643
|
+
const innerRef = useRef9();
|
|
9567
9644
|
const ref = forwardedRef ?? innerRef;
|
|
9568
9645
|
const autoId = useId2();
|
|
9569
9646
|
const id = props.id ?? autoId;
|
|
@@ -9675,14 +9752,14 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9675
9752
|
};
|
|
9676
9753
|
|
|
9677
9754
|
// src/components/Form/FormErrorSummary.tsx
|
|
9678
|
-
import { useContext as useContext3, useRef as
|
|
9755
|
+
import { useContext as useContext3, useRef as useRef10 } from "react";
|
|
9679
9756
|
import { isArray, isNotUndefined as isNotUndefined8 } from "@wistia/type-guards";
|
|
9680
9757
|
import { jsx as jsx223, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
9681
9758
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9682
9759
|
return /* @__PURE__ */ jsx223("li", { children: /* @__PURE__ */ jsx223(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9683
9760
|
};
|
|
9684
9761
|
var FormErrorSummary = ({ description }) => {
|
|
9685
|
-
const ref =
|
|
9762
|
+
const ref = useRef10(null);
|
|
9686
9763
|
const { formId, errors, hasSubmitted } = useContext3(FormContext);
|
|
9687
9764
|
const isValid = Object.keys(errors).length === 0;
|
|
9688
9765
|
if (isValid || !hasSubmitted) {
|
|
@@ -9715,7 +9792,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9715
9792
|
// src/components/FormField/FormField.tsx
|
|
9716
9793
|
import { Children as Children4, cloneElement as cloneElement4, useContext as useContext4 } from "react";
|
|
9717
9794
|
import styled36 from "styled-components";
|
|
9718
|
-
import { isArray as isArray2, isNotNil as
|
|
9795
|
+
import { isArray as isArray2, isNotNil as isNotNil18, isNotUndefined as isNotUndefined9, isUndefined as isUndefined4 } from "@wistia/type-guards";
|
|
9719
9796
|
|
|
9720
9797
|
// src/components/Label/Label.tsx
|
|
9721
9798
|
import styled34, { css as css28 } from "styled-components";
|
|
@@ -9782,7 +9859,7 @@ import { createContext as createContext4, useMemo as useMemo5 } from "react";
|
|
|
9782
9859
|
|
|
9783
9860
|
// src/components/FormGroup/FormGroup.tsx
|
|
9784
9861
|
import styled35 from "styled-components";
|
|
9785
|
-
import { useRef as
|
|
9862
|
+
import { useRef as useRef11 } from "react";
|
|
9786
9863
|
import { jsx as jsx225, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9787
9864
|
var StyledFieldset = styled35.fieldset`
|
|
9788
9865
|
border: 0;
|
|
@@ -9791,7 +9868,7 @@ var StyledLegend = styled35.legend`
|
|
|
9791
9868
|
margin-bottom: var(--space-01);
|
|
9792
9869
|
`;
|
|
9793
9870
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9794
|
-
const ref =
|
|
9871
|
+
const ref = useRef11();
|
|
9795
9872
|
return /* @__PURE__ */ jsxs23(
|
|
9796
9873
|
Stack,
|
|
9797
9874
|
{
|
|
@@ -9931,8 +10008,8 @@ var FormField = ({
|
|
|
9931
10008
|
defaultValue
|
|
9932
10009
|
};
|
|
9933
10010
|
}
|
|
9934
|
-
if (
|
|
9935
|
-
const computedName =
|
|
10011
|
+
if (isNotNil18(checkboxGroup)) {
|
|
10012
|
+
const computedName = isNotNil18(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
9936
10013
|
const handleChange = (event) => {
|
|
9937
10014
|
if (isNotUndefined9(props.onChange)) {
|
|
9938
10015
|
props.onChange(event);
|
|
@@ -9945,7 +10022,7 @@ var FormField = ({
|
|
|
9945
10022
|
...childProps,
|
|
9946
10023
|
name: computedName,
|
|
9947
10024
|
onChange: handleChange,
|
|
9948
|
-
"aria-invalid":
|
|
10025
|
+
"aria-invalid": isNotNil18(error)
|
|
9949
10026
|
};
|
|
9950
10027
|
}
|
|
9951
10028
|
Children4.only(children);
|
|
@@ -9956,9 +10033,9 @@ var FormField = ({
|
|
|
9956
10033
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9957
10034
|
children: [
|
|
9958
10035
|
!isIntegratedLabel && /* @__PURE__ */ jsx227(Label, { htmlFor: computedId, children: label }),
|
|
9959
|
-
|
|
10036
|
+
isNotNil18(description) ? /* @__PURE__ */ jsx227(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9960
10037
|
cloneElement4(children, childProps),
|
|
9961
|
-
|
|
10038
|
+
isNotNil18(computedError) ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
9962
10039
|
/* @__PURE__ */ jsx227("div", {}),
|
|
9963
10040
|
/* @__PURE__ */ jsx227(
|
|
9964
10041
|
ErrorMessages,
|
|
@@ -10099,7 +10176,7 @@ InputClickToCopy.displayName = "InputClickToCopy";
|
|
|
10099
10176
|
|
|
10100
10177
|
// src/components/KeyboardShortcut/KeyboardShortcut.tsx
|
|
10101
10178
|
import styled39 from "styled-components";
|
|
10102
|
-
import { isNotNil as
|
|
10179
|
+
import { isNotNil as isNotNil19 } from "@wistia/type-guards";
|
|
10103
10180
|
import { jsx as jsx231, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
10104
10181
|
var StyledKeyboardShortcut = styled39.div`
|
|
10105
10182
|
align-items: center;
|
|
@@ -10193,7 +10270,7 @@ var KeyboardShortcut = ({
|
|
|
10193
10270
|
$fullWidth: fullWidth,
|
|
10194
10271
|
...otherProps,
|
|
10195
10272
|
children: [
|
|
10196
|
-
|
|
10273
|
+
isNotNil19(label) && /* @__PURE__ */ jsx231(Label2, { children: label }),
|
|
10197
10274
|
/* @__PURE__ */ jsx231(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx231(
|
|
10198
10275
|
StyledKey,
|
|
10199
10276
|
{
|
|
@@ -10214,7 +10291,7 @@ import {
|
|
|
10214
10291
|
DropdownMenuPortal,
|
|
10215
10292
|
DropdownMenuContent
|
|
10216
10293
|
} from "@radix-ui/react-dropdown-menu";
|
|
10217
|
-
import { isNotNil as
|
|
10294
|
+
import { isNotNil as isNotNil20, isNotUndefined as isNotUndefined10 } from "@wistia/type-guards";
|
|
10218
10295
|
import { useMemo as useMemo7 } from "react";
|
|
10219
10296
|
|
|
10220
10297
|
// src/components/Menu/MenuContext.tsx
|
|
@@ -10326,7 +10403,7 @@ var Menu = ({
|
|
|
10326
10403
|
}) => {
|
|
10327
10404
|
const contextValue = useMemo7(() => ({ compact }), [compact]);
|
|
10328
10405
|
let controlProps = {
|
|
10329
|
-
...
|
|
10406
|
+
...isNotNil20(onOpenChange) && isNotNil20(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
10330
10407
|
};
|
|
10331
10408
|
if (disabled) {
|
|
10332
10409
|
controlProps = {
|
|
@@ -10409,12 +10486,12 @@ import {
|
|
|
10409
10486
|
DropdownMenuSubTrigger,
|
|
10410
10487
|
DropdownMenuItem
|
|
10411
10488
|
} from "@radix-ui/react-dropdown-menu";
|
|
10412
|
-
import { isNotNil as
|
|
10489
|
+
import { isNotNil as isNotNil22 } from "@wistia/type-guards";
|
|
10413
10490
|
|
|
10414
10491
|
// src/components/Menu/MenuItemButton.tsx
|
|
10415
10492
|
import { forwardRef as forwardRef15 } from "react";
|
|
10416
10493
|
import styled42 from "styled-components";
|
|
10417
|
-
import { isNotNil as
|
|
10494
|
+
import { isNotNil as isNotNil21, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
10418
10495
|
import { jsx as jsx234, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10419
10496
|
var StyledButton3 = styled42(Button)`
|
|
10420
10497
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
@@ -10522,7 +10599,7 @@ var MenuItemButton = forwardRef15(({ children, appearance, command, icon, ...pro
|
|
|
10522
10599
|
children: [
|
|
10523
10600
|
props.leftIcon ? /* @__PURE__ */ jsx234(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
10524
10601
|
/* @__PURE__ */ jsx234(StyledLabelAndDescriptionContainer, { children }),
|
|
10525
|
-
|
|
10602
|
+
isNotNil21(badge) || isNotNil21(command) ? /* @__PURE__ */ jsx234(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
10526
10603
|
props.rightIcon ? /* @__PURE__ */ jsx234(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
10527
10604
|
]
|
|
10528
10605
|
}
|
|
@@ -10594,7 +10671,7 @@ var SubMenu = ({
|
|
|
10594
10671
|
return isSmAndUp ? /* @__PURE__ */ jsxs28(DropdownMenuSub, { onOpenChange, children: [
|
|
10595
10672
|
/* @__PURE__ */ jsxs28(SubMenuTrigger, { ...props, children: [
|
|
10596
10673
|
/* @__PURE__ */ jsx236(MenuItemLabel, { children: label }),
|
|
10597
|
-
|
|
10674
|
+
isNotNil22(description) ? /* @__PURE__ */ jsx236(MenuItemDescription, { children: description }) : null
|
|
10598
10675
|
] }),
|
|
10599
10676
|
/* @__PURE__ */ jsx236(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx236(SubMenuContent, { $compact: compact, children }) })
|
|
10600
10677
|
] }) : /* @__PURE__ */ jsxs28(DropdownMenuGroup, { children: [
|
|
@@ -10694,7 +10771,7 @@ import {
|
|
|
10694
10771
|
DropdownMenuCheckboxItem,
|
|
10695
10772
|
DropdownMenuItemIndicator as DropdownMenuItemIndicator2
|
|
10696
10773
|
} from "@radix-ui/react-dropdown-menu";
|
|
10697
|
-
import { isNotNil as
|
|
10774
|
+
import { isNotNil as isNotNil23 } from "@wistia/type-guards";
|
|
10698
10775
|
import { jsx as jsx240, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10699
10776
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
10700
10777
|
return checked ? /* @__PURE__ */ jsxs29(
|
|
@@ -10768,8 +10845,8 @@ var CheckboxMenuItem = ({
|
|
|
10768
10845
|
MenuItemButton,
|
|
10769
10846
|
{
|
|
10770
10847
|
...props,
|
|
10771
|
-
leftIcon:
|
|
10772
|
-
rightIcon:
|
|
10848
|
+
leftIcon: isNotNil23(props.icon) ? props.icon : /* @__PURE__ */ jsx240(CheckboxIndicator, { checked }),
|
|
10849
|
+
rightIcon: isNotNil23(props.icon) ? /* @__PURE__ */ jsx240(DropdownMenuItemIndicator2, { children: /* @__PURE__ */ jsx240(Icon, { type: "checkmark" }) }) : void 0
|
|
10773
10850
|
}
|
|
10774
10851
|
)
|
|
10775
10852
|
}
|
|
@@ -10781,7 +10858,7 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
|
10781
10858
|
import { forwardRef as forwardRef19 } from "react";
|
|
10782
10859
|
import styled49 from "styled-components";
|
|
10783
10860
|
import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
|
|
10784
|
-
import { isNotNil as
|
|
10861
|
+
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
10785
10862
|
|
|
10786
10863
|
// src/components/Modal/ModalHeader.tsx
|
|
10787
10864
|
import styled46 from "styled-components";
|
|
@@ -10843,16 +10920,16 @@ import styled47, { css as css30 } from "styled-components";
|
|
|
10843
10920
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
10844
10921
|
|
|
10845
10922
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10846
|
-
import { useRef as
|
|
10847
|
-
import { isNotNil as
|
|
10923
|
+
import { useRef as useRef12, useEffect as useEffect10 } from "react";
|
|
10924
|
+
import { isNotNil as isNotNil24 } from "@wistia/type-guards";
|
|
10848
10925
|
var useFocusRestore = () => {
|
|
10849
|
-
const previouslyFocusedRef =
|
|
10926
|
+
const previouslyFocusedRef = useRef12(null);
|
|
10850
10927
|
useEffect10(() => {
|
|
10851
10928
|
previouslyFocusedRef.current = document.activeElement;
|
|
10852
10929
|
}, []);
|
|
10853
10930
|
useEffect10(() => {
|
|
10854
10931
|
return () => {
|
|
10855
|
-
if (
|
|
10932
|
+
if (isNotNil24(previouslyFocusedRef.current)) {
|
|
10856
10933
|
setTimeout(() => {
|
|
10857
10934
|
previouslyFocusedRef.current?.focus();
|
|
10858
10935
|
}, 0);
|
|
@@ -11043,7 +11120,7 @@ var Modal = forwardRef19(
|
|
|
11043
11120
|
DialogRoot,
|
|
11044
11121
|
{
|
|
11045
11122
|
onOpenChange: (open2) => {
|
|
11046
|
-
if (!open2 &&
|
|
11123
|
+
if (!open2 && isNotNil25(onRequestClose)) {
|
|
11047
11124
|
onRequestClose();
|
|
11048
11125
|
}
|
|
11049
11126
|
},
|
|
@@ -11058,7 +11135,7 @@ var Modal = forwardRef19(
|
|
|
11058
11135
|
alignVertical,
|
|
11059
11136
|
fullHeight,
|
|
11060
11137
|
onOpenAutoFocus: (event) => {
|
|
11061
|
-
if (
|
|
11138
|
+
if (isNotNil25(initialFocusRef) && initialFocusRef.current) {
|
|
11062
11139
|
event.preventDefault();
|
|
11063
11140
|
requestAnimationFrame(() => {
|
|
11064
11141
|
initialFocusRef.current?.focus();
|
|
@@ -11092,9 +11169,9 @@ import { Root, Trigger as Trigger2, Portal, Content as Content2, Close } from "@
|
|
|
11092
11169
|
import styled51, { css as css32 } from "styled-components";
|
|
11093
11170
|
|
|
11094
11171
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
11095
|
-
import { isNotNil as
|
|
11172
|
+
import { isNotNil as isNotNil26 } from "@wistia/type-guards";
|
|
11096
11173
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
11097
|
-
return
|
|
11174
|
+
return isNotNil26(onOpenChange) && isNotNil26(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
11098
11175
|
};
|
|
11099
11176
|
|
|
11100
11177
|
// src/components/Popover/PopoverArrow.tsx
|
|
@@ -11249,7 +11326,7 @@ Popover.displayName = "Popover";
|
|
|
11249
11326
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
11250
11327
|
import styled52 from "styled-components";
|
|
11251
11328
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
11252
|
-
import { isNotNil as
|
|
11329
|
+
import { isNotNil as isNotNil27 } from "@wistia/type-guards";
|
|
11253
11330
|
import { jsx as jsx248, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11254
11331
|
var ProgressBarWrapper = styled52.div`
|
|
11255
11332
|
--progress-bar-height: 8px;
|
|
@@ -11304,7 +11381,7 @@ var ProgressBar = ({
|
|
|
11304
11381
|
...props
|
|
11305
11382
|
}) => {
|
|
11306
11383
|
return /* @__PURE__ */ jsxs34(ProgressBarWrapper, { children: [
|
|
11307
|
-
|
|
11384
|
+
isNotNil27(labelLeft) ? /* @__PURE__ */ jsx248(ProgressBarLabel, { children: labelLeft }) : null,
|
|
11308
11385
|
/* @__PURE__ */ jsx248(
|
|
11309
11386
|
StyledProgressBar,
|
|
11310
11387
|
{
|
|
@@ -11320,7 +11397,7 @@ var ProgressBar = ({
|
|
|
11320
11397
|
)
|
|
11321
11398
|
}
|
|
11322
11399
|
),
|
|
11323
|
-
|
|
11400
|
+
isNotNil27(labelRight) ? /* @__PURE__ */ jsx248(ProgressBarLabel, { children: labelRight }) : null
|
|
11324
11401
|
] });
|
|
11325
11402
|
};
|
|
11326
11403
|
ProgressBar.displayName = "ProgressBar";
|
|
@@ -11623,10 +11700,10 @@ var SegmentedControl = forwardRef21(
|
|
|
11623
11700
|
SegmentedControl.displayName = "SegmentedControl";
|
|
11624
11701
|
|
|
11625
11702
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
11626
|
-
import { forwardRef as forwardRef22, useEffect as useEffect11, useRef as
|
|
11703
|
+
import { forwardRef as forwardRef22, useEffect as useEffect11, useRef as useRef13 } from "react";
|
|
11627
11704
|
import styled56, { css as css35 } from "styled-components";
|
|
11628
11705
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
11629
|
-
import { isNotNil as
|
|
11706
|
+
import { isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
11630
11707
|
import { jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11631
11708
|
var segmentedControlItemStyles = css35`
|
|
11632
11709
|
all: unset; /* ToggleGroupItem is a button element */
|
|
@@ -11659,7 +11736,7 @@ var segmentedControlItemStyles = css35`
|
|
|
11659
11736
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11660
11737
|
}
|
|
11661
11738
|
|
|
11662
|
-
&:hover:not([data-state='on'], [data-state='active']) {
|
|
11739
|
+
&:hover:not([data-state='on'], [data-state='active'], [aria-selected='true']) {
|
|
11663
11740
|
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
11664
11741
|
}
|
|
11665
11742
|
|
|
@@ -11695,7 +11772,7 @@ var SegmentedControlItem = forwardRef22(
|
|
|
11695
11772
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11696
11773
|
const selectedValue = useSegmentedControlValue();
|
|
11697
11774
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
11698
|
-
const buttonRef =
|
|
11775
|
+
const buttonRef = useRef13(null);
|
|
11699
11776
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11700
11777
|
const handleClick = (event) => {
|
|
11701
11778
|
const target = event.target;
|
|
@@ -11733,8 +11810,8 @@ var SegmentedControlItem = forwardRef22(
|
|
|
11733
11810
|
StyledSegmentedControlItem,
|
|
11734
11811
|
{
|
|
11735
11812
|
ref: combinedRef,
|
|
11736
|
-
$hasLabel:
|
|
11737
|
-
"aria-label":
|
|
11813
|
+
$hasLabel: isNotNil28(label),
|
|
11814
|
+
"aria-label": isNotNil28(label) ? void 0 : ariaLabel,
|
|
11738
11815
|
disabled,
|
|
11739
11816
|
onClick: handleClick,
|
|
11740
11817
|
value,
|
|
@@ -11875,7 +11952,7 @@ Select.displayName = "Select";
|
|
|
11875
11952
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
11876
11953
|
import { forwardRef as forwardRef24 } from "react";
|
|
11877
11954
|
import styled58 from "styled-components";
|
|
11878
|
-
import { isNotNil as
|
|
11955
|
+
import { isNotNil as isNotNil29 } from "@wistia/type-guards";
|
|
11879
11956
|
import { jsx as jsx254, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
11880
11957
|
var StyledItem = styled58(Item)`
|
|
11881
11958
|
${variantStyleMap2.body3};
|
|
@@ -11919,7 +11996,7 @@ var SelectOption = forwardRef24(
|
|
|
11919
11996
|
type: "checkmark"
|
|
11920
11997
|
}
|
|
11921
11998
|
) }) }),
|
|
11922
|
-
|
|
11999
|
+
isNotNil29(selectedDisplayValue) ? /* @__PURE__ */ jsxs39("div", { children: [
|
|
11923
12000
|
children,
|
|
11924
12001
|
/* @__PURE__ */ jsx254("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx254(ItemText, { children: selectedDisplayValue }) })
|
|
11925
12002
|
] }) : /* @__PURE__ */ jsx254(ItemText, { children })
|
|
@@ -12226,92 +12303,128 @@ var TableRow = ({ children, ...props }) => {
|
|
|
12226
12303
|
};
|
|
12227
12304
|
|
|
12228
12305
|
// src/components/Tabs/Tabs.tsx
|
|
12229
|
-
import {
|
|
12230
|
-
import {
|
|
12231
|
-
import { isNotNil as isNotNil30
|
|
12232
|
-
import styled71 from "styled-components";
|
|
12306
|
+
import { Root as RadixTabsRoot } from "@radix-ui/react-tabs";
|
|
12307
|
+
import { useCallback as useCallback10, useState as useState15 } from "react";
|
|
12308
|
+
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
12233
12309
|
|
|
12234
|
-
// src/components/Tabs/
|
|
12235
|
-
import
|
|
12236
|
-
|
|
12310
|
+
// src/components/Tabs/useTabsValue.tsx
|
|
12311
|
+
import { createContext as createContext10, useContext as useContext9 } from "react";
|
|
12312
|
+
var TabsValueContext = createContext10(null);
|
|
12313
|
+
var TabsValueProvider = TabsValueContext.Provider;
|
|
12314
|
+
var useTabsValue = () => {
|
|
12315
|
+
const context = useContext9(TabsValueContext);
|
|
12316
|
+
if (context === null) {
|
|
12317
|
+
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
12318
|
+
}
|
|
12319
|
+
return context;
|
|
12320
|
+
};
|
|
12321
|
+
|
|
12322
|
+
// src/components/Tabs/Tabs.tsx
|
|
12237
12323
|
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
12238
|
-
var
|
|
12239
|
-
|
|
12240
|
-
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12324
|
+
var Tabs = ({
|
|
12325
|
+
children,
|
|
12326
|
+
value: valueProp,
|
|
12327
|
+
onValueChange: onValueChangeProp,
|
|
12328
|
+
defaultValue,
|
|
12329
|
+
...props
|
|
12330
|
+
}) => {
|
|
12331
|
+
const [value, setValue] = useState15(valueProp ?? defaultValue);
|
|
12332
|
+
const onValueChange = useCallback10(
|
|
12333
|
+
(newValue) => {
|
|
12334
|
+
setValue(newValue);
|
|
12335
|
+
if (onValueChangeProp) {
|
|
12336
|
+
onValueChangeProp(newValue);
|
|
12337
|
+
}
|
|
12338
|
+
},
|
|
12339
|
+
[onValueChangeProp]
|
|
12250
12340
|
);
|
|
12341
|
+
const rootProps = {
|
|
12342
|
+
...props,
|
|
12343
|
+
onValueChange
|
|
12344
|
+
};
|
|
12345
|
+
if (isNotNil30(value)) {
|
|
12346
|
+
rootProps.value = value;
|
|
12347
|
+
}
|
|
12348
|
+
if (isNotNil30(defaultValue)) {
|
|
12349
|
+
rootProps.defaultValue = defaultValue;
|
|
12350
|
+
}
|
|
12351
|
+
return /* @__PURE__ */ jsx263(RadixTabsRoot, { ...rootProps, children: /* @__PURE__ */ jsx263(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx263(SelectedItemStyleProvider, { children }) }) });
|
|
12251
12352
|
};
|
|
12252
|
-
|
|
12353
|
+
Tabs.displayName = "Tabs";
|
|
12253
12354
|
|
|
12254
|
-
// src/components/Tabs/
|
|
12255
|
-
import
|
|
12256
|
-
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
12355
|
+
// src/components/Tabs/TabsContent.tsx
|
|
12356
|
+
import { Content as RadixTabsContent } from "@radix-ui/react-tabs";
|
|
12257
12357
|
import { jsx as jsx264 } from "react/jsx-runtime";
|
|
12258
|
-
var
|
|
12259
|
-
|
|
12358
|
+
var TabsContent = ({ children, value }) => {
|
|
12359
|
+
return /* @__PURE__ */ jsx264(RadixTabsContent, { value, children });
|
|
12360
|
+
};
|
|
12361
|
+
TabsContent.displayName = "TabsContent";
|
|
12260
12362
|
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12363
|
+
// src/components/Tabs/TabsList.tsx
|
|
12364
|
+
import { List as RadixTabList } from "@radix-ui/react-tabs";
|
|
12365
|
+
import styled68 from "styled-components";
|
|
12366
|
+
|
|
12367
|
+
// src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
|
|
12368
|
+
import styled67 from "styled-components";
|
|
12369
|
+
var TabsSelectedItemIndicatorDiv = styled67(SelectedItemIndicatorDiv)`
|
|
12370
|
+
&:has(~ button[role='tab']:focus-visible) {
|
|
12371
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
12372
|
+
}
|
|
12264
12373
|
`;
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12374
|
+
|
|
12375
|
+
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
12376
|
+
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
12377
|
+
var SelectedTabIndicator = () => {
|
|
12378
|
+
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
12379
|
+
const selectedValue = useTabsValue();
|
|
12380
|
+
if (selectedValue == null) {
|
|
12381
|
+
return null;
|
|
12382
|
+
}
|
|
12383
|
+
return /* @__PURE__ */ jsx265(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
12384
|
+
};
|
|
12385
|
+
|
|
12386
|
+
// src/components/Tabs/TabsList.tsx
|
|
12387
|
+
import { jsx as jsx266, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12388
|
+
var StyledRadixTabsList = styled68(RadixTabList)`
|
|
12389
|
+
${segmentedControlStyles}
|
|
12390
|
+
`;
|
|
12391
|
+
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
12392
|
+
return /* @__PURE__ */ jsxs42(
|
|
12393
|
+
StyledRadixTabsList,
|
|
12273
12394
|
{
|
|
12274
12395
|
$fullWidth: fullWidth,
|
|
12275
|
-
"aria-label":
|
|
12276
|
-
|
|
12277
|
-
|
|
12396
|
+
"aria-label": props["aria-label"],
|
|
12397
|
+
children: [
|
|
12398
|
+
/* @__PURE__ */ jsx266(SelectedTabIndicator, {}),
|
|
12399
|
+
children
|
|
12400
|
+
]
|
|
12278
12401
|
}
|
|
12279
12402
|
);
|
|
12280
12403
|
};
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
// src/components/Tabs/TabItem.tsx
|
|
12284
|
-
import { forwardRef as forwardRef26, useEffect as useEffect12, useRef as useRef13 } from "react";
|
|
12285
|
-
import styled69 from "styled-components";
|
|
12286
|
-
import { Trigger as RadixTab } from "@radix-ui/react-tabs";
|
|
12287
|
-
import { isNotNil as isNotNil29 } from "@wistia/type-guards";
|
|
12404
|
+
TabsList.displayName = "TabsList";
|
|
12288
12405
|
|
|
12289
|
-
// src/components/Tabs/
|
|
12290
|
-
import {
|
|
12291
|
-
|
|
12292
|
-
var TabsValueProvider = TabsValueContext.Provider;
|
|
12293
|
-
var useTabsValue = () => {
|
|
12294
|
-
const context = useContext9(TabsValueContext);
|
|
12295
|
-
if (context === null) {
|
|
12296
|
-
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
12297
|
-
}
|
|
12298
|
-
return context;
|
|
12299
|
-
};
|
|
12406
|
+
// src/components/Tabs/TabsTrigger.tsx
|
|
12407
|
+
import { forwardRef as forwardRef26, useEffect as useEffect12, useRef as useRef14 } from "react";
|
|
12408
|
+
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
12300
12409
|
|
|
12301
|
-
// src/components/Tabs/
|
|
12302
|
-
import
|
|
12303
|
-
|
|
12410
|
+
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
12411
|
+
import styled69 from "styled-components";
|
|
12412
|
+
import { Trigger as RadixTabsTrigger } from "@radix-ui/react-tabs";
|
|
12413
|
+
var StyledRadixTabsTrigger = styled69(RadixTabsTrigger)`
|
|
12304
12414
|
${segmentedControlItemStyles}
|
|
12305
12415
|
|
|
12306
12416
|
&:focus-visible {
|
|
12307
12417
|
outline: none;
|
|
12308
12418
|
}
|
|
12309
12419
|
`;
|
|
12310
|
-
|
|
12311
|
-
|
|
12420
|
+
|
|
12421
|
+
// src/components/Tabs/TabsTrigger.tsx
|
|
12422
|
+
import { jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12423
|
+
var TabsTrigger = forwardRef26(
|
|
12424
|
+
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
12312
12425
|
const selectedValue = useTabsValue();
|
|
12313
12426
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
12314
|
-
const buttonRef =
|
|
12427
|
+
const buttonRef = useRef14(null);
|
|
12315
12428
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
12316
12429
|
useEffect12(() => {
|
|
12317
12430
|
const buttonElem = buttonRef.current;
|
|
@@ -12338,12 +12451,13 @@ var TabItem = forwardRef26(
|
|
|
12338
12451
|
resizeObserver.disconnect();
|
|
12339
12452
|
};
|
|
12340
12453
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
12341
|
-
return /* @__PURE__ */
|
|
12342
|
-
|
|
12454
|
+
return /* @__PURE__ */ jsxs43(
|
|
12455
|
+
StyledRadixTabsTrigger,
|
|
12343
12456
|
{
|
|
12457
|
+
...otherProps,
|
|
12344
12458
|
ref: combinedRef,
|
|
12345
|
-
$hasLabel:
|
|
12346
|
-
"aria-label":
|
|
12459
|
+
$hasLabel: isNotNil31(label),
|
|
12460
|
+
"aria-label": isNotNil31(label) ? void 0 : ariaLabel,
|
|
12347
12461
|
disabled,
|
|
12348
12462
|
value,
|
|
12349
12463
|
children: [
|
|
@@ -12354,176 +12468,14 @@ var TabItem = forwardRef26(
|
|
|
12354
12468
|
);
|
|
12355
12469
|
}
|
|
12356
12470
|
);
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
// src/components/Tabs/extractTabItems.ts
|
|
12360
|
-
import { Children as Children6, Fragment as Fragment7, isValidElement as isValidElement2 } from "react";
|
|
12361
|
-
var extractTabItems = (children) => {
|
|
12362
|
-
const tabItems = [];
|
|
12363
|
-
Children6.forEach(children, (child) => {
|
|
12364
|
-
if (!isValidElement2(child)) {
|
|
12365
|
-
return;
|
|
12366
|
-
}
|
|
12367
|
-
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
12368
|
-
tabItems.push(child);
|
|
12369
|
-
} else if (child.type === Fragment7) {
|
|
12370
|
-
const fragmentElement = child;
|
|
12371
|
-
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
12372
|
-
} else if ((child.props.children ?? null) != null) {
|
|
12373
|
-
const childChildren = child.props.children;
|
|
12374
|
-
tabItems.push(...extractTabItems(childChildren));
|
|
12375
|
-
} else {
|
|
12376
|
-
}
|
|
12377
|
-
});
|
|
12378
|
-
return tabItems;
|
|
12379
|
-
};
|
|
12380
|
-
|
|
12381
|
-
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
12382
|
-
import styled70 from "styled-components";
|
|
12383
|
-
import { jsx as jsx265 } from "react/jsx-runtime";
|
|
12384
|
-
var TabsSelectedItemIndicatorDiv = styled70(SelectedItemIndicatorDiv)`
|
|
12385
|
-
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
12386
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
12387
|
-
}
|
|
12388
|
-
`;
|
|
12389
|
-
var SelectedItemIndicator2 = () => {
|
|
12390
|
-
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
12391
|
-
const selectedValue = useTabsValue();
|
|
12392
|
-
if (selectedValue == null) {
|
|
12393
|
-
return null;
|
|
12394
|
-
}
|
|
12395
|
-
return /* @__PURE__ */ jsx265(TabsSelectedItemIndicatorDiv, { style: selectedItemIndicatorStyle });
|
|
12396
|
-
};
|
|
12397
|
-
|
|
12398
|
-
// src/components/Tabs/Tabs.tsx
|
|
12399
|
-
import { jsx as jsx266, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12400
|
-
var TabsContainer = styled71.div`
|
|
12401
|
-
display: flex;
|
|
12402
|
-
flex-direction: column;
|
|
12403
|
-
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12404
|
-
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12405
|
-
`;
|
|
12406
|
-
var StickyTabContent = styled71.div`
|
|
12407
|
-
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
12408
|
-
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
12409
|
-
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
12410
|
-
`;
|
|
12411
|
-
var StyledTabsRoot = styled71(TabsRoot)`
|
|
12412
|
-
display: flex;
|
|
12413
|
-
flex-direction: column;
|
|
12414
|
-
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
12415
|
-
`;
|
|
12416
|
-
var Tabs = forwardRef27(
|
|
12417
|
-
({
|
|
12418
|
-
children,
|
|
12419
|
-
fullWidth = true,
|
|
12420
|
-
"aria-label": ariaLabel,
|
|
12421
|
-
defaultSelectedValue,
|
|
12422
|
-
selectedValue,
|
|
12423
|
-
onSelectedValueChange,
|
|
12424
|
-
stickyHeaders = true,
|
|
12425
|
-
...props
|
|
12426
|
-
}, ref) => {
|
|
12427
|
-
const tabItems = extractTabItems(children);
|
|
12428
|
-
const [internalSelectedValue, setInternalSelectedValue] = useState15(defaultSelectedValue);
|
|
12429
|
-
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
12430
|
-
defaultValue: defaultSelectedValue,
|
|
12431
|
-
onValueChange: setInternalSelectedValue
|
|
12432
|
-
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
12433
|
-
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
12434
|
-
return /* @__PURE__ */ jsx266(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ jsx266(
|
|
12435
|
-
StyledTabsRoot,
|
|
12436
|
-
{
|
|
12437
|
-
ref,
|
|
12438
|
-
$stickyHeaders: stickyHeaders,
|
|
12439
|
-
activationMode: "automatic",
|
|
12440
|
-
...props,
|
|
12441
|
-
...modeProps,
|
|
12442
|
-
children: /* @__PURE__ */ jsx266(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ jsxs43(SelectedItemStyleProvider, { children: [
|
|
12443
|
-
/* @__PURE__ */ jsxs43(
|
|
12444
|
-
TabList,
|
|
12445
|
-
{
|
|
12446
|
-
ariaLabel,
|
|
12447
|
-
fullWidth,
|
|
12448
|
-
children: [
|
|
12449
|
-
/* @__PURE__ */ jsx266(SelectedItemIndicator2, {}),
|
|
12450
|
-
tabItems.map((tab) => {
|
|
12451
|
-
const {
|
|
12452
|
-
value,
|
|
12453
|
-
disabled = false,
|
|
12454
|
-
icon,
|
|
12455
|
-
label,
|
|
12456
|
-
"aria-label": ariaLabelForTab
|
|
12457
|
-
} = tab.props;
|
|
12458
|
-
if (isNil14(icon)) {
|
|
12459
|
-
return /* @__PURE__ */ jsx266(
|
|
12460
|
-
TabItem,
|
|
12461
|
-
{
|
|
12462
|
-
disabled,
|
|
12463
|
-
label,
|
|
12464
|
-
value
|
|
12465
|
-
},
|
|
12466
|
-
value
|
|
12467
|
-
);
|
|
12468
|
-
}
|
|
12469
|
-
if (isNotNil30(label)) {
|
|
12470
|
-
return /* @__PURE__ */ jsx266(
|
|
12471
|
-
TabItem,
|
|
12472
|
-
{
|
|
12473
|
-
disabled,
|
|
12474
|
-
icon,
|
|
12475
|
-
label,
|
|
12476
|
-
value
|
|
12477
|
-
},
|
|
12478
|
-
value
|
|
12479
|
-
);
|
|
12480
|
-
}
|
|
12481
|
-
if (isNotNil30(ariaLabelForTab)) {
|
|
12482
|
-
return /* @__PURE__ */ jsx266(
|
|
12483
|
-
TabItem,
|
|
12484
|
-
{
|
|
12485
|
-
"aria-label": ariaLabelForTab,
|
|
12486
|
-
disabled,
|
|
12487
|
-
icon,
|
|
12488
|
-
value
|
|
12489
|
-
},
|
|
12490
|
-
value
|
|
12491
|
-
);
|
|
12492
|
-
}
|
|
12493
|
-
throw new Error("A `Tab` with an icon must have either label or aria-label");
|
|
12494
|
-
})
|
|
12495
|
-
]
|
|
12496
|
-
}
|
|
12497
|
-
),
|
|
12498
|
-
/* @__PURE__ */ jsx266(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ jsx266(
|
|
12499
|
-
TabPanel,
|
|
12500
|
-
{
|
|
12501
|
-
value: tab.props.value,
|
|
12502
|
-
children: tab.props.children
|
|
12503
|
-
},
|
|
12504
|
-
tab.props.value
|
|
12505
|
-
)) })
|
|
12506
|
-
] }) })
|
|
12507
|
-
}
|
|
12508
|
-
) });
|
|
12509
|
-
}
|
|
12510
|
-
);
|
|
12511
|
-
Tabs.displayName = "Tabs";
|
|
12512
|
-
|
|
12513
|
-
// src/components/Tabs/Tab.tsx
|
|
12514
|
-
import { forwardRef as forwardRef28 } from "react";
|
|
12515
|
-
import { jsx as jsx267 } from "react/jsx-runtime";
|
|
12516
|
-
var Tab = forwardRef28(({ children }, ref) => {
|
|
12517
|
-
return /* @__PURE__ */ jsx267("div", { ref, children });
|
|
12518
|
-
});
|
|
12519
|
-
Tab.displayName = "Tab";
|
|
12471
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
12520
12472
|
|
|
12521
12473
|
// src/components/Tag/Tag.tsx
|
|
12522
|
-
import { forwardRef as
|
|
12523
|
-
import
|
|
12524
|
-
import { isNil as
|
|
12525
|
-
import { Fragment as
|
|
12526
|
-
var TagLabel =
|
|
12474
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
12475
|
+
import styled70 from "styled-components";
|
|
12476
|
+
import { isNil as isNil14, isNotNil as isNotNil32, isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
|
|
12477
|
+
import { Fragment as Fragment7, jsx as jsx267, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12478
|
+
var TagLabel = styled70.a`
|
|
12527
12479
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12528
12480
|
font-size: var(--wui-typography-label-4-size);
|
|
12529
12481
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -12558,14 +12510,14 @@ var TagLabel = styled72.a`
|
|
|
12558
12510
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12559
12511
|
}
|
|
12560
12512
|
`;
|
|
12561
|
-
var TagDivider =
|
|
12513
|
+
var TagDivider = styled70.div`
|
|
12562
12514
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12563
12515
|
border-left: 1px solid var(--wui-color-border);
|
|
12564
12516
|
display: flex;
|
|
12565
12517
|
height: 14px;
|
|
12566
12518
|
width: 1px;
|
|
12567
12519
|
`;
|
|
12568
|
-
var StyledRemoveButton =
|
|
12520
|
+
var StyledRemoveButton = styled70.button`
|
|
12569
12521
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12570
12522
|
all: unset;
|
|
12571
12523
|
cursor: pointer;
|
|
@@ -12593,7 +12545,7 @@ var StyledRemoveButton = styled72.button`
|
|
|
12593
12545
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
12594
12546
|
}
|
|
12595
12547
|
`;
|
|
12596
|
-
var StyledTag =
|
|
12548
|
+
var StyledTag = styled70.div`
|
|
12597
12549
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12598
12550
|
align-items: center;
|
|
12599
12551
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12606,16 +12558,16 @@ var StyledTag = styled72.div`
|
|
|
12606
12558
|
}
|
|
12607
12559
|
`;
|
|
12608
12560
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
12609
|
-
if (
|
|
12561
|
+
if (isNil14(onClickRemove)) {
|
|
12610
12562
|
return null;
|
|
12611
12563
|
}
|
|
12612
|
-
if (
|
|
12564
|
+
if (isNil14(onClickRemoveLabel)) {
|
|
12613
12565
|
throw new Error(
|
|
12614
12566
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
12615
12567
|
);
|
|
12616
12568
|
}
|
|
12617
|
-
return /* @__PURE__ */ jsxs44(
|
|
12618
|
-
/* @__PURE__ */
|
|
12569
|
+
return /* @__PURE__ */ jsxs44(Fragment7, { children: [
|
|
12570
|
+
/* @__PURE__ */ jsx267(TagDivider, { $colorScheme: colorScheme }),
|
|
12619
12571
|
/* @__PURE__ */ jsxs44(
|
|
12620
12572
|
StyledRemoveButton,
|
|
12621
12573
|
{
|
|
@@ -12623,23 +12575,23 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
12623
12575
|
onClick: onClickRemove,
|
|
12624
12576
|
type: "button",
|
|
12625
12577
|
children: [
|
|
12626
|
-
/* @__PURE__ */
|
|
12578
|
+
/* @__PURE__ */ jsx267(
|
|
12627
12579
|
Icon,
|
|
12628
12580
|
{
|
|
12629
12581
|
size: "sm",
|
|
12630
12582
|
type: "close"
|
|
12631
12583
|
}
|
|
12632
12584
|
),
|
|
12633
|
-
/* @__PURE__ */
|
|
12585
|
+
/* @__PURE__ */ jsx267(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
12634
12586
|
]
|
|
12635
12587
|
}
|
|
12636
12588
|
)
|
|
12637
12589
|
] });
|
|
12638
12590
|
};
|
|
12639
|
-
var Tag =
|
|
12591
|
+
var Tag = forwardRef27(
|
|
12640
12592
|
({ onClickRemove, colorScheme = "inherit", href, icon, label, onClickRemoveLabel, ...props }, ref) => {
|
|
12641
|
-
const hasIcon =
|
|
12642
|
-
const labelProps =
|
|
12593
|
+
const hasIcon = isNotNil32(icon);
|
|
12594
|
+
const labelProps = isNotNil32(href) && isNonEmptyString5(href) ? { href, as: "a" } : { as: "span" };
|
|
12643
12595
|
return /* @__PURE__ */ jsxs44(
|
|
12644
12596
|
StyledTag,
|
|
12645
12597
|
{
|
|
@@ -12658,7 +12610,7 @@ var Tag = forwardRef29(
|
|
|
12658
12610
|
]
|
|
12659
12611
|
}
|
|
12660
12612
|
),
|
|
12661
|
-
/* @__PURE__ */
|
|
12613
|
+
/* @__PURE__ */ jsx267(
|
|
12662
12614
|
RemoveButton,
|
|
12663
12615
|
{
|
|
12664
12616
|
colorScheme,
|
|
@@ -12674,10 +12626,10 @@ var Tag = forwardRef29(
|
|
|
12674
12626
|
Tag.displayName = "Tag";
|
|
12675
12627
|
|
|
12676
12628
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
12677
|
-
import
|
|
12678
|
-
import { isNotNil as
|
|
12679
|
-
import { jsx as
|
|
12680
|
-
var StyledThumbnailBadge =
|
|
12629
|
+
import styled71 from "styled-components";
|
|
12630
|
+
import { isNotNil as isNotNil33 } from "@wistia/type-guards";
|
|
12631
|
+
import { jsx as jsx268, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12632
|
+
var StyledThumbnailBadge = styled71.div`
|
|
12681
12633
|
align-items: center;
|
|
12682
12634
|
background-color: rgb(0 0 0 / 50%);
|
|
12683
12635
|
border-radius: var(--wui-border-radius-01);
|
|
@@ -12703,19 +12655,19 @@ var StyledThumbnailBadge = styled73.div`
|
|
|
12703
12655
|
`;
|
|
12704
12656
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
12705
12657
|
return /* @__PURE__ */ jsxs45(StyledThumbnailBadge, { ...props, children: [
|
|
12706
|
-
|
|
12707
|
-
/* @__PURE__ */
|
|
12658
|
+
isNotNil33(icon) && icon,
|
|
12659
|
+
/* @__PURE__ */ jsx268("span", { children: label })
|
|
12708
12660
|
] });
|
|
12709
12661
|
};
|
|
12710
12662
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
12711
12663
|
|
|
12712
12664
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12713
|
-
import { forwardRef as
|
|
12714
|
-
import
|
|
12715
|
-
import { isNil as
|
|
12665
|
+
import { forwardRef as forwardRef28, useState as useState16, useRef as useRef15, useCallback as useCallback11, useMemo as useMemo9 } from "react";
|
|
12666
|
+
import styled73 from "styled-components";
|
|
12667
|
+
import { isNil as isNil15, isNotNil as isNotNil36, isUndefined as isUndefined5, isEmptyString as isEmptyString2, isString as isString2 } from "@wistia/type-guards";
|
|
12716
12668
|
|
|
12717
12669
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
12718
|
-
import { isNotNil as
|
|
12670
|
+
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
12719
12671
|
import { css as css39 } from "styled-components";
|
|
12720
12672
|
var gradients = {
|
|
12721
12673
|
defaultDarkOne: css39`
|
|
@@ -12843,11 +12795,21 @@ var gradients = {
|
|
|
12843
12795
|
};
|
|
12844
12796
|
var gradientMap = Object.keys(gradients);
|
|
12845
12797
|
var getBackgroundGradient = (gradientName = void 0) => {
|
|
12846
|
-
return
|
|
12798
|
+
return isNotNil34(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
12847
12799
|
};
|
|
12848
12800
|
|
|
12849
12801
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
12850
|
-
import
|
|
12802
|
+
import styled72 from "styled-components";
|
|
12803
|
+
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
12804
|
+
import { jsx as jsx269, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
12805
|
+
var ScrubLine = styled72.div`
|
|
12806
|
+
position: absolute;
|
|
12807
|
+
top: 0;
|
|
12808
|
+
height: 100%;
|
|
12809
|
+
width: 2px;
|
|
12810
|
+
background-color: var(--wui-color-bg-fill);
|
|
12811
|
+
z-index: 1;
|
|
12812
|
+
`;
|
|
12851
12813
|
var getScaledDimensions = (originalAspectRatio, targetAspectRatio, viewerWidth, viewerHeight) => {
|
|
12852
12814
|
let scaledHeight = viewerHeight;
|
|
12853
12815
|
let scaledWidth = viewerWidth;
|
|
@@ -12887,7 +12849,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
12887
12849
|
targetAspectRatio,
|
|
12888
12850
|
scaleFactor = 1,
|
|
12889
12851
|
framesPerRow = 10,
|
|
12890
|
-
|
|
12852
|
+
cursorPosition,
|
|
12891
12853
|
...props
|
|
12892
12854
|
}) => {
|
|
12893
12855
|
const originalAspectRatio = frameWidth / frameHeight;
|
|
@@ -12923,7 +12885,9 @@ var ThumbnailStoryboardViewer = ({
|
|
|
12923
12885
|
storyboardHeight * scaleFactorFromAspectRatioFit * scaleFactor
|
|
12924
12886
|
);
|
|
12925
12887
|
const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
|
|
12926
|
-
const backgroundImage =
|
|
12888
|
+
const backgroundImage = `url(${storyboardUrl})`;
|
|
12889
|
+
const showScrubLine = isNotNil35(cursorPosition);
|
|
12890
|
+
const scrubLinePosition = isNotNil35(cursorPosition) ? `${cursorPosition - 1}px` : "0";
|
|
12927
12891
|
const viewerStyles = {
|
|
12928
12892
|
position: "relative",
|
|
12929
12893
|
overflow: "hidden",
|
|
@@ -12940,31 +12904,41 @@ var ThumbnailStoryboardViewer = ({
|
|
|
12940
12904
|
backgroundPosition,
|
|
12941
12905
|
backgroundSize
|
|
12942
12906
|
};
|
|
12943
|
-
return /* @__PURE__ */
|
|
12907
|
+
return /* @__PURE__ */ jsxs46(
|
|
12944
12908
|
"div",
|
|
12945
12909
|
{
|
|
12946
12910
|
...props,
|
|
12947
12911
|
style: viewerStyles,
|
|
12948
|
-
children:
|
|
12912
|
+
children: [
|
|
12913
|
+
/* @__PURE__ */ jsx269("div", { style: storyboardStyles }),
|
|
12914
|
+
showScrubLine ? /* @__PURE__ */ jsx269(
|
|
12915
|
+
ScrubLine,
|
|
12916
|
+
{
|
|
12917
|
+
style: {
|
|
12918
|
+
left: scrubLinePosition
|
|
12919
|
+
}
|
|
12920
|
+
}
|
|
12921
|
+
) : null
|
|
12922
|
+
]
|
|
12949
12923
|
}
|
|
12950
12924
|
);
|
|
12951
12925
|
};
|
|
12952
12926
|
|
|
12953
12927
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
12954
|
-
import { jsx as
|
|
12955
|
-
var WideThumbnailImage =
|
|
12928
|
+
import { jsx as jsx270, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
12929
|
+
var WideThumbnailImage = styled73.img`
|
|
12956
12930
|
height: 100%;
|
|
12957
12931
|
object-fit: cover;
|
|
12958
12932
|
width: 100%;
|
|
12959
12933
|
`;
|
|
12960
|
-
var SquareThumbnailImage =
|
|
12934
|
+
var SquareThumbnailImage = styled73.img`
|
|
12961
12935
|
backdrop-filter: blur(8px);
|
|
12962
12936
|
object-fit: contain;
|
|
12963
12937
|
width: 100%;
|
|
12964
12938
|
`;
|
|
12965
12939
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
12966
12940
|
if (thumbnailImageType === "wide") {
|
|
12967
|
-
return /* @__PURE__ */
|
|
12941
|
+
return /* @__PURE__ */ jsx270(
|
|
12968
12942
|
WideThumbnailImage,
|
|
12969
12943
|
{
|
|
12970
12944
|
alt: "",
|
|
@@ -12973,7 +12947,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12973
12947
|
}
|
|
12974
12948
|
);
|
|
12975
12949
|
}
|
|
12976
|
-
return /* @__PURE__ */
|
|
12950
|
+
return /* @__PURE__ */ jsx270(
|
|
12977
12951
|
SquareThumbnailImage,
|
|
12978
12952
|
{
|
|
12979
12953
|
alt: "",
|
|
@@ -12982,11 +12956,11 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
12982
12956
|
}
|
|
12983
12957
|
);
|
|
12984
12958
|
};
|
|
12985
|
-
var StyledThumbnail =
|
|
12986
|
-
background-image: ${({ $backgroundUrl }) =>
|
|
12959
|
+
var StyledThumbnail = styled73.div`
|
|
12960
|
+
background-image: ${({ $backgroundUrl }) => isNotNil36($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
12987
12961
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
12988
12962
|
// if we don't have $backgroundUrl show a gradient
|
|
12989
|
-
|
|
12963
|
+
isNil15($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
|
|
12990
12964
|
)};
|
|
12991
12965
|
background-position: center center;
|
|
12992
12966
|
background-size: cover;
|
|
@@ -12995,7 +12969,7 @@ var StyledThumbnail = styled74.div`
|
|
|
12995
12969
|
overflow: hidden;
|
|
12996
12970
|
position: relative;
|
|
12997
12971
|
width: ${({ $width }) => $width};
|
|
12998
|
-
${({ $isScrubbable }) => $isScrubbable && "cursor:
|
|
12972
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
12999
12973
|
|
|
13000
12974
|
&,
|
|
13001
12975
|
img {
|
|
@@ -13011,7 +12985,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
13011
12985
|
left: relativeLeft
|
|
13012
12986
|
};
|
|
13013
12987
|
};
|
|
13014
|
-
var Thumbnail =
|
|
12988
|
+
var Thumbnail = forwardRef28(
|
|
13015
12989
|
({
|
|
13016
12990
|
gradientBackground = "defaultMidOne",
|
|
13017
12991
|
thumbnailImageType = "square",
|
|
@@ -13025,13 +12999,14 @@ var Thumbnail = forwardRef30(
|
|
|
13025
12999
|
const [percent, setPercent] = useState16(0);
|
|
13026
13000
|
const [isMouseOver, setIsMouseOver] = useState16(false);
|
|
13027
13001
|
const [isStoryboardReady, setIsStoryboardReady] = useState16(false);
|
|
13028
|
-
const storyboardElementRef =
|
|
13002
|
+
const storyboardElementRef = useRef15(null);
|
|
13003
|
+
const [cursorPosition, setCursorPosition] = useState16(null);
|
|
13029
13004
|
const backgroundUrl = useMemo9(
|
|
13030
|
-
() => thumbnailImageType === "square" &&
|
|
13005
|
+
() => thumbnailImageType === "square" && isNotNil36(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
13031
13006
|
[thumbnailImageType, thumbnailUrl]
|
|
13032
13007
|
);
|
|
13033
|
-
const isScrubbable =
|
|
13034
|
-
const trackStoryboardLoadStatus =
|
|
13008
|
+
const isScrubbable = isNotNil36(storyboard);
|
|
13009
|
+
const trackStoryboardLoadStatus = useCallback11(() => {
|
|
13035
13010
|
if (storyboardElementRef.current || !storyboard) {
|
|
13036
13011
|
return storyboardElementRef.current;
|
|
13037
13012
|
}
|
|
@@ -13041,7 +13016,7 @@ var Thumbnail = forwardRef30(
|
|
|
13041
13016
|
storyboardElementRef.current = asset;
|
|
13042
13017
|
return storyboardElementRef.current;
|
|
13043
13018
|
}, [storyboard]);
|
|
13044
|
-
const handleMouseMove =
|
|
13019
|
+
const handleMouseMove = useCallback11(
|
|
13045
13020
|
(mouseEvent) => {
|
|
13046
13021
|
if (!isScrubbable) return;
|
|
13047
13022
|
const elem = mouseEvent.currentTarget;
|
|
@@ -13049,18 +13024,20 @@ var Thumbnail = forwardRef30(
|
|
|
13049
13024
|
const newPercent = relMousePos.left / elem.clientWidth;
|
|
13050
13025
|
trackStoryboardLoadStatus();
|
|
13051
13026
|
setPercent(newPercent);
|
|
13027
|
+
setCursorPosition(relMousePos.left);
|
|
13052
13028
|
setIsMouseOver(true);
|
|
13053
13029
|
},
|
|
13054
13030
|
[isScrubbable, trackStoryboardLoadStatus]
|
|
13055
13031
|
);
|
|
13056
|
-
const handleMouseOut =
|
|
13032
|
+
const handleMouseOut = useCallback11(() => {
|
|
13057
13033
|
if (!isScrubbable) return;
|
|
13058
13034
|
setIsMouseOver(false);
|
|
13035
|
+
setCursorPosition(null);
|
|
13059
13036
|
}, [isScrubbable]);
|
|
13060
13037
|
const shouldRenderStoryboard = useMemo9(() => {
|
|
13061
13038
|
return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
|
|
13062
13039
|
}, [isScrubbable, isMouseOver, isStoryboardReady]);
|
|
13063
|
-
const renderStoryboard =
|
|
13040
|
+
const renderStoryboard = useCallback11(() => {
|
|
13064
13041
|
if (!storyboard || isUndefined5(height) || isEmptyString2(height)) return null;
|
|
13065
13042
|
const {
|
|
13066
13043
|
url,
|
|
@@ -13072,9 +13049,11 @@ var Thumbnail = forwardRef30(
|
|
|
13072
13049
|
aspectRatio
|
|
13073
13050
|
} = storyboard;
|
|
13074
13051
|
const targetWidth = isString2(width) ? parseInt(width, 10) : Number(width);
|
|
13075
|
-
|
|
13052
|
+
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
13053
|
+
return /* @__PURE__ */ jsx270(
|
|
13076
13054
|
ThumbnailStoryboardViewer,
|
|
13077
13055
|
{
|
|
13056
|
+
cursorPosition: effectiveCursorPosition,
|
|
13078
13057
|
frameCount,
|
|
13079
13058
|
frameHeight,
|
|
13080
13059
|
frameWidth,
|
|
@@ -13086,12 +13065,12 @@ var Thumbnail = forwardRef30(
|
|
|
13086
13065
|
targetWidth
|
|
13087
13066
|
}
|
|
13088
13067
|
);
|
|
13089
|
-
}, [storyboard, percent, width, height]);
|
|
13068
|
+
}, [storyboard, percent, width, height, cursorPosition, isStoryboardReady]);
|
|
13090
13069
|
let thumbnailContent = null;
|
|
13091
13070
|
if (shouldRenderStoryboard) {
|
|
13092
13071
|
thumbnailContent = renderStoryboard();
|
|
13093
|
-
} else if (
|
|
13094
|
-
thumbnailContent = /* @__PURE__ */
|
|
13072
|
+
} else if (isNotNil36(thumbnailUrl)) {
|
|
13073
|
+
thumbnailContent = /* @__PURE__ */ jsx270(
|
|
13095
13074
|
ThumbnailImage,
|
|
13096
13075
|
{
|
|
13097
13076
|
thumbnailImageType,
|
|
@@ -13101,7 +13080,7 @@ var Thumbnail = forwardRef30(
|
|
|
13101
13080
|
} else {
|
|
13102
13081
|
thumbnailContent = null;
|
|
13103
13082
|
}
|
|
13104
|
-
return /* @__PURE__ */
|
|
13083
|
+
return /* @__PURE__ */ jsxs47(
|
|
13105
13084
|
StyledThumbnail,
|
|
13106
13085
|
{
|
|
13107
13086
|
ref,
|
|
@@ -13115,7 +13094,7 @@ var Thumbnail = forwardRef30(
|
|
|
13115
13094
|
onMouseOut: handleMouseOut,
|
|
13116
13095
|
role: "presentation",
|
|
13117
13096
|
children: [
|
|
13118
|
-
|
|
13097
|
+
isNotNil36(children) ? children : null,
|
|
13119
13098
|
thumbnailContent
|
|
13120
13099
|
]
|
|
13121
13100
|
}
|
|
@@ -13126,10 +13105,10 @@ Thumbnail.displayName = "Thumbnail";
|
|
|
13126
13105
|
|
|
13127
13106
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
13128
13107
|
import React2 from "react";
|
|
13129
|
-
import
|
|
13108
|
+
import styled74 from "styled-components";
|
|
13130
13109
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
13131
|
-
import { jsx as
|
|
13132
|
-
var StyledThumbnailCollage =
|
|
13110
|
+
import { jsx as jsx271 } from "react/jsx-runtime";
|
|
13111
|
+
var StyledThumbnailCollage = styled74.div`
|
|
13133
13112
|
display: grid;
|
|
13134
13113
|
gap: var(--wui-space-01);
|
|
13135
13114
|
width: 100%;
|
|
@@ -13211,7 +13190,7 @@ var ThumbnailCollage = ({
|
|
|
13211
13190
|
});
|
|
13212
13191
|
}) : [
|
|
13213
13192
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
13214
|
-
/* @__PURE__ */
|
|
13193
|
+
/* @__PURE__ */ jsx271(
|
|
13215
13194
|
Thumbnail,
|
|
13216
13195
|
{
|
|
13217
13196
|
gradientBackground,
|
|
@@ -13220,7 +13199,7 @@ var ThumbnailCollage = ({
|
|
|
13220
13199
|
"fallback"
|
|
13221
13200
|
)
|
|
13222
13201
|
];
|
|
13223
|
-
return /* @__PURE__ */
|
|
13202
|
+
return /* @__PURE__ */ jsx271(
|
|
13224
13203
|
StyledThumbnailCollage,
|
|
13225
13204
|
{
|
|
13226
13205
|
$gradientBackground: gradientBackground,
|
|
@@ -13232,26 +13211,26 @@ var ThumbnailCollage = ({
|
|
|
13232
13211
|
};
|
|
13233
13212
|
|
|
13234
13213
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
13235
|
-
import
|
|
13236
|
-
import { isNotNil as
|
|
13237
|
-
import { jsx as
|
|
13214
|
+
import styled75, { css as css40 } from "styled-components";
|
|
13215
|
+
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
13216
|
+
import { jsx as jsx272, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
13238
13217
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
13239
13218
|
if (iconOnly) {
|
|
13240
|
-
return /* @__PURE__ */
|
|
13219
|
+
return /* @__PURE__ */ jsx272(
|
|
13241
13220
|
"g",
|
|
13242
13221
|
{
|
|
13243
13222
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
13244
13223
|
fill: brandmarkColor,
|
|
13245
|
-
children: /* @__PURE__ */
|
|
13224
|
+
children: /* @__PURE__ */ jsx272("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" })
|
|
13246
13225
|
}
|
|
13247
13226
|
);
|
|
13248
13227
|
}
|
|
13249
|
-
return /* @__PURE__ */
|
|
13228
|
+
return /* @__PURE__ */ jsx272(
|
|
13250
13229
|
"g",
|
|
13251
13230
|
{
|
|
13252
13231
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
13253
13232
|
fill: brandmarkColor,
|
|
13254
|
-
children: /* @__PURE__ */
|
|
13233
|
+
children: /* @__PURE__ */ jsx272("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" })
|
|
13255
13234
|
}
|
|
13256
13235
|
);
|
|
13257
13236
|
};
|
|
@@ -13259,12 +13238,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
13259
13238
|
if (iconOnly) {
|
|
13260
13239
|
return null;
|
|
13261
13240
|
}
|
|
13262
|
-
return /* @__PURE__ */
|
|
13241
|
+
return /* @__PURE__ */ jsx272(
|
|
13263
13242
|
"g",
|
|
13264
13243
|
{
|
|
13265
13244
|
"data-testid": "ui-wistia-logo-logotype",
|
|
13266
13245
|
fill: logotypeColor,
|
|
13267
|
-
children: /* @__PURE__ */
|
|
13246
|
+
children: /* @__PURE__ */ jsx272("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" })
|
|
13268
13247
|
}
|
|
13269
13248
|
);
|
|
13270
13249
|
};
|
|
@@ -13274,7 +13253,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
13274
13253
|
}
|
|
13275
13254
|
return "0 0 144 31.47";
|
|
13276
13255
|
};
|
|
13277
|
-
var WistiaLogoComponent =
|
|
13256
|
+
var WistiaLogoComponent = styled75.svg`
|
|
13278
13257
|
height: ${({ height }) => `${height}px`};
|
|
13279
13258
|
|
|
13280
13259
|
/* ensure it will always fit on mobile */
|
|
@@ -13332,7 +13311,7 @@ var WistiaLogo = ({
|
|
|
13332
13311
|
};
|
|
13333
13312
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
13334
13313
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
13335
|
-
const Logo = /* @__PURE__ */
|
|
13314
|
+
const Logo = /* @__PURE__ */ jsxs48(
|
|
13336
13315
|
WistiaLogoComponent,
|
|
13337
13316
|
{
|
|
13338
13317
|
$hoverColor: hoverColor,
|
|
@@ -13345,38 +13324,38 @@ var WistiaLogo = ({
|
|
|
13345
13324
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13346
13325
|
...props,
|
|
13347
13326
|
children: [
|
|
13348
|
-
/* @__PURE__ */
|
|
13349
|
-
|
|
13327
|
+
/* @__PURE__ */ jsx272("title", { children: title }),
|
|
13328
|
+
isNotNil37(description) ? /* @__PURE__ */ jsx272("desc", { children: description }) : null,
|
|
13350
13329
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
13351
13330
|
renderLogotype(logotypeColor, iconOnly)
|
|
13352
13331
|
]
|
|
13353
13332
|
}
|
|
13354
13333
|
);
|
|
13355
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
13334
|
+
return href !== void 0 ? /* @__PURE__ */ jsx272("a", { href, children: Logo }) : Logo;
|
|
13356
13335
|
};
|
|
13357
13336
|
WistiaLogo.displayName = "WistiaLogo";
|
|
13358
13337
|
|
|
13359
13338
|
// src/components/List/List.tsx
|
|
13360
|
-
import { isNotNil as
|
|
13361
|
-
import
|
|
13339
|
+
import { isNotNil as isNotNil38 } from "@wistia/type-guards";
|
|
13340
|
+
import styled77, { css as css41 } from "styled-components";
|
|
13362
13341
|
|
|
13363
13342
|
// src/components/List/ListItem.tsx
|
|
13364
|
-
import
|
|
13365
|
-
import { isNil as
|
|
13366
|
-
import { jsx as
|
|
13367
|
-
var ListItemComponent =
|
|
13343
|
+
import styled76 from "styled-components";
|
|
13344
|
+
import { isNil as isNil16 } from "@wistia/type-guards";
|
|
13345
|
+
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
13346
|
+
var ListItemComponent = styled76.li`
|
|
13368
13347
|
margin-bottom: var(--wui-space-02);
|
|
13369
13348
|
`;
|
|
13370
13349
|
var ListItem = ({ children }) => {
|
|
13371
|
-
if (
|
|
13350
|
+
if (isNil16(children)) {
|
|
13372
13351
|
return null;
|
|
13373
13352
|
}
|
|
13374
|
-
return /* @__PURE__ */
|
|
13353
|
+
return /* @__PURE__ */ jsx273(ListItemComponent, { children });
|
|
13375
13354
|
};
|
|
13376
13355
|
ListItem.displayName = "ListItem";
|
|
13377
13356
|
|
|
13378
13357
|
// src/components/List/List.tsx
|
|
13379
|
-
import { jsx as
|
|
13358
|
+
import { jsx as jsx274, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
13380
13359
|
var spacesStyle = css41`
|
|
13381
13360
|
overflow: hidden;
|
|
13382
13361
|
padding-left: 0;
|
|
@@ -13435,7 +13414,7 @@ var unbulletedStyle = css41`
|
|
|
13435
13414
|
list-style: none;
|
|
13436
13415
|
padding-left: 0;
|
|
13437
13416
|
`;
|
|
13438
|
-
var ListComponent =
|
|
13417
|
+
var ListComponent = styled77.ul`
|
|
13439
13418
|
list-style-position: outside;
|
|
13440
13419
|
margin: 0 0 var(--wui-space-01);
|
|
13441
13420
|
padding: 0 0 0 var(--wui-space-04);
|
|
@@ -13462,7 +13441,7 @@ var ListComponent = styled78.ul`
|
|
|
13462
13441
|
`;
|
|
13463
13442
|
var renderListComponent = (listItems, variant, { ...otherProps }) => {
|
|
13464
13443
|
const elementType = variant === "ordered" ? "ol" : "ul";
|
|
13465
|
-
return /* @__PURE__ */
|
|
13444
|
+
return /* @__PURE__ */ jsx274(
|
|
13466
13445
|
ListComponent,
|
|
13467
13446
|
{
|
|
13468
13447
|
as: elementType,
|
|
@@ -13479,7 +13458,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
13479
13458
|
const nextItem = listItems[i + 1];
|
|
13480
13459
|
const key = `item-${itemCount += 1}`;
|
|
13481
13460
|
if (Array.isArray(nextItem)) {
|
|
13482
|
-
return /* @__PURE__ */
|
|
13461
|
+
return /* @__PURE__ */ jsxs49(ListItem, { children: [
|
|
13483
13462
|
item,
|
|
13484
13463
|
renderListFromArray(nextItem, variant, otherProps)
|
|
13485
13464
|
] }, key);
|
|
@@ -13487,7 +13466,7 @@ var renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
13487
13466
|
if (Array.isArray(item)) {
|
|
13488
13467
|
return null;
|
|
13489
13468
|
}
|
|
13490
|
-
return /* @__PURE__ */
|
|
13469
|
+
return /* @__PURE__ */ jsx274(ListItem, { children: item }, key);
|
|
13491
13470
|
});
|
|
13492
13471
|
return renderListComponent(items, variant, otherProps);
|
|
13493
13472
|
};
|
|
@@ -13498,13 +13477,13 @@ var List = ({
|
|
|
13498
13477
|
...otherProps
|
|
13499
13478
|
}) => {
|
|
13500
13479
|
const listVariant = variant ?? "bullets";
|
|
13501
|
-
if (
|
|
13480
|
+
if (isNotNil38(children)) {
|
|
13502
13481
|
if (Array.isArray(children) && !children.length) {
|
|
13503
13482
|
return null;
|
|
13504
13483
|
}
|
|
13505
13484
|
return renderListComponent(children, listVariant, otherProps);
|
|
13506
13485
|
}
|
|
13507
|
-
if (
|
|
13486
|
+
if (isNotNil38(items)) {
|
|
13508
13487
|
if (!items.length) {
|
|
13509
13488
|
return null;
|
|
13510
13489
|
}
|
|
@@ -13578,7 +13557,6 @@ export {
|
|
|
13578
13557
|
Stack,
|
|
13579
13558
|
SubMenu,
|
|
13580
13559
|
Switch,
|
|
13581
|
-
Tab,
|
|
13582
13560
|
Table,
|
|
13583
13561
|
TableBody,
|
|
13584
13562
|
TableCell,
|
|
@@ -13586,6 +13564,9 @@ export {
|
|
|
13586
13564
|
TableHead,
|
|
13587
13565
|
TableRow,
|
|
13588
13566
|
Tabs,
|
|
13567
|
+
TabsContent,
|
|
13568
|
+
TabsList,
|
|
13569
|
+
TabsTrigger,
|
|
13589
13570
|
Tag,
|
|
13590
13571
|
Text,
|
|
13591
13572
|
Thumbnail,
|