@wistia/ui 0.10.3-beta.f9f033db.a9ffeb4 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1378,7 +1378,7 @@ type RadioGroupProps = FormGroupProps & {
1378
1378
  name?: string | undefined;
1379
1379
  };
1380
1380
  /**
1381
- * For grouping like form elements together.
1381
+ * For grouping like form elements together. Can serve as a checkbox
1382
1382
  */
1383
1383
  declare const RadioGroup: {
1384
1384
  ({ children, name, onChange, value, ...props }: RadioGroupProps): JSX.Element;
@@ -1391,7 +1391,7 @@ type CheckboxGroupProps = FormGroupProps & {
1391
1391
  name?: string | undefined;
1392
1392
  };
1393
1393
  /**
1394
- * For grouping like form elements together.
1394
+ * For grouping like form elements together. Can serve as a checkbox
1395
1395
  */
1396
1396
  declare const CheckboxGroup: {
1397
1397
  ({ children, name, onChange, value, ...props }: CheckboxGroupProps): JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1378,7 +1378,7 @@ type RadioGroupProps = FormGroupProps & {
1378
1378
  name?: string | undefined;
1379
1379
  };
1380
1380
  /**
1381
- * For grouping like form elements together.
1381
+ * For grouping like form elements together. Can serve as a checkbox
1382
1382
  */
1383
1383
  declare const RadioGroup: {
1384
1384
  ({ children, name, onChange, value, ...props }: RadioGroupProps): JSX.Element;
@@ -1391,7 +1391,7 @@ type CheckboxGroupProps = FormGroupProps & {
1391
1391
  name?: string | undefined;
1392
1392
  };
1393
1393
  /**
1394
- * For grouping like form elements together.
1394
+ * For grouping like form elements together. Can serve as a checkbox
1395
1395
  */
1396
1396
  declare const CheckboxGroup: {
1397
1397
  ({ children, name, onChange, value, ...props }: CheckboxGroupProps): JSX.Element;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.10.3-beta.f9f033db.a9ffeb4
3
+ * @license @wistia/ui v0.10.3
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8168,7 +8168,7 @@ Center.displayName = "Center";
8168
8168
  // src/components/Checkbox/Checkbox.tsx
8169
8169
  import { forwardRef as forwardRef9, useId } from "react";
8170
8170
  import styled23, { css as css23 } from "styled-components";
8171
- import { isNonEmptyString as isNonEmptyString2, isUndefined as isUndefined3 } from "@wistia/type-guards";
8171
+ import { isNonEmptyString as isNonEmptyString2 } from "@wistia/type-guards";
8172
8172
 
8173
8173
  // src/private/components/FormControlLabel/FormControlLabel.tsx
8174
8174
  import styled19, { css as css21 } from "styled-components";
@@ -8625,17 +8625,9 @@ var Checkbox = forwardRef9(
8625
8625
  const generatedId = useId();
8626
8626
  const computedId = isNonEmptyString2(id) ? id : `wistia-ui-checkbox-${generatedId}`;
8627
8627
  const checkboxGroupContext = useCheckboxGroup();
8628
- const groupName = checkboxGroupContext?.name;
8628
+ const contextName = checkboxGroupContext?.name;
8629
8629
  const contextOnChange = checkboxGroupContext?.onChange;
8630
- let checkboxName = name;
8631
- if (groupName) {
8632
- if (isUndefined3(value)) {
8633
- console.error("Checkbox in CheckboxGroup is missing a value prop.");
8634
- checkboxName = groupName;
8635
- } else {
8636
- checkboxName = `${groupName}[${value}]`;
8637
- }
8638
- }
8630
+ const checkboxName = name ?? contextName;
8639
8631
  const handleOnChange = onChange ?? contextOnChange;
8640
8632
  return /* @__PURE__ */ jsxs16(StyledCheckboxWrapper, { disabled, children: [
8641
8633
  /* @__PURE__ */ jsx214(
@@ -9775,7 +9767,7 @@ var EditableHeading = ({
9775
9767
  // src/components/Form/Form.tsx
9776
9768
  import { forwardRef as forwardRef12, useRef as useRef11, useMemo as useMemo6, createContext as createContext4, useState as useState11, useId as useId2 } from "react";
9777
9769
  import styled34 from "styled-components";
9778
- import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined4 } from "@wistia/type-guards";
9770
+ import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined3 } from "@wistia/type-guards";
9779
9771
  import { jsx as jsx226 } from "react/jsx-runtime";
9780
9772
  var StyledForm = styled34.form`
9781
9773
  --form-default-width: 690px;
@@ -9807,7 +9799,7 @@ var FormComponent = ({
9807
9799
  const id = props.id ?? autoId;
9808
9800
  const handleValidate = (nextFormData) => {
9809
9801
  const nextData = Object.fromEntries(nextFormData.entries());
9810
- if (isUndefined4(validate)) {
9802
+ if (isUndefined3(validate)) {
9811
9803
  return {};
9812
9804
  }
9813
9805
  return validate(nextData);
@@ -9953,7 +9945,7 @@ var FormErrorSummary = ({ description }) => {
9953
9945
  // src/components/FormField/FormField.tsx
9954
9946
  import { Children as Children4, cloneElement as cloneElement4, useContext as useContext5 } from "react";
9955
9947
  import styled36 from "styled-components";
9956
- import { isArray as isArray2, isNotNil as isNotNil18, isNotUndefined as isNotUndefined9, isUndefined as isUndefined5 } from "@wistia/type-guards";
9948
+ import { isArray as isArray2, isNotNil as isNotNil18, isNotUndefined as isNotUndefined9, isUndefined as isUndefined4 } from "@wistia/type-guards";
9957
9949
 
9958
9950
  // src/components/Label/Label.tsx
9959
9951
  import styled35, { css as css29 } from "styled-components";
@@ -10106,7 +10098,7 @@ var FormField = ({
10106
10098
  "aria-describedby": ariaDescribedby,
10107
10099
  ...props
10108
10100
  };
10109
- if (isUndefined5(value) && isNotUndefined9(defaultValue)) {
10101
+ if (isUndefined4(value) && isNotUndefined9(defaultValue)) {
10110
10102
  childProps = {
10111
10103
  ...childProps,
10112
10104
  defaultValue
@@ -11631,9 +11623,9 @@ var Radio = forwardRef20(
11631
11623
  const generatedId = useId3();
11632
11624
  const computedId = isNonEmptyString3(id) ? id : `wistia-ui-radio-${generatedId}`;
11633
11625
  const radioGroupContext = useRadioGroup();
11634
- const groupName = radioGroupContext?.name;
11626
+ const contextName = radioGroupContext?.name;
11635
11627
  const contextOnChange = radioGroupContext?.onChange;
11636
- const radioName = name ?? groupName;
11628
+ const radioName = name ?? contextName;
11637
11629
  const handleOnChange = onChange ?? contextOnChange;
11638
11630
  return /* @__PURE__ */ jsxs35(
11639
11631
  StyledRadioWrapper,
@@ -12777,7 +12769,7 @@ ThumbnailBadge.displayName = "ThumbnailBadge";
12777
12769
  // src/components/Thumbnail/Thumbnail.tsx
12778
12770
  import { forwardRef as forwardRef28, useState as useState17, useRef as useRef16, useCallback as useCallback11, useMemo as useMemo10 } from "react";
12779
12771
  import styled73 from "styled-components";
12780
- import { isNil as isNil15, isNotNil as isNotNil36, isUndefined as isUndefined6, isEmptyString as isEmptyString2, isString as isString2 } from "@wistia/type-guards";
12772
+ import { isNil as isNil15, isNotNil as isNotNil36, isUndefined as isUndefined5, isEmptyString as isEmptyString2, isString as isString2 } from "@wistia/type-guards";
12781
12773
 
12782
12774
  // src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
12783
12775
  import { isNotNil as isNotNil34 } from "@wistia/type-guards";
@@ -13151,7 +13143,7 @@ var Thumbnail = forwardRef28(
13151
13143
  return Boolean(isScrubbable && isMouseOver && isStoryboardReady);
13152
13144
  }, [isScrubbable, isMouseOver, isStoryboardReady]);
13153
13145
  const renderStoryboard = useCallback11(() => {
13154
- if (!storyboard || isUndefined6(height) || isEmptyString2(height)) return null;
13146
+ if (!storyboard || isUndefined5(height) || isEmptyString2(height)) return null;
13155
13147
  const {
13156
13148
  url,
13157
13149
  width: sbWidth,