@wistia/ui 0.4.7 → 0.4.8-beta.2116c6fb.fdbbdee

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
@@ -2168,4 +2168,101 @@ declare const WistiaLogo: {
2168
2168
  displayName: string;
2169
2169
  };
2170
2170
 
2171
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
2171
+ type SelectProps = {
2172
+ /**
2173
+ * Sets the validity status of the input
2174
+ *
2175
+ * @default false
2176
+ */
2177
+ 'aria-invalid'?: boolean;
2178
+ /**
2179
+ * A group of `Option` or `OptionGroup`s
2180
+ */
2181
+ children: ReactNode;
2182
+ colorScheme?: ColorSchemeTypes;
2183
+ /**
2184
+ * When true, the select can't be interacted with.
2185
+ *
2186
+ * @default false
2187
+ */
2188
+ disabled?: boolean;
2189
+ /**
2190
+ * If true, the select will fill its container
2191
+ */
2192
+ fullWidth?: ResponsiveObject<boolean> | boolean;
2193
+ /**
2194
+ * Called when a value is changed.
2195
+ */
2196
+ onChange?: (value: string) => void;
2197
+ /**
2198
+ * Text shown when no value is selected
2199
+ */
2200
+ placeholder?: string;
2201
+ /**
2202
+ * The controlled value. Must be used in conjunction with `onChange`.
2203
+ */
2204
+ value?: string;
2205
+ };
2206
+ /**
2207
+ * Display a list of options and choose one of them. Replacement for the native Select HTML element.
2208
+ */
2209
+ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
2210
+
2211
+ type SelectOptionProps = {
2212
+ /**
2213
+ * The visual content of the select
2214
+ */
2215
+ children: ReactNode;
2216
+ /**
2217
+ * The value to set
2218
+ */
2219
+ value: string;
2220
+ /**
2221
+ * When true, this option will not be selectable
2222
+ *
2223
+ * @default false
2224
+ */
2225
+ disabled?: boolean;
2226
+ /**
2227
+ * Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the Option.
2228
+ * Use this when the content is complex, or you have non-textual content inside.
2229
+ */
2230
+ textValue?: string;
2231
+ };
2232
+ declare const SelectOption: react.ForwardRefExoticComponent<SelectOptionProps & react.RefAttributes<HTMLDivElement>>;
2233
+
2234
+ type SelectOptionGroupProps = {
2235
+ /** The label of the group */
2236
+ label: string;
2237
+ /** At least one `Option` */
2238
+ children: ReactNode;
2239
+ };
2240
+ declare const SelectOptionGroup: ({ children, label, ...props }: SelectOptionGroupProps) => react_jsx_runtime.JSX.Element;
2241
+
2242
+ type AnalyticsCardProps = ComponentPropsWithoutRef<'div'> & {
2243
+ /**
2244
+ * Label text displayed above the value
2245
+ */
2246
+ label: ReactNode;
2247
+ /**
2248
+ * Main value to display in the card
2249
+ */
2250
+ value: ReactNode;
2251
+ /**
2252
+ * Optional content to display in the top-right corner
2253
+ */
2254
+ upperRightSlot?: ReactNode;
2255
+ /**
2256
+ * Sets the color scheme of the card
2257
+ */
2258
+ colorScheme?: ColorSchemeTypes;
2259
+ };
2260
+ /**
2261
+ * Component description goes here
2262
+ */
2263
+ declare const AnalyticsCard: {
2264
+ ({ label, value, slot, colorScheme, ...props }: AnalyticsCardProps): JSX.Element;
2265
+ displayName: string;
2266
+ };
2267
+
2268
+ export { ActionButton, type ActionButtonProps, AnalyticsCard, type AnalyticsCardProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -2168,4 +2168,101 @@ declare const WistiaLogo: {
2168
2168
  displayName: string;
2169
2169
  };
2170
2170
 
2171
- export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
2171
+ type SelectProps = {
2172
+ /**
2173
+ * Sets the validity status of the input
2174
+ *
2175
+ * @default false
2176
+ */
2177
+ 'aria-invalid'?: boolean;
2178
+ /**
2179
+ * A group of `Option` or `OptionGroup`s
2180
+ */
2181
+ children: ReactNode;
2182
+ colorScheme?: ColorSchemeTypes;
2183
+ /**
2184
+ * When true, the select can't be interacted with.
2185
+ *
2186
+ * @default false
2187
+ */
2188
+ disabled?: boolean;
2189
+ /**
2190
+ * If true, the select will fill its container
2191
+ */
2192
+ fullWidth?: ResponsiveObject<boolean> | boolean;
2193
+ /**
2194
+ * Called when a value is changed.
2195
+ */
2196
+ onChange?: (value: string) => void;
2197
+ /**
2198
+ * Text shown when no value is selected
2199
+ */
2200
+ placeholder?: string;
2201
+ /**
2202
+ * The controlled value. Must be used in conjunction with `onChange`.
2203
+ */
2204
+ value?: string;
2205
+ };
2206
+ /**
2207
+ * Display a list of options and choose one of them. Replacement for the native Select HTML element.
2208
+ */
2209
+ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
2210
+
2211
+ type SelectOptionProps = {
2212
+ /**
2213
+ * The visual content of the select
2214
+ */
2215
+ children: ReactNode;
2216
+ /**
2217
+ * The value to set
2218
+ */
2219
+ value: string;
2220
+ /**
2221
+ * When true, this option will not be selectable
2222
+ *
2223
+ * @default false
2224
+ */
2225
+ disabled?: boolean;
2226
+ /**
2227
+ * Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the Option.
2228
+ * Use this when the content is complex, or you have non-textual content inside.
2229
+ */
2230
+ textValue?: string;
2231
+ };
2232
+ declare const SelectOption: react.ForwardRefExoticComponent<SelectOptionProps & react.RefAttributes<HTMLDivElement>>;
2233
+
2234
+ type SelectOptionGroupProps = {
2235
+ /** The label of the group */
2236
+ label: string;
2237
+ /** At least one `Option` */
2238
+ children: ReactNode;
2239
+ };
2240
+ declare const SelectOptionGroup: ({ children, label, ...props }: SelectOptionGroupProps) => react_jsx_runtime.JSX.Element;
2241
+
2242
+ type AnalyticsCardProps = ComponentPropsWithoutRef<'div'> & {
2243
+ /**
2244
+ * Label text displayed above the value
2245
+ */
2246
+ label: ReactNode;
2247
+ /**
2248
+ * Main value to display in the card
2249
+ */
2250
+ value: ReactNode;
2251
+ /**
2252
+ * Optional content to display in the top-right corner
2253
+ */
2254
+ upperRightSlot?: ReactNode;
2255
+ /**
2256
+ * Sets the color scheme of the card
2257
+ */
2258
+ colorScheme?: ColorSchemeTypes;
2259
+ };
2260
+ /**
2261
+ * Component description goes here
2262
+ */
2263
+ declare const AnalyticsCard: {
2264
+ ({ label, value, slot, colorScheme, ...props }: AnalyticsCardProps): JSX.Element;
2265
+ displayName: string;
2266
+ };
2267
+
2268
+ export { ActionButton, type ActionButtonProps, AnalyticsCard, type AnalyticsCardProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Checkbox, CheckboxGroup, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useBoolean, useFormState, useKey, useMq, useToast, useWindowSize };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.4.7
3
+ * @license @wistia/ui v0.4.8-beta.2116c6fb.fdbbdee
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7397,6 +7397,14 @@ import {
7397
7397
  DropdownMenuContent
7398
7398
  } from "@radix-ui/react-dropdown-menu";
7399
7399
  import { isNotNil as isNotNil10, isNotUndefined as isNotUndefined7 } from "@wistia/type-guards";
7400
+ import { useMemo as useMemo7 } from "react";
7401
+
7402
+ // src/components/Menu/MenuContext.tsx
7403
+ import { createContext as createContext5, useContext as useContext4 } from "react";
7404
+ var MenuContext = createContext5({ compact: false });
7405
+ var useMenuContext = () => useContext4(MenuContext);
7406
+
7407
+ // src/components/Menu/Menu.tsx
7400
7408
  import { jsx as jsx187, jsxs as jsxs14 } from "react/jsx-runtime";
7401
7409
  var open = keyframes`
7402
7410
  from {
@@ -7418,6 +7426,28 @@ var close = keyframes`
7418
7426
  transform: scale(.97) translateY(-8px);
7419
7427
  }
7420
7428
  `;
7429
+ var menuItemCss = css20`
7430
+ --menu-label-description-gap: var(--wui-space-01);
7431
+ --menu-item-inner-gap: var(--wui-space-03);
7432
+ --menu-item-left-icon-size: 24px;
7433
+ --menu-item-right-icon-size: 16px;
7434
+ --menu-item-padding: var(--wui-space-02);
7435
+ --menu-label-font-size: var(--wui-typography-label-3-size);
7436
+ --menu-label-font-weight: var(--wui-typography-label-3-weight);
7437
+ --menu-label-line-height: var(--wui-typography-label-3-line-height);
7438
+ --menu-divider-margin: var(--wui-space-02);
7439
+ `;
7440
+ var compactMenuItemCss = css20`
7441
+ --menu-label-description-gap: 0;
7442
+ --menu-item-inner-gap: var(--wui-space-02);
7443
+ --menu-item-left-icon-size: 16px;
7444
+ --menu-item-right-icon-size: 12px;
7445
+ --menu-item-padding: 6px;
7446
+ --menu-label-font-size: var(--wui-typography-label-4-size);
7447
+ --menu-label-font-weight: var(--wui-typography-label-4-weight);
7448
+ --menu-label-line-height: var(--wui-typography-label-4-line-height);
7449
+ --menu-divider-margin: var(--wui-space-01);
7450
+ `;
7421
7451
  var menuContentCss = css20`
7422
7452
  --menu-font-family: var(--wui-typography-family-default);
7423
7453
  --menu-bg: var(--wui-color-bg-surface);
@@ -7427,6 +7457,8 @@ var menuContentCss = css20`
7427
7457
  --menu-min-width: 120px;
7428
7458
  --menu-max-width: 284px;
7429
7459
 
7460
+ ${({ $compact }) => $compact ? compactMenuItemCss : menuItemCss};
7461
+
7430
7462
  animation: ${open}; /* TODO - need easing tokens */
7431
7463
  font-family: var(--menu-font-family);
7432
7464
  background: var(--menu-bg);
@@ -7457,31 +7489,8 @@ var menuContentCss = css20`
7457
7489
  margin: var(--menu-divider-margin) 0;
7458
7490
  }
7459
7491
  `;
7460
- var menuItemCss = css20`
7461
- --menu-label-description-gap: var(--wui-space-01);
7462
- --menu-item-inner-gap: var(--wui-space-03);
7463
- --menu-item-left-icon-size: 24px;
7464
- --menu-item-right-icon-size: 16px;
7465
- --menu-item-padding: var(--wui-space-02);
7466
- --menu-label-font-size: var(--wui-typography-label-3-size);
7467
- --menu-label-font-weight: var(--wui-typography-label-3-weight);
7468
- --menu-label-line-height: var(--wui-typography-label-3-line-height);
7469
- --menu-divider-margin: var(--wui-space-02);
7470
- `;
7471
- var compactMenuItemCss = css20`
7472
- --menu-label-description-gap: 0;
7473
- --menu-item-inner-gap: var(--wui-space-02);
7474
- --menu-item-left-icon-size: 16px;
7475
- --menu-item-right-icon-size: 12px;
7476
- --menu-item-padding: 6px;
7477
- --menu-label-font-size: var(--wui-typography-label-4-size);
7478
- --menu-label-font-weight: var(--wui-typography-label-4-weight);
7479
- --menu-label-line-height: var(--wui-typography-label-4-line-height);
7480
- --menu-divider-margin: var(--wui-space-01);
7481
- `;
7482
7492
  var MenuContent = styled26(DropdownMenuContent)`
7483
7493
  ${menuContentCss}
7484
- ${({ $compact }) => $compact ? compactMenuItemCss : menuItemCss}
7485
7494
  `;
7486
7495
  var Menu = ({
7487
7496
  align = "start",
@@ -7496,6 +7505,7 @@ var Menu = ({
7496
7505
  onInteractOutside,
7497
7506
  ...props
7498
7507
  }) => {
7508
+ const contextValue = useMemo7(() => ({ compact }), [compact]);
7499
7509
  let controlProps = {
7500
7510
  ...isNotNil10(onOpenChange) && isNotNil10(isOpen) ? { open: isOpen, onOpenChange } : {}
7501
7511
  };
@@ -7505,7 +7515,7 @@ var Menu = ({
7505
7515
  onOpenChange: () => null
7506
7516
  };
7507
7517
  }
7508
- return /* @__PURE__ */ jsxs14(
7518
+ return /* @__PURE__ */ jsx187(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs14(
7509
7519
  DropdownMenu,
7510
7520
  {
7511
7521
  modal: false,
@@ -7537,7 +7547,7 @@ var Menu = ({
7537
7547
  ) })
7538
7548
  ]
7539
7549
  }
7540
- );
7550
+ ) });
7541
7551
  };
7542
7552
  Menu.displayName = "Menu";
7543
7553
 
@@ -7714,7 +7724,6 @@ var MenuItemDescription = ({ children }) => {
7714
7724
  import { jsx as jsx191, jsxs as jsxs16 } from "react/jsx-runtime";
7715
7725
  var SubMenuContent = styled30(DropdownMenuSubContent)`
7716
7726
  ${menuContentCss}
7717
- width: 298px;
7718
7727
 
7719
7728
  ${mq.smAndDown} {
7720
7729
  transform: translateX(-100%) !important;
@@ -7733,8 +7742,8 @@ var StyledSubTrigger = styled30(DropdownMenuSubTrigger)`
7733
7742
  `;
7734
7743
  var SubMenuTrigger = (props) => {
7735
7744
  const { isSmAndUp } = useMq();
7736
- const Trigger2 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
7737
- return /* @__PURE__ */ jsx191(Trigger2, { asChild: true, children: /* @__PURE__ */ jsx191(
7745
+ const Trigger3 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
7746
+ return /* @__PURE__ */ jsx191(Trigger3, { asChild: true, children: /* @__PURE__ */ jsx191(
7738
7747
  MenuItemButton,
7739
7748
  {
7740
7749
  ...props,
@@ -7751,12 +7760,13 @@ var SubMenu = ({
7751
7760
  }) => {
7752
7761
  const { isSmAndUp } = useMq();
7753
7762
  const [isExpanded, setIsExpanded] = useState7(false);
7763
+ const { compact } = useMenuContext();
7754
7764
  return isSmAndUp ? /* @__PURE__ */ jsxs16(DropdownMenuSub, { onOpenChange, children: [
7755
7765
  /* @__PURE__ */ jsxs16(SubMenuTrigger, { ...props, children: [
7756
7766
  /* @__PURE__ */ jsx191(MenuItemLabel, { children: label }),
7757
7767
  isNotNil12(description) ? /* @__PURE__ */ jsx191(MenuItemDescription, { children: description }) : null
7758
7768
  ] }),
7759
- /* @__PURE__ */ jsx191(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx191(SubMenuContent, { children }) })
7769
+ /* @__PURE__ */ jsx191(DropdownMenuPortal2, { children: /* @__PURE__ */ jsx191(SubMenuContent, { $compact: compact, children }) })
7760
7770
  ] }) : /* @__PURE__ */ jsxs16(DropdownMenuGroup, { children: [
7761
7771
  /* @__PURE__ */ jsxs16(
7762
7772
  SubMenuTrigger,
@@ -8708,8 +8718,264 @@ var WistiaLogo = ({
8708
8718
  return href !== void 0 ? /* @__PURE__ */ jsx205("a", { href, children: Logo }) : Logo;
8709
8719
  };
8710
8720
  WistiaLogo.displayName = "WistiaLogo";
8721
+
8722
+ // src/components/Select/Select.tsx
8723
+ import {
8724
+ Root as Root2,
8725
+ Trigger as Trigger2,
8726
+ Portal as Portal2,
8727
+ Content as Content2,
8728
+ ScrollUpButton,
8729
+ Viewport,
8730
+ Value,
8731
+ ScrollDownButton
8732
+ } from "@radix-ui/react-select";
8733
+ import { forwardRef as forwardRef19 } from "react";
8734
+ import styled41 from "styled-components";
8735
+ import { jsx as jsx206, jsxs as jsxs25 } from "react/jsx-runtime";
8736
+ var StyledTrigger = styled41(Trigger2)`
8737
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
8738
+ --wui-select-color-bg: var(--wui-color-bg-surface);
8739
+ --wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
8740
+ --wui-select-color-border: var(--wui-color-border);
8741
+ --wui-select-color-border-focus: var(--wui-color-border-active);
8742
+ --wui-select-color-border-error: var(--wui-color-border-error);
8743
+ --wui-select-color-border-disabled: var(--wui-color-border-disabled);
8744
+ --wui-select-border-radius: var(--wui-border-radius-rounded);
8745
+ --wui-select-multiline-border-radius: var(--wui-border-radius-02);
8746
+ --wui-select-vertical-padding: var(--wui-space-02);
8747
+ --wui-select-horizontal-padding: var(--wui-space-03);
8748
+ --wui-select-placeholder: var(--wui-gray-10);
8749
+ --wui-select-color-text-error: var(--wui-color-text-error);
8750
+
8751
+ padding: var(--wui-select-vertical-padding) var(--wui-select-horizontal-padding);
8752
+ background-color: var(--wui-select-color-bg);
8753
+ border: 1px solid var(--wui-select-color-border);
8754
+ border-radius: var(--wui-select-border-radius);
8755
+ min-width: 200px;
8756
+ text-align: left;
8757
+ display: inline-flex;
8758
+ align-items: center;
8759
+ justify-content: space-between;
8760
+ width: ${({ $fullWidth = false }) => $fullWidth ? "100%" : "auto"};
8761
+
8762
+ &[aria-expanded='true'],
8763
+ &:focus {
8764
+ outline: 2px solid var(--wui-color-focus-ring);
8765
+ }
8766
+
8767
+ &[aria-invalid='true'] {
8768
+ outline: 2px solid var(--wui-select-color-border-error);
8769
+ color: var(--wui-select-color-text-error);
8770
+ }
8771
+
8772
+ &:disabled {
8773
+ border-color: var(--wui-color-bg-surface-disabled);
8774
+ background-color: var(--wui-color-bg-surface-disabled);
8775
+ }
8776
+ `;
8777
+ var StyledContent2 = styled41(Content2)`
8778
+ --wui-select-content-border: var(--wui-color-border);
8779
+ --wui-select-content-bg: var(--wui-color-bg-surface);
8780
+ --wui-select-content-border-radius: var(--wui-border-radius-02);
8781
+ --wui-select-option-padding: var(--wui-space-02);
8782
+ --wui-select-option-inner-gap: var(--wui-space-03);
8783
+ --wui-select-option-bg-hover: var(--wui-color-bg-surface-hover);
8784
+
8785
+ overflow: hidden;
8786
+ transform: translateY(8px);
8787
+ background-color: var(--wui-select-content-bg);
8788
+ border: 1px solid var(--wui-select-content-border);
8789
+ border-radius: var(--wui-select-content-border-radius);
8790
+ padding: var(--wui-select-option-padding);
8791
+ min-width: 200px;
8792
+ `;
8793
+ var Select = forwardRef19(
8794
+ ({
8795
+ colorScheme = "inherit",
8796
+ children,
8797
+ onChange = () => null,
8798
+ placeholder = "Select...",
8799
+ fullWidth = false,
8800
+ ...props
8801
+ }, forwardedRef) => {
8802
+ const responsiveFullWidth = useResponsiveProp(fullWidth);
8803
+ return /* @__PURE__ */ jsxs25(
8804
+ Root2,
8805
+ {
8806
+ ...props,
8807
+ onValueChange: onChange,
8808
+ children: [
8809
+ /* @__PURE__ */ jsxs25(
8810
+ StyledTrigger,
8811
+ {
8812
+ ref: forwardedRef,
8813
+ $colorScheme: colorScheme,
8814
+ $fullWidth: responsiveFullWidth,
8815
+ ...props,
8816
+ children: [
8817
+ /* @__PURE__ */ jsx206(Value, { placeholder }),
8818
+ /* @__PURE__ */ jsx206(
8819
+ Icon,
8820
+ {
8821
+ size: "md",
8822
+ type: "caret-down"
8823
+ }
8824
+ )
8825
+ ]
8826
+ }
8827
+ ),
8828
+ /* @__PURE__ */ jsx206(Portal2, { children: /* @__PURE__ */ jsxs25(StyledContent2, { position: "popper", children: [
8829
+ /* @__PURE__ */ jsx206(ScrollUpButton, { children: /* @__PURE__ */ jsx206(Icon, { type: "caret-up" }) }),
8830
+ /* @__PURE__ */ jsx206(Viewport, { children }),
8831
+ /* @__PURE__ */ jsx206(ScrollDownButton, { children: /* @__PURE__ */ jsx206(Icon, { type: "caret-down" }) })
8832
+ ] }) })
8833
+ ]
8834
+ }
8835
+ );
8836
+ }
8837
+ );
8838
+ Select.displayName = "Select";
8839
+
8840
+ // src/components/Select/SelectOption.tsx
8841
+ import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
8842
+ import { forwardRef as forwardRef20 } from "react";
8843
+ import styled42 from "styled-components";
8844
+ import { jsx as jsx207, jsxs as jsxs26 } from "react/jsx-runtime";
8845
+ var StyledItem = styled42(Item)`
8846
+ ${variantStyleMap2.body3};
8847
+ display: flex;
8848
+ padding: var(--wui-select-option-padding);
8849
+ gap: var(--wui-select-option-inner-gap);
8850
+ font-size: var(--font-size);
8851
+ font-weight: var(--font-weight);
8852
+ border-radius: var(--wui-border-radius-01);
8853
+
8854
+ &:hover,
8855
+ &:focus-visible {
8856
+ background-color: var(--wui-select-option-bg-hover);
8857
+ outline: none;
8858
+ }
8859
+
8860
+ &[aria-disabled='true'] {
8861
+ color: var(--wui-color-text-disabled);
8862
+ }
8863
+
8864
+ &[aria-disabled='true']:hover {
8865
+ background-color: transparent;
8866
+ }
8867
+ `;
8868
+ var StyledIconContainer = styled42.span`
8869
+ width: 12px;
8870
+ `;
8871
+ var SelectOption = forwardRef20(
8872
+ ({ children, ...props }, forwardedRef) => {
8873
+ return /* @__PURE__ */ jsxs26(
8874
+ StyledItem,
8875
+ {
8876
+ ...props,
8877
+ ref: forwardedRef,
8878
+ children: [
8879
+ /* @__PURE__ */ jsx207(StyledIconContainer, { children: /* @__PURE__ */ jsx207(ItemIndicator, { children: /* @__PURE__ */ jsx207(
8880
+ Icon,
8881
+ {
8882
+ size: "sm",
8883
+ type: "checkmark"
8884
+ }
8885
+ ) }) }),
8886
+ /* @__PURE__ */ jsx207(ItemText, { children })
8887
+ ]
8888
+ }
8889
+ );
8890
+ }
8891
+ );
8892
+ SelectOption.displayName = "Option";
8893
+
8894
+ // src/components/Select/SelectOptionGroup.tsx
8895
+ import { Group, Label as Label2 } from "@radix-ui/react-select";
8896
+ import styled43 from "styled-components";
8897
+ import { jsx as jsx208, jsxs as jsxs27 } from "react/jsx-runtime";
8898
+ var StyledLabel3 = styled43(Label2)`
8899
+ padding: var(--wui-select-option-padding);
8900
+ `;
8901
+ var SelectOptionGroup = ({ children, label, ...props }) => {
8902
+ return /* @__PURE__ */ jsxs27(Group, { ...props, children: [
8903
+ /* @__PURE__ */ jsx208(StyledLabel3, { children: /* @__PURE__ */ jsx208(
8904
+ Text,
8905
+ {
8906
+ prominence: "secondary",
8907
+ variant: "body3",
8908
+ children: label
8909
+ }
8910
+ ) }),
8911
+ children
8912
+ ] });
8913
+ };
8914
+
8915
+ // src/components/AnalyticsCards/AnalyticsCard.tsx
8916
+ import styled44 from "styled-components";
8917
+ import { isNotNull } from "@wistia/type-guards";
8918
+ import { jsx as jsx209, jsxs as jsxs28 } from "react/jsx-runtime";
8919
+ var StyledAnalyticsCard = styled44.div`
8920
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
8921
+ display: grid;
8922
+ grid-template-areas: 'label slot' 'value value';
8923
+ grid-template-rows: auto auto;
8924
+ grid-template-columns: auto auto;
8925
+ gap: var(--wui-space-01);
8926
+ padding: var(--wui-space-03);
8927
+ background: var(--wui-color-bg-surface-secondary);
8928
+ flex: 1;
8929
+ border-radius: var(--wui-border-radius-02);
8930
+ `;
8931
+ var StyledLabel4 = styled44(Heading)`
8932
+ grid-area: label;
8933
+ `;
8934
+ var StyledValue = styled44(Heading)`
8935
+ grid-area: value;
8936
+ `;
8937
+ var StyledSlot = styled44.div`
8938
+ display: flex;
8939
+ justify-content: flex-end;
8940
+ grid-area: slot;
8941
+ align-self: center;
8942
+ `;
8943
+ var AnalyticsCard = ({
8944
+ label,
8945
+ value,
8946
+ slot,
8947
+ colorScheme = "inherit",
8948
+ ...props
8949
+ }) => /* @__PURE__ */ jsxs28(
8950
+ StyledAnalyticsCard,
8951
+ {
8952
+ $colorScheme: colorScheme,
8953
+ ...props,
8954
+ children: [
8955
+ /* @__PURE__ */ jsx209(
8956
+ StyledLabel4,
8957
+ {
8958
+ renderAs: "dt",
8959
+ variant: "heading6",
8960
+ children: label
8961
+ }
8962
+ ),
8963
+ /* @__PURE__ */ jsx209(
8964
+ StyledValue,
8965
+ {
8966
+ renderAs: "dd",
8967
+ variant: "heading3",
8968
+ children: value
8969
+ }
8970
+ ),
8971
+ isNotNull(slot) && /* @__PURE__ */ jsx209(StyledSlot, { children: slot })
8972
+ ]
8973
+ }
8974
+ );
8975
+ AnalyticsCard.displayName = "AnalyticsCard";
8711
8976
  export {
8712
8977
  ActionButton,
8978
+ AnalyticsCard,
8713
8979
  Avatar,
8714
8980
  Badge,
8715
8981
  Box,
@@ -8745,6 +9011,9 @@ export {
8745
9011
  RadioGroup,
8746
9012
  RadioMenuItem,
8747
9013
  ScreenReaderOnly,
9014
+ Select,
9015
+ SelectOption,
9016
+ SelectOptionGroup,
8748
9017
  Stack,
8749
9018
  SubMenu,
8750
9019
  Tag,