@wistia/ui 0.15.14-beta.1e41934b.72b042b → 0.15.14-beta.50e89a95.396fb5b

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.15.14-beta.1e41934b.72b042b
3
+ * @license @wistia/ui v0.15.14-beta.50e89a95.396fb5b
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -14937,6 +14937,7 @@ var FormField = ({
14937
14937
  label,
14938
14938
  labelPosition,
14939
14939
  name,
14940
+ required = false,
14940
14941
  value,
14941
14942
  ...props
14942
14943
  }) => {
@@ -14986,7 +14987,14 @@ var FormField = ({
14986
14987
  ...props,
14987
14988
  "data-label-position": labelPosition ?? formState.labelPosition,
14988
14989
  children: [
14989
- !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(Label, { htmlFor: computedId, children: label }),
14990
+ !isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(
14991
+ Label,
14992
+ {
14993
+ htmlFor: computedId,
14994
+ required,
14995
+ children: label
14996
+ }
14997
+ ),
14990
14998
  (0, import_type_guards49.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
14991
14999
  (0, import_react73.cloneElement)(children, childProps),
14992
15000
  (0, import_type_guards49.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime283.jsxs)(import_jsx_runtime283.Fragment, { children: [
@@ -15516,7 +15524,7 @@ Mark.displayName = "Mark_UI";
15516
15524
  var import_react80 = require("react");
15517
15525
  var import_styled_components97 = __toESM(require("styled-components"));
15518
15526
  var import_react_dialog5 = require("@radix-ui/react-dialog");
15519
- var import_type_guards57 = require("@wistia/type-guards");
15527
+ var import_type_guards58 = require("@wistia/type-guards");
15520
15528
 
15521
15529
  // src/components/Modal/ModalHeader.tsx
15522
15530
  var import_styled_components94 = __toESM(require("styled-components"));
@@ -15592,6 +15600,7 @@ var ModalHeader = ({
15592
15600
  var import_react79 = require("react");
15593
15601
  var import_styled_components95 = __toESM(require("styled-components"));
15594
15602
  var import_react_dialog3 = require("@radix-ui/react-dialog");
15603
+ var import_type_guards57 = require("@wistia/type-guards");
15595
15604
 
15596
15605
  // src/private/hooks/useFocusRestore/useFocusRestore.ts
15597
15606
  var import_react78 = require("react");
@@ -15729,9 +15738,14 @@ var StyledModalContent = (0, import_styled_components95.default)(import_react_di
15729
15738
  position: fixed;
15730
15739
  top: unset;
15731
15740
  left: unset;
15732
- width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
15741
+ width: ${({ $width, $maxWidth }) => {
15742
+ if ((0, import_type_guards57.isNotNil)($maxWidth)) {
15743
+ return "auto";
15744
+ }
15745
+ return $width ?? DEFAULT_MODAL_WIDTH;
15746
+ }};
15733
15747
  min-width: ${({ $width }) => $width ?? DEFAULT_MODAL_WIDTH};
15734
- max-width: var(--wui-modal-max-width);
15748
+ max-width: ${({ $maxWidth }) => $maxWidth ?? "var(--wui-modal-max-width)"};
15735
15749
  border-radius: var(--wui-border-radius-03);
15736
15750
  animation-duration: var(--wui-motion-duration-03);
15737
15751
  animation-timing-function: var(--wui-motion-ease-out);
@@ -15740,12 +15754,13 @@ var StyledModalContent = (0, import_styled_components95.default)(import_react_di
15740
15754
  }
15741
15755
  `;
15742
15756
  var ModalContent = (0, import_react79.forwardRef)(
15743
- ({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
15757
+ ({ width, positionVariant = "fixed-top", maxWidth, children, ...props }, ref) => {
15744
15758
  useFocusRestore();
15745
15759
  return /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(
15746
15760
  StyledModalContent,
15747
15761
  {
15748
15762
  ref,
15763
+ $maxWidth: maxWidth,
15749
15764
  $positionVariant: positionVariant,
15750
15765
  $width: width,
15751
15766
  "aria-describedby": void 0,
@@ -15815,6 +15830,7 @@ var Modal = (0, import_react80.forwardRef)(
15815
15830
  hideTitle = false,
15816
15831
  initialFocusRef,
15817
15832
  isOpen,
15833
+ maxWidth,
15818
15834
  onRequestClose,
15819
15835
  positionVariant = "centered",
15820
15836
  title,
@@ -15825,7 +15841,7 @@ var Modal = (0, import_react80.forwardRef)(
15825
15841
  import_react_dialog5.Root,
15826
15842
  {
15827
15843
  onOpenChange: (open2) => {
15828
- if (!open2 && (0, import_type_guards57.isNotNil)(onRequestClose)) {
15844
+ if (!open2 && (0, import_type_guards58.isNotNil)(onRequestClose)) {
15829
15845
  onRequestClose();
15830
15846
  }
15831
15847
  },
@@ -15836,8 +15852,9 @@ var Modal = (0, import_react80.forwardRef)(
15836
15852
  ModalContent,
15837
15853
  {
15838
15854
  ref,
15855
+ maxWidth,
15839
15856
  onOpenAutoFocus: (event) => {
15840
- if ((0, import_type_guards57.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15857
+ if ((0, import_type_guards58.isNotNil)(initialFocusRef) && initialFocusRef.current) {
15841
15858
  event.preventDefault();
15842
15859
  requestAnimationFrame(() => {
15843
15860
  initialFocusRef.current?.focus();
@@ -15849,7 +15866,7 @@ var Modal = (0, import_react80.forwardRef)(
15849
15866
  ...props,
15850
15867
  children: [
15851
15868
  /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalScrollArea, { children: /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalBody, { children }) }),
15852
- (0, import_type_guards57.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15869
+ (0, import_type_guards58.isNotNil)(footer) ? /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(ModalFooter, { children: footer }) : null,
15853
15870
  hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(
15854
15871
  ModalHeader,
15855
15872
  {
@@ -15895,9 +15912,9 @@ var import_react_popover5 = require("@radix-ui/react-popover");
15895
15912
  var import_styled_components99 = __toESM(require("styled-components"));
15896
15913
 
15897
15914
  // src/private/helpers/getControls/getControlProps.tsx
15898
- var import_type_guards58 = require("@wistia/type-guards");
15915
+ var import_type_guards59 = require("@wistia/type-guards");
15899
15916
  var getControlProps = (isOpen, onOpenChange) => {
15900
- return (0, import_type_guards58.isNotNil)(onOpenChange) && (0, import_type_guards58.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15917
+ return (0, import_type_guards59.isNotNil)(onOpenChange) && (0, import_type_guards59.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
15901
15918
  };
15902
15919
 
15903
15920
  // src/components/Popover/PopoverArrow.tsx
@@ -16053,7 +16070,7 @@ Popover.displayName = "Popover_UI";
16053
16070
  // src/components/ProgressBar/ProgressBar.tsx
16054
16071
  var import_styled_components100 = __toESM(require("styled-components"));
16055
16072
  var import_react_progress = require("@radix-ui/react-progress");
16056
- var import_type_guards59 = require("@wistia/type-guards");
16073
+ var import_type_guards60 = require("@wistia/type-guards");
16057
16074
  var import_jsx_runtime299 = require("react/jsx-runtime");
16058
16075
  var ProgressBarWrapper = import_styled_components100.default.div`
16059
16076
  --progress-bar-height: 8px;
@@ -16109,7 +16126,7 @@ var ProgressBar = ({
16109
16126
  ...props
16110
16127
  }) => {
16111
16128
  return /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(ProgressBarWrapper, { children: [
16112
- (0, import_type_guards59.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16129
+ (0, import_type_guards60.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
16113
16130
  /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
16114
16131
  StyledProgressBar,
16115
16132
  {
@@ -16127,13 +16144,13 @@ var ProgressBar = ({
16127
16144
  )
16128
16145
  }
16129
16146
  ),
16130
- (0, import_type_guards59.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16147
+ (0, import_type_guards60.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(ProgressBarLabel, { children: labelRight }) : null
16131
16148
  ] });
16132
16149
  };
16133
16150
  ProgressBar.displayName = "ProgressBar_UI";
16134
16151
 
16135
16152
  // src/components/Radio/Radio.tsx
16136
- var import_type_guards60 = require("@wistia/type-guards");
16153
+ var import_type_guards61 = require("@wistia/type-guards");
16137
16154
  var import_react81 = require("react");
16138
16155
  var import_styled_components101 = __toESM(require("styled-components"));
16139
16156
  var import_jsx_runtime300 = require("react/jsx-runtime");
@@ -16233,14 +16250,14 @@ var Radio = (0, import_react81.forwardRef)(
16233
16250
  ...props
16234
16251
  }, ref) => {
16235
16252
  const generatedId = (0, import_react81.useId)();
16236
- const computedId = (0, import_type_guards60.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16253
+ const computedId = (0, import_type_guards61.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16237
16254
  const radioGroupContext = useRadioGroup();
16238
16255
  const contextName = radioGroupContext?.name;
16239
16256
  const contextOnChange = radioGroupContext?.onChange;
16240
16257
  const contextValue = radioGroupContext?.value;
16241
16258
  const radioName = name ?? contextName;
16242
16259
  const handleOnChange = onChange ?? contextOnChange;
16243
- const isChecked = (0, import_type_guards60.isNotUndefined)(value) && (0, import_type_guards60.isNotUndefined)(contextValue) ? contextValue === value : checked;
16260
+ const isChecked = (0, import_type_guards61.isNotUndefined)(value) && (0, import_type_guards61.isNotUndefined)(contextValue) ? contextValue === value : checked;
16244
16261
  return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
16245
16262
  StyledRadioWrapper,
16246
16263
  {
@@ -16287,7 +16304,7 @@ var import_react83 = require("react");
16287
16304
  // src/components/RadioCard/RadioCardRoot.tsx
16288
16305
  var import_react82 = require("react");
16289
16306
  var import_styled_components102 = __toESM(require("styled-components"));
16290
- var import_type_guards61 = require("@wistia/type-guards");
16307
+ var import_type_guards62 = require("@wistia/type-guards");
16291
16308
  var import_jsx_runtime301 = require("react/jsx-runtime");
16292
16309
  var checkedStyles = import_styled_components102.css`
16293
16310
  --wui-radio-card-border-color: var(--wui-color-focus-ring);
@@ -16409,14 +16426,14 @@ var RadioCardRoot = (0, import_react82.forwardRef)(
16409
16426
  ...props
16410
16427
  }, ref) => {
16411
16428
  const generatedId = (0, import_react82.useId)();
16412
- const computedId = (0, import_type_guards61.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16429
+ const computedId = (0, import_type_guards62.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
16413
16430
  const radioGroupContext = useRadioGroup();
16414
16431
  const contextName = radioGroupContext?.name;
16415
16432
  const contextOnChange = radioGroupContext?.onChange;
16416
16433
  const contextValue = radioGroupContext?.value;
16417
16434
  const radioName = name ?? contextName;
16418
16435
  const handleOnChange = onChange ?? contextOnChange;
16419
- const isChecked = (0, import_type_guards61.isNotUndefined)(value) && (0, import_type_guards61.isNotUndefined)(contextValue) ? contextValue === value : checked;
16436
+ const isChecked = (0, import_type_guards62.isNotUndefined)(value) && (0, import_type_guards62.isNotUndefined)(contextValue) ? contextValue === value : checked;
16420
16437
  return /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(
16421
16438
  StyledCard2,
16422
16439
  {
@@ -16448,7 +16465,7 @@ RadioCardRoot.displayName = "RadioCardRoot_UI";
16448
16465
 
16449
16466
  // src/components/RadioCard/RadioCardDefaultLayout.tsx
16450
16467
  var import_styled_components104 = __toESM(require("styled-components"));
16451
- var import_type_guards62 = require("@wistia/type-guards");
16468
+ var import_type_guards63 = require("@wistia/type-guards");
16452
16469
 
16453
16470
  // src/components/RadioCard/RadioCardIndicator.tsx
16454
16471
  var import_styled_components103 = __toESM(require("styled-components"));
@@ -16522,17 +16539,17 @@ var RadioCardDefaultLayout = ({
16522
16539
  showIndicator = true
16523
16540
  }) => {
16524
16541
  return /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(StyledCardContent, { children: [
16525
- showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledIndicatorContainer, { $hasIcon: (0, import_type_guards62.isNotNil)(icon), children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
16542
+ showIndicator ? /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledIndicatorContainer, { $hasIcon: (0, import_type_guards63.isNotNil)(icon), children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(RadioCardIndicator, { "data-testid": "wui-radio-card-indicator" }) }) : null,
16526
16543
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(Stack, { gap: "space-02", children: [
16527
- (0, import_type_guards62.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16544
+ (0, import_type_guards63.isNotNil)(icon) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(StyledCardIcon, { "data-wui-radio-card-icon": true, children: icon }),
16528
16545
  /* @__PURE__ */ (0, import_jsx_runtime302.jsxs)(
16529
16546
  Stack,
16530
16547
  {
16531
16548
  gap: "space-01",
16532
- style: (0, import_type_guards62.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16549
+ style: (0, import_type_guards63.isNotNil)(icon) ? { paddingLeft: 2 } : void 0,
16533
16550
  children: [
16534
- (0, import_type_guards62.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Text, { variant: "label3", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("strong", { children: label }) }),
16535
- (0, import_type_guards62.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16551
+ (0, import_type_guards63.isNotNil)(label) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(Text, { variant: "label3", children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)("strong", { children: label }) }),
16552
+ (0, import_type_guards63.isNotNil)(description) && /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
16536
16553
  Text,
16537
16554
  {
16538
16555
  prominence: "secondary",
@@ -16715,7 +16732,7 @@ ScrollArea.displayName = "ScrollArea_UI";
16715
16732
  var import_react88 = require("react");
16716
16733
  var import_styled_components108 = __toESM(require("styled-components"));
16717
16734
  var import_react_toggle_group3 = require("@radix-ui/react-toggle-group");
16718
- var import_type_guards64 = require("@wistia/type-guards");
16735
+ var import_type_guards65 = require("@wistia/type-guards");
16719
16736
 
16720
16737
  // src/components/SegmentedControl/useSelectedItemStyle.tsx
16721
16738
  var import_react86 = require("react");
@@ -16752,7 +16769,7 @@ var useSelectedItemStyle = () => {
16752
16769
 
16753
16770
  // src/components/SegmentedControl/SelectedItemIndicator.tsx
16754
16771
  var import_styled_components107 = __toESM(require("styled-components"));
16755
- var import_type_guards63 = require("@wistia/type-guards");
16772
+ var import_type_guards64 = require("@wistia/type-guards");
16756
16773
 
16757
16774
  // src/components/SegmentedControl/useSegmentedControlValue.tsx
16758
16775
  var import_react87 = require("react");
@@ -16786,7 +16803,7 @@ var SelectedItemIndicatorDiv = import_styled_components107.default.div`
16786
16803
  var SelectedItemIndicator = () => {
16787
16804
  const selectedValue = useSegmentedControlValue();
16788
16805
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
16789
- if (!selectedValue || (0, import_type_guards63.isUndefined)(selectedItemIndicatorStyle)) {
16806
+ if (!selectedValue || (0, import_type_guards64.isUndefined)(selectedItemIndicatorStyle)) {
16790
16807
  return null;
16791
16808
  }
16792
16809
  return /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
@@ -16823,7 +16840,7 @@ var SegmentedControl = (0, import_react88.forwardRef)(
16823
16840
  onSelectedValueChange,
16824
16841
  ...props
16825
16842
  }, ref) => {
16826
- if ((0, import_type_guards64.isNil)(children)) {
16843
+ if ((0, import_type_guards65.isNil)(children)) {
16827
16844
  return null;
16828
16845
  }
16829
16846
  return /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
@@ -16852,7 +16869,7 @@ SegmentedControl.displayName = "SegmentedControl_UI";
16852
16869
  var import_react89 = require("react");
16853
16870
  var import_styled_components109 = __toESM(require("styled-components"));
16854
16871
  var import_react_toggle_group4 = require("@radix-ui/react-toggle-group");
16855
- var import_type_guards65 = require("@wistia/type-guards");
16872
+ var import_type_guards66 = require("@wistia/type-guards");
16856
16873
  var import_jsx_runtime309 = require("react/jsx-runtime");
16857
16874
  var segmentedControlItemStyles = import_styled_components109.css`
16858
16875
  all: unset; /* ToggleGroupItem is a button element */
@@ -16968,8 +16985,8 @@ var SegmentedControlItem = (0, import_react89.forwardRef)(
16968
16985
  {
16969
16986
  ref: combinedRef,
16970
16987
  ...otherProps,
16971
- $hasLabel: (0, import_type_guards65.isNotNil)(label),
16972
- "aria-label": (0, import_type_guards65.isNotNil)(label) ? void 0 : ariaLabel,
16988
+ $hasLabel: (0, import_type_guards66.isNotNil)(label),
16989
+ "aria-label": (0, import_type_guards66.isNotNil)(label) ? void 0 : ariaLabel,
16973
16990
  disabled,
16974
16991
  onClick: handleClick,
16975
16992
  value,
@@ -16997,6 +17014,7 @@ var StyledTrigger2 = (0, import_styled_components110.default)(import_react_selec
16997
17014
  outline: 1px solid var(--wui-input-color-border);
16998
17015
  outline-offset: -2px;
16999
17016
  border-radius: var(--wui-input-border-radius);
17017
+ min-width: 200px;
17000
17018
  text-align: left;
17001
17019
  display: inline-flex;
17002
17020
  align-items: center;
@@ -17133,14 +17151,13 @@ Select.displayName = "Select_UI";
17133
17151
  var import_react_select2 = require("@radix-ui/react-select");
17134
17152
  var import_react91 = require("react");
17135
17153
  var import_styled_components111 = __toESM(require("styled-components"));
17136
- var import_type_guards66 = require("@wistia/type-guards");
17154
+ var import_type_guards67 = require("@wistia/type-guards");
17137
17155
  var import_jsx_runtime311 = require("react/jsx-runtime");
17138
17156
  var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
17139
17157
  ${getTypographicStyles("label3")}
17140
17158
  align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
17141
17159
  background-color: transparent;
17142
17160
  display: flex;
17143
- gap: var(--wui-space-01);
17144
17161
  padding: var(--wui-select-option-padding);
17145
17162
  justify-content: space-between;
17146
17163
  font-size: var(--font-size);
@@ -17171,7 +17188,7 @@ var SelectOption = (0, import_react91.forwardRef)(
17171
17188
  ref: forwardedRef,
17172
17189
  $checkmarkVerticalAlign: checkmarkVerticalAlign,
17173
17190
  children: [
17174
- (0, import_type_guards66.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17191
+ (0, import_type_guards67.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { children: [
17175
17192
  children,
17176
17193
  /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("div", { style: { display: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children: selectedDisplayValue }) })
17177
17194
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(import_react_select2.ItemText, { children }),
@@ -17213,7 +17230,7 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
17213
17230
  // src/components/Slider/Slider.tsx
17214
17231
  var import_react_slider2 = require("@radix-ui/react-slider");
17215
17232
  var import_styled_components113 = __toESM(require("styled-components"));
17216
- var import_type_guards67 = require("@wistia/type-guards");
17233
+ var import_type_guards68 = require("@wistia/type-guards");
17217
17234
  var import_jsx_runtime313 = require("react/jsx-runtime");
17218
17235
  var SliderContainer = import_styled_components113.default.div`
17219
17236
  --wui-slider-track-color: var(--wui-gray-6);
@@ -17292,7 +17309,7 @@ var Slider = ({
17292
17309
  "data-testid": dataTestId = "ui-slider",
17293
17310
  ...otherProps
17294
17311
  }) => {
17295
- if (!((0, import_type_guards67.isNonEmptyString)(ariaLabel) || (0, import_type_guards67.isNonEmptyString)(ariaLabelledby))) {
17312
+ if (!((0, import_type_guards68.isNonEmptyString)(ariaLabel) || (0, import_type_guards68.isNonEmptyString)(ariaLabelledby))) {
17296
17313
  throw new Error(
17297
17314
  "UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop."
17298
17315
  );
@@ -17454,7 +17471,7 @@ var TableRow = ({ children, ...props }) => {
17454
17471
  // src/components/Tabs/Tabs.tsx
17455
17472
  var import_react_tabs = require("@radix-ui/react-tabs");
17456
17473
  var import_react98 = require("react");
17457
- var import_type_guards68 = require("@wistia/type-guards");
17474
+ var import_type_guards69 = require("@wistia/type-guards");
17458
17475
 
17459
17476
  // src/components/Tabs/useTabsValue.tsx
17460
17477
  var import_react97 = require("react");
@@ -17491,10 +17508,10 @@ var Tabs = ({
17491
17508
  ...props,
17492
17509
  onValueChange
17493
17510
  };
17494
- if ((0, import_type_guards68.isNotNil)(value)) {
17511
+ if ((0, import_type_guards69.isNotNil)(value)) {
17495
17512
  rootProps.value = value;
17496
17513
  }
17497
- if ((0, import_type_guards68.isNotNil)(defaultValue)) {
17514
+ if ((0, import_type_guards69.isNotNil)(defaultValue)) {
17498
17515
  rootProps.defaultValue = defaultValue;
17499
17516
  }
17500
17517
  return /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(import_react_tabs.Root, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime320.jsx)(SelectedItemStyleProvider, { children }) }) });
@@ -17514,7 +17531,7 @@ var import_react_tabs3 = require("@radix-ui/react-tabs");
17514
17531
  var import_styled_components121 = __toESM(require("styled-components"));
17515
17532
 
17516
17533
  // src/components/Tabs/SelectedTabIndicator.tsx
17517
- var import_type_guards69 = require("@wistia/type-guards");
17534
+ var import_type_guards70 = require("@wistia/type-guards");
17518
17535
 
17519
17536
  // src/components/Tabs/TabsSelectedItemIndicatorDiv.tsx
17520
17537
  var import_styled_components120 = __toESM(require("styled-components"));
@@ -17529,7 +17546,7 @@ var import_jsx_runtime322 = require("react/jsx-runtime");
17529
17546
  var SelectedTabIndicator = () => {
17530
17547
  const { selectedItemIndicatorStyle } = useSelectedItemStyle();
17531
17548
  const selectedValue = useTabsValue();
17532
- if (selectedValue == null || (0, import_type_guards69.isUndefined)(selectedItemIndicatorStyle)) {
17549
+ if (selectedValue == null || (0, import_type_guards70.isUndefined)(selectedItemIndicatorStyle)) {
17533
17550
  return null;
17534
17551
  }
17535
17552
  return /* @__PURE__ */ (0, import_jsx_runtime322.jsx)(
@@ -17563,7 +17580,7 @@ TabsList.displayName = "TabsList_UI";
17563
17580
 
17564
17581
  // src/components/Tabs/TabsTrigger.tsx
17565
17582
  var import_react99 = require("react");
17566
- var import_type_guards70 = require("@wistia/type-guards");
17583
+ var import_type_guards71 = require("@wistia/type-guards");
17567
17584
 
17568
17585
  // src/components/Tabs/StyledRadixTabsTrigger.tsx
17569
17586
  var import_styled_components122 = __toESM(require("styled-components"));
@@ -17614,8 +17631,8 @@ var TabsTrigger = (0, import_react99.forwardRef)(
17614
17631
  {
17615
17632
  ...otherProps,
17616
17633
  ref: combinedRef,
17617
- $hasLabel: (0, import_type_guards70.isNotNil)(label),
17618
- "aria-label": (0, import_type_guards70.isNotNil)(label) ? void 0 : ariaLabel,
17634
+ $hasLabel: (0, import_type_guards71.isNotNil)(label),
17635
+ "aria-label": (0, import_type_guards71.isNotNil)(label) ? void 0 : ariaLabel,
17619
17636
  disabled,
17620
17637
  value,
17621
17638
  children: [
@@ -17630,7 +17647,7 @@ TabsTrigger.displayName = "TabsTrigger_UI";
17630
17647
 
17631
17648
  // src/components/Thumbnail/ThumbnailBadge.tsx
17632
17649
  var import_styled_components123 = __toESM(require("styled-components"));
17633
- var import_type_guards71 = require("@wistia/type-guards");
17650
+ var import_type_guards72 = require("@wistia/type-guards");
17634
17651
  var import_jsx_runtime325 = require("react/jsx-runtime");
17635
17652
  var StyledThumbnailBadge = import_styled_components123.default.div`
17636
17653
  align-items: center;
@@ -17659,7 +17676,7 @@ var StyledThumbnailBadge = import_styled_components123.default.div`
17659
17676
  `;
17660
17677
  var ThumbnailBadge = ({ icon, label, ...props }) => {
17661
17678
  return /* @__PURE__ */ (0, import_jsx_runtime325.jsxs)(StyledThumbnailBadge, { ...props, children: [
17662
- (0, import_type_guards71.isNotNil)(icon) && icon,
17679
+ (0, import_type_guards72.isNotNil)(icon) && icon,
17663
17680
  /* @__PURE__ */ (0, import_jsx_runtime325.jsx)("span", { children: label })
17664
17681
  ] });
17665
17682
  };
@@ -17668,10 +17685,10 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
17668
17685
  // src/components/Thumbnail/Thumbnail.tsx
17669
17686
  var import_react100 = require("react");
17670
17687
  var import_styled_components126 = __toESM(require("styled-components"));
17671
- var import_type_guards74 = require("@wistia/type-guards");
17688
+ var import_type_guards75 = require("@wistia/type-guards");
17672
17689
 
17673
17690
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
17674
- var import_type_guards72 = require("@wistia/type-guards");
17691
+ var import_type_guards73 = require("@wistia/type-guards");
17675
17692
  var import_styled_components124 = require("styled-components");
17676
17693
  var gradients = {
17677
17694
  defaultDarkOne: import_styled_components124.css`
@@ -17799,12 +17816,12 @@ var gradients = {
17799
17816
  };
17800
17817
  var gradientMap = Object.keys(gradients);
17801
17818
  var getBackgroundGradient = (gradientName = void 0) => {
17802
- return (0, import_type_guards72.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17819
+ return (0, import_type_guards73.isNotNil)(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
17803
17820
  };
17804
17821
 
17805
17822
  // src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
17806
17823
  var import_styled_components125 = __toESM(require("styled-components"));
17807
- var import_type_guards73 = require("@wistia/type-guards");
17824
+ var import_type_guards74 = require("@wistia/type-guards");
17808
17825
  var import_jsx_runtime326 = require("react/jsx-runtime");
17809
17826
  var ScrubLine = import_styled_components125.default.div`
17810
17827
  position: absolute;
@@ -17898,8 +17915,8 @@ var ThumbnailStoryboardViewer = ({
17898
17915
  );
17899
17916
  const backgroundSize = `${scaledStoryboardWidth}px ${scaledStoryboardHeight}px`;
17900
17917
  const backgroundImage = `url(${storyboardUrl})`;
17901
- const showScrubLine = (0, import_type_guards73.isNotNil)(cursorPosition);
17902
- const scrubLinePosition = (0, import_type_guards73.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17918
+ const showScrubLine = (0, import_type_guards74.isNotNil)(cursorPosition);
17919
+ const scrubLinePosition = (0, import_type_guards74.isNotNil)(cursorPosition) ? `${cursorPosition - 1}px` : "0";
17903
17920
  const viewerStyles = {
17904
17921
  position: "relative",
17905
17922
  overflow: "hidden",
@@ -17970,10 +17987,10 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
17970
17987
  );
17971
17988
  };
17972
17989
  var StyledThumbnail = import_styled_components126.default.div`
17973
- background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17990
+ background-image: ${({ $backgroundUrl }) => (0, import_type_guards75.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
17974
17991
  ${({ $backgroundUrl, $gradientBackground }) => (
17975
17992
  // if we don't have $backgroundUrl show a gradient
17976
- (0, import_type_guards74.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17993
+ (0, import_type_guards75.isNil)($backgroundUrl) ? getBackgroundGradient($gradientBackground) : void 0
17977
17994
  )};
17978
17995
  background-position: center center;
17979
17996
  background-size: cover;
@@ -18005,7 +18022,7 @@ var StoryboardRenderer = ({
18005
18022
  frameCount,
18006
18023
  aspectRatio
18007
18024
  } = storyboard;
18008
- const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
18025
+ const targetWidth = (0, import_type_guards75.isString)(width) ? parseInt(width, 10) : Number(width);
18009
18026
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
18010
18027
  return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
18011
18028
  ThumbnailStoryboardViewer,
@@ -18049,10 +18066,10 @@ var Thumbnail = (0, import_react100.forwardRef)(
18049
18066
  const storyboardElementRef = (0, import_react100.useRef)(null);
18050
18067
  const [cursorPosition, setCursorPosition] = (0, import_react100.useState)(null);
18051
18068
  const backgroundUrl = (0, import_react100.useMemo)(
18052
- () => thumbnailImageType === "square" && (0, import_type_guards74.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18069
+ () => thumbnailImageType === "square" && (0, import_type_guards75.isNotNil)(thumbnailUrl) ? thumbnailUrl : void 0,
18053
18070
  [thumbnailImageType, thumbnailUrl]
18054
18071
  );
18055
- const isScrubbable = (0, import_type_guards74.isNotNil)(storyboard);
18072
+ const isScrubbable = (0, import_type_guards75.isNotNil)(storyboard);
18056
18073
  const trackStoryboardLoadStatus = (0, import_react100.useCallback)(() => {
18057
18074
  if (storyboardElementRef.current || !storyboard) {
18058
18075
  return storyboardElementRef.current;
@@ -18082,7 +18099,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18082
18099
  setCursorPosition(null);
18083
18100
  }, [isScrubbable]);
18084
18101
  const shouldRenderStoryboard = (0, import_react100.useMemo)(() => {
18085
- if ((0, import_type_guards74.isNil)(storyboard) || (0, import_type_guards74.isUndefined)(height) || (0, import_type_guards74.isEmptyString)(height)) {
18102
+ if ((0, import_type_guards75.isNil)(storyboard) || (0, import_type_guards75.isUndefined)(height) || (0, import_type_guards75.isEmptyString)(height)) {
18086
18103
  return false;
18087
18104
  }
18088
18105
  return isScrubbable && isMouseOver && isStoryboardReady;
@@ -18099,7 +18116,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18099
18116
  width
18100
18117
  }
18101
18118
  );
18102
- } else if ((0, import_type_guards74.isNotNil)(thumbnailUrl)) {
18119
+ } else if ((0, import_type_guards75.isNotNil)(thumbnailUrl)) {
18103
18120
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
18104
18121
  ThumbnailImage,
18105
18122
  {
@@ -18124,7 +18141,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
18124
18141
  onMouseOut: handleMouseOut,
18125
18142
  role: "presentation",
18126
18143
  children: [
18127
- (0, import_type_guards74.isNotNil)(children) ? children : null,
18144
+ (0, import_type_guards75.isNotNil)(children) ? children : null,
18128
18145
  thumbnailContent
18129
18146
  ]
18130
18147
  }
@@ -18136,7 +18153,7 @@ Thumbnail.displayName = "Thumbnail_UI";
18136
18153
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
18137
18154
  var import_react101 = __toESM(require("react"));
18138
18155
  var import_styled_components127 = __toESM(require("styled-components"));
18139
- var import_type_guards75 = require("@wistia/type-guards");
18156
+ var import_type_guards76 = require("@wistia/type-guards");
18140
18157
  var import_jsx_runtime328 = (
18141
18158
  // ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
18142
18159
  require("react/jsx-runtime")
@@ -18216,7 +18233,7 @@ var ThumbnailCollage = ({
18216
18233
  }) => {
18217
18234
  const thumbnailArray = import_react101.default.Children.toArray(children);
18218
18235
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
18219
- const thumbnails = (0, import_type_guards75.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18236
+ const thumbnails = (0, import_type_guards76.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18220
18237
  return import_react101.default.cloneElement(child, {
18221
18238
  ...child.props,
18222
18239
  children: void 0
@@ -18244,7 +18261,7 @@ var ThumbnailCollage = ({
18244
18261
 
18245
18262
  // src/components/WistiaLogo/WistiaLogo.tsx
18246
18263
  var import_styled_components128 = __toESM(require("styled-components"));
18247
- var import_type_guards76 = require("@wistia/type-guards");
18264
+ var import_type_guards77 = require("@wistia/type-guards");
18248
18265
  var import_jsx_runtime329 = require("react/jsx-runtime");
18249
18266
  var renderBrandmark = (brandmarkColor, iconOnly) => {
18250
18267
  if (iconOnly) {
@@ -18357,7 +18374,7 @@ var WistiaLogo = ({
18357
18374
  ...props,
18358
18375
  children: [
18359
18376
  /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("title", { children: title }),
18360
- (0, import_type_guards76.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18377
+ (0, import_type_guards77.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime329.jsx)("desc", { children: description }) : null,
18361
18378
  renderBrandmark(brandmarkColor, iconOnly),
18362
18379
  renderLogotype(logotypeColor, iconOnly)
18363
18380
  ]
@@ -18369,7 +18386,7 @@ WistiaLogo.displayName = "WistiaLogo_UI";
18369
18386
 
18370
18387
  // src/components/SplitButton/SplitButton.tsx
18371
18388
  var import_styled_components129 = __toESM(require("styled-components"));
18372
- var import_type_guards77 = require("@wistia/type-guards");
18389
+ var import_type_guards78 = require("@wistia/type-guards");
18373
18390
  var import_react102 = require("react");
18374
18391
  var import_jsx_runtime330 = require("react/jsx-runtime");
18375
18392
  var StyledSplitButton = import_styled_components129.default.span`
@@ -18416,7 +18433,7 @@ var SplitButton = ({
18416
18433
  children
18417
18434
  }
18418
18435
  ),
18419
- (0, import_type_guards77.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18436
+ (0, import_type_guards78.isNotNil)(menuItems) && /* @__PURE__ */ (0, import_jsx_runtime330.jsx)(
18420
18437
  Menu,
18421
18438
  {
18422
18439
  ...menuProps,
@@ -18435,7 +18452,7 @@ var SplitButton = ({
18435
18452
  children: menuItems
18436
18453
  }
18437
18454
  ),
18438
- (0, import_type_guards77.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18455
+ (0, import_type_guards78.isNotNil)(secondaryAction) && (0, import_react102.cloneElement)(secondaryAction, { disabled, size, unstyled, variant, colorScheme })
18439
18456
  ] });
18440
18457
  };
18441
18458
  SplitButton.displayName = "SplitButton_UI";