@wistia/ui 0.14.11 → 0.14.12

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.14.11
3
+ * @license @wistia/ui v0.14.12
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -9490,14 +9490,14 @@ var Checkbox = (0, import_react38.forwardRef)(
9490
9490
  const contextValue = checkboxGroupContext?.value;
9491
9491
  const checkboxName = name ?? contextName;
9492
9492
  const handleOnChange = onChange ?? contextOnChange;
9493
- const defaultChecked = (0, import_type_guards31.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : void 0;
9493
+ const isChecked = (0, import_type_guards31.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : checked;
9494
9494
  return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(StyledCheckboxWrapper, { disabled, children: [
9495
9495
  /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9496
9496
  StyledHiddenCheckboxInput,
9497
9497
  {
9498
9498
  ...props,
9499
9499
  ref,
9500
- ...(0, import_type_guards31.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked },
9500
+ checked: isChecked,
9501
9501
  disabled,
9502
9502
  id: computedId,
9503
9503
  name: checkboxName,
@@ -14945,7 +14945,7 @@ var Radio = (0, import_react72.forwardRef)(
14945
14945
  const contextValue = radioGroupContext?.value;
14946
14946
  const radioName = name ?? contextName;
14947
14947
  const handleOnChange = onChange ?? contextOnChange;
14948
- const defaultChecked = (0, import_type_guards53.isNotUndefined)(value) && (0, import_type_guards53.isNotUndefined)(contextValue) ? contextValue.includes(value) : void 0;
14948
+ const isChecked = (0, import_type_guards53.isNotUndefined)(value) && (0, import_type_guards53.isNotUndefined)(contextValue) ? contextValue === value : checked;
14949
14949
  return /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)(
14950
14950
  StyledRadioWrapper,
14951
14951
  {
@@ -14957,14 +14957,14 @@ var Radio = (0, import_react72.forwardRef)(
14957
14957
  {
14958
14958
  ...props,
14959
14959
  ref,
14960
+ checked: isChecked,
14960
14961
  disabled,
14961
14962
  id: computedId,
14962
14963
  name: radioName,
14963
14964
  onChange: handleOnChange,
14964
14965
  required,
14965
14966
  type: "radio",
14966
- value,
14967
- ...(0, import_type_guards53.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked }
14967
+ value
14968
14968
  }
14969
14969
  ),
14970
14970
  /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
@@ -15128,7 +15128,7 @@ var RadioCardRoot = (0, import_react73.forwardRef)(
15128
15128
  const contextValue = radioGroupContext?.value;
15129
15129
  const radioName = name ?? contextName;
15130
15130
  const handleOnChange = onChange ?? contextOnChange;
15131
- const defaultChecked = (0, import_type_guards54.isNotUndefined)(value) && (0, import_type_guards54.isNotUndefined)(contextValue) ? contextValue.includes(value) : void 0;
15131
+ const isChecked = (0, import_type_guards54.isNotUndefined)(value) && (0, import_type_guards54.isNotUndefined)(contextValue) ? contextValue === value : checked;
15132
15132
  return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
15133
15133
  StyledCard2,
15134
15134
  {
@@ -15141,13 +15141,13 @@ var RadioCardRoot = (0, import_react73.forwardRef)(
15141
15141
  {
15142
15142
  ...props,
15143
15143
  ref,
15144
+ checked: isChecked,
15144
15145
  disabled,
15145
15146
  id: computedId,
15146
15147
  name: radioName,
15147
15148
  onChange: handleOnChange,
15148
15149
  type: "radio",
15149
- value,
15150
- ...(0, import_type_guards54.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked }
15150
+ value
15151
15151
  }
15152
15152
  ),
15153
15153
  children