@wistia/ui 0.4.8-beta.f2d03166.7c06caa → 0.4.8

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,75 +2168,4 @@ declare const WistiaLogo: {
2168
2168
  displayName: string;
2169
2169
  };
2170
2170
 
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
- 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, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -2168,75 +2168,4 @@ declare const WistiaLogo: {
2168
2168
  displayName: string;
2169
2169
  };
2170
2170
 
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
- 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, 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 };
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 };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.4.8-beta.f2d03166.7c06caa
3
+ * @license @wistia/ui v0.4.8
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7742,8 +7742,8 @@ var StyledSubTrigger = styled30(DropdownMenuSubTrigger)`
7742
7742
  `;
7743
7743
  var SubMenuTrigger = (props) => {
7744
7744
  const { isSmAndUp } = useMq();
7745
- const Trigger3 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
7746
- return /* @__PURE__ */ jsx191(Trigger3, { asChild: true, children: /* @__PURE__ */ jsx191(
7745
+ const Trigger2 = isSmAndUp ? StyledSubTrigger : DropdownMenuItem;
7746
+ return /* @__PURE__ */ jsx191(Trigger2, { asChild: true, children: /* @__PURE__ */ jsx191(
7747
7747
  MenuItemButton,
7748
7748
  {
7749
7749
  ...props,
@@ -8718,199 +8718,6 @@ var WistiaLogo = ({
8718
8718
  return href !== void 0 ? /* @__PURE__ */ jsx205("a", { href, children: Logo }) : Logo;
8719
8719
  };
8720
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
8721
  export {
8915
8722
  ActionButton,
8916
8723
  Avatar,
@@ -8948,9 +8755,6 @@ export {
8948
8755
  RadioGroup,
8949
8756
  RadioMenuItem,
8950
8757
  ScreenReaderOnly,
8951
- Select,
8952
- SelectOption,
8953
- SelectOptionGroup,
8954
8758
  Stack,
8955
8759
  SubMenu,
8956
8760
  Tag,