@wistia/ui 0.6.7 → 0.6.8-beta.1a2d2db0.554b501

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
@@ -2514,6 +2514,11 @@ type SelectProps = {
2514
2514
  * A group of `Option` or `OptionGroup`s
2515
2515
  */
2516
2516
  children: ReactNode;
2517
+ /**
2518
+ * The color scheme of the select.
2519
+ *
2520
+ * @default inherit
2521
+ */
2517
2522
  colorScheme?: ColorSchemeTypes;
2518
2523
  /**
2519
2524
  * When true, the select can't be interacted with.
package/dist/index.d.ts CHANGED
@@ -2514,6 +2514,11 @@ type SelectProps = {
2514
2514
  * A group of `Option` or `OptionGroup`s
2515
2515
  */
2516
2516
  children: ReactNode;
2517
+ /**
2518
+ * The color scheme of the select.
2519
+ *
2520
+ * @default inherit
2521
+ */
2517
2522
  colorScheme?: ColorSchemeTypes;
2518
2523
  /**
2519
2524
  * When true, the select can't be interacted with.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.6.7
3
+ * @license @wistia/ui v0.6.8-beta.1a2d2db0.554b501
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -1282,9 +1282,12 @@ var typographyTokens = css7`
1282
1282
  // src/css/designTokens/zIndex.tsx
1283
1283
  import { css as css8 } from "styled-components";
1284
1284
  var zIndexTokens = css8`
1285
+ --wui-zindex-under: -1;
1285
1286
  --wui-zindex-backdrop: 100;
1286
1287
  --wui-zindex-modal: 100;
1287
1288
  --wui-zindex-menu: 500;
1289
+ --wui-zindex-select: 500;
1290
+ --wui-zindex-tooltip: 500;
1288
1291
  `;
1289
1292
 
1290
1293
  // src/css/designTokens/elevation.tsx
@@ -7605,11 +7608,11 @@ ScreenReaderOnly.displayName = "ScreenReaderOnly";
7605
7608
 
7606
7609
  // src/components/Tooltip/Tooltip.tsx
7607
7610
  import {
7608
- Root as Root2,
7609
- Content as Content2,
7610
- Trigger as Trigger2,
7611
- Portal,
7612
- Arrow
7611
+ Root as TooltipRoot,
7612
+ Content as TooltipContent,
7613
+ Trigger as TooltipTrigger,
7614
+ Portal as TooltipPortal,
7615
+ Arrow as TooltipArrow
7613
7616
  } from "@radix-ui/react-tooltip";
7614
7617
  import styled27, { css as css21 } from "styled-components";
7615
7618
  import { jsx as jsx185, jsxs as jsxs15 } from "react/jsx-runtime";
@@ -7620,7 +7623,7 @@ var CompactTooltipStyles = css21`
7620
7623
  --tooltip-horizontal-padding: var(--wui-space-02);
7621
7624
  --tooltip-vertical-padding: var(--wui-space-03);
7622
7625
  `;
7623
- var StyledContent = styled27(Content2)`
7626
+ var StyledContent = styled27(TooltipContent)`
7624
7627
  --tooltip-font-family: var(--wui-typography-family-default);
7625
7628
  --tooltip-border-radius: var(--wui-border-radius-05);
7626
7629
  --tooltip-bg: var(--wui-color-bg-tooltip);
@@ -7644,6 +7647,7 @@ var StyledContent = styled27(Content2)`
7644
7647
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
7645
7648
  will-change: transform, opacity;
7646
7649
  max-width: 30em;
7650
+ z-index: var(--wui-zindex-tooltip);
7647
7651
 
7648
7652
  &[data-state='delayed-open'][data-side='top'] {
7649
7653
  animation-name: slideDownAndFade;
@@ -7679,13 +7683,13 @@ var Tooltip = ({
7679
7683
  rootProps.open = true;
7680
7684
  }
7681
7685
  return /* @__PURE__ */ jsxs15(
7682
- Root2,
7686
+ TooltipRoot,
7683
7687
  {
7684
7688
  delayDuration: delay,
7685
7689
  ...rootProps,
7686
7690
  children: [
7687
- /* @__PURE__ */ jsx185(Trigger2, { asChild: true, children }),
7688
- /* @__PURE__ */ jsx185(Portal, { children: /* @__PURE__ */ jsxs15(
7691
+ /* @__PURE__ */ jsx185(TooltipTrigger, { asChild: true, children }),
7692
+ /* @__PURE__ */ jsx185(TooltipPortal, { children: /* @__PURE__ */ jsxs15(
7689
7693
  StyledContent,
7690
7694
  {
7691
7695
  $compact: compact,
@@ -7693,7 +7697,7 @@ var Tooltip = ({
7693
7697
  sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
7694
7698
  children: [
7695
7699
  content,
7696
- !hideArrow ? /* @__PURE__ */ jsx185(Arrow, { asChild: true, children: /* @__PURE__ */ jsx185(
7700
+ !hideArrow ? /* @__PURE__ */ jsx185(TooltipArrow, { asChild: true, children: /* @__PURE__ */ jsx185(
7697
7701
  "svg",
7698
7702
  {
7699
7703
  fill: "var(--tooltip-bg)",
@@ -8831,8 +8835,8 @@ var StyledSubTrigger = styled39(DropdownMenuSubTrigger)`
8831
8835
  `;
8832
8836
  var SubMenuTrigger = (props) => {
8833
8837
  const { isSmAndUp } = useMq();
8834
- const Trigger5 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
8835
- return /* @__PURE__ */ jsx200(Trigger5, { asChild: true, children: /* @__PURE__ */ jsx200(
8838
+ const Trigger4 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
8839
+ return /* @__PURE__ */ jsx200(Trigger4, { asChild: true, children: /* @__PURE__ */ jsx200(
8836
8840
  MenuItemButton,
8837
8841
  {
8838
8842
  ...props,
@@ -9302,7 +9306,7 @@ var Modal = forwardRef17(
9302
9306
  Modal.displayName = "Modal";
9303
9307
 
9304
9308
  // src/components/Popover/Popover.tsx
9305
- import { Root as Root3, Trigger as Trigger3, Portal as Portal2, Content as Content3, Close, Arrow as Arrow2 } from "@radix-ui/react-popover";
9309
+ import { Root as Root2, Trigger as Trigger2, Portal, Content as Content2, Close, Arrow } from "@radix-ui/react-popover";
9306
9310
  import styled45 from "styled-components";
9307
9311
 
9308
9312
  // src/private/helpers/getControls/getControlProps.tsx
@@ -9313,7 +9317,7 @@ var getControlProps = (isOpen, onOpenChange) => {
9313
9317
 
9314
9318
  // src/components/Popover/Popover.tsx
9315
9319
  import { jsx as jsx210, jsxs as jsxs28 } from "react/jsx-runtime";
9316
- var StyledContent2 = styled45(Content3)`
9320
+ var StyledContent2 = styled45(Content2)`
9317
9321
  border-radius: var(--wui-border-radius-02);
9318
9322
  padding: var(--wui-space-04);
9319
9323
  max-width: 320px;
@@ -9327,7 +9331,7 @@ var StyledContent2 = styled45(Content3)`
9327
9331
  right: var(--wui-space-02);
9328
9332
  }
9329
9333
  `;
9330
- var StyledArrow = styled45(Arrow2)`
9334
+ var StyledArrow = styled45(Arrow)`
9331
9335
  fill: white;
9332
9336
  display: none;
9333
9337
  `;
@@ -9339,9 +9343,9 @@ var Popover = ({
9339
9343
  onOpenChange,
9340
9344
  ...props
9341
9345
  }) => {
9342
- return /* @__PURE__ */ jsxs28(Root3, { ...getControlProps(isOpen, onOpenChange), children: [
9343
- /* @__PURE__ */ jsx210(Trigger3, { asChild: true, children: trigger }),
9344
- /* @__PURE__ */ jsx210(Portal2, { children: /* @__PURE__ */ jsxs28(
9346
+ return /* @__PURE__ */ jsxs28(Root2, { ...getControlProps(isOpen, onOpenChange), children: [
9347
+ /* @__PURE__ */ jsx210(Trigger2, { asChild: true, children: trigger }),
9348
+ /* @__PURE__ */ jsx210(Portal, { children: /* @__PURE__ */ jsxs28(
9345
9349
  StyledContent2,
9346
9350
  {
9347
9351
  sideOffset: 5,
@@ -9548,7 +9552,6 @@ var useSegmentedControlValue = () => {
9548
9552
 
9549
9553
  // src/components/SegmentedControl/SelectedItemIndicator.tsx
9550
9554
  import { jsx as jsx213 } from "react/jsx-runtime";
9551
- var Z_INDEX_TO_SIT_BEHIND_SIBLINGS = -1;
9552
9555
  var SelectedItemIndicatorDiv = styled47.div`
9553
9556
  background-color: var(--wui-color-bg-fill-white);
9554
9557
  border-radius: var(--wui-border-radius-rounded);
@@ -9559,7 +9562,7 @@ var SelectedItemIndicatorDiv = styled47.div`
9559
9562
  transition:
9560
9563
  transform var(--wui-motion-duration-02) var(--wui-motion-ease-out),
9561
9564
  width var(--wui-motion-duration-02) var(--wui-motion-ease-out);
9562
- z-index: ${Z_INDEX_TO_SIT_BEHIND_SIBLINGS};
9565
+ z-index: var(--wui-zindex-under);
9563
9566
  `;
9564
9567
  var SelectedItemIndicator = () => {
9565
9568
  const selectedValue = useSegmentedControlValue();
@@ -10343,10 +10346,10 @@ WistiaLogo.displayName = "WistiaLogo";
10343
10346
 
10344
10347
  // src/components/Select/Select.tsx
10345
10348
  import {
10346
- Root as Root4,
10347
- Trigger as Trigger4,
10348
- Portal as Portal3,
10349
- Content as Content4,
10349
+ Root as Root3,
10350
+ Trigger as Trigger3,
10351
+ Portal as Portal2,
10352
+ Content as Content3,
10350
10353
  ScrollUpButton,
10351
10354
  Viewport,
10352
10355
  Value,
@@ -10355,7 +10358,7 @@ import {
10355
10358
  import { forwardRef as forwardRef25 } from "react";
10356
10359
  import styled56 from "styled-components";
10357
10360
  import { jsx as jsx222, jsxs as jsxs36 } from "react/jsx-runtime";
10358
- var StyledTrigger = styled56(Trigger4)`
10361
+ var StyledTrigger = styled56(Trigger3)`
10359
10362
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
10360
10363
  --wui-select-color-bg: var(--wui-color-bg-surface);
10361
10364
  --wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
@@ -10379,8 +10382,15 @@ var StyledTrigger = styled56(Trigger4)`
10379
10382
  display: inline-flex;
10380
10383
  align-items: center;
10381
10384
  justify-content: space-between;
10385
+ max-width: 100%;
10382
10386
  width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
10383
10387
 
10388
+ > span {
10389
+ white-space: nowrap;
10390
+ text-overflow: ellipsis;
10391
+ overflow: hidden;
10392
+ }
10393
+
10384
10394
  &[aria-expanded='true'],
10385
10395
  &:focus {
10386
10396
  outline: 2px solid var(--wui-color-focus-ring);
@@ -10396,7 +10406,7 @@ var StyledTrigger = styled56(Trigger4)`
10396
10406
  background-color: var(--wui-color-bg-surface-disabled);
10397
10407
  }
10398
10408
  `;
10399
- var StyledContent3 = styled56(Content4)`
10409
+ var StyledContent3 = styled56(Content3)`
10400
10410
  --wui-select-content-border: var(--wui-color-border);
10401
10411
  --wui-select-content-bg: var(--wui-color-bg-surface);
10402
10412
  --wui-select-content-border-radius: var(--wui-border-radius-02);
@@ -10410,8 +10420,9 @@ var StyledContent3 = styled56(Content4)`
10410
10420
  border: 1px solid var(--wui-select-content-border);
10411
10421
  border-radius: var(--wui-select-content-border-radius);
10412
10422
  padding: var(--wui-select-option-padding);
10413
- min-width: 200px;
10414
- z-index: var(--wui-zindex-menu);
10423
+ min-width: var(--radix-select-trigger-width);
10424
+ max-height: var(--radix-select-content-available-height);
10425
+ z-index: var(--wui-zindex-select);
10415
10426
  `;
10416
10427
  var Select = forwardRef25(
10417
10428
  ({
@@ -10424,7 +10435,7 @@ var Select = forwardRef25(
10424
10435
  }, forwardedRef) => {
10425
10436
  const responsiveFullWidth = useResponsiveProp(fullWidth);
10426
10437
  return /* @__PURE__ */ jsxs36(
10427
- Root4,
10438
+ Root3,
10428
10439
  {
10429
10440
  ...props,
10430
10441
  onValueChange: onChange,
@@ -10448,7 +10459,7 @@ var Select = forwardRef25(
10448
10459
  ]
10449
10460
  }
10450
10461
  ),
10451
- /* @__PURE__ */ jsx222(Portal3, { children: /* @__PURE__ */ jsxs36(StyledContent3, { position: "popper", children: [
10462
+ /* @__PURE__ */ jsx222(Portal2, { children: /* @__PURE__ */ jsxs36(StyledContent3, { position: "popper", children: [
10452
10463
  /* @__PURE__ */ jsx222(ScrollUpButton, { children: /* @__PURE__ */ jsx222(Icon, { type: "caret-up" }) }),
10453
10464
  /* @__PURE__ */ jsx222(Viewport, { children }),
10454
10465
  /* @__PURE__ */ jsx222(ScrollDownButton, { children: /* @__PURE__ */ jsx222(Icon, { type: "caret-down" }) })