@wistia/ui 0.13.6 → 0.13.7

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.13.6
3
+ * @license @wistia/ui v0.13.7
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -10007,6 +10007,7 @@ ColorGrid.displayName = "ColorGrid_UI";
10007
10007
  // src/components/ColorPicker/ColorGridOption.tsx
10008
10008
  import styled34 from "styled-components";
10009
10009
  import { Item as RadioGroupItem } from "@radix-ui/react-radio-group";
10010
+ import { formatHex as formatHex3 } from "culori/fn";
10010
10011
 
10011
10012
  // src/components/ColorPicker/ColorSwatch.tsx
10012
10013
  import styled32 from "styled-components";
@@ -10233,7 +10234,8 @@ var Container2 = styled34(RadioGroupItem)`
10233
10234
  user-select: none;
10234
10235
  `;
10235
10236
  var ColorGridOption = ({ value, name }) => {
10236
- const { valueAsHex, nonDerivedValueAsHex } = useColorPickerState();
10237
+ const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
10238
+ const valueAsHex = formatHex3(valueAsHsv);
10237
10239
  const isSelected = valueAsHex === value;
10238
10240
  const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
10239
10241
  return /* @__PURE__ */ jsx229(
@@ -10330,6 +10332,7 @@ ColorListGroup.displayName = "ColorListGroup_UI";
10330
10332
  // src/components/ColorPicker/ColorListOption.tsx
10331
10333
  import styled37 from "styled-components";
10332
10334
  import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
10335
+ import { formatHex as formatHex4 } from "culori/fn";
10333
10336
 
10334
10337
  // src/components/ColorPicker/ColorNameOrHexCode.tsx
10335
10338
  import { jsx as jsx232, jsxs as jsxs23 } from "react/jsx-runtime";
@@ -10389,7 +10392,8 @@ var Container4 = styled37(ToggleGroupItem)`
10389
10392
  }
10390
10393
  `;
10391
10394
  var ColorListOption = ({ value, name }) => {
10392
- const { valueAsHex, nonDerivedValueAsHex } = useColorPickerState();
10395
+ const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
10396
+ const valueAsHex = formatHex4(valueAsHsv);
10393
10397
  const isSelected = valueAsHex === value;
10394
10398
  const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
10395
10399
  return /* @__PURE__ */ jsxs24(
@@ -10461,6 +10465,7 @@ var StyledPopoverContent = styled38(PopoverContent)`
10461
10465
  flex-direction: column;
10462
10466
  max-width: ${COLOR_PICKER_POPOVER_MAX_WIDTH_PX}px;
10463
10467
  overflow: hidden;
10468
+ z-index: var(--wui-zindex-select);
10464
10469
  `;
10465
10470
  var ColorPickerPopoverContent = ({
10466
10471
  children
@@ -11213,12 +11218,12 @@ import {
11213
11218
  Thumb as SliderThumb
11214
11219
  } from "@radix-ui/react-slider";
11215
11220
  import styled45 from "styled-components";
11216
- import { formatHex as formatHex4 } from "culori/fn";
11221
+ import { formatHex as formatHex6 } from "culori/fn";
11217
11222
 
11218
11223
  // src/components/ColorPicker/HSVHueCanvas.tsx
11219
11224
  import { useEffect as useEffect12, useRef as useRef11 } from "react";
11220
11225
  import styled44 from "styled-components";
11221
- import { formatHex as formatHex3 } from "culori/fn";
11226
+ import { formatHex as formatHex5 } from "culori/fn";
11222
11227
  import { jsx as jsx247 } from "react/jsx-runtime";
11223
11228
  var Canvas = styled44.canvas`
11224
11229
  display: block;
@@ -11240,7 +11245,7 @@ var HSVHueCanvas = ({ hsv }) => {
11240
11245
  const gradient = ctx.createLinearGradient(0, 0, width, 0);
11241
11246
  for (let i = 0; i <= THREE_SIXTY; i++) {
11242
11247
  const hue = i;
11243
- const hexColor = formatHex3({ h: hue, s: hsv.s, v: hsv.v, mode: "hsv" });
11248
+ const hexColor = formatHex5({ h: hue, s: hsv.s, v: hsv.v, mode: "hsv" });
11244
11249
  if (hexColor) {
11245
11250
  gradient.addColorStop(i / THREE_SIXTY, hexColor);
11246
11251
  }
@@ -11303,7 +11308,7 @@ var HueSlider = () => {
11303
11308
  const { nonDerivedValueAsHsv, onChangeNonDerivedValueAsHsv, valueAsHsv } = useColorPickerState();
11304
11309
  const containerStyle = useMemo9(() => {
11305
11310
  return {
11306
- backgroundColor: formatHex4({
11311
+ backgroundColor: formatHex6({
11307
11312
  h: 0,
11308
11313
  // red
11309
11314
  s: valueAsHsv.s,
@@ -11313,7 +11318,7 @@ var HueSlider = () => {
11313
11318
  };
11314
11319
  }, [valueAsHsv.s, valueAsHsv.v]);
11315
11320
  const thumbInnerStyle = useMemo9(() => {
11316
- return { backgroundColor: formatHex4(valueAsHsv) };
11321
+ return { backgroundColor: formatHex6(valueAsHsv) };
11317
11322
  }, [valueAsHsv]);
11318
11323
  const onHueChange = useCallback14(
11319
11324
  (values) => {