@wistia/ui 0.14.2 → 0.14.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
@@ -1441,7 +1441,7 @@ type ColorPickerOption = {
1441
1441
 
1442
1442
  type ColorGridOptionProps = ColorPickerOption;
1443
1443
  declare const ColorGridOption: {
1444
- ({ value, name }: ColorGridOptionProps): JSX.Element;
1444
+ ({ value: rawValue, name }: ColorGridOptionProps): JSX.Element;
1445
1445
  displayName: string;
1446
1446
  };
1447
1447
 
@@ -1461,7 +1461,7 @@ declare const ColorListGroup: {
1461
1461
 
1462
1462
  type ColorListOptionProps = ColorPickerOption;
1463
1463
  declare const ColorListOption: {
1464
- ({ value, name }: ColorListOptionProps): JSX.Element;
1464
+ ({ value: rawValue, name }: ColorListOptionProps): JSX.Element;
1465
1465
  displayName: string;
1466
1466
  };
1467
1467
 
package/dist/index.d.ts CHANGED
@@ -1441,7 +1441,7 @@ type ColorPickerOption = {
1441
1441
 
1442
1442
  type ColorGridOptionProps = ColorPickerOption;
1443
1443
  declare const ColorGridOption: {
1444
- ({ value, name }: ColorGridOptionProps): JSX.Element;
1444
+ ({ value: rawValue, name }: ColorGridOptionProps): JSX.Element;
1445
1445
  displayName: string;
1446
1446
  };
1447
1447
 
@@ -1461,7 +1461,7 @@ declare const ColorListGroup: {
1461
1461
 
1462
1462
  type ColorListOptionProps = ColorPickerOption;
1463
1463
  declare const ColorListOption: {
1464
- ({ value, name }: ColorListOptionProps): JSX.Element;
1464
+ ({ value: rawValue, name }: ColorListOptionProps): JSX.Element;
1465
1465
  displayName: string;
1466
1466
  };
1467
1467
 
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.14.2
3
+ * @license @wistia/ui v0.14.3
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -9964,7 +9964,7 @@ var ColorPickerProvider = ({
9964
9964
  );
9965
9965
  const whatValuePropShouldBe = shouldEnforceMinContrast ? formatHex2(getAccessibleDerivativeColor(formatHex2(nonDerivedValueAsHsv))) : formatHex2(nonDerivedValueAsHsv);
9966
9966
  useEffect10(() => {
9967
- if (valueAsHex.toLocaleLowerCase() !== whatValuePropShouldBe.toLocaleLowerCase() && !isTransitioning) {
9967
+ if (valueAsHex !== whatValuePropShouldBe && !isTransitioning) {
9968
9968
  onValueChange(whatValuePropShouldBe);
9969
9969
  }
9970
9970
  }, [valueAsHex, whatValuePropShouldBe, isTransitioning, onValueChange]);
@@ -10342,7 +10342,8 @@ var Container2 = styled35(RadioGroupItem)`
10342
10342
  cursor: pointer;
10343
10343
  user-select: none;
10344
10344
  `;
10345
- var ColorGridOption = ({ value, name }) => {
10345
+ var ColorGridOption = ({ value: rawValue, name }) => {
10346
+ const value = rawValue.toLocaleLowerCase();
10346
10347
  const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
10347
10348
  const valueAsHex = formatHex3(valueAsHsv);
10348
10349
  const isSelected = valueAsHex === value;
@@ -10500,7 +10501,8 @@ var Container5 = styled38(ToggleGroupItem)`
10500
10501
  background-color: var(--wui-color-bg-surface-secondary-hover);
10501
10502
  }
10502
10503
  `;
10503
- var ColorListOption = ({ value, name }) => {
10504
+ var ColorListOption = ({ value: rawValue, name }) => {
10505
+ const value = rawValue.toLocaleLowerCase();
10504
10506
  const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
10505
10507
  const valueAsHex = formatHex4(valueAsHsv);
10506
10508
  const isSelected = valueAsHex === value;
@@ -10553,7 +10555,7 @@ var ColorPicker = ({
10553
10555
  minimumContrastRatio,
10554
10556
  onValueChange,
10555
10557
  opacityForContrastCalculation,
10556
- value,
10558
+ value: value.toLocaleLowerCase(),
10557
10559
  children
10558
10560
  }
10559
10561
  ) });