@wistia/ui 0.15.8 → 0.15.9-beta.6bbd7795.815b5ae

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.8
3
+ * @license @wistia/ui v0.15.9-beta.6bbd7795.815b5ae
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -10245,6 +10245,7 @@ var TWO_FIFTY_FIVE = 255;
10245
10245
  var DEFAULT_MIN_CONTRAST = 4.5;
10246
10246
  var DEFAULT_COLOR_FOR_COMPARISON = "#ffffff";
10247
10247
  var DEFAULT_OPACITY_FOR_CONTRAST_CALCULATION = 1;
10248
+ var DEFAULT_SWATCH_DIAMETER_PX = 24;
10248
10249
 
10249
10250
  // src/components/ColorPicker/contrast-utils.ts
10250
10251
  var CONTRAST_EPSILON = 4e-3;
@@ -10830,7 +10831,7 @@ var DerivativeHalfCircle = import_styled_components50.default.div`
10830
10831
  `;
10831
10832
  var ColorSwatch = ({
10832
10833
  children,
10833
- diameterPx = 24,
10834
+ diameterPx = DEFAULT_SWATCH_DIAMETER_PX,
10834
10835
  isSelected = false,
10835
10836
  derivativeIsSelected = false,
10836
10837
  value
@@ -11283,9 +11284,17 @@ var import_styled_components58 = __toESM(require("styled-components"));
11283
11284
 
11284
11285
  // src/components/ColorPicker/ValueSwatch.tsx
11285
11286
  var import_jsx_runtime239 = require("react/jsx-runtime");
11286
- var ValueSwatch = () => {
11287
+ var ValueSwatch = ({
11288
+ diameterPx = DEFAULT_SWATCH_DIAMETER_PX
11289
+ }) => {
11287
11290
  const { valueAsHex } = useColorPickerState();
11288
- return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(ColorSwatch, { value: valueAsHex });
11291
+ return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
11292
+ ColorSwatch,
11293
+ {
11294
+ diameterPx,
11295
+ value: valueAsHex
11296
+ }
11297
+ );
11289
11298
  };
11290
11299
  ValueSwatch.displayName = "ValueSwatch_UI";
11291
11300
 
@@ -11303,7 +11312,7 @@ var StyledPopoverTrigger = (0, import_styled_components58.default)(import_react_
11303
11312
  background-color: var(--wui-color-bg-surface);
11304
11313
  border-radius: var(--wui-border-radius-rounded);
11305
11314
  border: 1px solid var(--wui-color-border);
11306
- padding: 6px;
11315
+ padding: var(--wui-space-01);
11307
11316
  transition: background-color var(--wui-motion-duration-03) var(--wui-motion-ease);
11308
11317
 
11309
11318
  &:hover {
@@ -11315,7 +11324,7 @@ var DefaultTriggerContentContainer = import_styled_components58.default.div`
11315
11324
  display: flex;
11316
11325
  flex-direction: row;
11317
11326
  gap: var(--wui-space-02);
11318
- padding-right: var(--wui-space-01);
11327
+ padding-right: var(--wui-space-02);
11319
11328
  `;
11320
11329
  var DefaultTriggerContent = () => {
11321
11330
  return /* @__PURE__ */ (0, import_jsx_runtime241.jsxs)(DefaultTriggerContentContainer, { children: [
@@ -16900,6 +16909,7 @@ var StyledTrigger2 = (0, import_styled_components110.default)(import_react_selec
16900
16909
  font-size: var(--wui-input-font-size);
16901
16910
  line-height: var(--wui-input-line-height);
16902
16911
  color: var(--wui-input-color-text);
16912
+ gap: var(--wui-space-01);
16903
16913
 
16904
16914
  > span {
16905
16915
  white-space: nowrap;
@@ -17030,6 +17040,8 @@ var import_type_guards65 = require("@wistia/type-guards");
17030
17040
  var import_jsx_runtime309 = require("react/jsx-runtime");
17031
17041
  var StyledItem = (0, import_styled_components111.default)(import_react_select2.Item)`
17032
17042
  ${getTypographicStyles("label3")}
17043
+ align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
17044
+ background-color: transparent;
17033
17045
  display: flex;
17034
17046
  padding: var(--wui-select-option-padding);
17035
17047
  justify-content: space-between;
@@ -17053,12 +17065,13 @@ var StyledItem = (0, import_styled_components111.default)(import_react_select2.I
17053
17065
  }
17054
17066
  `;
17055
17067
  var SelectOption = (0, import_react91.forwardRef)(
17056
- ({ children, selectedDisplayValue, ...props }, forwardedRef) => {
17068
+ ({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
17057
17069
  return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
17058
17070
  StyledItem,
17059
17071
  {
17060
17072
  ...props,
17061
17073
  ref: forwardedRef,
17074
+ $checkmarkVerticalAlign: checkmarkVerticalAlign,
17062
17075
  children: [
17063
17076
  (0, import_type_guards65.isNotNil)(selectedDisplayValue) ? /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("div", { children: [
17064
17077
  children,